@aphexcms/ui 0.1.1 → 0.1.3

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.
Files changed (151) hide show
  1. package/package.json +5 -25
  2. package/src/lib/components/app-sidebar.svelte +0 -171
  3. package/src/lib/components/nav-main.svelte +0 -64
  4. package/src/lib/components/nav-projects.svelte +0 -76
  5. package/src/lib/components/nav-user.svelte +0 -87
  6. package/src/lib/components/sidebar-07/+page.svelte +0 -39
  7. package/src/lib/components/team-switcher.svelte +0 -67
  8. package/src/lib/components/ui/alert/alert-description.svelte +0 -23
  9. package/src/lib/components/ui/alert/alert-title.svelte +0 -20
  10. package/src/lib/components/ui/alert/alert.svelte +0 -44
  11. package/src/lib/components/ui/alert/index.ts +0 -14
  12. package/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte +0 -18
  13. package/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte +0 -18
  14. package/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte +0 -27
  15. package/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte +0 -17
  16. package/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte +0 -20
  17. package/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte +0 -20
  18. package/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte +0 -20
  19. package/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte +0 -17
  20. package/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte +0 -7
  21. package/src/lib/components/ui/alert-dialog/index.ts +0 -39
  22. package/src/lib/components/ui/avatar/avatar-fallback.svelte +0 -17
  23. package/src/lib/components/ui/avatar/avatar-image.svelte +0 -17
  24. package/src/lib/components/ui/avatar/avatar.svelte +0 -19
  25. package/src/lib/components/ui/avatar/index.ts +0 -13
  26. package/src/lib/components/ui/badge/badge.svelte +0 -49
  27. package/src/lib/components/ui/badge/index.ts +0 -2
  28. package/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +0 -23
  29. package/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte +0 -20
  30. package/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte +0 -31
  31. package/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte +0 -23
  32. package/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte +0 -23
  33. package/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte +0 -27
  34. package/src/lib/components/ui/breadcrumb/breadcrumb.svelte +0 -21
  35. package/src/lib/components/ui/breadcrumb/index.ts +0 -25
  36. package/src/lib/components/ui/button/button.svelte +0 -82
  37. package/src/lib/components/ui/button/index.ts +0 -17
  38. package/src/lib/components/ui/card/card-action.svelte +0 -20
  39. package/src/lib/components/ui/card/card-content.svelte +0 -15
  40. package/src/lib/components/ui/card/card-description.svelte +0 -20
  41. package/src/lib/components/ui/card/card-footer.svelte +0 -20
  42. package/src/lib/components/ui/card/card-header.svelte +0 -23
  43. package/src/lib/components/ui/card/card-title.svelte +0 -20
  44. package/src/lib/components/ui/card/card.svelte +0 -23
  45. package/src/lib/components/ui/card/index.ts +0 -25
  46. package/src/lib/components/ui/collapsible/collapsible-content.svelte +0 -7
  47. package/src/lib/components/ui/collapsible/collapsible-trigger.svelte +0 -7
  48. package/src/lib/components/ui/collapsible/collapsible.svelte +0 -11
  49. package/src/lib/components/ui/collapsible/index.ts +0 -13
  50. package/src/lib/components/ui/command/command-dialog.svelte +0 -40
  51. package/src/lib/components/ui/command/command-empty.svelte +0 -17
  52. package/src/lib/components/ui/command/command-group.svelte +0 -30
  53. package/src/lib/components/ui/command/command-input.svelte +0 -26
  54. package/src/lib/components/ui/command/command-item.svelte +0 -20
  55. package/src/lib/components/ui/command/command-link-item.svelte +0 -20
  56. package/src/lib/components/ui/command/command-list.svelte +0 -17
  57. package/src/lib/components/ui/command/command-separator.svelte +0 -17
  58. package/src/lib/components/ui/command/command-shortcut.svelte +0 -20
  59. package/src/lib/components/ui/command/command.svelte +0 -22
  60. package/src/lib/components/ui/command/index.ts +0 -40
  61. package/src/lib/components/ui/dialog/dialog-close.svelte +0 -7
  62. package/src/lib/components/ui/dialog/dialog-content.svelte +0 -43
  63. package/src/lib/components/ui/dialog/dialog-description.svelte +0 -17
  64. package/src/lib/components/ui/dialog/dialog-footer.svelte +0 -20
  65. package/src/lib/components/ui/dialog/dialog-header.svelte +0 -20
  66. package/src/lib/components/ui/dialog/dialog-overlay.svelte +0 -20
  67. package/src/lib/components/ui/dialog/dialog-title.svelte +0 -17
  68. package/src/lib/components/ui/dialog/dialog-trigger.svelte +0 -7
  69. package/src/lib/components/ui/dialog/index.ts +0 -37
  70. package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +0 -41
  71. package/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte +0 -27
  72. package/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +0 -22
  73. package/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte +0 -7
  74. package/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte +0 -27
  75. package/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte +0 -24
  76. package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +0 -16
  77. package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +0 -31
  78. package/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte +0 -17
  79. package/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +0 -20
  80. package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +0 -20
  81. package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +0 -29
  82. package/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +0 -7
  83. package/src/lib/components/ui/dropdown-menu/index.ts +0 -49
  84. package/src/lib/components/ui/input/index.ts +0 -7
  85. package/src/lib/components/ui/input/input.svelte +0 -52
  86. package/src/lib/components/ui/label/index.ts +0 -7
  87. package/src/lib/components/ui/label/label.svelte +0 -20
  88. package/src/lib/components/ui/popover/index.ts +0 -17
  89. package/src/lib/components/ui/popover/popover-content.svelte +0 -29
  90. package/src/lib/components/ui/popover/popover-trigger.svelte +0 -17
  91. package/src/lib/components/ui/select/index.ts +0 -37
  92. package/src/lib/components/ui/select/select-content.svelte +0 -40
  93. package/src/lib/components/ui/select/select-group-heading.svelte +0 -21
  94. package/src/lib/components/ui/select/select-group.svelte +0 -7
  95. package/src/lib/components/ui/select/select-item.svelte +0 -38
  96. package/src/lib/components/ui/select/select-label.svelte +0 -20
  97. package/src/lib/components/ui/select/select-scroll-down-button.svelte +0 -20
  98. package/src/lib/components/ui/select/select-scroll-up-button.svelte +0 -20
  99. package/src/lib/components/ui/select/select-separator.svelte +0 -18
  100. package/src/lib/components/ui/select/select-trigger.svelte +0 -29
  101. package/src/lib/components/ui/separator/index.ts +0 -7
  102. package/src/lib/components/ui/separator/separator.svelte +0 -21
  103. package/src/lib/components/ui/sheet/index.ts +0 -36
  104. package/src/lib/components/ui/sheet/sheet-close.svelte +0 -7
  105. package/src/lib/components/ui/sheet/sheet-content.svelte +0 -60
  106. package/src/lib/components/ui/sheet/sheet-description.svelte +0 -17
  107. package/src/lib/components/ui/sheet/sheet-footer.svelte +0 -20
  108. package/src/lib/components/ui/sheet/sheet-header.svelte +0 -20
  109. package/src/lib/components/ui/sheet/sheet-overlay.svelte +0 -20
  110. package/src/lib/components/ui/sheet/sheet-title.svelte +0 -17
  111. package/src/lib/components/ui/sheet/sheet-trigger.svelte +0 -7
  112. package/src/lib/components/ui/sidebar/constants.ts +0 -6
  113. package/src/lib/components/ui/sidebar/context.svelte.ts +0 -79
  114. package/src/lib/components/ui/sidebar/index.ts +0 -75
  115. package/src/lib/components/ui/sidebar/sidebar-content.svelte +0 -24
  116. package/src/lib/components/ui/sidebar/sidebar-footer.svelte +0 -21
  117. package/src/lib/components/ui/sidebar/sidebar-group-action.svelte +0 -36
  118. package/src/lib/components/ui/sidebar/sidebar-group-content.svelte +0 -21
  119. package/src/lib/components/ui/sidebar/sidebar-group-label.svelte +0 -34
  120. package/src/lib/components/ui/sidebar/sidebar-group.svelte +0 -21
  121. package/src/lib/components/ui/sidebar/sidebar-header.svelte +0 -21
  122. package/src/lib/components/ui/sidebar/sidebar-input.svelte +0 -21
  123. package/src/lib/components/ui/sidebar/sidebar-inset.svelte +0 -24
  124. package/src/lib/components/ui/sidebar/sidebar-menu-action.svelte +0 -43
  125. package/src/lib/components/ui/sidebar/sidebar-menu-badge.svelte +0 -29
  126. package/src/lib/components/ui/sidebar/sidebar-menu-button.svelte +0 -101
  127. package/src/lib/components/ui/sidebar/sidebar-menu-item.svelte +0 -21
  128. package/src/lib/components/ui/sidebar/sidebar-menu-skeleton.svelte +0 -36
  129. package/src/lib/components/ui/sidebar/sidebar-menu-sub-button.svelte +0 -43
  130. package/src/lib/components/ui/sidebar/sidebar-menu-sub-item.svelte +0 -21
  131. package/src/lib/components/ui/sidebar/sidebar-menu-sub.svelte +0 -25
  132. package/src/lib/components/ui/sidebar/sidebar-menu.svelte +0 -21
  133. package/src/lib/components/ui/sidebar/sidebar-provider.svelte +0 -53
  134. package/src/lib/components/ui/sidebar/sidebar-rail.svelte +0 -36
  135. package/src/lib/components/ui/sidebar/sidebar-separator.svelte +0 -19
  136. package/src/lib/components/ui/sidebar/sidebar-trigger.svelte +0 -35
  137. package/src/lib/components/ui/sidebar/sidebar.svelte +0 -101
  138. package/src/lib/components/ui/skeleton/index.ts +0 -7
  139. package/src/lib/components/ui/skeleton/skeleton.svelte +0 -17
  140. package/src/lib/components/ui/tabs/index.ts +0 -16
  141. package/src/lib/components/ui/tabs/tabs-content.svelte +0 -17
  142. package/src/lib/components/ui/tabs/tabs-list.svelte +0 -16
  143. package/src/lib/components/ui/tabs/tabs-trigger.svelte +0 -20
  144. package/src/lib/components/ui/tabs/tabs.svelte +0 -19
  145. package/src/lib/components/ui/textarea/index.ts +0 -7
  146. package/src/lib/components/ui/textarea/textarea.svelte +0 -22
  147. package/src/lib/components/ui/tooltip/index.ts +0 -21
  148. package/src/lib/components/ui/tooltip/tooltip-content.svelte +0 -47
  149. package/src/lib/components/ui/tooltip/tooltip-trigger.svelte +0 -7
  150. package/src/lib/hooks/is-mobile.svelte.ts +0 -9
  151. package/src/lib/utils.ts +0 -13
