@heyramzi/ui 3.1.0 → 3.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/dist/components/list-page/toolbar-density.js +20 -1
- package/dist/lib/sliding-pill.js +2 -2
- package/dist/record/measure-clamp.js +23 -0
- package/dist/shadcn/button-group/index.js +6 -0
- package/dist/shadcn/checkbox/checkbox-box.js +3 -0
- package/dist/shadcn/drawer/index.js +14 -0
- package/dist/shadcn/input-group/index.js +9 -0
- package/dist/shadcn/item/index.js +13 -0
- package/dist/shadcn/native-select/index.js +6 -0
- package/dist/shadcn/pagination/index.js +12 -0
- package/package.json +7 -2
- package/scripts/sync-shadcn.mjs +0 -6
- package/src/ai/generation-progress/GenerationProgress.svelte +14 -12
- package/src/canvas/pen/PenOverlay.svelte +1 -30
- package/src/canvas/screen/PartView.svelte +13 -8
- package/src/canvas/screen/ScreenBody.svelte +18 -11
- package/src/canvas/ui/BarTooltip.svelte +46 -0
- package/src/canvas/ui/BarTooltip.svelte.d.ts +17 -0
- package/src/canvas/ui/CanvasToolbar.svelte +170 -156
- package/src/canvas/ui/StylePanel.svelte +179 -102
- package/src/canvas/ui/canvas-ui.css +12 -76
- package/src/charts/dashboard/data-table.svelte +80 -80
- package/src/charts/dashboard/hint.svelte +34 -0
- package/src/charts/dashboard/hint.svelte.d.ts +10 -0
- package/src/charts/dashboard/rating-chip.svelte +4 -3
- package/src/charts/legend.css +0 -8
- package/src/charts/legend.svelte +26 -30
- package/src/components/copy/copy-button.svelte +10 -2
- package/src/components/copy/copy-button.test.ts +7 -0
- package/src/components/data-table/table-skeleton.svelte +15 -7
- package/src/components/data-table/table-skeleton.svelte.d.ts +4 -0
- package/src/components/docs/on-this-page.svelte +2 -2
- package/src/components/hold-to-confirm/hold-to-confirm.svelte +2 -1
- package/src/components/list-page/filter-item.svelte +20 -7
- package/src/components/list-page/filter-popover.svelte +57 -17
- package/src/components/list-page/filter-popover.svelte.d.ts +1 -1
- package/src/components/list-page/grouped-list.svelte +41 -23
- package/src/components/list-page/list-page-shell.svelte +155 -69
- package/src/components/list-page/list-page-shell.svelte.d.ts +6 -1
- package/src/components/list-page/toolbar-density.ts +24 -1
- package/src/components/picker/picker.svelte +8 -3
- package/src/components/picker/picker.svelte.d.ts +2 -1
- package/src/components/segmented/segmented-filter.svelte +19 -10
- package/src/components/segmented/segmented-track.svelte +11 -3
- package/src/components/table-view/table-view.svelte +22 -6
- package/src/components/tags-input/tags-input.svelte +94 -77
- package/src/components/toolbar/toolbar.svelte +2 -1
- package/src/components/toolbar/toolbar.test.ts +5 -4
- package/src/components/work-parts/group-head.svelte +28 -9
- package/src/components/work-parts/group-head.svelte.d.ts +5 -2
- package/src/editor/editor-toolbar.svelte +223 -193
- package/src/editor/editor.svelte +56 -38
- package/src/editor/image-toolbar.svelte +99 -37
- package/src/editor/image-toolbar.svelte.d.ts +4 -5
- package/src/editor/url-dialog.svelte +96 -0
- package/src/editor/url-dialog.svelte.d.ts +15 -0
- package/src/effects/theme-toggle/ThemeToggle.css +8 -8
- package/src/effects/theme-toggle/ThemeToggle.svelte +20 -6
- package/src/inbox/thread-inbox.svelte +9 -1
- package/src/lib/live-region.svelte +12 -4
- package/src/lib/live-region.svelte.d.ts +5 -1
- package/src/lib/sliding-pill.ts +3 -2
- package/src/record/info-list.svelte +33 -59
- package/src/record/measure-clamp.ts +31 -0
- package/src/record/record-shell.svelte +38 -39
- package/src/record/record-timeline.svelte +10 -5
- package/src/record/steps-rail.svelte +50 -36
- package/src/record/where-we-are.svelte +5 -19
- package/src/shadcn/button-group/button-group-separator.svelte +23 -0
- package/src/shadcn/button-group/button-group-separator.svelte.d.ts +13 -0
- package/src/shadcn/button-group/button-group-text.svelte +28 -0
- package/src/shadcn/button-group/button-group-text.svelte.d.ts +11 -0
- package/src/shadcn/button-group/button-group.svelte +46 -0
- package/src/shadcn/button-group/button-group.svelte.d.ts +16 -0
- package/src/shadcn/button-group/index.ts +15 -0
- package/src/shadcn/checkbox/checkbox-box.ts +4 -0
- package/src/shadcn/checkbox/checkbox.svelte +2 -4
- package/src/shadcn/drawer/drawer-close.svelte +7 -0
- package/src/shadcn/drawer/drawer-close.svelte.d.ts +4 -0
- package/src/shadcn/drawer/drawer-content.svelte +36 -0
- package/src/shadcn/drawer/drawer-content.svelte.d.ts +10 -0
- package/src/shadcn/drawer/drawer-description.svelte +17 -0
- package/src/shadcn/drawer/drawer-description.svelte.d.ts +4 -0
- package/src/shadcn/drawer/drawer-footer.svelte +20 -0
- package/src/shadcn/drawer/drawer-footer.svelte.d.ts +5 -0
- package/src/shadcn/drawer/drawer-header.svelte +23 -0
- package/src/shadcn/drawer/drawer-header.svelte.d.ts +5 -0
- package/src/shadcn/drawer/drawer-nested.svelte +12 -0
- package/src/shadcn/drawer/drawer-nested.svelte.d.ts +3 -0
- package/src/shadcn/drawer/drawer-overlay.svelte +20 -0
- package/src/shadcn/drawer/drawer-overlay.svelte.d.ts +4 -0
- package/src/shadcn/drawer/drawer-portal.svelte +7 -0
- package/src/shadcn/drawer/drawer-portal.svelte.d.ts +3 -0
- package/src/shadcn/drawer/drawer-title.svelte +17 -0
- package/src/shadcn/drawer/drawer-title.svelte.d.ts +4 -0
- package/src/shadcn/drawer/drawer-trigger.svelte +7 -0
- package/src/shadcn/drawer/drawer-trigger.svelte.d.ts +4 -0
- package/src/shadcn/drawer/drawer.svelte +12 -0
- package/src/shadcn/drawer/drawer.svelte.d.ts +3 -0
- package/src/shadcn/drawer/index.ts +38 -0
- package/src/shadcn/input-group/index.ts +22 -0
- package/src/shadcn/input-group/input-group-addon.svelte +51 -0
- package/src/shadcn/input-group/input-group-addon.svelte.d.ts +18 -0
- package/src/shadcn/input-group/input-group-button.svelte +49 -0
- package/src/shadcn/input-group/input-group-button.svelte.d.ts +18 -0
- package/src/shadcn/input-group/input-group-input.svelte +20 -0
- package/src/shadcn/input-group/input-group-input.svelte.d.ts +11 -0
- package/src/shadcn/input-group/input-group-text.svelte +19 -0
- package/src/shadcn/input-group/input-group-text.svelte.d.ts +5 -0
- package/src/shadcn/input-group/input-group-textarea.svelte +20 -0
- package/src/shadcn/input-group/input-group-textarea.svelte.d.ts +3 -0
- package/src/shadcn/input-group/input-group.svelte +24 -0
- package/src/shadcn/input-group/input-group.svelte.d.ts +5 -0
- package/src/shadcn/item/index.ts +34 -0
- package/src/shadcn/item/item-actions.svelte +20 -0
- package/src/shadcn/item/item-actions.svelte.d.ts +5 -0
- package/src/shadcn/item/item-content.svelte +23 -0
- package/src/shadcn/item/item-content.svelte.d.ts +5 -0
- package/src/shadcn/item/item-description.svelte +23 -0
- package/src/shadcn/item/item-description.svelte.d.ts +5 -0
- package/src/shadcn/item/item-footer.svelte +20 -0
- package/src/shadcn/item/item-footer.svelte.d.ts +5 -0
- package/src/shadcn/item/item-group.svelte +21 -0
- package/src/shadcn/item/item-group.svelte.d.ts +5 -0
- package/src/shadcn/item/item-header.svelte +20 -0
- package/src/shadcn/item/item-header.svelte.d.ts +5 -0
- package/src/shadcn/item/item-media.svelte +42 -0
- package/src/shadcn/item/item-media.svelte.d.ts +17 -0
- package/src/shadcn/item/item-separator.svelte +19 -0
- package/src/shadcn/item/item-separator.svelte.d.ts +13 -0
- package/src/shadcn/item/item-title.svelte +20 -0
- package/src/shadcn/item/item-title.svelte.d.ts +5 -0
- package/src/shadcn/item/item.svelte +61 -0
- package/src/shadcn/item/item.svelte.d.ts +28 -0
- package/src/shadcn/native-select/index.ts +13 -0
- package/src/shadcn/native-select/native-select-opt-group.svelte +20 -0
- package/src/shadcn/native-select/native-select-opt-group.svelte.d.ts +5 -0
- package/src/shadcn/native-select/native-select-option.svelte +20 -0
- package/src/shadcn/native-select/native-select-option.svelte.d.ts +5 -0
- package/src/shadcn/native-select/native-select.svelte +45 -0
- package/src/shadcn/native-select/native-select.svelte.d.ts +8 -0
- package/src/shadcn/pagination/index.ts +31 -0
- package/src/shadcn/pagination/pagination-content.svelte +20 -0
- package/src/shadcn/pagination/pagination-content.svelte.d.ts +5 -0
- package/src/shadcn/pagination/pagination-ellipsis.svelte +22 -0
- package/src/shadcn/pagination/pagination-ellipsis.svelte.d.ts +5 -0
- package/src/shadcn/pagination/pagination-item.svelte +14 -0
- package/src/shadcn/pagination/pagination-item.svelte.d.ts +5 -0
- package/src/shadcn/pagination/pagination-link.svelte +41 -0
- package/src/shadcn/pagination/pagination-link.svelte.d.ts +9 -0
- package/src/shadcn/pagination/pagination-next-button.svelte +34 -0
- package/src/shadcn/pagination/pagination-next-button.svelte.d.ts +4 -0
- package/src/shadcn/pagination/pagination-next.svelte +26 -0
- package/src/shadcn/pagination/pagination-next.svelte.d.ts +4 -0
- package/src/shadcn/pagination/pagination-prev-button.svelte +34 -0
- package/src/shadcn/pagination/pagination-prev-button.svelte.d.ts +4 -0
- package/src/shadcn/pagination/pagination-previous.svelte +30 -0
- package/src/shadcn/pagination/pagination-previous.svelte.d.ts +4 -0
- package/src/shadcn/pagination/pagination.svelte +27 -0
- package/src/shadcn/pagination/pagination.svelte.d.ts +4 -0
- package/src/slides/Controls.svelte +39 -36
- package/src/slides/Deck.svelte +11 -8
- package/src/thread/thread.svelte +15 -8
- package/src/work/detail/task-detail.svelte +1 -1
- package/src/work/gantt/gantt-task-row.svelte +3 -6
- package/src/work/inbox/inbox-card.svelte +7 -5
- package/src/work/inbox/inbox-trace.svelte +14 -10
- package/src/work/kanban-board.svelte +40 -25
- package/src/work/kanban-hidden-rail.svelte +67 -65
- package/src/work/task-list.svelte +145 -124
- package/src/work/task-list.svelte.test.ts +5 -2
- package/src/work/time/time-tracker.svelte +35 -10
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Drawer as DrawerPrimitive } from "vaul-svelte";
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
shouldScaleBackground = true,
|
|
6
|
+
open = $bindable(false),
|
|
7
|
+
activeSnapPoint = $bindable(null),
|
|
8
|
+
...restProps
|
|
9
|
+
}: DrawerPrimitive.RootProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DrawerPrimitive.NestedRoot {shouldScaleBackground} bind:open bind:activeSnapPoint {...restProps} />
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Drawer as DrawerPrimitive } from "vaul-svelte";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: DrawerPrimitive.OverlayProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DrawerPrimitive.Overlay
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="drawer-overlay"
|
|
15
|
+
class={cn(
|
|
16
|
+
"bg-black/10 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Drawer as DrawerPrimitive } from "vaul-svelte";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: DrawerPrimitive.TitleProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DrawerPrimitive.Title
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="drawer-title"
|
|
15
|
+
class={cn("cn-font-heading text-foreground font-medium", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Drawer as DrawerPrimitive } from "vaul-svelte";
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
shouldScaleBackground = true,
|
|
6
|
+
open = $bindable(false),
|
|
7
|
+
activeSnapPoint = $bindable(null),
|
|
8
|
+
...restProps
|
|
9
|
+
}: DrawerPrimitive.RootProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DrawerPrimitive.Root {shouldScaleBackground} bind:open bind:activeSnapPoint {...restProps} />
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Close from "./drawer-close.svelte";
|
|
2
|
+
import Content from "./drawer-content.svelte";
|
|
3
|
+
import Description from "./drawer-description.svelte";
|
|
4
|
+
import Footer from "./drawer-footer.svelte";
|
|
5
|
+
import Header from "./drawer-header.svelte";
|
|
6
|
+
import NestedRoot from "./drawer-nested.svelte";
|
|
7
|
+
import Overlay from "./drawer-overlay.svelte";
|
|
8
|
+
import Portal from "./drawer-portal.svelte";
|
|
9
|
+
import Title from "./drawer-title.svelte";
|
|
10
|
+
import Trigger from "./drawer-trigger.svelte";
|
|
11
|
+
import Root from "./drawer.svelte";
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
Root,
|
|
15
|
+
NestedRoot,
|
|
16
|
+
Content,
|
|
17
|
+
Description,
|
|
18
|
+
Overlay,
|
|
19
|
+
Footer,
|
|
20
|
+
Header,
|
|
21
|
+
Title,
|
|
22
|
+
Trigger,
|
|
23
|
+
Portal,
|
|
24
|
+
Close,
|
|
25
|
+
|
|
26
|
+
//
|
|
27
|
+
Root as Drawer,
|
|
28
|
+
NestedRoot as DrawerNestedRoot,
|
|
29
|
+
Content as DrawerContent,
|
|
30
|
+
Description as DrawerDescription,
|
|
31
|
+
Overlay as DrawerOverlay,
|
|
32
|
+
Footer as DrawerFooter,
|
|
33
|
+
Header as DrawerHeader,
|
|
34
|
+
Title as DrawerTitle,
|
|
35
|
+
Trigger as DrawerTrigger,
|
|
36
|
+
Portal as DrawerPortal,
|
|
37
|
+
Close as DrawerClose,
|
|
38
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Addon from "./input-group-addon.svelte";
|
|
2
|
+
import Button from "./input-group-button.svelte";
|
|
3
|
+
import Input from "./input-group-input.svelte";
|
|
4
|
+
import Text from "./input-group-text.svelte";
|
|
5
|
+
import Textarea from "./input-group-textarea.svelte";
|
|
6
|
+
import Root from "./input-group.svelte";
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
Root,
|
|
10
|
+
Addon,
|
|
11
|
+
Button,
|
|
12
|
+
Input,
|
|
13
|
+
Text,
|
|
14
|
+
Textarea,
|
|
15
|
+
//
|
|
16
|
+
Root as InputGroup,
|
|
17
|
+
Addon as InputGroupAddon,
|
|
18
|
+
Button as InputGroupButton,
|
|
19
|
+
Input as InputGroupInput,
|
|
20
|
+
Text as InputGroupText,
|
|
21
|
+
Textarea as InputGroupTextarea,
|
|
22
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
|
+
export const inputGroupAddonVariants = tv({
|
|
4
|
+
base: "text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)_-_5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none",
|
|
5
|
+
variants: {
|
|
6
|
+
align: {
|
|
7
|
+
"inline-start": "pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem] order-first",
|
|
8
|
+
"inline-end": "pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem] order-last",
|
|
9
|
+
"block-start": "px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start",
|
|
10
|
+
"block-end": "px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
align: "inline-start",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type InputGroupAddonAlign = VariantProps<typeof inputGroupAddonVariants>["align"];
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
23
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
24
|
+
|
|
25
|
+
let {
|
|
26
|
+
ref = $bindable(null),
|
|
27
|
+
class: className,
|
|
28
|
+
children,
|
|
29
|
+
align = "inline-start",
|
|
30
|
+
...restProps
|
|
31
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
32
|
+
align?: InputGroupAddonAlign;
|
|
33
|
+
} = $props();
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<div
|
|
37
|
+
bind:this={ref}
|
|
38
|
+
role="group"
|
|
39
|
+
data-slot="input-group-addon"
|
|
40
|
+
data-align={align}
|
|
41
|
+
class={cn(inputGroupAddonVariants({ align }), className)}
|
|
42
|
+
onclick={(e) => {
|
|
43
|
+
if ((e.target as HTMLElement).closest("button")) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
47
|
+
}}
|
|
48
|
+
{...restProps}
|
|
49
|
+
>
|
|
50
|
+
{@render children?.()}
|
|
51
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const inputGroupAddonVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
align: {
|
|
4
|
+
"inline-start": string;
|
|
5
|
+
"inline-end": string;
|
|
6
|
+
"block-start": string;
|
|
7
|
+
"block-end": string;
|
|
8
|
+
};
|
|
9
|
+
}, undefined, "text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)_-_5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none", undefined, undefined, undefined>;
|
|
10
|
+
export type InputGroupAddonAlign = VariantProps<typeof inputGroupAddonVariants>["align"];
|
|
11
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
12
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
13
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
14
|
+
align?: InputGroupAddonAlign;
|
|
15
|
+
};
|
|
16
|
+
declare const $$Component: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
17
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
18
|
+
export default $$Component;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
const inputGroupButtonVariants = tv({
|
|
5
|
+
base: "gap-2 text-sm flex items-center shadow-none",
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)_-_5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
9
|
+
sm: "",
|
|
10
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)_-_5px)] p-0 has-[>svg]:p-0",
|
|
11
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
size: "xs",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type InputGroupButtonSize = VariantProps<typeof inputGroupButtonVariants>["size"];
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { Button } from "../button/index.js";
|
|
24
|
+
import { cn } from "../../lib/utils.js";
|
|
25
|
+
import type { ComponentProps } from "svelte";
|
|
26
|
+
|
|
27
|
+
let {
|
|
28
|
+
ref = $bindable(null),
|
|
29
|
+
class: className,
|
|
30
|
+
children,
|
|
31
|
+
type = "button",
|
|
32
|
+
variant = "ghost",
|
|
33
|
+
size = "xs",
|
|
34
|
+
...restProps
|
|
35
|
+
}: Omit<ComponentProps<typeof Button>, "href" | "size"> & {
|
|
36
|
+
size?: InputGroupButtonSize;
|
|
37
|
+
} = $props();
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<Button
|
|
41
|
+
bind:ref
|
|
42
|
+
{type}
|
|
43
|
+
data-size={size}
|
|
44
|
+
{variant}
|
|
45
|
+
class={cn(inputGroupButtonVariants({ size }), className)}
|
|
46
|
+
{...restProps}
|
|
47
|
+
>
|
|
48
|
+
{@render children?.()}
|
|
49
|
+
</Button>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
declare const inputGroupButtonVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
xs: string;
|
|
5
|
+
sm: string;
|
|
6
|
+
"icon-xs": string;
|
|
7
|
+
"icon-sm": string;
|
|
8
|
+
};
|
|
9
|
+
}, undefined, "gap-2 text-sm flex items-center shadow-none", undefined, undefined, undefined>;
|
|
10
|
+
export type InputGroupButtonSize = VariantProps<typeof inputGroupButtonVariants>["size"];
|
|
11
|
+
import { Button } from "../button/index.js";
|
|
12
|
+
import type { ComponentProps } from "svelte";
|
|
13
|
+
type $$ComponentProps = Omit<ComponentProps<typeof Button>, "href" | "size"> & {
|
|
14
|
+
size?: InputGroupButtonSize;
|
|
15
|
+
};
|
|
16
|
+
declare const $$Component: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
17
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
18
|
+
export default $$Component;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Input } from "../input/index.js";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import type { ComponentProps } from "svelte";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
value = $bindable(),
|
|
9
|
+
class: className,
|
|
10
|
+
...props
|
|
11
|
+
}: ComponentProps<typeof Input> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Input
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="input-group-control"
|
|
17
|
+
class={cn("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1", className)}
|
|
18
|
+
bind:value
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const $$Component: import("svelte").Component<(Omit<import("svelte/elements").HTMLInputAttributes, "type"> & ({
|
|
2
|
+
type: "file";
|
|
3
|
+
files?: FileList;
|
|
4
|
+
} | {
|
|
5
|
+
type?: "number" | "hidden" | "color" | "text" | "search" | "submit" | "reset" | "button" | "checkbox" | "radio" | (string & {}) | "tel" | "url" | "email" | "date" | "image" | "time" | "month" | "datetime-local" | "password" | "range" | "week";
|
|
6
|
+
files?: undefined;
|
|
7
|
+
})) & {
|
|
8
|
+
ref?: HTMLElement | null | undefined;
|
|
9
|
+
}, {}, "value" | "ref">;
|
|
10
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
11
|
+
export default $$Component;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLSpanElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<span
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
class={cn("text-muted-foreground gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
>
|
|
18
|
+
{@render children?.()}
|
|
19
|
+
</span>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLSpanElement>>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Textarea } from "../textarea/index.js";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import type { ComponentProps } from "svelte";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
value = $bindable(),
|
|
9
|
+
class: className,
|
|
10
|
+
...props
|
|
11
|
+
}: ComponentProps<typeof Textarea> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Textarea
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="input-group-control"
|
|
17
|
+
class={cn("rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1 resize-none", className)}
|
|
18
|
+
bind:value
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="input-group"
|
|
16
|
+
role="group"
|
|
17
|
+
class={cn(
|
|
18
|
+
"group/input-group border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-9 rounded-md border shadow-xs transition-[color,box-shadow] in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
{@render children?.()}
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Actions from "./item-actions.svelte";
|
|
2
|
+
import Content from "./item-content.svelte";
|
|
3
|
+
import Description from "./item-description.svelte";
|
|
4
|
+
import Footer from "./item-footer.svelte";
|
|
5
|
+
import Group from "./item-group.svelte";
|
|
6
|
+
import Header from "./item-header.svelte";
|
|
7
|
+
import Media from "./item-media.svelte";
|
|
8
|
+
import Separator from "./item-separator.svelte";
|
|
9
|
+
import Title from "./item-title.svelte";
|
|
10
|
+
import Root from "./item.svelte";
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
Root,
|
|
14
|
+
Group,
|
|
15
|
+
Separator,
|
|
16
|
+
Header,
|
|
17
|
+
Footer,
|
|
18
|
+
Content,
|
|
19
|
+
Title,
|
|
20
|
+
Description,
|
|
21
|
+
Actions,
|
|
22
|
+
Media,
|
|
23
|
+
//
|
|
24
|
+
Root as Item,
|
|
25
|
+
Group as ItemGroup,
|
|
26
|
+
Separator as ItemSeparator,
|
|
27
|
+
Header as ItemHeader,
|
|
28
|
+
Footer as ItemFooter,
|
|
29
|
+
Content as ItemContent,
|
|
30
|
+
Title as ItemTitle,
|
|
31
|
+
Description as ItemDescription,
|
|
32
|
+
Actions as ItemActions,
|
|
33
|
+
Media as ItemMedia,
|
|
34
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="item-actions"
|
|
16
|
+
class={cn("gap-2 flex items-center", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="item-content"
|
|
16
|
+
class={cn(
|
|
17
|
+
"gap-1 group-data-[size=xs]/item:gap-0 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLParagraphElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<p
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="item-description"
|
|
16
|
+
class={cn(
|
|
17
|
+
"text-muted-foreground text-left text-sm leading-normal group-data-[size=xs]/item:text-xs line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</p>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLParagraphElement>>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="item-footer"
|
|
16
|
+
class={cn("gap-2 flex basis-full items-center justify-between", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
role="list"
|
|
16
|
+
data-slot="item-group"
|
|
17
|
+
class={cn("gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2 group/item-group flex w-full flex-col", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
>
|
|
20
|
+
{@render children?.()}
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="item-header"
|
|
16
|
+
class={cn("gap-2 flex basis-full items-center justify-between", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|