Skip to content

Commit ab8681c

Browse files
chore(shadcn): update components using shadcn update command to fix compatibility issue
In Svelte 5.16.0 the code of the shadcn components got broken due to a bug. This got fixed in huntabyte/shadcn-svelte#1585. To reproduce this I ran the shadcn cli update command locally (commit f06d2a1133c9df77902e62d4da79842a6b0af329). Due to a bug in the cli command, which was already reported in huntabyte/shadcn-svelte#1532 I had to adjust the code. The update command did overwrite some customizations we already made, which I undid.
1 parent 824f5cd commit ab8681c

27 files changed

+28
-27
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/primitives/avatar/avatar-fallback.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { Avatar as AvatarPrimitive } from "bits-ui";
3-
import { cn } from "$lib/utils/shadcn-helper";
3+
import { cn } from "$lib/utils/shadcn-helper.js";
44
55
let {
66
ref = $bindable(null),

src/lib/components/primitives/avatar/avatar-image.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { Avatar as AvatarPrimitive } from "bits-ui";
3-
import { cn } from "$lib/utils/shadcn-helper";
3+
import { cn } from "$lib/utils/shadcn-helper.js";
44
55
let {
66
ref = $bindable(null),

src/lib/components/primitives/avatar/avatar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { Avatar as AvatarPrimitive } from "bits-ui";
3-
import { cn } from "$lib/utils/shadcn-helper";
3+
import { cn } from "$lib/utils/shadcn-helper.js";
44
55
let {
66
ref = $bindable(null),

src/lib/components/primitives/button/button.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
{#if href}
5757
<a
5858
bind:this={ref}
59-
class={cn(buttonVariants({ variant, size, className }))}
59+
class={cn(buttonVariants({ variant, size }), className)}
6060
{href}
6161
{...restProps}
6262
>
@@ -65,7 +65,7 @@
6565
{:else}
6666
<button
6767
bind:this={ref}
68-
class={cn(buttonVariants({ variant, size, className }))}
68+
class={cn(buttonVariants({ variant, size }), className)}
6969
{type}
7070
{...restProps}
7171
>

src/lib/components/primitives/card/card-content.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import type { WithElementRef } from "bits-ui";
33
import type { HTMLAttributes } from "svelte/elements";
4-
import { cn } from "$lib/utils/shadcn-helper";
4+
import { cn } from "$lib/utils/shadcn-helper.js";
55
66
let {
77
ref = $bindable(null),

src/lib/components/primitives/card/card-description.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import type { WithElementRef } from "bits-ui";
33
import type { HTMLAttributes } from "svelte/elements";
4-
import { cn } from "$lib/utils/shadcn-helper";
4+
import { cn } from "$lib/utils/shadcn-helper.js";
55
66
let {
77
ref = $bindable(null),

src/lib/components/primitives/card/card-footer.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import type { WithElementRef } from "bits-ui";
33
import type { HTMLAttributes } from "svelte/elements";
4-
import { cn } from "$lib/utils/shadcn-helper";
4+
import { cn } from "$lib/utils/shadcn-helper.js";
55
66
let {
77
ref = $bindable(null),

src/lib/components/primitives/card/card-header.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import type { WithElementRef } from "bits-ui";
33
import type { HTMLAttributes } from "svelte/elements";
4-
import { cn } from "$lib/utils/shadcn-helper";
4+
import { cn } from "$lib/utils/shadcn-helper.js";
55
66
let {
77
ref = $bindable(null),

src/lib/components/primitives/card/card-title.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import type { WithElementRef } from "bits-ui";
33
import type { HTMLAttributes } from "svelte/elements";
4-
import { cn } from "$lib/utils/shadcn-helper";
4+
import { cn } from "$lib/utils/shadcn-helper.js";
55
66
let {
77
ref = $bindable(null),

0 commit comments

Comments
 (0)