@engineio/ui 0.4.0
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/LICENSE +21 -0
- package/README.md +274 -0
- package/dist/components/brand/engine-icon.svelte +75 -0
- package/dist/components/brand/engine-icon.svelte.d.ts +25 -0
- package/dist/components/brand/engine-wordmark.svelte +104 -0
- package/dist/components/brand/engine-wordmark.svelte.d.ts +16 -0
- package/dist/components/brand/index.d.ts +3 -0
- package/dist/components/brand/index.js +3 -0
- package/dist/components/ui/alert/alert-description.svelte +22 -0
- package/dist/components/ui/alert/alert-description.svelte.d.ts +5 -0
- package/dist/components/ui/alert/alert-title.svelte +31 -0
- package/dist/components/ui/alert/alert-title.svelte.d.ts +8 -0
- package/dist/components/ui/alert/alert.svelte +114 -0
- package/dist/components/ui/alert/alert.svelte.d.ts +70 -0
- package/dist/components/ui/alert/index.d.ts +5 -0
- package/dist/components/ui/alert/index.js +7 -0
- package/dist/components/ui/badge/badge.svelte +96 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +88 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.js +2 -0
- package/dist/components/ui/button/button.svelte +137 -0
- package/dist/components/ui/button/button.svelte.d.ts +154 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +4 -0
- package/dist/components/ui/card/card-content.svelte +16 -0
- package/dist/components/ui/card/card-content.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-description.svelte +20 -0
- package/dist/components/ui/card/card-description.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-footer.svelte +20 -0
- package/dist/components/ui/card/card-footer.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-header.svelte +20 -0
- package/dist/components/ui/card/card-header.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-title.svelte +25 -0
- package/dist/components/ui/card/card-title.svelte.d.ts +8 -0
- package/dist/components/ui/card/card.svelte +23 -0
- package/dist/components/ui/card/card.svelte.d.ts +5 -0
- package/dist/components/ui/card/index.d.ts +7 -0
- package/dist/components/ui/card/index.js +9 -0
- package/dist/components/ui/checkbox/checkbox.svelte +38 -0
- package/dist/components/ui/checkbox/checkbox.svelte.d.ts +4 -0
- package/dist/components/ui/checkbox/index.d.ts +2 -0
- package/dist/components/ui/checkbox/index.js +4 -0
- package/dist/components/ui/dialog/dialog-content.svelte +41 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +9 -0
- package/dist/components/ui/dialog/dialog-description.svelte +16 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +23 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-header.svelte +20 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +19 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-title.svelte +16 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/index.d.ts +12 -0
- package/dist/components/ui/dialog/index.js +14 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.js +4 -0
- package/dist/components/ui/input/input.svelte +52 -0
- package/dist/components/ui/input/input.svelte.d.ts +13 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.js +4 -0
- package/dist/components/ui/label/label.svelte +19 -0
- package/dist/components/ui/label/label.svelte.d.ts +4 -0
- package/dist/components/ui/popover/index.d.ts +6 -0
- package/dist/components/ui/popover/index.js +8 -0
- package/dist/components/ui/popover/popover-content.svelte +28 -0
- package/dist/components/ui/popover/popover-content.svelte.d.ts +7 -0
- package/dist/components/ui/progress/index.d.ts +2 -0
- package/dist/components/ui/progress/index.js +4 -0
- package/dist/components/ui/progress/progress.svelte +25 -0
- package/dist/components/ui/progress/progress.svelte.d.ts +4 -0
- package/dist/components/ui/radio-group/index.d.ts +3 -0
- package/dist/components/ui/radio-group/index.js +5 -0
- package/dist/components/ui/radio-group/radio-group-item.svelte +28 -0
- package/dist/components/ui/radio-group/radio-group-item.svelte.d.ts +4 -0
- package/dist/components/ui/radio-group/radio-group.svelte +13 -0
- package/dist/components/ui/radio-group/radio-group.svelte.d.ts +4 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/index.js +13 -0
- package/dist/components/ui/select/select-content.svelte +39 -0
- package/dist/components/ui/select/select-content.svelte.d.ts +7 -0
- package/dist/components/ui/select/select-group-heading.svelte +16 -0
- package/dist/components/ui/select/select-group-heading.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-item.svelte +37 -0
- package/dist/components/ui/select/select-item.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte +19 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte +19 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-separator.svelte +13 -0
- package/dist/components/ui/select/select-separator.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-trigger.svelte +24 -0
- package/dist/components/ui/select/select-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.js +4 -0
- package/dist/components/ui/separator/separator.svelte +22 -0
- package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.js +4 -0
- package/dist/components/ui/skeleton/skeleton.svelte +17 -0
- package/dist/components/ui/skeleton/skeleton.svelte.d.ts +5 -0
- package/dist/components/ui/switch/index.d.ts +2 -0
- package/dist/components/ui/switch/index.js +4 -0
- package/dist/components/ui/switch/switch.svelte +27 -0
- package/dist/components/ui/switch/switch.svelte.d.ts +4 -0
- package/dist/components/ui/table/index.d.ts +9 -0
- package/dist/components/ui/table/index.js +11 -0
- package/dist/components/ui/table/table-body.svelte +22 -0
- package/dist/components/ui/table/table-body.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-caption.svelte +21 -0
- package/dist/components/ui/table/table-caption.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-cell.svelte +33 -0
- package/dist/components/ui/table/table-cell.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-footer.svelte +29 -0
- package/dist/components/ui/table/table-footer.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-head.svelte +36 -0
- package/dist/components/ui/table/table-head.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-header.svelte +23 -0
- package/dist/components/ui/table/table-header.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-row.svelte +32 -0
- package/dist/components/ui/table/table-row.svelte.d.ts +5 -0
- package/dist/components/ui/table/table.svelte +36 -0
- package/dist/components/ui/table/table.svelte.d.ts +5 -0
- package/dist/components/ui/tabs/index.d.ts +6 -0
- package/dist/components/ui/tabs/index.js +8 -0
- package/dist/components/ui/tabs/tabs-content.svelte +19 -0
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-list.svelte +27 -0
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +7 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte +29 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/dist/components/ui/textarea/textarea.svelte +22 -0
- package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
- package/dist/components/ui/tooltip/index.d.ts +6 -0
- package/dist/components/ui/tooltip/index.js +8 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +21 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +4 -0
- package/dist/fonts/ProximaNova-ExtraCondensedThin.otf +0 -0
- package/dist/fonts/ProximaNovaBlack.otf +0 -0
- package/dist/fonts/ProximaNovaBold.otf +0 -0
- package/dist/fonts/ProximaNovaCondensedBlack.otf +0 -0
- package/dist/fonts/ProximaNovaExtraCondensedBlack.otf +0 -0
- package/dist/fonts/ProximaNovaRegular.otf +0 -0
- package/dist/fonts/ProximaNovaSemibold.otf +0 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +44 -0
- package/dist/styles/fonts.css +116 -0
- package/dist/styles/index.css +28 -0
- package/dist/styles/tokens.css +221 -0
- package/dist/styles/utilities.css +129 -0
- package/dist/utils.d.ts +18 -0
- package/dist/utils.js +22 -0
- package/package.json +92 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Progress as ProgressPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
max = 100,
|
|
9
|
+
value,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithoutChildrenOrChild<ProgressPrimitive.RootProps> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<ProgressPrimitive.Root
|
|
15
|
+
bind:ref
|
|
16
|
+
class={cn("bg-secondary relative h-4 w-full overflow-hidden rounded-full", className)}
|
|
17
|
+
{value}
|
|
18
|
+
{max}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
21
|
+
<div
|
|
22
|
+
class="bg-primary h-full w-full flex-1 transition-all"
|
|
23
|
+
style={`transform: translateX(-${100 - (100 * (value ?? 0)) / (max ?? 1)}%)`}
|
|
24
|
+
></div>
|
|
25
|
+
</ProgressPrimitive.Root>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
3
|
+
import Circle from "@lucide/svelte/icons/circle";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildrenOrChild<RadioGroupPrimitive.ItemProps> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<RadioGroupPrimitive.Item
|
|
14
|
+
bind:ref
|
|
15
|
+
class={cn(
|
|
16
|
+
"aspect-square size-4 rounded-full border-[1.5px] border-grey-500 text-primary transition-colors duration-140 ease-brand data-[state=checked]:border-primary focus-visible:ring-ring focus-visible:ring-offset-background focus-visible:ring-2 focus-visible:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-38",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
21
|
+
{#snippet children({ checked })}
|
|
22
|
+
<div class="flex items-center justify-center">
|
|
23
|
+
{#if checked}
|
|
24
|
+
<Circle class="size-2.5 fill-current text-current" />
|
|
25
|
+
{/if}
|
|
26
|
+
</div>
|
|
27
|
+
{/snippet}
|
|
28
|
+
</RadioGroupPrimitive.Item>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RadioGroup as RadioGroupPrimitive } from "bits-ui";
|
|
2
|
+
declare const RadioGroupItem: import("svelte").Component<Omit<Omit<RadioGroupPrimitive.ItemProps, "child">, "children">, {}, "ref">;
|
|
3
|
+
type RadioGroupItem = ReturnType<typeof RadioGroupItem>;
|
|
4
|
+
export default RadioGroupItem;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
value = $bindable(""),
|
|
9
|
+
...restProps
|
|
10
|
+
}: RadioGroupPrimitive.RootProps = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<RadioGroupPrimitive.Root bind:ref bind:value class={cn("grid gap-2", className)} {...restProps} />
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
|
+
import GroupHeading from "./select-group-heading.svelte";
|
|
3
|
+
import Item from "./select-item.svelte";
|
|
4
|
+
import Content from "./select-content.svelte";
|
|
5
|
+
import Trigger from "./select-trigger.svelte";
|
|
6
|
+
import Separator from "./select-separator.svelte";
|
|
7
|
+
import ScrollDownButton from "./select-scroll-down-button.svelte";
|
|
8
|
+
import ScrollUpButton from "./select-scroll-up-button.svelte";
|
|
9
|
+
declare const Root: import("svelte").Component<import("bits-ui").ComboboxRootPropsWithoutHTML, {}, "value" | "open">;
|
|
10
|
+
declare const Group: import("svelte").Component<SelectPrimitive.GroupProps, {}, "ref">;
|
|
11
|
+
export { Root, Group, GroupHeading, Item, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton, Root as Select, Group as SelectGroup, GroupHeading as SelectGroupHeading, Item as SelectItem, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
|
+
import GroupHeading from "./select-group-heading.svelte";
|
|
3
|
+
import Item from "./select-item.svelte";
|
|
4
|
+
import Content from "./select-content.svelte";
|
|
5
|
+
import Trigger from "./select-trigger.svelte";
|
|
6
|
+
import Separator from "./select-separator.svelte";
|
|
7
|
+
import ScrollDownButton from "./select-scroll-down-button.svelte";
|
|
8
|
+
import ScrollUpButton from "./select-scroll-up-button.svelte";
|
|
9
|
+
const Root = SelectPrimitive.Root;
|
|
10
|
+
const Group = SelectPrimitive.Group;
|
|
11
|
+
export { Root, Group, GroupHeading, Item, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton,
|
|
12
|
+
//
|
|
13
|
+
Root as Select, Group as SelectGroup, GroupHeading as SelectGroupHeading, Item as SelectItem, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
|
|
3
|
+
import SelectScrollUpButton from "./select-scroll-up-button.svelte";
|
|
4
|
+
import SelectScrollDownButton from "./select-scroll-down-button.svelte";
|
|
5
|
+
import { cn } from "../../../utils.js";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
sideOffset = 4,
|
|
11
|
+
portalProps,
|
|
12
|
+
children,
|
|
13
|
+
...restProps
|
|
14
|
+
}: WithoutChild<SelectPrimitive.ContentProps> & {
|
|
15
|
+
portalProps?: SelectPrimitive.PortalProps;
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<SelectPrimitive.Portal {...portalProps}>
|
|
20
|
+
<SelectPrimitive.Content
|
|
21
|
+
bind:ref
|
|
22
|
+
{sideOffset}
|
|
23
|
+
class={cn(
|
|
24
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-card-inner border border-grey-700 shadow-panel data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
25
|
+
className
|
|
26
|
+
)}
|
|
27
|
+
{...restProps}
|
|
28
|
+
>
|
|
29
|
+
<SelectScrollUpButton />
|
|
30
|
+
<SelectPrimitive.Viewport
|
|
31
|
+
class={cn(
|
|
32
|
+
"h-[var(--bits-select-anchor-height)] w-full min-w-[var(--bits-select-anchor-width)] p-1"
|
|
33
|
+
)}
|
|
34
|
+
>
|
|
35
|
+
{@render children?.()}
|
|
36
|
+
</SelectPrimitive.Viewport>
|
|
37
|
+
<SelectScrollDownButton />
|
|
38
|
+
</SelectPrimitive.Content>
|
|
39
|
+
</SelectPrimitive.Portal>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
|
|
2
|
+
type $$ComponentProps = WithoutChild<SelectPrimitive.ContentProps> & {
|
|
3
|
+
portalProps?: SelectPrimitive.PortalProps;
|
|
4
|
+
};
|
|
5
|
+
declare const SelectContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
|
+
type SelectContent = ReturnType<typeof SelectContent>;
|
|
7
|
+
export default SelectContent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: SelectPrimitive.GroupHeadingProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<SelectPrimitive.GroupHeading
|
|
13
|
+
bind:ref
|
|
14
|
+
class={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Check from "@lucide/svelte/icons/check";
|
|
3
|
+
import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
value,
|
|
10
|
+
label,
|
|
11
|
+
children: childrenProp,
|
|
12
|
+
...restProps
|
|
13
|
+
}: WithoutChild<SelectPrimitive.ItemProps> = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<SelectPrimitive.Item
|
|
17
|
+
bind:ref
|
|
18
|
+
{value}
|
|
19
|
+
class={cn(
|
|
20
|
+
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
23
|
+
{...restProps}
|
|
24
|
+
>
|
|
25
|
+
{#snippet children({ selected, highlighted })}
|
|
26
|
+
<span class="absolute left-2 flex size-3.5 items-center justify-center">
|
|
27
|
+
{#if selected}
|
|
28
|
+
<Check class="size-4" />
|
|
29
|
+
{/if}
|
|
30
|
+
</span>
|
|
31
|
+
{#if childrenProp}
|
|
32
|
+
{@render childrenProp({ selected, highlighted })}
|
|
33
|
+
{:else}
|
|
34
|
+
{label || value}
|
|
35
|
+
{/if}
|
|
36
|
+
{/snippet}
|
|
37
|
+
</SelectPrimitive.Item>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ChevronDown from "@lucide/svelte/icons/chevron-down";
|
|
3
|
+
import { Select as SelectPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildrenOrChild<SelectPrimitive.ScrollDownButtonProps> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<SelectPrimitive.ScrollDownButton
|
|
14
|
+
bind:ref
|
|
15
|
+
class={cn("flex cursor-default items-center justify-center py-1", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
>
|
|
18
|
+
<ChevronDown class="size-4" />
|
|
19
|
+
</SelectPrimitive.ScrollDownButton>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
|
+
declare const SelectScrollDownButton: import("svelte").Component<Omit<Omit<SelectPrimitive.ScrollDownButtonProps, "child">, "children">, {}, "ref">;
|
|
3
|
+
type SelectScrollDownButton = ReturnType<typeof SelectScrollDownButton>;
|
|
4
|
+
export default SelectScrollDownButton;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ChevronUp from "@lucide/svelte/icons/chevron-up";
|
|
3
|
+
import { Select as SelectPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildrenOrChild<SelectPrimitive.ScrollUpButtonProps> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<SelectPrimitive.ScrollUpButton
|
|
14
|
+
bind:ref
|
|
15
|
+
class={cn("flex cursor-default items-center justify-center py-1", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
>
|
|
18
|
+
<ChevronUp class="size-4" />
|
|
19
|
+
</SelectPrimitive.ScrollUpButton>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
|
+
declare const SelectScrollUpButton: import("svelte").Component<Omit<Omit<SelectPrimitive.ScrollUpButtonProps, "child">, "children">, {}, "ref">;
|
|
3
|
+
type SelectScrollUpButton = ReturnType<typeof SelectScrollUpButton>;
|
|
4
|
+
export default SelectScrollUpButton;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Separator as SeparatorPrimitive } from "bits-ui";
|
|
3
|
+
import { Separator } from "../separator/index.js";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: SeparatorPrimitive.RootProps = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<Separator bind:ref class={cn("bg-muted -mx-1 my-1 h-px", className)} {...restProps} />
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
|
|
3
|
+
import ChevronDown from "@lucide/svelte/icons/chevron-down";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithoutChild<SelectPrimitive.TriggerProps> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<SelectPrimitive.Trigger
|
|
15
|
+
bind:ref
|
|
16
|
+
class={cn(
|
|
17
|
+
"field flex h-10 w-full cursor-pointer items-center justify-between px-3 py-2 text-[15px] data-[placeholder]:text-grey-400 [&>span]:line-clamp-1",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
<ChevronDown class="size-4 opacity-50" />
|
|
24
|
+
</SelectPrimitive.Trigger>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../../utils.js"
|
|
3
|
+
import { Separator as SeparatorPrimitive } from "bits-ui"
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
orientation = "horizontal",
|
|
9
|
+
...restProps
|
|
10
|
+
}: SeparatorPrimitive.RootProps = $props()
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<SeparatorPrimitive.Root
|
|
14
|
+
bind:ref
|
|
15
|
+
class={cn(
|
|
16
|
+
"bg-grey-700 shrink-0",
|
|
17
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "min-h-full w-[1px]",
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
{orientation}
|
|
21
|
+
{...restProps}
|
|
22
|
+
/>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef, WithoutChildren } from "bits-ui";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
class={cn("bg-muted animate-pulse rounded-md", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
></div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const Skeleton: import("svelte").Component<Omit<WithElementRef<HTMLAttributes<HTMLDivElement>>, "children">, {}, "ref">;
|
|
4
|
+
type Skeleton = ReturnType<typeof Skeleton>;
|
|
5
|
+
export default Skeleton;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Switch as SwitchPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
checked = $bindable(false),
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildrenOrChild<SwitchPrimitive.RootProps> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<SwitchPrimitive.Root
|
|
14
|
+
bind:ref
|
|
15
|
+
bind:checked
|
|
16
|
+
class={cn(
|
|
17
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-control border-2 border-transparent transition-colors duration-140 ease-brand data-[state=checked]:bg-primary data-[state=unchecked]:bg-grey-700 focus-visible:ring-ring focus-visible:ring-offset-background focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-38",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
<SwitchPrimitive.Thumb
|
|
23
|
+
class={cn(
|
|
24
|
+
"pointer-events-none block size-5 rounded-full bg-white ring-0 transition-transform duration-140 ease-brand data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
25
|
+
)}
|
|
26
|
+
/>
|
|
27
|
+
</SwitchPrimitive.Root>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Root from "./table.svelte";
|
|
2
|
+
import Body from "./table-body.svelte";
|
|
3
|
+
import Caption from "./table-caption.svelte";
|
|
4
|
+
import Cell from "./table-cell.svelte";
|
|
5
|
+
import Footer from "./table-footer.svelte";
|
|
6
|
+
import Head from "./table-head.svelte";
|
|
7
|
+
import Header from "./table-header.svelte";
|
|
8
|
+
import Row from "./table-row.svelte";
|
|
9
|
+
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, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Root from "./table.svelte";
|
|
2
|
+
import Body from "./table-body.svelte";
|
|
3
|
+
import Caption from "./table-caption.svelte";
|
|
4
|
+
import Cell from "./table-cell.svelte";
|
|
5
|
+
import Footer from "./table-footer.svelte";
|
|
6
|
+
import Head from "./table-head.svelte";
|
|
7
|
+
import Header from "./table-header.svelte";
|
|
8
|
+
import Row from "./table-row.svelte";
|
|
9
|
+
export { Root, Body, Caption, Cell, Footer, Head, Header, Row,
|
|
10
|
+
//
|
|
11
|
+
Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "../../../utils.js"
|
|
3
|
+
import { cn } from "../../../utils.js"
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements"
|
|
5
|
+
|
|
6
|
+
// Suppresses the last row's hairline, so a table with no footer ends on its
|
|
7
|
+
// final row rather than on a rule with nothing under it.
|
|
8
|
+
let {
|
|
9
|
+
ref = $bindable(null),
|
|
10
|
+
class: className,
|
|
11
|
+
children,
|
|
12
|
+
...restProps
|
|
13
|
+
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props()
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<tbody
|
|
17
|
+
bind:this={ref}
|
|
18
|
+
class={cn("[&_tr:last-child]:border-0", className)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
21
|
+
{@render children?.()}
|
|
22
|
+
</tbody>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const TableBody: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableBody = ReturnType<typeof TableBody>;
|
|
5
|
+
export default TableBody;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "../../../utils.js"
|
|
3
|
+
import { cn } from "../../../utils.js"
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements"
|
|
5
|
+
|
|
6
|
+
// Sits outside the frame, below it — caption at 13px on the grey ramp.
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: WithElementRef<HTMLAttributes<HTMLElement>> = $props()
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<caption
|
|
16
|
+
bind:this={ref}
|
|
17
|
+
class={cn("mt-4 text-[13px] leading-[1.2] text-grey-300", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
>
|
|
20
|
+
{@render children?.()}
|
|
21
|
+
</caption>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const TableCaption: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLElement>>, {}, "ref">;
|
|
4
|
+
type TableCaption = ReturnType<typeof TableCaption>;
|
|
5
|
+
export default TableCaption;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "../../../utils.js"
|
|
3
|
+
import { cn } from "../../../utils.js"
|
|
4
|
+
import type { HTMLTdAttributes } from "svelte/elements"
|
|
5
|
+
|
|
6
|
+
// Transparent, 44px tall, 16px sides. The row owns the background, so a cell
|
|
7
|
+
// is only text and padding.
|
|
8
|
+
//
|
|
9
|
+
// Set numerics, IDs and keys in `font-mono` at the call site; the brand
|
|
10
|
+
// reserves the monospace face for them. Right-align numeric columns on both
|
|
11
|
+
// the cell and its heading so figures line up on their digits.
|
|
12
|
+
//
|
|
13
|
+
// No fill means no fill collisions — the whole class of problem the gapped
|
|
14
|
+
// tile treatment kept running into, where a Badge or a Separator or an
|
|
15
|
+
// unchecked Switch would disappear into the cell it sat on.
|
|
16
|
+
let {
|
|
17
|
+
ref = $bindable(null),
|
|
18
|
+
class: className,
|
|
19
|
+
children,
|
|
20
|
+
...restProps
|
|
21
|
+
}: WithElementRef<HTMLTdAttributes> = $props()
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<td
|
|
25
|
+
bind:this={ref}
|
|
26
|
+
class={cn(
|
|
27
|
+
"h-11 px-4 align-middle text-[13px] [&:has([role=checkbox])]:pr-0",
|
|
28
|
+
className,
|
|
29
|
+
)}
|
|
30
|
+
{...restProps}
|
|
31
|
+
>
|
|
32
|
+
{@render children?.()}
|
|
33
|
+
</td>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLTdAttributes } from "svelte/elements";
|
|
3
|
+
declare const TableCell: import("svelte").Component<WithElementRef<HTMLTdAttributes>, {}, "ref">;
|
|
4
|
+
type TableCell = ReturnType<typeof TableCell>;
|
|
5
|
+
export default TableCell;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "../../../utils.js"
|
|
3
|
+
import { cn } from "../../../utils.js"
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements"
|
|
5
|
+
|
|
6
|
+
// Totals: no fill, a stronger rule above to close the grid, and Bold to
|
|
7
|
+
// separate the summary from the rows it sums. The row's own bottom hairline
|
|
8
|
+
// is suppressed so the table ends on the top rule rather than trailing a
|
|
9
|
+
// second line under it. Hover is off — a totals row is not interactive.
|
|
10
|
+
let {
|
|
11
|
+
ref = $bindable(null),
|
|
12
|
+
class: className,
|
|
13
|
+
children,
|
|
14
|
+
...restProps
|
|
15
|
+
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props()
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<tfoot
|
|
19
|
+
bind:this={ref}
|
|
20
|
+
class={cn(
|
|
21
|
+
"font-bold",
|
|
22
|
+
"[&>tr]:border-t [&>tr]:border-grey-600 [&>tr]:border-b-0",
|
|
23
|
+
"[&>tr]:hover:bg-transparent",
|
|
24
|
+
className,
|
|
25
|
+
)}
|
|
26
|
+
{...restProps}
|
|
27
|
+
>
|
|
28
|
+
{@render children?.()}
|
|
29
|
+
</tfoot>
|