@widgetic/design-system 0.5.22 → 0.5.23
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 +2 -0
- package/dist/components/CopyableHeader.svelte +260 -448
- package/dist/components/CopyableHeader.svelte.d.ts +8 -5
- package/dist/components/EmptyState.svelte +100 -128
- package/dist/components/EmptyState.svelte.d.ts +16 -19
- package/dist/components/GenerateLoader.svelte +17 -10
- package/dist/components/PasswordInput.svelte +41 -44
- package/dist/components/PasswordInput.svelte.d.ts +2 -0
- package/dist/components/ThumbHashImage.svelte +117 -119
- package/dist/components/WScrollArea.svelte +47 -41
- package/dist/components/chat/ActivityRow.svelte +115 -0
- package/dist/components/chat/ActivityRow.svelte.d.ts +18 -0
- package/dist/components/chat/ChatHeader.svelte +114 -0
- package/dist/components/chat/ChatHeader.svelte.d.ts +26 -0
- package/dist/components/chat/Composer.svelte +172 -0
- package/dist/components/chat/Composer.svelte.d.ts +27 -0
- package/dist/components/chat/Message.svelte +158 -0
- package/dist/components/chat/Message.svelte.d.ts +28 -0
- package/dist/components/chat/OptionRow.svelte +59 -0
- package/dist/components/chat/OptionRow.svelte.d.ts +14 -0
- package/dist/components/chat/PlanCard.svelte +220 -0
- package/dist/components/chat/PlanCard.svelte.d.ts +34 -0
- package/dist/components/chat/QuestionCard.svelte +265 -0
- package/dist/components/chat/QuestionCard.svelte.d.ts +38 -0
- package/dist/components/chat/ScrollToBottom.svelte +51 -0
- package/dist/components/chat/ScrollToBottom.svelte.d.ts +11 -0
- package/dist/components/chat/SuggestionCard.svelte +79 -0
- package/dist/components/chat/SuggestionCard.svelte.d.ts +20 -0
- package/dist/components/chat/TaskRow.svelte +59 -0
- package/dist/components/chat/TaskRow.svelte.d.ts +11 -0
- package/dist/components/chat/composerLogic.d.ts +16 -0
- package/dist/components/chat/composerLogic.js +29 -0
- package/dist/components/chat/index.d.ts +16 -0
- package/dist/components/chat/index.js +16 -0
- package/dist/components/chat/questionCardLogic.d.ts +11 -0
- package/dist/components/chat/questionCardLogic.js +39 -0
- package/dist/components/index.d.ts +10 -1
- package/dist/components/index.js +10 -0
- package/dist/components/modals/ActionModal.svelte +186 -180
- package/dist/components/modals/BaseModal.svelte +402 -399
- package/dist/components/modals/BaseModal.svelte.d.ts +1 -0
- package/dist/components/modals/NewItemDialog.svelte +200 -243
- package/dist/components/modals/Portal.svelte +107 -105
- package/dist/components/modals/README.md +16 -2
- package/dist/components/modals/RenameDialog.svelte +234 -292
- package/dist/components/navigation/Breadcrumbs.svelte +415 -377
- package/dist/components/navigation/Breadcrumbs.svelte.d.ts +3 -2
- package/dist/components/navigation/types.d.ts +2 -0
- package/dist/components/pdf/PDFViewer.svelte +1 -1
- package/dist/components/search-input/SearchInput.svelte +51 -104
- package/dist/components/search-input/SearchInput.svelte.d.ts +9 -27
- package/dist/components/shad-editor/editor.css +1 -1
- package/dist/components/shad-editor/i18n/messages.d.ts +1 -1
- package/dist/components/shad-editor/i18n/messages.js +1 -1
- package/dist/components/shell/AppShell.svelte +52 -0
- package/dist/components/shell/AppShell.svelte.d.ts +13 -0
- package/dist/components/shell/Banner.svelte +90 -0
- package/dist/components/shell/Banner.svelte.d.ts +61 -0
- package/dist/components/shell/ErrorState.svelte +60 -0
- package/dist/components/shell/ErrorState.svelte.d.ts +13 -0
- package/dist/components/shell/Link.svelte +63 -0
- package/dist/components/shell/Link.svelte.d.ts +53 -0
- package/dist/components/shell/NavDrawer.svelte +117 -0
- package/dist/components/shell/NavDrawer.svelte.d.ts +10 -0
- package/dist/components/shell/NavRow.svelte +128 -0
- package/dist/components/shell/NavRow.svelte.d.ts +65 -0
- package/dist/components/shell/NavSectionLabel.svelte +27 -0
- package/dist/components/shell/NavSectionLabel.svelte.d.ts +9 -0
- package/dist/components/shell/NotificationRow.svelte +76 -0
- package/dist/components/shell/NotificationRow.svelte.d.ts +16 -0
- package/dist/components/shell/PageHeader.svelte +42 -0
- package/dist/components/shell/PageHeader.svelte.d.ts +12 -0
- package/dist/components/shell/ProfileRow.svelte +95 -0
- package/dist/components/shell/ProfileRow.svelte.d.ts +54 -0
- package/dist/components/shell/SettingsDialog.svelte +118 -0
- package/dist/components/shell/SettingsDialog.svelte.d.ts +19 -0
- package/dist/components/shell/SettingsNav.svelte +46 -0
- package/dist/components/shell/SettingsNav.svelte.d.ts +11 -0
- package/dist/components/shell/Sidebar.svelte +82 -0
- package/dist/components/shell/Sidebar.svelte.d.ts +25 -0
- package/dist/components/shell/Stat.svelte +63 -0
- package/dist/components/shell/Stat.svelte.d.ts +58 -0
- package/dist/components/shell/TopBar.svelte +37 -0
- package/dist/components/shell/TopBar.svelte.d.ts +11 -0
- package/dist/components/shell/WidgetRow.svelte +126 -0
- package/dist/components/shell/WidgetRow.svelte.d.ts +78 -0
- package/dist/components/shell/error-state-messages.d.ts +7 -0
- package/dist/components/shell/error-state-messages.js +9 -0
- package/dist/components/shell/index.d.ts +22 -0
- package/dist/components/shell/index.js +25 -0
- package/dist/components/shell/link-external.d.ts +2 -0
- package/dist/components/shell/link-external.js +7 -0
- package/dist/components/shell/messages.d.ts +7 -0
- package/dist/components/shell/messages.js +5 -0
- package/dist/components/shell/settings-nav-types.d.ts +12 -0
- package/dist/components/shell/settings-nav-types.js +3 -0
- package/dist/components/shell/shell-utils.d.ts +7 -0
- package/dist/components/shell/shell-utils.js +27 -0
- package/dist/components/shell/stat-tone.d.ts +3 -0
- package/dist/components/shell/stat-tone.js +11 -0
- package/dist/components/toast/ToasterModal.svelte +102 -168
- package/dist/components/toast/ToasterModal.svelte.d.ts +2 -12
- package/dist/components/ui/accordion/accordion-content.svelte +3 -2
- package/dist/components/ui/accordion/accordion-item.svelte +10 -1
- package/dist/components/ui/accordion/accordion-trigger.svelte +4 -3
- package/dist/components/ui/alert/alert-description.svelte +5 -1
- package/dist/components/ui/alert/alert-title.svelte +2 -1
- package/dist/components/ui/alert/index.d.ts +13 -11
- package/dist/components/ui/alert/index.js +4 -4
- package/dist/components/ui/avatar/avatar-utils.d.ts +2 -0
- package/dist/components/ui/avatar/avatar-utils.js +9 -0
- package/dist/components/ui/avatar/avatar.svelte +63 -0
- package/dist/components/ui/avatar/avatar.svelte.d.ts +80 -0
- package/dist/components/ui/avatar/index.d.ts +4 -0
- package/dist/components/ui/avatar/index.js +4 -0
- package/dist/components/ui/badge/badge.svelte +22 -10
- package/dist/components/ui/badge/badge.svelte.d.ts +14 -15
- package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +2 -2
- package/dist/components/ui/breadcrumb/breadcrumb-link.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-page.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte +2 -2
- package/dist/components/ui/button/button-padding.d.ts +9 -0
- package/dist/components/ui/button/button-padding.js +15 -0
- package/dist/components/ui/button/button.svelte +81 -31
- package/dist/components/ui/button/button.svelte.d.ts +48 -29
- package/dist/components/ui/calendar/calendar-cell.svelte +1 -1
- package/dist/components/ui/calendar/calendar-head-cell.svelte +1 -1
- package/dist/components/ui/calendar/calendar-next-button.svelte +2 -2
- package/dist/components/ui/calendar/calendar-prev-button.svelte +2 -2
- package/dist/components/ui/card/card-description.svelte +1 -1
- package/dist/components/ui/card/card-title.svelte +1 -1
- package/dist/components/ui/card/card.svelte +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +9 -5
- package/dist/components/ui/chip/chip.svelte +48 -0
- package/dist/components/ui/chip/chip.svelte.d.ts +13 -0
- package/dist/components/ui/chip/index.d.ts +2 -0
- package/dist/components/ui/chip/index.js +2 -0
- package/dist/components/ui/command/command-dialog.svelte +1 -1
- package/dist/components/ui/command/command-input.svelte +4 -4
- package/dist/components/ui/command/command-item.svelte +1 -1
- package/dist/components/ui/command/command.svelte +1 -1
- package/dist/components/ui/dialog/dialog-content.svelte +4 -4
- package/dist/components/ui/dialog/dialog-description.svelte +1 -1
- package/dist/components/ui/dialog/dialog-overlay.svelte +1 -1
- package/dist/components/ui/dialog/dialog-title.svelte +1 -1
- package/dist/components/ui/drawer/drawer-content.svelte +1 -1
- package/dist/components/ui/drawer/drawer-overlay.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +5 -5
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +20 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +5 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +3 -3
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +2 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +3 -3
- package/dist/components/ui/field/field-ids.d.ts +7 -0
- package/dist/components/ui/field/field-ids.js +15 -0
- package/dist/components/ui/field/field.svelte +62 -0
- package/dist/components/ui/field/field.svelte.d.ts +21 -0
- package/dist/components/ui/field/index.d.ts +3 -0
- package/dist/components/ui/field/index.js +3 -0
- package/dist/components/ui/hover-card/hover-card-content.svelte +1 -1
- package/dist/components/ui/icon-button/icon-button.svelte +72 -0
- package/dist/components/ui/icon-button/icon-button.svelte.d.ts +90 -0
- package/dist/components/ui/icon-button/index.d.ts +2 -0
- package/dist/components/ui/icon-button/index.js +4 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/input/input.svelte +11 -4
- package/dist/components/ui/input/input.svelte.d.ts +4 -1
- package/dist/components/ui/input-otp/input-otp-separator.svelte +2 -2
- package/dist/components/ui/input-otp/input-otp-slot.svelte +5 -4
- package/dist/components/ui/input-otp/input-otp-slot.svelte.d.ts +1 -1
- package/dist/components/ui/input-otp/input-otp.svelte +1 -1
- package/dist/components/ui/label/label.svelte +3 -2
- package/dist/components/ui/popover/popover-content.svelte +1 -1
- package/dist/components/ui/progress/progress.svelte +19 -5
- package/dist/components/ui/progress/progress.svelte.d.ts +4 -2
- package/dist/components/ui/radio-group/radio-group-item.svelte +4 -4
- package/dist/components/ui/range-calendar/range-calendar-head-cell.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte +2 -2
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte +2 -2
- package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +4 -1
- package/dist/components/ui/scroll-area/scroll-area.svelte +1 -1
- package/dist/components/ui/select/select-content.svelte +1 -3
- package/dist/components/ui/select/select-item.svelte +5 -4
- package/dist/components/ui/select/select-scroll-down-button.svelte +2 -2
- package/dist/components/ui/select/select-scroll-up-button.svelte +2 -2
- package/dist/components/ui/select/select-trigger.svelte +4 -3
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.js +2 -0
- package/dist/components/ui/skeleton/skeleton.svelte +24 -0
- package/dist/components/ui/skeleton/skeleton.svelte.d.ts +8 -0
- package/dist/components/ui/slider/slider.svelte +5 -10
- package/dist/components/ui/sonner/sonner.svelte +19 -13
- package/dist/components/ui/stepper-button/index.d.ts +3 -0
- package/dist/components/ui/stepper-button/index.js +2 -0
- package/dist/components/ui/stepper-button/stepper-button.svelte +37 -0
- package/dist/components/ui/stepper-button/stepper-button.svelte.d.ts +9 -0
- package/dist/components/ui/switch/switch.svelte +8 -3
- package/dist/components/ui/table/table-cell.svelte +1 -1
- package/dist/components/ui/table/table-head.svelte +1 -1
- package/dist/components/ui/table/table-row.svelte +1 -1
- package/dist/components/ui/tabs/tabs-list.svelte +1 -1
- package/dist/components/ui/tabs/tabs-trigger.svelte +1 -1
- package/dist/components/ui/tag/index.d.ts +2 -0
- package/dist/components/ui/tag/index.js +2 -0
- package/dist/components/ui/tag/tag.svelte +42 -0
- package/dist/components/ui/tag/tag.svelte.d.ts +11 -0
- package/dist/components/ui/textarea/textarea.svelte +4 -3
- package/dist/components/ui/textarea/textarea.svelte.d.ts +2 -2
- package/dist/components/ui/toggle/toggle.svelte +9 -9
- package/dist/components/ui/toggle/toggle.svelte.d.ts +14 -21
- package/dist/components/ui/tooltip/tooltip-content.svelte +1 -1
- package/dist/fonts/Inter/Inter-Black.woff2 +0 -0
- package/dist/fonts/Inter/Inter-BlackItalic.woff2 +0 -0
- package/dist/fonts/Inter/Inter-Bold.woff2 +0 -0
- package/dist/fonts/Inter/Inter-BoldItalic.woff2 +0 -0
- package/dist/fonts/Inter/Inter-ExtraBold.woff2 +0 -0
- package/dist/fonts/Inter/Inter-ExtraBoldItalic.woff2 +0 -0
- package/dist/fonts/Inter/Inter-ExtraLight-BETA.woff2 +0 -0
- package/dist/fonts/Inter/Inter-ExtraLightItalic-BETA.woff2 +0 -0
- package/dist/fonts/Inter/Inter-Italic.woff2 +0 -0
- package/dist/fonts/Inter/Inter-Light-BETA.woff2 +0 -0
- package/dist/fonts/Inter/Inter-LightItalic-BETA.woff2 +0 -0
- package/dist/fonts/Inter/Inter-Medium.woff2 +0 -0
- package/dist/fonts/Inter/Inter-MediumItalic.woff2 +0 -0
- package/dist/fonts/Inter/Inter-Regular.woff2 +0 -0
- package/dist/fonts/Inter/Inter-SemiBold.woff2 +0 -0
- package/dist/fonts/Inter/Inter-SemiBoldItalic.woff2 +0 -0
- package/dist/fonts/Inter/Inter-Thin-BETA.woff2 +0 -0
- package/dist/fonts/Inter/Inter-ThinItalic-BETA.woff2 +0 -0
- package/dist/fonts/Inter/Inter-italic.var.woff2 +0 -0
- package/dist/fonts/Inter/Inter-upright.var.woff2 +0 -0
- package/dist/fonts/Inter/Inter.var.woff2 +0 -0
- package/dist/fonts/JetBrainsMono/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/i18n/audit/designSystemWords.d.ts +1 -1
- package/dist/i18n/audit/designSystemWords.js +1 -1
- package/dist/styles/fonts.css +18 -14
- package/dist/styles/global.css +7 -19
- package/dist/styles/tokens.css +332 -0
- package/dist/utils.d.ts +27 -0
- package/dist/utils.js +33 -2
- package/package.json +2 -1
- package/tailwind.config.ts +7 -47
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
bind:ref
|
|
23
23
|
dir={$textDirection}
|
|
24
24
|
class={cn(
|
|
25
|
-
"bg-popover text-popover-foreground z-50 min-w-[8rem] rounded-
|
|
25
|
+
"bg-popover text-popover-foreground border-border z-50 min-w-[8rem] rounded-xl border p-1 focus:outline-hidden",
|
|
26
26
|
className
|
|
27
27
|
)}
|
|
28
28
|
{...restProps}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
|
|
3
|
-
import
|
|
3
|
+
import IconChevronRight from "@tabler/icons-svelte/icons/chevron-right";
|
|
4
4
|
import { cn } from "../../../utils.js";
|
|
5
5
|
|
|
6
6
|
let {
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
<DropdownMenuPrimitive.SubTrigger
|
|
18
18
|
bind:ref
|
|
19
19
|
class={cn(
|
|
20
|
-
"data-highlighted:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-
|
|
20
|
+
"text-body data-highlighted:bg-accent data-[state=open]:bg-accent flex h-8 cursor-default select-none items-center gap-2 rounded-lg px-2 py-1.5 outline-hidden transition-colors duration-fast [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.333]",
|
|
21
21
|
inset && "ps-8",
|
|
22
22
|
className
|
|
23
23
|
)}
|
|
24
24
|
{...restProps}
|
|
25
25
|
>
|
|
26
26
|
{@render children?.()}
|
|
27
|
-
<
|
|
27
|
+
<IconChevronRight class="ms-auto stroke-[1.333] rtl:-scale-x-100" />
|
|
28
28
|
</DropdownMenuPrimitive.SubTrigger>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type FieldIds = {
|
|
2
|
+
controlId: string;
|
|
3
|
+
descriptionId: string;
|
|
4
|
+
errorId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function createFieldIds(baseId: string): FieldIds;
|
|
7
|
+
export declare function fieldDescribedBy(hasDescription: boolean, hasError: boolean, ids: FieldIds): string | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function createFieldIds(baseId) {
|
|
2
|
+
return {
|
|
3
|
+
controlId: `${baseId}-control`,
|
|
4
|
+
descriptionId: `${baseId}-description`,
|
|
5
|
+
errorId: `${baseId}-error`,
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export function fieldDescribedBy(hasDescription, hasError, ids) {
|
|
9
|
+
const parts = [];
|
|
10
|
+
if (hasDescription)
|
|
11
|
+
parts.push(ids.descriptionId);
|
|
12
|
+
if (hasError)
|
|
13
|
+
parts.push(ids.errorId);
|
|
14
|
+
return parts.length > 0 ? parts.join(" ") : undefined;
|
|
15
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!-- Figma: Field (component set 105:27, node 105:2). -->
|
|
2
|
+
<script lang="ts" module>
|
|
3
|
+
let fieldAutoId = 0;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import type { Snippet } from "svelte";
|
|
8
|
+
import { cn } from "../../../utils.js";
|
|
9
|
+
import { Label } from "../label/index.js";
|
|
10
|
+
import { createFieldIds, fieldDescribedBy } from "./field-ids.js";
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
class: className,
|
|
14
|
+
label,
|
|
15
|
+
description = undefined,
|
|
16
|
+
error = undefined,
|
|
17
|
+
required = false,
|
|
18
|
+
id: idProp = undefined,
|
|
19
|
+
control,
|
|
20
|
+
}: {
|
|
21
|
+
class?: string;
|
|
22
|
+
label: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
error?: string;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
id?: string;
|
|
27
|
+
control: Snippet<
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
id: string;
|
|
31
|
+
describedBy: string | undefined;
|
|
32
|
+
invalid: boolean;
|
|
33
|
+
"aria-describedby": string | undefined;
|
|
34
|
+
"aria-invalid": boolean;
|
|
35
|
+
},
|
|
36
|
+
]
|
|
37
|
+
>;
|
|
38
|
+
} = $props();
|
|
39
|
+
|
|
40
|
+
const resolvedId = idProp ?? `field-${++fieldAutoId}`;
|
|
41
|
+
const ids = createFieldIds(resolvedId);
|
|
42
|
+
const invalid = $derived(Boolean(error));
|
|
43
|
+
const describedBy = $derived(fieldDescribedBy(Boolean(description), invalid, ids));
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<div class={cn("flex w-full flex-col gap-1.5", className)}>
|
|
47
|
+
<Label for={ids.controlId} class="text-body-medium">
|
|
48
|
+
{label}{#if required}<span class="text-destructive" aria-hidden="true"> *</span>{/if}
|
|
49
|
+
</Label>
|
|
50
|
+
{@render control({
|
|
51
|
+
id: ids.controlId,
|
|
52
|
+
describedBy,
|
|
53
|
+
invalid,
|
|
54
|
+
"aria-describedby": describedBy,
|
|
55
|
+
"aria-invalid": invalid,
|
|
56
|
+
})}
|
|
57
|
+
{#if error}
|
|
58
|
+
<p id={ids.errorId} class="text-caption text-destructive" role="alert">{error}</p>
|
|
59
|
+
{:else if description}
|
|
60
|
+
<p id={ids.descriptionId} class="text-caption text-muted-foreground">{description}</p>
|
|
61
|
+
{/if}
|
|
62
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
class?: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
id?: string;
|
|
9
|
+
control: Snippet<[
|
|
10
|
+
{
|
|
11
|
+
id: string;
|
|
12
|
+
describedBy: string | undefined;
|
|
13
|
+
invalid: boolean;
|
|
14
|
+
"aria-describedby": string | undefined;
|
|
15
|
+
"aria-invalid": boolean;
|
|
16
|
+
}
|
|
17
|
+
]>;
|
|
18
|
+
};
|
|
19
|
+
declare const Field: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
20
|
+
type Field = ReturnType<typeof Field>;
|
|
21
|
+
export default Field;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{sideOffset}
|
|
27
27
|
dir={$textDirection}
|
|
28
28
|
class={cn(
|
|
29
|
-
"bg-popover text-popover-foreground z-50 mt-3 w-64 rounded-
|
|
29
|
+
"bg-popover text-popover-foreground border-border z-50 mt-3 w-64 rounded-xl border p-4 outline-hidden",
|
|
30
30
|
className
|
|
31
31
|
)}
|
|
32
32
|
{...restProps}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Figma: Icon Button (component set 37:3, page Icon Button)
|
|
3
|
+
With bits-ui triggers, use `{#snippet child({ props })}` and spread `props` onto this button.
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts" module>
|
|
6
|
+
import type { WithElementRef } from "bits-ui";
|
|
7
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
8
|
+
import type { VariantProps } from "tailwind-variants";
|
|
9
|
+
|
|
10
|
+
export const iconButtonVariants = tv({
|
|
11
|
+
base: "inline-flex shrink-0 items-center justify-center transition-colors duration-fast press-feedback focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.333]",
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
ghost:
|
|
15
|
+
"rounded-lg text-foreground hover:bg-accent hover:text-foreground",
|
|
16
|
+
secondary:
|
|
17
|
+
"rounded-lg bg-secondary text-secondary-foreground hover:bg-accent hover:text-foreground",
|
|
18
|
+
outline:
|
|
19
|
+
"rounded-lg border border-input bg-background text-foreground hover:bg-accent hover:text-foreground",
|
|
20
|
+
primary:
|
|
21
|
+
"rounded-full bg-primary text-primary-foreground hover:bg-primary/90",
|
|
22
|
+
accent:
|
|
23
|
+
"rounded-full bg-brand text-brand-foreground hover:bg-brand/90",
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
default: "size-8",
|
|
27
|
+
sm: "size-7",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "ghost",
|
|
32
|
+
size: "default",
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export type IconButtonVariant = VariantProps<typeof iconButtonVariants>["variant"];
|
|
37
|
+
export type IconButtonSize = VariantProps<typeof iconButtonVariants>["size"];
|
|
38
|
+
|
|
39
|
+
export type IconButtonProps = WithElementRef<HTMLButtonAttributes> & {
|
|
40
|
+
ref?: HTMLButtonElement | null;
|
|
41
|
+
class?: string;
|
|
42
|
+
variant?: IconButtonVariant;
|
|
43
|
+
size?: IconButtonSize;
|
|
44
|
+
/** Required for accessibility (aria-label). */
|
|
45
|
+
label: string;
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<script lang="ts">
|
|
50
|
+
import { cn, tv } from "../../../utils.js";
|
|
51
|
+
|
|
52
|
+
let {
|
|
53
|
+
class: className,
|
|
54
|
+
variant = "ghost",
|
|
55
|
+
size = "default",
|
|
56
|
+
label,
|
|
57
|
+
ref = $bindable(null),
|
|
58
|
+
type = "button",
|
|
59
|
+
children,
|
|
60
|
+
...restProps
|
|
61
|
+
}: IconButtonProps = $props();
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<button
|
|
65
|
+
bind:this={ref}
|
|
66
|
+
type={type}
|
|
67
|
+
aria-label={label}
|
|
68
|
+
class={cn(iconButtonVariants({ variant, size, className }))}
|
|
69
|
+
{...restProps}
|
|
70
|
+
>
|
|
71
|
+
{@render children?.()}
|
|
72
|
+
</button>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
3
|
+
import type { VariantProps } from "tailwind-variants";
|
|
4
|
+
export declare const iconButtonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
ghost: string;
|
|
7
|
+
secondary: string;
|
|
8
|
+
outline: string;
|
|
9
|
+
primary: string;
|
|
10
|
+
accent: string;
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
default: string;
|
|
14
|
+
sm: string;
|
|
15
|
+
};
|
|
16
|
+
}, undefined, "inline-flex shrink-0 items-center justify-center transition-colors duration-fast press-feedback focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.333]", {
|
|
17
|
+
responsiveVariants?: boolean | (string | number | symbol)[] | {
|
|
18
|
+
size?: boolean | (string | number | symbol)[] | undefined;
|
|
19
|
+
variant?: boolean | (string | number | symbol)[] | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
} & import("tailwind-variants/dist/config.js").TWMConfig & {
|
|
22
|
+
twMergeConfig: {
|
|
23
|
+
classGroups: {
|
|
24
|
+
"font-size": {
|
|
25
|
+
text: ("display-hero" | "heading-page" | "heading-section" | "body" | "body-medium" | "body-large" | "caption" | "caption-medium" | "label" | "label-small" | "code")[];
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
variant: {
|
|
31
|
+
ghost: string;
|
|
32
|
+
secondary: string;
|
|
33
|
+
outline: string;
|
|
34
|
+
primary: string;
|
|
35
|
+
accent: string;
|
|
36
|
+
};
|
|
37
|
+
size: {
|
|
38
|
+
default: string;
|
|
39
|
+
sm: string;
|
|
40
|
+
};
|
|
41
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
42
|
+
variant: {
|
|
43
|
+
ghost: string;
|
|
44
|
+
secondary: string;
|
|
45
|
+
outline: string;
|
|
46
|
+
primary: string;
|
|
47
|
+
accent: string;
|
|
48
|
+
};
|
|
49
|
+
size: {
|
|
50
|
+
default: string;
|
|
51
|
+
sm: string;
|
|
52
|
+
};
|
|
53
|
+
}, undefined, "inline-flex shrink-0 items-center justify-center transition-colors duration-fast press-feedback focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.333]", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
54
|
+
variant: {
|
|
55
|
+
ghost: string;
|
|
56
|
+
secondary: string;
|
|
57
|
+
outline: string;
|
|
58
|
+
primary: string;
|
|
59
|
+
accent: string;
|
|
60
|
+
};
|
|
61
|
+
size: {
|
|
62
|
+
default: string;
|
|
63
|
+
sm: string;
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
variant: {
|
|
67
|
+
ghost: string;
|
|
68
|
+
secondary: string;
|
|
69
|
+
outline: string;
|
|
70
|
+
primary: string;
|
|
71
|
+
accent: string;
|
|
72
|
+
};
|
|
73
|
+
size: {
|
|
74
|
+
default: string;
|
|
75
|
+
sm: string;
|
|
76
|
+
};
|
|
77
|
+
}>, unknown, unknown, undefined>>;
|
|
78
|
+
export type IconButtonVariant = VariantProps<typeof iconButtonVariants>["variant"];
|
|
79
|
+
export type IconButtonSize = VariantProps<typeof iconButtonVariants>["size"];
|
|
80
|
+
export type IconButtonProps = WithElementRef<HTMLButtonAttributes> & {
|
|
81
|
+
ref?: HTMLButtonElement | null;
|
|
82
|
+
class?: string;
|
|
83
|
+
variant?: IconButtonVariant;
|
|
84
|
+
size?: IconButtonSize;
|
|
85
|
+
/** Required for accessibility (aria-label). */
|
|
86
|
+
label: string;
|
|
87
|
+
};
|
|
88
|
+
declare const IconButton: import("svelte").Component<IconButtonProps, {}, "ref">;
|
|
89
|
+
type IconButton = ReturnType<typeof IconButton>;
|
|
90
|
+
export default IconButton;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
+
<!-- Figma: Input (component set 43:3, node 43:2). -->
|
|
1
2
|
<script lang="ts" module>
|
|
3
|
+
import type { HTMLInputAttributes } from "svelte/elements";
|
|
4
|
+
import type { WithElementRef } from "bits-ui";
|
|
5
|
+
|
|
6
|
+
export type InputVariant = "outline" | "soft";
|
|
2
7
|
|
|
3
|
-
export type InputProps = WithElementRef<HTMLInputAttributes
|
|
8
|
+
export type InputProps = WithElementRef<HTMLInputAttributes> & {
|
|
9
|
+
variant?: InputVariant;
|
|
10
|
+
};
|
|
4
11
|
</script>
|
|
5
12
|
|
|
6
13
|
<script lang="ts">
|
|
7
|
-
import type { HTMLInputAttributes } from "svelte/elements";
|
|
8
|
-
import type { WithElementRef } from "bits-ui";
|
|
9
14
|
import { cn } from "../../../utils.js";
|
|
10
15
|
|
|
11
16
|
let {
|
|
12
17
|
ref = $bindable(null),
|
|
13
18
|
value = $bindable(),
|
|
14
19
|
class: className,
|
|
20
|
+
variant = "outline",
|
|
15
21
|
...restProps
|
|
16
22
|
}: InputProps = $props();
|
|
17
23
|
</script>
|
|
@@ -19,7 +25,8 @@
|
|
|
19
25
|
<input
|
|
20
26
|
bind:this={ref}
|
|
21
27
|
class={cn(
|
|
22
|
-
"
|
|
28
|
+
"flex h-9 w-full min-w-0 rounded-lg border border-input bg-background px-3 py-2 text-body text-foreground transition-colors duration-fast file:border-0 file:bg-transparent file:text-body file:font-medium placeholder:text-muted-foreground hover:bg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive",
|
|
29
|
+
variant === "soft" && "border-transparent bg-accent hover:bg-accent-hover",
|
|
23
30
|
className
|
|
24
31
|
)}
|
|
25
32
|
bind:value
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export type InputProps = WithElementRef<HTMLInputAttributes>;
|
|
2
1
|
import type { HTMLInputAttributes } from "svelte/elements";
|
|
3
2
|
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
export type InputVariant = "outline" | "soft";
|
|
4
|
+
export type InputProps = WithElementRef<HTMLInputAttributes> & {
|
|
5
|
+
variant?: InputVariant;
|
|
6
|
+
};
|
|
4
7
|
declare const Input: import("svelte").Component<InputProps, {}, "ref" | "value">;
|
|
5
8
|
type Input = ReturnType<typeof Input>;
|
|
6
9
|
export default Input;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<script lang="ts">
|
|
7
7
|
import type { HTMLAttributes } from "svelte/elements";
|
|
8
8
|
import type { WithElementRef } from "bits-ui";
|
|
9
|
-
import
|
|
9
|
+
import IconMinus from "@tabler/icons-svelte/icons/minus";
|
|
10
10
|
|
|
11
11
|
let {
|
|
12
12
|
ref = $bindable(null),
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
{#if children}
|
|
20
20
|
{@render children?.()}
|
|
21
21
|
{:else}
|
|
22
|
-
<
|
|
22
|
+
<IconMinus class="size-4 stroke-[1.333] text-muted-foreground" aria-hidden="true" />
|
|
23
23
|
{/if}
|
|
24
24
|
</div>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<script lang="ts">
|
|
7
|
-
|
|
7
|
+
import type { ComponentProps } from "svelte";
|
|
8
8
|
import { cn } from "../../../utils.js";
|
|
9
9
|
|
|
10
10
|
let {
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
{cell}
|
|
20
20
|
bind:ref
|
|
21
21
|
class={cn(
|
|
22
|
-
"
|
|
23
|
-
cell.isActive &&
|
|
22
|
+
"relative flex h-9 w-9 items-center justify-center rounded-lg border border-input bg-background text-body transition-colors duration-fast first:rounded-s-lg last:rounded-e-lg",
|
|
23
|
+
cell.isActive &&
|
|
24
|
+
"z-10 ring-2 ring-ring ring-offset-2 ring-offset-background outline-hidden",
|
|
24
25
|
className
|
|
25
26
|
)}
|
|
26
27
|
{...restProps}
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
{cell.char}
|
|
29
30
|
{#if cell.hasFakeCaret}
|
|
30
31
|
<div class="pointer-events-none absolute inset-0 flex items-center justify-center">
|
|
31
|
-
<div class="animate-caret-blink
|
|
32
|
+
<div class="animate-caret-blink h-4 w-px bg-foreground duration-1000"></div>
|
|
32
33
|
</div>
|
|
33
34
|
{/if}
|
|
34
35
|
</InputOTPPrimitive.Cell>
|
|
@@ -3,7 +3,7 @@ export type InputOtpSlotProps = ComponentProps<typeof InputOTPPrimitive.Cell>;
|
|
|
3
3
|
import type { ComponentProps } from "svelte";
|
|
4
4
|
declare const InputOtpSlot: import("svelte").Component<Omit<{
|
|
5
5
|
cell: import("bits-ui").PinInputCell;
|
|
6
|
-
}, "
|
|
6
|
+
}, "child" | "children"> & {
|
|
7
7
|
child?: import("svelte").Snippet<[{
|
|
8
8
|
props: Record<string, unknown>;
|
|
9
9
|
}]> | undefined;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
<!-- Figma: Field label (Field 105:27 uses Label/Default). -->
|
|
1
2
|
<script lang="ts" module>
|
|
2
3
|
import { Label as LabelPrimitive } from "bits-ui";
|
|
3
4
|
export type LabelProps = LabelPrimitive.RootProps;
|
|
4
5
|
</script>
|
|
5
6
|
|
|
6
7
|
<script lang="ts">
|
|
7
|
-
|
|
8
|
+
import { cn } from "../../../utils.js";
|
|
8
9
|
|
|
9
10
|
let {
|
|
10
11
|
ref = $bindable(null),
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
<LabelPrimitive.Root
|
|
17
18
|
bind:ref
|
|
18
19
|
class={cn(
|
|
19
|
-
"text-
|
|
20
|
+
"text-label text-foreground peer-disabled:pointer-events-none peer-disabled:opacity-50",
|
|
20
21
|
className
|
|
21
22
|
)}
|
|
22
23
|
{...restProps}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{align}
|
|
27
27
|
dir={$textDirection}
|
|
28
28
|
class={cn(
|
|
29
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[
|
|
29
|
+
"bg-popover text-popover-foreground border-border data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-xl border p-4 outline-hidden",
|
|
30
30
|
className
|
|
31
31
|
)}
|
|
32
32
|
{...restProps}
|
|
@@ -1,29 +1,43 @@
|
|
|
1
|
+
<!-- Figma: Progress Bar (component set 270:695, node 270:695). -->
|
|
1
2
|
<script lang="ts" module>
|
|
2
3
|
import { Progress as ProgressPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
3
|
-
export type ProgressProps = WithoutChildrenOrChild<ProgressPrimitive.RootProps
|
|
4
|
+
export type ProgressProps = WithoutChildrenOrChild<ProgressPrimitive.RootProps> & {
|
|
5
|
+
tone?: "default" | "destructive";
|
|
6
|
+
};
|
|
4
7
|
</script>
|
|
5
8
|
|
|
6
9
|
<script lang="ts">
|
|
7
|
-
|
|
10
|
+
import { cn } from "../../../utils.js";
|
|
8
11
|
|
|
9
12
|
let {
|
|
10
13
|
ref = $bindable(null),
|
|
11
14
|
class: className,
|
|
12
15
|
max = 100,
|
|
13
16
|
value,
|
|
17
|
+
tone = "default",
|
|
14
18
|
...restProps
|
|
15
19
|
}: ProgressProps = $props();
|
|
20
|
+
|
|
21
|
+
const percent = $derived.by(() => {
|
|
22
|
+
const maxValue = max ?? 100;
|
|
23
|
+
if (maxValue <= 0) return 0;
|
|
24
|
+
const raw = ((value ?? 0) / maxValue) * 100;
|
|
25
|
+
return Math.min(100, Math.max(0, raw));
|
|
26
|
+
});
|
|
16
27
|
</script>
|
|
17
28
|
|
|
18
29
|
<ProgressPrimitive.Root
|
|
19
30
|
bind:ref
|
|
20
|
-
class={cn("
|
|
31
|
+
class={cn("relative h-1 w-full overflow-hidden rounded-full bg-muted", className)}
|
|
21
32
|
{value}
|
|
22
33
|
{max}
|
|
23
34
|
{...restProps}
|
|
24
35
|
>
|
|
25
36
|
<div
|
|
26
|
-
class=
|
|
27
|
-
|
|
37
|
+
class={cn(
|
|
38
|
+
"absolute inset-y-0 start-0 transition-[width] duration-base ease-standard motion-reduce:transition-none",
|
|
39
|
+
tone === "destructive" ? "bg-destructive" : "bg-primary"
|
|
40
|
+
)}
|
|
41
|
+
style={`width: ${percent}%`}
|
|
28
42
|
></div>
|
|
29
43
|
</ProgressPrimitive.Root>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Progress as ProgressPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
2
|
-
export type ProgressProps = WithoutChildrenOrChild<ProgressPrimitive.RootProps
|
|
3
|
-
|
|
2
|
+
export type ProgressProps = WithoutChildrenOrChild<ProgressPrimitive.RootProps> & {
|
|
3
|
+
tone?: "default" | "destructive";
|
|
4
|
+
};
|
|
5
|
+
declare const Progress: import("svelte").Component<ProgressProps, {}, "ref">;
|
|
4
6
|
type Progress = ReturnType<typeof Progress>;
|
|
5
7
|
export default Progress;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
<!-- Figma: Radio (component set 170:96, node 170:96). -->
|
|
1
2
|
<script lang="ts" module>
|
|
2
3
|
import { RadioGroup as RadioGroupPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
3
4
|
export type RadioGroupItemProps = WithoutChildrenOrChild<RadioGroupPrimitive.ItemProps>;
|
|
4
5
|
</script>
|
|
5
6
|
|
|
6
7
|
<script lang="ts">
|
|
7
|
-
import Circle from "lucide-svelte/icons/circle";
|
|
8
8
|
import { cn } from "../../../utils.js";
|
|
9
9
|
|
|
10
10
|
let {
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
<RadioGroupPrimitive.Item
|
|
18
18
|
bind:ref
|
|
19
19
|
class={cn(
|
|
20
|
-
"
|
|
20
|
+
"aspect-square size-4 shrink-0 rounded-full border border-input bg-background text-primary transition-colors duration-fast hover:bg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 data-[state=checked]:border-primary",
|
|
21
21
|
className
|
|
22
22
|
)}
|
|
23
23
|
{...restProps}
|
|
24
24
|
>
|
|
25
25
|
{#snippet children({ checked })}
|
|
26
|
-
<div class="flex items-center justify-center">
|
|
26
|
+
<div class="flex size-full items-center justify-center">
|
|
27
27
|
{#if checked}
|
|
28
|
-
<
|
|
28
|
+
<div class="size-2 rounded-full bg-primary" aria-hidden="true"></div>
|
|
29
29
|
{/if}
|
|
30
30
|
</div>
|
|
31
31
|
{/snippet}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
|
|
14
|
+
import IconChevronRight from "@tabler/icons-svelte/icons/chevron-right";
|
|
15
15
|
import { buttonVariants } from "../button/index.js";
|
|
16
16
|
import { cn } from "../../../utils.js";
|
|
17
17
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
{#snippet Fallback()}
|
|
28
|
-
<
|
|
28
|
+
<IconChevronRight class="size-4 stroke-[1.333] rtl:-scale-x-100" />
|
|
29
29
|
{/snippet}
|
|
30
30
|
|
|
31
31
|
<RangeCalendarPrimitive.NextButton
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
|
|
14
|
+
import IconChevronLeft from "@tabler/icons-svelte/icons/chevron-left";
|
|
15
15
|
import { buttonVariants } from "../button/index.js";
|
|
16
16
|
import { cn } from "../../../utils.js";
|
|
17
17
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
{#snippet Fallback()}
|
|
28
|
-
<
|
|
28
|
+
<IconChevronLeft class="size-4 stroke-[1.333] rtl:-scale-x-100" />
|
|
29
29
|
{/snippet}
|
|
30
30
|
|
|
31
31
|
<RangeCalendarPrimitive.PrevButton
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
>
|
|
29
29
|
{@render children?.()}
|
|
30
30
|
<ScrollAreaPrimitive.Thumb
|
|
31
|
-
class={cn(
|
|
31
|
+
class={cn(
|
|
32
|
+
"bg-muted-foreground/30 hover:bg-muted-foreground/50 relative rounded-full transition-colors duration-fast",
|
|
33
|
+
orientation === "vertical" && "flex-1"
|
|
34
|
+
)}
|
|
32
35
|
/>
|
|
33
36
|
</ScrollAreaPrimitive.Scrollbar>
|