@noahbaumgartner/svelte-ui 0.0.4 → 0.0.5
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/README.md +8 -8
- package/dist/components/accordion/Accordion.svelte +34 -0
- package/dist/components/accordion/Accordion.svelte.d.ts +11 -0
- package/dist/components/accordion/AccordionItem.svelte +106 -0
- package/dist/components/accordion/AccordionItem.svelte.d.ts +13 -0
- package/dist/components/accordion/context.d.ts +5 -0
- package/dist/components/accordion/context.js +2 -0
- package/dist/components/avatar-group/AvatarGroup.svelte +76 -0
- package/dist/components/avatar-group/AvatarGroup.svelte.d.ts +15 -0
- package/dist/components/drawer/Drawer.svelte +368 -0
- package/dist/components/drawer/Drawer.svelte.d.ts +23 -0
- package/dist/components/empty-state/EmptyState.svelte +86 -0
- package/dist/components/empty-state/EmptyState.svelte.d.ts +16 -0
- package/dist/components/entry/Entry.svelte +83 -0
- package/dist/components/entry/Entry.svelte.d.ts +15 -0
- package/dist/components/footer/Footer.svelte +89 -0
- package/dist/components/footer/Footer.svelte.d.ts +13 -0
- package/dist/components/footer/FooterColumn.svelte +34 -0
- package/dist/components/footer/FooterColumn.svelte.d.ts +10 -0
- package/dist/components/mesh-gradient/MeshGradient.svelte +86 -0
- package/dist/components/mesh-gradient/MeshGradient.svelte.d.ts +12 -0
- package/dist/components/number-stepper/NumberStepper.svelte +82 -0
- package/dist/components/number-stepper/NumberStepper.svelte.d.ts +16 -0
- package/dist/components/preview-card/PreviewCard.svelte +166 -0
- package/dist/components/preview-card/PreviewCard.svelte.d.ts +20 -0
- package/dist/components/progress/Progress.svelte +88 -0
- package/dist/components/progress/Progress.svelte.d.ts +12 -0
- package/dist/components/select/Select.svelte +391 -0
- package/dist/components/select/Select.svelte.d.ts +39 -0
- package/dist/components/sidebar/Sidebar.svelte +37 -0
- package/dist/components/sidebar/SidebarHeader.svelte +26 -2
- package/dist/components/tabs/Tabs.svelte +280 -0
- package/dist/components/tabs/Tabs.svelte.d.ts +48 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +14 -0
- package/package.json +1 -1
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
4
|
import { fade } from 'svelte/transition';
|
|
5
|
+
import X from '@lucide/svelte/icons/x';
|
|
6
|
+
import Button from '../button/Button.svelte';
|
|
5
7
|
import { getSidebarContext } from './context.js';
|
|
6
8
|
|
|
7
9
|
type Props = Omit<HTMLAttributes<HTMLElement>, 'children'> & {
|
|
@@ -70,6 +72,17 @@
|
|
|
70
72
|
]}
|
|
71
73
|
>
|
|
72
74
|
<div class="sidebar-inner">
|
|
75
|
+
{#if sidebar.mobile}
|
|
76
|
+
<div class="sidebar-close">
|
|
77
|
+
<Button
|
|
78
|
+
variant="ghost"
|
|
79
|
+
size="sm"
|
|
80
|
+
icon={X}
|
|
81
|
+
label="Close sidebar"
|
|
82
|
+
onclick={sidebar.closeMobile}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
{/if}
|
|
73
86
|
{@render children()}
|
|
74
87
|
</div>
|
|
75
88
|
</aside>
|
|
@@ -154,11 +167,24 @@
|
|
|
154
167
|
bottom: 0;
|
|
155
168
|
left: 0;
|
|
156
169
|
z-index: 50;
|
|
170
|
+
width: 100%;
|
|
157
171
|
height: auto;
|
|
158
172
|
transform: translateX(-100%);
|
|
159
173
|
transition: transform 200ms ease;
|
|
160
174
|
}
|
|
161
175
|
|
|
176
|
+
.sidebar--mobile .sidebar-inner {
|
|
177
|
+
width: 100%;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.sidebar--mobile.sidebar--sidebar .sidebar-inner {
|
|
181
|
+
border-inline: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.sidebar--mobile.sidebar--floating .sidebar-inner {
|
|
185
|
+
width: calc(100% - 16px);
|
|
186
|
+
}
|
|
187
|
+
|
|
162
188
|
.sidebar--mobile.sidebar--right {
|
|
163
189
|
left: auto;
|
|
164
190
|
right: 0;
|
|
@@ -169,6 +195,17 @@
|
|
|
169
195
|
transform: none;
|
|
170
196
|
}
|
|
171
197
|
|
|
198
|
+
/* Fallback for sidebars without a `SidebarHeader`, which otherwise holds the close button */
|
|
199
|
+
.sidebar-close {
|
|
200
|
+
display: flex;
|
|
201
|
+
justify-content: flex-end;
|
|
202
|
+
padding: 8px 8px 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.sidebar-inner:has(:global(.sidebar-header)) .sidebar-close {
|
|
206
|
+
display: none;
|
|
207
|
+
}
|
|
208
|
+
|
|
172
209
|
.sidebar-backdrop {
|
|
173
210
|
position: fixed;
|
|
174
211
|
inset: 0;
|
|
@@ -1,23 +1,47 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
import X from '@lucide/svelte/icons/x';
|
|
5
|
+
import Button from '../button/Button.svelte';
|
|
6
|
+
import { getSidebarContext } from './context.js';
|
|
4
7
|
|
|
5
8
|
type Props = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
6
9
|
children: Snippet;
|
|
7
10
|
};
|
|
8
11
|
|
|
9
12
|
let { class: className, children, ...rest }: Props = $props();
|
|
13
|
+
|
|
14
|
+
const sidebar = getSidebarContext();
|
|
10
15
|
</script>
|
|
11
16
|
|
|
12
17
|
<div {...rest} class={['sidebar-header', className]}>
|
|
13
|
-
|
|
18
|
+
<div class="sidebar-header-content">
|
|
19
|
+
{@render children()}
|
|
20
|
+
</div>
|
|
21
|
+
{#if sidebar.mobile}
|
|
22
|
+
<Button
|
|
23
|
+
variant="ghost"
|
|
24
|
+
size="sm"
|
|
25
|
+
icon={X}
|
|
26
|
+
label="Close sidebar"
|
|
27
|
+
onclick={sidebar.closeMobile}
|
|
28
|
+
/>
|
|
29
|
+
{/if}
|
|
14
30
|
</div>
|
|
15
31
|
|
|
16
32
|
<style>
|
|
17
33
|
.sidebar-header {
|
|
18
34
|
display: flex;
|
|
19
|
-
|
|
35
|
+
align-items: center;
|
|
20
36
|
gap: 8px;
|
|
21
37
|
padding: 8px;
|
|
22
38
|
}
|
|
39
|
+
|
|
40
|
+
.sidebar-header-content {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex: 1;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: 8px;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
}
|
|
23
47
|
</style>
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { LucideIcon } from '@lucide/svelte';
|
|
3
|
+
|
|
4
|
+
export type TabsOption<T extends string = string> = {
|
|
5
|
+
value: T;
|
|
6
|
+
label: string;
|
|
7
|
+
/** Any Lucide icon (import from `svelte-ui/icons`). */
|
|
8
|
+
icon?: LucideIcon;
|
|
9
|
+
/** Turns the tabs into navigation links; give it to every option. */
|
|
10
|
+
href?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script lang="ts" generics="T extends string">
|
|
16
|
+
import type { Snippet } from 'svelte';
|
|
17
|
+
import type { ClassValue } from 'svelte/elements';
|
|
18
|
+
|
|
19
|
+
type Props = {
|
|
20
|
+
/** Value of the selected option. Bindable. */
|
|
21
|
+
value?: T;
|
|
22
|
+
/** The tabs. When every option has an `href` they render as links in a `<nav>` instead. */
|
|
23
|
+
options: TabsOption<T>[];
|
|
24
|
+
/** Accessible name for the tab list. */
|
|
25
|
+
label?: string;
|
|
26
|
+
size?: 'sm' | 'md';
|
|
27
|
+
class?: ClassValue;
|
|
28
|
+
/** Optional panel below the tabs; receives the selected value. Omit to render the content yourself. */
|
|
29
|
+
children?: Snippet<[value: T]>;
|
|
30
|
+
onchange?: (value: T) => void;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
value = $bindable(),
|
|
35
|
+
options,
|
|
36
|
+
label,
|
|
37
|
+
size = 'md',
|
|
38
|
+
class: className,
|
|
39
|
+
children,
|
|
40
|
+
onchange
|
|
41
|
+
}: Props = $props();
|
|
42
|
+
|
|
43
|
+
const id = $props.id();
|
|
44
|
+
|
|
45
|
+
let links = $derived(options.length > 0 && options.every((option) => option.href));
|
|
46
|
+
let selectedIndex = $derived(options.findIndex((option) => option.value === value));
|
|
47
|
+
/* The tab that Tab reaches: the selected one, or the first while nothing is selected */
|
|
48
|
+
let tabStop = $derived(
|
|
49
|
+
selectedIndex >= 0 ? selectedIndex : options.findIndex((option) => !option.disabled)
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
/* The tabs scroll sideways instead of wrapping; the edges fade out while there is more to scroll to */
|
|
53
|
+
let scroller: HTMLDivElement | undefined = $state();
|
|
54
|
+
let fade = $state({ start: false, end: false });
|
|
55
|
+
|
|
56
|
+
function updateFade() {
|
|
57
|
+
if (!scroller) return;
|
|
58
|
+
const { scrollLeft, scrollWidth, clientWidth } = scroller;
|
|
59
|
+
fade = { start: scrollLeft > 1, end: scrollLeft + clientWidth < scrollWidth - 1 };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
$effect(() => {
|
|
63
|
+
if (!scroller) return;
|
|
64
|
+
updateFade();
|
|
65
|
+
const observer = new ResizeObserver(updateFade);
|
|
66
|
+
observer.observe(scroller);
|
|
67
|
+
if (scroller.firstElementChild) observer.observe(scroller.firstElementChild);
|
|
68
|
+
return () => observer.disconnect();
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
function select(option: TabsOption<T>) {
|
|
72
|
+
if (option.value === value) return;
|
|
73
|
+
value = option.value;
|
|
74
|
+
onchange?.(option.value);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Arrow keys move the focus and the selection along */
|
|
78
|
+
function handleKeydown(event: KeyboardEvent) {
|
|
79
|
+
const tabs = Array.from(
|
|
80
|
+
scroller?.querySelectorAll<HTMLElement>('[role="tab"]:not(:disabled)') ?? []
|
|
81
|
+
);
|
|
82
|
+
const index = tabs.indexOf(document.activeElement as HTMLElement);
|
|
83
|
+
const last = tabs.length - 1;
|
|
84
|
+
const target = {
|
|
85
|
+
ArrowRight: index === last ? 0 : index + 1,
|
|
86
|
+
ArrowLeft: index <= 0 ? last : index - 1,
|
|
87
|
+
Home: 0,
|
|
88
|
+
End: last
|
|
89
|
+
}[event.key];
|
|
90
|
+
|
|
91
|
+
if (target === undefined) return;
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
tabs[target]?.focus();
|
|
94
|
+
tabs[target]?.click();
|
|
95
|
+
}
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<div class={['tabs', `tabs--${size}`, className]}>
|
|
99
|
+
<div
|
|
100
|
+
class={[
|
|
101
|
+
'tabs-scroller',
|
|
102
|
+
{ 'tabs-scroller--start': fade.start, 'tabs-scroller--end': fade.end }
|
|
103
|
+
]}
|
|
104
|
+
bind:this={scroller}
|
|
105
|
+
onscroll={updateFade}
|
|
106
|
+
>
|
|
107
|
+
{#if links}
|
|
108
|
+
<nav class="tabs-list" aria-label={label}>
|
|
109
|
+
{#each options as option (option.value)}
|
|
110
|
+
<!-- href comes from the consumer, who resolves it; this library has no routes -->
|
|
111
|
+
<!-- eslint-disable svelte/no-navigation-without-resolve -->
|
|
112
|
+
<a
|
|
113
|
+
href={option.href}
|
|
114
|
+
aria-current={option.value === value ? 'page' : undefined}
|
|
115
|
+
class={['tabs-tab', { 'tabs-tab--selected': option.value === value }]}
|
|
116
|
+
>
|
|
117
|
+
{#if option.icon}<option.icon class="tabs-icon" aria-hidden="true" />{/if}
|
|
118
|
+
{option.label}
|
|
119
|
+
</a>
|
|
120
|
+
<!-- eslint-enable svelte/no-navigation-without-resolve -->
|
|
121
|
+
{/each}
|
|
122
|
+
</nav>
|
|
123
|
+
{:else}
|
|
124
|
+
<!-- The tabs take the focus, not the list -->
|
|
125
|
+
<!-- svelte-ignore a11y_interactive_supports_focus -->
|
|
126
|
+
<div class="tabs-list" role="tablist" aria-label={label} onkeydown={handleKeydown}>
|
|
127
|
+
{#each options as option, i (option.value)}
|
|
128
|
+
<button
|
|
129
|
+
type="button"
|
|
130
|
+
role="tab"
|
|
131
|
+
id="{id}-tab-{i}"
|
|
132
|
+
aria-selected={i === selectedIndex}
|
|
133
|
+
aria-controls={children ? `${id}-panel` : undefined}
|
|
134
|
+
tabindex={i === tabStop ? 0 : -1}
|
|
135
|
+
disabled={option.disabled}
|
|
136
|
+
class={['tabs-tab', { 'tabs-tab--selected': i === selectedIndex }]}
|
|
137
|
+
onclick={() => select(option)}
|
|
138
|
+
>
|
|
139
|
+
{#if option.icon}<option.icon class="tabs-icon" aria-hidden="true" />{/if}
|
|
140
|
+
{option.label}
|
|
141
|
+
</button>
|
|
142
|
+
{/each}
|
|
143
|
+
</div>
|
|
144
|
+
{/if}
|
|
145
|
+
</div>
|
|
146
|
+
{#if children && !links && value !== undefined && selectedIndex >= 0}
|
|
147
|
+
<div
|
|
148
|
+
id="{id}-panel"
|
|
149
|
+
role="tabpanel"
|
|
150
|
+
aria-labelledby="{id}-tab-{selectedIndex}"
|
|
151
|
+
tabindex="0"
|
|
152
|
+
class="tabs-panel"
|
|
153
|
+
>
|
|
154
|
+
{@render children(value)}
|
|
155
|
+
</div>
|
|
156
|
+
{/if}
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<style>
|
|
160
|
+
.tabs {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
gap: 12px;
|
|
164
|
+
min-width: 0;
|
|
165
|
+
max-width: 100%;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.tabs-scroller {
|
|
169
|
+
--fade-start: 0px;
|
|
170
|
+
--fade-end: 0px;
|
|
171
|
+
display: flex;
|
|
172
|
+
max-width: 100%;
|
|
173
|
+
overflow-x: auto;
|
|
174
|
+
scrollbar-width: none;
|
|
175
|
+
mask-image: linear-gradient(
|
|
176
|
+
to right,
|
|
177
|
+
transparent,
|
|
178
|
+
#000 var(--fade-start),
|
|
179
|
+
#000 calc(100% - var(--fade-end)),
|
|
180
|
+
transparent
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.tabs-scroller::-webkit-scrollbar {
|
|
185
|
+
display: none;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.tabs-scroller--start {
|
|
189
|
+
--fade-start: 32px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.tabs-scroller--end {
|
|
193
|
+
--fade-end: 32px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.tabs-list {
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
flex-shrink: 0;
|
|
199
|
+
gap: 2px;
|
|
200
|
+
padding: 3px;
|
|
201
|
+
background-color: var(--color-surface);
|
|
202
|
+
border-radius: 10px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.tabs-tab {
|
|
206
|
+
display: inline-flex;
|
|
207
|
+
flex-shrink: 0;
|
|
208
|
+
align-items: center;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
gap: 6px;
|
|
211
|
+
box-sizing: border-box;
|
|
212
|
+
height: 26px;
|
|
213
|
+
padding: 0 12px;
|
|
214
|
+
font-family: inherit;
|
|
215
|
+
font-size: 13px;
|
|
216
|
+
font-weight: 500;
|
|
217
|
+
color: var(--color-text-muted);
|
|
218
|
+
text-decoration: none;
|
|
219
|
+
white-space: nowrap;
|
|
220
|
+
background-color: transparent;
|
|
221
|
+
border: none;
|
|
222
|
+
border-radius: 7px;
|
|
223
|
+
outline: none;
|
|
224
|
+
cursor: pointer;
|
|
225
|
+
user-select: none;
|
|
226
|
+
transition:
|
|
227
|
+
background-color 200ms ease,
|
|
228
|
+
color 200ms ease;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.tabs-tab:hover:not(:disabled) {
|
|
232
|
+
color: var(--color-text);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Inside the tab, so the scroller does not clip it */
|
|
236
|
+
.tabs-tab:focus-visible {
|
|
237
|
+
outline: 2px solid var(--color-accent);
|
|
238
|
+
outline-offset: -2px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.tabs-tab:disabled {
|
|
242
|
+
cursor: not-allowed;
|
|
243
|
+
opacity: 0.5;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.tabs-tab--selected {
|
|
247
|
+
color: var(--color-text);
|
|
248
|
+
background-color: var(--color-bg);
|
|
249
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.tabs-tab :global(.tabs-icon) {
|
|
253
|
+
width: 14px;
|
|
254
|
+
height: 14px;
|
|
255
|
+
flex-shrink: 0;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.tabs--sm .tabs-list {
|
|
259
|
+
border-radius: 8px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.tabs--sm .tabs-tab {
|
|
263
|
+
height: 22px;
|
|
264
|
+
padding: 0 10px;
|
|
265
|
+
font-size: 12px;
|
|
266
|
+
border-radius: 5px;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.tabs-panel {
|
|
270
|
+
font-size: 13px;
|
|
271
|
+
color: var(--color-text);
|
|
272
|
+
border-radius: 6px;
|
|
273
|
+
outline: none;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.tabs-panel:focus-visible {
|
|
277
|
+
outline: 2px solid var(--color-accent);
|
|
278
|
+
outline-offset: 2px;
|
|
279
|
+
}
|
|
280
|
+
</style>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { LucideIcon } from '@lucide/svelte';
|
|
2
|
+
export type TabsOption<T extends string = string> = {
|
|
3
|
+
value: T;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Any Lucide icon (import from `svelte-ui/icons`). */
|
|
6
|
+
icon?: LucideIcon;
|
|
7
|
+
/** Turns the tabs into navigation links; give it to every option. */
|
|
8
|
+
href?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
import type { Snippet } from 'svelte';
|
|
12
|
+
import type { ClassValue } from 'svelte/elements';
|
|
13
|
+
declare function $$render<T extends string>(): {
|
|
14
|
+
props: {
|
|
15
|
+
/** Value of the selected option. Bindable. */
|
|
16
|
+
value?: T;
|
|
17
|
+
/** The tabs. When every option has an `href` they render as links in a `<nav>` instead. */
|
|
18
|
+
options: TabsOption<T>[];
|
|
19
|
+
/** Accessible name for the tab list. */
|
|
20
|
+
label?: string;
|
|
21
|
+
size?: "sm" | "md";
|
|
22
|
+
class?: ClassValue;
|
|
23
|
+
/** Optional panel below the tabs; receives the selected value. Omit to render the content yourself. */
|
|
24
|
+
children?: Snippet<[value: T]>;
|
|
25
|
+
onchange?: (value: T) => void;
|
|
26
|
+
};
|
|
27
|
+
exports: {};
|
|
28
|
+
bindings: "value";
|
|
29
|
+
slots: {};
|
|
30
|
+
events: {};
|
|
31
|
+
};
|
|
32
|
+
declare class __sveltets_Render<T extends string> {
|
|
33
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
34
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
35
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
36
|
+
bindings(): "value";
|
|
37
|
+
exports(): {};
|
|
38
|
+
}
|
|
39
|
+
interface $$IsomorphicComponent {
|
|
40
|
+
new <T extends string>(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']>> & {
|
|
41
|
+
$$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
|
|
42
|
+
} & ReturnType<__sveltets_Render<T>['exports']>;
|
|
43
|
+
<T extends string>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
44
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
45
|
+
}
|
|
46
|
+
declare const Tabs: $$IsomorphicComponent;
|
|
47
|
+
type Tabs<T extends string> = InstanceType<typeof Tabs<T>>;
|
|
48
|
+
export default Tabs;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
export { default as Accordion } from './components/accordion/Accordion.svelte';
|
|
2
|
+
export { default as AccordionItem } from './components/accordion/AccordionItem.svelte';
|
|
1
3
|
export { default as AlertDialog } from './components/alert-dialog/AlertDialog.svelte';
|
|
2
4
|
export { default as Avatar } from './components/avatar/Avatar.svelte';
|
|
5
|
+
export { default as AvatarGroup } from './components/avatar-group/AvatarGroup.svelte';
|
|
3
6
|
export { default as Badge } from './components/badge/Badge.svelte';
|
|
4
7
|
export { default as Breadcrumb } from './components/breadcrumb/Breadcrumb.svelte';
|
|
5
8
|
export { default as BreadcrumbEllipsis } from './components/breadcrumb/BreadcrumbEllipsis.svelte';
|
|
@@ -19,6 +22,9 @@ export { default as ColorPicker } from './components/color-picker/ColorPicker.sv
|
|
|
19
22
|
export { default as ContextMenu } from './components/context-menu/ContextMenu.svelte';
|
|
20
23
|
export { default as ContextMenuItem } from './components/context-menu/ContextMenuItem.svelte';
|
|
21
24
|
export { default as Dialog } from './components/dialog/Dialog.svelte';
|
|
25
|
+
export { default as Drawer } from './components/drawer/Drawer.svelte';
|
|
26
|
+
export { default as EmptyState } from './components/empty-state/EmptyState.svelte';
|
|
27
|
+
export { default as Entry } from './components/entry/Entry.svelte';
|
|
22
28
|
export { default as Field } from './components/field/Field.svelte';
|
|
23
29
|
export { default as FieldContent } from './components/field/FieldContent.svelte';
|
|
24
30
|
export { default as FieldDescription } from './components/field/FieldDescription.svelte';
|
|
@@ -27,6 +33,8 @@ export { default as FieldGroup } from './components/field/FieldGroup.svelte';
|
|
|
27
33
|
export { default as FieldLegend } from './components/field/FieldLegend.svelte';
|
|
28
34
|
export { default as FieldSeparator } from './components/field/FieldSeparator.svelte';
|
|
29
35
|
export { default as FieldSet } from './components/field/FieldSet.svelte';
|
|
36
|
+
export { default as Footer } from './components/footer/Footer.svelte';
|
|
37
|
+
export { default as FooterColumn } from './components/footer/FooterColumn.svelte';
|
|
30
38
|
export { default as Input } from './components/input/Input.svelte';
|
|
31
39
|
export { default as Kbd } from './components/kbd/Kbd.svelte';
|
|
32
40
|
export { default as KbdGroup } from './components/kbd/KbdGroup.svelte';
|
|
@@ -34,13 +42,18 @@ export { default as InputGroup } from './components/input-group/InputGroup.svelt
|
|
|
34
42
|
export { default as InputGroupAddon } from './components/input-group/InputGroupAddon.svelte';
|
|
35
43
|
export { default as Label } from './components/label/Label.svelte';
|
|
36
44
|
export { default as Link } from './components/link/Link.svelte';
|
|
45
|
+
export { default as MeshGradient } from './components/mesh-gradient/MeshGradient.svelte';
|
|
37
46
|
export { default as Navbar } from './components/navbar/Navbar.svelte';
|
|
38
47
|
export { default as NavigationMenu } from './components/navigation-menu/NavigationMenu.svelte';
|
|
39
48
|
export { default as NavigationMenuItem } from './components/navigation-menu/NavigationMenuItem.svelte';
|
|
40
49
|
export { default as NavigationMenuLink } from './components/navigation-menu/NavigationMenuLink.svelte';
|
|
50
|
+
export { default as NumberStepper } from './components/number-stepper/NumberStepper.svelte';
|
|
41
51
|
export { default as Popover } from './components/popover/Popover.svelte';
|
|
52
|
+
export { default as PreviewCard } from './components/preview-card/PreviewCard.svelte';
|
|
53
|
+
export { default as Progress } from './components/progress/Progress.svelte';
|
|
42
54
|
export { default as RadioGroup } from './components/radio-group/RadioGroup.svelte';
|
|
43
55
|
export { default as RadioGroupItem } from './components/radio-group/RadioGroupItem.svelte';
|
|
56
|
+
export { default as Select, type SelectOption } from './components/select/Select.svelte';
|
|
44
57
|
export { default as Separator } from './components/separator/Separator.svelte';
|
|
45
58
|
export { default as Sidebar } from './components/sidebar/Sidebar.svelte';
|
|
46
59
|
export { default as SidebarContent } from './components/sidebar/SidebarContent.svelte';
|
|
@@ -58,6 +71,7 @@ export { default as Skeleton } from './components/skeleton/Skeleton.svelte';
|
|
|
58
71
|
export { default as Spinner } from './components/spinner/Spinner.svelte';
|
|
59
72
|
export { default as Switch } from './components/switch/Switch.svelte';
|
|
60
73
|
export { default as Table, type TableColumn, type TableSort, type TableSortValue } from './components/table/Table.svelte';
|
|
74
|
+
export { default as Tabs, type TabsOption } from './components/tabs/Tabs.svelte';
|
|
61
75
|
export { default as Textarea } from './components/textarea/Textarea.svelte';
|
|
62
76
|
export { default as Toaster } from './components/toaster/Toaster.svelte';
|
|
63
77
|
export { toast, type ToastOptions, type ToastAction } from './components/toaster/toast.svelte.js';
|
|
@@ -69,5 +83,6 @@ export type { PopoverTriggerProps } from './components/popover/Popover.svelte';
|
|
|
69
83
|
export type { TooltipTriggerProps } from './components/tooltip/Tooltip.svelte';
|
|
70
84
|
export type { InputType } from './components/input/Input.svelte';
|
|
71
85
|
export type { DialogTriggerProps } from './components/dialog/Dialog.svelte';
|
|
86
|
+
export type { DrawerTriggerProps } from './components/drawer/Drawer.svelte';
|
|
72
87
|
export type { ContextMenuTriggerProps } from './components/context-menu/context.js';
|
|
73
88
|
export { getSidebarContext, type SidebarContext } from './components/sidebar/context.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
export { default as Accordion } from './components/accordion/Accordion.svelte';
|
|
2
|
+
export { default as AccordionItem } from './components/accordion/AccordionItem.svelte';
|
|
1
3
|
export { default as AlertDialog } from './components/alert-dialog/AlertDialog.svelte';
|
|
2
4
|
export { default as Avatar } from './components/avatar/Avatar.svelte';
|
|
5
|
+
export { default as AvatarGroup } from './components/avatar-group/AvatarGroup.svelte';
|
|
3
6
|
export { default as Badge } from './components/badge/Badge.svelte';
|
|
4
7
|
export { default as Breadcrumb } from './components/breadcrumb/Breadcrumb.svelte';
|
|
5
8
|
export { default as BreadcrumbEllipsis } from './components/breadcrumb/BreadcrumbEllipsis.svelte';
|
|
@@ -19,6 +22,9 @@ export { default as ColorPicker } from './components/color-picker/ColorPicker.sv
|
|
|
19
22
|
export { default as ContextMenu } from './components/context-menu/ContextMenu.svelte';
|
|
20
23
|
export { default as ContextMenuItem } from './components/context-menu/ContextMenuItem.svelte';
|
|
21
24
|
export { default as Dialog } from './components/dialog/Dialog.svelte';
|
|
25
|
+
export { default as Drawer } from './components/drawer/Drawer.svelte';
|
|
26
|
+
export { default as EmptyState } from './components/empty-state/EmptyState.svelte';
|
|
27
|
+
export { default as Entry } from './components/entry/Entry.svelte';
|
|
22
28
|
export { default as Field } from './components/field/Field.svelte';
|
|
23
29
|
export { default as FieldContent } from './components/field/FieldContent.svelte';
|
|
24
30
|
export { default as FieldDescription } from './components/field/FieldDescription.svelte';
|
|
@@ -27,6 +33,8 @@ export { default as FieldGroup } from './components/field/FieldGroup.svelte';
|
|
|
27
33
|
export { default as FieldLegend } from './components/field/FieldLegend.svelte';
|
|
28
34
|
export { default as FieldSeparator } from './components/field/FieldSeparator.svelte';
|
|
29
35
|
export { default as FieldSet } from './components/field/FieldSet.svelte';
|
|
36
|
+
export { default as Footer } from './components/footer/Footer.svelte';
|
|
37
|
+
export { default as FooterColumn } from './components/footer/FooterColumn.svelte';
|
|
30
38
|
export { default as Input } from './components/input/Input.svelte';
|
|
31
39
|
export { default as Kbd } from './components/kbd/Kbd.svelte';
|
|
32
40
|
export { default as KbdGroup } from './components/kbd/KbdGroup.svelte';
|
|
@@ -34,13 +42,18 @@ export { default as InputGroup } from './components/input-group/InputGroup.svelt
|
|
|
34
42
|
export { default as InputGroupAddon } from './components/input-group/InputGroupAddon.svelte';
|
|
35
43
|
export { default as Label } from './components/label/Label.svelte';
|
|
36
44
|
export { default as Link } from './components/link/Link.svelte';
|
|
45
|
+
export { default as MeshGradient } from './components/mesh-gradient/MeshGradient.svelte';
|
|
37
46
|
export { default as Navbar } from './components/navbar/Navbar.svelte';
|
|
38
47
|
export { default as NavigationMenu } from './components/navigation-menu/NavigationMenu.svelte';
|
|
39
48
|
export { default as NavigationMenuItem } from './components/navigation-menu/NavigationMenuItem.svelte';
|
|
40
49
|
export { default as NavigationMenuLink } from './components/navigation-menu/NavigationMenuLink.svelte';
|
|
50
|
+
export { default as NumberStepper } from './components/number-stepper/NumberStepper.svelte';
|
|
41
51
|
export { default as Popover } from './components/popover/Popover.svelte';
|
|
52
|
+
export { default as PreviewCard } from './components/preview-card/PreviewCard.svelte';
|
|
53
|
+
export { default as Progress } from './components/progress/Progress.svelte';
|
|
42
54
|
export { default as RadioGroup } from './components/radio-group/RadioGroup.svelte';
|
|
43
55
|
export { default as RadioGroupItem } from './components/radio-group/RadioGroupItem.svelte';
|
|
56
|
+
export { default as Select } from './components/select/Select.svelte';
|
|
44
57
|
export { default as Separator } from './components/separator/Separator.svelte';
|
|
45
58
|
export { default as Sidebar } from './components/sidebar/Sidebar.svelte';
|
|
46
59
|
export { default as SidebarContent } from './components/sidebar/SidebarContent.svelte';
|
|
@@ -57,6 +70,7 @@ export { default as Skeleton } from './components/skeleton/Skeleton.svelte';
|
|
|
57
70
|
export { default as Spinner } from './components/spinner/Spinner.svelte';
|
|
58
71
|
export { default as Switch } from './components/switch/Switch.svelte';
|
|
59
72
|
export { default as Table } from './components/table/Table.svelte';
|
|
73
|
+
export { default as Tabs } from './components/tabs/Tabs.svelte';
|
|
60
74
|
export { default as Textarea } from './components/textarea/Textarea.svelte';
|
|
61
75
|
export { default as Toaster } from './components/toaster/Toaster.svelte';
|
|
62
76
|
export { toast } from './components/toaster/toast.svelte.js';
|