tera-system-ui 0.1.64 → 0.1.66
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/COMPONENT_API.md +2 -539
- package/dist/components/accordion/Accordion.d.ts +24 -0
- package/dist/components/accordion/Accordion.js +4 -0
- package/dist/components/accordion/components/Accordion.svelte +2 -8
- package/dist/components/accordion/components/AccordionContent.svelte +5 -12
- package/dist/components/accordion/components/AccordionItem.svelte +3 -9
- package/dist/components/accordion/components/AccordionTrigger.svelte +5 -15
- package/dist/components/ai/ChatBubble.svelte +35 -0
- package/dist/components/ai/ChatBubble.svelte.d.ts +12 -0
- package/dist/components/ai/PromptInput.svelte +58 -0
- package/dist/components/ai/PromptInput.svelte.d.ts +13 -0
- package/dist/components/ai/StreamText.svelte +41 -0
- package/dist/components/ai/StreamText.svelte.d.ts +11 -0
- package/dist/components/ai/SuggestionChips.svelte +34 -0
- package/dist/components/ai/SuggestionChips.svelte.d.ts +10 -0
- package/dist/components/ai/ThinkingLoader.svelte +34 -0
- package/dist/components/ai/ThinkingLoader.svelte.d.ts +11 -0
- package/dist/components/ai/index.d.ts +5 -0
- package/dist/components/ai/index.js +5 -0
- package/dist/components/alert/Alert.svelte +47 -0
- package/dist/components/alert/Alert.svelte.d.ts +15 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/avatar/Avatar.svelte +9 -25
- package/dist/components/badge/Badge.d.ts +52 -0
- package/dist/components/badge/Badge.js +22 -0
- package/dist/components/badge/Badge.svelte +22 -0
- package/dist/components/badge/Badge.svelte.d.ts +4 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/brand-logo/BrandLogo.svelte +12 -10
- package/dist/components/button/Button.d.ts +2 -2
- package/dist/components/button/Button.js +12 -12
- package/dist/components/button/Button.svelte +7 -34
- package/dist/components/card/Card.d.ts +68 -0
- package/dist/components/card/Card.js +28 -0
- package/dist/components/card/Card.svelte +33 -0
- package/dist/components/card/Card.svelte.d.ts +4 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +25 -4
- package/dist/components/checkbox/Checkbox.js +4 -0
- package/dist/components/checkbox/Checkbox.svelte +13 -16
- package/dist/components/checkbox/Checkbox.svelte.d.ts +2 -2
- package/dist/components/combobox/Combobox.d.ts +45 -9
- package/dist/components/combobox/Combobox.js +5 -7
- package/dist/components/combobox/Combobox.svelte +226 -8
- package/dist/components/combobox/Combobox.svelte.d.ts +2 -2
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/command/components/command-empty.svelte +3 -8
- package/dist/components/command/components/command-group.svelte +3 -13
- package/dist/components/command/components/command-input.svelte +5 -13
- package/dist/components/command/components/command-item.svelte +3 -9
- package/dist/components/command/components/command-link-item.svelte +3 -8
- package/dist/components/command/components/command-list.svelte +3 -8
- package/dist/components/command/components/command-separator.svelte +3 -8
- package/dist/components/command/components/command-shortcut.svelte +2 -10
- package/dist/components/command/components/command.svelte +29 -42
- package/dist/components/date-range-picker/DateRangePicker.svelte +490 -0
- package/dist/components/date-range-picker/DateRangePicker.svelte.d.ts +4 -0
- package/dist/components/date-range-picker/DateRangePicker.types.d.ts +38 -0
- package/dist/components/date-range-picker/DateRangePicker.types.js +1 -0
- package/dist/components/date-range-picker/index.d.ts +2 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/dialog/Dialog.d.ts +43 -121
- package/dist/components/dialog/Dialog.js +1 -39
- package/dist/components/dialog/Dialog.svelte +103 -113
- package/dist/components/dialog/Dialog.svelte.d.ts +1 -2
- package/dist/components/dialog/dialog.scss +21 -24
- package/dist/components/drawer/Drawer.svelte +63 -0
- package/dist/components/drawer/Drawer.svelte.d.ts +16 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +51 -24
- package/dist/components/dropdown-menu/DropdownMenu.js +1 -15
- package/dist/components/dropdown-menu/components/DropdownMenu.svelte +36 -34
- package/dist/components/dropdown-menu/components/DropdownMenu.svelte.d.ts +1 -1
- package/dist/components/dropdown-menu/components/DropdownMenuGroup.svelte +8 -12
- package/dist/components/dropdown-menu/components/DropdownMenuGroup.svelte.d.ts +2 -4
- package/dist/components/dropdown-menu/components/DropdownMenuHeader.svelte +11 -12
- package/dist/components/dropdown-menu/components/DropdownMenuHeader.svelte.d.ts +2 -4
- package/dist/components/dropdown-menu/components/DropdownMenuItem.svelte +27 -30
- package/dist/components/dropdown-menu/components/DropdownMenuItem.svelte.d.ts +1 -1
- package/dist/components/dropdown-menu/components/DropdownMenuSeparator.svelte +9 -11
- package/dist/components/dropdown-menu/components/DropdownMenuSeparator.svelte.d.ts +2 -4
- package/dist/components/fonts/TeraFontMono.svelte +4 -4
- package/dist/components/fonts/TeraFontMono.svelte.d.ts +1 -0
- package/dist/components/fonts/TeraFontSansSerif.svelte +4 -4
- package/dist/components/fonts/TeraFontSansSerif.svelte.d.ts +1 -1
- package/dist/components/header/Header.svelte +6 -9
- package/dist/components/header/header.scss +1 -1
- package/dist/components/icons/IconArrowBigRightFilled.svelte +3 -7
- package/dist/components/icons/IconBook.svelte +3 -6
- package/dist/components/icons/IconBookmarkPlus.svelte +3 -6
- package/dist/components/icons/IconCalculator.svelte +3 -6
- package/dist/components/icons/IconCheck.svelte +3 -6
- package/dist/components/icons/IconChevronDown.svelte +3 -6
- package/dist/components/icons/IconCoin.svelte +3 -6
- package/dist/components/icons/IconCoinConvert.svelte +2 -5
- package/dist/components/icons/IconCopy.svelte +3 -6
- package/dist/components/icons/IconCopyCheckFilled.svelte +3 -6
- package/dist/components/icons/IconHamburger.svelte +3 -6
- package/dist/components/icons/IconLanguage.svelte +3 -6
- package/dist/components/icons/IconLoader2.svelte +3 -6
- package/dist/components/icons/IconLogout.svelte +3 -6
- package/dist/components/icons/IconMoon.svelte +3 -6
- package/dist/components/icons/IconPointFilled.svelte +3 -6
- package/dist/components/icons/IconSearch.svelte +3 -6
- package/dist/components/icons/IconSettings.svelte +3 -6
- package/dist/components/icons/IconSun.svelte +3 -6
- package/dist/components/icons/IconSwitchHorizontal.svelte +3 -6
- package/dist/components/icons/IconSwitchVertical.svelte +3 -6
- package/dist/components/icons/IconTransform.svelte +3 -6
- package/dist/components/icons/IconX.svelte +3 -6
- package/dist/components/input/Input.d.ts +2 -2
- package/dist/components/input/Input.js +10 -10
- package/dist/components/input/Input.svelte +10 -26
- package/dist/components/label/Label.d.ts +2 -2
- package/dist/components/label/Label.js +2 -2
- package/dist/components/label/Label.svelte +4 -12
- package/dist/components/language-picker-button/LanguagePickerButton.svelte +23 -42
- package/dist/components/light-dark-toggle/LightDarkToggle.svelte +21 -26
- package/dist/components/marketing/FeatureCard.svelte +37 -0
- package/dist/components/marketing/FeatureCard.svelte.d.ts +13 -0
- package/dist/components/marketing/PricingCard.svelte +48 -0
- package/dist/components/marketing/PricingCard.svelte.d.ts +15 -0
- package/dist/components/marketing/StatBlock.svelte +14 -0
- package/dist/components/marketing/StatBlock.svelte.d.ts +10 -0
- package/dist/components/marketing/TestimonialCard.svelte +24 -0
- package/dist/components/marketing/TestimonialCard.svelte.d.ts +12 -0
- package/dist/components/marketing/index.d.ts +4 -0
- package/dist/components/marketing/index.js +4 -0
- package/dist/components/popover/Popover.d.ts +32 -13
- package/dist/components/popover/Popover.js +1 -7
- package/dist/components/popover/Popover.svelte +40 -158
- package/dist/components/popover/Popover.svelte.d.ts +2 -2
- package/dist/components/popover-responsive/PopoverResponsive.d.ts +18 -7
- package/dist/components/popover-responsive/PopoverResponsive.js +1 -7
- package/dist/components/popover-responsive/PopoverResponsive.svelte +25 -87
- package/dist/components/popover-responsive/PopoverResponsive.svelte.d.ts +2 -11
- package/dist/components/select/Select.d.ts +60 -23
- package/dist/components/select/Select.js +14 -35
- package/dist/components/select/Select.svelte +157 -28
- package/dist/components/select/Select.svelte.d.ts +2 -3
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/side-navigation/SideNavigation.svelte +73 -96
- package/dist/components/side-navigation/SideNavigationItem.svelte +2 -2
- package/dist/components/side-navigation/SideNavigationLayout.svelte +3 -5
- package/dist/components/side-navigation/sidenav.scss +17 -13
- package/dist/components/skeleton/Skeleton.svelte +48 -0
- package/dist/components/skeleton/Skeleton.svelte.d.ts +12 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/slider/Slider.d.ts +25 -15
- package/dist/components/slider/Slider.js +1 -7
- package/dist/components/slider/Slider.svelte +38 -164
- package/dist/components/slider/Slider.svelte.d.ts +1 -1
- package/dist/components/spinner/Spinner.svelte +39 -0
- package/dist/components/spinner/Spinner.svelte.d.ts +10 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/star-rating/StarRating.svelte +33 -49
- package/dist/components/switch/Switch.d.ts +19 -4
- package/dist/components/switch/Switch.js +4 -0
- package/dist/components/switch/Switch.svelte +13 -17
- package/dist/components/switch/Switch.svelte.d.ts +2 -2
- package/dist/components/table/Table.svelte +68 -0
- package/dist/components/table/Table.svelte.d.ts +40 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/tabs/Tabs.svelte.d.ts +45 -16
- package/dist/components/tabs/Tabs.svelte.js +8 -18
- package/dist/components/tabs/components/Tabs.svelte +27 -33
- package/dist/components/tabs/components/Tabs.svelte.d.ts +1 -1
- package/dist/components/tabs/components/TabsContent.svelte +13 -36
- package/dist/components/tabs/components/TabsContent.svelte.d.ts +2 -5
- package/dist/components/tabs/components/TabsItem.svelte +43 -32
- package/dist/components/tabs/components/TabsItem.svelte.d.ts +2 -5
- package/dist/components/tabs/components/TabsList.svelte +90 -58
- package/dist/components/tabs/components/TabsList.svelte.d.ts +2 -4
- package/dist/components/tera-ui-context/TeraUiContext.svelte +13 -26
- package/dist/components/text-area/TextArea.d.ts +2 -2
- package/dist/components/text-area/TextArea.js +9 -9
- package/dist/components/text-area/TextArea.svelte +41 -65
- package/dist/components/toast/ToastContainer.svelte +50 -0
- package/dist/components/toast/ToastContainer.svelte.d.ts +18 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toast/toast.svelte.d.ts +22 -0
- package/dist/components/toast/toast.svelte.js +18 -0
- package/dist/components/tooltip/Tooltip.d.ts +23 -0
- package/dist/components/tooltip/Tooltip.js +1 -0
- package/dist/components/tooltip/Tooltip.svelte +30 -0
- package/dist/components/tooltip/Tooltip.svelte.d.ts +4 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.svelte +48 -69
- package/dist/index.d.ts +19 -2
- package/dist/index.js +12 -0
- package/dist/llms/accordion.md +90 -0
- package/dist/llms/ai.md +110 -0
- package/dist/llms/alert.md +29 -0
- package/dist/llms/avatar.md +34 -0
- package/dist/llms/badge.md +31 -0
- package/dist/llms/brand-logo.md +30 -0
- package/dist/llms/button.md +37 -0
- package/dist/llms/card.md +32 -0
- package/dist/llms/checkbox.md +35 -0
- package/dist/llms/colors.md +161 -0
- package/dist/llms/combobox.md +40 -0
- package/dist/llms/command.md +7 -0
- package/dist/llms/date-range-picker.md +36 -0
- package/dist/llms/dialog.md +45 -0
- package/dist/llms/drawer.md +30 -0
- package/dist/llms/dropdown-menu.md +112 -0
- package/dist/llms/fonts.md +7 -0
- package/dist/llms/header.md +26 -0
- package/dist/llms/icons.md +43 -0
- package/dist/llms/index.md +65 -0
- package/dist/llms/input.md +37 -0
- package/dist/llms/label.md +30 -0
- package/dist/llms/language-picker-button.md +30 -0
- package/dist/llms/light-dark-toggle.md +26 -0
- package/dist/llms/marketing.md +95 -0
- package/dist/llms/popover-responsive.md +32 -0
- package/dist/llms/popover.md +40 -0
- package/dist/llms/select.md +44 -0
- package/dist/llms/side-navigation.md +30 -0
- package/dist/llms/skeleton.md +28 -0
- package/dist/llms/slider.md +36 -0
- package/dist/llms/spinner.md +25 -0
- package/dist/llms/star-rating.md +31 -0
- package/dist/llms/switch.md +33 -0
- package/dist/llms/table.md +30 -0
- package/dist/llms/tabs.md +92 -0
- package/dist/llms/tera-ui-context.md +30 -0
- package/dist/llms/text-area.md +39 -0
- package/dist/llms/toast.md +7 -0
- package/dist/llms/tooltip.md +32 -0
- package/dist/llms/user-avatar-with-menu.md +28 -0
- package/dist/paraglide/README.md +72 -3
- package/dist/paraglide/messages/text_account_settings.d.ts +14 -2
- package/dist/paraglide/messages/text_account_settings.js +53 -58
- package/dist/paraglide/messages/text_calces_documentation.d.ts +14 -2
- package/dist/paraglide/messages/text_calces_documentation.js +53 -58
- package/dist/paraglide/messages/text_calces_scientific_calculator.d.ts +14 -2
- package/dist/paraglide/messages/text_calces_scientific_calculator.js +53 -58
- package/dist/paraglide/messages/text_currency_converter.d.ts +14 -2
- package/dist/paraglide/messages/text_currency_converter.js +53 -58
- package/dist/paraglide/messages/text_logout.d.ts +14 -2
- package/dist/paraglide/messages/text_logout.js +53 -58
- package/dist/paraglide/messages/text_select_language.d.ts +14 -2
- package/dist/paraglide/messages/text_select_language.js +53 -58
- package/dist/paraglide/messages/text_unit_converter.d.ts +14 -2
- package/dist/paraglide/messages/text_unit_converter.js +53 -58
- package/dist/paraglide/registry.d.ts +13 -0
- package/dist/paraglide/registry.js +15 -0
- package/dist/paraglide/runtime.d.ts +243 -126
- package/dist/paraglide/runtime.js +473 -148
- package/dist/paraglide/server.d.ts +13 -20
- package/dist/paraglide/server.js +92 -40
- package/dist/stories/ComponentOverview.stories.svelte +533 -0
- package/dist/stories/ComponentOverview.stories.svelte.d.ts +6 -0
- package/dist/themes/tera-ui-base.css +242 -77
- package/dist/themes/theme-ai.css +100 -0
- package/dist/themes/theme-marketing.css +91 -0
- package/dist/themes/theme-professional.css +41 -0
- package/package.json +35 -29
- package/dist/tera-i18n/projects/tera-system-ui/project.inlang/.meta.json +0 -3
- package/dist/tera-i18n/projects/tera-system-ui/project.inlang/README.md +0 -103
- package/dist/tera-i18n/projects/tera-system-ui/project.inlang/project_id +0 -1
- package/dist/themes/tw-preset.cjs +0 -160
- package/dist/themes/tw-preset.d.cts +0 -157
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
1
|
+
<script lang="ts">import { styles } from "./Icons";
|
|
2
|
+
import IconMoonStars from "@tabler/icons-svelte/icons/moon-stars";
|
|
3
|
+
let { children, ...props } = $props();
|
|
7
4
|
</script>
|
|
8
5
|
|
|
9
6
|
<IconMoonStars class={styles({...props})}/>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
1
|
+
<script lang="ts">import { styles } from "./Icons";
|
|
2
|
+
import IconPointFilled from "@tabler/icons-svelte/icons/point-filled";
|
|
3
|
+
let { children, ...props } = $props();
|
|
7
4
|
</script>
|
|
8
5
|
|
|
9
6
|
<IconPointFilled class={styles({...props})}/>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
1
|
+
<script lang="ts">import { styles } from "./Icons";
|
|
2
|
+
import IconSearch from "@tabler/icons-svelte/icons/search";
|
|
3
|
+
let { children, ...props } = $props();
|
|
7
4
|
</script>
|
|
8
5
|
|
|
9
6
|
<IconSearch class={styles({...props})}/>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
1
|
+
<script lang="ts">import { styles } from "./Icons";
|
|
2
|
+
import IconSettings from "@tabler/icons-svelte/icons/settings";
|
|
3
|
+
let { children, ...props } = $props();
|
|
7
4
|
</script>
|
|
8
5
|
|
|
9
6
|
<IconSettings class={styles({...props})}/>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
1
|
+
<script lang="ts">import { styles } from "./Icons";
|
|
2
|
+
import IconSunHigh from "@tabler/icons-svelte/icons/sun-high";
|
|
3
|
+
let { children, ...props } = $props();
|
|
7
4
|
</script>
|
|
8
5
|
|
|
9
6
|
<IconSunHigh class={styles({...props})}/>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
1
|
+
<script lang="ts">import { styles } from "./Icons";
|
|
2
|
+
import IconSwitchHorizontal from "@tabler/icons-svelte/icons/switch-horizontal";
|
|
3
|
+
let { children, ...props } = $props();
|
|
7
4
|
</script>
|
|
8
5
|
|
|
9
6
|
<IconSwitchHorizontal class={styles({...props})}/>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
1
|
+
<script lang="ts">import { styles } from "./Icons";
|
|
2
|
+
import IconSwitchVertical from "@tabler/icons-svelte/icons/switch-vertical";
|
|
3
|
+
let { children, ...props } = $props();
|
|
7
4
|
</script>
|
|
8
5
|
|
|
9
6
|
<IconSwitchVertical class={styles({...props})}/>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
1
|
+
<script lang="ts">import { styles } from "./Icons";
|
|
2
|
+
import IconTransform from "@tabler/icons-svelte/icons/transform";
|
|
3
|
+
let { children, ...props } = $props();
|
|
7
4
|
</script>
|
|
8
5
|
|
|
9
6
|
<IconTransform class={styles({...props})}/>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let {children, ...props}: IconsProps = $props();
|
|
6
|
-
|
|
1
|
+
<script lang="ts">import { styles } from "./Icons";
|
|
2
|
+
import IconX from "@tabler/icons-svelte/icons/x";
|
|
3
|
+
let { children, ...props } = $props();
|
|
7
4
|
</script>
|
|
8
5
|
|
|
9
6
|
<IconX class={styles({...props})}/>
|
|
@@ -20,7 +20,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
20
20
|
error: string;
|
|
21
21
|
warning: string;
|
|
22
22
|
};
|
|
23
|
-
}, undefined, "w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-
|
|
23
|
+
}, undefined, "w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-text-primary placeholder:text-text-tertiary transition-[border-color,box-shadow,background-color] ease-ui duration-150", {
|
|
24
24
|
variant: {
|
|
25
25
|
outlined: string;
|
|
26
26
|
filled: string;
|
|
@@ -58,7 +58,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
58
58
|
error: string;
|
|
59
59
|
warning: string;
|
|
60
60
|
};
|
|
61
|
-
}, undefined, "w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-
|
|
61
|
+
}, undefined, "w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-text-primary placeholder:text-text-tertiary transition-[border-color,box-shadow,background-color] ease-ui duration-150", unknown, unknown, undefined>>;
|
|
62
62
|
type InputVariants = VariantProps<typeof styles>;
|
|
63
63
|
export interface InputProps extends Omit<HTMLInputAttributes, 'disabled' | 'size' | 'value' | 'prefix'>, InputVariants {
|
|
64
64
|
children?: Snippet;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const styles = tv({
|
|
3
|
-
base: 'w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-
|
|
3
|
+
base: 'w-full inline-flex items-center justify-center rounded-md outline-none font-normal text-text-primary placeholder:text-text-tertiary transition-[border-color,box-shadow,background-color] ease-ui duration-150',
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
|
-
outlined: 'border border-
|
|
7
|
-
filled: 'bg-
|
|
8
|
-
borderless: 'bg-transparent border-0 hover:bg-
|
|
6
|
+
outlined: 'border border-border-default bg-surface-control hover:border-interactive focus:border-interactive-hover focus:shadow-focus',
|
|
7
|
+
filled: 'bg-surface-sunken border border-transparent hover:bg-surface-hover focus:bg-surface focus:border-interactive-hover focus:shadow-focus',
|
|
8
|
+
borderless: 'bg-transparent border-0 hover:bg-surface-raised focus:bg-surface-raised',
|
|
9
9
|
},
|
|
10
10
|
disabled: {
|
|
11
|
-
true: 'cursor-not-allowed bg-
|
|
11
|
+
true: 'cursor-not-allowed bg-surface-sunken text-text-disabled border-border-default',
|
|
12
12
|
false: 'cursor-text',
|
|
13
13
|
},
|
|
14
14
|
size: {
|
|
15
15
|
sm: 'h-6 px-3 text-sm',
|
|
16
|
-
md: 'h-
|
|
16
|
+
md: 'h-9 px-3 text-sm',
|
|
17
17
|
lg: 'h-10 px-3 text-base',
|
|
18
18
|
},
|
|
19
19
|
status: {
|
|
20
|
-
error: 'border-error-
|
|
21
|
-
warning: 'border-warning-
|
|
20
|
+
error: 'border-error-default hover:border-error-hover focus:border-error-default focus:shadow-focus-error',
|
|
21
|
+
warning: 'border-warning-default hover:border-warning-hover focus:border-warning-default focus:shadow-focus-warning',
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
compoundVariants: [
|
|
25
25
|
{
|
|
26
26
|
variant: 'outlined',
|
|
27
27
|
disabled: true,
|
|
28
|
-
class: 'hover:border-
|
|
28
|
+
class: 'hover:border-border-default'
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
variant: 'filled',
|
|
32
32
|
disabled: true,
|
|
33
|
-
class: 'hover:bg-
|
|
33
|
+
class: 'hover:bg-surface-sunken'
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
variant: 'borderless',
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
value = $bindable(),
|
|
9
|
-
ref = $bindable(),
|
|
10
|
-
size = 'md',
|
|
11
|
-
disabled,
|
|
12
|
-
variant = 'outlined',
|
|
13
|
-
prefix,
|
|
14
|
-
suffix,
|
|
15
|
-
allowClear,
|
|
16
|
-
status,
|
|
17
|
-
...props
|
|
18
|
-
}: InputProps = $props();
|
|
19
|
-
|
|
20
|
-
function clearInput() {
|
|
21
|
-
value = '';
|
|
22
|
-
ref?.focus();
|
|
23
|
-
}
|
|
1
|
+
<script lang="ts">import { styles } from "./Input";
|
|
2
|
+
import { IconX } from "../icons";
|
|
3
|
+
let { children, class: className, value = $bindable(), ref = $bindable(), size = 'md', disabled, variant = 'outlined', prefix, suffix, allowClear, status, ...props } = $props();
|
|
4
|
+
function clearInput() {
|
|
5
|
+
value = '';
|
|
6
|
+
ref?.focus();
|
|
7
|
+
}
|
|
24
8
|
</script>
|
|
25
9
|
|
|
26
10
|
<div class="relative inline-flex w-full">
|
|
27
11
|
{#if prefix}
|
|
28
|
-
<span class="absolute left-3 top-1/2 -translate-y-1/2 text-
|
|
12
|
+
<span class="absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary pointer-events-none">
|
|
29
13
|
{@render prefix()}
|
|
30
14
|
</span>
|
|
31
15
|
{/if}
|
|
@@ -45,13 +29,13 @@
|
|
|
45
29
|
<button
|
|
46
30
|
type="button"
|
|
47
31
|
onclick={clearInput}
|
|
48
|
-
class="absolute right-3 top-1/2 -translate-y-1/2 text-
|
|
32
|
+
class="absolute right-3 top-1/2 -translate-y-1/2 text-text-tertiary hover:text-neutral-token-10 transition-colors"
|
|
49
33
|
tabindex="-1"
|
|
50
34
|
>
|
|
51
35
|
<IconX class="size-3.5"/>
|
|
52
36
|
</button>
|
|
53
37
|
{:else if suffix}
|
|
54
|
-
<span class="absolute right-3 top-1/2 -translate-y-1/2 text-
|
|
38
|
+
<span class="absolute right-3 top-1/2 -translate-y-1/2 text-text-tertiary pointer-events-none">
|
|
55
39
|
{@render suffix()}
|
|
56
40
|
</span>
|
|
57
41
|
{/if}
|
|
@@ -10,7 +10,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
10
10
|
required: {
|
|
11
11
|
true: string;
|
|
12
12
|
};
|
|
13
|
-
}, undefined, "text-sm font-medium text-
|
|
13
|
+
}, undefined, "text-sm font-medium text-text-primary leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50", {
|
|
14
14
|
size: {
|
|
15
15
|
sm: string;
|
|
16
16
|
md: string;
|
|
@@ -28,7 +28,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
28
28
|
required: {
|
|
29
29
|
true: string;
|
|
30
30
|
};
|
|
31
|
-
}, undefined, "text-sm font-medium text-
|
|
31
|
+
}, undefined, "text-sm font-medium text-text-primary leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50", unknown, unknown, undefined>>;
|
|
32
32
|
type LabelVariants = VariantProps<typeof styles>;
|
|
33
33
|
export interface LabelProps extends HTMLLabelAttributes, LabelVariants {
|
|
34
34
|
children?: Snippet;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
export const styles = tv({
|
|
3
|
-
base: 'text-sm font-medium text-
|
|
3
|
+
base: 'text-sm font-medium text-text-primary leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
|
4
4
|
variants: {
|
|
5
5
|
size: {
|
|
6
6
|
sm: 'text-xs',
|
|
@@ -8,7 +8,7 @@ export const styles = tv({
|
|
|
8
8
|
lg: 'text-base',
|
|
9
9
|
},
|
|
10
10
|
required: {
|
|
11
|
-
true: "after:content-['*'] after:ml-0.5 after:text-error-
|
|
11
|
+
true: "after:content-['*'] after:ml-0.5 after:text-error-default",
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
compoundVariants: [],
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let {
|
|
7
|
-
ref = $bindable(null),
|
|
8
|
-
class: className,
|
|
9
|
-
size = 'md',
|
|
10
|
-
required,
|
|
11
|
-
...restProps
|
|
12
|
-
}: LabelProps = $props();
|
|
1
|
+
<script lang="ts">import { Label as LabelPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../utils";
|
|
3
|
+
import { styles } from "./Label";
|
|
4
|
+
let { ref = $bindable(null), class: className, size = 'md', required, ...restProps } = $props();
|
|
13
5
|
</script>
|
|
14
6
|
|
|
15
7
|
<LabelPrimitive.Root
|
|
@@ -1,43 +1,24 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
let context = getGlobalContext()
|
|
24
|
-
|
|
25
|
-
supportLanguages = supportLanguages ?? context.supportLanguages!;
|
|
26
|
-
language = language ?? context.language
|
|
27
|
-
basePath = basePath ?? context.basePath
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let currentLangItem = $derived(ALL_LANGUAGE_LIST.find(l => l.code === language)!)
|
|
31
|
-
let langList = $derived([currentLangItem, ...ALL_LANGUAGE_LIST.filter(lang => supportLanguages!.includes(lang.code) && lang.code !== language)])
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
function getFlagUrl(flag: string) {
|
|
35
|
-
if (flag === 'spain') {
|
|
36
|
-
return `${basePath ?? ''}/world-flags/${flag}.png`
|
|
37
|
-
}
|
|
38
|
-
return `${basePath ?? ''}/world-flags/${flag}.svg`
|
|
39
|
-
}
|
|
40
|
-
|
|
1
|
+
<script lang="ts">import {} from "./LanguagePickerButton";
|
|
2
|
+
import { IconLanguage } from "../icons";
|
|
3
|
+
import { Dialog } from "../dialog";
|
|
4
|
+
import IconCheck from "../icons/IconCheck.svelte";
|
|
5
|
+
import { getGlobalContext } from "../tera-ui-context/global-context";
|
|
6
|
+
import { m } from '../../paraglide/messages.js';
|
|
7
|
+
import { ALL_LANGUAGE_LIST } from "../../tera-i18n/projects/common/all-language-data";
|
|
8
|
+
import { cn } from "../../utils";
|
|
9
|
+
let { children, onLangSelect, open = $bindable(false), language, supportLanguages, basePath, ...props } = $props();
|
|
10
|
+
let context = getGlobalContext();
|
|
11
|
+
const resolvedSupportLanguages = $derived(supportLanguages ?? context.supportLanguages ?? ['en']);
|
|
12
|
+
const resolvedLanguage = $derived(language ?? context.language ?? 'en');
|
|
13
|
+
const resolvedBasePath = $derived(basePath ?? context.basePath ?? '');
|
|
14
|
+
let currentLangItem = $derived(ALL_LANGUAGE_LIST.find(l => l.code === resolvedLanguage));
|
|
15
|
+
let langList = $derived([currentLangItem, ...ALL_LANGUAGE_LIST.filter(lang => resolvedSupportLanguages.includes(lang.code) && lang.code !== resolvedLanguage)]);
|
|
16
|
+
function getFlagUrl(flag) {
|
|
17
|
+
if (flag === 'spain') {
|
|
18
|
+
return `${resolvedBasePath}/world-flags/${flag}.png`;
|
|
19
|
+
}
|
|
20
|
+
return `${resolvedBasePath}/world-flags/${flag}.svg`;
|
|
21
|
+
}
|
|
41
22
|
</script>
|
|
42
23
|
|
|
43
24
|
<!--add component here-->
|
|
@@ -58,13 +39,13 @@
|
|
|
58
39
|
})
|
|
59
40
|
}
|
|
60
41
|
>
|
|
61
|
-
{#each langList as lang}
|
|
42
|
+
{#each langList as lang (lang.code)}
|
|
62
43
|
<button class="w-[80vw] sm:w-full flex gap-1 items-center justify-between text-start px-1 py-1 pe-2 rounded-full bg-neutral-token-3 sm:max-w-[40rem]"
|
|
63
44
|
onclick={() => {
|
|
64
45
|
onLangSelect?.(lang.code)
|
|
65
46
|
open = false
|
|
66
47
|
}}
|
|
67
|
-
data-selected={lang.code ===
|
|
48
|
+
data-selected={lang.code === resolvedLanguage ? '' : undefined}>
|
|
68
49
|
<div class="flex items-center gap-2">
|
|
69
50
|
<img class="size-8 flag-img" src={getFlagUrl(lang.flag)} alt={currentLangItem?.flag} loading="lazy">
|
|
70
51
|
{lang.label}
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
htmlElement.classList.toggle('dark');
|
|
24
|
-
const theme = htmlElement.classList.contains('dark') ? 'dark' : 'light';
|
|
25
|
-
localStorage.setItem('theme', theme);
|
|
26
|
-
}
|
|
1
|
+
<script lang="ts">import {} from "./LightDarkToggle";
|
|
2
|
+
import { Button } from "../button";
|
|
3
|
+
import IconSun from "../icons/IconSun.svelte";
|
|
4
|
+
import IconMoon from "../icons/IconMoon.svelte";
|
|
5
|
+
let { children, ...props } = $props();
|
|
6
|
+
// $effect(() => {
|
|
7
|
+
// const htmlElement = document.documentElement;
|
|
8
|
+
// // Check for saved theme preference
|
|
9
|
+
// const currentTheme = localStorage.getItem('theme');
|
|
10
|
+
// if (currentTheme === 'dark') {
|
|
11
|
+
// htmlElement.classList.add('dark');
|
|
12
|
+
// } else {
|
|
13
|
+
// htmlElement.classList.remove('dark');
|
|
14
|
+
// }
|
|
15
|
+
// })
|
|
16
|
+
function toggleLightDarkTheme() {
|
|
17
|
+
const htmlElement = document.documentElement;
|
|
18
|
+
htmlElement.classList.toggle('dark');
|
|
19
|
+
const theme = htmlElement.classList.contains('dark') ? 'dark' : 'light';
|
|
20
|
+
localStorage.setItem('theme', theme);
|
|
21
|
+
}
|
|
27
22
|
</script>
|
|
28
23
|
|
|
29
24
|
<!--add component here-->
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts">let { icon, title, description, variant = 'default', href, class: className = '', } = $props();
|
|
2
|
+
const variantClass = {
|
|
3
|
+
default: 'bg-surface-raised shadow-sm border border-transparent',
|
|
4
|
+
elevated: 'bg-surface-raised shadow-md border border-transparent',
|
|
5
|
+
bordered: 'bg-surface-raised border border-border-default',
|
|
6
|
+
'gradient-border': 'bg-surface-raised border-2 border-transparent gradient-border-card',
|
|
7
|
+
};
|
|
8
|
+
const tag = $derived(href ? 'a' : 'div');
|
|
9
|
+
export {};
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<svelte:element
|
|
13
|
+
this={tag}
|
|
14
|
+
href={href}
|
|
15
|
+
class="block p-6 rounded-container transition-[box-shadow,transform] ease-spring duration-300 hover:shadow-md hover:-translate-y-0.5 {variantClass[variant]} {className}"
|
|
16
|
+
>
|
|
17
|
+
{#if icon}
|
|
18
|
+
<div class="mb-4 size-12 flex items-center justify-center rounded-xl bg-interactive-subtle text-interactive">
|
|
19
|
+
{@render icon()}
|
|
20
|
+
</div>
|
|
21
|
+
{/if}
|
|
22
|
+
|
|
23
|
+
<h3 class="font-semibold text-base text-text-primary mb-1.5">{title}</h3>
|
|
24
|
+
|
|
25
|
+
{#if description}
|
|
26
|
+
<p class="text-sm text-text-secondary leading-relaxed">{description}</p>
|
|
27
|
+
{/if}
|
|
28
|
+
</svelte:element>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
.gradient-border-card {
|
|
32
|
+
background-image: linear-gradient(var(--color-surface-raised), var(--color-surface-raised)),
|
|
33
|
+
conic-gradient(from 0deg, var(--color-primary-500), #7C3AED, var(--color-primary-500));
|
|
34
|
+
background-origin: border-box;
|
|
35
|
+
background-clip: padding-box, border-box;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type FeatureVariant = 'default' | 'elevated' | 'bordered' | 'gradient-border';
|
|
3
|
+
type $$ComponentProps = {
|
|
4
|
+
icon?: Snippet;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
variant?: FeatureVariant;
|
|
8
|
+
href?: string;
|
|
9
|
+
class?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const FeatureCard: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
12
|
+
type FeatureCard = ReturnType<typeof FeatureCard>;
|
|
13
|
+
export default FeatureCard;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script lang="ts">import { Badge } from '../badge/index.js';
|
|
2
|
+
import { Button } from '../button/index.js';
|
|
3
|
+
let { plan, price, period, description, features = [], cta, popular, variant = 'default', onclick, class: className = '', } = $props();
|
|
4
|
+
const isFeatured = $derived(variant === 'featured');
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<div
|
|
8
|
+
class="relative flex flex-col rounded-container overflow-hidden border transition-[box-shadow,transform] ease-spring duration-200
|
|
9
|
+
{isFeatured
|
|
10
|
+
? 'shadow-lg border-transparent scale-[1.02]'
|
|
11
|
+
: 'shadow-sm border-border-default'} {className}"
|
|
12
|
+
>
|
|
13
|
+
<!-- Header -->
|
|
14
|
+
<div class="px-6 pt-6 pb-4 {isFeatured ? 'bg-primary-600 text-interactive-on' : 'bg-surface-raised'}">
|
|
15
|
+
<div class="flex items-start justify-between">
|
|
16
|
+
<h3 class="font-semibold text-base">{plan}</h3>
|
|
17
|
+
{#if popular}
|
|
18
|
+
<Badge variant="primary" size="sm">Popular</Badge>
|
|
19
|
+
{/if}
|
|
20
|
+
</div>
|
|
21
|
+
<div class="mt-3 flex items-end gap-1">
|
|
22
|
+
<span class="text-4xl font-bold">{price}</span>
|
|
23
|
+
<span class="text-sm mb-1 opacity-75">/{period}</span>
|
|
24
|
+
</div>
|
|
25
|
+
<p class="mt-1 text-sm opacity-80">{description}</p>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<!-- Features -->
|
|
29
|
+
<div class="flex-1 px-6 py-5 bg-surface-raised flex flex-col gap-3">
|
|
30
|
+
{#each features as feature (feature)}
|
|
31
|
+
<div class="flex items-start gap-2 text-sm">
|
|
32
|
+
<svg class="size-4 shrink-0 mt-0.5 text-interactive" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
33
|
+
<path d="M2 8l4 4 8-8"/>
|
|
34
|
+
</svg>
|
|
35
|
+
<span class="text-text-secondary">{feature}</span>
|
|
36
|
+
</div>
|
|
37
|
+
{/each}
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<!-- CTA -->
|
|
41
|
+
<div class="px-6 pb-6 bg-surface-raised">
|
|
42
|
+
<Button
|
|
43
|
+
variant={isFeatured ? 'primary' : 'default'}
|
|
44
|
+
block
|
|
45
|
+
{onclick}
|
|
46
|
+
>{cta}</Button>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
plan: string;
|
|
3
|
+
price: string;
|
|
4
|
+
period: string;
|
|
5
|
+
description: string;
|
|
6
|
+
features: string[];
|
|
7
|
+
cta: string;
|
|
8
|
+
popular?: boolean;
|
|
9
|
+
variant?: 'default' | 'featured';
|
|
10
|
+
onclick?: () => void;
|
|
11
|
+
class?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const PricingCard: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
14
|
+
type PricingCard = ReturnType<typeof PricingCard>;
|
|
15
|
+
export default PricingCard;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">import { Badge } from '../badge/index.js';
|
|
2
|
+
let { value, label, trend, trendDirection = 'neutral', class: className = '', } = $props();
|
|
3
|
+
const trendVariant = $derived(trendDirection === 'up' ? 'success' : trendDirection === 'down' ? 'error' : 'default');
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div class="flex flex-col gap-1 {className}">
|
|
7
|
+
<div class="flex items-end gap-2">
|
|
8
|
+
<span class="text-[2.5rem] font-bold leading-none text-text-primary">{value}</span>
|
|
9
|
+
{#if trend}
|
|
10
|
+
<Badge variant={trendVariant} size="sm" class="mb-1">{trend}</Badge>
|
|
11
|
+
{/if}
|
|
12
|
+
</div>
|
|
13
|
+
<span class="text-xs text-text-tertiary">{label}</span>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
trend?: string;
|
|
5
|
+
trendDirection?: 'up' | 'down' | 'neutral';
|
|
6
|
+
class?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const StatBlock: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
+
type StatBlock = ReturnType<typeof StatBlock>;
|
|
10
|
+
export default StatBlock;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">import { StarRating } from '../star-rating/index.js';
|
|
2
|
+
import { Avatar } from '../avatar/index.js';
|
|
3
|
+
let { quote, name, role, company, avatarSrc, rating, class: className = '', } = $props();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div class="p-6 rounded-container border border-border-default bg-surface-raised {className}">
|
|
7
|
+
{#if rating}
|
|
8
|
+
<div class="mb-3">
|
|
9
|
+
<StarRating value={rating} readonly size="sm" />
|
|
10
|
+
</div>
|
|
11
|
+
{/if}
|
|
12
|
+
|
|
13
|
+
<p class="relative text-sm leading-relaxed text-text-secondary italic before:content-[open-quote] before:text-4xl before:text-interactive-subtle before:leading-none before:block before:-mb-3">
|
|
14
|
+
{quote}
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<div class="mt-4 flex items-center gap-3">
|
|
18
|
+
<Avatar src={avatarSrc} fallback={name.slice(0, 2).toUpperCase()} size="sm" />
|
|
19
|
+
<div>
|
|
20
|
+
<p class="text-sm font-medium text-text-primary">{name}</p>
|
|
21
|
+
<p class="text-xs text-text-tertiary">{role}{company ? `, ${company}` : ''}</p>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
quote: string;
|
|
3
|
+
name: string;
|
|
4
|
+
role: string;
|
|
5
|
+
company?: string;
|
|
6
|
+
avatarSrc?: string;
|
|
7
|
+
rating?: number;
|
|
8
|
+
class?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const TestimonialCard: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
+
type TestimonialCard = ReturnType<typeof TestimonialCard>;
|
|
12
|
+
export default TestimonialCard;
|