sandcms 0.6.2 → 0.6.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.
- package/README.md +1 -1
- package/dist/admin/Account.svelte +284 -83
- package/dist/admin/ApiKeys.svelte +146 -79
- package/dist/admin/AssetAttachment.svelte +9 -9
- package/dist/admin/BlueprintFields.svelte +20 -2
- package/dist/admin/BlueprintFields.svelte.d.ts +2 -0
- package/dist/admin/Collection.svelte +111 -54
- package/dist/admin/Dashboard.svelte +3 -37
- package/dist/admin/DateField.svelte +75 -0
- package/dist/admin/DateField.svelte.d.ts +11 -0
- package/dist/admin/Editor.svelte +71 -65
- package/dist/admin/Fields.svelte +24 -16
- package/dist/admin/FocusPicker.svelte +1 -2
- package/dist/admin/Gallery.svelte +0 -1
- package/dist/admin/GlobalSearch.svelte +54 -26
- package/dist/admin/HoverHint.svelte +37 -0
- package/dist/admin/HoverHint.svelte.d.ts +8 -0
- package/dist/admin/Inbox.svelte +6 -11
- package/dist/admin/LinkField.svelte +129 -64
- package/dist/admin/Login.svelte +0 -1
- package/dist/admin/MediaLibrary.svelte +61 -50
- package/dist/admin/MediaPicker.svelte +57 -42
- package/dist/admin/NotificationSettings.svelte +35 -27
- package/dist/admin/RichText.svelte +2 -2
- package/dist/admin/RowMenu.svelte +28 -0
- package/dist/admin/RowMenu.svelte.d.ts +10 -0
- package/dist/admin/SearchList.svelte +51 -14
- package/dist/admin/Shell.svelte +64 -29
- package/dist/admin/Users.svelte +106 -50
- package/dist/admin/client.d.ts +2 -0
- package/dist/admin/client.js +18 -0
- package/dist/admin/components/ui/calendar/calendar-caption.svelte +76 -0
- package/dist/admin/components/ui/calendar/calendar-caption.svelte.d.ts +19 -0
- package/dist/admin/components/ui/calendar/calendar-cell.svelte +19 -0
- package/dist/admin/components/ui/calendar/calendar-cell.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-day.svelte +33 -0
- package/dist/admin/components/ui/calendar/calendar-day.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-grid-body.svelte +12 -0
- package/dist/admin/components/ui/calendar/calendar-grid-body.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-grid-head.svelte +12 -0
- package/dist/admin/components/ui/calendar/calendar-grid-head.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-grid-row.svelte +12 -0
- package/dist/admin/components/ui/calendar/calendar-grid-row.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-grid.svelte +16 -0
- package/dist/admin/components/ui/calendar/calendar-grid.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-head-cell.svelte +19 -0
- package/dist/admin/components/ui/calendar/calendar-head-cell.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-header.svelte +19 -0
- package/dist/admin/components/ui/calendar/calendar-header.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-heading.svelte +16 -0
- package/dist/admin/components/ui/calendar/calendar-heading.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-month-select.svelte +48 -0
- package/dist/admin/components/ui/calendar/calendar-month-select.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar-month.svelte +15 -0
- package/dist/admin/components/ui/calendar/calendar-month.svelte.d.ts +5 -0
- package/dist/admin/components/ui/calendar/calendar-months.svelte +19 -0
- package/dist/admin/components/ui/calendar/calendar-months.svelte.d.ts +5 -0
- package/dist/admin/components/ui/calendar/calendar-nav.svelte +19 -0
- package/dist/admin/components/ui/calendar/calendar-nav.svelte.d.ts +5 -0
- package/dist/admin/components/ui/calendar/calendar-next-button.svelte +37 -0
- package/dist/admin/components/ui/calendar/calendar-next-button.svelte.d.ts +8 -0
- package/dist/admin/components/ui/calendar/calendar-prev-button.svelte +37 -0
- package/dist/admin/components/ui/calendar/calendar-prev-button.svelte.d.ts +8 -0
- package/dist/admin/components/ui/calendar/calendar-year-select.svelte +47 -0
- package/dist/admin/components/ui/calendar/calendar-year-select.svelte.d.ts +4 -0
- package/dist/admin/components/ui/calendar/calendar.svelte +115 -0
- package/dist/admin/components/ui/calendar/calendar.svelte.d.ts +21 -0
- package/dist/admin/components/ui/calendar/index.d.ts +19 -0
- package/dist/admin/components/ui/calendar/index.js +21 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +16 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte.d.ts +4 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +46 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +9 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-content.svelte +31 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +10 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +22 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +8 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-group.svelte +7 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-group.svelte.d.ts +4 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-item.svelte +27 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +8 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-label.svelte +24 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts +8 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-portal.svelte +7 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-portal.svelte.d.ts +3 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +16 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +4 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +36 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-separator.svelte +17 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +23 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +5 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +31 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +10 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +29 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +7 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-sub.svelte +7 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-sub.svelte.d.ts +3 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +7 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +4 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu.svelte +7 -0
- package/dist/admin/components/ui/dropdown-menu/dropdown-menu.svelte.d.ts +3 -0
- package/dist/admin/components/ui/dropdown-menu/index.d.ts +18 -0
- package/dist/admin/components/ui/dropdown-menu/index.js +18 -0
- package/dist/admin/components/ui/input-otp/index.d.ts +5 -0
- package/dist/admin/components/ui/input-otp/index.js +5 -0
- package/dist/admin/components/ui/input-otp/input-otp-group.svelte +23 -0
- package/dist/admin/components/ui/input-otp/input-otp-group.svelte.d.ts +5 -0
- package/dist/admin/components/ui/input-otp/input-otp-separator.svelte +27 -0
- package/dist/admin/components/ui/input-otp/input-otp-separator.svelte.d.ts +5 -0
- package/dist/admin/components/ui/input-otp/input-otp-slot.svelte +29 -0
- package/dist/admin/components/ui/input-otp/input-otp-slot.svelte.d.ts +4 -0
- package/dist/admin/components/ui/input-otp/input-otp.svelte +24 -0
- package/dist/admin/components/ui/input-otp/input-otp.svelte.d.ts +4 -0
- package/dist/admin/components/ui/popover/index.d.ts +9 -0
- package/dist/admin/components/ui/popover/index.js +11 -0
- package/dist/admin/components/ui/popover/popover-close.svelte +7 -0
- package/dist/admin/components/ui/popover/popover-close.svelte.d.ts +4 -0
- package/dist/admin/components/ui/popover/popover-content.svelte +31 -0
- package/dist/admin/components/ui/popover/popover-content.svelte.d.ts +10 -0
- package/dist/admin/components/ui/popover/popover-description.svelte +20 -0
- package/dist/admin/components/ui/popover/popover-description.svelte.d.ts +5 -0
- package/dist/admin/components/ui/popover/popover-header.svelte +20 -0
- package/dist/admin/components/ui/popover/popover-header.svelte.d.ts +5 -0
- package/dist/admin/components/ui/popover/popover-portal.svelte +7 -0
- package/dist/admin/components/ui/popover/popover-portal.svelte.d.ts +3 -0
- package/dist/admin/components/ui/popover/popover-title.svelte +20 -0
- package/dist/admin/components/ui/popover/popover-title.svelte.d.ts +5 -0
- package/dist/admin/components/ui/popover/popover-trigger.svelte +17 -0
- package/dist/admin/components/ui/popover/popover-trigger.svelte.d.ts +4 -0
- package/dist/admin/components/ui/popover/popover.svelte +7 -0
- package/dist/admin/components/ui/popover/popover.svelte.d.ts +3 -0
- package/dist/admin/components/ui/switch/switch.svelte +2 -2
- package/dist/admin/components/ui/tooltip/index.d.ts +6 -0
- package/dist/admin/components/ui/tooltip/index.js +8 -0
- package/dist/admin/components/ui/tooltip/tooltip-content.svelte +48 -0
- package/dist/admin/components/ui/tooltip/tooltip-content.svelte.d.ts +11 -0
- package/dist/admin/components/ui/tooltip/tooltip-portal.svelte +7 -0
- package/dist/admin/components/ui/tooltip/tooltip-portal.svelte.d.ts +4 -0
- package/dist/admin/components/ui/tooltip/tooltip-provider.svelte +7 -0
- package/dist/admin/components/ui/tooltip/tooltip-provider.svelte.d.ts +4 -0
- package/dist/admin/components/ui/tooltip/tooltip-trigger.svelte +7 -0
- package/dist/admin/components/ui/tooltip/tooltip-trigger.svelte.d.ts +25 -0
- package/dist/admin/components/ui/tooltip/tooltip.svelte +7 -0
- package/dist/admin/components/ui/tooltip/tooltip.svelte.d.ts +25 -0
- package/dist/admin/generated/admin.css +774 -138
- package/dist/admin/slug.d.ts +1 -0
- package/dist/admin/slug.js +6 -0
- package/dist/cli/index.js +0 -0
- package/dist/server/admin-load.js +2 -2
- package/dist/server/api.js +6 -1
- package/dist/server/auth.d.ts +1 -0
- package/dist/server/auth.js +23 -0
- package/docs/api.md +1 -1
- package/docs/package.md +4 -4
- package/docs/releases.md +10 -0
- package/docs/upgrades.md +9 -0
- package/package.json +5 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Caption from './calendar-caption.svelte';
|
|
2
|
+
import Cell from './calendar-cell.svelte';
|
|
3
|
+
import Day from './calendar-day.svelte';
|
|
4
|
+
import GridBody from './calendar-grid-body.svelte';
|
|
5
|
+
import GridHead from './calendar-grid-head.svelte';
|
|
6
|
+
import GridRow from './calendar-grid-row.svelte';
|
|
7
|
+
import Grid from './calendar-grid.svelte';
|
|
8
|
+
import HeadCell from './calendar-head-cell.svelte';
|
|
9
|
+
import Header from './calendar-header.svelte';
|
|
10
|
+
import Heading from './calendar-heading.svelte';
|
|
11
|
+
import MonthSelect from './calendar-month-select.svelte';
|
|
12
|
+
import Month from './calendar-month.svelte';
|
|
13
|
+
import Months from './calendar-months.svelte';
|
|
14
|
+
import Nav from './calendar-nav.svelte';
|
|
15
|
+
import NextButton from './calendar-next-button.svelte';
|
|
16
|
+
import PrevButton from './calendar-prev-button.svelte';
|
|
17
|
+
import YearSelect from './calendar-year-select.svelte';
|
|
18
|
+
import Root from './calendar.svelte';
|
|
19
|
+
export { Day, Cell, Grid, Header, Months, GridRow, Heading, GridBody, GridHead, HeadCell, NextButton, PrevButton, Nav, Month, YearSelect, MonthSelect, Caption,
|
|
20
|
+
//
|
|
21
|
+
Root as Calendar };
|
|
@@ -0,0 +1,16 @@
|
|
|
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.CheckboxGroupProps = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<DropdownMenuPrimitive.CheckboxGroup
|
|
12
|
+
bind:ref
|
|
13
|
+
bind:value
|
|
14
|
+
data-slot="dropdown-menu-checkbox-group"
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuCheckboxGroup: import("svelte").Component<DropdownMenuPrimitive.CheckboxGroupProps, {}, "ref" | "value">;
|
|
3
|
+
type DropdownMenuCheckboxGroup = ReturnType<typeof DropdownMenuCheckboxGroup>;
|
|
4
|
+
export default DropdownMenuCheckboxGroup;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import MinusIcon from '@lucide/svelte/icons/minus';
|
|
4
|
+
import CheckIcon from '@lucide/svelte/icons/check';
|
|
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
|
+
closeOnSelect = false,
|
|
15
|
+
...restProps
|
|
16
|
+
}: WithoutChildrenOrChild<DropdownMenuPrimitive.CheckboxItemProps> & {
|
|
17
|
+
children?: Snippet;
|
|
18
|
+
} = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
22
|
+
bind:ref
|
|
23
|
+
{closeOnSelect}
|
|
24
|
+
bind:checked
|
|
25
|
+
bind:indeterminate
|
|
26
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
27
|
+
class={cn(
|
|
28
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
29
|
+
className
|
|
30
|
+
)}
|
|
31
|
+
{...restProps}
|
|
32
|
+
>
|
|
33
|
+
{#snippet children({ checked, indeterminate })}
|
|
34
|
+
<span
|
|
35
|
+
class="absolute right-2 flex items-center justify-center pointer-events-none"
|
|
36
|
+
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
37
|
+
>
|
|
38
|
+
{#if indeterminate}
|
|
39
|
+
<MinusIcon />
|
|
40
|
+
{:else if checked}
|
|
41
|
+
<CheckIcon />
|
|
42
|
+
{/if}
|
|
43
|
+
</span>
|
|
44
|
+
{@render childrenProp?.()}
|
|
45
|
+
{/snippet}
|
|
46
|
+
</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,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn, type WithoutChildrenOrChild } from '../../../utils.js';
|
|
4
|
+
import DropdownMenuPortal from './dropdown-menu-portal.svelte';
|
|
5
|
+
import type { ComponentProps } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
sideOffset = 4,
|
|
10
|
+
align = 'start',
|
|
11
|
+
portalProps,
|
|
12
|
+
class: className,
|
|
13
|
+
...restProps
|
|
14
|
+
}: DropdownMenuPrimitive.ContentProps & {
|
|
15
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof DropdownMenuPortal>>;
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<DropdownMenuPortal {...portalProps}>
|
|
20
|
+
<DropdownMenuPrimitive.Content
|
|
21
|
+
bind:ref
|
|
22
|
+
data-slot="dropdown-menu-content"
|
|
23
|
+
{sideOffset}
|
|
24
|
+
{align}
|
|
25
|
+
class={cn(
|
|
26
|
+
'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-none shadow-md ring-1 duration-100 z-50 max-h-(--bits-dropdown-menu-content-available-height) w-(--bits-dropdown-menu-anchor-width) origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto data-closed:overflow-hidden',
|
|
27
|
+
className
|
|
28
|
+
)}
|
|
29
|
+
{...restProps}
|
|
30
|
+
/>
|
|
31
|
+
</DropdownMenuPortal>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
import { type WithoutChildrenOrChild } from '../../../utils.js';
|
|
3
|
+
import DropdownMenuPortal from './dropdown-menu-portal.svelte';
|
|
4
|
+
import type { ComponentProps } from 'svelte';
|
|
5
|
+
type $$ComponentProps = DropdownMenuPrimitive.ContentProps & {
|
|
6
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof DropdownMenuPortal>>;
|
|
7
|
+
};
|
|
8
|
+
declare const DropdownMenuContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
9
|
+
type DropdownMenuContent = ReturnType<typeof DropdownMenuContent>;
|
|
10
|
+
export default DropdownMenuContent;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../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('text-muted-foreground px-2 py-2 text-xs data-inset:pl-7', className)}
|
|
21
|
+
{...restProps}
|
|
22
|
+
/>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
import type { ComponentProps } from 'svelte';
|
|
3
|
+
type $$ComponentProps = ComponentProps<typeof DropdownMenuPrimitive.GroupHeading> & {
|
|
4
|
+
inset?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const DropdownMenuGroupHeading: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
|
+
type DropdownMenuGroupHeading = ReturnType<typeof DropdownMenuGroupHeading>;
|
|
8
|
+
export default DropdownMenuGroupHeading;
|
|
@@ -0,0 +1,7 @@
|
|
|
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} />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
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
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none px-2 py-2 text-xs data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
26
|
+
{...restProps}
|
|
27
|
+
/>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
type $$ComponentProps = DropdownMenuPrimitive.ItemProps & {
|
|
3
|
+
inset?: boolean;
|
|
4
|
+
variant?: 'default' | 'destructive';
|
|
5
|
+
};
|
|
6
|
+
declare const DropdownMenuItem: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
|
+
type DropdownMenuItem = ReturnType<typeof DropdownMenuItem>;
|
|
8
|
+
export default DropdownMenuItem;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
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('text-muted-foreground px-2 py-2 text-xs data-inset:pl-7', className)}
|
|
21
|
+
{...restProps}
|
|
22
|
+
>
|
|
23
|
+
{@render children?.()}
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
4
|
+
inset?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const DropdownMenuLabel: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
|
+
type DropdownMenuLabel = ReturnType<typeof DropdownMenuLabel>;
|
|
8
|
+
export default DropdownMenuLabel;
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuRadioGroup: import("svelte").Component<DropdownMenuPrimitive.RadioGroupProps, {}, "ref" | "value">;
|
|
3
|
+
type DropdownMenuRadioGroup = ReturnType<typeof DropdownMenuRadioGroup>;
|
|
4
|
+
export default DropdownMenuRadioGroup;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import CheckIcon from '@lucide/svelte/icons/check';
|
|
4
|
+
import { cn, type WithoutChild } from '../../../utils.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children: childrenProp,
|
|
10
|
+
closeOnSelect = false,
|
|
11
|
+
...restProps
|
|
12
|
+
}: WithoutChild<DropdownMenuPrimitive.RadioItemProps> = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<DropdownMenuPrimitive.RadioItem
|
|
16
|
+
bind:ref
|
|
17
|
+
{closeOnSelect}
|
|
18
|
+
data-slot="dropdown-menu-radio-item"
|
|
19
|
+
class={cn(
|
|
20
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
23
|
+
{...restProps}
|
|
24
|
+
>
|
|
25
|
+
{#snippet children({ checked })}
|
|
26
|
+
<span
|
|
27
|
+
class="absolute right-2 flex items-center justify-center pointer-events-none"
|
|
28
|
+
data-slot="dropdown-menu-radio-item-indicator"
|
|
29
|
+
>
|
|
30
|
+
{#if checked}
|
|
31
|
+
<CheckIcon />
|
|
32
|
+
{/if}
|
|
33
|
+
</span>
|
|
34
|
+
{@render childrenProp?.({ checked })}
|
|
35
|
+
{/snippet}
|
|
36
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuRadioItem: import("svelte").Component<Omit<DropdownMenuPrimitive.RadioItemProps, "child">, {}, "ref">;
|
|
3
|
+
type DropdownMenuRadioItem = ReturnType<typeof DropdownMenuRadioItem>;
|
|
4
|
+
export default DropdownMenuRadioItem;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../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 h-px', className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuSeparator: import("svelte").Component<DropdownMenuPrimitive.SeparatorProps, {}, "ref">;
|
|
3
|
+
type DropdownMenuSeparator = ReturnType<typeof DropdownMenuSeparator>;
|
|
4
|
+
export default DropdownMenuSeparator;
|
|
@@ -0,0 +1,23 @@
|
|
|
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="dropdown-menu-shortcut"
|
|
16
|
+
class={cn(
|
|
17
|
+
'text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</span>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const DropdownMenuShortcut: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLSpanElement>>, {}, "ref">;
|
|
4
|
+
type DropdownMenuShortcut = ReturnType<typeof DropdownMenuShortcut>;
|
|
5
|
+
export default DropdownMenuShortcut;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn, type WithoutChildrenOrChild } from '../../../utils.js';
|
|
4
|
+
import DropdownMenuPortal from './dropdown-menu-portal.svelte';
|
|
5
|
+
import type { ComponentProps } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
align = 'start',
|
|
11
|
+
alignOffset = -3,
|
|
12
|
+
portalProps,
|
|
13
|
+
...restProps
|
|
14
|
+
}: DropdownMenuPrimitive.SubContentProps & {
|
|
15
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof DropdownMenuPortal>>;
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<DropdownMenuPortal {...portalProps}>
|
|
20
|
+
<DropdownMenuPrimitive.SubContent
|
|
21
|
+
bind:ref
|
|
22
|
+
data-slot="dropdown-menu-sub-content"
|
|
23
|
+
{align}
|
|
24
|
+
{alignOffset}
|
|
25
|
+
class={cn(
|
|
26
|
+
'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-none shadow-lg ring-1 duration-100 z-50 origin-(--bits-dropdown-menu-content-transform-origin) overflow-hidden',
|
|
27
|
+
className
|
|
28
|
+
)}
|
|
29
|
+
{...restProps}
|
|
30
|
+
/>
|
|
31
|
+
</DropdownMenuPortal>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
import { type WithoutChildrenOrChild } from '../../../utils.js';
|
|
3
|
+
import DropdownMenuPortal from './dropdown-menu-portal.svelte';
|
|
4
|
+
import type { ComponentProps } from 'svelte';
|
|
5
|
+
type $$ComponentProps = DropdownMenuPrimitive.SubContentProps & {
|
|
6
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof DropdownMenuPortal>>;
|
|
7
|
+
};
|
|
8
|
+
declare const DropdownMenuSubContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
9
|
+
type DropdownMenuSubContent = ReturnType<typeof DropdownMenuSubContent>;
|
|
10
|
+
export default DropdownMenuSubContent;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 '../../../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
|
+
"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none px-2 py-2 text-xs data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...restProps}
|
|
26
|
+
>
|
|
27
|
+
{@render children?.()}
|
|
28
|
+
<ChevronRightIcon class="cn-rtl-flip ml-auto" />
|
|
29
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
type $$ComponentProps = DropdownMenuPrimitive.SubTriggerProps & {
|
|
3
|
+
inset?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const DropdownMenuSubTrigger: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
|
+
type DropdownMenuSubTrigger = ReturnType<typeof DropdownMenuSubTrigger>;
|
|
7
|
+
export default DropdownMenuSubTrigger;
|
|
@@ -0,0 +1,7 @@
|
|
|
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} />
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuTrigger: import("svelte").Component<DropdownMenuPrimitive.TriggerProps, {}, "ref">;
|
|
3
|
+
type DropdownMenuTrigger = ReturnType<typeof DropdownMenuTrigger>;
|
|
4
|
+
export default DropdownMenuTrigger;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CheckboxGroup from './dropdown-menu-checkbox-group.svelte';
|
|
2
|
+
import CheckboxItem from './dropdown-menu-checkbox-item.svelte';
|
|
3
|
+
import Content from './dropdown-menu-content.svelte';
|
|
4
|
+
import GroupHeading from './dropdown-menu-group-heading.svelte';
|
|
5
|
+
import Group from './dropdown-menu-group.svelte';
|
|
6
|
+
import Item from './dropdown-menu-item.svelte';
|
|
7
|
+
import Label from './dropdown-menu-label.svelte';
|
|
8
|
+
import Portal from './dropdown-menu-portal.svelte';
|
|
9
|
+
import RadioGroup from './dropdown-menu-radio-group.svelte';
|
|
10
|
+
import RadioItem from './dropdown-menu-radio-item.svelte';
|
|
11
|
+
import Separator from './dropdown-menu-separator.svelte';
|
|
12
|
+
import Shortcut from './dropdown-menu-shortcut.svelte';
|
|
13
|
+
import SubContent from './dropdown-menu-sub-content.svelte';
|
|
14
|
+
import SubTrigger from './dropdown-menu-sub-trigger.svelte';
|
|
15
|
+
import Sub from './dropdown-menu-sub.svelte';
|
|
16
|
+
import Trigger from './dropdown-menu-trigger.svelte';
|
|
17
|
+
import Root from './dropdown-menu.svelte';
|
|
18
|
+
export { CheckboxGroup, CheckboxItem, Content, Portal, Root as DropdownMenu, CheckboxGroup as DropdownMenuCheckboxGroup, CheckboxItem as DropdownMenuCheckboxItem, Content as DropdownMenuContent, Portal as DropdownMenuPortal, Group as DropdownMenuGroup, Item as DropdownMenuItem, Label as DropdownMenuLabel, RadioGroup as DropdownMenuRadioGroup, RadioItem as DropdownMenuRadioItem, Separator as DropdownMenuSeparator, Shortcut as DropdownMenuShortcut, Sub as DropdownMenuSub, SubContent as DropdownMenuSubContent, SubTrigger as DropdownMenuSubTrigger, Trigger as DropdownMenuTrigger, GroupHeading as DropdownMenuGroupHeading, Group, GroupHeading, Item, Label, RadioGroup, RadioItem, Root, Separator, Shortcut, Sub, SubContent, SubTrigger, Trigger };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CheckboxGroup from './dropdown-menu-checkbox-group.svelte';
|
|
2
|
+
import CheckboxItem from './dropdown-menu-checkbox-item.svelte';
|
|
3
|
+
import Content from './dropdown-menu-content.svelte';
|
|
4
|
+
import GroupHeading from './dropdown-menu-group-heading.svelte';
|
|
5
|
+
import Group from './dropdown-menu-group.svelte';
|
|
6
|
+
import Item from './dropdown-menu-item.svelte';
|
|
7
|
+
import Label from './dropdown-menu-label.svelte';
|
|
8
|
+
import Portal from './dropdown-menu-portal.svelte';
|
|
9
|
+
import RadioGroup from './dropdown-menu-radio-group.svelte';
|
|
10
|
+
import RadioItem from './dropdown-menu-radio-item.svelte';
|
|
11
|
+
import Separator from './dropdown-menu-separator.svelte';
|
|
12
|
+
import Shortcut from './dropdown-menu-shortcut.svelte';
|
|
13
|
+
import SubContent from './dropdown-menu-sub-content.svelte';
|
|
14
|
+
import SubTrigger from './dropdown-menu-sub-trigger.svelte';
|
|
15
|
+
import Sub from './dropdown-menu-sub.svelte';
|
|
16
|
+
import Trigger from './dropdown-menu-trigger.svelte';
|
|
17
|
+
import Root from './dropdown-menu.svelte';
|
|
18
|
+
export { CheckboxGroup, CheckboxItem, Content, Portal, Root as DropdownMenu, CheckboxGroup as DropdownMenuCheckboxGroup, CheckboxItem as DropdownMenuCheckboxItem, Content as DropdownMenuContent, Portal as DropdownMenuPortal, Group as DropdownMenuGroup, Item as DropdownMenuItem, Label as DropdownMenuLabel, RadioGroup as DropdownMenuRadioGroup, RadioItem as DropdownMenuRadioItem, Separator as DropdownMenuSeparator, Shortcut as DropdownMenuShortcut, Sub as DropdownMenuSub, SubContent as DropdownMenuSubContent, SubTrigger as DropdownMenuSubTrigger, Trigger as DropdownMenuTrigger, GroupHeading as DropdownMenuGroupHeading, Group, GroupHeading, Item, Label, RadioGroup, RadioItem, Root, Separator, Shortcut, Sub, SubContent, SubTrigger, Trigger };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Group from './input-otp-group.svelte';
|
|
2
|
+
import Separator from './input-otp-separator.svelte';
|
|
3
|
+
import Slot from './input-otp-slot.svelte';
|
|
4
|
+
import Root from './input-otp.svelte';
|
|
5
|
+
export { Root, Group, Slot, Separator, Root as InputOTP, Group as InputOTPGroup, Slot as InputOTPSlot, Separator as InputOTPSeparator };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Group from './input-otp-group.svelte';
|
|
2
|
+
import Separator from './input-otp-separator.svelte';
|
|
3
|
+
import Slot from './input-otp-slot.svelte';
|
|
4
|
+
import Root from './input-otp.svelte';
|
|
5
|
+
export { Root, Group, Slot, Separator, Root as InputOTP, Group as InputOTPGroup, Slot as InputOTPSlot, Separator as InputOTPSeparator };
|
|
@@ -0,0 +1,23 @@
|
|
|
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="input-otp-group"
|
|
16
|
+
class={cn(
|
|
17
|
+
'has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-none has-aria-invalid:ring-1 flex items-center',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const InputOtpGroup: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type InputOtpGroup = ReturnType<typeof InputOtpGroup>;
|
|
5
|
+
export default InputOtpGroup;
|