@heyramzi/ui 3.1.0 → 3.3.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/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 +41 -16
- 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/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,42 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
export const itemMediaVariants = tv({
|
|
5
|
+
base: "gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none",
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-transparent",
|
|
9
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
10
|
+
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "default",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type ItemMediaVariant = VariantProps<typeof itemMediaVariants>["variant"];
|
|
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
|
+
variant = "default",
|
|
30
|
+
...restProps
|
|
31
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & { variant?: ItemMediaVariant } = $props();
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<div
|
|
35
|
+
bind:this={ref}
|
|
36
|
+
data-slot="item-media"
|
|
37
|
+
data-variant={variant}
|
|
38
|
+
class={cn(itemMediaVariants({ variant }), className)}
|
|
39
|
+
{...restProps}
|
|
40
|
+
>
|
|
41
|
+
{@render children?.()}
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const itemMediaVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
default: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
image: string;
|
|
7
|
+
};
|
|
8
|
+
}, undefined, "gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none", undefined, undefined, undefined>;
|
|
9
|
+
export type ItemMediaVariant = VariantProps<typeof itemMediaVariants>["variant"];
|
|
10
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
11
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
12
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
13
|
+
variant?: ItemMediaVariant;
|
|
14
|
+
};
|
|
15
|
+
declare const $$Component: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
16
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
17
|
+
export default $$Component;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Separator } from "../separator/index.js";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import type { ComponentProps } from "svelte";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: ComponentProps<typeof Separator> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<Separator
|
|
14
|
+
bind:ref
|
|
15
|
+
data-slot="item-separator"
|
|
16
|
+
orientation="horizontal"
|
|
17
|
+
class={cn("my-2", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
/>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const $$Component: import("svelte").Component<Omit<{
|
|
2
|
+
orientation?: import("bits-ui").Orientation;
|
|
3
|
+
decorative?: boolean;
|
|
4
|
+
}, "children" | "child"> & {
|
|
5
|
+
child?: import("svelte").Snippet<[{
|
|
6
|
+
props: Record<string, unknown>;
|
|
7
|
+
}]> | undefined;
|
|
8
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
9
|
+
style?: import("bits-ui").StyleProperties | string | null | undefined;
|
|
10
|
+
ref?: HTMLElement | null | undefined;
|
|
11
|
+
} & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").SeparatorRootPropsWithoutHTML>, {}, "ref">;
|
|
12
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
13
|
+
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-title"
|
|
16
|
+
class={cn("gap-2 text-sm leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit 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,61 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
export const itemVariants = tv({
|
|
5
|
+
base: "[a]:hover:bg-muted rounded-md border text-sm group/item flex w-full flex-wrap items-center transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors",
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "border-transparent",
|
|
9
|
+
outline: "border-border",
|
|
10
|
+
muted: "bg-muted/50 border-transparent",
|
|
11
|
+
},
|
|
12
|
+
size: {
|
|
13
|
+
default: "gap-3.5 px-4 py-3.5",
|
|
14
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
15
|
+
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: "default",
|
|
20
|
+
size: "default",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export type ItemSize = VariantProps<typeof itemVariants>["size"];
|
|
25
|
+
export type ItemVariant = VariantProps<typeof itemVariants>["variant"];
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<script lang="ts">
|
|
29
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
30
|
+
import type { Snippet } from "svelte";
|
|
31
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
ref = $bindable(null),
|
|
35
|
+
class: className,
|
|
36
|
+
child,
|
|
37
|
+
variant,
|
|
38
|
+
size,
|
|
39
|
+
...restProps
|
|
40
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
41
|
+
child?: Snippet<[{ props: Record<string, unknown> }]>;
|
|
42
|
+
variant?: ItemVariant;
|
|
43
|
+
size?: ItemSize;
|
|
44
|
+
} = $props();
|
|
45
|
+
|
|
46
|
+
const mergedProps = $derived({
|
|
47
|
+
class: cn(itemVariants({ variant, size }), className),
|
|
48
|
+
"data-slot": "item",
|
|
49
|
+
"data-variant": variant,
|
|
50
|
+
"data-size": size,
|
|
51
|
+
...restProps,
|
|
52
|
+
});
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
{#if child}
|
|
56
|
+
{@render child({ props: mergedProps })}
|
|
57
|
+
{:else}
|
|
58
|
+
<div bind:this={ref} {...mergedProps}>
|
|
59
|
+
{@render mergedProps.children?.()}
|
|
60
|
+
</div>
|
|
61
|
+
{/if}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const itemVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
default: string;
|
|
5
|
+
outline: string;
|
|
6
|
+
muted: string;
|
|
7
|
+
};
|
|
8
|
+
size: {
|
|
9
|
+
default: string;
|
|
10
|
+
sm: string;
|
|
11
|
+
xs: string;
|
|
12
|
+
};
|
|
13
|
+
}, undefined, "[a]:hover:bg-muted rounded-md border text-sm group/item flex w-full flex-wrap items-center transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors", undefined, undefined, undefined>;
|
|
14
|
+
export type ItemSize = VariantProps<typeof itemVariants>["size"];
|
|
15
|
+
export type ItemVariant = VariantProps<typeof itemVariants>["variant"];
|
|
16
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
17
|
+
import type { Snippet } from "svelte";
|
|
18
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
19
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
20
|
+
child?: Snippet<[{
|
|
21
|
+
props: Record<string, unknown>;
|
|
22
|
+
}]>;
|
|
23
|
+
variant?: ItemVariant;
|
|
24
|
+
size?: ItemSize;
|
|
25
|
+
};
|
|
26
|
+
declare const $$Component: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
27
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
28
|
+
export default $$Component;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Root from "./native-select.svelte";
|
|
2
|
+
import Option from "./native-select-option.svelte";
|
|
3
|
+
import OptGroup from "./native-select-opt-group.svelte";
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
Root,
|
|
7
|
+
Option,
|
|
8
|
+
OptGroup,
|
|
9
|
+
//
|
|
10
|
+
Root as NativeSelect,
|
|
11
|
+
Option as NativeSelectOption,
|
|
12
|
+
OptGroup as NativeSelectOptGroup,
|
|
13
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLOptgroupAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLOptgroupAttributes> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<optgroup
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="native-select-optgroup"
|
|
16
|
+
class={cn("bg-[Canvas] text-[CanvasText]", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</optgroup>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLOptgroupAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLOptgroupAttributes>, {}, "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 { HTMLOptionAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLOptionAttributes> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<option
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="native-select-option"
|
|
16
|
+
class={cn("bg-[Canvas] text-[CanvasText]", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</option>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLOptionAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLOptionAttributes>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLSelectAttributes } from "svelte/elements";
|
|
4
|
+
import { CaretDown } from "phosphor-svelte";
|
|
5
|
+
|
|
6
|
+
type NativeSelectProps = Omit<WithElementRef<HTMLSelectAttributes, HTMLSelectElement>, "size"> & {
|
|
7
|
+
size?: "sm" | "default";
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
ref = $bindable(null),
|
|
12
|
+
value = $bindable(),
|
|
13
|
+
class: className,
|
|
14
|
+
size = "default",
|
|
15
|
+
children,
|
|
16
|
+
...restProps
|
|
17
|
+
}: NativeSelectProps = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<div
|
|
21
|
+
class={cn(
|
|
22
|
+
"group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
data-slot="native-select-wrapper"
|
|
26
|
+
data-size={size}
|
|
27
|
+
>
|
|
28
|
+
<!-- The kit's Select trigger sizes: 32px, 28px small, so the two read as one control. -->
|
|
29
|
+
<select
|
|
30
|
+
bind:value
|
|
31
|
+
bind:this={ref}
|
|
32
|
+
data-slot="native-select"
|
|
33
|
+
data-size={size}
|
|
34
|
+
class="border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 enabled:hover:border-foreground/20 focus-visible:border-ring focus-visible:shadow-(--ring-focus) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm shadow-field transition-[color,background-color,border-color,box-shadow] duration-[var(--duration-quick)] ease-[var(--ease-smooth-out)] select-none aria-invalid:ring-3 data-[size=sm]:h-7 data-[size=sm]:text-[0.8rem] outline-none disabled:pointer-events-none disabled:cursor-not-allowed"
|
|
35
|
+
{...restProps}
|
|
36
|
+
>
|
|
37
|
+
{@render children?.()}
|
|
38
|
+
</select>
|
|
39
|
+
<CaretDown
|
|
40
|
+
size={16}
|
|
41
|
+
aria-hidden="true"
|
|
42
|
+
data-slot="native-select-icon"
|
|
43
|
+
class="text-muted-foreground pointer-events-none absolute top-1/2 right-2.5 -translate-y-1/2 select-none"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLSelectAttributes } from "svelte/elements";
|
|
3
|
+
type NativeSelectProps = Omit<WithElementRef<HTMLSelectAttributes, HTMLSelectElement>, "size"> & {
|
|
4
|
+
size?: "sm" | "default";
|
|
5
|
+
};
|
|
6
|
+
declare const $$Component: import("svelte").Component<NativeSelectProps, {}, "value" | "ref">;
|
|
7
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
8
|
+
export default $$Component;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import Content from "./pagination-content.svelte";
|
|
2
|
+
import Ellipsis from "./pagination-ellipsis.svelte";
|
|
3
|
+
import Item from "./pagination-item.svelte";
|
|
4
|
+
import Link from "./pagination-link.svelte";
|
|
5
|
+
import NextButton from "./pagination-next-button.svelte";
|
|
6
|
+
import Next from "./pagination-next.svelte";
|
|
7
|
+
import PrevButton from "./pagination-prev-button.svelte";
|
|
8
|
+
import Previous from "./pagination-previous.svelte";
|
|
9
|
+
import Root from "./pagination.svelte";
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
Root,
|
|
13
|
+
Content,
|
|
14
|
+
Item,
|
|
15
|
+
Link,
|
|
16
|
+
PrevButton, // old
|
|
17
|
+
NextButton, // old
|
|
18
|
+
Ellipsis,
|
|
19
|
+
Previous,
|
|
20
|
+
Next,
|
|
21
|
+
//
|
|
22
|
+
Root as Pagination,
|
|
23
|
+
Content as PaginationContent,
|
|
24
|
+
Item as PaginationItem,
|
|
25
|
+
Link as PaginationLink,
|
|
26
|
+
PrevButton as PaginationPrevButton, // old
|
|
27
|
+
NextButton as PaginationNextButton, // old
|
|
28
|
+
Ellipsis as PaginationEllipsis,
|
|
29
|
+
Previous as PaginationPrevious,
|
|
30
|
+
Next as PaginationNext,
|
|
31
|
+
};
|
|
@@ -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<HTMLUListElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<ul
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="pagination-content"
|
|
16
|
+
class={cn("gap-1 flex items-center", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</ul>
|
|
@@ -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<HTMLUListElement>>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DotsThree } from "phosphor-svelte";
|
|
3
|
+
import { cn, type WithElementRef, type WithoutChildren } from "../../lib/utils.js";
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildren<WithElementRef<HTMLAttributes<HTMLSpanElement>>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<span
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
data-slot="pagination-ellipsis"
|
|
17
|
+
class={cn("size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4 flex items-center justify-center", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
>
|
|
20
|
+
<DotsThree aria-hidden="true" />
|
|
21
|
+
<span class="sr-only">More pages</span>
|
|
22
|
+
</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<Omit<WithElementRef<HTMLAttributes<HTMLSpanElement>>, "children">, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "../../lib/utils.js";
|
|
3
|
+
import type { HTMLLiAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
children,
|
|
8
|
+
...restProps
|
|
9
|
+
}: WithElementRef<HTMLLiAttributes> = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<li bind:this={ref} data-slot="pagination-item" {...restProps}>
|
|
13
|
+
{@render children?.()}
|
|
14
|
+
</li>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "../../lib/utils.js";
|
|
2
|
+
import type { HTMLLiAttributes } from "svelte/elements";
|
|
3
|
+
declare const $$Component: import("svelte").Component<WithElementRef<HTMLLiAttributes>, {}, "ref">;
|
|
4
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
5
|
+
export default $$Component;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Pagination as PaginationPrimitive } from "bits-ui";
|
|
3
|
+
import { buttonVariants, type ButtonSize } from "../button/index.js";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
size = "default",
|
|
9
|
+
isActive,
|
|
10
|
+
page,
|
|
11
|
+
children,
|
|
12
|
+
...restProps
|
|
13
|
+
}: PaginationPrimitive.PageProps & {
|
|
14
|
+
size?: ButtonSize;
|
|
15
|
+
isActive: boolean;
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
{#snippet Fallback()}
|
|
20
|
+
{page.value}
|
|
21
|
+
{/snippet}
|
|
22
|
+
|
|
23
|
+
<PaginationPrimitive.Page
|
|
24
|
+
bind:ref
|
|
25
|
+
{page}
|
|
26
|
+
aria-current={isActive ? "page" : undefined}
|
|
27
|
+
data-slot="pagination-link"
|
|
28
|
+
data-active={isActive}
|
|
29
|
+
data-size={size}
|
|
30
|
+
class={cn(
|
|
31
|
+
buttonVariants({ size, icon: true, variant: isActive ? "outline" : "ghost" }),
|
|
32
|
+
className
|
|
33
|
+
)}
|
|
34
|
+
{...restProps}
|
|
35
|
+
>
|
|
36
|
+
{#if children}
|
|
37
|
+
{@render children?.()}
|
|
38
|
+
{:else}
|
|
39
|
+
{@render Fallback()}
|
|
40
|
+
{/if}
|
|
41
|
+
</PaginationPrimitive.Page>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Pagination as PaginationPrimitive } from "bits-ui";
|
|
2
|
+
import { type ButtonSize } from "../button/index.js";
|
|
3
|
+
type $$ComponentProps = PaginationPrimitive.PageProps & {
|
|
4
|
+
size?: ButtonSize;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const $$Component: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
8
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
9
|
+
export default $$Component;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Pagination as PaginationPrimitive } from "bits-ui";
|
|
3
|
+
import { CaretRight } from "phosphor-svelte";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { buttonVariants } from "../button/index.js";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: PaginationPrimitive.NextButtonProps = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
{#snippet Fallback()}
|
|
16
|
+
<span>Next</span>
|
|
17
|
+
<CaretRight
|
|
18
|
+
aria-hidden="true"
|
|
19
|
+
class={cn("cn-rtl-flip size-4", className)}
|
|
20
|
+
/>
|
|
21
|
+
{/snippet}
|
|
22
|
+
|
|
23
|
+
<PaginationPrimitive.NextButton
|
|
24
|
+
bind:ref
|
|
25
|
+
aria-label="Go to next page"
|
|
26
|
+
class={cn(buttonVariants({ variant: "ghost" }), "pr-2!", className)}
|
|
27
|
+
{...restProps}
|
|
28
|
+
>
|
|
29
|
+
{#if children}
|
|
30
|
+
{@render children?.()}
|
|
31
|
+
{:else}
|
|
32
|
+
{@render Fallback()}
|
|
33
|
+
{/if}
|
|
34
|
+
</PaginationPrimitive.NextButton>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Pagination as PaginationPrimitive } from "bits-ui";
|
|
3
|
+
import { CaretRight } from "phosphor-svelte";
|
|
4
|
+
import { buttonVariants } from "../button/index.js";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
...restProps
|
|
11
|
+
}: PaginationPrimitive.NextButtonProps = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<PaginationPrimitive.NextButton
|
|
15
|
+
bind:ref
|
|
16
|
+
aria-label="Go to next page"
|
|
17
|
+
class={cn(buttonVariants({ variant: "ghost", size: "default" }), "pr-2!", className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
>
|
|
20
|
+
<span class="hidden sm:block">Next</span>
|
|
21
|
+
<CaretRight
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
data-icon="inline-end"
|
|
24
|
+
class="cn-rtl-flip"
|
|
25
|
+
/>
|
|
26
|
+
</PaginationPrimitive.NextButton>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Pagination as PaginationPrimitive } from "bits-ui";
|
|
3
|
+
import { CaretLeft } from "phosphor-svelte";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { buttonVariants } from "../button/index.js";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: PaginationPrimitive.PrevButtonProps = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
{#snippet Fallback()}
|
|
16
|
+
<CaretLeft
|
|
17
|
+
aria-hidden="true"
|
|
18
|
+
class={cn("cn-rtl-flip size-4", className)}
|
|
19
|
+
/>
|
|
20
|
+
<span>Previous</span>
|
|
21
|
+
{/snippet}
|
|
22
|
+
|
|
23
|
+
<PaginationPrimitive.PrevButton
|
|
24
|
+
bind:ref
|
|
25
|
+
aria-label="Go to previous page"
|
|
26
|
+
class={cn(buttonVariants({ variant: "ghost" }), "pl-2!", className)}
|
|
27
|
+
{...restProps}
|
|
28
|
+
>
|
|
29
|
+
{#if children}
|
|
30
|
+
{@render children?.()}
|
|
31
|
+
{:else}
|
|
32
|
+
{@render Fallback()}
|
|
33
|
+
{/if}
|
|
34
|
+
</PaginationPrimitive.PrevButton>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Pagination as PaginationPrimitive } from "bits-ui";
|
|
3
|
+
import { CaretLeft } from "phosphor-svelte";
|
|
4
|
+
import { buttonVariants } from "../button/index.js";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
...restProps
|
|
11
|
+
}: PaginationPrimitive.PrevButtonProps = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<PaginationPrimitive.PrevButton
|
|
15
|
+
bind:ref
|
|
16
|
+
aria-label="Go to previous page"
|
|
17
|
+
class={cn(
|
|
18
|
+
buttonVariants({ variant: "ghost", size: "default" }),
|
|
19
|
+
"pl-2!",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...restProps}
|
|
23
|
+
>
|
|
24
|
+
<CaretLeft
|
|
25
|
+
aria-hidden="true"
|
|
26
|
+
data-icon="inline-start"
|
|
27
|
+
class="cn-rtl-flip"
|
|
28
|
+
/>
|
|
29
|
+
<span class="hidden sm:block">Previous</span>
|
|
30
|
+
</PaginationPrimitive.PrevButton>
|