uisv 0.0.13 → 0.0.15
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/alert.svelte +8 -2
- package/dist/components/alert.svelte.d.ts +2 -2
- package/dist/components/badge.svelte +18 -18
- package/dist/components/badge.svelte.d.ts +2 -2
- package/dist/components/banner.svelte +8 -2
- package/dist/components/banner.svelte.d.ts +2 -2
- package/dist/components/breadcrumb.svelte +75 -0
- package/dist/components/breadcrumb.svelte.d.ts +38 -0
- package/dist/components/button.svelte +415 -0
- package/dist/components/{button/index.d.ts → button.svelte.d.ts} +9 -4
- package/dist/components/calendar.svelte +99 -0
- package/dist/components/calendar.svelte.d.ts +16 -0
- package/dist/components/card.svelte +11 -10
- package/dist/components/card.svelte.d.ts +2 -1
- package/dist/components/collapsible.svelte +76 -0
- package/dist/components/collapsible.svelte.d.ts +15 -0
- package/dist/components/icon.svelte +58 -0
- package/dist/components/icon.svelte.d.ts +8 -0
- package/dist/components/index.d.ts +18 -3
- package/dist/components/index.js +18 -3
- package/dist/components/input-number.svelte +175 -0
- package/dist/components/input-number.svelte.d.ts +38 -0
- package/dist/components/input-time.svelte +233 -0
- package/dist/components/input-time.svelte.d.ts +53 -0
- package/dist/components/input.svelte +285 -0
- package/dist/components/{input/index.d.ts → input.svelte.d.ts} +6 -5
- package/dist/components/kbd.svelte +35 -35
- package/dist/components/kbd.svelte.d.ts +2 -2
- package/dist/components/pin-input.svelte +20 -20
- package/dist/components/pin-input.svelte.d.ts +2 -2
- package/dist/components/placeholder.svelte +1 -1
- package/dist/components/select.svelte +2 -2
- package/dist/components/select.svelte.d.ts +2 -2
- package/dist/components/seperator.svelte +212 -0
- package/dist/components/seperator.svelte.d.ts +22 -0
- package/dist/components/tabs.svelte +1 -2
- package/dist/date.d.ts +1 -0
- package/dist/date.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/utilities.svelte.d.ts +7 -0
- package/dist/utilities.svelte.js +20 -0
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +24 -39
- package/package.json +41 -49
- package/dist/components/button/button.svelte +0 -105
- package/dist/components/button/button.svelte.d.ts +0 -4
- package/dist/components/button/index.js +0 -4
- package/dist/components/button/style.d.ts +0 -148
- package/dist/components/button/style.js +0 -248
- package/dist/components/input/index.js +0 -2
- package/dist/components/input/input.svelte +0 -103
- package/dist/components/input/input.svelte.d.ts +0 -4
- package/dist/components/input/style.d.ts +0 -316
- package/dist/components/input/style.js +0 -128
- package/dist/components/input-time/index.d.ts +0 -375
- package/dist/components/input-time/index.js +0 -144
- package/dist/components/input-time/input-time.svelte +0 -39
- package/dist/components/input-time/input-time.svelte.d.ts +0 -4
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
type PropColor,
|
|
4
|
+
isSnippet,
|
|
5
|
+
type ButtonProps,
|
|
6
|
+
Button,
|
|
7
|
+
type PropVariant,
|
|
8
|
+
} from '../index.js';
|
|
3
9
|
import type { Component, Snippet } from 'svelte';
|
|
4
10
|
import type { ClassNameValue } from 'tailwind-merge';
|
|
5
11
|
import { tv } from 'tailwind-variants';
|
|
@@ -10,7 +16,7 @@
|
|
|
10
16
|
description?: string | Snippet;
|
|
11
17
|
icon?: string | Snippet | Component;
|
|
12
18
|
color?: PropColor;
|
|
13
|
-
variant?:
|
|
19
|
+
variant?: Exclude<PropVariant, 'none' | 'ghost'>;
|
|
14
20
|
position?: 'bottom' | 'right';
|
|
15
21
|
actions?: ButtonProps[];
|
|
16
22
|
close?: boolean | ButtonProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PropColor, type ButtonProps } from '../index.js';
|
|
1
|
+
import { type PropColor, type ButtonProps, type PropVariant } from '../index.js';
|
|
2
2
|
import type { Component, Snippet } from 'svelte';
|
|
3
3
|
import type { ClassNameValue } from 'tailwind-merge';
|
|
4
4
|
export type AlertProps = {
|
|
@@ -6,7 +6,7 @@ export type AlertProps = {
|
|
|
6
6
|
description?: string | Snippet;
|
|
7
7
|
icon?: string | Snippet | Component;
|
|
8
8
|
color?: PropColor;
|
|
9
|
-
variant?:
|
|
9
|
+
variant?: Exclude<PropVariant, 'none' | 'ghost'>;
|
|
10
10
|
position?: 'bottom' | 'right';
|
|
11
11
|
actions?: ButtonProps[];
|
|
12
12
|
close?: boolean | ButtonProps;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { Component, Snippet } from 'svelte';
|
|
3
3
|
import { tv } from 'tailwind-variants';
|
|
4
|
-
import { type PropColor, isSnippet } from '../index.js';
|
|
4
|
+
import { type PropColor, type PropVariant, isSnippet } from '../index.js';
|
|
5
5
|
import type { ClassNameValue } from 'tailwind-merge';
|
|
6
6
|
|
|
7
7
|
export type BadgeProps = {
|
|
8
8
|
label?: string;
|
|
9
9
|
color?: PropColor;
|
|
10
|
-
variant?:
|
|
10
|
+
variant?: Exclude<PropVariant, 'none' | 'ghost'>;
|
|
11
11
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
12
12
|
icon?: string | Snippet | Component;
|
|
13
13
|
trailingicon?: boolean;
|
|
@@ -76,22 +76,22 @@
|
|
|
76
76
|
{
|
|
77
77
|
color: 'info',
|
|
78
78
|
variant: 'solid',
|
|
79
|
-
class: 'bg-
|
|
79
|
+
class: 'bg-info-500',
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
color: 'success',
|
|
83
83
|
variant: 'solid',
|
|
84
|
-
class: 'bg-
|
|
84
|
+
class: 'bg-success-500',
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
color: 'error',
|
|
88
88
|
variant: 'solid',
|
|
89
|
-
class: 'bg-
|
|
89
|
+
class: 'bg-error-500',
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
color: 'warning',
|
|
93
93
|
variant: 'solid',
|
|
94
|
-
class: 'bg-
|
|
94
|
+
class: 'bg-warning-500',
|
|
95
95
|
},
|
|
96
96
|
|
|
97
97
|
{
|
|
@@ -107,22 +107,22 @@
|
|
|
107
107
|
{
|
|
108
108
|
color: 'info',
|
|
109
109
|
variant: 'outline',
|
|
110
|
-
class: 'border-
|
|
110
|
+
class: 'border-info-300 text-info-500',
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
color: 'success',
|
|
114
114
|
variant: 'outline',
|
|
115
|
-
class: 'border-green-300 text-
|
|
115
|
+
class: 'border-green-300 text-success-500',
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
color: 'error',
|
|
119
119
|
variant: 'outline',
|
|
120
|
-
class: 'border-
|
|
120
|
+
class: 'border-error-300 text-error-500',
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
color: 'warning',
|
|
124
124
|
variant: 'outline',
|
|
125
|
-
class: 'border-
|
|
125
|
+
class: 'border-warning-300 text-warning-500',
|
|
126
126
|
},
|
|
127
127
|
|
|
128
128
|
{
|
|
@@ -138,22 +138,22 @@
|
|
|
138
138
|
{
|
|
139
139
|
color: 'info',
|
|
140
140
|
variant: 'soft',
|
|
141
|
-
class: 'bg-
|
|
141
|
+
class: 'bg-info-100 text-info-500',
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
color: 'success',
|
|
145
145
|
variant: 'soft',
|
|
146
|
-
class: 'bg-
|
|
146
|
+
class: 'bg-success-100 text-success-500',
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
color: 'error',
|
|
150
150
|
variant: 'soft',
|
|
151
|
-
class: 'bg-
|
|
151
|
+
class: 'bg-error-100 text-error-500',
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
color: 'warning',
|
|
155
155
|
variant: 'soft',
|
|
156
|
-
class: 'bg-
|
|
156
|
+
class: 'bg-warning-100 text-warning-500 ',
|
|
157
157
|
},
|
|
158
158
|
|
|
159
159
|
{
|
|
@@ -169,22 +169,22 @@
|
|
|
169
169
|
{
|
|
170
170
|
color: 'info',
|
|
171
171
|
variant: 'subtle',
|
|
172
|
-
class: 'bg-
|
|
172
|
+
class: 'bg-info-50 text-info-600 border-info-200',
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
175
|
color: 'success',
|
|
176
176
|
variant: 'subtle',
|
|
177
|
-
class: 'bg-
|
|
177
|
+
class: 'bg-success-100 text-success-600 border-success-300',
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
color: 'error',
|
|
181
181
|
variant: 'subtle',
|
|
182
|
-
class: 'bg-
|
|
182
|
+
class: 'bg-error-50 text-error-600 border-error-200',
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
color: 'warning',
|
|
186
186
|
variant: 'subtle',
|
|
187
|
-
class: 'bg-
|
|
187
|
+
class: 'bg-warning-50 text-warning-600 border-warning-300',
|
|
188
188
|
},
|
|
189
189
|
],
|
|
190
190
|
})({ variant, size, color });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Component, Snippet } from 'svelte';
|
|
2
|
-
import { type PropColor } from '../index.js';
|
|
2
|
+
import { type PropColor, type PropVariant } from '../index.js';
|
|
3
3
|
import type { ClassNameValue } from 'tailwind-merge';
|
|
4
4
|
export type BadgeProps = {
|
|
5
5
|
label?: string;
|
|
6
6
|
color?: PropColor;
|
|
7
|
-
variant?:
|
|
7
|
+
variant?: Exclude<PropVariant, 'none' | 'ghost'>;
|
|
8
8
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
9
|
icon?: string | Snippet | Component;
|
|
10
10
|
trailingicon?: boolean;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
isSnippet,
|
|
4
|
+
type PropColor,
|
|
5
|
+
type ButtonProps,
|
|
6
|
+
Button,
|
|
7
|
+
type PropVariant,
|
|
8
|
+
} from '../index.js';
|
|
3
9
|
import type { Component, Snippet } from 'svelte';
|
|
4
10
|
import type { ClassNameValue } from 'tailwind-merge';
|
|
5
11
|
import { tv } from 'tailwind-variants';
|
|
@@ -10,7 +16,7 @@
|
|
|
10
16
|
title: string | Snippet;
|
|
11
17
|
icon?: string | Snippet | Component;
|
|
12
18
|
color?: PropColor;
|
|
13
|
-
variant?:
|
|
19
|
+
variant?: Exclude<PropVariant, 'none' | 'ghost'>;
|
|
14
20
|
actions?: ButtonProps[];
|
|
15
21
|
close?: boolean | ButtonProps;
|
|
16
22
|
href?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type PropColor, type ButtonProps } from '../index.js';
|
|
1
|
+
import { type PropColor, type ButtonProps, type PropVariant } from '../index.js';
|
|
2
2
|
import type { Component, Snippet } from 'svelte';
|
|
3
3
|
import type { ClassNameValue } from 'tailwind-merge';
|
|
4
4
|
export type BannerProps = {
|
|
5
5
|
title: string | Snippet;
|
|
6
6
|
icon?: string | Snippet | Component;
|
|
7
7
|
color?: PropColor;
|
|
8
|
-
variant?:
|
|
8
|
+
variant?: Exclude<PropVariant, 'none' | 'ghost'>;
|
|
9
9
|
actions?: ButtonProps[];
|
|
10
10
|
close?: boolean | ButtonProps;
|
|
11
11
|
href?: string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { Component, Snippet } from 'svelte';
|
|
3
|
+
import type { ClassNameValue } from 'tailwind-merge';
|
|
4
|
+
import { Button, Icon, type ButtonProps } from './index.js';
|
|
5
|
+
import { tv } from 'tailwind-variants';
|
|
6
|
+
import { isSnippet } from '../utilities.svelte.js';
|
|
7
|
+
|
|
8
|
+
export type BreadcrumbItem = Omit<ButtonProps, 'label'> & {
|
|
9
|
+
label?: string;
|
|
10
|
+
icon?: string | Component;
|
|
11
|
+
snippet?: string;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type BreadcrumbProps = {
|
|
16
|
+
items: BreadcrumbItem[];
|
|
17
|
+
seperator?: string | Component | Snippet;
|
|
18
|
+
labelkey?: string;
|
|
19
|
+
[key: string]: any | Snippet<[BreadcrumbItem]>;
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<script lang="ts" generics="T extends BreadcrumbItem">
|
|
24
|
+
let {
|
|
25
|
+
items,
|
|
26
|
+
labelkey = 'label',
|
|
27
|
+
seperator = 'i-lucide:chevron-right',
|
|
28
|
+
...rest
|
|
29
|
+
}: BreadcrumbProps = $props();
|
|
30
|
+
|
|
31
|
+
const variants = $derived(
|
|
32
|
+
tv({
|
|
33
|
+
slots: {
|
|
34
|
+
root: '',
|
|
35
|
+
list: 'flex items-center',
|
|
36
|
+
item: '',
|
|
37
|
+
seperator: '',
|
|
38
|
+
},
|
|
39
|
+
variants: {},
|
|
40
|
+
})(),
|
|
41
|
+
);
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<nav class={variants.root({})}>
|
|
45
|
+
<ol class={variants.list({})}>
|
|
46
|
+
{#each items as item, idx (idx)}
|
|
47
|
+
<li class={variants.item({})}>
|
|
48
|
+
{#if item.snippet}
|
|
49
|
+
{@const render = rest[item.snippet]}
|
|
50
|
+
|
|
51
|
+
{#if isSnippet(render)}
|
|
52
|
+
{@render (render as Snippet<[BreadcrumbItem]>)(item)}
|
|
53
|
+
{/if}
|
|
54
|
+
{:else}
|
|
55
|
+
<Button
|
|
56
|
+
label={item[labelkey]}
|
|
57
|
+
icon={item.icon}
|
|
58
|
+
href={item.href}
|
|
59
|
+
variant="link"
|
|
60
|
+
color="surface"
|
|
61
|
+
{...item}
|
|
62
|
+
/>
|
|
63
|
+
{/if}
|
|
64
|
+
</li>
|
|
65
|
+
|
|
66
|
+
{#if idx < items.length - 1}
|
|
67
|
+
{#if isSnippet(seperator)}
|
|
68
|
+
{@render seperator()}
|
|
69
|
+
{:else}
|
|
70
|
+
<Icon name={seperator} class={variants.seperator({})} />
|
|
71
|
+
{/if}
|
|
72
|
+
{/if}
|
|
73
|
+
{/each}
|
|
74
|
+
</ol>
|
|
75
|
+
</nav>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Component, Snippet } from 'svelte';
|
|
2
|
+
import { type ButtonProps } from './index.js';
|
|
3
|
+
export type BreadcrumbItem = Omit<ButtonProps, 'label'> & {
|
|
4
|
+
label?: string;
|
|
5
|
+
icon?: string | Component;
|
|
6
|
+
snippet?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
export type BreadcrumbProps = {
|
|
10
|
+
items: BreadcrumbItem[];
|
|
11
|
+
seperator?: string | Component | Snippet;
|
|
12
|
+
labelkey?: string;
|
|
13
|
+
[key: string]: any | Snippet<[BreadcrumbItem]>;
|
|
14
|
+
};
|
|
15
|
+
declare function $$render<T extends BreadcrumbItem>(): {
|
|
16
|
+
props: BreadcrumbProps;
|
|
17
|
+
exports: {};
|
|
18
|
+
bindings: "";
|
|
19
|
+
slots: {};
|
|
20
|
+
events: {};
|
|
21
|
+
};
|
|
22
|
+
declare class __sveltets_Render<T extends BreadcrumbItem> {
|
|
23
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
24
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
25
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
26
|
+
bindings(): "";
|
|
27
|
+
exports(): {};
|
|
28
|
+
}
|
|
29
|
+
interface $$IsomorphicComponent {
|
|
30
|
+
new <T extends BreadcrumbItem>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
|
|
31
|
+
$$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
|
|
32
|
+
} & ReturnType<__sveltets_Render<T>['exports']>;
|
|
33
|
+
<T extends BreadcrumbItem>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
34
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
35
|
+
}
|
|
36
|
+
declare const Breadcrumb: $$IsomorphicComponent;
|
|
37
|
+
type Breadcrumb<T extends BreadcrumbItem> = InstanceType<typeof Breadcrumb<T>>;
|
|
38
|
+
export default Breadcrumb;
|