@@ -1,41 +0,0 @@
1
- <script lang="ts">
2
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
- import CheckIcon from '@lucide/svelte/icons/check';
4
- import MinusIcon from '@lucide/svelte/icons/minus';
5
- import { cn, type WithoutChildrenOrChild } from '@lib/utils.js';
6
- import type { Snippet } from 'svelte';
7
-
8
- let {
9
- ref = $bindable(null),
10
- checked = $bindable(false),
11
- indeterminate = $bindable(false),
12
- class: className,
13
- children: childrenProp,
14
- ...restProps
15
- }: WithoutChildrenOrChild<DropdownMenuPrimitive.CheckboxItemProps> & {
16
- children?: Snippet;
17
- } = $props();
18
- </script>
19
-
20
- <DropdownMenuPrimitive.CheckboxItem
21
- bind:ref
22
- bind:checked
23
- bind:indeterminate
24
- data-slot="dropdown-menu-checkbox-item"
25
- class={cn(
26
- "focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
27
- className
28
- )}
29
- {...restProps}
30
- >
31
- {#snippet children({ checked, indeterminate })}
32
- <span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
33
- {#if indeterminate}
34
- <MinusIcon class="size-4" />
35
- {:else}
36
- <CheckIcon class={cn('size-4', !checked && 'text-transparent')} />
37
- {/if}
38
- </span>
39
- {@render childrenProp?.()}
40
- {/snippet}
41
- </DropdownMenuPrimitive.CheckboxItem>
@@ -1,27 +0,0 @@
1
- <script lang="ts">
2
- import { cn } from '@lib/utils.js';
3
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
4
-
5
- let {
6
- ref = $bindable(null),
7
- sideOffset = 4,
8
- portalProps,
9
- class: className,
10
- ...restProps
11
- }: DropdownMenuPrimitive.ContentProps & {
12
- portalProps?: DropdownMenuPrimitive.PortalProps;
13
- } = $props();
14
- </script>
15
-
16
- <DropdownMenuPrimitive.Portal {...portalProps}>
17
- <DropdownMenuPrimitive.Content
18
- bind:ref
19
- data-slot="dropdown-menu-content"
20
- {sideOffset}
21
- class={cn(
22
- 'bg-popover text-popover-foreground 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 max-h-(--bits-dropdown-menu-content-available-height) origin-(--bits-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md outline-none',
23
- className
24
- )}
25
- {...restProps}
26
- />
27
- </DropdownMenuPrimitive.Portal>
@@ -1,22 +0,0 @@
1
- <script lang="ts">
2
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
- import { cn } from '@lib/utils.js';
4
- import type { ComponentProps } from 'svelte';
5
-
6
- let {
7
- ref = $bindable(null),
8
- class: className,
9
- inset,
10
- ...restProps
11
- }: ComponentProps<typeof DropdownMenuPrimitive.GroupHeading> & {
12
- inset?: boolean;
13
- } = $props();
14
- </script>
15
-
16
- <DropdownMenuPrimitive.GroupHeading
17
- bind:ref
18
- data-slot="dropdown-menu-group-heading"
19
- data-inset={inset}
20
- class={cn('px-2 py-1.5 text-sm font-semibold data-[inset]:pl-8', className)}
21
- {...restProps}
22
- />
@@ -1,7 +0,0 @@
1
- <script lang="ts">
2
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
-
4
- let { ref = $bindable(null), ...restProps }: DropdownMenuPrimitive.GroupProps = $props();
5
- </script>
6
-
7
- <DropdownMenuPrimitive.Group bind:ref data-slot="dropdown-menu-group" {...restProps} />
@@ -1,27 +0,0 @@
1
- <script lang="ts">
2
- import { cn } from '@lib/utils.js';
3
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
4
-
5
- let {
6
- ref = $bindable(null),
7
- class: className,
8
- inset,
9
- variant = 'default',
10
- ...restProps
11
- }: DropdownMenuPrimitive.ItemProps & {
12
- inset?: boolean;
13
- variant?: 'default' | 'destructive';
14
- } = $props();
15
- </script>
16
-
17
- <DropdownMenuPrimitive.Item
18
- bind:ref
19
- data-slot="dropdown-menu-item"
20
- data-inset={inset}
21
- data-variant={variant}
22
- class={cn(
23
- "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
24
- className
25
- )}
26
- {...restProps}
27
- />
@@ -1,24 +0,0 @@
1
- <script lang="ts">
2
- import { cn, type WithElementRef } from '@lib/utils.js';
3
- import type { HTMLAttributes } from 'svelte/elements';
4
-
5
- let {
6
- ref = $bindable(null),
7
- class: className,
8
- inset,
9
- children,
10
- ...restProps
11
- }: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
12
- inset?: boolean;
13
- } = $props();
14
- </script>
15
-
16
- <div
17
- bind:this={ref}
18
- data-slot="dropdown-menu-label"
19
- data-inset={inset}
20
- class={cn('px-2 py-1.5 text-sm font-semibold data-[inset]:pl-8', className)}
21
- {...restProps}
22
- >
23
- {@render children?.()}
24
- </div>
@@ -1,16 +0,0 @@
1
- <script lang="ts">
2
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
-
4
- let {
5
- ref = $bindable(null),
6
- value = $bindable(),
7
- ...restProps
8
- }: DropdownMenuPrimitive.RadioGroupProps = $props();
9
- </script>
10
-
11
- <DropdownMenuPrimitive.RadioGroup
12
- bind:ref
13
- bind:value
14
- data-slot="dropdown-menu-radio-group"
15
- {...restProps}
16
- />
@@ -1,31 +0,0 @@
1
- <script lang="ts">
2
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
- import CircleIcon from '@lucide/svelte/icons/circle';
4
- import { cn, type WithoutChild } from '@lib/utils.js';
5
-
6
- let {
7
- ref = $bindable(null),
8
- class: className,
9
- children: childrenProp,
10
- ...restProps
11
- }: WithoutChild<DropdownMenuPrimitive.RadioItemProps> = $props();
12
- </script>
13
-
14
- <DropdownMenuPrimitive.RadioItem
15
- bind:ref
16
- data-slot="dropdown-menu-radio-item"
17
- class={cn(
18
- "focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
19
- className
20
- )}
21
- {...restProps}
22
- >
23
- {#snippet children({ checked })}
24
- <span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
25
- {#if checked}
26
- <CircleIcon class="size-2 fill-current" />
27
- {/if}
28
- </span>
29
- {@render childrenProp?.({ checked })}
30
- {/snippet}
31
- </DropdownMenuPrimitive.RadioItem>
@@ -1,17 +0,0 @@
1
- <script lang="ts">
2
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
- import { cn } from '@lib/utils.js';
4
-
5
- let {
6
- ref = $bindable(null),
7
- class: className,
8
- ...restProps
9
- }: DropdownMenuPrimitive.SeparatorProps = $props();
10
- </script>
11
-
12
- <DropdownMenuPrimitive.Separator
13
- bind:ref
14
- data-slot="dropdown-menu-separator"
15
- class={cn('bg-border -mx-1 my-1 h-px', className)}
16
- {...restProps}
17
- />
@@ -1,20 +0,0 @@
1
- <script lang="ts">
2
- import type { HTMLAttributes } from 'svelte/elements';
3
- import { cn, type WithElementRef } from '@lib/utils.js';
4
-
5
- let {
6
- ref = $bindable(null),
7
- class: className,
8
- children,
9
- ...restProps
10
- }: WithElementRef<HTMLAttributes<HTMLSpanElement>> = $props();
11
- </script>
12
-
13
- <span
14
- bind:this={ref}
15
- data-slot="dropdown-menu-shortcut"
16
- class={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)}
17
- {...restProps}
18
- >
19
- {@render children?.()}
20
- </span>
@@ -1,20 +0,0 @@
1
- <script lang="ts">
2
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
- import { cn } from '@lib/utils.js';
4
-
5
- let {
6
- ref = $bindable(null),
7
- class: className,
8
- ...restProps
9
- }: DropdownMenuPrimitive.SubContentProps = $props();
10
- </script>
11
-
12
- <DropdownMenuPrimitive.SubContent
13
- bind:ref
14
- data-slot="dropdown-menu-sub-content"
15
- class={cn(
16
- 'bg-popover text-popover-foreground 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 origin-(--bits-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg',
17
- className
18
- )}
19
- {...restProps}
20
- />
@@ -1,29 +0,0 @@
1
- <script lang="ts">
2
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
- import ChevronRightIcon from '@lucide/svelte/icons/chevron-right';
4
- import { cn } from '@lib/utils.js';
5
-
6
- let {
7
- ref = $bindable(null),
8
- class: className,
9
- inset,
10
- children,
11
- ...restProps
12
- }: DropdownMenuPrimitive.SubTriggerProps & {
13
- inset?: boolean;
14
- } = $props();
15
- </script>
16
-
17
- <DropdownMenuPrimitive.SubTrigger
18
- bind:ref
19
- data-slot="dropdown-menu-sub-trigger"
20
- data-inset={inset}
21
- class={cn(
22
- "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground outline-hidden [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
23
- className
24
- )}
25
- {...restProps}
26
- >
27
- {@render children?.()}
28
- <ChevronRightIcon class="ml-auto size-4" />
29
- </DropdownMenuPrimitive.SubTrigger>
@@ -1,7 +0,0 @@
1
- <script lang="ts">
2
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
3
-
4
- let { ref = $bindable(null), ...restProps }: DropdownMenuPrimitive.TriggerProps = $props();
5
- </script>
6
-
7
- <DropdownMenuPrimitive.Trigger bind:ref data-slot="dropdown-menu-trigger" {...restProps} />
@@ -1,49 +0,0 @@
1
- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
2
- import CheckboxItem from './dropdown-menu-checkbox-item.svelte';
3
- import Content from './dropdown-menu-content.svelte';
4
- import Group from './dropdown-menu-group.svelte';
5
- import Item from './dropdown-menu-item.svelte';
6
- import Label from './dropdown-menu-label.svelte';
7
- import RadioGroup from './dropdown-menu-radio-group.svelte';
8
- import RadioItem from './dropdown-menu-radio-item.svelte';
9
- import Separator from './dropdown-menu-separator.svelte';
10
- import Shortcut from './dropdown-menu-shortcut.svelte';
11
- import Trigger from './dropdown-menu-trigger.svelte';
12
- import SubContent from './dropdown-menu-sub-content.svelte';
13
- import SubTrigger from './dropdown-menu-sub-trigger.svelte';
14
- import GroupHeading from './dropdown-menu-group-heading.svelte';
15
- const Sub = DropdownMenuPrimitive.Sub;
16
- const Root = DropdownMenuPrimitive.Root;
17
-
18
- export {
19
- CheckboxItem,
20
- Content,
21
- Root as DropdownMenu,
22
- CheckboxItem as DropdownMenuCheckboxItem,
23
- Content as DropdownMenuContent,
24
- Group as DropdownMenuGroup,
25
- Item as DropdownMenuItem,
26
- Label as DropdownMenuLabel,
27
- RadioGroup as DropdownMenuRadioGroup,
28
- RadioItem as DropdownMenuRadioItem,
29
- Separator as DropdownMenuSeparator,
30
- Shortcut as DropdownMenuShortcut,
31
- Sub as DropdownMenuSub,
32
- SubContent as DropdownMenuSubContent,
33
- SubTrigger as DropdownMenuSubTrigger,
34
- Trigger as DropdownMenuTrigger,
35
- GroupHeading as DropdownMenuGroupHeading,
36
- Group,
37
- GroupHeading,
38
- Item,
39
- Label,
40
- RadioGroup,
41
- RadioItem,
42
- Root,
43
- Separator,
44
- Shortcut,
45
- Sub,
46
- SubContent,
47
- SubTrigger,
48
- Trigger
49
- };
@@ -1,7 +0,0 @@
1
- import Root from './input.svelte';
2
-
3
- export {
4
- Root,
5
- //
6
- Root as Input
7
- };
@@ -1,52 +0,0 @@
1
- <script lang="ts">
2
- import type { HTMLInputAttributes, HTMLInputTypeAttribute } from 'svelte/elements';
3
- import { cn, type WithElementRef } from '@lib/utils.js';
4
-
5
- type InputType = Exclude<HTMLInputTypeAttribute, 'file'>;
6
-
7
- type Props = WithElementRef<
8
- Omit<HTMLInputAttributes, 'type'> &
9
- ({ type: 'file'; files?: FileList } | { type?: InputType; files?: undefined })
10
- >;
11
-
12
- let {
13
- ref = $bindable(null),
14
- value = $bindable(),
15
- type,
16
- files = $bindable(),
17
- class: className,
18
- 'data-slot': dataSlot = 'input',
19
- ...restProps
20
- }: Props = $props();
21
- </script>
22
-
23
- {#if type === 'file'}
24
- <input
25
- bind:this={ref}
26
- data-slot={dataSlot}
27
- class={cn(
28
- 'selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground shadow-xs flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50',
29
- 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
30
- 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
31
- className
32
- )}
33
- type="file"
34
- bind:files
35
- bind:value
36
- {...restProps}
37
- />
38
- {:else}
39
- <input
40
- bind:this={ref}
41
- data-slot={dataSlot}
42
- class={cn(
43
- 'border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground shadow-xs flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
44
- 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
45
- 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
46
- className
47
- )}
48
- {type}
49
- bind:value
50
- {...restProps}
51
- />
52
- {/if}
@@ -1,7 +0,0 @@
1
- import Root from './label.svelte';
2
-
3
- export {
4
- Root,
5
- //
6
- Root as Label
7
- };
@@ -1,20 +0,0 @@
1
- <script lang="ts">
2
- import { Label as LabelPrimitive } from 'bits-ui';
3
- import { cn } from '@lib/utils.js';
4
-
5
- let {
6
- ref = $bindable(null),
7
- class: className,
8
- ...restProps
9
- }: LabelPrimitive.RootProps = $props();
10
- </script>
11
-
12
- <LabelPrimitive.Root
13
- bind:ref
14
- data-slot="label"
15
- class={cn(
16
- 'flex select-none items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',
17
- className
18
- )}
19
- {...restProps}
20
- />
@@ -1,17 +0,0 @@
1
- import { Popover as PopoverPrimitive } from 'bits-ui';
2
- import Content from './popover-content.svelte';
3
- import Trigger from './popover-trigger.svelte';
4
- const Root = PopoverPrimitive.Root;
5
- const Close = PopoverPrimitive.Close;
6
-
7
- export {
8
- Root,
9
- Content,
10
- Trigger,
11
- Close,
12
- //
13
- Root as Popover,
14
- Content as PopoverContent,
15
- Trigger as PopoverTrigger,
16
- Close as PopoverClose
17
- };
@@ -1,29 +0,0 @@
1
- <script lang="ts">
2
- import { cn } from '@lib/utils.js';
3
- import { Popover as PopoverPrimitive } from 'bits-ui';
4
-
5
- let {
6
- ref = $bindable(null),
7
- class: className,
8
- sideOffset = 4,
9
- align = 'center',
10
- portalProps,
11
- ...restProps
12
- }: PopoverPrimitive.ContentProps & {
13
- portalProps?: PopoverPrimitive.PortalProps;
14
- } = $props();
15
- </script>
16
-
17
- <PopoverPrimitive.Portal {...portalProps}>
18
- <PopoverPrimitive.Content
19
- bind:ref
20
- data-slot="popover-content"
21
- {sideOffset}
22
- {align}
23
- class={cn(
24
- 'bg-popover text-popover-foreground 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 origin-(--bits-popover-content-transform-origin) outline-hidden z-50 w-72 rounded-md border p-4 shadow-md',
25
- className
26
- )}
27
- {...restProps}
28
- />
29
- </PopoverPrimitive.Portal>
@@ -1,17 +0,0 @@
1
- <script lang="ts">
2
- import { cn } from '@lib/utils.js';
3
- import { Popover as PopoverPrimitive } from 'bits-ui';
4
-
5
- let {
6
- ref = $bindable(null),
7
- class: className,
8
- ...restProps
9
- }: PopoverPrimitive.TriggerProps = $props();
10
- </script>
11
-
12
- <PopoverPrimitive.Trigger
13
- bind:ref
14
- data-slot="popover-trigger"
15
- class={cn('', className)}
16
- {...restProps}
17
- />
@@ -1,37 +0,0 @@
1
- import { Select as SelectPrimitive } from 'bits-ui';
2
-
3
- import Group from './select-group.svelte';
4
- import Label from './select-label.svelte';
5
- import Item from './select-item.svelte';
6
- import Content from './select-content.svelte';
7
- import Trigger from './select-trigger.svelte';
8
- import Separator from './select-separator.svelte';
9
- import ScrollDownButton from './select-scroll-down-button.svelte';
10
- import ScrollUpButton from './select-scroll-up-button.svelte';
11
- import GroupHeading from './select-group-heading.svelte';
12
-
13
- const Root = SelectPrimitive.Root;
14
-
15
- export {
16
- Root,
17
- Group,
18
- Label,
19
- Item,
20
- Content,
21
- Trigger,
22
- Separator,
23
- ScrollDownButton,
24
- ScrollUpButton,
25
- GroupHeading,
26
- //
27
- Root as Select,
28
- Group as SelectGroup,
29
- Label as SelectLabel,
30
- Item as SelectItem,
31
- Content as SelectContent,
32
- Trigger as SelectTrigger,
33
- Separator as SelectSeparator,
34
- ScrollDownButton as SelectScrollDownButton,
35
- ScrollUpButton as SelectScrollUpButton,
36
- GroupHeading as SelectGroupHeading
37
- };
@@ -1,40 +0,0 @@
1
- <script lang="ts">
2
- import { Select as SelectPrimitive } from 'bits-ui';
3
- import SelectScrollUpButton from './select-scroll-up-button.svelte';
4
- import SelectScrollDownButton from './select-scroll-down-button.svelte';
5
- import { cn, type WithoutChild } from '@lib/utils.js';
6
-
7
- let {
8
- ref = $bindable(null),
9
- class: className,
10
- sideOffset = 4,
11
- portalProps,
12
- children,
13
- ...restProps
14
- }: WithoutChild<SelectPrimitive.ContentProps> & {
15
- portalProps?: SelectPrimitive.PortalProps;
16
- } = $props();
17
- </script>
18
-
19
- <SelectPrimitive.Portal {...portalProps}>
20
- <SelectPrimitive.Content
21
- bind:ref
22
- {sideOffset}
23
- data-slot="select-content"
24
- class={cn(
25
- 'bg-popover text-popover-foreground 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 max-h-(--bits-select-content-available-height) origin-(--bits-select-content-transform-origin) relative z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border shadow-md data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
26
- className
27
- )}
28
- {...restProps}
29
- >
30
- <SelectScrollUpButton />
31
- <SelectPrimitive.Viewport
32
- class={cn(
33
- 'h-(--bits-select-anchor-height) min-w-(--bits-select-anchor-width) w-full scroll-my-1 p-1'
34
- )}
35
- >
36
- {@render children?.()}
37
- </SelectPrimitive.Viewport>
38
- <SelectScrollDownButton />
39
- </SelectPrimitive.Content>
40
- </SelectPrimitive.Portal>
@@ -1,21 +0,0 @@
1
- <script lang="ts">
2
- import { Select as SelectPrimitive } from 'bits-ui';
3
- import { cn } from '@lib/utils.js';
4
- import type { ComponentProps } from 'svelte';
5
-
6
- let {
7
- ref = $bindable(null),
8
- class: className,
9
- children,
10
- ...restProps
11
- }: ComponentProps<typeof SelectPrimitive.GroupHeading> = $props();
12
- </script>
13
-
14
- <SelectPrimitive.GroupHeading
15
- bind:ref
16
- data-slot="select-group-heading"
17
- class={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}
18
- {...restProps}
19
- >
20
- {@render children?.()}
21
- </SelectPrimitive.GroupHeading>
@@ -1,7 +0,0 @@
1
- <script lang="ts">
2
- import { Select as SelectPrimitive } from 'bits-ui';
3
-
4
- let { ref = $bindable(null), ...restProps }: SelectPrimitive.GroupProps = $props();
5
- </script>
6
-
7
- <SelectPrimitive.Group data-slot="select-group" {...restProps} />
@@ -1,38 +0,0 @@
1
- <script lang="ts">
2
- import CheckIcon from '@lucide/svelte/icons/check';
3
- import { Select as SelectPrimitive } from 'bits-ui';
4
- import { cn, type WithoutChild } from '@lib/utils.js';
5
-
6
- let {
7
- ref = $bindable(null),
8
- class: className,
9
- value,
10
- label,
11
- children: childrenProp,
12
- ...restProps
13
- }: WithoutChild<SelectPrimitive.ItemProps> = $props();
14
- </script>
15
-
16
- <SelectPrimitive.Item
17
- bind:ref
18
- {value}
19
- data-slot="select-item"
20
- class={cn(
21
- "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
22
- className
23
- )}
24
- {...restProps}
25
- >
26
- {#snippet children({ selected, highlighted })}
27
- <span class="absolute right-2 flex size-3.5 items-center justify-center">
28
- {#if selected}
29
- <CheckIcon class="size-4" />
30
- {/if}
31
- </span>
32
- {#if childrenProp}
33
- {@render childrenProp({ selected, highlighted })}
34
- {:else}
35
- {label || value}
36
- {/if}
37
- {/snippet}
38
- </SelectPrimitive.Item>