init commit
This commit is contained in:
commit
c9d982669a
461 changed files with 30317 additions and 0 deletions
30
resources/js/components/ui/calendar/calendar-day.svelte
Normal file
30
resources/js/components/ui/calendar/calendar-day.svelte
Normal file
|
@ -0,0 +1,30 @@
|
|||
<script lang="ts">
|
||||
import { buttonVariants } from "@/components/ui/button/index.js";
|
||||
import { cn } from "@/lib/utils.js";
|
||||
import { Calendar as CalendarPrimitive } from "bits-ui";
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
...restProps
|
||||
}: CalendarPrimitive.DayProps = $props();
|
||||
</script>
|
||||
|
||||
<CalendarPrimitive.Day
|
||||
bind:ref
|
||||
class={cn(
|
||||
buttonVariants({ variant: "ghost" }),
|
||||
"size-8 select-none p-0 font-normal",
|
||||
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground",
|
||||
// Selected
|
||||
"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 dark:data-selected:hover:bg-primary dark:data-selected:focus:bg-primary",
|
||||
// Disabled
|
||||
"data-disabled:text-muted-foreground data-disabled:opacity-50",
|
||||
// Unavailable
|
||||
"data-unavailable:text-destructive-foreground data-unavailable:line-through",
|
||||
// Outside months
|
||||
"data-[outside-month]:text-muted-foreground [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground data-[outside-month]:pointer-events-none data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:opacity-30",
|
||||
className
|
||||
)}
|
||||
{...restProps}
|
||||
/>
|
Loading…
Add table
Add a link
Reference in a new issue