@aphexcms/ui 0.1.0 → 0.1.1
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.
- package/dist/components/app-sidebar.svelte +171 -0
- package/dist/components/app-sidebar.svelte.d.ts +9 -0
- package/dist/components/nav-main.svelte +64 -0
- package/dist/components/nav-main.svelte.d.ts +15 -0
- package/dist/components/nav-projects.svelte +76 -0
- package/dist/components/nav-projects.svelte.d.ts +10 -0
- package/dist/components/nav-user.svelte +87 -0
- package/dist/components/nav-user.svelte.d.ts +10 -0
- package/dist/components/sidebar-07/+page.svelte +39 -0
- package/dist/components/sidebar-07/+page.svelte.d.ts +18 -0
- package/dist/components/team-switcher.svelte +67 -0
- package/dist/components/team-switcher.svelte.d.ts +10 -0
- package/dist/components/ui/alert/alert-description.svelte +23 -0
- package/dist/components/ui/alert/alert-description.svelte.d.ts +5 -0
- package/dist/components/ui/alert/alert-title.svelte +20 -0
- package/dist/components/ui/alert/alert-title.svelte.d.ts +5 -0
- package/dist/components/ui/alert/alert.svelte +44 -0
- package/dist/components/ui/alert/alert.svelte.d.ts +26 -0
- package/dist/components/ui/alert/index.d.ts +5 -0
- package/dist/components/ui/alert/index.js +7 -0
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte +18 -0
- package/dist/components/ui/alert-dialog/alert-dialog-action.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte +18 -0
- package/dist/components/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte +27 -0
- package/dist/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +8 -0
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte +17 -0
- package/dist/components/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte +20 -0
- package/dist/components/ui/alert-dialog/alert-dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte +20 -0
- package/dist/components/ui/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte +20 -0
- package/dist/components/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte +17 -0
- package/dist/components/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/alert-dialog-trigger.svelte +7 -0
- package/dist/components/ui/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/alert-dialog/index.d.ts +12 -0
- package/dist/components/ui/alert-dialog/index.js +15 -0
- package/dist/components/ui/avatar/avatar-fallback.svelte +17 -0
- package/dist/components/ui/avatar/avatar-fallback.svelte.d.ts +4 -0
- package/dist/components/ui/avatar/avatar-image.svelte +17 -0
- package/dist/components/ui/avatar/avatar-image.svelte.d.ts +4 -0
- package/dist/components/ui/avatar/avatar.svelte +19 -0
- package/dist/components/ui/avatar/avatar.svelte.d.ts +4 -0
- package/dist/components/ui/avatar/index.d.ts +4 -0
- package/dist/components/ui/avatar/index.js +6 -0
- package/dist/components/ui/badge/badge.svelte +49 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +32 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.js +2 -0
- package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +23 -0
- package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +5 -0
- package/dist/components/ui/breadcrumb/breadcrumb-item.svelte +20 -0
- package/dist/components/ui/breadcrumb/breadcrumb-item.svelte.d.ts +5 -0
- package/dist/components/ui/breadcrumb/breadcrumb-link.svelte +31 -0
- package/dist/components/ui/breadcrumb/breadcrumb-link.svelte.d.ts +11 -0
- package/dist/components/ui/breadcrumb/breadcrumb-list.svelte +23 -0
- package/dist/components/ui/breadcrumb/breadcrumb-list.svelte.d.ts +5 -0
- package/dist/components/ui/breadcrumb/breadcrumb-page.svelte +23 -0
- package/dist/components/ui/breadcrumb/breadcrumb-page.svelte.d.ts +5 -0
- package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte +27 -0
- package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte.d.ts +5 -0
- package/dist/components/ui/breadcrumb/breadcrumb.svelte +21 -0
- package/dist/components/ui/breadcrumb/breadcrumb.svelte.d.ts +5 -0
- package/dist/components/ui/breadcrumb/index.d.ts +8 -0
- package/dist/components/ui/breadcrumb/index.js +10 -0
- package/dist/components/ui/button/button.svelte +82 -0
- package/dist/components/ui/button/button.svelte.d.ts +64 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +4 -0
- package/dist/components/ui/card/card-action.svelte +20 -0
- package/dist/components/ui/card/card-action.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-content.svelte +15 -0
- package/dist/components/ui/card/card-content.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-description.svelte +20 -0
- package/dist/components/ui/card/card-description.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-footer.svelte +20 -0
- package/dist/components/ui/card/card-footer.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-header.svelte +23 -0
- package/dist/components/ui/card/card-header.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-title.svelte +20 -0
- package/dist/components/ui/card/card-title.svelte.d.ts +5 -0
- package/dist/components/ui/card/card.svelte +23 -0
- package/dist/components/ui/card/card.svelte.d.ts +5 -0
- package/dist/components/ui/card/index.d.ts +8 -0
- package/dist/components/ui/card/index.js +10 -0
- package/dist/components/ui/collapsible/collapsible-content.svelte +7 -0
- package/dist/components/ui/collapsible/collapsible-content.svelte.d.ts +4 -0
- package/dist/components/ui/collapsible/collapsible-trigger.svelte +7 -0
- package/dist/components/ui/collapsible/collapsible-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/collapsible/collapsible.svelte +11 -0
- package/dist/components/ui/collapsible/collapsible.svelte.d.ts +4 -0
- package/dist/components/ui/collapsible/index.d.ts +4 -0
- package/dist/components/ui/collapsible/index.js +6 -0
- package/dist/components/ui/command/command-dialog.svelte +40 -0
- package/dist/components/ui/command/command-dialog.svelte.d.ts +12 -0
- package/dist/components/ui/command/command-empty.svelte +17 -0
- package/dist/components/ui/command/command-empty.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-group.svelte +30 -0
- package/dist/components/ui/command/command-group.svelte.d.ts +7 -0
- package/dist/components/ui/command/command-input.svelte +26 -0
- package/dist/components/ui/command/command-input.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-item.svelte +20 -0
- package/dist/components/ui/command/command-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-link-item.svelte +20 -0
- package/dist/components/ui/command/command-link-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-list.svelte +17 -0
- package/dist/components/ui/command/command-list.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-separator.svelte +17 -0
- package/dist/components/ui/command/command-separator.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-shortcut.svelte +20 -0
- package/dist/components/ui/command/command-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/command/command.svelte +22 -0
- package/dist/components/ui/command/command.svelte.d.ts +4 -0
- package/dist/components/ui/command/index.d.ts +13 -0
- package/dist/components/ui/command/index.js +15 -0
- package/dist/components/ui/dialog/dialog-close.svelte +7 -0
- package/dist/components/ui/dialog/dialog-close.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-content.svelte +43 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +11 -0
- package/dist/components/ui/dialog/dialog-description.svelte +17 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +20 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-header.svelte +20 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +20 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-title.svelte +17 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte +7 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/index.d.ts +11 -0
- package/dist/components/ui/dialog/index.js +14 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +41 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +9 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +27 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +22 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-group.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +27 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +24 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +16 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +31 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +17 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +20 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +20 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +29 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +7 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +25 -0
- package/dist/components/ui/dropdown-menu/index.js +17 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.js +4 -0
- package/dist/components/ui/input/input.svelte +52 -0
- package/dist/components/ui/input/input.svelte.d.ts +13 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.js +4 -0
- package/dist/components/ui/label/label.svelte +20 -0
- package/dist/components/ui/label/label.svelte.d.ts +4 -0
- package/dist/components/ui/popover/index.d.ts +6 -0
- package/dist/components/ui/popover/index.js +8 -0
- package/dist/components/ui/popover/popover-content.svelte +29 -0
- package/dist/components/ui/popover/popover-content.svelte.d.ts +7 -0
- package/dist/components/ui/popover/popover-trigger.svelte +17 -0
- package/dist/components/ui/popover/popover-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/index.js +14 -0
- package/dist/components/ui/select/select-content.svelte +40 -0
- package/dist/components/ui/select/select-content.svelte.d.ts +8 -0
- package/dist/components/ui/select/select-group-heading.svelte +21 -0
- package/dist/components/ui/select/select-group-heading.svelte.d.ts +10 -0
- package/dist/components/ui/select/select-group.svelte +7 -0
- package/dist/components/ui/select/select-group.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-item.svelte +38 -0
- package/dist/components/ui/select/select-item.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-label.svelte +20 -0
- package/dist/components/ui/select/select-label.svelte.d.ts +6 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte +20 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte +20 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-separator.svelte +18 -0
- package/dist/components/ui/select/select-separator.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-trigger.svelte +29 -0
- package/dist/components/ui/select/select-trigger.svelte.d.ts +8 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.js +4 -0
- package/dist/components/ui/separator/separator.svelte +21 -0
- package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui/sheet/index.d.ts +11 -0
- package/dist/components/ui/sheet/index.js +14 -0
- package/dist/components/ui/sheet/sheet-close.svelte +7 -0
- package/dist/components/ui/sheet/sheet-close.svelte.d.ts +4 -0
- package/dist/components/ui/sheet/sheet-content.svelte +60 -0
- package/dist/components/ui/sheet/sheet-content.svelte.d.ts +35 -0
- package/dist/components/ui/sheet/sheet-description.svelte +17 -0
- package/dist/components/ui/sheet/sheet-description.svelte.d.ts +4 -0
- package/dist/components/ui/sheet/sheet-footer.svelte +20 -0
- package/dist/components/ui/sheet/sheet-footer.svelte.d.ts +5 -0
- package/dist/components/ui/sheet/sheet-header.svelte +20 -0
- package/dist/components/ui/sheet/sheet-header.svelte.d.ts +5 -0
- package/dist/components/ui/sheet/sheet-overlay.svelte +20 -0
- package/dist/components/ui/sheet/sheet-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/sheet/sheet-title.svelte +17 -0
- package/dist/components/ui/sheet/sheet-title.svelte.d.ts +4 -0
- package/dist/components/ui/sheet/sheet-trigger.svelte +7 -0
- package/dist/components/ui/sheet/sheet-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/sidebar/constants.d.ts +6 -0
- package/dist/components/ui/sidebar/constants.js +6 -0
- package/dist/components/ui/sidebar/context.svelte.d.ts +42 -0
- package/dist/components/ui/sidebar/context.svelte.js +52 -0
- package/dist/components/ui/sidebar/index.d.ts +25 -0
- package/dist/components/ui/sidebar/index.js +27 -0
- package/dist/components/ui/sidebar/sidebar-content.svelte +24 -0
- package/dist/components/ui/sidebar/sidebar-content.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-footer.svelte +21 -0
- package/dist/components/ui/sidebar/sidebar-footer.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-group-action.svelte +36 -0
- package/dist/components/ui/sidebar/sidebar-group-action.svelte.d.ts +11 -0
- package/dist/components/ui/sidebar/sidebar-group-content.svelte +21 -0
- package/dist/components/ui/sidebar/sidebar-group-content.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-group-label.svelte +34 -0
- package/dist/components/ui/sidebar/sidebar-group-label.svelte.d.ts +11 -0
- package/dist/components/ui/sidebar/sidebar-group.svelte +21 -0
- package/dist/components/ui/sidebar/sidebar-group.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-header.svelte +21 -0
- package/dist/components/ui/sidebar/sidebar-header.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-input.svelte +21 -0
- package/dist/components/ui/sidebar/sidebar-input.svelte.d.ts +11 -0
- package/dist/components/ui/sidebar/sidebar-inset.svelte +24 -0
- package/dist/components/ui/sidebar/sidebar-inset.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-menu-action.svelte +43 -0
- package/dist/components/ui/sidebar/sidebar-menu-action.svelte.d.ts +12 -0
- package/dist/components/ui/sidebar/sidebar-menu-badge.svelte +29 -0
- package/dist/components/ui/sidebar/sidebar-menu-badge.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-menu-button.svelte +101 -0
- package/dist/components/ui/sidebar/sidebar-menu-button.svelte.d.ts +51 -0
- package/dist/components/ui/sidebar/sidebar-menu-item.svelte +21 -0
- package/dist/components/ui/sidebar/sidebar-menu-item.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-menu-skeleton.svelte +36 -0
- package/dist/components/ui/sidebar/sidebar-menu-skeleton.svelte.d.ts +8 -0
- package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +43 -0
- package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte.d.ts +13 -0
- package/dist/components/ui/sidebar/sidebar-menu-sub-item.svelte +21 -0
- package/dist/components/ui/sidebar/sidebar-menu-sub-item.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-menu-sub.svelte +25 -0
- package/dist/components/ui/sidebar/sidebar-menu-sub.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-menu.svelte +21 -0
- package/dist/components/ui/sidebar/sidebar-menu.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-provider.svelte +53 -0
- package/dist/components/ui/sidebar/sidebar-provider.svelte.d.ts +9 -0
- package/dist/components/ui/sidebar/sidebar-rail.svelte +36 -0
- package/dist/components/ui/sidebar/sidebar-rail.svelte.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-separator.svelte +19 -0
- package/dist/components/ui/sidebar/sidebar-separator.svelte.d.ts +13 -0
- package/dist/components/ui/sidebar/sidebar-trigger.svelte +35 -0
- package/dist/components/ui/sidebar/sidebar-trigger.svelte.d.ts +8 -0
- package/dist/components/ui/sidebar/sidebar.svelte +101 -0
- package/dist/components/ui/sidebar/sidebar.svelte.d.ts +10 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.js +4 -0
- package/dist/components/ui/skeleton/skeleton.svelte +17 -0
- package/dist/components/ui/skeleton/skeleton.svelte.d.ts +5 -0
- package/dist/components/ui/tabs/index.d.ts +5 -0
- package/dist/components/ui/tabs/index.js +7 -0
- package/dist/components/ui/tabs/tabs-content.svelte +17 -0
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-list.svelte +16 -0
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte +20 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs.svelte +19 -0
- package/dist/components/ui/tabs/tabs.svelte.d.ts +4 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/dist/components/ui/textarea/textarea.svelte +22 -0
- package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
- package/dist/components/ui/tooltip/index.d.ts +7 -0
- package/dist/components/ui/tooltip/index.js +9 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +47 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +7 -0
- package/dist/components/ui/tooltip/tooltip-trigger.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/hooks/is-mobile.svelte.d.ts +4 -0
- package/dist/hooks/is-mobile.svelte.js +7 -0
- package/dist/utils.d.ts +12 -0
- package/dist/utils.js +5 -0
- package/package.json +18 -2
- package/src/app.css +130 -130
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: CommandPrimitive.EmptyProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CommandPrimitive.Empty
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="command-empty"
|
|
15
|
+
class={cn('py-6 text-center text-sm', className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive, useId } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
heading,
|
|
10
|
+
value,
|
|
11
|
+
...restProps
|
|
12
|
+
}: CommandPrimitive.GroupProps & {
|
|
13
|
+
heading?: string;
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<CommandPrimitive.Group
|
|
18
|
+
bind:ref
|
|
19
|
+
data-slot="command-group"
|
|
20
|
+
class={cn('text-foreground overflow-hidden p-1', className)}
|
|
21
|
+
value={value ?? heading ?? `----${useId()}`}
|
|
22
|
+
{...restProps}
|
|
23
|
+
>
|
|
24
|
+
{#if heading}
|
|
25
|
+
<CommandPrimitive.GroupHeading class="text-muted-foreground px-2 py-1.5 text-xs font-medium">
|
|
26
|
+
{heading}
|
|
27
|
+
</CommandPrimitive.GroupHeading>
|
|
28
|
+
{/if}
|
|
29
|
+
<CommandPrimitive.GroupItems {children} />
|
|
30
|
+
</CommandPrimitive.Group>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
2
|
+
type $$ComponentProps = CommandPrimitive.GroupProps & {
|
|
3
|
+
heading?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const CommandGroup: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
|
+
type CommandGroup = ReturnType<typeof CommandGroup>;
|
|
7
|
+
export default CommandGroup;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
3
|
+
import SearchIcon from '@lucide/svelte/icons/search';
|
|
4
|
+
import { cn } from '../../../utils.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
value = $bindable(''),
|
|
10
|
+
...restProps
|
|
11
|
+
}: CommandPrimitive.InputProps = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div class="flex h-9 items-center gap-2 border-b pl-3 pr-8" data-slot="command-input-wrapper">
|
|
15
|
+
<SearchIcon class="size-4 shrink-0 opacity-50" />
|
|
16
|
+
<CommandPrimitive.Input
|
|
17
|
+
data-slot="command-input"
|
|
18
|
+
class={cn(
|
|
19
|
+
'placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50',
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
bind:ref
|
|
23
|
+
{...restProps}
|
|
24
|
+
bind:value
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: CommandPrimitive.ItemProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CommandPrimitive.Item
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="command-item"
|
|
15
|
+
class={cn(
|
|
16
|
+
"aria-selected:bg-accent aria-selected:text-accent-foreground [&_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-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: CommandPrimitive.LinkItemProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CommandPrimitive.LinkItem
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="command-item"
|
|
15
|
+
class={cn(
|
|
16
|
+
"aria-selected:bg-accent aria-selected:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: CommandPrimitive.ListProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CommandPrimitive.List
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="command-list"
|
|
15
|
+
class={cn('max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden', className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: CommandPrimitive.SeparatorProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CommandPrimitive.Separator
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="command-separator"
|
|
15
|
+
class={cn('bg-border -mx-1 h-px', className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
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="command-shortcut"
|
|
16
|
+
class={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</span>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const CommandShortcut: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLSpanElement>>, {}, "ref">;
|
|
4
|
+
type CommandShortcut = ReturnType<typeof CommandShortcut>;
|
|
5
|
+
export default CommandShortcut;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
value = $bindable(''),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: CommandPrimitive.RootProps = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<CommandPrimitive.Root
|
|
14
|
+
bind:value
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="command"
|
|
17
|
+
class={cn(
|
|
18
|
+
'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...restProps}
|
|
22
|
+
/>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
2
|
+
import Root from './command.svelte';
|
|
3
|
+
import Dialog from './command-dialog.svelte';
|
|
4
|
+
import Empty from './command-empty.svelte';
|
|
5
|
+
import Group from './command-group.svelte';
|
|
6
|
+
import Item from './command-item.svelte';
|
|
7
|
+
import Input from './command-input.svelte';
|
|
8
|
+
import List from './command-list.svelte';
|
|
9
|
+
import Separator from './command-separator.svelte';
|
|
10
|
+
import Shortcut from './command-shortcut.svelte';
|
|
11
|
+
import LinkItem from './command-link-item.svelte';
|
|
12
|
+
declare const Loading: import("svelte").Component<CommandPrimitive.LoadingProps, {}, "ref">;
|
|
13
|
+
export { Root, Dialog, Empty, Group, Item, LinkItem, Input, List, Separator, Shortcut, Loading, Root as Command, Dialog as CommandDialog, Empty as CommandEmpty, Group as CommandGroup, Item as CommandItem, LinkItem as CommandLinkItem, Input as CommandInput, List as CommandList, Separator as CommandSeparator, Shortcut as CommandShortcut, Loading as CommandLoading };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from 'bits-ui';
|
|
2
|
+
import Root from './command.svelte';
|
|
3
|
+
import Dialog from './command-dialog.svelte';
|
|
4
|
+
import Empty from './command-empty.svelte';
|
|
5
|
+
import Group from './command-group.svelte';
|
|
6
|
+
import Item from './command-item.svelte';
|
|
7
|
+
import Input from './command-input.svelte';
|
|
8
|
+
import List from './command-list.svelte';
|
|
9
|
+
import Separator from './command-separator.svelte';
|
|
10
|
+
import Shortcut from './command-shortcut.svelte';
|
|
11
|
+
import LinkItem from './command-link-item.svelte';
|
|
12
|
+
const Loading = CommandPrimitive.Loading;
|
|
13
|
+
export { Root, Dialog, Empty, Group, Item, LinkItem, Input, List, Separator, Shortcut, Loading,
|
|
14
|
+
//
|
|
15
|
+
Root as Command, Dialog as CommandDialog, Empty as CommandEmpty, Group as CommandGroup, Item as CommandItem, LinkItem as CommandLinkItem, Input as CommandInput, List as CommandList, Separator as CommandSeparator, Shortcut as CommandShortcut, Loading as CommandLoading };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Dialog as DialogPrimitive } from 'bits-ui';
|
|
3
|
+
import XIcon from '@lucide/svelte/icons/x';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
import * as Dialog from './index.js';
|
|
6
|
+
import { cn, type WithoutChildrenOrChild } from '../../../utils.js';
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
ref = $bindable(null),
|
|
10
|
+
class: className,
|
|
11
|
+
portalProps,
|
|
12
|
+
children,
|
|
13
|
+
showCloseButton = true,
|
|
14
|
+
...restProps
|
|
15
|
+
}: WithoutChildrenOrChild<DialogPrimitive.ContentProps> & {
|
|
16
|
+
portalProps?: DialogPrimitive.PortalProps;
|
|
17
|
+
children: Snippet;
|
|
18
|
+
showCloseButton?: boolean;
|
|
19
|
+
} = $props();
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<Dialog.Portal {...portalProps}>
|
|
23
|
+
<Dialog.Overlay />
|
|
24
|
+
<DialogPrimitive.Content
|
|
25
|
+
bind:ref
|
|
26
|
+
data-slot="dialog-content"
|
|
27
|
+
class={cn(
|
|
28
|
+
'bg-background 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 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',
|
|
29
|
+
className
|
|
30
|
+
)}
|
|
31
|
+
{...restProps}
|
|
32
|
+
>
|
|
33
|
+
{@render children?.()}
|
|
34
|
+
{#if showCloseButton}
|
|
35
|
+
<DialogPrimitive.Close
|
|
36
|
+
class="ring-offset-background focus:ring-ring rounded-xs focus:outline-hidden absolute end-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
37
|
+
>
|
|
38
|
+
<XIcon />
|
|
39
|
+
<span class="sr-only">Close</span>
|
|
40
|
+
</DialogPrimitive.Close>
|
|
41
|
+
{/if}
|
|
42
|
+
</DialogPrimitive.Content>
|
|
43
|
+
</Dialog.Portal>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from 'bits-ui';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import { type WithoutChildrenOrChild } from '../../../utils.js';
|
|
4
|
+
type $$ComponentProps = WithoutChildrenOrChild<DialogPrimitive.ContentProps> & {
|
|
5
|
+
portalProps?: DialogPrimitive.PortalProps;
|
|
6
|
+
children: Snippet;
|
|
7
|
+
showCloseButton?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const DialogContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
10
|
+
type DialogContent = ReturnType<typeof DialogContent>;
|
|
11
|
+
export default DialogContent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Dialog as DialogPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: DialogPrimitive.DescriptionProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DialogPrimitive.Description
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="dialog-description"
|
|
15
|
+
class={cn('text-muted-foreground text-sm', className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="dialog-footer"
|
|
16
|
+
class={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const DialogFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type DialogFooter = ReturnType<typeof DialogFooter>;
|
|
5
|
+
export default DialogFooter;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="dialog-header"
|
|
16
|
+
class={cn('flex flex-col gap-2 text-center sm:text-left', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
3
|
+
declare const DialogHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type DialogHeader = ReturnType<typeof DialogHeader>;
|
|
5
|
+
export default DialogHeader;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Dialog as DialogPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: DialogPrimitive.OverlayProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DialogPrimitive.Overlay
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="dialog-overlay"
|
|
15
|
+
class={cn(
|
|
16
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Dialog as DialogPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: DialogPrimitive.TitleProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DialogPrimitive.Title
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="dialog-title"
|
|
15
|
+
class={cn('text-lg font-semibold leading-none', className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Title from './dialog-title.svelte';
|
|
2
|
+
import Footer from './dialog-footer.svelte';
|
|
3
|
+
import Header from './dialog-header.svelte';
|
|
4
|
+
import Overlay from './dialog-overlay.svelte';
|
|
5
|
+
import Content from './dialog-content.svelte';
|
|
6
|
+
import Description from './dialog-description.svelte';
|
|
7
|
+
import Trigger from './dialog-trigger.svelte';
|
|
8
|
+
import Close from './dialog-close.svelte';
|
|
9
|
+
declare const Root: import("svelte").Component<import("bits-ui").AlertDialogRootPropsWithoutHTML, {}, "open">;
|
|
10
|
+
declare const Portal: import("svelte").Component<import("bits-ui").PortalProps, {}, "">;
|
|
11
|
+
export { Root, Title, Portal, Footer, Header, Trigger, Overlay, Content, Description, Close, Root as Dialog, Title as DialogTitle, Portal as DialogPortal, Footer as DialogFooter, Header as DialogHeader, Trigger as DialogTrigger, Overlay as DialogOverlay, Content as DialogContent, Description as DialogDescription, Close as DialogClose };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from 'bits-ui';
|
|
2
|
+
import Title from './dialog-title.svelte';
|
|
3
|
+
import Footer from './dialog-footer.svelte';
|
|
4
|
+
import Header from './dialog-header.svelte';
|
|
5
|
+
import Overlay from './dialog-overlay.svelte';
|
|
6
|
+
import Content from './dialog-content.svelte';
|
|
7
|
+
import Description from './dialog-description.svelte';
|
|
8
|
+
import Trigger from './dialog-trigger.svelte';
|
|
9
|
+
import Close from './dialog-close.svelte';
|
|
10
|
+
const Root = DialogPrimitive.Root;
|
|
11
|
+
const Portal = DialogPrimitive.Portal;
|
|
12
|
+
export { Root, Title, Portal, Footer, Header, Trigger, Overlay, Content, Description, Close,
|
|
13
|
+
//
|
|
14
|
+
Root as Dialog, Title as DialogTitle, Portal as DialogPortal, Footer as DialogFooter, Header as DialogHeader, Trigger as DialogTrigger, Overlay as DialogOverlay, Content as DialogContent, Description as DialogDescription, Close as DialogClose };
|
|
@@ -0,0 +1,41 @@
|
|
|
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 '../../../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>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
import { type WithoutChildrenOrChild } from '../../../utils.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
type $$ComponentProps = WithoutChildrenOrChild<DropdownMenuPrimitive.CheckboxItemProps> & {
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
};
|
|
7
|
+
declare const DropdownMenuCheckboxItem: import("svelte").Component<$$ComponentProps, {}, "ref" | "checked" | "indeterminate">;
|
|
8
|
+
type DropdownMenuCheckboxItem = ReturnType<typeof DropdownMenuCheckboxItem>;
|
|
9
|
+
export default DropdownMenuCheckboxItem;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../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>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
type $$ComponentProps = DropdownMenuPrimitive.ContentProps & {
|
|
3
|
+
portalProps?: DropdownMenuPrimitive.PortalProps;
|
|
4
|
+
};
|
|
5
|
+
declare const DropdownMenuContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
|
+
type DropdownMenuContent = ReturnType<typeof DropdownMenuContent>;
|
|
7
|
+
export default DropdownMenuContent;
|