@tabelhadev/tabelhawebui 0.28.4
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/LICENSE +661 -0
- package/README.md +222 -0
- package/README.pt-BR.md +217 -0
- package/dist/actions/click-outside.d.ts +3 -0
- package/dist/actions/click-outside.js +12 -0
- package/dist/actions/combobox-keyboard-nav.d.ts +9 -0
- package/dist/actions/combobox-keyboard-nav.js +28 -0
- package/dist/actions/focus-trap.d.ts +1 -0
- package/dist/actions/focus-trap.js +34 -0
- package/dist/actions/scroll-lock.d.ts +1 -0
- package/dist/actions/scroll-lock.js +17 -0
- package/dist/components/actions/Button.svelte +169 -0
- package/dist/components/actions/Button.svelte.d.ts +19 -0
- package/dist/components/appshell/AppShell.svelte +50 -0
- package/dist/components/appshell/AppShell.svelte.d.ts +19 -0
- package/dist/components/appshell/AppShellBottomNav.svelte +67 -0
- package/dist/components/appshell/AppShellBottomNav.svelte.d.ts +9 -0
- package/dist/components/appshell/AppShellContent.svelte +38 -0
- package/dist/components/appshell/AppShellContent.svelte.d.ts +10 -0
- package/dist/components/appshell/AppShellSidebar.svelte +196 -0
- package/dist/components/appshell/AppShellSidebar.svelte.d.ts +15 -0
- package/dist/components/appshell/types.d.ts +6 -0
- package/dist/components/appshell/types.js +1 -0
- package/dist/components/appshell/utils.d.ts +1 -0
- package/dist/components/appshell/utils.js +3 -0
- package/dist/components/card/Card.svelte +31 -0
- package/dist/components/card/Card.svelte.d.ts +9 -0
- package/dist/components/card/CardAction.svelte +57 -0
- package/dist/components/card/CardAction.svelte.d.ts +10 -0
- package/dist/components/card/CardContent.svelte +25 -0
- package/dist/components/card/CardContent.svelte.d.ts +8 -0
- package/dist/components/card/CardDescription.svelte +24 -0
- package/dist/components/card/CardDescription.svelte.d.ts +8 -0
- package/dist/components/card/CardFooter.svelte +25 -0
- package/dist/components/card/CardFooter.svelte.d.ts +8 -0
- package/dist/components/card/CardHeader.svelte +54 -0
- package/dist/components/card/CardHeader.svelte.d.ts +10 -0
- package/dist/components/card/CardTitle.svelte +25 -0
- package/dist/components/card/CardTitle.svelte.d.ts +8 -0
- package/dist/components/chat/ChatMessage.svelte +104 -0
- package/dist/components/chat/ChatMessage.svelte.d.ts +10 -0
- package/dist/components/choice/Listbox.svelte +183 -0
- package/dist/components/choice/Listbox.svelte.d.ts +15 -0
- package/dist/components/choice/MultiSelect.svelte +278 -0
- package/dist/components/choice/MultiSelect.svelte.d.ts +18 -0
- package/dist/components/choice/Rating.svelte +91 -0
- package/dist/components/choice/Rating.svelte.d.ts +12 -0
- package/dist/components/choice/Toggle.svelte +112 -0
- package/dist/components/choice/Toggle.svelte.d.ts +12 -0
- package/dist/components/feedback/Badge.svelte +66 -0
- package/dist/components/feedback/Badge.svelte.d.ts +9 -0
- package/dist/components/feedback/ErrorPage.svelte +99 -0
- package/dist/components/feedback/ErrorPage.svelte.d.ts +13 -0
- package/dist/components/feedback/Message.svelte +130 -0
- package/dist/components/feedback/Message.svelte.d.ts +14 -0
- package/dist/components/feedback/ProgressBar.svelte +69 -0
- package/dist/components/feedback/ProgressBar.svelte.d.ts +8 -0
- package/dist/components/feedback/Skeleton.svelte +47 -0
- package/dist/components/feedback/Skeleton.svelte.d.ts +9 -0
- package/dist/components/feedback/Status.svelte +75 -0
- package/dist/components/feedback/Status.svelte.d.ts +10 -0
- package/dist/components/feedback/StatusPill.svelte +94 -0
- package/dist/components/feedback/StatusPill.svelte.d.ts +13 -0
- package/dist/components/feedback/Toaster.svelte +122 -0
- package/dist/components/feedback/Toaster.svelte.d.ts +7 -0
- package/dist/components/feedback/Tooltip.svelte +126 -0
- package/dist/components/feedback/Tooltip.svelte.d.ts +10 -0
- package/dist/components/feedback/toast.svelte.d.ts +27 -0
- package/dist/components/feedback/toast.svelte.js +23 -0
- package/dist/components/forms/Checkbox.svelte +96 -0
- package/dist/components/forms/Checkbox.svelte.d.ts +11 -0
- package/dist/components/forms/DatePicker.svelte +372 -0
- package/dist/components/forms/DatePicker.svelte.d.ts +21 -0
- package/dist/components/forms/Field.svelte +47 -0
- package/dist/components/forms/Field.svelte.d.ts +11 -0
- package/dist/components/forms/FileUpload.svelte +504 -0
- package/dist/components/forms/FileUpload.svelte.d.ts +43 -0
- package/dist/components/forms/Input.svelte +93 -0
- package/dist/components/forms/Input.svelte.d.ts +9 -0
- package/dist/components/forms/Label.svelte +30 -0
- package/dist/components/forms/Label.svelte.d.ts +10 -0
- package/dist/components/forms/Radio.svelte +80 -0
- package/dist/components/forms/Radio.svelte.d.ts +11 -0
- package/dist/components/forms/Select.svelte +322 -0
- package/dist/components/forms/Select.svelte.d.ts +22 -0
- package/dist/components/forms/TagInput.svelte +336 -0
- package/dist/components/forms/TagInput.svelte.d.ts +16 -0
- package/dist/components/forms/Textarea.svelte +64 -0
- package/dist/components/forms/Textarea.svelte.d.ts +9 -0
- package/dist/components/landing/Landing.svelte +47 -0
- package/dist/components/landing/Landing.svelte.d.ts +8 -0
- package/dist/components/landing/LandingFeatures.svelte +92 -0
- package/dist/components/landing/LandingFeatures.svelte.d.ts +15 -0
- package/dist/components/landing/LandingHero.svelte +92 -0
- package/dist/components/landing/LandingHero.svelte.d.ts +13 -0
- package/dist/components/landing/LandingRoadmap.svelte +42 -0
- package/dist/components/landing/LandingRoadmap.svelte.d.ts +11 -0
- package/dist/components/landing/LandingSection.svelte +25 -0
- package/dist/components/landing/LandingSection.svelte.d.ts +9 -0
- package/dist/components/landing/LandingSectionHeading.svelte +19 -0
- package/dist/components/landing/LandingSectionHeading.svelte.d.ts +10 -0
- package/dist/components/landing/LandingSteps.svelte +100 -0
- package/dist/components/landing/LandingSteps.svelte.d.ts +13 -0
- package/dist/components/layout/BracketLink.svelte +41 -0
- package/dist/components/layout/BracketLink.svelte.d.ts +9 -0
- package/dist/components/layout/Divider.svelte +70 -0
- package/dist/components/layout/Divider.svelte.d.ts +9 -0
- package/dist/components/layout/Eyebrow.svelte +24 -0
- package/dist/components/layout/Eyebrow.svelte.d.ts +8 -0
- package/dist/components/layout/PageHeader.svelte +106 -0
- package/dist/components/layout/PageHeader.svelte.d.ts +15 -0
- package/dist/components/layout/PageSeo.svelte +34 -0
- package/dist/components/layout/PageSeo.svelte.d.ts +10 -0
- package/dist/components/layout/PageShell.svelte +25 -0
- package/dist/components/layout/PageShell.svelte.d.ts +8 -0
- package/dist/components/layout/Panel.svelte +105 -0
- package/dist/components/layout/Panel.svelte.d.ts +12 -0
- package/dist/components/layout/Prose.svelte +101 -0
- package/dist/components/layout/Prose.svelte.d.ts +7 -0
- package/dist/components/layout/RuleCard.svelte +63 -0
- package/dist/components/layout/RuleCard.svelte.d.ts +13 -0
- package/dist/components/layout/SectionHeading.svelte +57 -0
- package/dist/components/layout/SectionHeading.svelte.d.ts +10 -0
- package/dist/components/layout/StatTile.svelte +76 -0
- package/dist/components/layout/StatTile.svelte.d.ts +12 -0
- package/dist/components/layout/TerminalWindow.svelte +81 -0
- package/dist/components/layout/TerminalWindow.svelte.d.ts +9 -0
- package/dist/components/layout/Wordmark.svelte +26 -0
- package/dist/components/layout/Wordmark.svelte.d.ts +8 -0
- package/dist/components/list/List.svelte +40 -0
- package/dist/components/list/List.svelte.d.ts +13 -0
- package/dist/components/list/ListItem.svelte +81 -0
- package/dist/components/list/ListItem.svelte.d.ts +13 -0
- package/dist/components/marketing/MarketingShell.svelte +170 -0
- package/dist/components/marketing/MarketingShell.svelte.d.ts +23 -0
- package/dist/components/marketing/MarketingShellFooter.svelte +92 -0
- package/dist/components/marketing/MarketingShellFooter.svelte.d.ts +14 -0
- package/dist/components/navigation/Accordion.svelte +110 -0
- package/dist/components/navigation/Accordion.svelte.d.ts +15 -0
- package/dist/components/navigation/Carousel.svelte +115 -0
- package/dist/components/navigation/Carousel.svelte.d.ts +12 -0
- package/dist/components/navigation/InstructionStep.svelte +115 -0
- package/dist/components/navigation/InstructionStep.svelte.d.ts +10 -0
- package/dist/components/navigation/InstructionSteps.svelte +39 -0
- package/dist/components/navigation/InstructionSteps.svelte.d.ts +8 -0
- package/dist/components/navigation/Nav.svelte +102 -0
- package/dist/components/navigation/Nav.svelte.d.ts +14 -0
- package/dist/components/navigation/Stepper.svelte +112 -0
- package/dist/components/navigation/Stepper.svelte.d.ts +12 -0
- package/dist/components/navigation/TabCard.svelte +62 -0
- package/dist/components/navigation/TabCard.svelte.d.ts +10 -0
- package/dist/components/navigation/Tabs.svelte +83 -0
- package/dist/components/navigation/Tabs.svelte.d.ts +12 -0
- package/dist/components/navigation/ThemeToggle.svelte +118 -0
- package/dist/components/navigation/ThemeToggle.svelte.d.ts +20 -0
- package/dist/components/overlay/Dialog.svelte +200 -0
- package/dist/components/overlay/Dialog.svelte.d.ts +19 -0
- package/dist/components/overlay/DialogActions.svelte +50 -0
- package/dist/components/overlay/DialogActions.svelte.d.ts +9 -0
- package/dist/components/overlay/Dropdown.svelte +110 -0
- package/dist/components/overlay/Dropdown.svelte.d.ts +10 -0
- package/dist/components/overlay/FloatingActionPill.svelte +96 -0
- package/dist/components/overlay/FloatingActionPill.svelte.d.ts +14 -0
- package/dist/components/overlay/Sidebar.svelte +258 -0
- package/dist/components/overlay/Sidebar.svelte.d.ts +18 -0
- package/dist/components/table/Table.svelte +550 -0
- package/dist/components/table/Table.svelte.d.ts +42 -0
- package/dist/components/timeline/Timeline.svelte +25 -0
- package/dist/components/timeline/Timeline.svelte.d.ts +8 -0
- package/dist/components/timeline/TimelineItem.svelte +220 -0
- package/dist/components/timeline/TimelineItem.svelte.d.ts +18 -0
- package/dist/index.d.ts +156 -0
- package/dist/index.js +149 -0
- package/dist/theme/theme.css +348 -0
- package/package.json +52 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import Checkbox from '../forms/Checkbox.svelte';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
selectable = false,
|
|
7
|
+
checked = $bindable(false),
|
|
8
|
+
href,
|
|
9
|
+
start,
|
|
10
|
+
content,
|
|
11
|
+
end,
|
|
12
|
+
class: className = ''
|
|
13
|
+
}: {
|
|
14
|
+
selectable?: boolean;
|
|
15
|
+
checked?: boolean;
|
|
16
|
+
href?: string;
|
|
17
|
+
start?: Snippet;
|
|
18
|
+
content?: Snippet;
|
|
19
|
+
end?: Snippet;
|
|
20
|
+
class?: string;
|
|
21
|
+
} = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
{#if href}
|
|
25
|
+
<a href={href} class="twui-list-item twui-list-item-link {className}">
|
|
26
|
+
{#if selectable}
|
|
27
|
+
<span class="twui-list-item-select" onclick={(e) => e.stopPropagation()} role="presentation">
|
|
28
|
+
<Checkbox bind:checked />
|
|
29
|
+
</span>
|
|
30
|
+
{/if}
|
|
31
|
+
{#if start}{@render start()}{/if}
|
|
32
|
+
<span class="twui-list-item-content">{#if content}{@render content()}{/if}</span>
|
|
33
|
+
{#if end}<span class="twui-list-item-end">{@render end()}</span>{/if}
|
|
34
|
+
</a>
|
|
35
|
+
{:else}
|
|
36
|
+
<div class="twui-list-item {className}">
|
|
37
|
+
{#if selectable}
|
|
38
|
+
<span class="twui-list-item-select"><Checkbox bind:checked /></span>
|
|
39
|
+
{/if}
|
|
40
|
+
{#if start}{@render start()}{/if}
|
|
41
|
+
<span class="twui-list-item-content">{#if content}{@render content()}{/if}</span>
|
|
42
|
+
{#if end}<span class="twui-list-item-end">{@render end()}</span>{/if}
|
|
43
|
+
</div>
|
|
44
|
+
{/if}
|
|
45
|
+
|
|
46
|
+
<style>
|
|
47
|
+
.twui-list-item {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 12px;
|
|
51
|
+
padding: 8px 12px;
|
|
52
|
+
border-radius: 6px;
|
|
53
|
+
font-family: var(--twui-font-mono);
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
line-height: 1.4;
|
|
56
|
+
color: var(--twui-ink);
|
|
57
|
+
text-decoration: none;
|
|
58
|
+
transition: background 0.15s ease;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.twui-list-item-link:hover {
|
|
62
|
+
background: var(--twui-paper-raised);
|
|
63
|
+
color: var(--twui-ink);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.twui-list-item-select {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.twui-list-item-content {
|
|
72
|
+
flex: 1;
|
|
73
|
+
min-width: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.twui-list-item-end {
|
|
77
|
+
flex-shrink: 0;
|
|
78
|
+
color: var(--twui-ink-faint);
|
|
79
|
+
font-size: 12px;
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
selectable?: boolean;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
href?: string;
|
|
6
|
+
start?: Snippet;
|
|
7
|
+
content?: Snippet;
|
|
8
|
+
end?: Snippet;
|
|
9
|
+
class?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const ListItem: import("svelte").Component<$$ComponentProps, {}, "checked">;
|
|
12
|
+
type ListItem = ReturnType<typeof ListItem>;
|
|
13
|
+
export default ListItem;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import { page } from '$app/state';
|
|
4
|
+
import ThemeToggle from '../navigation/ThemeToggle.svelte';
|
|
5
|
+
import Wordmark from '../layout/Wordmark.svelte';
|
|
6
|
+
import MarketingShellFooter from './MarketingShellFooter.svelte';
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
prefix = 'TAbelha',
|
|
10
|
+
suffix = '',
|
|
11
|
+
brandHref = '/',
|
|
12
|
+
header,
|
|
13
|
+
actions,
|
|
14
|
+
nav,
|
|
15
|
+
children,
|
|
16
|
+
footerLinks = [],
|
|
17
|
+
footerLicense,
|
|
18
|
+
footerRepoUrl,
|
|
19
|
+
class: className = ''
|
|
20
|
+
}: {
|
|
21
|
+
prefix?: string;
|
|
22
|
+
suffix?: string;
|
|
23
|
+
brandHref?: string;
|
|
24
|
+
header?: Snippet;
|
|
25
|
+
actions?: Snippet;
|
|
26
|
+
nav?: { href: string; label: string }[];
|
|
27
|
+
children: Snippet;
|
|
28
|
+
footerLinks?: { href: string; label: string }[];
|
|
29
|
+
footerLicense?: string;
|
|
30
|
+
footerRepoUrl?: string;
|
|
31
|
+
class?: string;
|
|
32
|
+
} = $props();
|
|
33
|
+
|
|
34
|
+
const isActive = (href: string) =>
|
|
35
|
+
href === '/'
|
|
36
|
+
? page.url.pathname === '/'
|
|
37
|
+
: page.url.pathname === href || page.url.pathname.startsWith(`${href}/`);
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div class="twui-ms {className}">
|
|
41
|
+
<header class="twui-ms-header">
|
|
42
|
+
<div class="twui-ms-header-inner">
|
|
43
|
+
<a href={brandHref} class="twui-ms-brand-link">
|
|
44
|
+
<Wordmark {prefix} {suffix} />
|
|
45
|
+
</a>
|
|
46
|
+
{#if header}
|
|
47
|
+
<div class="twui-ms-header-mid">{@render header()}</div>
|
|
48
|
+
{:else if nav}
|
|
49
|
+
<nav class="twui-ms-nav">
|
|
50
|
+
{#each nav as item (item.href)}
|
|
51
|
+
<a
|
|
52
|
+
href={item.href}
|
|
53
|
+
class="twui-ms-nav-link"
|
|
54
|
+
class:twui-ms-nav-link-active={isActive(item.href)}
|
|
55
|
+
aria-current={isActive(item.href) ? 'page' : undefined}
|
|
56
|
+
>
|
|
57
|
+
{item.label}
|
|
58
|
+
</a>
|
|
59
|
+
{/each}
|
|
60
|
+
</nav>
|
|
61
|
+
{/if}
|
|
62
|
+
<div class="twui-ms-header-end">
|
|
63
|
+
{#if actions}
|
|
64
|
+
<div class="twui-ms-actions">{@render actions()}</div>
|
|
65
|
+
{/if}
|
|
66
|
+
<ThemeToggle />
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</header>
|
|
70
|
+
<main class="twui-ms-main">
|
|
71
|
+
{@render children()}
|
|
72
|
+
</main>
|
|
73
|
+
<MarketingShellFooter
|
|
74
|
+
{prefix}
|
|
75
|
+
{suffix}
|
|
76
|
+
license={footerLicense}
|
|
77
|
+
repoUrl={footerRepoUrl}
|
|
78
|
+
links={footerLinks}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<style>
|
|
83
|
+
.twui-ms {
|
|
84
|
+
display: flex;
|
|
85
|
+
margin: 0 auto;
|
|
86
|
+
width: 100%;
|
|
87
|
+
max-width: 64rem;
|
|
88
|
+
min-height: 100svh;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
border-left: 1px solid var(--twui-rule);
|
|
91
|
+
border-right: 1px solid var(--twui-rule);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.twui-ms-header {
|
|
95
|
+
position: sticky;
|
|
96
|
+
top: 0;
|
|
97
|
+
z-index: 40;
|
|
98
|
+
border-bottom: 1px solid var(--twui-rule);
|
|
99
|
+
background: color-mix(in srgb, var(--twui-paper) 60%, transparent);
|
|
100
|
+
backdrop-filter: blur(8px);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.twui-ms-header-inner {
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: space-between;
|
|
107
|
+
gap: 16px;
|
|
108
|
+
padding: 0 24px;
|
|
109
|
+
height: 56px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.twui-ms-brand-link {
|
|
113
|
+
font-family: var(--twui-font-mono);
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
letter-spacing: -0.02em;
|
|
117
|
+
text-decoration: none;
|
|
118
|
+
white-space: nowrap;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.twui-ms-header-mid {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex: 1;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.twui-ms-nav {
|
|
128
|
+
display: flex;
|
|
129
|
+
flex: 1;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
align-items: center;
|
|
132
|
+
gap: 16px;
|
|
133
|
+
font-family: var(--twui-font-mono);
|
|
134
|
+
font-size: 14px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.twui-ms-nav-link {
|
|
138
|
+
color: var(--twui-ink-soft);
|
|
139
|
+
text-decoration: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.twui-ms-nav-link:hover {
|
|
143
|
+
color: var(--twui-ink);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.twui-ms-nav-link-active {
|
|
147
|
+
color: var(--twui-accent-ink);
|
|
148
|
+
text-decoration: underline;
|
|
149
|
+
text-underline-offset: 4px;
|
|
150
|
+
text-decoration-color: var(--twui-accent);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.twui-ms-header-end {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
gap: 8px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.twui-ms-actions {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
gap: 8px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.twui-ms-main {
|
|
166
|
+
display: flex;
|
|
167
|
+
flex: 1;
|
|
168
|
+
flex-direction: column;
|
|
169
|
+
}
|
|
170
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
prefix?: string;
|
|
4
|
+
suffix?: string;
|
|
5
|
+
brandHref?: string;
|
|
6
|
+
header?: Snippet;
|
|
7
|
+
actions?: Snippet;
|
|
8
|
+
nav?: {
|
|
9
|
+
href: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
children: Snippet;
|
|
13
|
+
footerLinks?: {
|
|
14
|
+
href: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[];
|
|
17
|
+
footerLicense?: string;
|
|
18
|
+
footerRepoUrl?: string;
|
|
19
|
+
class?: string;
|
|
20
|
+
};
|
|
21
|
+
declare const MarketingShell: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
22
|
+
type MarketingShell = ReturnType<typeof MarketingShell>;
|
|
23
|
+
export default MarketingShell;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Wordmark from '../layout/Wordmark.svelte';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
prefix = 'TAbelha',
|
|
6
|
+
suffix = '',
|
|
7
|
+
license,
|
|
8
|
+
repoUrl,
|
|
9
|
+
links = [],
|
|
10
|
+
class: className = ''
|
|
11
|
+
}: {
|
|
12
|
+
prefix?: string;
|
|
13
|
+
suffix?: string;
|
|
14
|
+
license?: string;
|
|
15
|
+
repoUrl?: string;
|
|
16
|
+
links?: { href: string; label: string }[];
|
|
17
|
+
class?: string;
|
|
18
|
+
} = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<footer class="twui-ms-footer {className}">
|
|
22
|
+
<p class="twui-ms-footer-brand">
|
|
23
|
+
<Wordmark {prefix} {suffix} />
|
|
24
|
+
</p>
|
|
25
|
+
{#if license}
|
|
26
|
+
<p class="twui-ms-footer-license">{license}</p>
|
|
27
|
+
{/if}
|
|
28
|
+
{#if links.length > 0 || repoUrl}
|
|
29
|
+
<nav class="twui-ms-footer-nav">
|
|
30
|
+
{#each links as link, i}
|
|
31
|
+
{#if i > 0}<span class="twui-ms-footer-sep" aria-hidden="true">·</span>{/if}
|
|
32
|
+
<a class="twui-ms-footer-link" href={link.href}>{link.label}</a>
|
|
33
|
+
{/each}
|
|
34
|
+
{#if repoUrl}
|
|
35
|
+
{#if links.length > 0}<span class="twui-ms-footer-sep" aria-hidden="true">·</span>{/if}
|
|
36
|
+
<a class="twui-ms-footer-link" href={repoUrl} target="_blank" rel="noreferrer">Código-fonte</a>
|
|
37
|
+
{/if}
|
|
38
|
+
</nav>
|
|
39
|
+
{/if}
|
|
40
|
+
</footer>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
.twui-ms-footer {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
gap: 8px;
|
|
48
|
+
padding: 24px 24px;
|
|
49
|
+
border-top: 1px solid var(--twui-rule);
|
|
50
|
+
text-align: center;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.twui-ms-footer-brand {
|
|
54
|
+
font-family: var(--twui-font-mono);
|
|
55
|
+
font-size: 12px;
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
letter-spacing: -0.01em;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.twui-ms-footer-license {
|
|
61
|
+
font-family: var(--twui-font-mono);
|
|
62
|
+
font-size: 12px;
|
|
63
|
+
color: var(--twui-ink-faint);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.twui-ms-footer-nav {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-wrap: wrap;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
column-gap: 4px;
|
|
72
|
+
row-gap: 4px;
|
|
73
|
+
font-family: var(--twui-font-mono);
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.twui-ms-footer-link {
|
|
78
|
+
color: var(--twui-ink-soft);
|
|
79
|
+
text-decoration: none;
|
|
80
|
+
transition: color 0.15s ease;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.twui-ms-footer-link:hover {
|
|
84
|
+
color: var(--twui-ink);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.twui-ms-footer-sep {
|
|
88
|
+
padding: 0 4px;
|
|
89
|
+
color: var(--twui-ink-faint);
|
|
90
|
+
user-select: none;
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
prefix?: string;
|
|
3
|
+
suffix?: string;
|
|
4
|
+
license?: string;
|
|
5
|
+
repoUrl?: string;
|
|
6
|
+
links?: {
|
|
7
|
+
href: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
class?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const MarketingShellFooter: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
13
|
+
type MarketingShellFooter = ReturnType<typeof MarketingShellFooter>;
|
|
14
|
+
export default MarketingShellFooter;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
items,
|
|
6
|
+
value = $bindable([]),
|
|
7
|
+
multiple = false,
|
|
8
|
+
class: className = ''
|
|
9
|
+
}: {
|
|
10
|
+
items: { value: string; title: string; disabled?: boolean; content?: Snippet }[];
|
|
11
|
+
value?: string[];
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
class?: string;
|
|
14
|
+
} = $props();
|
|
15
|
+
|
|
16
|
+
function toggle(itemValue: string) {
|
|
17
|
+
if (multiple) {
|
|
18
|
+
value = value.includes(itemValue)
|
|
19
|
+
? value.filter((v) => v !== itemValue)
|
|
20
|
+
: [...value, itemValue];
|
|
21
|
+
} else {
|
|
22
|
+
value = value.includes(itemValue) ? [] : [itemValue];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div class="twui-accordion {className}">
|
|
28
|
+
{#each items as item (item.value)}
|
|
29
|
+
{@const open = value.includes(item.value)}
|
|
30
|
+
<div class="twui-accordion-item {open ? 'twui-accordion-item-open' : ''}">
|
|
31
|
+
<button
|
|
32
|
+
type="button"
|
|
33
|
+
class="twui-accordion-header"
|
|
34
|
+
disabled={item.disabled}
|
|
35
|
+
aria-expanded={open}
|
|
36
|
+
onclick={() => toggle(item.value)}
|
|
37
|
+
>
|
|
38
|
+
<span class="twui-accordion-title">{item.title}</span>
|
|
39
|
+
<svg
|
|
40
|
+
class="twui-accordion-chevron {open ? 'twui-accordion-chevron-open' : ''}"
|
|
41
|
+
width="14"
|
|
42
|
+
height="14"
|
|
43
|
+
viewBox="0 0 24 24"
|
|
44
|
+
fill="none"
|
|
45
|
+
stroke="currentColor"
|
|
46
|
+
stroke-width="2"
|
|
47
|
+
stroke-linecap="round"
|
|
48
|
+
stroke-linejoin="round"
|
|
49
|
+
aria-hidden="true"
|
|
50
|
+
><path d="m6 9 6 6 6-6" /></svg>
|
|
51
|
+
</button>
|
|
52
|
+
{#if open && item.content}
|
|
53
|
+
<div class="twui-accordion-content">
|
|
54
|
+
{@render item.content()}
|
|
55
|
+
</div>
|
|
56
|
+
{/if}
|
|
57
|
+
</div>
|
|
58
|
+
{/each}
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<style>
|
|
62
|
+
.twui-accordion {
|
|
63
|
+
border: 1px solid var(--twui-rule);
|
|
64
|
+
background: var(--twui-paper-raised);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.twui-accordion-item + .twui-accordion-item {
|
|
68
|
+
border-top: 1px solid var(--twui-rule);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.twui-accordion-header {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: space-between;
|
|
75
|
+
gap: 8px;
|
|
76
|
+
width: 100%;
|
|
77
|
+
padding: 12px 16px;
|
|
78
|
+
border: none;
|
|
79
|
+
background: transparent;
|
|
80
|
+
font-family: var(--twui-font-mono);
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
font-weight: 500;
|
|
83
|
+
text-align: left;
|
|
84
|
+
color: var(--twui-ink);
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.twui-accordion-header:hover:not(:disabled) {
|
|
89
|
+
color: var(--twui-accent);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.twui-accordion-header:disabled {
|
|
93
|
+
opacity: 0.4;
|
|
94
|
+
cursor: not-allowed;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.twui-accordion-chevron {
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
color: var(--twui-ink-soft);
|
|
100
|
+
transition: transform 0.15s ease;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.twui-accordion-chevron-open {
|
|
104
|
+
transform: rotate(180deg);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.twui-accordion-content {
|
|
108
|
+
padding: 4px 16px 16px;
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
items: {
|
|
4
|
+
value: string;
|
|
5
|
+
title: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
content?: Snippet;
|
|
8
|
+
}[];
|
|
9
|
+
value?: string[];
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
class?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const Accordion: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
14
|
+
type Accordion = ReturnType<typeof Accordion>;
|
|
15
|
+
export default Accordion;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
items,
|
|
6
|
+
page = $bindable(0),
|
|
7
|
+
item,
|
|
8
|
+
prevLabel = 'Anterior',
|
|
9
|
+
nextLabel = 'Próxima',
|
|
10
|
+
class: className = ''
|
|
11
|
+
}: {
|
|
12
|
+
items: unknown[];
|
|
13
|
+
page?: number;
|
|
14
|
+
item: Snippet<[value: unknown]>;
|
|
15
|
+
prevLabel?: string;
|
|
16
|
+
nextLabel?: string;
|
|
17
|
+
class?: string;
|
|
18
|
+
} = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class="twui-carousel {className}">
|
|
22
|
+
<div class="twui-carousel-viewport">
|
|
23
|
+
{@render item(items[page])}
|
|
24
|
+
</div>
|
|
25
|
+
<div class="twui-carousel-nav">
|
|
26
|
+
<button
|
|
27
|
+
type="button"
|
|
28
|
+
class="twui-carousel-btn"
|
|
29
|
+
disabled={page <= 0}
|
|
30
|
+
onclick={() => (page -= 1)}
|
|
31
|
+
aria-label={prevLabel}
|
|
32
|
+
>‹</button>
|
|
33
|
+
<div class="twui-carousel-dots">
|
|
34
|
+
{#each items as _, i (i)}
|
|
35
|
+
<button
|
|
36
|
+
type="button"
|
|
37
|
+
class="twui-carousel-dot {i === page ? 'twui-carousel-dot-active' : ''}"
|
|
38
|
+
aria-label={`Página ${i + 1}`}
|
|
39
|
+
onclick={() => (page = i)}
|
|
40
|
+
></button>
|
|
41
|
+
{/each}
|
|
42
|
+
</div>
|
|
43
|
+
<button
|
|
44
|
+
type="button"
|
|
45
|
+
class="twui-carousel-btn"
|
|
46
|
+
disabled={page >= items.length - 1}
|
|
47
|
+
onclick={() => (page += 1)}
|
|
48
|
+
aria-label={nextLabel}
|
|
49
|
+
>›</button>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<style>
|
|
54
|
+
.twui-carousel {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: 12px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.twui-carousel-viewport {
|
|
61
|
+
min-height: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.twui-carousel-nav {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
gap: 12px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.twui-carousel-btn {
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
width: 28px;
|
|
76
|
+
height: 28px;
|
|
77
|
+
padding: 0;
|
|
78
|
+
border: 1px solid var(--twui-rule);
|
|
79
|
+
background: transparent;
|
|
80
|
+
font-size: 15px;
|
|
81
|
+
color: var(--twui-ink);
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.twui-carousel-btn:hover:not(:disabled) {
|
|
86
|
+
border-color: var(--twui-accent);
|
|
87
|
+
color: var(--twui-accent);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.twui-carousel-btn:disabled {
|
|
91
|
+
opacity: 0.4;
|
|
92
|
+
cursor: not-allowed;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.twui-carousel-dots {
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: 6px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.twui-carousel-dot {
|
|
102
|
+
width: 8px;
|
|
103
|
+
height: 8px;
|
|
104
|
+
padding: 0;
|
|
105
|
+
border: 1px solid var(--twui-rule);
|
|
106
|
+
border-radius: 9999px;
|
|
107
|
+
background: transparent;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.twui-carousel-dot-active {
|
|
112
|
+
border-color: var(--twui-accent);
|
|
113
|
+
background: var(--twui-accent);
|
|
114
|
+
}
|
|
115
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
items: unknown[];
|
|
4
|
+
page?: number;
|
|
5
|
+
item: Snippet<[value: unknown]>;
|
|
6
|
+
prevLabel?: string;
|
|
7
|
+
nextLabel?: string;
|
|
8
|
+
class?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const Carousel: import("svelte").Component<$$ComponentProps, {}, "page">;
|
|
11
|
+
type Carousel = ReturnType<typeof Carousel>;
|
|
12
|
+
export default Carousel;
|