Skip to content

Commit e829244

Browse files
committed
fix: remove VariantProps for component data
1 parent bd252b5 commit e829244

File tree

130 files changed

+319
-349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+319
-349
lines changed

src/lib/alert/Alert.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
@props:icon: Snippet;
7373
@props:alertStatus: boolean = $bindable(true);
7474
@props:closeIcon: boolean;
75-
@props:color: VariantProps<typeof alert>["color"] = "primary";
75+
@props:color: "primary" | "secondary" | "gray" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" = "primary";
7676
@props:rounded: boolean = true;
7777
@props:border: boolean;
7878
@props:class: string;

src/lib/alert/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { type VariantProps } from "tailwind-variants";
21
import type { Snippet } from "svelte";
32
import Alert from "./Alert.svelte";
43
import type { ParamsType, TransitionFunc } from "../types";
54
import type { HTMLAttributes } from "svelte/elements";
65
import { alert } from "./theme";
76

8-
type alertColor = VariantProps<typeof alert>["color"];
7+
type alertColor = "primary" | "secondary" | "gray" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
98

109
interface AlertProps extends HTMLAttributes<HTMLDivElement> {
1110
children: Snippet;

src/lib/avatar/Avatar.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
@props:src: string;
4545
@props:href: string;
4646
@props:cornerStyle: "rounded" | "circular" = "circular";
47-
@props:border: any;
48-
@props:stacked: boolean;
47+
@props:border: boolean = false;
48+
@props:stacked: boolean = false;
4949
@props:dot: object | undefined;
5050
@props:class: string;
5151
@props:alt: string;

src/lib/badge/Badge.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
@props: children: Snippet;
5858
@props:icon: Snippet;
5959
@props:badgeStatus: boolean = $bindable(true);
60-
@props:color: VariantProps<typeof badge>["color"] = "primary";
60+
@props:color: "primary" | "secondary" | "gray" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" = "primary";
6161
@props:large: boolean = false;
6262
@props:dismissable: boolean = false;
6363
@props:class: string;

src/lib/badge/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { type VariantProps } from "tailwind-variants";
21
import type { Snippet } from "svelte";
32
import type { ParamsType, TransitionFunc } from "../types";
43
import type { HTMLAttributes } from "svelte/elements";
54
import Badge from "./Badge.svelte";
65
import { badge } from "./theme";
76

8-
type badgeColor = VariantProps<typeof badge>["color"];
7+
type badgeColor = "primary" | "secondary" | "gray" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
98

109
interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
1110
children: Snippet;

src/lib/banner/Banner.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
@props: children: Snippet;
4949
@props:header: Snippet;
5050
@props:bannerStatus: boolean = $bindable(true);
51-
@props:position: VariantProps<typeof banner>["position"] = "sticky";
51+
@props:position: "static" | "fixed" | "absolute" | "relative" | "sticky" = "sticky";
5252
@props:dismissable: boolean = true;
53-
@props:color: VariantProps<typeof banner>["color"] = "gray";
54-
@props:bannerType: VariantProps<typeof banner>["bannerType"] = "default";
53+
@props:color: "primary" | "secondary" | "gray" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" = "gray";
54+
@props:bannerType: "default" | "bottom" | "cta" | "signup" | "info" = "default";
5555
@props:class: string;
5656
@props:innerClass: string;
5757
@props:transition: TransitionFunc = fade;

src/lib/banner/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import { type VariantProps } from "tailwind-variants";
21
import type { Snippet } from "svelte";
32
import type { TransitionFunc } from "../types";
43
import type { HTMLAttributes } from "svelte/elements";
54
import Banner from "./Banner.svelte";
65
import { banner } from "./theme";
76

8-
type ColorVariants = VariantProps<typeof banner>["color"];
9-
type TypeVariants = VariantProps<typeof banner>["bannerType"];
10-
type PositionVariants = VariantProps<typeof banner>["position"];
7+
type ColorVariants = "primary" | "secondary" | "gray" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
8+
type TypeVariants = "default" | "bottom" | "cta" | "signup" | "info";
9+
type PositionVariants = "static" | "fixed" | "absolute" | "relative" | "sticky";
1110

1211
interface BannerProps extends HTMLAttributes<HTMLDivElement> {
1312
children: Snippet;

src/lib/banner/theme.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ const banner = tv({
77
},
88
variants: {
99
position: {
10+
// "static" | "fixed" | "absolute" | "relative" | "sticky"
1011
static: { base: "static" },
1112
fixed: { base: "fixed" },
1213
absolute: { base: "absolute" },
1314
relative: { base: "relative" },
1415
sticky: { base: "sticky" }
1516
},
1617
bannerType: {
18+
// "default" | "bottom" | "cta" | "signup" | "info"
1719
default: {
1820
base: "top-0 start-0 w-full border-b border-gray-200 bg-gray-50",
1921
insideDiv: "mx-auto"

src/lib/bottom-navigation/BottomNav.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
## Props
3333
@props: children: Snippet;
3434
@props:header: Snippet;
35-
@props:position: VariantProps<typeof bottomNav>["position"] = "fixed";
36-
@props:navType: VariantProps<typeof bottomNav>["navType"] = "default";
35+
@props:position: "static" | "fixed" | "absolute" | "relative" | "sticky" | undefined = "fixed";
36+
@props:navType: "border" | "application" | "group" | "default" | "pagination" | "card" | "meeting" | "video" | undefined = "default";
3737
@props:outerClass: string;
3838
@props:innerClass: string;
3939
@props:activeClass: string;

src/lib/bottom-navigation/BottomNavItem.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
## Props
3636
@props: children: Snippet;
3737
@props:btnName: string;
38-
@props:appBtnPosition: AppBtnVariantProps<typeof bottomNav>["position"] = "middle";
38+
@props:appBtnPosition: AppBtn"static" | "fixed" | "absolute" | "relative" | "sticky" | undefined = "middle";
3939
@props:target: string;
4040
@props:activeClass: string;
4141
@props:href: string = "";

0 commit comments

Comments
 (0)