@kayord/ui 0.2.5 → 0.3.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/README.md +2 -0
- package/dist/components/ui/calendar/calendar-cell.svelte +17 -0
- package/dist/components/ui/calendar/calendar-cell.svelte.d.ts +17 -0
- package/dist/components/ui/calendar/calendar-day.svelte +37 -0
- package/dist/components/ui/calendar/calendar-grid-body.svelte +9 -0
- package/dist/components/ui/calendar/calendar-grid-body.svelte.d.ts +17 -0
- package/dist/components/ui/calendar/calendar-grid-head.svelte +9 -0
- package/dist/components/ui/calendar/calendar-grid-head.svelte.d.ts +17 -0
- package/dist/components/ui/calendar/calendar-grid-row.svelte +9 -0
- package/dist/components/ui/calendar/calendar-grid-row.svelte.d.ts +17 -0
- package/dist/components/ui/calendar/calendar-grid.svelte +12 -0
- package/dist/components/ui/calendar/calendar-grid.svelte.d.ts +17 -0
- package/dist/components/ui/calendar/calendar-head-cell.svelte +15 -0
- package/dist/components/ui/calendar/calendar-head-cell.svelte.d.ts +17 -0
- package/dist/components/ui/calendar/calendar-header.svelte +15 -0
- package/dist/components/ui/calendar/calendar-header.svelte.d.ts +17 -0
- package/dist/components/ui/calendar/calendar-heading.svelte +15 -0
- package/dist/components/ui/calendar/calendar-heading.svelte.d.ts +19 -0
- package/dist/components/ui/calendar/calendar-months.svelte +14 -0
- package/dist/components/ui/calendar/calendar-months.svelte.d.ts +17 -0
- package/dist/components/ui/calendar/calendar-next-button.svelte +22 -0
- package/dist/components/ui/calendar/calendar-prev-button.svelte +22 -0
- package/dist/components/ui/calendar/calendar.svelte +52 -0
- package/dist/components/ui/calendar/calendar.svelte.d.ts +13 -0
- package/dist/components/ui/calendar/index.d.ts +14 -0
- package/dist/components/ui/calendar/index.js +16 -0
- package/dist/components/ui/index.d.ts +3 -0
- package/dist/components/ui/index.js +3 -0
- package/dist/components/ui/range-calendar/index.d.ts +14 -0
- package/dist/components/ui/range-calendar/index.js +16 -0
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte +17 -0
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte.d.ts +17 -0
- package/dist/components/ui/range-calendar/range-calendar-day.svelte +38 -0
- package/dist/components/ui/range-calendar/range-calendar-grid-body.svelte +9 -0
- package/dist/components/ui/range-calendar/range-calendar-grid-body.svelte.d.ts +17 -0
- package/dist/components/ui/range-calendar/range-calendar-grid-head.svelte +9 -0
- package/dist/components/ui/range-calendar/range-calendar-grid-head.svelte.d.ts +17 -0
- package/dist/components/ui/range-calendar/range-calendar-grid-row.svelte +9 -0
- package/dist/components/ui/range-calendar/range-calendar-grid-row.svelte.d.ts +17 -0
- package/dist/components/ui/range-calendar/range-calendar-grid.svelte +12 -0
- package/dist/components/ui/range-calendar/range-calendar-grid.svelte.d.ts +17 -0
- package/dist/components/ui/range-calendar/range-calendar-head-cell.svelte +15 -0
- package/dist/components/ui/range-calendar/range-calendar-head-cell.svelte.d.ts +17 -0
- package/dist/components/ui/range-calendar/range-calendar-header.svelte +15 -0
- package/dist/components/ui/range-calendar/range-calendar-header.svelte.d.ts +17 -0
- package/dist/components/ui/range-calendar/range-calendar-heading.svelte +15 -0
- package/dist/components/ui/range-calendar/range-calendar-heading.svelte.d.ts +19 -0
- package/dist/components/ui/range-calendar/range-calendar-months.svelte +14 -0
- package/dist/components/ui/range-calendar/range-calendar-months.svelte.d.ts +17 -0
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte +22 -0
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte +22 -0
- package/dist/components/ui/range-calendar/range-calendar.svelte +57 -0
- package/dist/components/ui/range-calendar/range-calendar.svelte.d.ts +13 -0
- package/dist/formsnap.d.ts +1 -0
- package/dist/formsnap.js +3 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -4
- package/dist/mode-watcher.d.ts +1 -0
- package/dist/mode-watcher.js +1 -0
- package/package.json +15 -6
- package/dist/components/ui/drawer/drawer-description.svelte.d.ts +0 -16
- package/dist/components/ui/drawer/drawer-title.svelte.d.ts +0 -16
- package/dist/components/ui/drawer/index.d.ts +0 -13
- package/dist/external.d.ts +0 -2
- package/dist/external.js +0 -2
- package/dist/extra.d.ts +0 -2
- package/dist/extra.js +0 -1
package/README.md
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
export let date;
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export { className as class };
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<CalendarPrimitive.Cell
|
|
9
|
+
{date}
|
|
10
|
+
class={cn(
|
|
11
|
+
"h-9 w-9 text-center text-sm p-0 relative [&:has([data-selected][data-outside-month])]:bg-accent/50 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...$$restProps}
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</CalendarPrimitive.Cell>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CalendarPrimitive.CellProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CalendarCellProps = typeof __propDef.props;
|
|
13
|
+
export type CalendarCellEvents = typeof __propDef.events;
|
|
14
|
+
export type CalendarCellSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CalendarCell extends SvelteComponent<CalendarCellProps, CalendarCellEvents, CalendarCellSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { buttonVariants } from "../button";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
export let date;
|
|
5
|
+
export let month;
|
|
6
|
+
let className = void 0;
|
|
7
|
+
export { className as class };
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<CalendarPrimitive.Day
|
|
11
|
+
on:click
|
|
12
|
+
{date}
|
|
13
|
+
{month}
|
|
14
|
+
class={cn(
|
|
15
|
+
buttonVariants({ variant: "ghost" }),
|
|
16
|
+
"h-9 w-9 p-0 font-normal ",
|
|
17
|
+
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground",
|
|
18
|
+
// Selected
|
|
19
|
+
"data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary data-[selected]:hover:text-primary-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground data-[selected]:opacity-100",
|
|
20
|
+
// Disabled
|
|
21
|
+
"data-[disabled]:text-muted-foreground data-[disabled]:opacity-50",
|
|
22
|
+
// Unavailable
|
|
23
|
+
"data-[unavailable]:line-through data-[unavailable]:text-destructive-foreground",
|
|
24
|
+
// Outside months
|
|
25
|
+
"data-[outside-month]:text-muted-foreground data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground [&[data-outside-month][data-selected]]:opacity-30 data-[outside-month]:pointer-events-none",
|
|
26
|
+
className
|
|
27
|
+
)}
|
|
28
|
+
{...$$restProps}
|
|
29
|
+
let:selected
|
|
30
|
+
let:disabled
|
|
31
|
+
let:unavailable
|
|
32
|
+
let:builder
|
|
33
|
+
>
|
|
34
|
+
<slot {selected} {disabled} {unavailable} {builder}>
|
|
35
|
+
{date.day}
|
|
36
|
+
</slot>
|
|
37
|
+
</CalendarPrimitive.Day>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CalendarPrimitive.GridBody class={cn(className)} {...$$restProps}>
|
|
8
|
+
<slot />
|
|
9
|
+
</CalendarPrimitive.GridBody>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CalendarPrimitive.GridBodyProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CalendarGridBodyProps = typeof __propDef.props;
|
|
13
|
+
export type CalendarGridBodyEvents = typeof __propDef.events;
|
|
14
|
+
export type CalendarGridBodySlots = typeof __propDef.slots;
|
|
15
|
+
export default class CalendarGridBody extends SvelteComponent<CalendarGridBodyProps, CalendarGridBodyEvents, CalendarGridBodySlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CalendarPrimitive.GridHead class={cn(className)} {...$$restProps}>
|
|
8
|
+
<slot />
|
|
9
|
+
</CalendarPrimitive.GridHead>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CalendarPrimitive.GridHeadProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CalendarGridHeadProps = typeof __propDef.props;
|
|
13
|
+
export type CalendarGridHeadEvents = typeof __propDef.events;
|
|
14
|
+
export type CalendarGridHeadSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CalendarGridHead extends SvelteComponent<CalendarGridHeadProps, CalendarGridHeadEvents, CalendarGridHeadSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CalendarPrimitive.GridRow class={cn("flex", className)} {...$$restProps}>
|
|
8
|
+
<slot />
|
|
9
|
+
</CalendarPrimitive.GridRow>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CalendarPrimitive.GridRowProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CalendarGridRowProps = typeof __propDef.props;
|
|
13
|
+
export type CalendarGridRowEvents = typeof __propDef.events;
|
|
14
|
+
export type CalendarGridRowSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CalendarGridRow extends SvelteComponent<CalendarGridRowProps, CalendarGridRowEvents, CalendarGridRowSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CalendarPrimitive.Grid
|
|
8
|
+
class={cn("w-full border-collapse space-y-1", className)}
|
|
9
|
+
{...$$restProps}
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</CalendarPrimitive.Grid>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CalendarPrimitive.GridProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CalendarGridProps = typeof __propDef.props;
|
|
13
|
+
export type CalendarGridEvents = typeof __propDef.events;
|
|
14
|
+
export type CalendarGridSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CalendarGrid extends SvelteComponent<CalendarGridProps, CalendarGridEvents, CalendarGridSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CalendarPrimitive.HeadCell
|
|
8
|
+
class={cn(
|
|
9
|
+
"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
10
|
+
className
|
|
11
|
+
)}
|
|
12
|
+
{...$$restProps}
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</CalendarPrimitive.HeadCell>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CalendarPrimitive.HeadCellProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CalendarHeadCellProps = typeof __propDef.props;
|
|
13
|
+
export type CalendarHeadCellEvents = typeof __propDef.events;
|
|
14
|
+
export type CalendarHeadCellSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CalendarHeadCell extends SvelteComponent<CalendarHeadCellProps, CalendarHeadCellEvents, CalendarHeadCellSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CalendarPrimitive.Header
|
|
8
|
+
class={cn(
|
|
9
|
+
"flex justify-between pt-1 relative items-center w-full",
|
|
10
|
+
className
|
|
11
|
+
)}
|
|
12
|
+
{...$$restProps}
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</CalendarPrimitive.Header>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CalendarPrimitive.HeaderProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CalendarHeaderProps = typeof __propDef.props;
|
|
13
|
+
export type CalendarHeaderEvents = typeof __propDef.events;
|
|
14
|
+
export type CalendarHeaderSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CalendarHeader extends SvelteComponent<CalendarHeaderProps, CalendarHeaderEvents, CalendarHeaderSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<CalendarPrimitive.Heading
|
|
8
|
+
let:headingValue
|
|
9
|
+
class={cn("text-sm font-medium", className)}
|
|
10
|
+
{...$$restProps}
|
|
11
|
+
>
|
|
12
|
+
<slot {headingValue}>
|
|
13
|
+
{headingValue}
|
|
14
|
+
</slot>
|
|
15
|
+
</CalendarPrimitive.Heading>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CalendarPrimitive.HeadingProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {
|
|
10
|
+
headingValue: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type CalendarHeadingProps = typeof __propDef.props;
|
|
15
|
+
export type CalendarHeadingEvents = typeof __propDef.events;
|
|
16
|
+
export type CalendarHeadingSlots = typeof __propDef.slots;
|
|
17
|
+
export default class CalendarHeading extends SvelteComponent<CalendarHeadingProps, CalendarHeadingEvents, CalendarHeadingSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script>import { cn } from "../../../utils";
|
|
2
|
+
let className = void 0;
|
|
3
|
+
export { className as class };
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div
|
|
7
|
+
class={cn(
|
|
8
|
+
"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0 mt-4",
|
|
9
|
+
className
|
|
10
|
+
)}
|
|
11
|
+
{...$$restProps}
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CalendarMonthsProps = typeof __propDef.props;
|
|
13
|
+
export type CalendarMonthsEvents = typeof __propDef.events;
|
|
14
|
+
export type CalendarMonthsSlots = typeof __propDef.slots;
|
|
15
|
+
export default class CalendarMonths extends SvelteComponent<CalendarMonthsProps, CalendarMonthsEvents, CalendarMonthsSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { ChevronRight } from "lucide-svelte";
|
|
3
|
+
import { buttonVariants } from "../button";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
let className = void 0;
|
|
6
|
+
export { className as class };
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<CalendarPrimitive.NextButton
|
|
10
|
+
on:click
|
|
11
|
+
class={cn(
|
|
12
|
+
buttonVariants({ variant: "outline" }),
|
|
13
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...$$restProps}
|
|
17
|
+
let:builder
|
|
18
|
+
>
|
|
19
|
+
<slot {builder}>
|
|
20
|
+
<ChevronRight class="h-4 w-4" />
|
|
21
|
+
</slot>
|
|
22
|
+
</CalendarPrimitive.NextButton>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { ChevronLeft } from "lucide-svelte";
|
|
3
|
+
import { buttonVariants } from "../button";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
let className = void 0;
|
|
6
|
+
export { className as class };
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<CalendarPrimitive.PrevButton
|
|
10
|
+
on:click
|
|
11
|
+
class={cn(
|
|
12
|
+
buttonVariants({ variant: "outline" }),
|
|
13
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...$$restProps}
|
|
17
|
+
let:builder
|
|
18
|
+
>
|
|
19
|
+
<slot {builder}>
|
|
20
|
+
<ChevronLeft class="h-4 w-4" />
|
|
21
|
+
</slot>
|
|
22
|
+
</CalendarPrimitive.PrevButton>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script>import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
2
|
+
import * as Calendar from ".";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
export let value = void 0;
|
|
5
|
+
export let placeholder = void 0;
|
|
6
|
+
export let weekdayFormat = "short";
|
|
7
|
+
let className = void 0;
|
|
8
|
+
export { className as class };
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<CalendarPrimitive.Root
|
|
12
|
+
bind:value
|
|
13
|
+
bind:placeholder
|
|
14
|
+
{weekdayFormat}
|
|
15
|
+
class={cn("p-3", className)}
|
|
16
|
+
{...$$restProps}
|
|
17
|
+
on:keydown
|
|
18
|
+
let:months
|
|
19
|
+
let:weekdays
|
|
20
|
+
>
|
|
21
|
+
<Calendar.Header>
|
|
22
|
+
<Calendar.PrevButton />
|
|
23
|
+
<Calendar.Heading />
|
|
24
|
+
<Calendar.NextButton />
|
|
25
|
+
</Calendar.Header>
|
|
26
|
+
<Calendar.Months>
|
|
27
|
+
{#each months as month}
|
|
28
|
+
<Calendar.Grid>
|
|
29
|
+
<Calendar.GridHead>
|
|
30
|
+
<Calendar.GridRow class="flex">
|
|
31
|
+
{#each weekdays as weekday}
|
|
32
|
+
<Calendar.HeadCell>
|
|
33
|
+
{weekday.slice(0, 2)}
|
|
34
|
+
</Calendar.HeadCell>
|
|
35
|
+
{/each}
|
|
36
|
+
</Calendar.GridRow>
|
|
37
|
+
</Calendar.GridHead>
|
|
38
|
+
<Calendar.GridBody>
|
|
39
|
+
{#each month.weeks as weekDates}
|
|
40
|
+
<Calendar.GridRow class="w-full mt-2">
|
|
41
|
+
{#each weekDates as date}
|
|
42
|
+
<Calendar.Cell {date}>
|
|
43
|
+
<Calendar.Day {date} month={month.value} />
|
|
44
|
+
</Calendar.Cell>
|
|
45
|
+
{/each}
|
|
46
|
+
</Calendar.GridRow>
|
|
47
|
+
{/each}
|
|
48
|
+
</Calendar.GridBody>
|
|
49
|
+
</Calendar.Grid>
|
|
50
|
+
{/each}
|
|
51
|
+
</Calendar.Months>
|
|
52
|
+
</CalendarPrimitive.Root>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Calendar as CalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: CalendarPrimitive.Props;
|
|
5
|
+
slots: {};
|
|
6
|
+
events: CalendarPrimitive.Events;
|
|
7
|
+
};
|
|
8
|
+
export type CalendarProps = typeof __propDef.props;
|
|
9
|
+
export type CalendarEvents = typeof __propDef.events;
|
|
10
|
+
export type CalendarSlots = typeof __propDef.slots;
|
|
11
|
+
export default class Calendar extends SvelteComponent<CalendarProps, CalendarEvents, CalendarSlots> {
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Root from "./calendar.svelte";
|
|
2
|
+
import Cell from "./calendar-cell.svelte";
|
|
3
|
+
import Day from "./calendar-day.svelte";
|
|
4
|
+
import Grid from "./calendar-grid.svelte";
|
|
5
|
+
import Header from "./calendar-header.svelte";
|
|
6
|
+
import Months from "./calendar-months.svelte";
|
|
7
|
+
import GridRow from "./calendar-grid-row.svelte";
|
|
8
|
+
import Heading from "./calendar-heading.svelte";
|
|
9
|
+
import GridBody from "./calendar-grid-body.svelte";
|
|
10
|
+
import GridHead from "./calendar-grid-head.svelte";
|
|
11
|
+
import HeadCell from "./calendar-head-cell.svelte";
|
|
12
|
+
import NextButton from "./calendar-next-button.svelte";
|
|
13
|
+
import PrevButton from "./calendar-prev-button.svelte";
|
|
14
|
+
export { Day, Cell, Grid, Header, Months, GridRow, Heading, GridBody, GridHead, HeadCell, NextButton, PrevButton, Root as Calendar };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Root from "./calendar.svelte";
|
|
2
|
+
import Cell from "./calendar-cell.svelte";
|
|
3
|
+
import Day from "./calendar-day.svelte";
|
|
4
|
+
import Grid from "./calendar-grid.svelte";
|
|
5
|
+
import Header from "./calendar-header.svelte";
|
|
6
|
+
import Months from "./calendar-months.svelte";
|
|
7
|
+
import GridRow from "./calendar-grid-row.svelte";
|
|
8
|
+
import Heading from "./calendar-heading.svelte";
|
|
9
|
+
import GridBody from "./calendar-grid-body.svelte";
|
|
10
|
+
import GridHead from "./calendar-grid-head.svelte";
|
|
11
|
+
import HeadCell from "./calendar-head-cell.svelte";
|
|
12
|
+
import NextButton from "./calendar-next-button.svelte";
|
|
13
|
+
import PrevButton from "./calendar-prev-button.svelte";
|
|
14
|
+
export { Day, Cell, Grid, Header, Months, GridRow, Heading, GridBody, GridHead, HeadCell, NextButton, PrevButton,
|
|
15
|
+
//
|
|
16
|
+
Root as Calendar };
|
|
@@ -5,6 +5,7 @@ export { AspectRatio } from "./aspect-ratio/index.js";
|
|
|
5
5
|
export * as Avatar from "./avatar/index.js";
|
|
6
6
|
export { Badge, type Variant as BadgeVariant, badgeVariants } from "./badge/index.js";
|
|
7
7
|
export { Button, type ButtonEvents, type ButtonProps, buttonVariants } from "./button/index.js";
|
|
8
|
+
export * as Calendar from "./calendar/index.js";
|
|
8
9
|
export * as Card from "./card/index.js";
|
|
9
10
|
export { Checkbox } from "./checkbox/index.js";
|
|
10
11
|
export * as Collapsible from "./collapsible/index.js";
|
|
@@ -22,12 +23,14 @@ export * as Pagination from "./pagination/index.js";
|
|
|
22
23
|
export * as Popover from "./popover/index.js";
|
|
23
24
|
export { Progress } from "./progress/index.js";
|
|
24
25
|
export * as RadioGroup from "./radio-group/index.js";
|
|
26
|
+
export * as RangeCalendar from "./range-calendar/index.js";
|
|
25
27
|
export * as Select from "./select/index.js";
|
|
26
28
|
export { Separator } from "./separator/index.js";
|
|
27
29
|
export * as Sheet from "./sheet/index.js";
|
|
28
30
|
export { Skeleton } from "./skeleton/index.js";
|
|
29
31
|
export { Slider } from "./slider/index.js";
|
|
30
32
|
export { Toaster } from "./sonner/index.js";
|
|
33
|
+
export { toast } from "svelte-sonner";
|
|
31
34
|
export { Switch } from "./switch/index.js";
|
|
32
35
|
export * as Table from "./table/index.js";
|
|
33
36
|
export * as Tabs from "./tabs/index.js";
|
|
@@ -5,6 +5,7 @@ export { AspectRatio } from "./aspect-ratio/index.js";
|
|
|
5
5
|
export * as Avatar from "./avatar/index.js";
|
|
6
6
|
export { Badge, badgeVariants } from "./badge/index.js";
|
|
7
7
|
export { Button, buttonVariants } from "./button/index.js";
|
|
8
|
+
export * as Calendar from "./calendar/index.js";
|
|
8
9
|
export * as Card from "./card/index.js";
|
|
9
10
|
export { Checkbox } from "./checkbox/index.js";
|
|
10
11
|
export * as Collapsible from "./collapsible/index.js";
|
|
@@ -22,12 +23,14 @@ export * as Pagination from "./pagination/index.js";
|
|
|
22
23
|
export * as Popover from "./popover/index.js";
|
|
23
24
|
export { Progress } from "./progress/index.js";
|
|
24
25
|
export * as RadioGroup from "./radio-group/index.js";
|
|
26
|
+
export * as RangeCalendar from "./range-calendar/index.js";
|
|
25
27
|
export * as Select from "./select/index.js";
|
|
26
28
|
export { Separator } from "./separator/index.js";
|
|
27
29
|
export * as Sheet from "./sheet/index.js";
|
|
28
30
|
export { Skeleton } from "./skeleton/index.js";
|
|
29
31
|
export { Slider } from "./slider/index.js";
|
|
30
32
|
export { Toaster } from "./sonner/index.js";
|
|
33
|
+
export { toast } from "svelte-sonner";
|
|
31
34
|
export { Switch } from "./switch/index.js";
|
|
32
35
|
export * as Table from "./table/index.js";
|
|
33
36
|
export * as Tabs from "./tabs/index.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Root from "./range-calendar.svelte";
|
|
2
|
+
import Cell from "./range-calendar-cell.svelte";
|
|
3
|
+
import Day from "./range-calendar-day.svelte";
|
|
4
|
+
import Grid from "./range-calendar-grid.svelte";
|
|
5
|
+
import Header from "./range-calendar-header.svelte";
|
|
6
|
+
import Months from "./range-calendar-months.svelte";
|
|
7
|
+
import GridRow from "./range-calendar-grid-row.svelte";
|
|
8
|
+
import Heading from "./range-calendar-heading.svelte";
|
|
9
|
+
import GridBody from "./range-calendar-grid-body.svelte";
|
|
10
|
+
import GridHead from "./range-calendar-grid-head.svelte";
|
|
11
|
+
import HeadCell from "./range-calendar-head-cell.svelte";
|
|
12
|
+
import NextButton from "./range-calendar-next-button.svelte";
|
|
13
|
+
import PrevButton from "./range-calendar-prev-button.svelte";
|
|
14
|
+
export { Day, Cell, Grid, Header, Months, GridRow, Heading, GridBody, GridHead, HeadCell, NextButton, PrevButton, Root as RangeCalendar };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Root from "./range-calendar.svelte";
|
|
2
|
+
import Cell from "./range-calendar-cell.svelte";
|
|
3
|
+
import Day from "./range-calendar-day.svelte";
|
|
4
|
+
import Grid from "./range-calendar-grid.svelte";
|
|
5
|
+
import Header from "./range-calendar-header.svelte";
|
|
6
|
+
import Months from "./range-calendar-months.svelte";
|
|
7
|
+
import GridRow from "./range-calendar-grid-row.svelte";
|
|
8
|
+
import Heading from "./range-calendar-heading.svelte";
|
|
9
|
+
import GridBody from "./range-calendar-grid-body.svelte";
|
|
10
|
+
import GridHead from "./range-calendar-grid-head.svelte";
|
|
11
|
+
import HeadCell from "./range-calendar-head-cell.svelte";
|
|
12
|
+
import NextButton from "./range-calendar-next-button.svelte";
|
|
13
|
+
import PrevButton from "./range-calendar-prev-button.svelte";
|
|
14
|
+
export { Day, Cell, Grid, Header, Months, GridRow, Heading, GridBody, GridHead, HeadCell, NextButton, PrevButton,
|
|
15
|
+
//
|
|
16
|
+
Root as RangeCalendar };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
export let date;
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export { className as class };
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<RangeCalendarPrimitive.Cell
|
|
9
|
+
{date}
|
|
10
|
+
class={cn(
|
|
11
|
+
"h-9 w-9 text-center text-sm p-0 relative [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-outside-month])]:bg-accent/50 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...$$restProps}
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</RangeCalendarPrimitive.Cell>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: RangeCalendarPrimitive.CellProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type RangeCalendarCellProps = typeof __propDef.props;
|
|
13
|
+
export type RangeCalendarCellEvents = typeof __propDef.events;
|
|
14
|
+
export type RangeCalendarCellSlots = typeof __propDef.slots;
|
|
15
|
+
export default class RangeCalendarCell extends SvelteComponent<RangeCalendarCellProps, RangeCalendarCellEvents, RangeCalendarCellSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { buttonVariants } from "../button";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
export let date;
|
|
5
|
+
export let month;
|
|
6
|
+
let className = void 0;
|
|
7
|
+
export { className as class };
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<RangeCalendarPrimitive.Day
|
|
11
|
+
on:click
|
|
12
|
+
{date}
|
|
13
|
+
{month}
|
|
14
|
+
class={cn(
|
|
15
|
+
buttonVariants({ variant: "ghost" }),
|
|
16
|
+
"h-9 w-9 p-0 font-normal data-[selected]:opacity-100",
|
|
17
|
+
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground",
|
|
18
|
+
// Selection Start
|
|
19
|
+
"data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground data-[selection-start]:hover:bg-primary data-[selection-start]:hover:text-primary-foreground data-[selection-start]:focus:bg-primary data-[selection-start]:focus:text-primary-foreground",
|
|
20
|
+
// Selection End
|
|
21
|
+
"data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground data-[selection-end]:hover:bg-primary data-[selection-end]:hover:text-primary-foreground data-[selection-end]:focus:bg-primary data-[selection-end]:focus:text-primary-foreground",
|
|
22
|
+
// Outside months
|
|
23
|
+
"data-[outside-month]:text-muted-foreground data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground [&[data-outside-month][data-selected]]:opacity-30 data-[outside-month]:pointer-events-none",
|
|
24
|
+
// Disabled
|
|
25
|
+
"data-[disabled]:text-muted-foreground data-[disabled]:opacity-50",
|
|
26
|
+
// Unavailable
|
|
27
|
+
"data-[unavailable]:line-through data-[unavailable]:text-destructive-foreground",
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
30
|
+
{...$$restProps}
|
|
31
|
+
let:disabled
|
|
32
|
+
let:unavailable
|
|
33
|
+
let:builder
|
|
34
|
+
>
|
|
35
|
+
<slot {disabled} {unavailable} {builder}>
|
|
36
|
+
{date.day}
|
|
37
|
+
</slot>
|
|
38
|
+
</RangeCalendarPrimitive.Day>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<RangeCalendarPrimitive.GridBody class={cn(className)} {...$$restProps}>
|
|
8
|
+
<slot />
|
|
9
|
+
</RangeCalendarPrimitive.GridBody>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: RangeCalendarPrimitive.GridBodyProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type RangeCalendarGridBodyProps = typeof __propDef.props;
|
|
13
|
+
export type RangeCalendarGridBodyEvents = typeof __propDef.events;
|
|
14
|
+
export type RangeCalendarGridBodySlots = typeof __propDef.slots;
|
|
15
|
+
export default class RangeCalendarGridBody extends SvelteComponent<RangeCalendarGridBodyProps, RangeCalendarGridBodyEvents, RangeCalendarGridBodySlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<RangeCalendarPrimitive.GridHead class={cn(className)} {...$$restProps}>
|
|
8
|
+
<slot />
|
|
9
|
+
</RangeCalendarPrimitive.GridHead>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: RangeCalendarPrimitive.GridHeadProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type RangeCalendarGridHeadProps = typeof __propDef.props;
|
|
13
|
+
export type RangeCalendarGridHeadEvents = typeof __propDef.events;
|
|
14
|
+
export type RangeCalendarGridHeadSlots = typeof __propDef.slots;
|
|
15
|
+
export default class RangeCalendarGridHead extends SvelteComponent<RangeCalendarGridHeadProps, RangeCalendarGridHeadEvents, RangeCalendarGridHeadSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<RangeCalendarPrimitive.GridRow class={cn("flex", className)} {...$$restProps}>
|
|
8
|
+
<slot />
|
|
9
|
+
</RangeCalendarPrimitive.GridRow>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: RangeCalendarPrimitive.GridRowProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type RangeCalendarGridRowProps = typeof __propDef.props;
|
|
13
|
+
export type RangeCalendarGridRowEvents = typeof __propDef.events;
|
|
14
|
+
export type RangeCalendarGridRowSlots = typeof __propDef.slots;
|
|
15
|
+
export default class RangeCalendarGridRow extends SvelteComponent<RangeCalendarGridRowProps, RangeCalendarGridRowEvents, RangeCalendarGridRowSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<RangeCalendarPrimitive.Grid
|
|
8
|
+
class={cn("w-full border-collapse space-y-1", className)}
|
|
9
|
+
{...$$restProps}
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</RangeCalendarPrimitive.Grid>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: RangeCalendarPrimitive.GridProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type RangeCalendarGridProps = typeof __propDef.props;
|
|
13
|
+
export type RangeCalendarGridEvents = typeof __propDef.events;
|
|
14
|
+
export type RangeCalendarGridSlots = typeof __propDef.slots;
|
|
15
|
+
export default class RangeCalendarGrid extends SvelteComponent<RangeCalendarGridProps, RangeCalendarGridEvents, RangeCalendarGridSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<RangeCalendarPrimitive.HeadCell
|
|
8
|
+
class={cn(
|
|
9
|
+
"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
10
|
+
className
|
|
11
|
+
)}
|
|
12
|
+
{...$$restProps}
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</RangeCalendarPrimitive.HeadCell>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: RangeCalendarPrimitive.HeadCellProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type RangeCalendarHeadCellProps = typeof __propDef.props;
|
|
13
|
+
export type RangeCalendarHeadCellEvents = typeof __propDef.events;
|
|
14
|
+
export type RangeCalendarHeadCellSlots = typeof __propDef.slots;
|
|
15
|
+
export default class RangeCalendarHeadCell extends SvelteComponent<RangeCalendarHeadCellProps, RangeCalendarHeadCellEvents, RangeCalendarHeadCellSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<RangeCalendarPrimitive.Header
|
|
8
|
+
class={cn(
|
|
9
|
+
"flex justify-between pt-1 relative items-center w-full",
|
|
10
|
+
className
|
|
11
|
+
)}
|
|
12
|
+
{...$$restProps}
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</RangeCalendarPrimitive.Header>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: RangeCalendarPrimitive.HeaderProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type RangeCalendarHeaderProps = typeof __propDef.props;
|
|
13
|
+
export type RangeCalendarHeaderEvents = typeof __propDef.events;
|
|
14
|
+
export type RangeCalendarHeaderSlots = typeof __propDef.slots;
|
|
15
|
+
export default class RangeCalendarHeader extends SvelteComponent<RangeCalendarHeaderProps, RangeCalendarHeaderEvents, RangeCalendarHeaderSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../../../utils";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<RangeCalendarPrimitive.Heading
|
|
8
|
+
let:headingValue
|
|
9
|
+
class={cn("text-sm font-medium", className)}
|
|
10
|
+
{...$$restProps}
|
|
11
|
+
>
|
|
12
|
+
<slot {headingValue}>
|
|
13
|
+
{headingValue}
|
|
14
|
+
</slot>
|
|
15
|
+
</RangeCalendarPrimitive.Heading>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: RangeCalendarPrimitive.HeadingProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {
|
|
10
|
+
headingValue: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type RangeCalendarHeadingProps = typeof __propDef.props;
|
|
15
|
+
export type RangeCalendarHeadingEvents = typeof __propDef.events;
|
|
16
|
+
export type RangeCalendarHeadingSlots = typeof __propDef.slots;
|
|
17
|
+
export default class RangeCalendarHeading extends SvelteComponent<RangeCalendarHeadingProps, RangeCalendarHeadingEvents, RangeCalendarHeadingSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script>import { cn } from "../../../utils";
|
|
2
|
+
let className = void 0;
|
|
3
|
+
export { className as class };
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div
|
|
7
|
+
class={cn(
|
|
8
|
+
"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0 mt-4",
|
|
9
|
+
className
|
|
10
|
+
)}
|
|
11
|
+
{...$$restProps}
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type RangeCalendarMonthsProps = typeof __propDef.props;
|
|
13
|
+
export type RangeCalendarMonthsEvents = typeof __propDef.events;
|
|
14
|
+
export type RangeCalendarMonthsSlots = typeof __propDef.slots;
|
|
15
|
+
export default class RangeCalendarMonths extends SvelteComponent<RangeCalendarMonthsProps, RangeCalendarMonthsEvents, RangeCalendarMonthsSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { ChevronRight } from "lucide-svelte";
|
|
3
|
+
import { buttonVariants } from "../button";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
let className = void 0;
|
|
6
|
+
export { className as class };
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<RangeCalendarPrimitive.NextButton
|
|
10
|
+
on:click
|
|
11
|
+
class={cn(
|
|
12
|
+
buttonVariants({ variant: "outline" }),
|
|
13
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...$$restProps}
|
|
17
|
+
let:builder
|
|
18
|
+
>
|
|
19
|
+
<slot {builder}>
|
|
20
|
+
<ChevronRight class="h-4 w-4" />
|
|
21
|
+
</slot>
|
|
22
|
+
</RangeCalendarPrimitive.NextButton>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import { ChevronLeft } from "lucide-svelte";
|
|
3
|
+
import { buttonVariants } from "../button";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
let className = void 0;
|
|
6
|
+
export { className as class };
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<RangeCalendarPrimitive.PrevButton
|
|
10
|
+
on:click
|
|
11
|
+
class={cn(
|
|
12
|
+
buttonVariants({ variant: "outline" }),
|
|
13
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...$$restProps}
|
|
17
|
+
let:builder
|
|
18
|
+
>
|
|
19
|
+
<slot {builder}>
|
|
20
|
+
<ChevronLeft class="h-4 w-4" />
|
|
21
|
+
</slot>
|
|
22
|
+
</RangeCalendarPrimitive.PrevButton>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script>import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
2
|
+
import * as RangeCalendar from ".";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
export let value = void 0;
|
|
5
|
+
export let placeholder = void 0;
|
|
6
|
+
export let weekdayFormat = "short";
|
|
7
|
+
export let startValue = void 0;
|
|
8
|
+
let className = void 0;
|
|
9
|
+
export { className as class };
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<RangeCalendarPrimitive.Root
|
|
13
|
+
on:keydown
|
|
14
|
+
bind:value
|
|
15
|
+
bind:placeholder
|
|
16
|
+
bind:startValue
|
|
17
|
+
{weekdayFormat}
|
|
18
|
+
class={cn("p-3", className)}
|
|
19
|
+
{...$$restProps}
|
|
20
|
+
let:months
|
|
21
|
+
let:weekdays
|
|
22
|
+
>
|
|
23
|
+
<RangeCalendar.Header>
|
|
24
|
+
<RangeCalendar.PrevButton />
|
|
25
|
+
<RangeCalendar.Heading />
|
|
26
|
+
<RangeCalendar.NextButton />
|
|
27
|
+
</RangeCalendar.Header>
|
|
28
|
+
<RangeCalendar.Months>
|
|
29
|
+
{#each months as month}
|
|
30
|
+
<RangeCalendar.Grid>
|
|
31
|
+
<RangeCalendar.GridHead>
|
|
32
|
+
<RangeCalendar.GridRow class="flex">
|
|
33
|
+
{#each weekdays as weekday}
|
|
34
|
+
<RangeCalendar.HeadCell>
|
|
35
|
+
{weekday.slice(0, 2)}
|
|
36
|
+
</RangeCalendar.HeadCell>
|
|
37
|
+
{/each}
|
|
38
|
+
</RangeCalendar.GridRow>
|
|
39
|
+
</RangeCalendar.GridHead>
|
|
40
|
+
<RangeCalendar.GridBody>
|
|
41
|
+
{#each month.weeks as weekDates}
|
|
42
|
+
<RangeCalendar.GridRow class="w-full mt-2">
|
|
43
|
+
{#each weekDates as date}
|
|
44
|
+
<RangeCalendar.Cell {date}>
|
|
45
|
+
<RangeCalendar.Day
|
|
46
|
+
{date}
|
|
47
|
+
month={month.value}
|
|
48
|
+
/>
|
|
49
|
+
</RangeCalendar.Cell>
|
|
50
|
+
{/each}
|
|
51
|
+
</RangeCalendar.GridRow>
|
|
52
|
+
{/each}
|
|
53
|
+
</RangeCalendar.GridBody>
|
|
54
|
+
</RangeCalendar.Grid>
|
|
55
|
+
{/each}
|
|
56
|
+
</RangeCalendar.Months>
|
|
57
|
+
</RangeCalendarPrimitive.Root>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: RangeCalendarPrimitive.Props;
|
|
5
|
+
slots: {};
|
|
6
|
+
events: RangeCalendarPrimitive.Events;
|
|
7
|
+
};
|
|
8
|
+
export type RangeCalendarProps = typeof __propDef.props;
|
|
9
|
+
export type RangeCalendarEvents = typeof __propDef.events;
|
|
10
|
+
export type RangeCalendarSlots = typeof __propDef.slots;
|
|
11
|
+
export default class RangeCalendar extends SvelteComponent<RangeCalendarProps, RangeCalendarEvents, RangeCalendarSlots> {
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "formsnap";
|
package/dist/formsnap.js
ADDED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "mode-watcher";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "mode-watcher";
|
package/package.json
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayord/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"svelte": "./dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"./utils/*": {
|
|
11
|
-
"types": "./dist/utils
|
|
12
|
-
"svelte": "./dist/utils
|
|
11
|
+
"types": "./dist/utils.d.ts",
|
|
12
|
+
"svelte": "./dist/utils.js"
|
|
13
|
+
},
|
|
14
|
+
"./mode-watcher/*": {
|
|
15
|
+
"types": "./dist/mode-watcher.d.ts",
|
|
16
|
+
"svelte": "./dist/mode-watcher.js"
|
|
17
|
+
},
|
|
18
|
+
"./formsnap/*": {
|
|
19
|
+
"types": "./dist/formsnap.d.ts",
|
|
20
|
+
"svelte": "./dist/formsnap.js"
|
|
13
21
|
}
|
|
14
22
|
},
|
|
15
23
|
"files": [
|
|
@@ -21,11 +29,12 @@
|
|
|
21
29
|
"svelte": "^4.0.0"
|
|
22
30
|
},
|
|
23
31
|
"dependencies": {
|
|
24
|
-
"
|
|
32
|
+
"@internationalized/date": "^3.5.1",
|
|
33
|
+
"bits-ui": "^0.14.0",
|
|
25
34
|
"clsx": "^2.1.0",
|
|
26
35
|
"cmdk-sv": "^0.0.12",
|
|
27
36
|
"formsnap": "^0.4.2",
|
|
28
|
-
"lucide-svelte": "^0.
|
|
37
|
+
"lucide-svelte": "^0.309.0",
|
|
29
38
|
"mode-watcher": "^0.1.2",
|
|
30
39
|
"svelte-headless-table": "^0.18.1",
|
|
31
40
|
"svelte-sonner": "^0.3.11",
|
|
@@ -38,7 +47,7 @@
|
|
|
38
47
|
"devDependencies": {
|
|
39
48
|
"@playwright/test": "^1.40.1",
|
|
40
49
|
"@sveltejs/adapter-auto": "^3.1.0",
|
|
41
|
-
"@sveltejs/kit": "^2.
|
|
50
|
+
"@sveltejs/kit": "^2.3.0",
|
|
42
51
|
"@sveltejs/package": "^2.2.5",
|
|
43
52
|
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
|
44
53
|
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: import("bits-ui/dist/bits/dialog/types").DescriptionProps;
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {
|
|
8
|
-
default: {};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export type DrawerDescriptionProps = typeof __propDef.props;
|
|
12
|
-
export type DrawerDescriptionEvents = typeof __propDef.events;
|
|
13
|
-
export type DrawerDescriptionSlots = typeof __propDef.slots;
|
|
14
|
-
export default class DrawerDescription extends SvelteComponent<DrawerDescriptionProps, DrawerDescriptionEvents, DrawerDescriptionSlots> {
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: import("bits-ui/dist/bits/dialog/types").TitleProps;
|
|
4
|
-
events: {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
};
|
|
7
|
-
slots: {
|
|
8
|
-
default: {};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export type DrawerTitleProps = typeof __propDef.props;
|
|
12
|
-
export type DrawerTitleEvents = typeof __propDef.events;
|
|
13
|
-
export type DrawerTitleSlots = typeof __propDef.slots;
|
|
14
|
-
export default class DrawerTitle extends SvelteComponent<DrawerTitleProps, DrawerTitleEvents, DrawerTitleSlots> {
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="svelte" />
|
|
2
|
-
import { Drawer as DrawerPrimitive } from "vaul-svelte";
|
|
3
|
-
import Root from "./drawer.svelte";
|
|
4
|
-
import Content from "./drawer-content.svelte";
|
|
5
|
-
import Description from "./drawer-description.svelte";
|
|
6
|
-
import Overlay from "./drawer-overlay.svelte";
|
|
7
|
-
import Footer from "./drawer-footer.svelte";
|
|
8
|
-
import Header from "./drawer-header.svelte";
|
|
9
|
-
import Title from "./drawer-title.svelte";
|
|
10
|
-
declare const Trigger: typeof DrawerPrimitive.Close;
|
|
11
|
-
declare const Portal: typeof import("bits-ui/dist/bits/dialog").Portal;
|
|
12
|
-
declare const Close: typeof DrawerPrimitive.Close;
|
|
13
|
-
export { Root, Content, Description, Overlay, Footer, Header, Title, Trigger, Portal, Close, Root as Drawer, Content as DrawerContent, Description as DrawerDescription, Overlay as DrawerOverlay, Footer as DrawerFooter, Header as DrawerHeader, Title as DrawerTitle, Trigger as DrawerTrigger, Portal as DrawerPortal, Close as DrawerClose };
|
package/dist/external.d.ts
DELETED
package/dist/external.js
DELETED
package/dist/extra.d.ts
DELETED
package/dist/extra.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getForm, getFormSchema, getFormControl } from "formsnap";
|