y200subcontrols 0.0.372 → 0.0.381
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 +8 -3
- package/dist/components/DataTableCell.svelte +3 -0
- package/dist/components/DataTableCell.svelte.d.ts +1 -0
- package/dist/components/HyperLink.svelte +8 -2
- package/dist/components/HyperLink.svelte.d.ts +2 -0
- package/dist/components/LabeledPasswordInput.svelte +3 -1
- package/dist/components/LabeledPasswordInput.svelte.d.ts +1 -0
- package/dist/components/ListBox.svelte +134 -0
- package/dist/components/ListBox.svelte.d.ts +24 -0
- package/dist/components/Pill.svelte +27 -5
- package/dist/components/Pill.svelte.d.ts +1 -0
- package/dist/components/PillBoolean.svelte +60 -0
- package/dist/components/PillBoolean.svelte.d.ts +24 -0
- package/dist/components/Table.svelte +18 -0
- package/dist/components/Table.svelte.d.ts +22 -0
- package/dist/components/types.d.ts +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -1
- package/dist/number-utils.d.ts +1 -0
- package/dist/number-utils.js +10 -0
- package/package.json +1 -1
|
@@ -17,15 +17,20 @@ export let title = "";
|
|
|
17
17
|
{type}
|
|
18
18
|
class=" rounded hover:brightness-95 focus:outline-none focus:ring active:ring
|
|
19
19
|
space-x-1
|
|
20
|
-
{buttonSize === 'sm' ? 'px-
|
|
21
|
-
{buttonSize === 'md' ? 'px-2 py-1.5' : ''}
|
|
22
|
-
{buttonSize === 'lg' ? 'font-bold px-
|
|
20
|
+
{buttonSize === 'sm' ? 'px-2 py-1 text-sm' : ''}
|
|
21
|
+
{buttonSize === 'md' ? 'px-2.5 py-1.5' : ''}
|
|
22
|
+
{buttonSize === 'lg' ? 'font-bold px-3 py-3' : ''}
|
|
23
23
|
{buttonStyle === 'blue' ? 'bg-blue-500 text-blue-50 ring-blue-500/20 ' : ''}
|
|
24
24
|
{buttonStyle === 'red' ? 'bg-red-500 text-red-50 ring-red-500/20' : ''}
|
|
25
25
|
{buttonStyle === 'dark' ? 'bg-slate-950 text-slate-50 ring-slate-800/20 ' : ''}
|
|
26
26
|
{buttonStyle === 'indigo' ? 'bg-indigo-500 text-indigo-50 ring-indigo-500/20' : ''}
|
|
27
27
|
{buttonStyle === 'teal' ? 'bg-teal-600 text-teal-50 ring-teal-600/20' : ''}
|
|
28
28
|
{buttonStyle === 'purple' ? 'bg-purple-600 text-purple-50 ring-purple-600/20' : ''}
|
|
29
|
+
{buttonStyle === 'orange' ? 'bg-orange-600 text-orange-50 ring-orange-600/20' : ''}
|
|
30
|
+
{buttonStyle === 'amber' ? 'bg-amber-600 text-amber-50 ring-amber-600/20' : ''}
|
|
31
|
+
{buttonStyle === 'cyan' ? 'bg-cyan-600 text-cyan-50 ring-cyan-600/20' : ''}
|
|
32
|
+
{buttonStyle === 'sky' ? 'bg-sky-600 text-sky-50 ring-sky-600/20' : ''}
|
|
33
|
+
|
|
29
34
|
|
|
30
35
|
data-[loading='false']:disabled:bg-slate-100 data-[loading='false']:disabled:text-slate-300 disabled:ring-0
|
|
31
36
|
data-[loading='false']:disabled:brightness-100
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export let width = void 0;
|
|
3
3
|
export let breakpoint = void 0;
|
|
4
4
|
export let extendedCss = "";
|
|
5
|
+
export let colspan = 0;
|
|
5
6
|
</script>
|
|
6
7
|
|
|
7
8
|
{#if isHeader}
|
|
@@ -12,6 +13,7 @@ export let extendedCss = "";
|
|
|
12
13
|
{breakpoint === 'lg' ? 'lg:hidden' : ''} {extendedCss}
|
|
13
14
|
"
|
|
14
15
|
style={width === undefined ? '' : `width:${width}px`}
|
|
16
|
+
{colspan}
|
|
15
17
|
>
|
|
16
18
|
<slot />
|
|
17
19
|
</th>
|
|
@@ -23,6 +25,7 @@ export let extendedCss = "";
|
|
|
23
25
|
{breakpoint === 'lg' ? 'lg:hidden' : ''} {extendedCss}
|
|
24
26
|
"
|
|
25
27
|
style={width === undefined ? '' : `width:${width}px`}
|
|
28
|
+
{colspan}
|
|
26
29
|
>
|
|
27
30
|
<slot />
|
|
28
31
|
</td>
|
|
@@ -4,6 +4,7 @@ export let disabled = false;
|
|
|
4
4
|
export let id = void 0;
|
|
5
5
|
export let isButton = false;
|
|
6
6
|
export let customCss = "";
|
|
7
|
+
export let traget = "_self";
|
|
7
8
|
let hrefInternal = href;
|
|
8
9
|
$: {
|
|
9
10
|
hrefInternal = disabled ? void 0 : href;
|
|
@@ -12,6 +13,7 @@ $: {
|
|
|
12
13
|
|
|
13
14
|
{#if !isButton}
|
|
14
15
|
<a
|
|
16
|
+
target={traget}
|
|
15
17
|
href={hrefInternal}
|
|
16
18
|
aria-disabled={disabled}
|
|
17
19
|
class="px-1 py-1 {customCss} text-slate-600 dark:text-slate-200
|
|
@@ -41,8 +43,12 @@ $: {
|
|
|
41
43
|
: ''}
|
|
42
44
|
{linkStyle === 'red' ? 'bg-red-500 text-red-50 ring-red-500/20 hover:bg-red-600' : ''}
|
|
43
45
|
{linkStyle === 'teal' ? 'bg-teal-500 text-teal-50 ring-teal-800/20 hover:bg-teal-600 ' : ''}
|
|
44
|
-
{linkStyle === 'indigo'
|
|
45
|
-
|
|
46
|
+
{linkStyle === 'indigo'
|
|
47
|
+
? 'bg-indigo-500 text-indigo-50 ring-indigo-800/20 hover:bg-indigo-600 '
|
|
48
|
+
: ''}
|
|
49
|
+
{linkStyle === 'purple'
|
|
50
|
+
? 'bg-purple-500 text-purple-50 ring-purple-800/20 hover:bg-purple-600 '
|
|
51
|
+
: ''}
|
|
46
52
|
{linkStyle === 'dark' ? 'bg-slate-950 text-slate-50 ring-slate-800/20 hover:bg-slate-800 ' : ''}
|
|
47
53
|
aria-disabled:cursor-default aria-disabled:text-slate-300 aria-disabled:bg-slate-100
|
|
48
54
|
space-x-1 transition-colors ease-in-out duration-150"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { HTMLAttributeAnchorTarget } from 'svelte/elements';
|
|
2
3
|
import type { ColorThemes } from './types.js';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
@@ -8,6 +9,7 @@ declare const __propDef: {
|
|
|
8
9
|
id?: string | undefined;
|
|
9
10
|
isButton?: boolean;
|
|
10
11
|
customCss?: string;
|
|
12
|
+
traget?: HTMLAttributeAnchorTarget;
|
|
11
13
|
};
|
|
12
14
|
events: {
|
|
13
15
|
[evt: string]: CustomEvent<any>;
|
|
@@ -12,6 +12,7 @@ export let validationText = void 0;
|
|
|
12
12
|
export let customCss = "";
|
|
13
13
|
export let customValidation = void 0;
|
|
14
14
|
export let disabled = false;
|
|
15
|
+
export let visible = true;
|
|
15
16
|
let input;
|
|
16
17
|
let isValid = true;
|
|
17
18
|
let inputType = "password";
|
|
@@ -44,9 +45,10 @@ onMount(() => {
|
|
|
44
45
|
{name}
|
|
45
46
|
{required}
|
|
46
47
|
{placeholder}
|
|
48
|
+
{visible}
|
|
47
49
|
on:validated={handleValidated}
|
|
48
50
|
>
|
|
49
|
-
<div class="relative group">
|
|
51
|
+
<div class="relative group {visible ? '' : 'hidden'}">
|
|
50
52
|
<input
|
|
51
53
|
type="password"
|
|
52
54
|
bind:this={input}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<script>import { createEventDispatcher, onMount } from "svelte";
|
|
2
|
+
export let value = "";
|
|
3
|
+
export let name = void 0;
|
|
4
|
+
export let searchQuery = "";
|
|
5
|
+
const dispatch = createEventDispatcher();
|
|
6
|
+
let list;
|
|
7
|
+
let select;
|
|
8
|
+
let elements = [];
|
|
9
|
+
let elementsFilterd = [];
|
|
10
|
+
function selectELement(element) {
|
|
11
|
+
select.value = element.value;
|
|
12
|
+
dispatch("change", element);
|
|
13
|
+
}
|
|
14
|
+
function filterElements() {
|
|
15
|
+
if (!searchQuery) {
|
|
16
|
+
elementsFilterd = elements;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
let _elements = [];
|
|
20
|
+
for (const element of elements) {
|
|
21
|
+
if (element.content.toLowerCase().includes(searchQuery)) {
|
|
22
|
+
_elements.push(element);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
elementsFilterd = _elements;
|
|
26
|
+
}
|
|
27
|
+
function handleKeyDown(event) {
|
|
28
|
+
if (event.key === "Enter") {
|
|
29
|
+
filterElements();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
onMount(() => {
|
|
33
|
+
let options = select.querySelectorAll("option");
|
|
34
|
+
elements = [];
|
|
35
|
+
for (const option of options) {
|
|
36
|
+
elements.push({
|
|
37
|
+
value: option.value,
|
|
38
|
+
content: option.innerText
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
filterElements();
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<div class="w-full h-full py-2 flex flex-col">
|
|
46
|
+
<select
|
|
47
|
+
bind:this={select}
|
|
48
|
+
class="hidden"
|
|
49
|
+
bind:value
|
|
50
|
+
{name}
|
|
51
|
+
>
|
|
52
|
+
<slot />
|
|
53
|
+
</select>
|
|
54
|
+
<div class="flex px-1">
|
|
55
|
+
<input
|
|
56
|
+
type="text"
|
|
57
|
+
class="flex-grow border peer block w-full rounded-l shadow-sm bg-white text-neutral-900
|
|
58
|
+
py-1.5 px-2 text-base
|
|
59
|
+
outline-none
|
|
60
|
+
focus:outline-none focus:ring
|
|
61
|
+
read-only:bg-neutral-100
|
|
62
|
+
dark:read-only:bg-neutral-800
|
|
63
|
+
disabled:text-slate-500
|
|
64
|
+
placeholder:text-sm placeholder:font-thin
|
|
65
|
+
dark:bg-slate-900
|
|
66
|
+
dark:border-slate-600 border-slate-300 focus:ring-teal-500/20 dark:focus:ring-teal-500/30
|
|
67
|
+
"
|
|
68
|
+
placeholder="Search"
|
|
69
|
+
bind:value={searchQuery}
|
|
70
|
+
on:keydown={handleKeyDown}
|
|
71
|
+
/>
|
|
72
|
+
<button
|
|
73
|
+
type="button"
|
|
74
|
+
class="px-2 py-1.5 rounded-r bg-teal-500 text-teal-50"
|
|
75
|
+
on:click={filterElements}
|
|
76
|
+
>
|
|
77
|
+
<svg
|
|
78
|
+
class="w-5 h-5"
|
|
79
|
+
aria-hidden="true"
|
|
80
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
81
|
+
width="24"
|
|
82
|
+
height="24"
|
|
83
|
+
fill="none"
|
|
84
|
+
viewBox="0 0 24 24"
|
|
85
|
+
>
|
|
86
|
+
<path
|
|
87
|
+
stroke="currentColor"
|
|
88
|
+
stroke-linecap="round"
|
|
89
|
+
stroke-width="2"
|
|
90
|
+
d="m21 21-3.5-3.5M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"
|
|
91
|
+
/>
|
|
92
|
+
</svg>
|
|
93
|
+
</button>
|
|
94
|
+
</div>
|
|
95
|
+
<ul bind:this={list} class="overflow-y-scroll h-full mt-2 pt-1 border-t border-t-slate-300">
|
|
96
|
+
{#each elementsFilterd as element (element.value)}
|
|
97
|
+
<li>
|
|
98
|
+
<button
|
|
99
|
+
data-checked={select.value === element.value ? 'true' : 'false'}
|
|
100
|
+
type="button"
|
|
101
|
+
on:click={() => selectELement(element)}
|
|
102
|
+
class="w-full flex text-left px-2 py-1.5 space-x-1
|
|
103
|
+
hover:bg-teal-500/10 hover:text-teal-700
|
|
104
|
+
data-[checked='true']:bg-teal-500
|
|
105
|
+
data-[checked='true']:text-teal-50
|
|
106
|
+
|
|
107
|
+
"
|
|
108
|
+
>
|
|
109
|
+
<svg
|
|
110
|
+
class="w-4 h-4 my-auto {select.value === element.value ? '' : 'invisible'}"
|
|
111
|
+
aria-hidden="true"
|
|
112
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
113
|
+
width="24"
|
|
114
|
+
height="24"
|
|
115
|
+
fill="none"
|
|
116
|
+
viewBox="0 0 24 24"
|
|
117
|
+
>
|
|
118
|
+
<path
|
|
119
|
+
stroke="currentColor"
|
|
120
|
+
stroke-linecap="round"
|
|
121
|
+
stroke-linejoin="round"
|
|
122
|
+
stroke-width="2"
|
|
123
|
+
d="M5 11.917 9.724 16.5 19 7.5"
|
|
124
|
+
/>
|
|
125
|
+
</svg>
|
|
126
|
+
|
|
127
|
+
<span class="my-auto">
|
|
128
|
+
{element.content}
|
|
129
|
+
</span>
|
|
130
|
+
</button>
|
|
131
|
+
</li>
|
|
132
|
+
{/each}
|
|
133
|
+
</ul>
|
|
134
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
value?: string;
|
|
5
|
+
name?: string | undefined;
|
|
6
|
+
searchQuery?: string;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
change: CustomEvent<any>;
|
|
10
|
+
} & {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
default: {};
|
|
15
|
+
};
|
|
16
|
+
exports?: {} | undefined;
|
|
17
|
+
bindings?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
export type ListBoxProps = typeof __propDef.props;
|
|
20
|
+
export type ListBoxEvents = typeof __propDef.events;
|
|
21
|
+
export type ListBoxSlots = typeof __propDef.slots;
|
|
22
|
+
export default class ListBox extends SvelteComponent<ListBoxProps, ListBoxEvents, ListBoxSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -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}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script>import Pill from "./Pill.svelte";
|
|
2
|
+
export let theme = "teal";
|
|
3
|
+
export let size = "md";
|
|
4
|
+
export let isLight = false;
|
|
5
|
+
export let state = false;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
{#if state}
|
|
9
|
+
<Pill {theme} {size} {isLight}>
|
|
10
|
+
<div class="flex space-x-1">
|
|
11
|
+
<svg
|
|
12
|
+
class="w-5 h-5 my-auto"
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
width="24"
|
|
16
|
+
height="24"
|
|
17
|
+
fill="none"
|
|
18
|
+
viewBox="0 0 24 24"
|
|
19
|
+
>
|
|
20
|
+
<path
|
|
21
|
+
stroke="currentColor"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
stroke-width="2"
|
|
25
|
+
d="M5 11.917 9.724 16.5 19 7.5"
|
|
26
|
+
/>
|
|
27
|
+
</svg>
|
|
28
|
+
|
|
29
|
+
<div class="my-auto">
|
|
30
|
+
<slot />
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</Pill>
|
|
34
|
+
{:else}
|
|
35
|
+
<Pill theme="slate" {size} {isLight}>
|
|
36
|
+
<div class="flex space-x-1">
|
|
37
|
+
<svg
|
|
38
|
+
class="w-5 h-5 my-auto"
|
|
39
|
+
aria-hidden="true"
|
|
40
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
41
|
+
width="24"
|
|
42
|
+
height="24"
|
|
43
|
+
fill="none"
|
|
44
|
+
viewBox="0 0 24 24"
|
|
45
|
+
>
|
|
46
|
+
<path
|
|
47
|
+
stroke="currentColor"
|
|
48
|
+
stroke-linecap="round"
|
|
49
|
+
stroke-linejoin="round"
|
|
50
|
+
stroke-width="2"
|
|
51
|
+
d="M6 18 17.94 6M18 18 6.06 6"
|
|
52
|
+
/>
|
|
53
|
+
</svg>
|
|
54
|
+
|
|
55
|
+
<div class="my-auto">
|
|
56
|
+
<slot />
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</Pill>
|
|
60
|
+
{/if}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { ColorThemes, Size } from './types.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
theme?: ColorThemes;
|
|
6
|
+
size?: Size;
|
|
7
|
+
isLight?: boolean;
|
|
8
|
+
state?: boolean | undefined;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
default: {};
|
|
15
|
+
};
|
|
16
|
+
exports?: {} | undefined;
|
|
17
|
+
bindings?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
export type PillBooleanProps = typeof __propDef.props;
|
|
20
|
+
export type PillBooleanEvents = typeof __propDef.events;
|
|
21
|
+
export type PillBooleanSlots = typeof __propDef.slots;
|
|
22
|
+
export default class PillBoolean extends SvelteComponent<PillBooleanProps, PillBooleanEvents, PillBooleanSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script>export let hasFooter = false;
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<div class="w-full border border-slate-300 overflow-clip rounded-md">
|
|
5
|
+
<table class="w-full border-collapse">
|
|
6
|
+
<thead class="bg-gray-500 text-gray-50 border-b-2 border-b-gray-700">
|
|
7
|
+
<slot name="thead" />
|
|
8
|
+
</thead>
|
|
9
|
+
<tbody>
|
|
10
|
+
<slot />
|
|
11
|
+
</tbody>
|
|
12
|
+
{#if hasFooter}
|
|
13
|
+
<tfoot class="bg-gray-500 text-gray-50 border-b-2 border-b-gray-700">
|
|
14
|
+
<slot name="tfoot" />
|
|
15
|
+
</tfoot>
|
|
16
|
+
{/if}
|
|
17
|
+
</table>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
hasFooter?: boolean;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {
|
|
10
|
+
thead: {};
|
|
11
|
+
default: {};
|
|
12
|
+
tfoot: {};
|
|
13
|
+
};
|
|
14
|
+
exports?: {} | undefined;
|
|
15
|
+
bindings?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
export type TableProps = typeof __propDef.props;
|
|
18
|
+
export type TableEvents = typeof __propDef.events;
|
|
19
|
+
export type TableSlots = typeof __propDef.slots;
|
|
20
|
+
export default class Table extends SvelteComponent<TableProps, TableEvents, TableSlots> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type Size = 'sm' | 'md' | 'lg';
|
|
2
|
-
export type ColorThemes = 'red' | 'dark' | 'indigo' | 'teal' | 'blue' | 'purple' | 'slate';
|
|
2
|
+
export type ColorThemes = 'red' | 'dark' | 'indigo' | 'teal' | 'blue' | 'purple' | 'slate' | 'orange' | 'amber' | 'cyan' | 'sky';
|
|
3
3
|
export type PopupMenuItem = {
|
|
4
4
|
id: number;
|
|
5
5
|
content: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ import DataTablePaginator from "./components/DataTablePaginator.svelte";
|
|
|
27
27
|
import TabControl from "./components/TabControl.svelte";
|
|
28
28
|
import TabItem from "./components/TabItem.svelte";
|
|
29
29
|
import Pill from "./components/Pill.svelte";
|
|
30
|
+
import PillBoolean from "./components/PillBoolean.svelte";
|
|
30
31
|
import DropDownButton from "./components/DropDownButton.svelte";
|
|
32
|
+
import Table from "./components/Table.svelte";
|
|
31
33
|
import { formatDateTime } from "./date-utils.js";
|
|
32
|
-
|
|
34
|
+
import { formatNumber } from "./number-utils.js";
|
|
35
|
+
import ListBox from "./components/ListBox.svelte";
|
|
36
|
+
export { Button, LoadingIndicator, Card, CardHeader, Form, ToggleButton, LabeledFormInput, LabeledPasswordInput, Alert, HyperLink, LabeledSelect, ModalDialog, BooleanPresenter, DataTable, DataTableCell, DataTableRow, DataTableMenuButton, DatePresenter, LabeledDatePicker, LabeledTextArea, Breadcrumb, SegmentedControl, HyperlinkButton, SideNav, SideNavItem, DataTablePaginator, TabControl, TabItem, Pill, PillBoolean, DropDownButton, Table, ListBox, formatDateTime, formatNumber };
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,10 @@ import DataTablePaginator from "./components/DataTablePaginator.svelte";
|
|
|
28
28
|
import TabControl from "./components/TabControl.svelte";
|
|
29
29
|
import TabItem from "./components/TabItem.svelte";
|
|
30
30
|
import Pill from "./components/Pill.svelte";
|
|
31
|
+
import PillBoolean from "./components/PillBoolean.svelte";
|
|
31
32
|
import DropDownButton from "./components/DropDownButton.svelte";
|
|
33
|
+
import Table from "./components/Table.svelte";
|
|
32
34
|
import { formatDateTime } from "./date-utils.js";
|
|
33
|
-
|
|
35
|
+
import { formatNumber } from "./number-utils.js";
|
|
36
|
+
import ListBox from "./components/ListBox.svelte";
|
|
37
|
+
export { Button, LoadingIndicator, Card, CardHeader, Form, ToggleButton, LabeledFormInput, LabeledPasswordInput, Alert, HyperLink, LabeledSelect, ModalDialog, BooleanPresenter, DataTable, DataTableCell, DataTableRow, DataTableMenuButton, DatePresenter, LabeledDatePicker, LabeledTextArea, Breadcrumb, SegmentedControl, HyperlinkButton, SideNav, SideNavItem, DataTablePaginator, TabControl, TabItem, Pill, PillBoolean, DropDownButton, Table, ListBox, formatDateTime, formatNumber };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatNumber(number: number | undefined, locale: string | undefined, options: Intl.NumberFormatOptions | undefined): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function formatNumber(number, locale = 'en-US', options) {
|
|
2
|
+
number ??= 0;
|
|
3
|
+
options ??= {
|
|
4
|
+
style: 'decimal',
|
|
5
|
+
minimumFractionDigits: 2,
|
|
6
|
+
maximumFractionDigits: 3
|
|
7
|
+
};
|
|
8
|
+
const formatter = new Intl.NumberFormat(locale, options);
|
|
9
|
+
return formatter.format(number);
|
|
10
|
+
}
|