@invopop/popui 0.0.73 → 0.0.75-beta1
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/dist/AlertDialog.svelte +38 -0
- package/dist/AlertDialog.svelte.d.ts +25 -0
- package/dist/BaseButton.svelte +1 -1
- package/dist/BaseDropdown.svelte +3 -1
- package/dist/BaseTable.svelte +43 -56
- package/dist/BaseTableActions.svelte +12 -2
- package/dist/BaseTableCellContent.svelte +64 -0
- package/dist/BaseTableCellContent.svelte.d.ts +24 -0
- package/dist/BaseTableCheckbox.svelte +28 -0
- package/dist/BaseTableCheckbox.svelte.d.ts +21 -0
- package/dist/BaseTableHeaderContent.svelte +59 -0
- package/dist/BaseTableHeaderContent.svelte.d.ts +21 -0
- package/dist/BaseTableRow.svelte +44 -41
- package/dist/BaseTableRow.svelte.d.ts +1 -1
- package/dist/CardCheckbox.svelte +22 -13
- package/dist/CardCheckbox.svelte.d.ts +2 -0
- package/dist/DrawerContext.svelte +1 -1
- package/dist/DropdownSelect.svelte +7 -3
- package/dist/ShortcutWrapper.svelte +2 -2
- package/dist/StepIconList.svelte +45 -0
- package/dist/StepIconList.svelte.d.ts +17 -0
- package/dist/alert-dialog/alert-dialog-action.svelte +19 -0
- package/dist/alert-dialog/alert-dialog-action.svelte.d.ts +28 -0
- package/dist/alert-dialog/alert-dialog-cancel.svelte +16 -0
- package/dist/alert-dialog/alert-dialog-cancel.svelte.d.ts +23 -0
- package/dist/alert-dialog/alert-dialog-content.svelte +23 -0
- package/dist/alert-dialog/alert-dialog-content.svelte.d.ts +17 -0
- package/dist/alert-dialog/alert-dialog-description.svelte +12 -0
- package/dist/alert-dialog/alert-dialog-description.svelte.d.ts +17 -0
- package/dist/alert-dialog/alert-dialog-footer.svelte +11 -0
- package/dist/alert-dialog/alert-dialog-footer.svelte.d.ts +17 -0
- package/dist/alert-dialog/alert-dialog-header.svelte +8 -0
- package/dist/alert-dialog/alert-dialog-header.svelte.d.ts +17 -0
- package/dist/alert-dialog/alert-dialog-overlay.svelte +17 -0
- package/dist/alert-dialog/alert-dialog-overlay.svelte.d.ts +15 -0
- package/dist/alert-dialog/alert-dialog-portal.svelte +6 -0
- package/dist/alert-dialog/alert-dialog-portal.svelte.d.ts +17 -0
- package/dist/alert-dialog/alert-dialog-title.svelte +10 -0
- package/dist/alert-dialog/alert-dialog-title.svelte.d.ts +17 -0
- package/dist/alert-dialog/index.d.ts +13 -0
- package/dist/alert-dialog/index.js +15 -0
- package/dist/button/button.svelte +20 -0
- package/dist/button/button.svelte.d.ts +16 -0
- package/dist/button/index.d.ts +60 -0
- package/dist/button/index.js +29 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +6 -1
- package/dist/table/index.d.ts +9 -0
- package/dist/table/index.js +11 -0
- package/dist/table/table-body.svelte +8 -0
- package/dist/table/table-body.svelte.d.ts +17 -0
- package/dist/table/table-caption.svelte +8 -0
- package/dist/table/table-caption.svelte.d.ts +17 -0
- package/dist/table/table-cell.svelte +16 -0
- package/dist/table/table-cell.svelte.d.ts +20 -0
- package/dist/table/table-footer.svelte +8 -0
- package/dist/table/table-footer.svelte.d.ts +17 -0
- package/dist/table/table-head.svelte +14 -0
- package/dist/table/table-head.svelte.d.ts +17 -0
- package/dist/table/table-header.svelte +14 -0
- package/dist/table/table-header.svelte.d.ts +20 -0
- package/dist/table/table-row.svelte +17 -0
- package/dist/table/table-row.svelte.d.ts +23 -0
- package/dist/table/table.svelte +10 -0
- package/dist/table/table.svelte.d.ts +17 -0
- package/dist/tabs/index.d.ts +5 -0
- package/dist/tabs/index.js +7 -0
- package/dist/tabs/tabs-content.svelte +17 -0
- package/dist/tabs/tabs-content.svelte.d.ts +17 -0
- package/dist/tabs/tabs-list.svelte +15 -0
- package/dist/tabs/tabs-list.svelte.d.ts +17 -0
- package/dist/tabs/tabs-trigger.svelte +18 -0
- package/dist/tabs/tabs-trigger.svelte.d.ts +15 -0
- package/dist/tabs/tabs.svelte +14 -0
- package/dist/{Tabs.svelte.d.ts → tabs/tabs.svelte.d.ts} +5 -8
- package/dist/tooltip/index.d.ts +5 -0
- package/dist/tooltip/index.js +7 -0
- package/dist/tooltip/tooltip-content.svelte +25 -0
- package/dist/tooltip/tooltip-content.svelte.d.ts +17 -0
- package/dist/tw.theme.d.ts +4 -0
- package/dist/tw.theme.js +7 -3
- package/dist/types.d.ts +4 -0
- package/dist/utils.d.ts +13 -0
- package/dist/utils.js +38 -0
- package/package.json +5 -1
- package/dist/BaseTableCell.svelte +0 -91
- package/dist/BaseTableCell.svelte.d.ts +0 -28
- package/dist/BaseTableHeader.svelte +0 -68
- package/dist/BaseTableHeader.svelte.d.ts +0 -24
- package/dist/Tabs.svelte +0 -41
package/dist/CardCheckbox.svelte
CHANGED
|
@@ -1,25 +1,34 @@
|
|
|
1
|
-
<script>import
|
|
1
|
+
<script>import clsx from "clsx";
|
|
2
|
+
import { Icon } from "@steeze-ui/svelte-icon";
|
|
3
|
+
import InputRadio from "./InputRadio.svelte";
|
|
2
4
|
export let id;
|
|
3
5
|
export let title = "";
|
|
4
6
|
export let description = "";
|
|
5
7
|
export let checked = false;
|
|
8
|
+
$:
|
|
9
|
+
styles = clsx(
|
|
10
|
+
{ "border-workspace-accent shadow-active": checked },
|
|
11
|
+
{ "border-neutral-200 hover:bg-neutral-100": !checked }
|
|
12
|
+
);
|
|
13
|
+
export let icon = void 0;
|
|
6
14
|
</script>
|
|
7
15
|
|
|
8
|
-
<label
|
|
9
|
-
for={id}
|
|
10
|
-
class="{checked
|
|
11
|
-
? 'border-workspace-accent shadow-active'
|
|
12
|
-
: 'border-neutral-200'} border rounded-lg w-full text-left cursor-pointer block"
|
|
13
|
-
>
|
|
16
|
+
<label for={id} class="{styles} border rounded-lg w-full text-left cursor-pointer block">
|
|
14
17
|
<div class="py-2 pr-2 pl-3 flex items-start justify-between">
|
|
15
|
-
<div class="flex
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<span class="text-sm text-neutral-500">{description}</span>
|
|
19
|
-
{:else}
|
|
20
|
-
<span class="text-sm text-neutral-300">No description</span>
|
|
18
|
+
<div class="flex space-x-2">
|
|
19
|
+
{#if icon}
|
|
20
|
+
<Icon src={icon} class="h-5 w-5 mt-0.5 text-neutral-800 flex-shrink-0" />
|
|
21
21
|
{/if}
|
|
22
|
+
<div class="flex flex-col space-y-0.5">
|
|
23
|
+
<span class="text-base text-neutral-800 font-medium">{title}</span>
|
|
24
|
+
{#if description}
|
|
25
|
+
<span class="text-sm text-neutral-500">{description}</span>
|
|
26
|
+
{:else}
|
|
27
|
+
<span class="text-sm text-neutral-300">No description</span>
|
|
28
|
+
{/if}
|
|
29
|
+
</div>
|
|
22
30
|
</div>
|
|
31
|
+
|
|
23
32
|
<InputRadio {id} {checked} on:change />
|
|
24
33
|
</div>
|
|
25
34
|
{#if !!$$slots.footer}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { type IconSource } from '@steeze-ui/svelte-icon';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
id: any;
|
|
5
6
|
title?: string | undefined;
|
|
6
7
|
description?: string | undefined;
|
|
7
8
|
checked?: boolean | undefined;
|
|
9
|
+
icon?: IconSource | undefined;
|
|
8
10
|
};
|
|
9
11
|
events: {
|
|
10
12
|
change: CustomEvent<any>;
|
|
@@ -25,7 +25,7 @@ function updateItem(event) {
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<div
|
|
28
|
-
class="{widthClass} border border-neutral-200 py-1 rounded shadow-lg space-y-0.5 bg-white max-h-80 overflow-y-auto"
|
|
28
|
+
class="{widthClass} border border-neutral-200 py-1 rounded-md shadow-lg space-y-0.5 bg-white max-h-80 overflow-y-auto"
|
|
29
29
|
>
|
|
30
30
|
{#if searchable}
|
|
31
31
|
<div class="px-2 mt-2 mb-1">
|
|
@@ -32,6 +32,8 @@ $:
|
|
|
32
32
|
selectedItems = items.filter((i) => i.selected);
|
|
33
33
|
$:
|
|
34
34
|
selectedColor = !multiple && items.find((i) => i.selected)?.color;
|
|
35
|
+
$:
|
|
36
|
+
selectedIcon = !multiple && items.find((i) => i.selected)?.icon;
|
|
35
37
|
$:
|
|
36
38
|
selectedLabel = `${selectedItems[0]?.label || ""}${selectedItems.length > 1 ? " and more..." : ""}` || placeholder;
|
|
37
39
|
$:
|
|
@@ -59,12 +61,14 @@ function handleSelected(e) {
|
|
|
59
61
|
class="{styles} dropdown-select max-w-[420px] flex items-center border hover:border-neutral-300 rounded-md py-1.25 pl-2 gap-1 bg-white whitespace-nowrap"
|
|
60
62
|
slot="trigger"
|
|
61
63
|
>
|
|
62
|
-
{#if resolvedIcon && !selectedColor}
|
|
63
|
-
<Icon src={resolvedIcon} {iconTheme} class="h-4 w-4 text-neutral-500 flex-shrink-0" />
|
|
64
|
-
{/if}
|
|
65
64
|
{#if selectedColor}
|
|
66
65
|
<TagStatus dot status={selectedColor} />
|
|
66
|
+
{:else if selectedIcon}
|
|
67
|
+
<Icon src={selectedIcon} {iconTheme} class="h-4 w-4 text-neutral-500 flex-shrink-0" />
|
|
68
|
+
{:else if resolvedIcon}
|
|
69
|
+
<Icon src={resolvedIcon} {iconTheme} class="h-4 w-4 text-neutral-500 flex-shrink-0" />
|
|
67
70
|
{/if}
|
|
71
|
+
|
|
68
72
|
<span class="w-full pr-8 text-neutral-800 placeholder-neutral-800 text-base truncate">
|
|
69
73
|
{selectedLabel}
|
|
70
74
|
</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div
|
|
2
|
-
class="bg-white-5 rounded border border-white-
|
|
3
|
-
style="box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.
|
|
2
|
+
class="h-4 w-4 bg-white-5 rounded border border-white-20 inline-flex items-center justify-center"
|
|
3
|
+
style="box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.25);"
|
|
4
4
|
>
|
|
5
5
|
<slot />
|
|
6
6
|
</div>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script>import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip";
|
|
2
|
+
export let icons = [];
|
|
3
|
+
$:
|
|
4
|
+
maxItems = icons.length > 6 ? 5 : 6;
|
|
5
|
+
$:
|
|
6
|
+
mainIcons = icons.slice(0, maxItems);
|
|
7
|
+
$:
|
|
8
|
+
restIcons = icons.slice(maxItems + 1, icons.length);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div class="flex flex-col space-y-2 sm:flex-row sm:space-y-0 items-center overflow-x-auto">
|
|
12
|
+
{#each mainIcons as icon, i (i)}
|
|
13
|
+
<Tooltip>
|
|
14
|
+
<TooltipTrigger>
|
|
15
|
+
<div
|
|
16
|
+
class="p-1.5 border rounded-md border-neutral-200 flex items-center space-x-1 bg-white text-neutral-800 flex-shrink-0"
|
|
17
|
+
>
|
|
18
|
+
<img src={icon.url} alt={icon.name} class="w-4 h-4" />
|
|
19
|
+
</div>
|
|
20
|
+
</TooltipTrigger>
|
|
21
|
+
<TooltipContent>{icon.name}</TooltipContent>
|
|
22
|
+
</Tooltip>
|
|
23
|
+
|
|
24
|
+
{#if i < mainIcons.length - 1}
|
|
25
|
+
<div class="hidden sm:block h-px w-3 border border-neutral-200 mx-px flex-shrink-0" />
|
|
26
|
+
{/if}
|
|
27
|
+
{/each}
|
|
28
|
+
{#if restIcons.length}
|
|
29
|
+
<div class="hidden sm:block h-px w-3 border border-neutral-200 mx-px flex-shrink-0" />
|
|
30
|
+
<Tooltip>
|
|
31
|
+
<TooltipTrigger>
|
|
32
|
+
<div
|
|
33
|
+
class="flex items-center justify-center text-neutral-500 font-medium text-base h-7 w-7"
|
|
34
|
+
>
|
|
35
|
+
+{restIcons.length}
|
|
36
|
+
</div>
|
|
37
|
+
</TooltipTrigger>
|
|
38
|
+
<TooltipContent>
|
|
39
|
+
{#each restIcons as restIcon}
|
|
40
|
+
<div>{restIcon.name}</div>
|
|
41
|
+
{/each}
|
|
42
|
+
</TooltipContent>
|
|
43
|
+
</Tooltip>
|
|
44
|
+
{/if}
|
|
45
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { StepIcon } from './types.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
icons?: StepIcon[] | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
export type StepIconListProps = typeof __propDef.props;
|
|
13
|
+
export type StepIconListEvents = typeof __propDef.events;
|
|
14
|
+
export type StepIconListSlots = typeof __propDef.slots;
|
|
15
|
+
export default class StepIconList extends SvelteComponent<StepIconListProps, StepIconListEvents, StepIconListSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { buttonVariants } from "../button/index.js";
|
|
3
|
+
import { cn } from "../utils.js";
|
|
4
|
+
let className = void 0;
|
|
5
|
+
let destructive = false;
|
|
6
|
+
export { className as class, destructive };
|
|
7
|
+
$:
|
|
8
|
+
variant = destructive ? "destructive" : "primary";
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<AlertDialogPrimitive.Action
|
|
12
|
+
class={cn(buttonVariants({ variant }), className)}
|
|
13
|
+
{...$$restProps}
|
|
14
|
+
on:click
|
|
15
|
+
on:keydown
|
|
16
|
+
let:builder
|
|
17
|
+
>
|
|
18
|
+
<slot {builder} />
|
|
19
|
+
</AlertDialogPrimitive.Action>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
asChild?: boolean | undefined;
|
|
6
|
+
el?: HTMLButtonElement | undefined;
|
|
7
|
+
} & import("svelte/elements").HTMLButtonAttributes & {
|
|
8
|
+
destructive: boolean;
|
|
9
|
+
};
|
|
10
|
+
slots: {
|
|
11
|
+
default: {
|
|
12
|
+
builder: {
|
|
13
|
+
readonly type: "button";
|
|
14
|
+
} & {
|
|
15
|
+
[x: `data-melt-${string}`]: "";
|
|
16
|
+
} & {
|
|
17
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"click" | "keydown">;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
events: AlertDialogPrimitive.ActionEvents;
|
|
22
|
+
};
|
|
23
|
+
export type AlertDialogActionProps = typeof __propDef.props;
|
|
24
|
+
export type AlertDialogActionEvents = typeof __propDef.events;
|
|
25
|
+
export type AlertDialogActionSlots = typeof __propDef.slots;
|
|
26
|
+
export default class AlertDialogAction extends SvelteComponent<AlertDialogActionProps, AlertDialogActionEvents, AlertDialogActionSlots> {
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { buttonVariants } from "../button/index.js";
|
|
3
|
+
import { cn } from "../utils.js";
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export { className as class };
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<AlertDialogPrimitive.Cancel
|
|
9
|
+
class={cn(buttonVariants({ variant: 'secondary' }), 'mt-2 sm:mt-0', className)}
|
|
10
|
+
{...$$restProps}
|
|
11
|
+
on:click
|
|
12
|
+
on:keydown
|
|
13
|
+
let:builder
|
|
14
|
+
>
|
|
15
|
+
<slot {builder} />
|
|
16
|
+
</AlertDialogPrimitive.Cancel>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.CancelProps;
|
|
5
|
+
slots: {
|
|
6
|
+
default: {
|
|
7
|
+
builder: {
|
|
8
|
+
readonly type: "button";
|
|
9
|
+
} & {
|
|
10
|
+
[x: `data-melt-${string}`]: "";
|
|
11
|
+
} & {
|
|
12
|
+
action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"click" | "keydown">;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
events: AlertDialogPrimitive.CancelEvents;
|
|
17
|
+
};
|
|
18
|
+
export type AlertDialogCancelProps = typeof __propDef.props;
|
|
19
|
+
export type AlertDialogCancelEvents = typeof __propDef.events;
|
|
20
|
+
export type AlertDialogCancelSlots = typeof __propDef.slots;
|
|
21
|
+
export default class AlertDialogCancel extends SvelteComponent<AlertDialogCancelProps, AlertDialogCancelEvents, AlertDialogCancelSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import * as AlertDialog from "./index.js";
|
|
3
|
+
import { cn, flyAndScale } from "../utils.js";
|
|
4
|
+
export let transition = flyAndScale;
|
|
5
|
+
export let transitionConfig = void 0;
|
|
6
|
+
let className = void 0;
|
|
7
|
+
export { className as class };
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<AlertDialog.Portal>
|
|
11
|
+
<AlertDialog.Overlay />
|
|
12
|
+
<AlertDialogPrimitive.Content
|
|
13
|
+
{transition}
|
|
14
|
+
{transitionConfig}
|
|
15
|
+
class={cn(
|
|
16
|
+
'bg-white fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-5 border pt-3 px-4 pb-4 sm:rounded-lg md:w-full',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...$$restProps}
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</AlertDialogPrimitive.Content>
|
|
23
|
+
</AlertDialog.Portal>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.ContentProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogContentProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogContentEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogContentSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogContent extends SvelteComponent<AlertDialogContentProps, AlertDialogContentEvents, AlertDialogContentSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../utils.js";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export { className as class };
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<AlertDialogPrimitive.Description
|
|
8
|
+
class={cn('text-neutral-500 text-base', className)}
|
|
9
|
+
{...$$restProps}
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</AlertDialogPrimitive.Description>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.DescriptionProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogDescriptionProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogDescriptionEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogDescriptionSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogDescription extends SvelteComponent<AlertDialogDescriptionProps, AlertDialogDescriptionEvents, AlertDialogDescriptionSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -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 AlertDialogFooterProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogFooterEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogFooterSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogFooter extends SvelteComponent<AlertDialogFooterProps, AlertDialogFooterEvents, AlertDialogFooterSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -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 AlertDialogHeaderProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogHeaderEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogHeaderSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogHeader extends SvelteComponent<AlertDialogHeaderProps, AlertDialogHeaderEvents, AlertDialogHeaderSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { fade } from "svelte/transition";
|
|
3
|
+
import { cn } from "../utils.js";
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export let transition = fade;
|
|
6
|
+
export let transitionConfig = {
|
|
7
|
+
duration: 150
|
|
8
|
+
};
|
|
9
|
+
export { className as class };
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<AlertDialogPrimitive.Overlay
|
|
13
|
+
{transition}
|
|
14
|
+
{transitionConfig}
|
|
15
|
+
class={cn('bg-neutral-800/30 fixed inset-0 z-50', className)}
|
|
16
|
+
{...$$restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.OverlayProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {};
|
|
9
|
+
};
|
|
10
|
+
export type AlertDialogOverlayProps = typeof __propDef.props;
|
|
11
|
+
export type AlertDialogOverlayEvents = typeof __propDef.events;
|
|
12
|
+
export type AlertDialogOverlaySlots = typeof __propDef.slots;
|
|
13
|
+
export default class AlertDialogOverlay extends SvelteComponent<AlertDialogOverlayProps, AlertDialogOverlayEvents, AlertDialogOverlaySlots> {
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.PortalProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogPortalProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogPortalEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogPortalSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogPortal extends SvelteComponent<AlertDialogPortalProps, AlertDialogPortalEvents, AlertDialogPortalSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
|
|
2
|
+
import { cn } from "../utils.js";
|
|
3
|
+
let className = void 0;
|
|
4
|
+
export let level = "h3";
|
|
5
|
+
export { className as class };
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<AlertDialogPrimitive.Title class={cn('text-lg font-semibold', className)} {level} {...$$restProps}>
|
|
9
|
+
<slot />
|
|
10
|
+
</AlertDialogPrimitive.Title>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: AlertDialogPrimitive.TitleProps;
|
|
5
|
+
events: {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
};
|
|
8
|
+
slots: {
|
|
9
|
+
default: {};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type AlertDialogTitleProps = typeof __propDef.props;
|
|
13
|
+
export type AlertDialogTitleEvents = typeof __propDef.events;
|
|
14
|
+
export type AlertDialogTitleSlots = typeof __propDef.slots;
|
|
15
|
+
export default class AlertDialogTitle extends SvelteComponent<AlertDialogTitleProps, AlertDialogTitleEvents, AlertDialogTitleSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
import Title from './alert-dialog-title.svelte';
|
|
3
|
+
import Action from './alert-dialog-action.svelte';
|
|
4
|
+
import Cancel from './alert-dialog-cancel.svelte';
|
|
5
|
+
import Portal from './alert-dialog-portal.svelte';
|
|
6
|
+
import Footer from './alert-dialog-footer.svelte';
|
|
7
|
+
import Header from './alert-dialog-header.svelte';
|
|
8
|
+
import Overlay from './alert-dialog-overlay.svelte';
|
|
9
|
+
import Content from './alert-dialog-content.svelte';
|
|
10
|
+
import Description from './alert-dialog-description.svelte';
|
|
11
|
+
declare const Root: typeof AlertDialogPrimitive.Root;
|
|
12
|
+
declare const Trigger: typeof AlertDialogPrimitive.Trigger;
|
|
13
|
+
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description, Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
import Title from './alert-dialog-title.svelte';
|
|
3
|
+
import Action from './alert-dialog-action.svelte';
|
|
4
|
+
import Cancel from './alert-dialog-cancel.svelte';
|
|
5
|
+
import Portal from './alert-dialog-portal.svelte';
|
|
6
|
+
import Footer from './alert-dialog-footer.svelte';
|
|
7
|
+
import Header from './alert-dialog-header.svelte';
|
|
8
|
+
import Overlay from './alert-dialog-overlay.svelte';
|
|
9
|
+
import Content from './alert-dialog-content.svelte';
|
|
10
|
+
import Description from './alert-dialog-description.svelte';
|
|
11
|
+
const Root = AlertDialogPrimitive.Root;
|
|
12
|
+
const Trigger = AlertDialogPrimitive.Trigger;
|
|
13
|
+
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description,
|
|
14
|
+
//
|
|
15
|
+
Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script>import { Button as ButtonPrimitive } from "bits-ui";
|
|
2
|
+
import { buttonVariants } from "./index.js";
|
|
3
|
+
import { cn } from "../utils.js";
|
|
4
|
+
let className = void 0;
|
|
5
|
+
export let variant = "default";
|
|
6
|
+
export let size = "default";
|
|
7
|
+
export let builders = [];
|
|
8
|
+
export { className as class };
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<ButtonPrimitive.Root
|
|
12
|
+
{builders}
|
|
13
|
+
class={cn(buttonVariants({ variant, size, className }))}
|
|
14
|
+
type="button"
|
|
15
|
+
{...$$restProps}
|
|
16
|
+
on:click
|
|
17
|
+
on:keydown
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</ButtonPrimitive.Root>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { Button as ButtonPrimitive } from 'bits-ui';
|
|
3
|
+
import { type Props } from './index.js';
|
|
4
|
+
declare const __propDef: {
|
|
5
|
+
props: Props;
|
|
6
|
+
slots: {
|
|
7
|
+
default: {};
|
|
8
|
+
};
|
|
9
|
+
events: ButtonPrimitive.Events;
|
|
10
|
+
};
|
|
11
|
+
export type ButtonProps = typeof __propDef.props;
|
|
12
|
+
export type ButtonEvents = typeof __propDef.events;
|
|
13
|
+
export type ButtonSlots = typeof __propDef.slots;
|
|
14
|
+
export default class Button extends SvelteComponent<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { Button as ButtonPrimitive } from 'bits-ui';
|
|
3
|
+
import Root from './button.svelte';
|
|
4
|
+
declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
default: string;
|
|
7
|
+
destructive: string;
|
|
8
|
+
outline: string;
|
|
9
|
+
primary: string;
|
|
10
|
+
secondary: string;
|
|
11
|
+
ghost: string;
|
|
12
|
+
link: string;
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
default: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
};
|
|
20
|
+
}, undefined, "ring-workspace-accent-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 flex items-center justify-center font-medium font-sans relative group tracking-tight rounded-md", {
|
|
21
|
+
variant: {
|
|
22
|
+
default: string;
|
|
23
|
+
destructive: string;
|
|
24
|
+
outline: string;
|
|
25
|
+
primary: string;
|
|
26
|
+
secondary: string;
|
|
27
|
+
ghost: string;
|
|
28
|
+
link: string;
|
|
29
|
+
};
|
|
30
|
+
size: {
|
|
31
|
+
default: string;
|
|
32
|
+
sm: string;
|
|
33
|
+
lg: string;
|
|
34
|
+
icon: string;
|
|
35
|
+
};
|
|
36
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
37
|
+
variant: {
|
|
38
|
+
default: string;
|
|
39
|
+
destructive: string;
|
|
40
|
+
outline: string;
|
|
41
|
+
primary: string;
|
|
42
|
+
secondary: string;
|
|
43
|
+
ghost: string;
|
|
44
|
+
link: string;
|
|
45
|
+
};
|
|
46
|
+
size: {
|
|
47
|
+
default: string;
|
|
48
|
+
sm: string;
|
|
49
|
+
lg: string;
|
|
50
|
+
icon: string;
|
|
51
|
+
};
|
|
52
|
+
}, undefined, "ring-workspace-accent-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 flex items-center justify-center font-medium font-sans relative group tracking-tight rounded-md", unknown, unknown, undefined>>;
|
|
53
|
+
type Variant = VariantProps<typeof buttonVariants>['variant'];
|
|
54
|
+
type Size = VariantProps<typeof buttonVariants>['size'];
|
|
55
|
+
type Props = ButtonPrimitive.Props & {
|
|
56
|
+
variant?: Variant;
|
|
57
|
+
size?: Size;
|
|
58
|
+
};
|
|
59
|
+
type Events = ButtonPrimitive.Events;
|
|
60
|
+
export { Root, type Props, type Events, type Variant, Root as Button, type Props as ButtonProps, type Events as ButtonEvents, buttonVariants };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
import Root from './button.svelte';
|
|
3
|
+
const buttonVariants = tv({
|
|
4
|
+
base: 'ring-workspace-accent-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 flex items-center justify-center font-medium font-sans relative group tracking-tight rounded-md',
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
8
|
+
destructive: 'ring-danger-200 bg-danger-500 border border-danger-500 hover:bg-danger-600 hover:border-danger-600 active:bg-danger-700 active:border-danger-700 text-white',
|
|
9
|
+
outline: 'border-input bg-background hover:bg-accent hover:text-accent-foreground border',
|
|
10
|
+
primary: 'bg-workspace-accent-500 hover:bg-workspace-accent-600 active:bg-workspace-accent-700 text-white',
|
|
11
|
+
secondary: 'bg-neutral-100 border border-neutral-100 hover:bg-neutral-200 hover:border-neutral-200 active:bg-neutral-300 active:border-neutral-300',
|
|
12
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
13
|
+
link: 'text-primary underline-offset-4 hover:underline'
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: 'h-[30px] px-3 py-[5px]',
|
|
17
|
+
sm: 'h-9 rounded-md px-3',
|
|
18
|
+
lg: 'h-11 rounded-md px-8',
|
|
19
|
+
icon: 'h-10 w-10'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: 'default',
|
|
24
|
+
size: 'default'
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export { Root,
|
|
28
|
+
//
|
|
29
|
+
Root as Button, buttonVariants };
|