-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
628 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script lang="ts"> | ||
import { Checkbox as CheckboxPrimitive } from "bits-ui"; | ||
import Check from "lucide-svelte/icons/check"; | ||
import Minus from "lucide-svelte/icons/minus"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = CheckboxPrimitive.Props; | ||
type $$Events = CheckboxPrimitive.Events; | ||
let className: $$Props["class"] = undefined; | ||
export let checked: $$Props["checked"] = false; | ||
export { className as class }; | ||
</script> | ||
|
||
<CheckboxPrimitive.Root | ||
class={cn( | ||
"peer box-content h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[disabled=true]:opacity-50", | ||
className | ||
)} | ||
bind:checked | ||
{...$$restProps} | ||
on:click | ||
> | ||
<CheckboxPrimitive.Indicator | ||
class={cn("flex h-4 w-4 items-center justify-center text-current")} | ||
let:isChecked | ||
let:isIndeterminate | ||
> | ||
{#if isChecked} | ||
<Check class="h-3.5 w-3.5" /> | ||
{:else if isIndeterminate} | ||
<Minus class="h-3.5 w-3.5" /> | ||
{/if} | ||
</CheckboxPrimitive.Indicator> | ||
</CheckboxPrimitive.Root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Root from "./checkbox.svelte"; | ||
export { | ||
Root, | ||
// | ||
Root as Checkbox, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Root from "./label.svelte"; | ||
|
||
export { | ||
Root, | ||
// | ||
Root as Label, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script lang="ts"> | ||
import { Label as LabelPrimitive } from "bits-ui"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = LabelPrimitive.Props; | ||
type $$Events = LabelPrimitive.Events; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<LabelPrimitive.Root | ||
class={cn( | ||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", | ||
className | ||
)} | ||
{...$$restProps} | ||
on:mousedown | ||
> | ||
<slot /> | ||
</LabelPrimitive.Root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Popover as PopoverPrimitive } from "bits-ui"; | ||
import Content from "./popover-content.svelte"; | ||
const Root = PopoverPrimitive.Root; | ||
const Trigger = PopoverPrimitive.Trigger; | ||
const Close = PopoverPrimitive.Close; | ||
|
||
export { | ||
Root, | ||
Content, | ||
Trigger, | ||
Close, | ||
// | ||
Root as Popover, | ||
Content as PopoverContent, | ||
Trigger as PopoverTrigger, | ||
Close as PopoverClose, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script lang="ts"> | ||
import { Popover as PopoverPrimitive } from "bits-ui"; | ||
import { cn, flyAndScale } from "$lib/utils.js"; | ||
type $$Props = PopoverPrimitive.ContentProps; | ||
let className: $$Props["class"] = undefined; | ||
export let transition: $$Props["transition"] = flyAndScale; | ||
export let transitionConfig: $$Props["transitionConfig"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<PopoverPrimitive.Content | ||
{transition} | ||
{transitionConfig} | ||
class={cn( | ||
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none", | ||
className | ||
)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</PopoverPrimitive.Content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { RadioGroup as RadioGroupPrimitive } from "bits-ui"; | ||
|
||
import Root from "./radio-group.svelte"; | ||
import Item from "./radio-group-item.svelte"; | ||
const Input = RadioGroupPrimitive.Input; | ||
|
||
export { | ||
Root, | ||
Input, | ||
Item, | ||
// | ||
Root as RadioGroup, | ||
Input as RadioGroupInput, | ||
Item as RadioGroupItem, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script lang="ts"> | ||
import { RadioGroup as RadioGroupPrimitive } from "bits-ui"; | ||
import Circle from "lucide-svelte/icons/circle"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = RadioGroupPrimitive.ItemProps; | ||
type $$Events = RadioGroupPrimitive.ItemEvents; | ||
let className: $$Props["class"] = undefined; | ||
export let value: $$Props["value"]; | ||
export { className as class }; | ||
</script> | ||
|
||
<RadioGroupPrimitive.Item | ||
{value} | ||
class={cn( | ||
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", | ||
className | ||
)} | ||
{...$$restProps} | ||
on:click | ||
> | ||
<div class="flex items-center justify-center"> | ||
<RadioGroupPrimitive.ItemIndicator> | ||
<Circle class="h-2.5 w-2.5 fill-current text-current" /> | ||
</RadioGroupPrimitive.ItemIndicator> | ||
</div> | ||
</RadioGroupPrimitive.Item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script lang="ts"> | ||
import { RadioGroup as RadioGroupPrimitive } from "bits-ui"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = RadioGroupPrimitive.Props; | ||
let className: $$Props["class"] = undefined; | ||
export let value: $$Props["value"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<RadioGroupPrimitive.Root bind:value class={cn("grid gap-2", className)} {...$$restProps}> | ||
<slot /> | ||
</RadioGroupPrimitive.Root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Root from "./table.svelte"; | ||
import Body from "./table-body.svelte"; | ||
import Caption from "./table-caption.svelte"; | ||
import Cell from "./table-cell.svelte"; | ||
import Footer from "./table-footer.svelte"; | ||
import Head from "./table-head.svelte"; | ||
import Header from "./table-header.svelte"; | ||
import Row from "./table-row.svelte"; | ||
|
||
export { | ||
Root, | ||
Body, | ||
Caption, | ||
Cell, | ||
Footer, | ||
Head, | ||
Header, | ||
Row, | ||
// | ||
Root as Table, | ||
Body as TableBody, | ||
Caption as TableCaption, | ||
Cell as TableCell, | ||
Footer as TableFooter, | ||
Head as TableHead, | ||
Header as TableHeader, | ||
Row as TableRow, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = HTMLAttributes<HTMLTableSectionElement>; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<tbody class={cn("[&_tr:last-child]:border-0", className)} {...$$restProps}> | ||
<slot /> | ||
</tbody> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = HTMLAttributes<HTMLTableCaptionElement>; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<caption class={cn("mt-4 text-sm text-muted-foreground", className)} {...$$restProps}> | ||
<slot /> | ||
</caption> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script lang="ts"> | ||
import type { HTMLTdAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = HTMLTdAttributes; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<td | ||
class={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)} | ||
{...$$restProps} | ||
on:click | ||
on:keydown | ||
> | ||
<slot /> | ||
</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = HTMLAttributes<HTMLTableSectionElement>; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<tfoot class={cn("bg-primary font-medium text-primary-foreground", className)} {...$$restProps}> | ||
<slot /> | ||
</tfoot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script lang="ts"> | ||
import type { HTMLThAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = HTMLThAttributes; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<th | ||
class={cn( | ||
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", | ||
className | ||
)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = HTMLAttributes<HTMLTableSectionElement>; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions --> | ||
<thead class={cn("[&_tr]:border-b", className)} {...$$restProps} on:click on:keydown> | ||
<slot /> | ||
</thead> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = HTMLAttributes<HTMLTableRowElement> & { | ||
"data-state"?: unknown; | ||
}; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<tr | ||
class={cn( | ||
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", | ||
className | ||
)} | ||
{...$$restProps} | ||
on:click | ||
on:keydown | ||
> | ||
<slot /> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script lang="ts"> | ||
import type { HTMLTableAttributes } from "svelte/elements"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = HTMLTableAttributes; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<div class="w-full overflow-auto"> | ||
<table class={cn("w-full caption-bottom text-sm", className)} {...$$restProps}> | ||
<slot /> | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const prerender = true; | ||
export const prerender = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<slot /> | ||
|
||
<style> | ||
.cell { | ||
text-align: center; | ||
@apply font-semibold; | ||
@apply bg-primary; | ||
} | ||
.cell-empty { | ||
@apply bg-muted; | ||
} | ||
.jenis-Kongsi { | ||
@apply bg-primary; | ||
} | ||
.jenis-Arab { | ||
@apply bg-secondary; | ||
} | ||
.jenis-Ciptaan { | ||
@apply bg-accent; | ||
} | ||
</style> |
Oops, something went wrong.