y200subcontrols 0.1.372 → 0.1.374
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.
- package/dist/components/Button.svelte +2 -6
- package/dist/components/DataTable.svelte +3 -3
- package/dist/components/DataTableMenuButton.svelte +1 -1
- package/dist/components/HyperLink.svelte +1 -1
- package/dist/components/HyperlinkButton.svelte +2 -3
- package/dist/components/ModalDialog.svelte +7 -6
- package/dist/components/ModalDialog.svelte.d.ts +2 -0
- package/package.json +1 -1
|
@@ -30,14 +30,10 @@ export let title = "";
|
|
|
30
30
|
{buttonStyle === 'amber' ? 'bg-amber-600 text-amber-50 ring-amber-600/20' : ''}
|
|
31
31
|
{buttonStyle === 'cyan' ? 'bg-cyan-600 text-cyan-50 ring-cyan-600/20' : ''}
|
|
32
32
|
{buttonStyle === 'sky' ? 'bg-sky-600 text-sky-50 ring-sky-600/20' : ''}
|
|
33
|
-
{buttonStyle === 'white' ? 'bg-white text-slate-950 ring-white/20' : ''}
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
{buttonStyle === 'white' ? 'bg-white text-slate-950 ring-white/20' : ''}
|
|
36
34
|
data-[loading='false']:disabled:bg-slate-100 data-[loading='false']:disabled:text-slate-300 disabled:ring-0
|
|
37
35
|
data-[loading='false']:disabled:brightness-100
|
|
38
|
-
data-[loading='true']:brightness-100 flex justify-center align-middle content-center
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
data-[loading='true']:brightness-100 flex justify-center align-middle content-center
|
|
41
37
|
{customCss}
|
|
42
38
|
"
|
|
43
39
|
on:click
|
|
@@ -112,7 +112,7 @@ function closeAdvancedSearch() {
|
|
|
112
112
|
type="button"
|
|
113
113
|
class="px-3 py-1.5 bg-blue-500 text-blue-50
|
|
114
114
|
focus:outline-none focus:ring ring-blue-500/20 active:z-[500]
|
|
115
|
-
hover:bg-blue-600 disabled:bg-slate-100 disabled:text-slate-300
|
|
115
|
+
hover:bg-blue-600 disabled:bg-slate-100 disabled:text-slate-300 cursor-pointer
|
|
116
116
|
last-of-type:rounded-r-md"
|
|
117
117
|
on:click={() => dispatch('addnew')}
|
|
118
118
|
>
|
|
@@ -169,7 +169,7 @@ function closeAdvancedSearch() {
|
|
|
169
169
|
<div class=" mx-2 relative my-auto">
|
|
170
170
|
<button
|
|
171
171
|
type="button"
|
|
172
|
-
class="px-3 py-1.5 text-blue-500 border border-blue-500 rounded
|
|
172
|
+
class="px-3 py-1.5 text-blue-500 border border-blue-500 rounded cursor-pointer
|
|
173
173
|
hover:bg-blue-50 active:bg-blue-500 active:text-blue-50 outline-blue-600 h-full
|
|
174
174
|
disabled:text-slate-300 disabled:bg-slate-100 disabled:border-slate-400 disabled:outline-none"
|
|
175
175
|
on:click={() => (isMenuOpen = true)}
|
|
@@ -199,7 +199,7 @@ function closeAdvancedSearch() {
|
|
|
199
199
|
<li class="flex">
|
|
200
200
|
<button
|
|
201
201
|
disabled={menuItem.disabled}
|
|
202
|
-
class="space-x-1 px-2 text-slate-600 hover:bg-slate-500/20
|
|
202
|
+
class="space-x-1 px-2 text-slate-600 hover:bg-slate-500/20 cursor-pointer
|
|
203
203
|
block flex-grow py-1 text-left active:text-slate-50 active:bg-slate-500
|
|
204
204
|
transition-all ease-in-out duration-300 focus:outline-none outline-none
|
|
205
205
|
disabled:text-slate-300 disabled:hover:bg-transparent whitespace-nowrap"
|
|
@@ -43,7 +43,7 @@ onMount(() => {
|
|
|
43
43
|
<div class="relative">
|
|
44
44
|
<button
|
|
45
45
|
type="button"
|
|
46
|
-
class="px-3 py-1 rounded bg-emerald-500 text-emerald-50
|
|
46
|
+
class="px-3 py-1 rounded bg-emerald-500 text-emerald-50 cursor-pointer
|
|
47
47
|
disabled:bg-slate-100 disabled:text-slate-300"
|
|
48
48
|
disabled={isDisabled}
|
|
49
49
|
on:click={openMenu}
|
|
@@ -16,7 +16,7 @@ $: {
|
|
|
16
16
|
target={traget}
|
|
17
17
|
href={hrefInternal}
|
|
18
18
|
aria-disabled={disabled}
|
|
19
|
-
class="px-1 py-1 {customCss} text-slate-600 dark:text-slate-200
|
|
19
|
+
class="px-1 py-1 {customCss} text-slate-600 dark:text-slate-200 cursor-pointer
|
|
20
20
|
{id}
|
|
21
21
|
{linkStyle === 'blue' ? 'hover:text-blue-500 active:text-blue-600' : ''}
|
|
22
22
|
{linkStyle === 'red' ? 'hover:text-red-500 active:text-red-600' : ''}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let linkStyle = "teal";
|
|
1
|
+
<script>export let linkStyle = "teal";
|
|
3
2
|
export let disabled = false;
|
|
4
3
|
export let id = void 0;
|
|
5
4
|
export let type = "button";
|
|
@@ -10,7 +9,7 @@ export let customCss = "";
|
|
|
10
9
|
{type}
|
|
11
10
|
on:click
|
|
12
11
|
{disabled}
|
|
13
|
-
class="px-1 py-1 {customCss} text-slate-600 dark:text-slate-200
|
|
12
|
+
class="px-1 py-1 {customCss} text-slate-600 dark:text-slate-200 cursor-pointer
|
|
14
13
|
{id}
|
|
15
14
|
{linkStyle === 'blue' ? 'hover:text-blue-500 active:text-blue-600' : ''}
|
|
16
15
|
{linkStyle === 'red' ? 'hover:text-red-500 active:text-red-600' : ''}
|
|
@@ -6,6 +6,7 @@ export let allowSubmit = true;
|
|
|
6
6
|
export let busy = false;
|
|
7
7
|
export let dialogSize = "md";
|
|
8
8
|
export let showCloseButton = true;
|
|
9
|
+
export let theme = "teal";
|
|
9
10
|
let dialog;
|
|
10
11
|
let isClickInside = false;
|
|
11
12
|
export function openDialog() {
|
|
@@ -47,9 +48,9 @@ function handeMouseUp(event) {
|
|
|
47
48
|
<dialog
|
|
48
49
|
bind:this={dialog}
|
|
49
50
|
class="p-2 w-full
|
|
50
|
-
{dialogSize === 'sm' ? 'md:w-1/2' : ''}
|
|
51
|
-
{dialogSize === 'md' ? 'md:w-3/4 lg:w-2/3 xl:w-1/2' : ''}
|
|
52
|
-
{dialogSize === 'lg' ? 'md:w-3/4' : ''}
|
|
51
|
+
{dialogSize === 'sm' ? 'md:w-1/2 m-auto' : ''}
|
|
52
|
+
{dialogSize === 'md' ? 'md:w-3/4 lg:w-2/3 xl:w-1/2 m-auto' : ''}
|
|
53
|
+
{dialogSize === 'lg' ? 'md:w-3/4 m-auto' : ''}
|
|
53
54
|
bg-transparent
|
|
54
55
|
|
|
55
56
|
backdrop:bg-black/20 dark:backdrop:bg-white/20
|
|
@@ -67,7 +68,7 @@ function handeMouseUp(event) {
|
|
|
67
68
|
type="button"
|
|
68
69
|
data-close-dialog="true"
|
|
69
70
|
on:click={fireCancelDialog}
|
|
70
|
-
class="text-slate-400 dark:text-slate-200
|
|
71
|
+
class="text-slate-400 dark:text-slate-200 cursor-pointer
|
|
71
72
|
hover:text-red-500 px-2 inset-y-0 transition-colors ease-in-out"
|
|
72
73
|
>
|
|
73
74
|
<svg
|
|
@@ -90,7 +91,7 @@ function handeMouseUp(event) {
|
|
|
90
91
|
</button>
|
|
91
92
|
</div>
|
|
92
93
|
{/if}
|
|
93
|
-
</div>
|
|
94
|
+
</div>
|
|
94
95
|
|
|
95
96
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
96
97
|
<div on:mousedown={handleMouseDown} on:mouseup={handeMouseUp}>
|
|
@@ -99,7 +100,7 @@ function handeMouseUp(event) {
|
|
|
99
100
|
<div slot="buttons" class="grid {allowSubmit ? 'grid-cols-2' : 'grid-cols-1'} gap-2 my-2">
|
|
100
101
|
<slot name="buttons">
|
|
101
102
|
{#if allowSubmit}
|
|
102
|
-
<Button type="submit" isLoading={busy}>
|
|
103
|
+
<Button type="submit" isLoading={busy} buttonStyle={theme}>
|
|
103
104
|
<span>Ok</span>
|
|
104
105
|
</Button>
|
|
105
106
|
{/if}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { ColorThemes } from './types.js';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
allowSubmit?: boolean;
|
|
5
6
|
busy?: boolean;
|
|
6
7
|
dialogSize?: "sm" | "md" | "lg";
|
|
7
8
|
showCloseButton?: boolean;
|
|
9
|
+
theme?: ColorThemes;
|
|
8
10
|
openDialog?: () => void;
|
|
9
11
|
dismissDialog?: () => void;
|
|
10
12
|
};
|