@almanaclabs/blaze-ui 0.3.2 → 0.5.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.d.ts +1 -1
- package/dist/components/alert/alert.js +43 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -1
- 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.d.ts +2 -2
- package/dist/components/attachment/attachment.js +104 -0
- package/dist/components/avatar/avatar.d.ts +6 -4
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +51 -0
- package/dist/components/badge/badge.d.ts +3 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +45 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +72 -0
- package/dist/components/bubble/bubble.d.ts +1 -1
- package/dist/components/bubble/bubble.js +73 -0
- package/dist/components/button/button.d.ts +5 -3
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +65 -0
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button-group/button-group.js +41 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/calendar.js +92 -0
- package/dist/components/card/card.js +56 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/components/empty/empty.js +59 -0
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +107 -0
- package/dist/components/hover-card/hover-card.js +36 -0
- package/dist/components/identity-mark/identity-mark.d.ts +5 -0
- package/dist/components/identity-mark/identity-mark.d.ts.map +1 -0
- package/dist/components/identity-mark/identity-mark.js +20 -0
- package/dist/components/identity-mark/index.d.ts +2 -0
- package/dist/components/identity-mark/index.d.ts.map +1 -0
- package/dist/components/input/input.d.ts +9 -2
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +28 -0
- package/dist/components/input-group/input-group.d.ts +11 -3
- package/dist/components/input-group/input-group.d.ts.map +1 -1
- package/dist/components/input-group/input-group.js +95 -0
- package/dist/components/item/item.d.ts +2 -2
- package/dist/components/item/item.js +121 -0
- package/dist/components/label/label.js +13 -0
- package/dist/components/marker/marker.d.ts +1 -1
- package/dist/components/marker/marker.js +43 -0
- package/dist/components/message/message.js +49 -0
- package/dist/components/metric-overview/index.d.ts +2 -0
- package/dist/components/metric-overview/index.d.ts.map +1 -0
- package/dist/components/metric-overview/metric-overview.d.ts +12 -0
- package/dist/components/metric-overview/metric-overview.d.ts.map +1 -0
- package/dist/components/metric-overview/metric-overview.js +42 -0
- package/dist/components/native-select/native-select.d.ts +2 -1
- package/dist/components/native-select/native-select.d.ts.map +1 -1
- package/dist/components/native-select/native-select.js +40 -0
- package/dist/components/navigation-action/index.d.ts +2 -0
- package/dist/components/navigation-action/index.d.ts.map +1 -0
- package/dist/components/navigation-action/navigation-action.d.ts +6 -0
- package/dist/components/navigation-action/navigation-action.d.ts.map +1 -0
- package/dist/components/navigation-action/navigation-action.js +18 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts +2 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +99 -0
- package/dist/components/separator/separator.js +15 -0
- package/dist/components/sheet/sheet.js +89 -0
- package/dist/components/sidebar/sidebar.d.ts +13 -2
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.js +419 -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.d.ts +4 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +68 -0
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.js +46 -0
- package/dist/components/textarea/textarea.js +13 -0
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/components/toast/toast.js +116 -0
- package/dist/components/toggle/toggle.d.ts +1 -1
- 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.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -3699
- package/dist/lib/control-size.d.ts +9 -0
- package/dist/lib/control-size.d.ts.map +1 -0
- package/dist/lib/control-size.js +10 -0
- package/dist/lib/utils.js +8 -0
- package/dist/recipes/recipe-runtime.d.ts +18 -0
- package/dist/recipes/recipe-runtime.d.ts.map +1 -0
- package/package.json +2 -1
- package/recipes/README.md +24 -0
- package/recipes/guided-workflow/README.md +51 -0
- package/recipes/guided-workflow/guided-workflow.tsx +495 -0
- package/recipes/manifest.json +19 -0
- package/recipes/workspace-shell/README.md +95 -0
- package/recipes/workspace-shell/assets/google-search-ads.svg +6 -0
- package/recipes/workspace-shell/assets/home.svg +5 -0
- package/recipes/workspace-shell/assets/radiant-health.png +0 -0
- package/recipes/workspace-shell/workspace-shell.css +55 -0
- package/recipes/workspace-shell/workspace-shell.tsx +636 -0
- package/src/styles/fonts/Sohne-Book.woff2 +0 -0
- package/src/styles/fonts/Sohne-Medium.woff2 +0 -0
- package/src/styles/fonts/Sohne-Semi.woff2 +0 -0
- package/src/styles/globals.css +233 -54
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cva as t } from "class-variance-authority";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
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/bubble/bubble.tsx
|
|
8
|
+
function a({ className: t, ...r }) {
|
|
9
|
+
return /* @__PURE__ */ n("div", {
|
|
10
|
+
"data-slot": "bubble-group",
|
|
11
|
+
className: e("flex min-w-0 flex-col gap-2", t),
|
|
12
|
+
...r
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
var o = t("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
|
|
16
|
+
variants: { variant: {
|
|
17
|
+
default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
|
|
18
|
+
secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
|
|
19
|
+
muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
|
|
20
|
+
tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
|
|
21
|
+
outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
|
|
22
|
+
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
|
|
23
|
+
destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
|
|
24
|
+
} },
|
|
25
|
+
defaultVariants: { variant: "default" }
|
|
26
|
+
});
|
|
27
|
+
function s({ variant: t = "default", align: r = "start", className: i, ...a }) {
|
|
28
|
+
return /* @__PURE__ */ n("div", {
|
|
29
|
+
"data-slot": "bubble",
|
|
30
|
+
"data-variant": t,
|
|
31
|
+
"data-align": r,
|
|
32
|
+
className: e(o({ variant: t }), i),
|
|
33
|
+
...a
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function c({ className: t, render: n, ...a }) {
|
|
37
|
+
return i({
|
|
38
|
+
defaultTagName: "div",
|
|
39
|
+
props: r({ className: e("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50", t) }, a),
|
|
40
|
+
render: n,
|
|
41
|
+
state: { slot: "bubble-content" }
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
var l = t("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
|
|
45
|
+
variants: {
|
|
46
|
+
side: {
|
|
47
|
+
top: "top-0 -translate-y-3/4",
|
|
48
|
+
bottom: "bottom-0 translate-y-3/4"
|
|
49
|
+
},
|
|
50
|
+
align: {
|
|
51
|
+
start: "left-3",
|
|
52
|
+
end: "right-3"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
defaultVariants: {
|
|
56
|
+
side: "bottom",
|
|
57
|
+
align: "end"
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
function u({ side: t = "bottom", align: r = "end", className: i, ...a }) {
|
|
61
|
+
return /* @__PURE__ */ n("div", {
|
|
62
|
+
"data-slot": "bubble-reactions",
|
|
63
|
+
"data-align": r,
|
|
64
|
+
"data-side": t,
|
|
65
|
+
className: e(l({
|
|
66
|
+
side: t,
|
|
67
|
+
align: r
|
|
68
|
+
}), i),
|
|
69
|
+
...a
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { s as Bubble, c as BubbleContent, a as BubbleGroup, u as BubbleReactions };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
3
4
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "
|
|
5
|
+
variant?: "primary" | "secondary" | "tertiary" | "subtle" | "destructive" | "link" | null | undefined;
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl" | null | undefined;
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
8
|
export type ButtonProps = ButtonPrimitive.Props & VariantProps<typeof buttonVariants>;
|
|
8
|
-
export declare function
|
|
9
|
+
export declare function ButtonLabel({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
10
|
+
export declare function Button({ className, variant, size, children, ...props }: ButtonProps): React.JSX.Element;
|
|
9
11
|
export { buttonVariants };
|
|
10
12
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAiBjE,QAAA,MAAM,cAAc;;;8EAqCnB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,GAC7C,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AAErC,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9B;AAeD,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,OAAmB,EACnB,IAAW,EACX,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,qBAkBb;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { controlSizeClassNames as e } from "../../lib/control-size.js";
|
|
2
|
+
import { cn as t } from "../../lib/utils.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { Button as r } from "@base-ui/react/button";
|
|
5
|
+
import { cva as i } from "class-variance-authority";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/button/button.tsx
|
|
8
|
+
var o = "bg-primary text-primary-foreground hover:bg-primary/80 aria-expanded:bg-primary/80", s = "border-border bg-background text-foreground hover:border-foreground/15 hover:bg-background aria-expanded:border-foreground/15 aria-expanded:bg-background", c = "bg-transparent text-foreground hover:bg-muted aria-expanded:bg-muted dark:hover:bg-muted/50", l = `${e.xs} gap-0.5 [--icon-stroke-width:var(--icon-stroke-14)] has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 [&_svg:not([class*='size-'])]:size-[14px]`, u = `${e.sm} gap-1 [--icon-stroke-width:var(--icon-stroke-15)] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-[15px]`, d = `${e.md} gap-[5px] [--icon-stroke-width:var(--icon-stroke-15)] has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-[15px]`, f = `${e.lg} gap-1.5 [--icon-stroke-width:var(--icon-stroke-18)] has-data-[icon=inline-end]:pr-[9px] has-data-[icon=inline-start]:pl-[9px] [&_svg:not([class*='size-'])]:size-[18px]`, p = `${e.xl} gap-2 [--icon-stroke-width:var(--icon-stroke-24)] has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-6`, m = i("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding font-normal whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-border-subtle active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-40 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive/60 dark:aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
primary: o,
|
|
12
|
+
secondary: s,
|
|
13
|
+
tertiary: c,
|
|
14
|
+
subtle: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
15
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/15 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/10 dark:hover:bg-destructive/15 dark:focus-visible:ring-destructive/40",
|
|
16
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
xs: l,
|
|
20
|
+
sm: u,
|
|
21
|
+
md: d,
|
|
22
|
+
lg: f,
|
|
23
|
+
xl: p,
|
|
24
|
+
"icon-xs": "size-6 rounded-[6px] [--icon-stroke-width:var(--icon-stroke-14)] [&_svg:not([class*='size-'])]:size-[14px]",
|
|
25
|
+
"icon-sm": "size-7 rounded-[6px] [--icon-stroke-width:var(--icon-stroke-15)] [&_svg:not([class*='size-'])]:size-[15px]",
|
|
26
|
+
"icon-md": "size-8 rounded-[8px] [--icon-stroke-width:var(--icon-stroke-15)] [&_svg:not([class*='size-'])]:size-[15px]",
|
|
27
|
+
"icon-lg": "size-9 rounded-[8px] [--icon-stroke-width:var(--icon-stroke-18)] [&_svg:not([class*='size-'])]:size-[18px]",
|
|
28
|
+
"icon-xl": "size-12 rounded-[10px] [--icon-stroke-width:var(--icon-stroke-24)] [&_svg:not([class*='size-'])]:size-6"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "primary",
|
|
33
|
+
size: "md"
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
function h({ className: e, ...n }) {
|
|
37
|
+
return /* @__PURE__ */ a("span", {
|
|
38
|
+
"data-slot": "button-label",
|
|
39
|
+
className: t("inline-flex min-w-0 items-center justify-center pb-px", e),
|
|
40
|
+
...n
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function g(e) {
|
|
44
|
+
if (typeof e == "string") {
|
|
45
|
+
let t = e.trim();
|
|
46
|
+
return t ? /* @__PURE__ */ a(h, { children: t }) : null;
|
|
47
|
+
}
|
|
48
|
+
return typeof e == "number" ? /* @__PURE__ */ a(h, { children: e }) : e;
|
|
49
|
+
}
|
|
50
|
+
function _({ className: e, variant: i = "primary", size: o = "md", children: s, ...c }) {
|
|
51
|
+
let l = m({
|
|
52
|
+
variant: i,
|
|
53
|
+
size: o
|
|
54
|
+
});
|
|
55
|
+
return /* @__PURE__ */ a(r, {
|
|
56
|
+
"data-slot": "button",
|
|
57
|
+
"data-variant": i,
|
|
58
|
+
"data-size": o,
|
|
59
|
+
className: typeof e == "function" ? (n) => t(l, e(n)) : t(l, e),
|
|
60
|
+
...c,
|
|
61
|
+
children: n.Children.map(s, g)
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { _ as Button, h as ButtonLabel, m as buttonVariants };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Button, buttonVariants, type ButtonProps } from './button';
|
|
1
|
+
export { Button, ButtonLabel, buttonVariants, type ButtonProps } from './button';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { mergeProps as i } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender as a } from "@base-ui/react/use-render";
|
|
7
|
+
//#region src/components/button-group/button-group.tsx
|
|
8
|
+
var o = n("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
9
|
+
variants: { orientation: {
|
|
10
|
+
horizontal: "[&>[data-slot]:has(~[data-slot])]:rounded-r-none [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
|
|
11
|
+
vertical: "flex-col [&>[data-slot]:has(~[data-slot])]:rounded-b-none [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { orientation: "horizontal" }
|
|
14
|
+
});
|
|
15
|
+
function s({ className: t, orientation: n, ...i }) {
|
|
16
|
+
return /* @__PURE__ */ r("div", {
|
|
17
|
+
role: "group",
|
|
18
|
+
"data-slot": "button-group",
|
|
19
|
+
"data-orientation": n,
|
|
20
|
+
className: e(o({ orientation: n }), t),
|
|
21
|
+
...i
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function c({ className: t, render: n, ...r }) {
|
|
25
|
+
return a({
|
|
26
|
+
defaultTagName: "div",
|
|
27
|
+
props: i({ className: e("type-label flex items-center gap-2 rounded-lg border bg-muted px-2.5 font-medium [--icon-stroke-width:var(--icon-stroke-16)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", t) }, r),
|
|
28
|
+
render: n,
|
|
29
|
+
state: { slot: "button-group-text" }
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function l({ className: n, orientation: i = "vertical", ...a }) {
|
|
33
|
+
return /* @__PURE__ */ r(t, {
|
|
34
|
+
"data-slot": "button-group-separator",
|
|
35
|
+
orientation: i,
|
|
36
|
+
className: e("relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto", n),
|
|
37
|
+
...a
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { s as ButtonGroup, l as ButtonGroupSeparator, c as ButtonGroupText, o as buttonGroupVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,SAAS,EAET,KAAK,SAAS,EACd,KAAK,MAAM,EACZ,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,MAAM,EAAkB,MAAM,qBAAqB,CAAA;AAO5D,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,aAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/calendar/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,SAAS,EAET,KAAK,SAAS,EACd,KAAK,MAAM,EACZ,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,MAAM,EAAkB,MAAM,qBAAqB,CAAA;AAO5D,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,aAAuB,EACvB,aAA0B,EAC1B,MAAM,EACN,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAC1C,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;CAC/D,qBA6JA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,EACH,SAAS,EACT,MAAM,EACN,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,qBA8BvE;AAED,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Button as t, buttonVariants as n } from "../button/button.js";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { IconChevronDown as a, IconChevronLeft as o, IconChevronRight as s } from "@tabler/icons-react";
|
|
7
|
+
import { DayPicker as c, getDefaultClassNames as l } from "react-day-picker";
|
|
8
|
+
//#region src/components/calendar/calendar.tsx
|
|
9
|
+
function u({ className: t, classNames: r, showOutsideDays: u = !0, captionLayout: f = "label", buttonVariant: p = "tertiary", locale: m, formatters: h, components: g, ..._ }) {
|
|
10
|
+
let v = l();
|
|
11
|
+
return /* @__PURE__ */ i(c, {
|
|
12
|
+
showOutsideDays: u,
|
|
13
|
+
className: e("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, t),
|
|
14
|
+
captionLayout: f,
|
|
15
|
+
locale: m,
|
|
16
|
+
formatters: {
|
|
17
|
+
formatMonthDropdown: (e) => e.toLocaleString(m?.code, { month: "short" }),
|
|
18
|
+
...h
|
|
19
|
+
},
|
|
20
|
+
classNames: {
|
|
21
|
+
root: e("w-fit", v.root),
|
|
22
|
+
months: e("relative flex flex-col gap-4 md:flex-row", v.months),
|
|
23
|
+
month: e("flex w-full flex-col gap-4", v.month),
|
|
24
|
+
nav: e("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", v.nav),
|
|
25
|
+
button_previous: e(n({ variant: p }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", v.button_previous),
|
|
26
|
+
button_next: e(n({ variant: p }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", v.button_next),
|
|
27
|
+
month_caption: e("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", v.month_caption),
|
|
28
|
+
dropdowns: e("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", v.dropdowns),
|
|
29
|
+
dropdown_root: e("relative rounded-(--cell-radius)", v.dropdown_root),
|
|
30
|
+
dropdown: e("absolute inset-0 bg-popover opacity-0", v.dropdown),
|
|
31
|
+
caption_label: e("font-medium select-none", f === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [--icon-stroke-width:var(--icon-stroke-14)] [&>svg]:size-3.5 [&>svg]:text-muted-foreground", v.caption_label),
|
|
32
|
+
month_grid: e("w-full border-collapse", v.month_grid),
|
|
33
|
+
weekdays: e("flex", v.weekdays),
|
|
34
|
+
weekday: e("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", v.weekday),
|
|
35
|
+
week: e("mt-2 flex w-full", v.week),
|
|
36
|
+
week_number_header: e("w-(--cell-size) select-none", v.week_number_header),
|
|
37
|
+
week_number: e("text-[0.8rem] text-muted-foreground select-none", v.week_number),
|
|
38
|
+
day: e("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", _.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", v.day),
|
|
39
|
+
range_start: e("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", v.range_start),
|
|
40
|
+
range_middle: e("rounded-none", v.range_middle),
|
|
41
|
+
range_end: e("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", v.range_end),
|
|
42
|
+
today: e("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", v.today),
|
|
43
|
+
outside: e("text-muted-foreground aria-selected:text-muted-foreground", v.outside),
|
|
44
|
+
disabled: e("text-muted-foreground opacity-50", v.disabled),
|
|
45
|
+
hidden: e("invisible", v.hidden),
|
|
46
|
+
...r
|
|
47
|
+
},
|
|
48
|
+
components: {
|
|
49
|
+
Root: ({ className: t, rootRef: n, ...r }) => /* @__PURE__ */ i("div", {
|
|
50
|
+
"data-slot": "calendar",
|
|
51
|
+
ref: n,
|
|
52
|
+
className: e(t),
|
|
53
|
+
...r
|
|
54
|
+
}),
|
|
55
|
+
Chevron: ({ className: t, orientation: n, ...r }) => i(n === "left" ? o : n === "right" ? s : a, {
|
|
56
|
+
className: e("size-4", t),
|
|
57
|
+
...r
|
|
58
|
+
}),
|
|
59
|
+
DayButton: ({ ...e }) => /* @__PURE__ */ i(d, {
|
|
60
|
+
locale: m,
|
|
61
|
+
...e
|
|
62
|
+
}),
|
|
63
|
+
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ i("th", {
|
|
64
|
+
...t,
|
|
65
|
+
children: /* @__PURE__ */ i("div", {
|
|
66
|
+
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
67
|
+
children: e
|
|
68
|
+
})
|
|
69
|
+
}),
|
|
70
|
+
...g
|
|
71
|
+
},
|
|
72
|
+
..._
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function d({ className: n, day: a, modifiers: o, locale: s, ...c }) {
|
|
76
|
+
let u = l(), d = r.useRef(null);
|
|
77
|
+
return r.useEffect(() => {
|
|
78
|
+
o.focused && d.current?.focus();
|
|
79
|
+
}, [o.focused]), /* @__PURE__ */ i(t, {
|
|
80
|
+
variant: "tertiary",
|
|
81
|
+
size: "icon-md",
|
|
82
|
+
"data-day": a.date.toLocaleDateString(s?.code),
|
|
83
|
+
"data-selected-single": o.selected && !o.range_start && !o.range_end && !o.range_middle,
|
|
84
|
+
"data-range-start": o.range_start,
|
|
85
|
+
"data-range-end": o.range_end,
|
|
86
|
+
"data-range-middle": o.range_middle,
|
|
87
|
+
className: e("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", u.day, n),
|
|
88
|
+
...c
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
export { u as Calendar, d as CalendarDayButton };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/card/card.tsx
|
|
5
|
+
function n({ className: n, size: r = "default", ...i }) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
"data-slot": "card",
|
|
8
|
+
"data-size": r,
|
|
9
|
+
className: e("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl border border-border bg-card py-(--card-spacing) text-sm text-card-foreground [--card-spacing:--spacing(5)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", n),
|
|
10
|
+
...i
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function r({ className: n, ...r }) {
|
|
14
|
+
return /* @__PURE__ */ t("div", {
|
|
15
|
+
"data-slot": "card-header",
|
|
16
|
+
className: e("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", n),
|
|
17
|
+
...r
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function i({ className: n, ...r }) {
|
|
21
|
+
return /* @__PURE__ */ t("div", {
|
|
22
|
+
"data-slot": "card-title",
|
|
23
|
+
className: e("type-content font-heading font-medium group-data-[size=sm]/card:text-sm", n),
|
|
24
|
+
...r
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function a({ className: n, ...r }) {
|
|
28
|
+
return /* @__PURE__ */ t("div", {
|
|
29
|
+
"data-slot": "card-description",
|
|
30
|
+
className: e("text-sm text-muted-foreground", n),
|
|
31
|
+
...r
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function o({ className: n, ...r }) {
|
|
35
|
+
return /* @__PURE__ */ t("div", {
|
|
36
|
+
"data-slot": "card-action",
|
|
37
|
+
className: e("col-start-2 row-span-2 row-start-1 self-start justify-self-end", n),
|
|
38
|
+
...r
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function s({ className: n, ...r }) {
|
|
42
|
+
return /* @__PURE__ */ t("div", {
|
|
43
|
+
"data-slot": "card-content",
|
|
44
|
+
className: e("px-(--card-spacing)", n),
|
|
45
|
+
...r
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function c({ className: n, ...r }) {
|
|
49
|
+
return /* @__PURE__ */ t("div", {
|
|
50
|
+
"data-slot": "card-footer",
|
|
51
|
+
className: e("flex items-center rounded-b-xl border-t border-border bg-surface-subtle p-(--card-spacing)", n),
|
|
52
|
+
...r
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { n as Card, o as CardAction, s as CardContent, a as CardDescription, c as CardFooter, r as CardHeader, i as CardTitle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../src/components/carousel/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,gBAAgB,EAAE,EACvB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAG5C,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;AAC1C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAChE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAC/C,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAA;CACpC,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,WAAW,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;IACnD,GAAG,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3C,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,aAAa,EAAE,OAAO,CAAA;IACtB,aAAa,EAAE,OAAO,CAAA;CACvB,GAAG,aAAa,CAAA;AAIjB,iBAAS,WAAW,yBAQnB;AAED,iBAAS,QAAQ,CAAC,EAChB,WAA0B,EAC1B,IAAI,EACJ,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,aAAa,qBAiF7C;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAmB5E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAgBzE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../src/components/carousel/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,gBAAgB,EAAE,EACvB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAG5C,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;AAC1C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAChE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAC/C,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAA;CACpC,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,WAAW,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;IACnD,GAAG,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3C,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,aAAa,EAAE,OAAO,CAAA;IACtB,aAAa,EAAE,OAAO,CAAA;CACvB,GAAG,aAAa,CAAA;AAIjB,iBAAS,WAAW,yBAQnB;AAED,iBAAS,QAAQ,CAAC,EAChB,WAA0B,EAC1B,IAAI,EACJ,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,aAAa,qBAiF7C;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAmB5E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAgBzE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,OAAqB,EACrB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,qBAuBrC;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,OAAqB,EACrB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,qBAuBrC;AAED,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,CAAA"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { IconChevronLeft as a, IconChevronRight as o } from "@tabler/icons-react";
|
|
6
|
+
import s from "embla-carousel-react";
|
|
7
|
+
//#region src/components/carousel/carousel.tsx
|
|
8
|
+
var c = n.createContext(null);
|
|
9
|
+
function l() {
|
|
10
|
+
let e = n.useContext(c);
|
|
11
|
+
if (!e) throw Error("useCarousel must be used within a <Carousel />");
|
|
12
|
+
return e;
|
|
13
|
+
}
|
|
14
|
+
function u({ orientation: t = "horizontal", opts: i, setApi: a, plugins: o, className: l, children: u, ...d }) {
|
|
15
|
+
let [f, p] = s({
|
|
16
|
+
...i,
|
|
17
|
+
axis: t === "horizontal" ? "x" : "y"
|
|
18
|
+
}, o), [m, h] = n.useState(!1), [g, _] = n.useState(!1), v = n.useCallback((e) => {
|
|
19
|
+
e && (h(e.canScrollPrev()), _(e.canScrollNext()));
|
|
20
|
+
}, []), y = n.useCallback(() => {
|
|
21
|
+
p?.scrollPrev();
|
|
22
|
+
}, [p]), b = n.useCallback(() => {
|
|
23
|
+
p?.scrollNext();
|
|
24
|
+
}, [p]), x = n.useCallback((e) => {
|
|
25
|
+
e.key === "ArrowLeft" ? (e.preventDefault(), y()) : e.key === "ArrowRight" && (e.preventDefault(), b());
|
|
26
|
+
}, [y, b]);
|
|
27
|
+
return n.useEffect(() => {
|
|
28
|
+
!p || !a || a(p);
|
|
29
|
+
}, [p, a]), n.useEffect(() => {
|
|
30
|
+
if (p) return v(p), p.on("reInit", v), p.on("select", v), () => {
|
|
31
|
+
p?.off("reInit", v), p?.off("select", v);
|
|
32
|
+
};
|
|
33
|
+
}, [p, v]), /* @__PURE__ */ r(c.Provider, {
|
|
34
|
+
value: {
|
|
35
|
+
carouselRef: f,
|
|
36
|
+
api: p,
|
|
37
|
+
opts: i,
|
|
38
|
+
orientation: t || (i?.axis === "y" ? "vertical" : "horizontal"),
|
|
39
|
+
scrollPrev: y,
|
|
40
|
+
scrollNext: b,
|
|
41
|
+
canScrollPrev: m,
|
|
42
|
+
canScrollNext: g
|
|
43
|
+
},
|
|
44
|
+
children: /* @__PURE__ */ r("div", {
|
|
45
|
+
onKeyDownCapture: x,
|
|
46
|
+
className: e("relative", l),
|
|
47
|
+
role: "region",
|
|
48
|
+
"aria-roledescription": "carousel",
|
|
49
|
+
"data-slot": "carousel",
|
|
50
|
+
...d,
|
|
51
|
+
children: u
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function d({ className: t, ...n }) {
|
|
56
|
+
let { carouselRef: i, orientation: a } = l();
|
|
57
|
+
return /* @__PURE__ */ r("div", {
|
|
58
|
+
ref: i,
|
|
59
|
+
className: "overflow-hidden",
|
|
60
|
+
"data-slot": "carousel-content",
|
|
61
|
+
children: /* @__PURE__ */ r("div", {
|
|
62
|
+
className: e("flex", a === "horizontal" ? "-ml-4" : "-mt-4 flex-col", t),
|
|
63
|
+
...n
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function f({ className: t, ...n }) {
|
|
68
|
+
let { orientation: i } = l();
|
|
69
|
+
return /* @__PURE__ */ r("div", {
|
|
70
|
+
role: "group",
|
|
71
|
+
"aria-roledescription": "slide",
|
|
72
|
+
"data-slot": "carousel-item",
|
|
73
|
+
className: e("min-w-0 shrink-0 grow-0 basis-full", i === "horizontal" ? "pl-4" : "pt-4", t),
|
|
74
|
+
...n
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function p({ className: n, variant: o = "secondary", size: s = "icon-sm", ...c }) {
|
|
78
|
+
let { orientation: u, scrollPrev: d, canScrollPrev: f } = l();
|
|
79
|
+
return /* @__PURE__ */ i(t, {
|
|
80
|
+
"data-slot": "carousel-previous",
|
|
81
|
+
variant: o,
|
|
82
|
+
size: s,
|
|
83
|
+
className: e("absolute touch-manipulation rounded-full", u === "horizontal" ? "inset-y-0 -left-12 my-auto" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", n),
|
|
84
|
+
disabled: !f,
|
|
85
|
+
onClick: d,
|
|
86
|
+
...c,
|
|
87
|
+
children: [/* @__PURE__ */ r(a, {}), /* @__PURE__ */ r("span", {
|
|
88
|
+
className: "sr-only",
|
|
89
|
+
children: "Previous slide"
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function m({ className: n, variant: a = "secondary", size: s = "icon-sm", ...c }) {
|
|
94
|
+
let { orientation: u, scrollNext: d, canScrollNext: f } = l();
|
|
95
|
+
return /* @__PURE__ */ i(t, {
|
|
96
|
+
"data-slot": "carousel-next",
|
|
97
|
+
variant: a,
|
|
98
|
+
size: s,
|
|
99
|
+
className: e("absolute touch-manipulation rounded-full", u === "horizontal" ? "inset-y-0 -right-12 my-auto" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", n),
|
|
100
|
+
disabled: !f,
|
|
101
|
+
onClick: d,
|
|
102
|
+
...c,
|
|
103
|
+
children: [/* @__PURE__ */ r(o, {}), /* @__PURE__ */ r("span", {
|
|
104
|
+
className: "sr-only",
|
|
105
|
+
children: "Next slide"
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
export { u as Carousel, d as CarouselContent, f as CarouselItem, m as CarouselNext, p as CarouselPrevious, l as useCarousel };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import * as a from "recharts";
|
|
6
|
+
//#region src/components/chart/chart.tsx
|
|
7
|
+
var o = {
|
|
8
|
+
light: "",
|
|
9
|
+
dark: ".dark"
|
|
10
|
+
}, s = {
|
|
11
|
+
width: 320,
|
|
12
|
+
height: 200
|
|
13
|
+
}, c = t.createContext(null);
|
|
14
|
+
function l() {
|
|
15
|
+
let e = t.useContext(c);
|
|
16
|
+
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
17
|
+
return e;
|
|
18
|
+
}
|
|
19
|
+
function u({ id: n, className: o, children: l, config: u, initialDimension: f = s, ...p }) {
|
|
20
|
+
let m = t.useId(), h = `chart-${n ?? m.replace(/:/g, "")}`;
|
|
21
|
+
return /* @__PURE__ */ r(c.Provider, {
|
|
22
|
+
value: { config: u },
|
|
23
|
+
children: /* @__PURE__ */ i("div", {
|
|
24
|
+
"data-slot": "chart",
|
|
25
|
+
"data-chart": h,
|
|
26
|
+
className: e("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", o),
|
|
27
|
+
...p,
|
|
28
|
+
children: [/* @__PURE__ */ r(d, {
|
|
29
|
+
id: h,
|
|
30
|
+
config: u
|
|
31
|
+
}), /* @__PURE__ */ r(a.ResponsiveContainer, {
|
|
32
|
+
initialDimension: f,
|
|
33
|
+
children: l
|
|
34
|
+
})]
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
var d = ({ id: e, config: t }) => {
|
|
39
|
+
let n = Object.entries(t).filter(([, e]) => e.theme ?? e.color);
|
|
40
|
+
return n.length ? /* @__PURE__ */ r("style", { dangerouslySetInnerHTML: { __html: Object.entries(o).map(([t, r]) => `
|
|
41
|
+
${r} [data-chart=${e}] {
|
|
42
|
+
${n.map(([e, n]) => {
|
|
43
|
+
let r = n.theme?.[t] ?? n.color;
|
|
44
|
+
return r ? ` --color-${e}: ${r};` : null;
|
|
45
|
+
}).join("\n")}
|
|
46
|
+
}
|
|
47
|
+
`).join("\n") } }) : null;
|
|
48
|
+
}, f = a.Tooltip;
|
|
49
|
+
function p({ active: a, payload: o, className: s, indicator: c = "dot", hideLabel: u = !1, hideIndicator: d = !1, label: f, labelFormatter: p, labelClassName: m, formatter: h, color: _, nameKey: v, labelKey: y }) {
|
|
50
|
+
let { config: b } = l(), x = t.useMemo(() => {
|
|
51
|
+
if (u || !o?.length) return null;
|
|
52
|
+
let [t] = o, n = `${y ?? t?.dataKey ?? t?.name ?? "value"}`, i = g(b, t, n), a = !y && typeof f == "string" ? b[f]?.label ?? f : i?.label;
|
|
53
|
+
return p ? /* @__PURE__ */ r("div", {
|
|
54
|
+
className: e("font-medium", m),
|
|
55
|
+
children: p(a, o)
|
|
56
|
+
}) : a ? /* @__PURE__ */ r("div", {
|
|
57
|
+
className: e("font-medium", m),
|
|
58
|
+
children: a
|
|
59
|
+
}) : null;
|
|
60
|
+
}, [
|
|
61
|
+
f,
|
|
62
|
+
p,
|
|
63
|
+
o,
|
|
64
|
+
u,
|
|
65
|
+
m,
|
|
66
|
+
b,
|
|
67
|
+
y
|
|
68
|
+
]);
|
|
69
|
+
if (!a || !o?.length) return null;
|
|
70
|
+
let S = o.length === 1 && c !== "dot";
|
|
71
|
+
return /* @__PURE__ */ i("div", {
|
|
72
|
+
className: e("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", s),
|
|
73
|
+
children: [S ? null : x, /* @__PURE__ */ r("div", {
|
|
74
|
+
className: "grid gap-1.5",
|
|
75
|
+
children: o.filter((e) => e.type !== "none").map((t, a) => {
|
|
76
|
+
let o = `${v ?? t.name ?? t.dataKey ?? "value"}`, s = g(b, t, o), l = _ ?? t.payload?.fill ?? t.color;
|
|
77
|
+
return /* @__PURE__ */ r("div", {
|
|
78
|
+
className: e("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", c === "dot" && "items-center"),
|
|
79
|
+
children: h && t?.value !== void 0 && t.name ? h(t.value, t.name, t, a, t.payload) : /* @__PURE__ */ i(n, { children: [s?.icon ? /* @__PURE__ */ r(s.icon, {}) : !d && /* @__PURE__ */ r("div", {
|
|
80
|
+
className: e("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
81
|
+
"h-2.5 w-2.5": c === "dot",
|
|
82
|
+
"w-1": c === "line",
|
|
83
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": c === "dashed",
|
|
84
|
+
"my-0.5": S && c === "dashed"
|
|
85
|
+
}),
|
|
86
|
+
style: {
|
|
87
|
+
"--color-bg": l,
|
|
88
|
+
"--color-border": l
|
|
89
|
+
}
|
|
90
|
+
}), /* @__PURE__ */ i("div", {
|
|
91
|
+
className: e("flex flex-1 justify-between leading-none", S ? "items-end" : "items-center"),
|
|
92
|
+
children: [/* @__PURE__ */ i("div", {
|
|
93
|
+
className: "grid gap-1.5",
|
|
94
|
+
children: [S ? x : null, /* @__PURE__ */ r("span", {
|
|
95
|
+
className: "text-muted-foreground",
|
|
96
|
+
children: s?.label ?? t.name
|
|
97
|
+
})]
|
|
98
|
+
}), t.value != null && /* @__PURE__ */ r("span", {
|
|
99
|
+
className: "font-mono font-medium text-foreground tabular-nums",
|
|
100
|
+
children: typeof t.value == "number" ? t.value.toLocaleString() : String(t.value)
|
|
101
|
+
})]
|
|
102
|
+
})] })
|
|
103
|
+
}, a);
|
|
104
|
+
})
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
var m = a.Legend;
|
|
109
|
+
function h({ className: t, hideIcon: n = !1, payload: a, verticalAlign: o = "bottom", nameKey: s }) {
|
|
110
|
+
let { config: c } = l();
|
|
111
|
+
return a?.length ? /* @__PURE__ */ r("div", {
|
|
112
|
+
className: e("flex items-center justify-center gap-4", o === "top" ? "pb-3" : "pt-3", t),
|
|
113
|
+
children: a.filter((e) => e.type !== "none").map((t, a) => {
|
|
114
|
+
let o = `${s ?? t.dataKey ?? "value"}`, l = g(c, t, o);
|
|
115
|
+
return /* @__PURE__ */ i("div", {
|
|
116
|
+
className: e("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
117
|
+
children: [l?.icon && !n ? /* @__PURE__ */ r(l.icon, {}) : /* @__PURE__ */ r("div", {
|
|
118
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
119
|
+
style: { backgroundColor: t.color }
|
|
120
|
+
}), l?.label]
|
|
121
|
+
}, a);
|
|
122
|
+
})
|
|
123
|
+
}) : null;
|
|
124
|
+
}
|
|
125
|
+
function g(e, t, n) {
|
|
126
|
+
if (typeof t != "object" || !t) return;
|
|
127
|
+
let r = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, i = n;
|
|
128
|
+
return n in t && typeof t[n] == "string" ? i = t[n] : r && n in r && typeof r[n] == "string" && (i = r[n]), i in e ? e[i] : e[n];
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
export { u as ChartContainer, m as ChartLegend, h as ChartLegendContent, d as ChartStyle, f as ChartTooltip, p as ChartTooltipContent };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { IconCheck as n } from "@tabler/icons-react";
|
|
5
|
+
import { Checkbox as r } from "@base-ui/react/checkbox";
|
|
6
|
+
//#region src/components/checkbox/checkbox.tsx
|
|
7
|
+
function i({ className: i, ...a }) {
|
|
8
|
+
return /* @__PURE__ */ t(r.Root, {
|
|
9
|
+
"data-slot": "checkbox",
|
|
10
|
+
className: e("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary", i),
|
|
11
|
+
...a,
|
|
12
|
+
children: /* @__PURE__ */ t(r.Indicator, {
|
|
13
|
+
"data-slot": "checkbox-indicator",
|
|
14
|
+
className: "grid place-content-center text-current transition-none [--icon-stroke-width:var(--icon-stroke-14)] [&>svg]:size-3.5",
|
|
15
|
+
children: /* @__PURE__ */ t(n, {})
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as Checkbox };
|