Skip to content

Commit 2521b69

Browse files
committed
Updated shadcn
1 parent 685fe2b commit 2521b69

File tree

14 files changed

+69
-47
lines changed

14 files changed

+69
-47
lines changed

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/checkbox/checkbox.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
{...restProps}
2525
>
2626
{#snippet children({ checked, indeterminate })}
27-
<span class="flex size-4 items-center justify-center text-current">
27+
<span class="flex items-center justify-center text-current">
2828
{#if indeterminate}
29-
<Minus class="size-3.5" />
29+
<Minus class="size-4" />
3030
{:else}
31-
<Check class={cn("size-3.5", !checked && "text-transparent")} />
31+
<Check class={cn("size-4", !checked && "text-transparent")} />
3232
{/if}
3333
</span>
3434
{/snippet}

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/command/command-dialog.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@
1212
open = $bindable(false),
1313
ref = $bindable(null),
1414
value = $bindable(""),
15+
portalProps,
1516
children,
1617
...restProps
1718
}: WithoutChildrenOrChild<DialogPrimitive.RootProps> &
1819
WithoutChildrenOrChild<CommandPrimitive.RootProps> & {
20+
portalProps?: DialogPrimitive.PortalProps;
1921
children: Snippet;
2022
} = $props();
2123
</script>
2224

2325
<Dialog.Root bind:open {...restProps}>
24-
<Dialog.Content class="overflow-hidden p-0">
26+
<Dialog.Content class="overflow-hidden p-0" {portalProps}>
2527
<Command
2628
class="[&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:font-medium [&_[data-cmdk-group]:not([hidden])_~[data-cmdk-group]]:pt-0 [&_[data-cmdk-group]]:px-2 [&_[data-cmdk-input-wrapper]_svg]:h-5 [&_[data-cmdk-input-wrapper]_svg]:w-5 [&_[data-cmdk-input]]:h-12 [&_[data-cmdk-item]]:px-2 [&_[data-cmdk-item]]:py-3 [&_[data-cmdk-item]_svg]:h-5 [&_[data-cmdk-item]_svg]:w-5"
2729
{...restProps}

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/command/command-input.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 { Command as CommandPrimitive } from "bits-ui";
3-
import MagnifyingGlass from '~icons/mdi/search';
3+
import Search from '~icons/mdi/search';
44
import { cn } from "$lib/utils.js";
55
66
let {
@@ -12,7 +12,7 @@
1212
</script>
1313

1414
<div class="flex items-center border-b px-3" data-command-input-wrapper="">
15-
<MagnifyingGlass class="mr-2 size-4 shrink-0 opacity-50" />
15+
<Search class="mr-2 size-4 shrink-0 opacity-50" />
1616
<CommandPrimitive.Input
1717
class={cn(
1818
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/context-menu/context-menu-content.svelte

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@
55
let {
66
ref = $bindable(null),
77
class: className,
8+
portalProps,
89
...restProps
9-
}: ContextMenuPrimitive.ContentProps = $props();
10+
}: ContextMenuPrimitive.ContentProps & {
11+
portalProps?: ContextMenuPrimitive.PortalProps;
12+
} = $props();
1013
</script>
1114

12-
<ContextMenuPrimitive.Content
13-
class={cn(
14-
"bg-popover text-popover-foreground z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none",
15-
className
16-
)}
17-
{...restProps}
18-
bind:ref
19-
/>
15+
<ContextMenuPrimitive.Portal {...portalProps}>
16+
<ContextMenuPrimitive.Content
17+
class={cn(
18+
"bg-popover text-popover-foreground z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none",
19+
className
20+
)}
21+
{...restProps}
22+
bind:ref
23+
/>
24+
</ContextMenuPrimitive.Portal>

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/context-menu/context-menu-radio-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 { ContextMenu as ContextMenuPrimitive, type WithoutChild } from "bits-ui";
3-
import DotFilled from '~icons/mdi/circle';
3+
import Circle from "~icons/mdi/circle";
44
import { cn } from "$lib/utils.js";
55
66
let {
@@ -22,7 +22,7 @@
2222
{#snippet children({ checked })}
2323
<span class="absolute left-2 flex size-3.5 items-center justify-center">
2424
{#if checked}
25-
<DotFilled class="size-4 fill-current" />
25+
<Circle class="size-2 fill-current" />
2626
{/if}
2727
</span>
2828
{@render childrenProp?.({ checked })}

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/dialog/dialog-content.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
<script lang="ts">
22
import { Dialog as DialogPrimitive, type WithoutChildrenOrChild } from "bits-ui";
3-
import Cross2 from '~icons/mdi/close';
3+
import X from "~icons/mdi/close";
44
import type { Snippet } from "svelte";
55
import * as Dialog from "./index.js";
66
import { cn } from "$lib/utils.js";
77
88
let {
99
ref = $bindable(null),
1010
class: className,
11+
portalProps,
1112
children,
1213
...restProps
1314
}: WithoutChildrenOrChild<DialogPrimitive.ContentProps> & {
15+
portalProps?: DialogPrimitive.PortalProps;
1416
children: Snippet;
1517
} = $props();
1618
</script>
1719

18-
<Dialog.Portal>
20+
<Dialog.Portal {...portalProps}>
1921
<Dialog.Overlay />
2022
<DialogPrimitive.Content
2123
bind:ref
@@ -29,7 +31,7 @@
2931
<DialogPrimitive.Close
3032
class="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none"
3133
>
32-
<Cross2 class="size-4" />
34+
<X class="size-4" />
3335
<span class="sr-only">Close</span>
3436
</DialogPrimitive.Close>
3537
</DialogPrimitive.Content>

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
{#snippet children({ checked, indeterminate })}
3131
<span class="absolute left-2 flex size-3.5 items-center justify-center">
3232
{#if indeterminate}
33-
<Minus class="size-3.5" />
33+
<Minus class="size-4" />
3434
{:else}
35-
<Check class={cn("size-3.5", !checked && "text-transparent")} />
35+
<Check class={cn("size-4", !checked && "text-transparent")} />
3636
{/if}
3737
</span>
3838
{@render childrenProp?.()}

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/dropdown-menu/dropdown-menu-content.svelte

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,22 @@
66
ref = $bindable(null),
77
class: className,
88
sideOffset = 4,
9+
portalProps,
910
...restProps
10-
}: DropdownMenuPrimitive.ContentProps = $props();
11+
}: DropdownMenuPrimitive.ContentProps & {
12+
portalProps?: DropdownMenuPrimitive.PortalProps;
13+
} = $props();
1114
</script>
1215

13-
<DropdownMenuPrimitive.Content
14-
bind:ref
15-
{sideOffset}
16-
class={cn(
17-
"bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",
18-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 outline-none",
19-
className
20-
)}
21-
{...restProps}
22-
/>
16+
<DropdownMenuPrimitive.Portal {...portalProps}>
17+
<DropdownMenuPrimitive.Content
18+
bind:ref
19+
{sideOffset}
20+
class={cn(
21+
"bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",
22+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 outline-none",
23+
className
24+
)}
25+
{...restProps}
26+
/>
27+
</DropdownMenuPrimitive.Portal>

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/dropdown-menu/dropdown-menu-radio-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 { DropdownMenu as DropdownMenuPrimitive, type WithoutChild } from "bits-ui";
3-
import DotFilled from '~icons/mdi/circle';
3+
import Circle from "~icons/mdi/circle";
44
import { cn } from "$lib/utils.js";
55
66
let {
@@ -22,7 +22,7 @@
2222
{#snippet children({ checked })}
2323
<span class="absolute left-2 flex size-3.5 items-center justify-center">
2424
{#if checked}
25-
<DotFilled class="size-4 fill-current" />
25+
<Circle class="size-2 fill-current" />
2626
{/if}
2727
</span>
2828
{@render childrenProp?.({ checked })}

src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/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}

0 commit comments

Comments
 (0)