Skip to content

Commit 1c61651

Browse files
committed
[shadcn] Update new york components preset
1 parent de94627 commit 1c61651

File tree

14 files changed

+35
-31
lines changed

14 files changed

+35
-31
lines changed

packages/shadcn-theme/components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
},
1515
"typescript": true,
1616
"registry": "https://next.shadcn-svelte.com/registry"
17-
}
17+
}

packages/shadcn-theme/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"@types/eslint": "catalog:",
7878
"ajv": "catalog:",
7979
"autoprefixer": "catalog:",
80-
"bits-ui": "^1.0.0-next.65",
80+
"bits-ui": "1.0.0-next.65",
8181
"clsx": "^2.1.1",
8282
"eslint": "catalog:",
8383
"eslint-config-prettier": "catalog:",
@@ -94,10 +94,10 @@
9494
"tailwind-variants": "^0.3.0",
9595
"tailwindcss": "catalog:",
9696
"tailwindcss-animate": "^1.0.7",
97+
"testing": "workspace:*",
9798
"typescript-eslint": "catalog:",
9899
"vite": "catalog:",
99-
"vitest": "catalog:",
100-
"testing": "workspace:*"
100+
"vitest": "catalog:"
101101
},
102102
"svelte": "./dist/theme/index.js",
103103
"types": "./dist/theme/index.d.ts"

packages/shadcn-theme/src/lib/new-york-ui/calendar/calendar-next-button.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script lang="ts">
2-
import type { Snippet } from 'svelte';
32
import { Calendar as CalendarPrimitive } from "bits-ui";
4-
import ChevronRight from "svelte-radix/ChevronRight.svelte";
3+
import ChevronRight from "lucide-svelte/icons/chevron-right";
54
import { buttonVariants } from "$lib/new-york-ui/button/index.js";
65
import { cn } from "$lib/utils.js";
76
@@ -14,7 +13,7 @@
1413
</script>
1514

1615
{#snippet Fallback()}
17-
<ChevronRight class="size-4" />
16+
<ChevronRight />
1817
{/snippet}
1918

2019
<CalendarPrimitive.NextButton
@@ -25,5 +24,5 @@
2524
className
2625
)}
2726
{...restProps}
28-
children={children as Snippet || Fallback}
27+
children={children || Fallback}
2928
/>

packages/shadcn-theme/src/lib/new-york-ui/calendar/calendar-prev-button.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script lang="ts">
2-
import type { Snippet } from 'svelte';
32
import { Calendar as CalendarPrimitive } from "bits-ui";
4-
import ChevronLeft from "svelte-radix/ChevronLeft.svelte";
3+
import ChevronLeft from "lucide-svelte/icons/chevron-left";
54
import { buttonVariants } from "$lib/new-york-ui/button/index.js";
65
import { cn } from "$lib/utils.js";
76
@@ -14,7 +13,7 @@
1413
</script>
1514

1615
{#snippet Fallback()}
17-
<ChevronLeft class="size-4" />
16+
<ChevronLeft />
1817
{/snippet}
1918

2019
<CalendarPrimitive.PrevButton
@@ -25,5 +24,5 @@
2524
className
2625
)}
2726
{...restProps}
28-
children={children as Snippet || Fallback}
27+
children={children || Fallback}
2928
/>

packages/shadcn-theme/src/lib/new-york-ui/popover/popover-content.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
class: className,
88
align = "center",
99
sideOffset = 4,
10+
portalProps,
1011
...restProps
11-
}: PopoverPrimitive.ContentProps = $props();
12+
}: PopoverPrimitive.ContentProps & {
13+
portalProps?: PopoverPrimitive.PortalProps;
14+
} = $props();
1215
</script>
1316

14-
<PopoverPrimitive.Portal>
17+
<PopoverPrimitive.Portal {...portalProps}>
1518
<PopoverPrimitive.Content
1619
bind:ref
1720
{align}

packages/shadcn-theme/src/lib/new-york-ui/radio-group/radio-group-item.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { RadioGroup as RadioGroupPrimitive, type WithoutChildrenOrChild } from "bits-ui";
3-
import Check from "svelte-radix/Check.svelte";
3+
import Circle from "lucide-svelte/icons/circle";
44
import { cn } from "$lib/utils.js";
55
66
let {
@@ -23,7 +23,7 @@
2323
{#snippet children({ checked })}
2424
<div class="flex items-center justify-center">
2525
{#if checked}
26-
<Check class="fill-primary size-3.5" />
26+
<Circle class="fill-primary size-3.5" />
2727
{/if}
2828
</div>
2929
{/snippet}

packages/shadcn-theme/src/lib/new-york-ui/select/select-content.svelte

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<script lang="ts">
22
import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
3-
import * as Select from "$lib/new-york-ui/select/index.js";
3+
import * as Select from "./index.js";
44
import { cn } from "$lib/utils.js";
55
66
let {
77
ref = $bindable(null),
88
class: className,
99
sideOffset = 4,
10+
portalProps,
1011
children,
1112
...restProps
12-
}: WithoutChild<SelectPrimitive.ContentProps> = $props();
13+
}: WithoutChild<SelectPrimitive.ContentProps> & {
14+
portalProps?: SelectPrimitive.PortalProps;
15+
} = $props();
1316
</script>
1417

15-
<SelectPrimitive.Portal>
18+
<SelectPrimitive.Portal {...portalProps}>
1619
<SelectPrimitive.Content
1720
bind:ref
1821
{sideOffset}

packages/shadcn-theme/src/lib/new-york-ui/select/select-item.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 { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
3-
import Check from "svelte-radix/Check.svelte";
3+
import Check from "lucide-svelte/icons/check";
44
import { cn } from "$lib/utils.js";
55
66
let {

packages/shadcn-theme/src/lib/new-york-ui/select/select-scroll-down-button.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import ChevronDown from "svelte-radix/ChevronDown.svelte";
2+
import ChevronDown from "lucide-svelte/icons/chevron-down";
33
import { Select as SelectPrimitive, type WithoutChildrenOrChild } from "bits-ui";
44
import { cn } from "$lib/utils.js";
55

packages/shadcn-theme/src/lib/new-york-ui/select/select-scroll-up-button.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import ChevronUp from "svelte-radix/ChevronUp.svelte";
2+
import ChevronUp from "lucide-svelte/icons/chevron-up";
33
import { Select as SelectPrimitive, type WithoutChildrenOrChild } from "bits-ui";
44
import { cn } from "$lib/utils.js";
55

0 commit comments

Comments
 (0)