@almanaclabs/blaze-ui 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/components/accordion/accordion.js +53 -0
- package/dist/components/alert/alert.js +43 -0
- package/dist/components/alert-dialog/alert-dialog.js +94 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +13 -0
- package/dist/components/attachment/attachment.js +104 -0
- package/dist/components/avatar/avatar.js +50 -0
- package/dist/components/badge/badge.js +29 -0
- package/dist/components/breadcrumb/breadcrumb.js +72 -0
- package/dist/components/bubble/bubble.js +73 -0
- package/dist/components/button/button.js +46 -0
- package/dist/components/button-group/button-group.js +41 -0
- package/dist/components/calendar/calendar.js +92 -0
- package/dist/components/card/card.js +56 -0
- package/dist/components/carousel/carousel.js +110 -0
- package/dist/components/chart/chart.js +131 -0
- package/dist/components/checkbox/checkbox.js +20 -0
- package/dist/components/collapsible/collapsible.js +23 -0
- package/dist/components/combobox/combobox.js +165 -0
- package/dist/components/data-table/data-table.js +30 -0
- package/dist/components/date-picker/date-picker.js +39 -0
- package/dist/components/dialog/dialog.js +92 -0
- package/dist/components/drawer/drawer.js +121 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +136 -0
- package/dist/components/empty/empty.js +59 -0
- package/dist/components/field/field.js +107 -0
- package/dist/components/hover-card/hover-card.js +36 -0
- package/dist/components/input/input.js +15 -0
- package/dist/components/input-group/input-group.js +77 -0
- package/dist/components/item/item.js +121 -0
- package/dist/components/label/label.js +13 -0
- package/dist/components/marker/marker.js +43 -0
- package/dist/components/message/message.js +49 -0
- package/dist/components/native-select/native-select.js +39 -0
- package/dist/components/pagination/pagination.js +80 -0
- package/dist/components/popover/popover.js +54 -0
- package/dist/components/progress/progress.js +45 -0
- package/dist/components/questionnaire/questionnaire-primitive.js +353 -0
- package/dist/components/questionnaire/questionnaire.js +169 -0
- package/dist/components/radio-group/radio-group.js +26 -0
- package/dist/components/scroll-area/scroll-area.js +37 -0
- package/dist/components/select/select.js +98 -0
- package/dist/components/separator/separator.js +15 -0
- package/dist/components/sheet/sheet.js +89 -0
- package/dist/components/sidebar/sidebar.js +358 -0
- package/dist/components/skeleton/skeleton.js +12 -0
- package/dist/components/slider/slider.js +37 -0
- package/dist/components/spinner/spinner.js +15 -0
- package/dist/components/switch/switch.js +19 -0
- package/dist/components/table/table.js +66 -0
- package/dist/components/tabs/tabs.js +46 -0
- package/dist/components/textarea/textarea.js +13 -0
- package/dist/components/toast/toast.js +116 -0
- package/dist/components/toggle/toggle.js +35 -0
- package/dist/components/toggle-group/toggle-group.js +52 -0
- package/dist/components/tooltip/tooltip.js +41 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/index.js +56 -3699
- package/dist/lib/utils.js +8 -0
- package/dist/recipes/recipe-runtime.d.ts +6 -0
- package/dist/recipes/recipe-runtime.d.ts.map +1 -0
- package/package.json +2 -1
- package/recipes/README.md +22 -0
- package/recipes/manifest.json +12 -0
- package/recipes/workspace-shell/README.md +41 -0
- package/recipes/workspace-shell/workspace-shell.tsx +386 -0
- package/src/styles/globals.css +5 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import { Input as n } from "../input/input.js";
|
|
4
|
+
import { Textarea as r } from "../textarea/textarea.js";
|
|
5
|
+
import { cva as i } from "class-variance-authority";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
import "react";
|
|
8
|
+
//#region src/components/input-group/input-group.tsx
|
|
9
|
+
function o({ className: t, ...n }) {
|
|
10
|
+
return /* @__PURE__ */ a("div", {
|
|
11
|
+
"data-slot": "input-group",
|
|
12
|
+
role: "group",
|
|
13
|
+
className: e("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 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-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 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", t),
|
|
14
|
+
...n
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
var s = i("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
18
|
+
variants: { align: {
|
|
19
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
20
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
21
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
22
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
23
|
+
} },
|
|
24
|
+
defaultVariants: { align: "inline-start" }
|
|
25
|
+
});
|
|
26
|
+
function c({ className: t, align: n = "inline-start", ...r }) {
|
|
27
|
+
return /* @__PURE__ */ a("div", {
|
|
28
|
+
role: "group",
|
|
29
|
+
"data-slot": "input-group-addon",
|
|
30
|
+
"data-align": n,
|
|
31
|
+
className: e(s({ align: n }), t),
|
|
32
|
+
onClick: (e) => {
|
|
33
|
+
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
34
|
+
},
|
|
35
|
+
...r
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
var l = i("flex items-center gap-2 text-sm shadow-none", {
|
|
39
|
+
variants: { size: {
|
|
40
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
41
|
+
sm: "",
|
|
42
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
43
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
44
|
+
} },
|
|
45
|
+
defaultVariants: { size: "xs" }
|
|
46
|
+
});
|
|
47
|
+
function u({ className: n, type: r = "button", variant: i = "ghost", size: o = "xs", ...s }) {
|
|
48
|
+
return /* @__PURE__ */ a(t, {
|
|
49
|
+
type: r,
|
|
50
|
+
"data-size": o,
|
|
51
|
+
variant: i,
|
|
52
|
+
className: e(l({ size: o }), n),
|
|
53
|
+
...s
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function d({ className: t, ...n }) {
|
|
57
|
+
return /* @__PURE__ */ a("span", {
|
|
58
|
+
className: e("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", t),
|
|
59
|
+
...n
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function f({ className: t, ...r }) {
|
|
63
|
+
return /* @__PURE__ */ a(n, {
|
|
64
|
+
"data-slot": "input-group-control",
|
|
65
|
+
className: e("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", t),
|
|
66
|
+
...r
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function p({ className: t, ...n }) {
|
|
70
|
+
return /* @__PURE__ */ a(r, {
|
|
71
|
+
"data-slot": "input-group-control",
|
|
72
|
+
className: e("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", t),
|
|
73
|
+
...n
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { o as InputGroup, c as InputGroupAddon, u as InputGroupButton, f as InputGroupInput, d as InputGroupText, p as InputGroupTextarea };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Separator as t } from "../separator/separator.js";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
import { mergeProps as i } from "@base-ui/react/merge-props";
|
|
7
|
+
import { useRender as a } from "@base-ui/react/use-render";
|
|
8
|
+
//#region src/components/item/item.tsx
|
|
9
|
+
function o({ className: t, ...n }) {
|
|
10
|
+
return /* @__PURE__ */ r("div", {
|
|
11
|
+
role: "list",
|
|
12
|
+
"data-slot": "item-group",
|
|
13
|
+
className: e("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", t),
|
|
14
|
+
...n
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function s({ className: n, ...i }) {
|
|
18
|
+
return /* @__PURE__ */ r(t, {
|
|
19
|
+
"data-slot": "item-separator",
|
|
20
|
+
orientation: "horizontal",
|
|
21
|
+
className: e("my-2", n),
|
|
22
|
+
...i
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
var c = n("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
|
|
26
|
+
variants: {
|
|
27
|
+
variant: {
|
|
28
|
+
default: "border-transparent",
|
|
29
|
+
outline: "border-border",
|
|
30
|
+
muted: "border-transparent bg-muted/50"
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
default: "gap-2.5 px-3 py-2.5",
|
|
34
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
35
|
+
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
variant: "default",
|
|
40
|
+
size: "default"
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
function l({ className: t, variant: n = "default", size: r = "default", render: o, ...s }) {
|
|
44
|
+
return a({
|
|
45
|
+
defaultTagName: "div",
|
|
46
|
+
props: i({ className: e(c({
|
|
47
|
+
variant: n,
|
|
48
|
+
size: r,
|
|
49
|
+
className: t
|
|
50
|
+
})) }, s),
|
|
51
|
+
render: o,
|
|
52
|
+
state: {
|
|
53
|
+
slot: "item",
|
|
54
|
+
variant: n,
|
|
55
|
+
size: r
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
var u = n("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
|
|
60
|
+
variants: { variant: {
|
|
61
|
+
default: "bg-transparent",
|
|
62
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
63
|
+
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"
|
|
64
|
+
} },
|
|
65
|
+
defaultVariants: { variant: "default" }
|
|
66
|
+
});
|
|
67
|
+
function d({ className: t, variant: n = "default", ...i }) {
|
|
68
|
+
return /* @__PURE__ */ r("div", {
|
|
69
|
+
"data-slot": "item-media",
|
|
70
|
+
"data-variant": n,
|
|
71
|
+
className: e(u({
|
|
72
|
+
variant: n,
|
|
73
|
+
className: t
|
|
74
|
+
})),
|
|
75
|
+
...i
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function f({ className: t, ...n }) {
|
|
79
|
+
return /* @__PURE__ */ r("div", {
|
|
80
|
+
"data-slot": "item-content",
|
|
81
|
+
className: e("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", t),
|
|
82
|
+
...n
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function p({ className: t, ...n }) {
|
|
86
|
+
return /* @__PURE__ */ r("div", {
|
|
87
|
+
"data-slot": "item-title",
|
|
88
|
+
className: e("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", t),
|
|
89
|
+
...n
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function m({ className: t, ...n }) {
|
|
93
|
+
return /* @__PURE__ */ r("p", {
|
|
94
|
+
"data-slot": "item-description",
|
|
95
|
+
className: e("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", t),
|
|
96
|
+
...n
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function h({ className: t, ...n }) {
|
|
100
|
+
return /* @__PURE__ */ r("div", {
|
|
101
|
+
"data-slot": "item-actions",
|
|
102
|
+
className: e("flex items-center gap-2", t),
|
|
103
|
+
...n
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function g({ className: t, ...n }) {
|
|
107
|
+
return /* @__PURE__ */ r("div", {
|
|
108
|
+
"data-slot": "item-header",
|
|
109
|
+
className: e("flex basis-full items-center justify-between gap-2", t),
|
|
110
|
+
...n
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function _({ className: t, ...n }) {
|
|
114
|
+
return /* @__PURE__ */ r("div", {
|
|
115
|
+
"data-slot": "item-footer",
|
|
116
|
+
className: e("flex basis-full items-center justify-between gap-2", t),
|
|
117
|
+
...n
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { l as Item, h as ItemActions, f as ItemContent, m as ItemDescription, _ as ItemFooter, o as ItemGroup, g as ItemHeader, d as ItemMedia, s as ItemSeparator, p as ItemTitle };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
//#region src/components/label/label.tsx
|
|
5
|
+
function n({ className: n, ...r }) {
|
|
6
|
+
return /* @__PURE__ */ t("label", {
|
|
7
|
+
"data-slot": "label",
|
|
8
|
+
className: e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-disabled:pointer-events-none group-data-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", n),
|
|
9
|
+
...r
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n as Label };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { cva as t } from "class-variance-authority";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import { mergeProps as r } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender as i } from "@base-ui/react/use-render";
|
|
7
|
+
//#region src/components/marker/marker.tsx
|
|
8
|
+
var a = t("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", { variants: { variant: {
|
|
9
|
+
default: "",
|
|
10
|
+
separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
|
|
11
|
+
border: "border-b border-border pb-2"
|
|
12
|
+
} } });
|
|
13
|
+
function o({ className: t, variant: n = "default", render: o, ...s }) {
|
|
14
|
+
return i({
|
|
15
|
+
defaultTagName: "div",
|
|
16
|
+
props: r({ className: e(a({
|
|
17
|
+
variant: n,
|
|
18
|
+
className: t
|
|
19
|
+
})) }, s),
|
|
20
|
+
render: o,
|
|
21
|
+
state: {
|
|
22
|
+
slot: "marker",
|
|
23
|
+
variant: n
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function s({ className: t, ...r }) {
|
|
28
|
+
return /* @__PURE__ */ n("span", {
|
|
29
|
+
"data-slot": "marker-icon",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
className: e("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
32
|
+
...r
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function c({ className: t, ...r }) {
|
|
36
|
+
return /* @__PURE__ */ n("span", {
|
|
37
|
+
"data-slot": "marker-content",
|
|
38
|
+
className: e("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", t),
|
|
39
|
+
...r
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { o as Marker, c as MarkerContent, s as MarkerIcon, a as markerVariants };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
//#region src/components/message/message.tsx
|
|
5
|
+
function n({ className: n, ...r }) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
"data-slot": "message-group",
|
|
8
|
+
className: e("flex min-w-0 flex-col gap-2", n),
|
|
9
|
+
...r
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function r({ className: n, align: r = "start", ...i }) {
|
|
13
|
+
return /* @__PURE__ */ t("div", {
|
|
14
|
+
"data-slot": "message",
|
|
15
|
+
"data-align": r,
|
|
16
|
+
className: e("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", n),
|
|
17
|
+
...i
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function i({ className: n, ...r }) {
|
|
21
|
+
return /* @__PURE__ */ t("div", {
|
|
22
|
+
"data-slot": "message-avatar",
|
|
23
|
+
className: e("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", n),
|
|
24
|
+
...r
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function a({ className: n, ...r }) {
|
|
28
|
+
return /* @__PURE__ */ t("div", {
|
|
29
|
+
"data-slot": "message-content",
|
|
30
|
+
className: e("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", n),
|
|
31
|
+
...r
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function o({ className: n, ...r }) {
|
|
35
|
+
return /* @__PURE__ */ t("div", {
|
|
36
|
+
"data-slot": "message-header",
|
|
37
|
+
className: e("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", n),
|
|
38
|
+
...r
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function s({ className: n, ...r }) {
|
|
42
|
+
return /* @__PURE__ */ t("div", {
|
|
43
|
+
"data-slot": "message-footer",
|
|
44
|
+
className: e("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", n),
|
|
45
|
+
...r
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { r as Message, i as MessageAvatar, a as MessageContent, s as MessageFooter, n as MessageGroup, o as MessageHeader };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import { IconChevronDown as r } from "@tabler/icons-react";
|
|
5
|
+
//#region src/components/native-select/native-select.tsx
|
|
6
|
+
function i({ className: i, size: a = "default", "aria-label": o = "Select an option", ...s }) {
|
|
7
|
+
return /* @__PURE__ */ n("div", {
|
|
8
|
+
className: e("group/native-select relative w-fit has-[select:disabled]:opacity-50", i),
|
|
9
|
+
"data-slot": "native-select-wrapper",
|
|
10
|
+
"data-size": a,
|
|
11
|
+
children: [/* @__PURE__ */ t("select", {
|
|
12
|
+
"aria-label": o,
|
|
13
|
+
"data-slot": "native-select",
|
|
14
|
+
"data-size": a,
|
|
15
|
+
className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
16
|
+
...s
|
|
17
|
+
}), /* @__PURE__ */ t(r, {
|
|
18
|
+
className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
19
|
+
"aria-hidden": "true",
|
|
20
|
+
"data-slot": "native-select-icon"
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function a({ className: n, ...r }) {
|
|
25
|
+
return /* @__PURE__ */ t("option", {
|
|
26
|
+
"data-slot": "native-select-option",
|
|
27
|
+
className: e("bg-[Canvas] text-[CanvasText]", n),
|
|
28
|
+
...r
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function o({ className: n, ...r }) {
|
|
32
|
+
return /* @__PURE__ */ t("optgroup", {
|
|
33
|
+
"data-slot": "native-select-optgroup",
|
|
34
|
+
className: e("bg-[Canvas] text-[CanvasText]", n),
|
|
35
|
+
...r
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { i as NativeSelect, o as NativeSelectOptGroup, a as NativeSelectOption };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import { IconChevronLeft as i, IconChevronRight as a, IconDots as o } from "@tabler/icons-react";
|
|
6
|
+
//#region src/components/pagination/pagination.tsx
|
|
7
|
+
function s({ className: t, ...r }) {
|
|
8
|
+
return /* @__PURE__ */ n("nav", {
|
|
9
|
+
role: "navigation",
|
|
10
|
+
"aria-label": "pagination",
|
|
11
|
+
"data-slot": "pagination",
|
|
12
|
+
className: e("mx-auto flex w-full justify-center", t),
|
|
13
|
+
...r
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function c({ className: t, ...r }) {
|
|
17
|
+
return /* @__PURE__ */ n("ul", {
|
|
18
|
+
"data-slot": "pagination-content",
|
|
19
|
+
className: e("flex items-center gap-0.5", t),
|
|
20
|
+
...r
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function l({ ...e }) {
|
|
24
|
+
return /* @__PURE__ */ n("li", {
|
|
25
|
+
"data-slot": "pagination-item",
|
|
26
|
+
...e
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function u({ className: r, isActive: i, size: a = "icon", ...o }) {
|
|
30
|
+
return /* @__PURE__ */ n(t, {
|
|
31
|
+
variant: i ? "outline" : "ghost",
|
|
32
|
+
size: a,
|
|
33
|
+
className: e(r),
|
|
34
|
+
nativeButton: !1,
|
|
35
|
+
render: /* @__PURE__ */ n("a", {
|
|
36
|
+
"aria-current": i ? "page" : void 0,
|
|
37
|
+
"data-slot": "pagination-link",
|
|
38
|
+
"data-active": i,
|
|
39
|
+
...o
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function d({ className: t, text: a = "Previous", ...o }) {
|
|
44
|
+
return /* @__PURE__ */ r(u, {
|
|
45
|
+
"aria-label": "Go to previous page",
|
|
46
|
+
size: "default",
|
|
47
|
+
className: e("pl-1.5!", t),
|
|
48
|
+
...o,
|
|
49
|
+
children: [/* @__PURE__ */ n(i, { "data-icon": "inline-start" }), /* @__PURE__ */ n("span", {
|
|
50
|
+
className: "hidden sm:block",
|
|
51
|
+
children: a
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function f({ className: t, text: i = "Next", ...o }) {
|
|
56
|
+
return /* @__PURE__ */ r(u, {
|
|
57
|
+
"aria-label": "Go to next page",
|
|
58
|
+
size: "default",
|
|
59
|
+
className: e("pr-1.5!", t),
|
|
60
|
+
...o,
|
|
61
|
+
children: [/* @__PURE__ */ n("span", {
|
|
62
|
+
className: "hidden sm:block",
|
|
63
|
+
children: i
|
|
64
|
+
}), /* @__PURE__ */ n(a, { "data-icon": "inline-end" })]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function p({ className: t, ...i }) {
|
|
68
|
+
return /* @__PURE__ */ r("span", {
|
|
69
|
+
"aria-hidden": !0,
|
|
70
|
+
"data-slot": "pagination-ellipsis",
|
|
71
|
+
className: e("flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4", t),
|
|
72
|
+
...i,
|
|
73
|
+
children: [/* @__PURE__ */ n(o, {}), /* @__PURE__ */ n("span", {
|
|
74
|
+
className: "sr-only",
|
|
75
|
+
children: "More pages"
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { s as Pagination, c as PaginationContent, p as PaginationEllipsis, l as PaginationItem, u as PaginationLink, f as PaginationNext, d as PaginationPrevious };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Popover as n } from "@base-ui/react/popover";
|
|
5
|
+
//#region src/components/popover/popover.tsx
|
|
6
|
+
function r({ ...e }) {
|
|
7
|
+
return /* @__PURE__ */ t(n.Root, {
|
|
8
|
+
"data-slot": "popover",
|
|
9
|
+
...e
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function i({ ...e }) {
|
|
13
|
+
return /* @__PURE__ */ t(n.Trigger, {
|
|
14
|
+
"data-slot": "popover-trigger",
|
|
15
|
+
...e
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function a({ className: r, align: i = "center", alignOffset: a = 0, side: o = "bottom", sideOffset: s = 4, ...c }) {
|
|
19
|
+
return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(n.Positioner, {
|
|
20
|
+
align: i,
|
|
21
|
+
alignOffset: a,
|
|
22
|
+
side: o,
|
|
23
|
+
sideOffset: s,
|
|
24
|
+
className: "isolate z-50",
|
|
25
|
+
children: /* @__PURE__ */ t(n.Popup, {
|
|
26
|
+
"data-slot": "popover-content",
|
|
27
|
+
className: e("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", r),
|
|
28
|
+
...c
|
|
29
|
+
})
|
|
30
|
+
}) });
|
|
31
|
+
}
|
|
32
|
+
function o({ className: n, ...r }) {
|
|
33
|
+
return /* @__PURE__ */ t("div", {
|
|
34
|
+
"data-slot": "popover-header",
|
|
35
|
+
className: e("flex flex-col gap-0.5 text-sm", n),
|
|
36
|
+
...r
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function s({ className: r, ...i }) {
|
|
40
|
+
return /* @__PURE__ */ t(n.Title, {
|
|
41
|
+
"data-slot": "popover-title",
|
|
42
|
+
className: e("font-medium", r),
|
|
43
|
+
...i
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function c({ className: r, ...i }) {
|
|
47
|
+
return /* @__PURE__ */ t(n.Description, {
|
|
48
|
+
"data-slot": "popover-description",
|
|
49
|
+
className: e("text-muted-foreground", r),
|
|
50
|
+
...i
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { r as Popover, a as PopoverContent, c as PopoverDescription, o as PopoverHeader, s as PopoverTitle, i as PopoverTrigger };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { Progress as r } from "@base-ui/react/progress";
|
|
5
|
+
//#region src/components/progress/progress.tsx
|
|
6
|
+
function i({ className: i, children: s, value: c, "aria-label": l = "Progress", ...u }) {
|
|
7
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
8
|
+
value: c,
|
|
9
|
+
"aria-label": l,
|
|
10
|
+
"data-slot": "progress",
|
|
11
|
+
className: e("flex flex-wrap gap-3", i),
|
|
12
|
+
...u,
|
|
13
|
+
children: [s, /* @__PURE__ */ t(a, { children: /* @__PURE__ */ t(o, {}) })]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function a({ className: n, ...i }) {
|
|
17
|
+
return /* @__PURE__ */ t(r.Track, {
|
|
18
|
+
className: e("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", n),
|
|
19
|
+
"data-slot": "progress-track",
|
|
20
|
+
...i
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function o({ className: n, ...i }) {
|
|
24
|
+
return /* @__PURE__ */ t(r.Indicator, {
|
|
25
|
+
"data-slot": "progress-indicator",
|
|
26
|
+
className: e("h-full bg-primary transition-all", n),
|
|
27
|
+
...i
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function s({ className: n, ...i }) {
|
|
31
|
+
return /* @__PURE__ */ t(r.Label, {
|
|
32
|
+
className: e("text-sm font-medium", n),
|
|
33
|
+
"data-slot": "progress-label",
|
|
34
|
+
...i
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function c({ className: n, ...i }) {
|
|
38
|
+
return /* @__PURE__ */ t(r.Value, {
|
|
39
|
+
className: e("ml-auto text-sm text-muted-foreground tabular-nums", n),
|
|
40
|
+
"data-slot": "progress-value",
|
|
41
|
+
...i
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { i as Progress, o as ProgressIndicator, s as ProgressLabel, a as ProgressTrack, c as ProgressValue };
|