y200subcontrols 0.0.391 → 0.0.393
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 +1 -0
- package/dist/components/ListBox.svelte +2 -2
- package/dist/components/LoadingIndicator.svelte +14 -0
- package/dist/components/LoadingIndicator.svelte.d.ts +3 -2
- package/dist/components/ModalDialog.svelte +16 -2
- package/dist/components/Pill.svelte +1 -1
- package/dist/components/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -30,6 +30,7 @@ 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' : ''}
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
data-[loading='false']:disabled:bg-slate-100 data-[loading='false']:disabled:text-slate-300 disabled:ring-0
|
|
@@ -16,10 +16,10 @@ function filterElements() {
|
|
|
16
16
|
elementsFilterd = elements;
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
const _searchQuery = searchQuery.toLowerCase();
|
|
20
20
|
let _elements = [];
|
|
21
21
|
for (const element of elements) {
|
|
22
|
-
if (element.content.toLowerCase().includes(
|
|
22
|
+
if (element.content.toLowerCase().includes(_searchQuery)) {
|
|
23
23
|
_elements.push(element);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -8,8 +8,22 @@ export let textColor = "white";
|
|
|
8
8
|
{size === 'sm' ? 'h-5 w-5' : ''}
|
|
9
9
|
{size === 'md' ? 'h-8 w-8' : ''}
|
|
10
10
|
{size === 'lg' ? 'h-10 w-10' : ''}
|
|
11
|
+
{size === 'xl' ? 'h-15 w-15' : ''}
|
|
12
|
+
{textColor === 'red' ? 'text-red-500' : ''}
|
|
13
|
+
{textColor === 'dark' ? 'text-slate-950' : ''}
|
|
14
|
+
{textColor === 'indigo' ? 'text-indigo-500' : ''}
|
|
15
|
+
{textColor === 'teal' ? 'text-teal-500' : ''}
|
|
11
16
|
{textColor === 'blue' ? 'text-blue-500' : ''}
|
|
17
|
+
{textColor === 'purple' ? 'text-purple-500' : ''}
|
|
18
|
+
{textColor === 'slate' ? 'text-slate-500' : ''}
|
|
19
|
+
{textColor === 'orange' ? 'text-orange-500' : ''}
|
|
20
|
+
{textColor === 'amber' ? 'text-amber-500' : ''}
|
|
21
|
+
{textColor === 'cyan' ? 'text-cyan-500' : ''}
|
|
22
|
+
{textColor === 'sky' ? 'text-sky-500' : ''}
|
|
12
23
|
{textColor === 'white' ? 'text-white' : ''}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
13
27
|
"
|
|
14
28
|
xmlns="http://www.w3.org/2000/svg"
|
|
15
29
|
fill="none"
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { ColorThemes } from './types.js';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
|
-
size?: "sm" | "md" | "lg";
|
|
5
|
-
textColor?:
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
6
|
+
textColor?: ColorThemes;
|
|
6
7
|
};
|
|
7
8
|
events: {
|
|
8
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -7,6 +7,7 @@ export let busy = false;
|
|
|
7
7
|
export let dialogSize = "md";
|
|
8
8
|
export let showCloseButton = true;
|
|
9
9
|
let dialog;
|
|
10
|
+
let isClickInside = false;
|
|
10
11
|
export function openDialog() {
|
|
11
12
|
setTimeout(() => {
|
|
12
13
|
dialog.classList.add("scale-0");
|
|
@@ -26,9 +27,19 @@ function fireCancelDialog() {
|
|
|
26
27
|
}
|
|
27
28
|
function dialogClicked(event) {
|
|
28
29
|
if (event.target === dialog) {
|
|
30
|
+
if (isClickInside) {
|
|
31
|
+
isClickInside = false;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
29
34
|
fireCancelDialog();
|
|
30
35
|
}
|
|
31
36
|
}
|
|
37
|
+
function handleMouseDown(event) {
|
|
38
|
+
isClickInside = true;
|
|
39
|
+
}
|
|
40
|
+
function handeMouseUp(event) {
|
|
41
|
+
isClickInside = false;
|
|
42
|
+
}
|
|
32
43
|
</script>
|
|
33
44
|
|
|
34
45
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
@@ -79,9 +90,12 @@ function dialogClicked(event) {
|
|
|
79
90
|
</button>
|
|
80
91
|
</div>
|
|
81
92
|
{/if}
|
|
82
|
-
</div>
|
|
83
|
-
<slot />
|
|
93
|
+
</div>
|
|
84
94
|
|
|
95
|
+
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
96
|
+
<div on:mousedown={handleMouseDown} on:mouseup={handeMouseUp}>
|
|
97
|
+
<slot />
|
|
98
|
+
</div>
|
|
85
99
|
<div slot="buttons" class="grid {allowSubmit ? 'grid-cols-2' : 'grid-cols-1'} gap-2 my-2">
|
|
86
100
|
<slot name="buttons">
|
|
87
101
|
{#if allowSubmit}
|
|
@@ -6,7 +6,7 @@ export let isLight = false;
|
|
|
6
6
|
{#if !isLight}
|
|
7
7
|
<span
|
|
8
8
|
class="inline-block text-center
|
|
9
|
-
{size === 'sm' ? 'text-sm rounded-3xl px-3 py-1
|
|
9
|
+
{size === 'sm' ? 'text-sm rounded-3xl px-3 py-1' : ''}
|
|
10
10
|
{size === 'md' ? 'text-base rounded-3xl px-4 py-2' : ''}
|
|
11
11
|
{size === 'lg' ? 'text-lg rounded-3xl px-6 py-3' : ''}
|
|
12
12
|
{theme === 'teal' ? 'bg-teal-500 text-teal-50' : ''}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type Size = 'sm' | 'md' | 'lg';
|
|
2
|
-
export type ColorThemes = 'red' | 'dark' | 'indigo' | 'teal' | 'blue' | 'purple' | 'slate' | 'orange' | 'amber' | 'cyan' | 'sky';
|
|
2
|
+
export type ColorThemes = 'red' | 'dark' | 'indigo' | 'teal' | 'blue' | 'purple' | 'slate' | 'orange' | 'amber' | 'cyan' | 'sky' | 'white';
|
|
3
3
|
export type PopupMenuItem = {
|
|
4
4
|
id: number;
|
|
5
5
|
content: string;
|