@autumnsgrove/groveengine 0.3.3 → 0.4.1
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/auth/index.d.ts +2 -0
- package/dist/auth/index.js +5 -0
- package/dist/components/admin/GutterManager.svelte +4 -4
- package/dist/components/admin/MarkdownEditor.svelte +381 -1311
- package/dist/components/admin/MarkdownEditor.svelte.d.ts +2 -8
- package/dist/components/admin/composables/index.d.ts +7 -0
- package/dist/components/admin/composables/index.js +12 -0
- package/dist/components/admin/composables/useAmbientSounds.svelte.d.ts +53 -0
- package/dist/components/admin/composables/useAmbientSounds.svelte.js +192 -0
- package/dist/components/admin/composables/useCommandPalette.svelte.d.ts +17 -0
- package/dist/components/admin/composables/useCommandPalette.svelte.js +118 -0
- package/dist/components/admin/composables/useDraftManager.svelte.d.ts +17 -0
- package/dist/components/admin/composables/useDraftManager.svelte.js +154 -0
- package/dist/components/admin/composables/useEditorTheme.svelte.d.ts +195 -0
- package/dist/components/admin/composables/useEditorTheme.svelte.js +182 -0
- package/dist/components/admin/composables/useSlashCommands.svelte.d.ts +32 -0
- package/dist/components/admin/composables/useSlashCommands.svelte.js +166 -0
- package/dist/components/admin/composables/useSnippets.svelte.d.ts +5 -0
- package/dist/components/admin/composables/useSnippets.svelte.js +122 -0
- package/dist/components/admin/composables/useWritingSession.svelte.d.ts +13 -0
- package/dist/components/admin/composables/useWritingSession.svelte.js +100 -0
- package/dist/components/custom/ContentWithGutter.svelte +14 -7
- package/dist/components/custom/GutterItem.svelte +2 -2
- package/dist/config/ai-models.d.ts +25 -0
- package/dist/config/ai-models.js +50 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +4 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +4 -0
- package/dist/ui/components/charts/ActivityOverview.svelte +293 -0
- package/dist/ui/components/charts/ActivityOverview.svelte.d.ts +12 -0
- package/dist/ui/components/charts/LOCBar.svelte +129 -0
- package/dist/ui/components/charts/LOCBar.svelte.d.ts +21 -0
- package/dist/ui/components/charts/RepoBreakdown.svelte +136 -0
- package/dist/ui/components/charts/RepoBreakdown.svelte.d.ts +16 -0
- package/dist/ui/components/charts/Sparkline.svelte +139 -0
- package/dist/ui/components/charts/Sparkline.svelte.d.ts +6 -0
- package/dist/ui/components/charts/index.d.ts +5 -0
- package/dist/ui/components/charts/index.js +11 -0
- package/dist/ui/components/content/PlanCard.svelte +91 -0
- package/dist/ui/components/content/PlanCard.svelte.d.ts +13 -0
- package/dist/ui/components/content/ProductCard.svelte +125 -0
- package/dist/ui/components/content/ProductCard.svelte.d.ts +14 -0
- package/dist/ui/components/content/SearchCard.svelte +60 -0
- package/dist/ui/components/content/SearchCard.svelte.d.ts +10 -0
- package/dist/ui/components/content/index.d.ts +4 -0
- package/dist/ui/components/content/index.js +10 -0
- package/dist/ui/components/forms/SearchInput.svelte +89 -0
- package/dist/ui/components/forms/SearchInput.svelte.d.ts +11 -0
- package/dist/ui/components/forms/index.d.ts +2 -0
- package/dist/ui/components/forms/index.js +8 -0
- package/dist/ui/components/gallery/index.d.ts +5 -0
- package/dist/ui/components/gallery/index.js +13 -0
- package/dist/ui/components/icons/IconLegend.svelte +83 -0
- package/dist/ui/components/icons/IconLegend.svelte.d.ts +11 -0
- package/dist/ui/components/icons/Icons.svelte +115 -0
- package/dist/ui/components/icons/Icons.svelte.d.ts +8 -0
- package/dist/ui/components/icons/index.d.ts +3 -0
- package/dist/ui/components/icons/index.js +9 -0
- package/dist/ui/components/indicators/CreditBalance.svelte +67 -0
- package/dist/ui/components/indicators/CreditBalance.svelte.d.ts +9 -0
- package/dist/ui/components/indicators/ScoreBar.svelte +63 -0
- package/dist/ui/components/indicators/ScoreBar.svelte.d.ts +9 -0
- package/dist/ui/components/indicators/StatusBadge.svelte +46 -0
- package/dist/ui/components/indicators/StatusBadge.svelte.d.ts +7 -0
- package/dist/ui/components/indicators/index.d.ts +4 -0
- package/dist/ui/components/indicators/index.js +10 -0
- package/dist/{components/ui → ui/components/primitives}/accordion/accordion-content.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/accordion/accordion-item.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/accordion/accordion-trigger.svelte +1 -1
- package/dist/ui/components/primitives/badge/badge.svelte +50 -0
- package/dist/ui/components/primitives/badge/badge.svelte.d.ts +60 -0
- package/dist/ui/components/primitives/badge/index.d.ts +2 -0
- package/dist/ui/components/primitives/badge/index.js +2 -0
- package/dist/ui/components/primitives/button/button.svelte +82 -0
- package/dist/ui/components/primitives/button/button.svelte.d.ts +132 -0
- package/dist/ui/components/primitives/button/index.d.ts +2 -0
- package/dist/ui/components/primitives/button/index.js +4 -0
- package/dist/ui/components/primitives/card/card-content.svelte +16 -0
- package/dist/ui/components/primitives/card/card-content.svelte.d.ts +5 -0
- package/dist/ui/components/primitives/card/card-description.svelte +16 -0
- package/dist/ui/components/primitives/card/card-description.svelte.d.ts +5 -0
- package/dist/ui/components/primitives/card/card-footer.svelte +16 -0
- package/dist/ui/components/primitives/card/card-footer.svelte.d.ts +5 -0
- package/dist/ui/components/primitives/card/card-header.svelte +16 -0
- package/dist/ui/components/primitives/card/card-header.svelte.d.ts +5 -0
- package/dist/ui/components/primitives/card/card-title.svelte +25 -0
- package/dist/ui/components/primitives/card/card-title.svelte.d.ts +8 -0
- package/dist/ui/components/primitives/card/card.svelte +20 -0
- package/dist/ui/components/primitives/card/card.svelte.d.ts +5 -0
- package/dist/ui/components/primitives/card/index.d.ts +7 -0
- package/dist/ui/components/primitives/card/index.js +9 -0
- package/dist/{components/ui → ui/components/primitives}/dialog/dialog-content.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/dialog/dialog-description.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/dialog/dialog-footer.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/dialog/dialog-header.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/dialog/dialog-overlay.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/dialog/dialog-title.svelte +1 -1
- package/dist/ui/components/primitives/input/index.d.ts +2 -0
- package/dist/ui/components/primitives/input/index.js +4 -0
- package/dist/ui/components/primitives/input/input.svelte +46 -0
- package/dist/ui/components/primitives/input/input.svelte.d.ts +13 -0
- package/dist/{components/ui → ui/components/primitives}/select/select-content.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/select/select-group-heading.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/select/select-item.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/select/select-scroll-down-button.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/select/select-scroll-up-button.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/select/select-separator.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/select/select-trigger.svelte +1 -1
- package/dist/ui/components/primitives/separator/index.d.ts +2 -0
- package/dist/ui/components/primitives/separator/index.js +4 -0
- package/dist/ui/components/primitives/separator/separator.svelte +22 -0
- package/dist/ui/components/primitives/separator/separator.svelte.d.ts +4 -0
- package/dist/{components/ui → ui/components/primitives}/sheet/sheet-content.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/sheet/sheet-description.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/sheet/sheet-footer.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/sheet/sheet-header.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/sheet/sheet-overlay.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/sheet/sheet-title.svelte +1 -1
- package/dist/ui/components/primitives/skeleton/index.d.ts +2 -0
- package/dist/ui/components/primitives/skeleton/index.js +4 -0
- package/dist/ui/components/primitives/skeleton/skeleton.svelte +17 -0
- package/dist/ui/components/primitives/skeleton/skeleton.svelte.d.ts +5 -0
- package/dist/{components/ui → ui/components/primitives}/table/table-body.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/table/table-caption.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/table/table-cell.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/table/table-footer.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/table/table-head.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/table/table-header.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/table/table-row.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/table/table.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/tabs/tabs-content.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/tabs/tabs-list.svelte +1 -1
- package/dist/{components/ui → ui/components/primitives}/tabs/tabs-trigger.svelte +1 -1
- package/dist/ui/components/primitives/textarea/index.d.ts +2 -0
- package/dist/ui/components/primitives/textarea/index.js +4 -0
- package/dist/ui/components/primitives/textarea/textarea.svelte +24 -0
- package/dist/ui/components/primitives/textarea/textarea.svelte.d.ts +6 -0
- package/dist/ui/components/states/EmptyState.svelte +28 -0
- package/dist/ui/components/states/EmptyState.svelte.d.ts +10 -0
- package/dist/ui/components/states/Loading.svelte +62 -0
- package/dist/ui/components/states/Loading.svelte.d.ts +7 -0
- package/dist/ui/components/states/LoadingSkeleton.svelte +46 -0
- package/dist/ui/components/states/LoadingSkeleton.svelte.d.ts +8 -0
- package/dist/ui/components/states/ThemeToggle.svelte +138 -0
- package/dist/ui/components/states/ThemeToggle.svelte.d.ts +6 -0
- package/dist/ui/components/states/index.d.ts +5 -0
- package/dist/ui/components/states/index.js +11 -0
- package/dist/{components → ui/components}/ui/Accordion.svelte +1 -1
- package/dist/ui/components/ui/Badge.svelte +52 -0
- package/dist/ui/components/ui/Badge.svelte.d.ts +28 -0
- package/dist/ui/components/ui/Button.svelte +77 -0
- package/dist/ui/components/ui/Button.svelte.d.ts +34 -0
- package/dist/ui/components/ui/Card.svelte +102 -0
- package/dist/ui/components/ui/Card.svelte.d.ts +46 -0
- package/dist/ui/components/ui/CollapsibleSection.svelte +65 -0
- package/dist/ui/components/ui/CollapsibleSection.svelte.d.ts +10 -0
- package/dist/{components → ui/components}/ui/Dialog.svelte +1 -1
- package/dist/ui/components/ui/Input.svelte +81 -0
- package/dist/ui/components/ui/Input.svelte.d.ts +35 -0
- package/dist/{components → ui/components}/ui/Select.svelte +1 -1
- package/dist/{components → ui/components}/ui/Sheet.svelte +1 -1
- package/dist/ui/components/ui/Skeleton.svelte +31 -0
- package/dist/ui/components/ui/Skeleton.svelte.d.ts +26 -0
- package/dist/ui/components/ui/Spinner.svelte +45 -0
- package/dist/ui/components/ui/Spinner.svelte.d.ts +15 -0
- package/dist/{components → ui/components}/ui/Table.svelte +2 -2
- package/dist/{components → ui/components}/ui/Table.svelte.d.ts +1 -1
- package/dist/{components → ui/components}/ui/Tabs.svelte +2 -2
- package/dist/ui/components/ui/Textarea.svelte +81 -0
- package/dist/ui/components/ui/Textarea.svelte.d.ts +35 -0
- package/dist/ui/components/ui/index.d.ts +18 -0
- package/dist/ui/components/ui/index.js +28 -0
- package/dist/{components → ui/components}/ui/toast.d.ts +1 -1
- package/dist/{components → ui/components}/ui/toast.js +1 -1
- package/dist/ui/index.d.ts +10 -0
- package/dist/ui/index.js +22 -0
- package/dist/ui/stores/theme.d.ts +12 -0
- package/dist/ui/stores/theme.js +52 -0
- package/dist/ui/styles/content.css +514 -0
- package/dist/ui/styles/grove.css +715 -0
- package/dist/ui/styles/tokens.css +429 -0
- package/dist/ui/tailwind.preset.d.ts +340 -0
- package/dist/ui/tailwind.preset.js +441 -0
- package/dist/ui/tokens/animation.d.ts +417 -0
- package/dist/ui/tokens/animation.js +139 -0
- package/dist/ui/tokens/colors.d.ts +183 -0
- package/dist/ui/tokens/colors.js +97 -0
- package/dist/ui/tokens/effects.d.ts +111 -0
- package/dist/ui/tokens/effects.js +61 -0
- package/dist/ui/tokens/index.d.ts +6 -0
- package/dist/ui/tokens/index.js +19 -0
- package/dist/ui/tokens/spacing.d.ts +89 -0
- package/dist/ui/tokens/spacing.js +49 -0
- package/dist/ui/tokens/typography.d.ts +85 -0
- package/dist/ui/tokens/typography.js +68 -0
- package/dist/ui/utils/cn.d.ts +13 -0
- package/dist/ui/utils/cn.js +24 -0
- package/dist/ui/utils/index.d.ts +2 -0
- package/dist/ui/utils/index.js +8 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.js +14 -0
- package/dist/utils/markdown.d.ts +11 -0
- package/dist/utils/markdown.js +25 -0
- package/dist/utils/sanitize.js +2 -3
- package/package.json +92 -31
- package/dist/components/ui/index.d.ts +0 -14
- package/dist/components/ui/index.js +0 -18
- /package/dist/{components → ui/components}/gallery/ImageGallery.svelte +0 -0
- /package/dist/{components → ui/components}/gallery/ImageGallery.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/gallery/Lightbox.svelte +0 -0
- /package/dist/{components → ui/components}/gallery/Lightbox.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/gallery/LightboxCaption.svelte +0 -0
- /package/dist/{components → ui/components}/gallery/LightboxCaption.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/gallery/ZoomableImage.svelte +0 -0
- /package/dist/{components → ui/components}/gallery/ZoomableImage.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/accordion/accordion-content.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/accordion/accordion-item.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/accordion/accordion-trigger.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/accordion/index.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/accordion/index.js +0 -0
- /package/dist/{components/ui → ui/components/primitives}/dialog/dialog-content.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/dialog/dialog-description.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/dialog/dialog-footer.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/dialog/dialog-header.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/dialog/dialog-overlay.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/dialog/dialog-title.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/dialog/index.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/dialog/index.js +0 -0
- /package/dist/{components/ui → ui/components/primitives}/select/index.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/select/index.js +0 -0
- /package/dist/{components/ui → ui/components/primitives}/select/select-content.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/select/select-group-heading.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/select/select-item.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/select/select-scroll-down-button.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/select/select-scroll-up-button.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/select/select-separator.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/select/select-trigger.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/sheet/index.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/sheet/index.js +0 -0
- /package/dist/{components/ui → ui/components/primitives}/sheet/sheet-content.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/sheet/sheet-description.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/sheet/sheet-footer.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/sheet/sheet-header.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/sheet/sheet-overlay.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/sheet/sheet-title.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/index.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/index.js +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/table-body.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/table-caption.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/table-cell.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/table-footer.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/table-head.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/table-header.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/table-row.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/table/table.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/tabs/index.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/tabs/index.js +0 -0
- /package/dist/{components/ui → ui/components/primitives}/tabs/tabs-content.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/tabs/tabs-list.svelte.d.ts +0 -0
- /package/dist/{components/ui → ui/components/primitives}/tabs/tabs-trigger.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/ui/Accordion.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/ui/Dialog.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/ui/Select.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/ui/Sheet.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/ui/Tabs.svelte.d.ts +0 -0
- /package/dist/{components → ui/components}/ui/Toast.svelte +0 -0
- /package/dist/{components → ui/components}/ui/Toast.svelte.d.ts +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Icons from '../icons/Icons.svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
status: 'pending' | 'running' | 'completed' | 'failed' | 'needs_confirmation';
|
|
6
|
+
size?: 'sm' | 'md';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { status, size = 'md' }: Props = $props();
|
|
10
|
+
|
|
11
|
+
const statusConfig = {
|
|
12
|
+
pending: {
|
|
13
|
+
label: 'Pending',
|
|
14
|
+
class: 'scout-badge-pending',
|
|
15
|
+
icon: 'clock' as const
|
|
16
|
+
},
|
|
17
|
+
running: {
|
|
18
|
+
label: 'Searching',
|
|
19
|
+
class: 'scout-badge-running',
|
|
20
|
+
icon: 'loader' as const
|
|
21
|
+
},
|
|
22
|
+
completed: {
|
|
23
|
+
label: 'Complete',
|
|
24
|
+
class: 'scout-badge-completed',
|
|
25
|
+
icon: 'check' as const
|
|
26
|
+
},
|
|
27
|
+
failed: {
|
|
28
|
+
label: 'Failed',
|
|
29
|
+
class: 'scout-badge-failed',
|
|
30
|
+
icon: 'x' as const
|
|
31
|
+
},
|
|
32
|
+
needs_confirmation: {
|
|
33
|
+
label: 'Needs Review',
|
|
34
|
+
class: 'scout-badge-pending',
|
|
35
|
+
icon: 'zap' as const
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const config = $derived(statusConfig[status]);
|
|
40
|
+
const sizeClass = $derived(size === 'sm' ? 'text-xs px-2 py-0.5' : 'text-sm px-2.5 py-1');
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<span class="{config.class} {sizeClass} inline-flex items-center gap-1.5 font-medium rounded-full">
|
|
44
|
+
<Icons name={config.icon} size="sm" class={status === 'running' ? 'animate-spin' : ''} />
|
|
45
|
+
{config.label}
|
|
46
|
+
</span>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
status: 'pending' | 'running' | 'completed' | 'failed' | 'needs_confirmation';
|
|
3
|
+
size?: 'sm' | 'md';
|
|
4
|
+
}
|
|
5
|
+
declare const StatusBadge: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type StatusBadge = ReturnType<typeof StatusBadge>;
|
|
7
|
+
export default StatusBadge;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// GroveUI - Indicator Components
|
|
2
|
+
//
|
|
3
|
+
// This module exports status and progress indicator components
|
|
4
|
+
//
|
|
5
|
+
// Usage:
|
|
6
|
+
// import { StatusBadge, ScoreBar, CreditBalance } from '@groveengine/ui/indicators';
|
|
7
|
+
export { default as StatusBadge } from './StatusBadge.svelte';
|
|
8
|
+
export { default as ScoreBar } from './ScoreBar.svelte';
|
|
9
|
+
export { default as CreditBalance } from './CreditBalance.svelte';
|
|
10
|
+
export const INDICATORS_VERSION = '0.2.0';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Accordion as AccordionPrimitive, type WithoutChild } from "bits-ui";
|
|
3
3
|
import ChevronDown from "@lucide/svelte/icons/chevron-down";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "../../../../utils";
|
|
5
5
|
|
|
6
6
|
let {
|
|
7
7
|
ref = $bindable(null),
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { type VariantProps, tv } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
export const badgeVariants = tv({
|
|
5
|
+
base: "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default:
|
|
9
|
+
"bg-primary text-primary-foreground hover:bg-primary/80 border-transparent",
|
|
10
|
+
secondary:
|
|
11
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",
|
|
12
|
+
destructive:
|
|
13
|
+
"bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent",
|
|
14
|
+
outline: "text-foreground",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
variant: "default",
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
import type { WithElementRef } from "bits-ui";
|
|
27
|
+
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
28
|
+
import { cn } from "../../../../utils";
|
|
29
|
+
|
|
30
|
+
let {
|
|
31
|
+
ref = $bindable(null),
|
|
32
|
+
href,
|
|
33
|
+
class: className,
|
|
34
|
+
variant = "default",
|
|
35
|
+
children,
|
|
36
|
+
...restProps
|
|
37
|
+
}: WithElementRef<HTMLAnchorAttributes> & {
|
|
38
|
+
variant?: BadgeVariant;
|
|
39
|
+
} = $props();
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<svelte:element
|
|
43
|
+
this={href ? "a" : "span"}
|
|
44
|
+
bind:this={ref}
|
|
45
|
+
{href}
|
|
46
|
+
class={cn(badgeVariants({ variant }), className)}
|
|
47
|
+
{...restProps}
|
|
48
|
+
>
|
|
49
|
+
{@render children?.()}
|
|
50
|
+
</svelte:element>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
default: string;
|
|
5
|
+
secondary: string;
|
|
6
|
+
destructive: string;
|
|
7
|
+
outline: string;
|
|
8
|
+
};
|
|
9
|
+
}, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
10
|
+
variant: {
|
|
11
|
+
default: string;
|
|
12
|
+
secondary: string;
|
|
13
|
+
destructive: string;
|
|
14
|
+
outline: string;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
variant: {
|
|
18
|
+
default: string;
|
|
19
|
+
secondary: string;
|
|
20
|
+
destructive: string;
|
|
21
|
+
outline: string;
|
|
22
|
+
};
|
|
23
|
+
}>, {
|
|
24
|
+
variant: {
|
|
25
|
+
default: string;
|
|
26
|
+
secondary: string;
|
|
27
|
+
destructive: string;
|
|
28
|
+
outline: string;
|
|
29
|
+
};
|
|
30
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
31
|
+
variant: {
|
|
32
|
+
default: string;
|
|
33
|
+
secondary: string;
|
|
34
|
+
destructive: string;
|
|
35
|
+
outline: string;
|
|
36
|
+
};
|
|
37
|
+
}, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
38
|
+
variant: {
|
|
39
|
+
default: string;
|
|
40
|
+
secondary: string;
|
|
41
|
+
destructive: string;
|
|
42
|
+
outline: string;
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
variant: {
|
|
46
|
+
default: string;
|
|
47
|
+
secondary: string;
|
|
48
|
+
destructive: string;
|
|
49
|
+
outline: string;
|
|
50
|
+
};
|
|
51
|
+
}>, unknown, unknown, undefined>>;
|
|
52
|
+
export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
|
|
53
|
+
import type { WithElementRef } from "bits-ui";
|
|
54
|
+
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
55
|
+
type $$ComponentProps = WithElementRef<HTMLAnchorAttributes> & {
|
|
56
|
+
variant?: BadgeVariant;
|
|
57
|
+
};
|
|
58
|
+
declare const Badge: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
59
|
+
type Badge = ReturnType<typeof Badge>;
|
|
60
|
+
export default Badge;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { cn, type WithElementRef } from "../../../../utils";
|
|
3
|
+
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
|
|
4
|
+
import { type VariantProps, tv } from "tailwind-variants";
|
|
5
|
+
|
|
6
|
+
export const buttonVariants = tv({
|
|
7
|
+
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
11
|
+
destructive:
|
|
12
|
+
"bg-destructive shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white",
|
|
13
|
+
outline:
|
|
14
|
+
"bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
16
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
17
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
21
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
22
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
23
|
+
icon: "size-9",
|
|
24
|
+
"icon-sm": "size-8",
|
|
25
|
+
"icon-lg": "size-10",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: "default",
|
|
30
|
+
size: "default",
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
35
|
+
export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
|
|
36
|
+
|
|
37
|
+
export type ButtonProps = WithElementRef<HTMLButtonAttributes> &
|
|
38
|
+
WithElementRef<HTMLAnchorAttributes> & {
|
|
39
|
+
variant?: ButtonVariant;
|
|
40
|
+
size?: ButtonSize;
|
|
41
|
+
};
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<script lang="ts">
|
|
45
|
+
let {
|
|
46
|
+
class: className,
|
|
47
|
+
variant = "default",
|
|
48
|
+
size = "default",
|
|
49
|
+
ref = $bindable(null),
|
|
50
|
+
href = undefined,
|
|
51
|
+
type = "button",
|
|
52
|
+
disabled,
|
|
53
|
+
children,
|
|
54
|
+
...restProps
|
|
55
|
+
}: ButtonProps = $props();
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
{#if href}
|
|
59
|
+
<a
|
|
60
|
+
bind:this={ref}
|
|
61
|
+
data-slot="button"
|
|
62
|
+
class={cn(buttonVariants({ variant, size }), className)}
|
|
63
|
+
href={disabled ? undefined : href}
|
|
64
|
+
aria-disabled={disabled}
|
|
65
|
+
role={disabled ? "link" : undefined}
|
|
66
|
+
tabindex={disabled ? -1 : undefined}
|
|
67
|
+
{...restProps}
|
|
68
|
+
>
|
|
69
|
+
{@render children?.()}
|
|
70
|
+
</a>
|
|
71
|
+
{:else}
|
|
72
|
+
<button
|
|
73
|
+
bind:this={ref}
|
|
74
|
+
data-slot="button"
|
|
75
|
+
class={cn(buttonVariants({ variant, size }), className)}
|
|
76
|
+
{type}
|
|
77
|
+
{disabled}
|
|
78
|
+
{...restProps}
|
|
79
|
+
>
|
|
80
|
+
{@render children?.()}
|
|
81
|
+
</button>
|
|
82
|
+
{/if}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../../utils";
|
|
2
|
+
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements";
|
|
3
|
+
import { type VariantProps } from "tailwind-variants";
|
|
4
|
+
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
default: string;
|
|
7
|
+
destructive: string;
|
|
8
|
+
outline: string;
|
|
9
|
+
secondary: string;
|
|
10
|
+
ghost: string;
|
|
11
|
+
link: string;
|
|
12
|
+
};
|
|
13
|
+
size: {
|
|
14
|
+
default: string;
|
|
15
|
+
sm: string;
|
|
16
|
+
lg: string;
|
|
17
|
+
icon: string;
|
|
18
|
+
"icon-sm": string;
|
|
19
|
+
"icon-lg": string;
|
|
20
|
+
};
|
|
21
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
22
|
+
variant: {
|
|
23
|
+
default: string;
|
|
24
|
+
destructive: string;
|
|
25
|
+
outline: string;
|
|
26
|
+
secondary: string;
|
|
27
|
+
ghost: string;
|
|
28
|
+
link: string;
|
|
29
|
+
};
|
|
30
|
+
size: {
|
|
31
|
+
default: string;
|
|
32
|
+
sm: string;
|
|
33
|
+
lg: string;
|
|
34
|
+
icon: string;
|
|
35
|
+
"icon-sm": string;
|
|
36
|
+
"icon-lg": string;
|
|
37
|
+
};
|
|
38
|
+
}, {
|
|
39
|
+
variant: {
|
|
40
|
+
default: string;
|
|
41
|
+
destructive: string;
|
|
42
|
+
outline: string;
|
|
43
|
+
secondary: string;
|
|
44
|
+
ghost: string;
|
|
45
|
+
link: string;
|
|
46
|
+
};
|
|
47
|
+
size: {
|
|
48
|
+
default: string;
|
|
49
|
+
sm: string;
|
|
50
|
+
lg: string;
|
|
51
|
+
icon: string;
|
|
52
|
+
"icon-sm": string;
|
|
53
|
+
"icon-lg": string;
|
|
54
|
+
};
|
|
55
|
+
}>, {
|
|
56
|
+
variant: {
|
|
57
|
+
default: string;
|
|
58
|
+
destructive: string;
|
|
59
|
+
outline: string;
|
|
60
|
+
secondary: string;
|
|
61
|
+
ghost: string;
|
|
62
|
+
link: string;
|
|
63
|
+
};
|
|
64
|
+
size: {
|
|
65
|
+
default: string;
|
|
66
|
+
sm: string;
|
|
67
|
+
lg: string;
|
|
68
|
+
icon: string;
|
|
69
|
+
"icon-sm": string;
|
|
70
|
+
"icon-lg": string;
|
|
71
|
+
};
|
|
72
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
73
|
+
variant: {
|
|
74
|
+
default: string;
|
|
75
|
+
destructive: string;
|
|
76
|
+
outline: string;
|
|
77
|
+
secondary: string;
|
|
78
|
+
ghost: string;
|
|
79
|
+
link: string;
|
|
80
|
+
};
|
|
81
|
+
size: {
|
|
82
|
+
default: string;
|
|
83
|
+
sm: string;
|
|
84
|
+
lg: string;
|
|
85
|
+
icon: string;
|
|
86
|
+
"icon-sm": string;
|
|
87
|
+
"icon-lg": string;
|
|
88
|
+
};
|
|
89
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
90
|
+
variant: {
|
|
91
|
+
default: string;
|
|
92
|
+
destructive: string;
|
|
93
|
+
outline: string;
|
|
94
|
+
secondary: string;
|
|
95
|
+
ghost: string;
|
|
96
|
+
link: string;
|
|
97
|
+
};
|
|
98
|
+
size: {
|
|
99
|
+
default: string;
|
|
100
|
+
sm: string;
|
|
101
|
+
lg: string;
|
|
102
|
+
icon: string;
|
|
103
|
+
"icon-sm": string;
|
|
104
|
+
"icon-lg": string;
|
|
105
|
+
};
|
|
106
|
+
}, {
|
|
107
|
+
variant: {
|
|
108
|
+
default: string;
|
|
109
|
+
destructive: string;
|
|
110
|
+
outline: string;
|
|
111
|
+
secondary: string;
|
|
112
|
+
ghost: string;
|
|
113
|
+
link: string;
|
|
114
|
+
};
|
|
115
|
+
size: {
|
|
116
|
+
default: string;
|
|
117
|
+
sm: string;
|
|
118
|
+
lg: string;
|
|
119
|
+
icon: string;
|
|
120
|
+
"icon-sm": string;
|
|
121
|
+
"icon-lg": string;
|
|
122
|
+
};
|
|
123
|
+
}>, unknown, unknown, undefined>>;
|
|
124
|
+
export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
125
|
+
export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
|
|
126
|
+
export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
|
|
127
|
+
variant?: ButtonVariant;
|
|
128
|
+
size?: ButtonSize;
|
|
129
|
+
};
|
|
130
|
+
declare const Button: import("svelte").Component<ButtonProps, {}, "ref">;
|
|
131
|
+
type Button = ReturnType<typeof Button>;
|
|
132
|
+
export default Button;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div bind:this={ref} class={cn("p-6", className)} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const CardContent: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type CardContent = ReturnType<typeof CardContent>;
|
|
5
|
+
export default CardContent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLParagraphElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<p bind:this={ref} class={cn("text-muted-foreground text-sm", className)} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</p>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const CardDescription: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLParagraphElement>>, {}, "ref">;
|
|
4
|
+
type CardDescription = ReturnType<typeof CardDescription>;
|
|
5
|
+
export default CardDescription;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div bind:this={ref} class={cn("flex items-center p-6 pt-0", className)} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const CardFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type CardFooter = ReturnType<typeof CardFooter>;
|
|
5
|
+
export default CardFooter;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div bind:this={ref} class={cn("flex flex-col space-y-1.5 p-6 pb-0", className)} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const CardHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type CardHeader = ReturnType<typeof CardHeader>;
|
|
5
|
+
export default CardHeader;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
level = 3,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
13
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
role="heading"
|
|
19
|
+
aria-level={level}
|
|
20
|
+
bind:this={ref}
|
|
21
|
+
class={cn("text-2xl font-semibold leading-none tracking-tight", className)}
|
|
22
|
+
{...restProps}
|
|
23
|
+
>
|
|
24
|
+
{@render children?.()}
|
|
25
|
+
</div>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
4
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
};
|
|
6
|
+
declare const CardTitle: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
|
+
type CardTitle = ReturnType<typeof CardTitle>;
|
|
8
|
+
export default CardTitle;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
class={cn("bg-card text-card-foreground rounded-lg border shadow-sm", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const Card: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type Card = ReturnType<typeof Card>;
|
|
5
|
+
export default Card;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Root from "./card.svelte";
|
|
2
|
+
import Content from "./card-content.svelte";
|
|
3
|
+
import Description from "./card-description.svelte";
|
|
4
|
+
import Footer from "./card-footer.svelte";
|
|
5
|
+
import Header from "./card-header.svelte";
|
|
6
|
+
import Title from "./card-title.svelte";
|
|
7
|
+
export { Root, Content, Description, Footer, Header, Title, Root as Card, Content as CardContent, Description as CardDescription, Footer as CardFooter, Header as CardHeader, Title as CardTitle, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Root from "./card.svelte";
|
|
2
|
+
import Content from "./card-content.svelte";
|
|
3
|
+
import Description from "./card-description.svelte";
|
|
4
|
+
import Footer from "./card-footer.svelte";
|
|
5
|
+
import Header from "./card-header.svelte";
|
|
6
|
+
import Title from "./card-title.svelte";
|
|
7
|
+
export { Root, Content, Description, Footer, Header, Title,
|
|
8
|
+
//
|
|
9
|
+
Root as Card, Content as CardContent, Description as CardDescription, Footer as CardFooter, Header as CardHeader, Title as CardTitle, };
|