@bzync/rui 0.0.3
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/LICENSE +15 -0
- package/README.md +115 -0
- package/dist/autocomplete-CaysJRpk.cjs +1 -0
- package/dist/autocomplete-CfbfpcO4.js +453 -0
- package/dist/calendar-Bnld4G59.cjs +1 -0
- package/dist/calendar-CdICOROs.js +573 -0
- package/dist/charts-CxEy2c3M.js +1248 -0
- package/dist/charts-UDqS1BH1.cjs +1 -0
- package/dist/cn-BdjraxxU.cjs +1 -0
- package/dist/cn-DpgY2leY.js +1736 -0
- package/dist/component-styles-Ce56hn9T.js +16 -0
- package/dist/component-styles-TkZ7v6Ef.cjs +1 -0
- package/dist/components/accordion.cjs +1 -0
- package/dist/components/accordion.d.ts +22 -0
- package/dist/components/accordion.js +122 -0
- package/dist/components/alert.cjs +1 -0
- package/dist/components/alert.d.ts +13 -0
- package/dist/components/alert.js +165 -0
- package/dist/components/auth-backdrop.cjs +1 -0
- package/dist/components/auth-backdrop.d.ts +7 -0
- package/dist/components/auth-backdrop.js +10 -0
- package/dist/components/autocomplete/dropdown.d.ts +21 -0
- package/dist/components/autocomplete/icons.d.ts +8 -0
- package/dist/components/autocomplete/multi-trigger.d.ts +25 -0
- package/dist/components/autocomplete/single-trigger.d.ts +21 -0
- package/dist/components/autocomplete/types.d.ts +34 -0
- package/dist/components/autocomplete.cjs +1 -0
- package/dist/components/autocomplete.d.ts +5 -0
- package/dist/components/autocomplete.js +3 -0
- package/dist/components/avatar.cjs +1 -0
- package/dist/components/avatar.d.ts +17 -0
- package/dist/components/avatar.js +56 -0
- package/dist/components/badge.cjs +1 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +32 -0
- package/dist/components/billing-interval-toggle.cjs +1 -0
- package/dist/components/billing-interval-toggle.d.ts +18 -0
- package/dist/components/billing-interval-toggle.js +39 -0
- package/dist/components/breadcrumb.cjs +1 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.js +52 -0
- package/dist/components/button.cjs +1 -0
- package/dist/components/button.d.ts +17 -0
- package/dist/components/button.js +90 -0
- package/dist/components/calendar/month-view.d.ts +17 -0
- package/dist/components/calendar/types.d.ts +54 -0
- package/dist/components/calendar/week-view.d.ts +17 -0
- package/dist/components/calendar.cjs +1 -0
- package/dist/components/calendar.d.ts +3 -0
- package/dist/components/calendar.js +3 -0
- package/dist/components/callout.cjs +1 -0
- package/dist/components/callout.d.ts +9 -0
- package/dist/components/callout.js +131 -0
- package/dist/components/card.cjs +1 -0
- package/dist/components/card.d.ts +17 -0
- package/dist/components/card.js +59 -0
- package/dist/components/charts/bar-chart.d.ts +16 -0
- package/dist/components/charts/donut-chart.d.ts +10 -0
- package/dist/components/charts/funnel-chart.d.ts +8 -0
- package/dist/components/charts/gantt-chart.d.ts +15 -0
- package/dist/components/charts/heatmap-chart.d.ts +10 -0
- package/dist/components/charts/index.d.ts +11 -0
- package/dist/components/charts/line-chart.d.ts +16 -0
- package/dist/components/charts/multi-line-chart.d.ts +18 -0
- package/dist/components/charts/radar-chart.d.ts +13 -0
- package/dist/components/charts/scatter-chart.d.ts +24 -0
- package/dist/components/charts/shared.d.ts +15 -0
- package/dist/components/charts/waterfall-chart.d.ts +14 -0
- package/dist/components/charts.cjs +1 -0
- package/dist/components/charts.d.ts +2 -0
- package/dist/components/charts.js +2 -0
- package/dist/components/checkbox.cjs +1 -0
- package/dist/components/checkbox.d.ts +9 -0
- package/dist/components/checkbox.js +135 -0
- package/dist/components/code.cjs +7 -0
- package/dist/components/code.d.ts +23 -0
- package/dist/components/code.js +276 -0
- package/dist/components/command.cjs +1 -0
- package/dist/components/command.d.ts +29 -0
- package/dist/components/command.js +208 -0
- package/dist/components/confirm-dialog.cjs +1 -0
- package/dist/components/confirm-dialog.d.ts +14 -0
- package/dist/components/confirm-dialog.js +69 -0
- package/dist/components/copy-button.cjs +1 -0
- package/dist/components/copy-button.d.ts +8 -0
- package/dist/components/copy-button.js +87 -0
- package/dist/components/datatable/pagination-footer.d.ts +10 -0
- package/dist/components/datatable/rows-dropdown.d.ts +5 -0
- package/dist/components/datatable/skeleton-row.d.ts +3 -0
- package/dist/components/datatable/sort-icon.d.ts +4 -0
- package/dist/components/datatable/types.d.ts +30 -0
- package/dist/components/datatable.cjs +1 -0
- package/dist/components/datatable.d.ts +9 -0
- package/dist/components/datatable.js +3 -0
- package/dist/components/datepicker.cjs +1 -0
- package/dist/components/datepicker.d.ts +14 -0
- package/dist/components/datepicker.js +267 -0
- package/dist/components/drawer.cjs +1 -0
- package/dist/components/drawer.d.ts +18 -0
- package/dist/components/drawer.js +3 -0
- package/dist/components/dropdown-menu.cjs +1 -0
- package/dist/components/dropdown-menu.d.ts +26 -0
- package/dist/components/dropdown-menu.js +122 -0
- package/dist/components/empty-state.cjs +1 -0
- package/dist/components/empty-state.d.ts +10 -0
- package/dist/components/empty-state.js +68 -0
- package/dist/components/error-state.cjs +1 -0
- package/dist/components/error-state.d.ts +10 -0
- package/dist/components/error-state.js +80 -0
- package/dist/components/file-upload.cjs +1 -0
- package/dist/components/file-upload.d.ts +10 -0
- package/dist/components/file-upload.js +173 -0
- package/dist/components/form-field.cjs +1 -0
- package/dist/components/form-field.d.ts +10 -0
- package/dist/components/form-field.js +36 -0
- package/dist/components/info-button.cjs +1 -0
- package/dist/components/info-button.d.ts +4 -0
- package/dist/components/info-button.js +32 -0
- package/dist/components/input.cjs +1 -0
- package/dist/components/input.d.ts +19 -0
- package/dist/components/input.js +117 -0
- package/dist/components/kbd.cjs +1 -0
- package/dist/components/kbd.d.ts +6 -0
- package/dist/components/kbd.js +16 -0
- package/dist/components/label.cjs +1 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.js +31 -0
- package/dist/components/layout.cjs +1 -0
- package/dist/components/layout.d.ts +51 -0
- package/dist/components/layout.js +117 -0
- package/dist/components/link.cjs +1 -0
- package/dist/components/link.d.ts +9 -0
- package/dist/components/link.js +48 -0
- package/dist/components/list.cjs +1 -0
- package/dist/components/list.d.ts +13 -0
- package/dist/components/list.js +46 -0
- package/dist/components/modal.cjs +1 -0
- package/dist/components/modal.d.ts +31 -0
- package/dist/components/modal.js +219 -0
- package/dist/components/navigation.cjs +1 -0
- package/dist/components/navigation.d.ts +42 -0
- package/dist/components/navigation.js +127 -0
- package/dist/components/number-input.cjs +1 -0
- package/dist/components/number-input.d.ts +16 -0
- package/dist/components/number-input.js +142 -0
- package/dist/components/otp-input.cjs +1 -0
- package/dist/components/otp-input.d.ts +13 -0
- package/dist/components/otp-input.js +71 -0
- package/dist/components/pagination.cjs +1 -0
- package/dist/components/pagination.d.ts +8 -0
- package/dist/components/pagination.js +77 -0
- package/dist/components/popover.cjs +1 -0
- package/dist/components/popover.d.ts +16 -0
- package/dist/components/popover.js +115 -0
- package/dist/components/progressbar.cjs +1 -0
- package/dist/components/progressbar.d.ts +15 -0
- package/dist/components/progressbar.js +108 -0
- package/dist/components/radio.cjs +1 -0
- package/dist/components/radio.d.ts +22 -0
- package/dist/components/radio.js +96 -0
- package/dist/components/richtext.cjs +1 -0
- package/dist/components/richtext.d.ts +10 -0
- package/dist/components/richtext.js +370 -0
- package/dist/components/select/option-list.d.ts +16 -0
- package/dist/components/select/select-multi.d.ts +2 -0
- package/dist/components/select/select-single.d.ts +2 -0
- package/dist/components/select/types.d.ts +54 -0
- package/dist/components/select/utils.d.ts +10 -0
- package/dist/components/select.cjs +1 -0
- package/dist/components/select.d.ts +3 -0
- package/dist/components/select.js +2 -0
- package/dist/components/seo.cjs +1 -0
- package/dist/components/seo.d.ts +45 -0
- package/dist/components/seo.js +64 -0
- package/dist/components/separator.cjs +1 -0
- package/dist/components/separator.d.ts +6 -0
- package/dist/components/separator.js +25 -0
- package/dist/components/skeleton.cjs +1 -0
- package/dist/components/skeleton.d.ts +37 -0
- package/dist/components/skeleton.js +146 -0
- package/dist/components/slider.cjs +1 -0
- package/dist/components/slider.d.ts +12 -0
- package/dist/components/slider.js +72 -0
- package/dist/components/snackbar.cjs +1 -0
- package/dist/components/snackbar.d.ts +35 -0
- package/dist/components/snackbar.js +220 -0
- package/dist/components/spinner.cjs +1 -0
- package/dist/components/spinner.d.ts +7 -0
- package/dist/components/spinner.js +31 -0
- package/dist/components/stat.cjs +1 -0
- package/dist/components/stat.d.ts +18 -0
- package/dist/components/stat.js +90 -0
- package/dist/components/status-dot.cjs +1 -0
- package/dist/components/status-dot.d.ts +10 -0
- package/dist/components/status-dot.js +29 -0
- package/dist/components/stepper.cjs +1 -0
- package/dist/components/stepper.d.ts +11 -0
- package/dist/components/stepper.js +67 -0
- package/dist/components/switch.cjs +1 -0
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.js +79 -0
- package/dist/components/table.cjs +1 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/table.js +54 -0
- package/dist/components/tabs.cjs +1 -0
- package/dist/components/tabs.d.ts +22 -0
- package/dist/components/tabs.js +120 -0
- package/dist/components/tag.cjs +1 -0
- package/dist/components/tag.d.ts +12 -0
- package/dist/components/tag.js +58 -0
- package/dist/components/terminal/fs.d.ts +10 -0
- package/dist/components/terminal/shell-commands-sim.d.ts +5 -0
- package/dist/components/terminal/shell-commands.d.ts +16 -0
- package/dist/components/terminal/shell-run.d.ts +11 -0
- package/dist/components/terminal/terminal-block.d.ts +13 -0
- package/dist/components/terminal/terminal-emulator.d.ts +10 -0
- package/dist/components/terminal/types.d.ts +35 -0
- package/dist/components/terminal.cjs +1 -0
- package/dist/components/terminal.d.ts +2 -0
- package/dist/components/terminal.js +2 -0
- package/dist/components/textarea.cjs +1 -0
- package/dist/components/textarea.d.ts +13 -0
- package/dist/components/textarea.js +54 -0
- package/dist/components/theme-provider.cjs +1 -0
- package/dist/components/theme-provider.d.ts +89 -0
- package/dist/components/theme-provider.js +93 -0
- package/dist/components/theme-toggle.cjs +1 -0
- package/dist/components/theme-toggle.d.ts +9 -0
- package/dist/components/theme-toggle.js +4 -0
- package/dist/components/timeline.cjs +1 -0
- package/dist/components/timeline.d.ts +14 -0
- package/dist/components/timeline.js +54 -0
- package/dist/components/tooltip.cjs +1 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +84 -0
- package/dist/components/tree.cjs +1 -0
- package/dist/components/tree.d.ts +16 -0
- package/dist/components/tree.js +92 -0
- package/dist/createLucideIcon-DDY8HuQR.js +42 -0
- package/dist/createLucideIcon-b_X_3fj-.cjs +1 -0
- package/dist/datatable-BB3v__r5.cjs +1 -0
- package/dist/datatable-DlBhUhuO.js +316 -0
- package/dist/drawer-Cbuh6qdL.cjs +1 -0
- package/dist/drawer-CqkVZT9Y.js +189 -0
- package/dist/focus-Dk1YWVPN.js +42 -0
- package/dist/focus-DmG6Ge7X.cjs +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +215 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/component-styles.d.ts +10 -0
- package/dist/select-Ch5fp1GT.js +461 -0
- package/dist/select-q0YCMhBP.cjs +1 -0
- package/dist/styles.css +3 -0
- package/dist/terminal-BOR2cFi1.js +1060 -0
- package/dist/terminal-CpraMs50.cjs +77 -0
- package/dist/theme-toggle-CnoiorKV.js +71 -0
- package/dist/theme-toggle-Dp1-24zH.cjs +1 -0
- package/dist/use-event-callback-DGkfO_uu.js +10 -0
- package/dist/use-event-callback-Du9_9eAi.cjs +1 -0
- package/dist/utils-CQ8pvCtk.js +72 -0
- package/dist/utils-DOFJTw8o.cjs +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { t as e } from "../cn-DpgY2leY.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/spinner.tsx
|
|
4
|
+
var r = {
|
|
5
|
+
xs: "w-3 h-3",
|
|
6
|
+
sm: "w-4 h-4",
|
|
7
|
+
md: "w-5 h-5",
|
|
8
|
+
lg: "w-7 h-7"
|
|
9
|
+
};
|
|
10
|
+
function i({ size: i = "md", className: a }) {
|
|
11
|
+
return /* @__PURE__ */ n("svg", {
|
|
12
|
+
className: e("animate-spin text-accent-500 dark:text-accent-400", r[i], a),
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
fill: "none",
|
|
15
|
+
"aria-label": "Loading",
|
|
16
|
+
children: [/* @__PURE__ */ t("circle", {
|
|
17
|
+
className: "opacity-20",
|
|
18
|
+
cx: "12",
|
|
19
|
+
cy: "12",
|
|
20
|
+
r: "10",
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
strokeWidth: "3"
|
|
23
|
+
}), /* @__PURE__ */ t("path", {
|
|
24
|
+
className: "opacity-80",
|
|
25
|
+
fill: "currentColor",
|
|
26
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { i as Spinner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react/jsx-runtime");var n={up:{color:`text-emerald-400`,icon:(0,t.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,t.jsx)(`path`,{d:`m18 15-6-6-6 6`})})},down:{color:`text-red-400`,icon:(0,t.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,t.jsx)(`path`,{d:`m6 9 6 6 6-6`})})},neutral:{color:`text-slate-500`,icon:(0,t.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,t.jsx)(`path`,{d:`M5 12h14`})})}};function r({label:r,value:i,unit:a,valueClassName:o,trend:s,trendValue:c,icon:l,description:u,action:d,className:f,...p}){return(0,t.jsxs)(`div`,{className:e.t(`flex flex-col gap-1 rounded-xl border border-black/[0.08] dark:border-white/[0.08] bg-white dark:bg-navy-900 p-4 shadow-sm shadow-black/[0.04] dark:shadow-none`,f),...p,children:[(0,t.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,t.jsx)(`p`,{className:`text-[11px] font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-[0.07em]`,children:r}),(0,t.jsxs)(`span`,{className:`flex items-center gap-1.5 shrink-0`,children:[d,l&&(0,t.jsx)(`span`,{className:`text-slate-400 dark:text-slate-500`,children:l})]})]}),(0,t.jsxs)(`div`,{className:`flex items-baseline gap-1.5 mt-1.5`,children:[(0,t.jsx)(`span`,{className:e.t(`text-[26px] font-semibold tabular-nums text-slate-900 dark:text-white leading-none tracking-tight`,o),children:i}),a&&(0,t.jsx)(`span`,{className:`text-sm text-slate-500`,children:a})]}),(s||u)&&(0,t.jsxs)(`div`,{className:`flex items-center gap-1.5 mt-1`,children:[s&&c&&(0,t.jsxs)(`span`,{className:e.t(`flex items-center gap-0.5 text-xs font-medium`,n[s].color),children:[n[s].icon,c]}),u&&(0,t.jsx)(`span`,{className:`text-xs text-slate-500`,children:u})]})]})}exports.Stat=r;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type Trend = "up" | "down" | "neutral";
|
|
3
|
+
export interface StatProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
unit?: string;
|
|
7
|
+
valueClassName?: string;
|
|
8
|
+
trend?: Trend;
|
|
9
|
+
trendValue?: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Rendered next to the icon in the header row — e.g. a small toggle.
|
|
13
|
+
* Clicks inside it are not stopped from bubbling; wrap with
|
|
14
|
+
* `onClick={(e) => e.stopPropagation()}` if the Stat sits inside a link. */
|
|
15
|
+
action?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare function Stat({ label, value, unit, valueClassName, trend, trendValue, icon, description, action, className, ...props }: StatProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { t as e } from "../cn-DpgY2leY.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/stat.tsx
|
|
4
|
+
var r = {
|
|
5
|
+
up: {
|
|
6
|
+
color: "text-emerald-400",
|
|
7
|
+
icon: /* @__PURE__ */ t("svg", {
|
|
8
|
+
width: "12",
|
|
9
|
+
height: "12",
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
strokeWidth: "2.5",
|
|
14
|
+
strokeLinecap: "round",
|
|
15
|
+
strokeLinejoin: "round",
|
|
16
|
+
children: /* @__PURE__ */ t("path", { d: "m18 15-6-6-6 6" })
|
|
17
|
+
})
|
|
18
|
+
},
|
|
19
|
+
down: {
|
|
20
|
+
color: "text-red-400",
|
|
21
|
+
icon: /* @__PURE__ */ t("svg", {
|
|
22
|
+
width: "12",
|
|
23
|
+
height: "12",
|
|
24
|
+
viewBox: "0 0 24 24",
|
|
25
|
+
fill: "none",
|
|
26
|
+
stroke: "currentColor",
|
|
27
|
+
strokeWidth: "2.5",
|
|
28
|
+
strokeLinecap: "round",
|
|
29
|
+
strokeLinejoin: "round",
|
|
30
|
+
children: /* @__PURE__ */ t("path", { d: "m6 9 6 6 6-6" })
|
|
31
|
+
})
|
|
32
|
+
},
|
|
33
|
+
neutral: {
|
|
34
|
+
color: "text-slate-500",
|
|
35
|
+
icon: /* @__PURE__ */ t("svg", {
|
|
36
|
+
width: "12",
|
|
37
|
+
height: "12",
|
|
38
|
+
viewBox: "0 0 24 24",
|
|
39
|
+
fill: "none",
|
|
40
|
+
stroke: "currentColor",
|
|
41
|
+
strokeWidth: "2.5",
|
|
42
|
+
strokeLinecap: "round",
|
|
43
|
+
strokeLinejoin: "round",
|
|
44
|
+
children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
function i({ label: i, value: a, unit: o, valueClassName: s, trend: c, trendValue: l, icon: u, description: d, action: f, className: p, ...m }) {
|
|
49
|
+
return /* @__PURE__ */ n("div", {
|
|
50
|
+
className: e("flex flex-col gap-1 rounded-xl border border-black/[0.08] dark:border-white/[0.08] bg-white dark:bg-navy-900 p-4 shadow-sm shadow-black/[0.04] dark:shadow-none", p),
|
|
51
|
+
...m,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ n("div", {
|
|
54
|
+
className: "flex items-start justify-between gap-2",
|
|
55
|
+
children: [/* @__PURE__ */ t("p", {
|
|
56
|
+
className: "text-[11px] font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-[0.07em]",
|
|
57
|
+
children: i
|
|
58
|
+
}), /* @__PURE__ */ n("span", {
|
|
59
|
+
className: "flex items-center gap-1.5 shrink-0",
|
|
60
|
+
children: [f, u && /* @__PURE__ */ t("span", {
|
|
61
|
+
className: "text-slate-400 dark:text-slate-500",
|
|
62
|
+
children: u
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ n("div", {
|
|
67
|
+
className: "flex items-baseline gap-1.5 mt-1.5",
|
|
68
|
+
children: [/* @__PURE__ */ t("span", {
|
|
69
|
+
className: e("text-[26px] font-semibold tabular-nums text-slate-900 dark:text-white leading-none tracking-tight", s),
|
|
70
|
+
children: a
|
|
71
|
+
}), o && /* @__PURE__ */ t("span", {
|
|
72
|
+
className: "text-sm text-slate-500",
|
|
73
|
+
children: o
|
|
74
|
+
})]
|
|
75
|
+
}),
|
|
76
|
+
(c || d) && /* @__PURE__ */ n("div", {
|
|
77
|
+
className: "flex items-center gap-1.5 mt-1",
|
|
78
|
+
children: [c && l && /* @__PURE__ */ n("span", {
|
|
79
|
+
className: e("flex items-center gap-0.5 text-xs font-medium", r[c].color),
|
|
80
|
+
children: [r[c].icon, l]
|
|
81
|
+
}), d && /* @__PURE__ */ t("span", {
|
|
82
|
+
className: "text-xs text-slate-500",
|
|
83
|
+
children: d
|
|
84
|
+
})]
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { i as Stat };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react/jsx-runtime");var n={online:`bg-emerald-400`,offline:`bg-slate-500`,idle:`bg-amber-400`,busy:`bg-red-400`,error:`bg-red-500`,pending:`bg-sky-400`},r={sm:`w-1.5 h-1.5`,md:`w-2 h-2`,lg:`w-2.5 h-2.5`};function i({status:i,label:a,pulse:o=!1,size:s=`md`,className:c}){return(0,t.jsxs)(`span`,{className:e.t(`inline-flex items-center gap-1.5`,c),children:[(0,t.jsxs)(`span`,{className:`relative flex items-center justify-center`,children:[o&&(i===`online`||i===`pending`)&&(0,t.jsx)(`span`,{className:e.t(`absolute inline-flex rounded-full opacity-75 animate-ping`,n[i],r[s])}),(0,t.jsx)(`span`,{className:e.t(`relative inline-flex rounded-full`,n[i],r[s])})]}),a&&(0,t.jsx)(`span`,{className:`text-sm text-slate-600 dark:text-slate-300`,children:a})]})}exports.StatusDot=i;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Status = "online" | "offline" | "idle" | "busy" | "error" | "pending";
|
|
2
|
+
export interface StatusDotProps {
|
|
3
|
+
status: Status;
|
|
4
|
+
label?: string;
|
|
5
|
+
pulse?: boolean;
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function StatusDot({ status, label, pulse, size, className }: StatusDotProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { t as e } from "../cn-DpgY2leY.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/status-dot.tsx
|
|
4
|
+
var r = {
|
|
5
|
+
online: "bg-emerald-400",
|
|
6
|
+
offline: "bg-slate-500",
|
|
7
|
+
idle: "bg-amber-400",
|
|
8
|
+
busy: "bg-red-400",
|
|
9
|
+
error: "bg-red-500",
|
|
10
|
+
pending: "bg-sky-400"
|
|
11
|
+
}, i = {
|
|
12
|
+
sm: "w-1.5 h-1.5",
|
|
13
|
+
md: "w-2 h-2",
|
|
14
|
+
lg: "w-2.5 h-2.5"
|
|
15
|
+
};
|
|
16
|
+
function a({ status: a, label: o, pulse: s = !1, size: c = "md", className: l }) {
|
|
17
|
+
return /* @__PURE__ */ n("span", {
|
|
18
|
+
className: e("inline-flex items-center gap-1.5", l),
|
|
19
|
+
children: [/* @__PURE__ */ n("span", {
|
|
20
|
+
className: "relative flex items-center justify-center",
|
|
21
|
+
children: [s && (a === "online" || a === "pending") && /* @__PURE__ */ t("span", { className: e("absolute inline-flex rounded-full opacity-75 animate-ping", r[a], i[c]) }), /* @__PURE__ */ t("span", { className: e("relative inline-flex rounded-full", r[a], i[c]) })]
|
|
22
|
+
}), o && /* @__PURE__ */ t("span", {
|
|
23
|
+
className: "text-sm text-slate-600 dark:text-slate-300",
|
|
24
|
+
children: o
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { a as StatusDot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react/jsx-runtime");function n({steps:n,current:r,orientation:i=`horizontal`,className:a}){return(0,t.jsx)(`div`,{className:e.t(i===`vertical`?`flex flex-col gap-0`:`flex items-start gap-0 min-w-0 overflow-x-auto`,a),children:n.map((a,o)=>{let s=o<r,c=o===r,l=o===n.length-1;return(0,t.jsx)(`div`,{className:e.t(i===`vertical`?`flex gap-3`:`flex flex-col items-center flex-1`),children:i===`horizontal`?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(`div`,{className:`flex items-center w-full`,children:[(0,t.jsx)(`div`,{className:e.t(`w-8 h-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold border-2 transition-colors`,s?`bg-primary border-primary text-primary-foreground`:c?`border-accent-500 text-accent-400 bg-accent-500/10`:`border-black/15 dark:border-white/15 text-slate-500`),children:s?(0,t.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,t.jsx)(`path`,{d:`m20 6-11 11-5-5`})}):o+1}),!l&&(0,t.jsx)(`div`,{className:e.t(`flex-1 h-0.5 mx-2 rounded-full transition-colors`,s?`bg-primary`:`bg-border`)})]}),(0,t.jsxs)(`div`,{className:`mt-2 text-center px-1`,children:[(0,t.jsx)(`p`,{className:e.t(`text-xs font-medium`,c?`text-gray-900 dark:text-white`:`text-slate-500`),children:a.label}),a.description&&(0,t.jsx)(`p`,{className:`text-[10px] text-slate-500 mt-0.5`,children:a.description})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,t.jsx)(`div`,{className:e.t(`w-8 h-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold border-2 transition-colors`,s?`bg-primary border-primary text-primary-foreground`:c?`border-accent-500 text-accent-400 bg-accent-500/10`:`border-black/15 dark:border-white/15 text-slate-500`),children:s?(0,t.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,t.jsx)(`path`,{d:`m20 6-11 11-5-5`})}):o+1}),!l&&(0,t.jsx)(`div`,{className:e.t(`w-0.5 flex-1 min-h-8 my-1 rounded-full`,s?`bg-primary`:`bg-border`)})]}),(0,t.jsxs)(`div`,{className:`pb-6`,children:[(0,t.jsx)(`p`,{className:e.t(`text-sm font-medium leading-none mt-1.5`,c?`text-gray-900 dark:text-white`:`text-slate-500`),children:a.label}),a.description&&(0,t.jsx)(`p`,{className:`text-xs text-slate-500 mt-1`,children:a.description})]})]})},o)})})}exports.Stepper=n;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface StepperStep {
|
|
2
|
+
label: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface StepperProps {
|
|
6
|
+
steps: StepperStep[];
|
|
7
|
+
current: number;
|
|
8
|
+
orientation?: "horizontal" | "vertical";
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function Stepper({ steps, current, orientation, className }: StepperProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { t as e } from "../cn-DpgY2leY.js";
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/stepper.tsx
|
|
4
|
+
function i({ steps: i, current: a, orientation: o = "horizontal", className: s }) {
|
|
5
|
+
return /* @__PURE__ */ n("div", {
|
|
6
|
+
className: e(o === "vertical" ? "flex flex-col gap-0" : "flex items-start gap-0 min-w-0 overflow-x-auto", s),
|
|
7
|
+
children: i.map((s, c) => {
|
|
8
|
+
let l = c < a, u = c === a, d = c === i.length - 1;
|
|
9
|
+
return /* @__PURE__ */ n("div", {
|
|
10
|
+
className: e(o === "vertical" ? "flex gap-3" : "flex flex-col items-center flex-1"),
|
|
11
|
+
children: o === "horizontal" ? /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("div", {
|
|
12
|
+
className: "flex items-center w-full",
|
|
13
|
+
children: [/* @__PURE__ */ n("div", {
|
|
14
|
+
className: e("w-8 h-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold border-2 transition-colors", l ? "bg-primary border-primary text-primary-foreground" : u ? "border-accent-500 text-accent-400 bg-accent-500/10" : "border-black/15 dark:border-white/15 text-slate-500"),
|
|
15
|
+
children: l ? /* @__PURE__ */ n("svg", {
|
|
16
|
+
width: "14",
|
|
17
|
+
height: "14",
|
|
18
|
+
viewBox: "0 0 24 24",
|
|
19
|
+
fill: "none",
|
|
20
|
+
stroke: "currentColor",
|
|
21
|
+
strokeWidth: "2.5",
|
|
22
|
+
strokeLinecap: "round",
|
|
23
|
+
strokeLinejoin: "round",
|
|
24
|
+
children: /* @__PURE__ */ n("path", { d: "m20 6-11 11-5-5" })
|
|
25
|
+
}) : c + 1
|
|
26
|
+
}), !d && /* @__PURE__ */ n("div", { className: e("flex-1 h-0.5 mx-2 rounded-full transition-colors", l ? "bg-primary" : "bg-border") })]
|
|
27
|
+
}), /* @__PURE__ */ r("div", {
|
|
28
|
+
className: "mt-2 text-center px-1",
|
|
29
|
+
children: [/* @__PURE__ */ n("p", {
|
|
30
|
+
className: e("text-xs font-medium", u ? "text-gray-900 dark:text-white" : "text-slate-500"),
|
|
31
|
+
children: s.label
|
|
32
|
+
}), s.description && /* @__PURE__ */ n("p", {
|
|
33
|
+
className: "text-[10px] text-slate-500 mt-0.5",
|
|
34
|
+
children: s.description
|
|
35
|
+
})]
|
|
36
|
+
})] }) : /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("div", {
|
|
37
|
+
className: "flex flex-col items-center",
|
|
38
|
+
children: [/* @__PURE__ */ n("div", {
|
|
39
|
+
className: e("w-8 h-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold border-2 transition-colors", l ? "bg-primary border-primary text-primary-foreground" : u ? "border-accent-500 text-accent-400 bg-accent-500/10" : "border-black/15 dark:border-white/15 text-slate-500"),
|
|
40
|
+
children: l ? /* @__PURE__ */ n("svg", {
|
|
41
|
+
width: "14",
|
|
42
|
+
height: "14",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
fill: "none",
|
|
45
|
+
stroke: "currentColor",
|
|
46
|
+
strokeWidth: "2.5",
|
|
47
|
+
strokeLinecap: "round",
|
|
48
|
+
strokeLinejoin: "round",
|
|
49
|
+
children: /* @__PURE__ */ n("path", { d: "m20 6-11 11-5-5" })
|
|
50
|
+
}) : c + 1
|
|
51
|
+
}), !d && /* @__PURE__ */ n("div", { className: e("w-0.5 flex-1 min-h-8 my-1 rounded-full", l ? "bg-primary" : "bg-border") })]
|
|
52
|
+
}), /* @__PURE__ */ r("div", {
|
|
53
|
+
className: "pb-6",
|
|
54
|
+
children: [/* @__PURE__ */ n("p", {
|
|
55
|
+
className: e("text-sm font-medium leading-none mt-1.5", u ? "text-gray-900 dark:text-white" : "text-slate-500"),
|
|
56
|
+
children: s.label
|
|
57
|
+
}), s.description && /* @__PURE__ */ n("p", {
|
|
58
|
+
className: "text-xs text-slate-500 mt-1",
|
|
59
|
+
children: s.description
|
|
60
|
+
})]
|
|
61
|
+
})] })
|
|
62
|
+
}, c);
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { i as Stepper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("framer-motion"),n=require("react"),r=require("react/jsx-runtime");var i={sm:{w:36,h:20,thumb:14,gap:3},md:{w:44,h:24,thumb:18,gap:3}},a=(0,n.forwardRef)(({className:a,label:o,description:s,size:c=`md`,checked:l,defaultChecked:u,onChange:d,onCheckedChange:f,disabled:p,id:m,...h},g)=>{let[_,v]=(0,n.useState)(l===void 0?u??!1:l);(0,n.useEffect)(()=>{l!==void 0&&v(l)},[l]);let y=(0,n.useId)(),b=m??y,x=i[c],S=_?x.w-x.thumb-x.gap:x.gap;return(0,r.jsxs)(`label`,{htmlFor:b,className:e.t(`flex items-start gap-3 cursor-pointer`,p&&`cursor-not-allowed opacity-50`,a),children:[(0,r.jsxs)(`div`,{className:`relative mt-0.5 shrink-0`,style:{width:x.w,height:x.h},children:[(0,r.jsx)(`input`,{ref:g,type:`checkbox`,id:b,className:`peer absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed`,checked:_,disabled:p,onChange:e=>{l===void 0&&v(e.target.checked),d?.(e),f?.(e.target.checked)},...h}),(0,r.jsx)(`div`,{className:e.t(`rounded-full w-full h-full border transition-all duration-200 peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg`,_?`bg-primary border-primary`:`bg-muted border-border-strong`)}),(0,r.jsx)(t.motion.span,{className:`absolute rounded-full bg-white shadow-md shadow-black/20`,style:{width:x.thumb,height:x.thumb,top:x.gap,boxShadow:`0 1px 4px rgba(0,0,0,0.22), 0 0 0 0.5px rgba(0,0,0,0.06)`},animate:{x:S},transition:{type:`spring`,stiffness:600,damping:35}})]}),(o||s)&&(0,r.jsxs)(`div`,{className:`min-w-0`,children:[o&&(0,r.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:o}),s&&(0,r.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:s})]})]})});a.displayName=`Switch`,exports.Switch=a;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
|
|
3
|
+
label?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
size?: "sm" | "md";
|
|
6
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const Switch: import('react').ForwardRefExoticComponent<SwitchProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "../cn-DpgY2leY.js";
|
|
3
|
+
import { motion as t } from "framer-motion";
|
|
4
|
+
import { forwardRef as n, useEffect as r, useId as i, useState as a } from "react";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/switch.tsx
|
|
7
|
+
var c = {
|
|
8
|
+
sm: {
|
|
9
|
+
w: 36,
|
|
10
|
+
h: 20,
|
|
11
|
+
thumb: 14,
|
|
12
|
+
gap: 3
|
|
13
|
+
},
|
|
14
|
+
md: {
|
|
15
|
+
w: 44,
|
|
16
|
+
h: 24,
|
|
17
|
+
thumb: 18,
|
|
18
|
+
gap: 3
|
|
19
|
+
}
|
|
20
|
+
}, l = n(({ className: n, label: l, description: u, size: d = "md", checked: f, defaultChecked: p, onChange: m, onCheckedChange: h, disabled: g, id: _, ...v }, y) => {
|
|
21
|
+
let [b, x] = a(f === void 0 ? p ?? !1 : f);
|
|
22
|
+
r(() => {
|
|
23
|
+
f !== void 0 && x(f);
|
|
24
|
+
}, [f]);
|
|
25
|
+
let S = i(), C = _ ?? S, w = c[d], T = b ? w.w - w.thumb - w.gap : w.gap;
|
|
26
|
+
return /* @__PURE__ */ s("label", {
|
|
27
|
+
htmlFor: C,
|
|
28
|
+
className: e("flex items-start gap-3 cursor-pointer", g && "cursor-not-allowed opacity-50", n),
|
|
29
|
+
children: [/* @__PURE__ */ s("div", {
|
|
30
|
+
className: "relative mt-0.5 shrink-0",
|
|
31
|
+
style: {
|
|
32
|
+
width: w.w,
|
|
33
|
+
height: w.h
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ o("input", {
|
|
37
|
+
ref: y,
|
|
38
|
+
type: "checkbox",
|
|
39
|
+
id: C,
|
|
40
|
+
className: "peer absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",
|
|
41
|
+
checked: b,
|
|
42
|
+
disabled: g,
|
|
43
|
+
onChange: (e) => {
|
|
44
|
+
f === void 0 && x(e.target.checked), m?.(e), h?.(e.target.checked);
|
|
45
|
+
},
|
|
46
|
+
...v
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ o("div", { className: e("rounded-full w-full h-full border transition-all duration-200 peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg", b ? "bg-primary border-primary" : "bg-muted border-border-strong") }),
|
|
49
|
+
/* @__PURE__ */ o(t.span, {
|
|
50
|
+
className: "absolute rounded-full bg-white shadow-md shadow-black/20",
|
|
51
|
+
style: {
|
|
52
|
+
width: w.thumb,
|
|
53
|
+
height: w.thumb,
|
|
54
|
+
top: w.gap,
|
|
55
|
+
boxShadow: "0 1px 4px rgba(0,0,0,0.22), 0 0 0 0.5px rgba(0,0,0,0.06)"
|
|
56
|
+
},
|
|
57
|
+
animate: { x: T },
|
|
58
|
+
transition: {
|
|
59
|
+
type: "spring",
|
|
60
|
+
stiffness: 600,
|
|
61
|
+
damping: 35
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
}), (l || u) && /* @__PURE__ */ s("div", {
|
|
66
|
+
className: "min-w-0",
|
|
67
|
+
children: [l && /* @__PURE__ */ o("p", {
|
|
68
|
+
className: "text-sm font-medium text-foreground",
|
|
69
|
+
children: l
|
|
70
|
+
}), u && /* @__PURE__ */ o("p", {
|
|
71
|
+
className: "mt-0.5 text-xs text-muted-foreground",
|
|
72
|
+
children: u
|
|
73
|
+
})]
|
|
74
|
+
})]
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
l.displayName = "Switch";
|
|
78
|
+
//#endregion
|
|
79
|
+
export { l as Switch };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react/jsx-runtime");function n({className:n,containerClassName:r,scrollAreaClassName:i,density:a=`comfortable`,children:o,...s}){return(0,t.jsx)(`div`,{className:e.t(`w-full overflow-hidden rounded-[var(--radius-lg)] border border-border bg-surface`,r),children:(0,t.jsx)(`div`,{className:e.t(`w-full overflow-x-auto overscroll-x-contain scrollbar-thin`,i),children:(0,t.jsx)(`table`,{"data-density":a,className:e.t(`group/table w-full border-collapse text-sm`,n),...s,children:o})})})}function r({className:n,children:r,...i}){return(0,t.jsx)(`thead`,{className:e.t(`border-b border-border bg-surface-muted`,n),...i,children:r})}function i({className:n,children:r,...i}){return(0,t.jsx)(`tbody`,{className:e.t(`divide-y divide-border`,n),...i,children:r})}function a({className:n,children:r,...i}){return(0,t.jsx)(`tr`,{className:e.t(`transition-colors duration-100 hover:bg-surface-muted aria-selected:bg-accent-50/70 dark:aria-selected:bg-accent-500/10`,n),...i,children:r})}function o({className:n,children:r,...i}){return(0,t.jsx)(`th`,{className:e.t(`px-4 py-2.5 text-left text-xs font-medium text-muted-foreground whitespace-nowrap group-data-[density=compact]/table:px-3 group-data-[density=compact]/table:py-2`,n),...i,children:r})}function s({className:n,children:r,...i}){return(0,t.jsx)(`td`,{className:e.t(`px-4 py-3 text-sm text-foreground whitespace-nowrap group-data-[density=compact]/table:px-3 group-data-[density=compact]/table:py-2`,n),...i,children:r})}exports.Table=n,exports.TableBody=i,exports.TableCell=s,exports.TableHead=o,exports.TableHeader=r,exports.TableRow=a;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
|
+
export interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
scrollAreaClassName?: string;
|
|
5
|
+
density?: "compact" | "comfortable";
|
|
6
|
+
}
|
|
7
|
+
export declare function Table({ className, containerClassName, scrollAreaClassName, density, children, ...props }: TableProps): import("react").JSX.Element;
|
|
8
|
+
export declare function TableHeader({ className, children, ...props }: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
|
|
9
|
+
export declare function TableBody({ className, children, ...props }: HTMLAttributes<HTMLTableSectionElement>): import("react").JSX.Element;
|
|
10
|
+
export declare function TableRow({ className, children, ...props }: HTMLAttributes<HTMLTableRowElement>): import("react").JSX.Element;
|
|
11
|
+
export declare function TableHead({ className, children, ...props }: ThHTMLAttributes<HTMLTableCellElement>): import("react").JSX.Element;
|
|
12
|
+
export declare function TableCell({ className, children, ...props }: TdHTMLAttributes<HTMLTableCellElement>): import("react").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { t as e } from "../cn-DpgY2leY.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/table.tsx
|
|
4
|
+
function n({ className: n, containerClassName: r, scrollAreaClassName: i, density: a = "comfortable", children: o, ...s }) {
|
|
5
|
+
return /* @__PURE__ */ t("div", {
|
|
6
|
+
className: e("w-full overflow-hidden rounded-[var(--radius-lg)] border border-border bg-surface", r),
|
|
7
|
+
children: /* @__PURE__ */ t("div", {
|
|
8
|
+
className: e("w-full overflow-x-auto overscroll-x-contain scrollbar-thin", i),
|
|
9
|
+
children: /* @__PURE__ */ t("table", {
|
|
10
|
+
"data-density": a,
|
|
11
|
+
className: e("group/table w-full border-collapse text-sm", n),
|
|
12
|
+
...s,
|
|
13
|
+
children: o
|
|
14
|
+
})
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function r({ className: n, children: r, ...i }) {
|
|
19
|
+
return /* @__PURE__ */ t("thead", {
|
|
20
|
+
className: e("border-b border-border bg-surface-muted", n),
|
|
21
|
+
...i,
|
|
22
|
+
children: r
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function i({ className: n, children: r, ...i }) {
|
|
26
|
+
return /* @__PURE__ */ t("tbody", {
|
|
27
|
+
className: e("divide-y divide-border", n),
|
|
28
|
+
...i,
|
|
29
|
+
children: r
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function a({ className: n, children: r, ...i }) {
|
|
33
|
+
return /* @__PURE__ */ t("tr", {
|
|
34
|
+
className: e("transition-colors duration-100 hover:bg-surface-muted aria-selected:bg-accent-50/70 dark:aria-selected:bg-accent-500/10", n),
|
|
35
|
+
...i,
|
|
36
|
+
children: r
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function o({ className: n, children: r, ...i }) {
|
|
40
|
+
return /* @__PURE__ */ t("th", {
|
|
41
|
+
className: e("px-4 py-2.5 text-left text-xs font-medium text-muted-foreground whitespace-nowrap group-data-[density=compact]/table:px-3 group-data-[density=compact]/table:py-2", n),
|
|
42
|
+
...i,
|
|
43
|
+
children: r
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function s({ className: n, children: r, ...i }) {
|
|
47
|
+
return /* @__PURE__ */ t("td", {
|
|
48
|
+
className: e("px-4 py-3 text-sm text-foreground whitespace-nowrap group-data-[density=compact]/table:px-3 group-data-[density=compact]/table:py-2", n),
|
|
49
|
+
...i,
|
|
50
|
+
children: r
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { n as Table, i as TableBody, s as TableCell, o as TableHead, r as TableHeader, a as TableRow };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs"),t=require("../component-styles-TkZ7v6Ef.cjs");let n=require("framer-motion"),r=require("react"),i=require("react/jsx-runtime");var a=(0,r.createContext)(null);function o(){let e=(0,r.useContext)(a);if(!e)throw Error(`Tabs subcomponents must be inside <Tabs>`);return e}function s({defaultValue:t,value:n,children:o,className:s,orientation:c=`horizontal`,onChange:l}){let[u,d]=(0,r.useState)(t),f=n??u,p=(0,r.useId)();return(0,i.jsx)(a.Provider,{value:{active:f,setActive:e=>{n===void 0&&d(e),l?.(e)},orientation:c,tabsId:p},children:(0,i.jsx)(`div`,{className:e.t(c===`vertical`?`flex flex-col gap-4 sm:flex-row`:`flex flex-col`,s),children:o})})}function c({className:t,children:n,...r}){let{orientation:a}=o();return(0,i.jsx)(`div`,{className:e.t(`rounded-[var(--radius-md)] border border-border bg-surface-muted p-1`,a===`vertical`?`flex flex-row sm:flex-col gap-0.5 w-full sm:w-36 sm:shrink-0 overflow-x-auto`:`flex items-center gap-0.5 overflow-x-auto max-w-full scrollbar-none`,t),role:`tablist`,...r,children:n})}function l({value:r,className:a,children:s,icon:c,onKeyDown:l,...u}){let{active:d,setActive:f,orientation:p,tabsId:m}=o(),h=d===r,g=encodeURIComponent(r),_=`${m}-tab-${g}`,v=`${m}-panel-${g}`;function y(e){if(l?.(e),e.defaultPrevented||!(p===`vertical`?[`ArrowUp`,`ArrowDown`]:[`ArrowLeft`,`ArrowRight`]).includes(e.key)&&e.key!==`Home`&&e.key!==`End`)return;let t=e.currentTarget.closest(`[role="tablist"]`),n=Array.from(t?.querySelectorAll(`[role="tab"]:not(:disabled)`)??[]),r=n.indexOf(e.currentTarget);if(r<0||n.length===0)return;e.preventDefault();let i=e.key===`Home`?0:e.key===`End`?n.length-1:(r+(e.key===`ArrowRight`||e.key===`ArrowDown`?1:-1)+n.length)%n.length;n[i]?.focus(),n[i]?.click()}return(0,i.jsxs)(`button`,{role:`tab`,type:`button`,id:_,"aria-controls":v,"aria-selected":h,tabIndex:h?0:-1,onClick:()=>f(r),onKeyDown:y,className:e.t(`relative text-sm font-medium cursor-pointer transition-colors`,p===`vertical`?`flex items-center gap-2 w-full px-3 py-2 rounded-md text-left`:`px-3 py-1.5 rounded-md`,t.s,h?`text-foreground`:`text-muted-foreground hover:text-foreground`,a),...u,children:[h&&(0,i.jsx)(n.motion.span,{layoutId:`tab-bg-${m}`,className:`absolute inset-0 rounded-md border border-border bg-surface shadow-xs`,transition:{type:`spring`,stiffness:450,damping:32}}),c&&(0,i.jsx)(`span`,{className:`relative z-10 shrink-0 opacity-70`,children:c}),(0,i.jsx)(`span`,{className:`relative z-10`,children:s})]})}function u({value:t,className:r,children:a,...s}){let{active:c,orientation:l,tabsId:u}=o(),d=encodeURIComponent(t);return(0,i.jsx)(n.AnimatePresence,{mode:`wait`,children:c===t&&(0,i.jsx)(n.motion.div,{initial:l===`vertical`?{opacity:0,x:6}:{opacity:0,y:4},animate:l===`vertical`?{opacity:1,x:0}:{opacity:1,y:0},exit:l===`vertical`?{opacity:0,x:-6}:{opacity:0,y:-4},transition:{duration:.15},role:`tabpanel`,id:`${u}-panel-${d}`,"aria-labelledby":`${u}-tab-${d}`,tabIndex:0,className:e.t(l===`vertical`?`flex-1 min-w-0`:`mt-4`,r),...s,children:a},t)})}exports.Tabs=s,exports.TabsContent=u,exports.TabsList=c,exports.TabsTrigger=l;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HTMLMotionProps } from 'framer-motion';
|
|
2
|
+
import { HTMLAttributes, ButtonHTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
export interface TabsProps {
|
|
4
|
+
defaultValue: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
orientation?: "horizontal" | "vertical";
|
|
9
|
+
onChange?: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function Tabs({ defaultValue, value, children, className, orientation, onChange, }: TabsProps): import("react").JSX.Element;
|
|
12
|
+
export declare function TabsList({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
13
|
+
export interface TabsTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
|
+
value: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare function TabsTrigger({ value, className, children, icon, onKeyDown, ...props }: TabsTriggerProps): import("react").JSX.Element;
|
|
18
|
+
export interface TabsContentProps extends Omit<HTMLMotionProps<"div">, "children"> {
|
|
19
|
+
value: string;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare function TabsContent({ value, className, children, ...props }: TabsContentProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "../cn-DpgY2leY.js";
|
|
3
|
+
import { s as t } from "../component-styles-Ce56hn9T.js";
|
|
4
|
+
import { AnimatePresence as n, motion as r } from "framer-motion";
|
|
5
|
+
import { createContext as i, useContext as a, useId as o, useState as s } from "react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/tabs.tsx
|
|
8
|
+
var u = i(null);
|
|
9
|
+
function d() {
|
|
10
|
+
let e = a(u);
|
|
11
|
+
if (!e) throw Error("Tabs subcomponents must be inside <Tabs>");
|
|
12
|
+
return e;
|
|
13
|
+
}
|
|
14
|
+
function f({ defaultValue: t, value: n, children: r, className: i, orientation: a = "horizontal", onChange: l }) {
|
|
15
|
+
let [d, f] = s(t), p = n ?? d, m = o();
|
|
16
|
+
return /* @__PURE__ */ c(u.Provider, {
|
|
17
|
+
value: {
|
|
18
|
+
active: p,
|
|
19
|
+
setActive: (e) => {
|
|
20
|
+
n === void 0 && f(e), l?.(e);
|
|
21
|
+
},
|
|
22
|
+
orientation: a,
|
|
23
|
+
tabsId: m
|
|
24
|
+
},
|
|
25
|
+
children: /* @__PURE__ */ c("div", {
|
|
26
|
+
className: e(a === "vertical" ? "flex flex-col gap-4 sm:flex-row" : "flex flex-col", i),
|
|
27
|
+
children: r
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function p({ className: t, children: n, ...r }) {
|
|
32
|
+
let { orientation: i } = d();
|
|
33
|
+
return /* @__PURE__ */ c("div", {
|
|
34
|
+
className: e("rounded-[var(--radius-md)] border border-border bg-surface-muted p-1", i === "vertical" ? "flex flex-row sm:flex-col gap-0.5 w-full sm:w-36 sm:shrink-0 overflow-x-auto" : "flex items-center gap-0.5 overflow-x-auto max-w-full scrollbar-none", t),
|
|
35
|
+
role: "tablist",
|
|
36
|
+
...r,
|
|
37
|
+
children: n
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function m({ value: n, className: i, children: a, icon: o, onKeyDown: s, ...u }) {
|
|
41
|
+
let { active: f, setActive: p, orientation: m, tabsId: h } = d(), g = f === n, _ = encodeURIComponent(n), v = `${h}-tab-${_}`, y = `${h}-panel-${_}`;
|
|
42
|
+
function b(e) {
|
|
43
|
+
if (s?.(e), e.defaultPrevented || !(m === "vertical" ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"]).includes(e.key) && e.key !== "Home" && e.key !== "End") return;
|
|
44
|
+
let t = e.currentTarget.closest("[role=\"tablist\"]"), n = Array.from(t?.querySelectorAll("[role=\"tab\"]:not(:disabled)") ?? []), r = n.indexOf(e.currentTarget);
|
|
45
|
+
if (r < 0 || n.length === 0) return;
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
let i = e.key === "Home" ? 0 : e.key === "End" ? n.length - 1 : (r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + n.length) % n.length;
|
|
48
|
+
n[i]?.focus(), n[i]?.click();
|
|
49
|
+
}
|
|
50
|
+
return /* @__PURE__ */ l("button", {
|
|
51
|
+
role: "tab",
|
|
52
|
+
type: "button",
|
|
53
|
+
id: v,
|
|
54
|
+
"aria-controls": y,
|
|
55
|
+
"aria-selected": g,
|
|
56
|
+
tabIndex: g ? 0 : -1,
|
|
57
|
+
onClick: () => p(n),
|
|
58
|
+
onKeyDown: b,
|
|
59
|
+
className: e("relative text-sm font-medium cursor-pointer transition-colors", m === "vertical" ? "flex items-center gap-2 w-full px-3 py-2 rounded-md text-left" : "px-3 py-1.5 rounded-md", t, g ? "text-foreground" : "text-muted-foreground hover:text-foreground", i),
|
|
60
|
+
...u,
|
|
61
|
+
children: [
|
|
62
|
+
g && /* @__PURE__ */ c(r.span, {
|
|
63
|
+
layoutId: `tab-bg-${h}`,
|
|
64
|
+
className: "absolute inset-0 rounded-md border border-border bg-surface shadow-xs",
|
|
65
|
+
transition: {
|
|
66
|
+
type: "spring",
|
|
67
|
+
stiffness: 450,
|
|
68
|
+
damping: 32
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
71
|
+
o && /* @__PURE__ */ c("span", {
|
|
72
|
+
className: "relative z-10 shrink-0 opacity-70",
|
|
73
|
+
children: o
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ c("span", {
|
|
76
|
+
className: "relative z-10",
|
|
77
|
+
children: a
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function h({ value: t, className: i, children: a, ...o }) {
|
|
83
|
+
let { active: s, orientation: l, tabsId: u } = d(), f = encodeURIComponent(t);
|
|
84
|
+
return /* @__PURE__ */ c(n, {
|
|
85
|
+
mode: "wait",
|
|
86
|
+
children: s === t && /* @__PURE__ */ c(r.div, {
|
|
87
|
+
initial: l === "vertical" ? {
|
|
88
|
+
opacity: 0,
|
|
89
|
+
x: 6
|
|
90
|
+
} : {
|
|
91
|
+
opacity: 0,
|
|
92
|
+
y: 4
|
|
93
|
+
},
|
|
94
|
+
animate: l === "vertical" ? {
|
|
95
|
+
opacity: 1,
|
|
96
|
+
x: 0
|
|
97
|
+
} : {
|
|
98
|
+
opacity: 1,
|
|
99
|
+
y: 0
|
|
100
|
+
},
|
|
101
|
+
exit: l === "vertical" ? {
|
|
102
|
+
opacity: 0,
|
|
103
|
+
x: -6
|
|
104
|
+
} : {
|
|
105
|
+
opacity: 0,
|
|
106
|
+
y: -4
|
|
107
|
+
},
|
|
108
|
+
transition: { duration: .15 },
|
|
109
|
+
role: "tabpanel",
|
|
110
|
+
id: `${u}-panel-${f}`,
|
|
111
|
+
"aria-labelledby": `${u}-tab-${f}`,
|
|
112
|
+
tabIndex: 0,
|
|
113
|
+
className: e(l === "vertical" ? "flex-1 min-w-0" : "mt-4", i),
|
|
114
|
+
...o,
|
|
115
|
+
children: a
|
|
116
|
+
}, t)
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
export { f as Tabs, h as TabsContent, p as TabsList, m as TabsTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cn-BdjraxxU.cjs");let t=require("react/jsx-runtime");var n={default:`bg-black/8 dark:bg-white/8 text-slate-700 dark:text-slate-200 border-black/12 dark:border-white/12`,success:`bg-emerald-500/12 text-emerald-400 border-emerald-500/20`,warning:`bg-amber-500/12 text-amber-400 border-amber-500/20`,error:`bg-red-500/12 text-red-400 border-red-500/20`,info:`bg-sky-500/12 text-sky-400 border-sky-500/20`},r={default:`text-slate-500 hover:text-slate-700 dark:hover:text-slate-200`,success:`text-emerald-400 hover:text-emerald-300`,warning:`text-amber-400 hover:text-amber-300`,error:`text-red-400 hover:text-red-300`,info:`text-sky-400 hover:text-sky-300`},i={sm:`px-2 py-0.5 text-xs gap-1 rounded-md`,md:`px-2.5 py-1 text-xs gap-1.5 rounded-lg`};function a({variant:a=`default`,size:o=`md`,onRemove:s,icon:c,disabled:l,className:u,children:d,...f}){return(0,t.jsxs)(`span`,{className:e.t(`inline-flex items-center font-medium border transition-colors`,n[a],i[o],l&&`opacity-50`,u),...f,children:[c&&(0,t.jsx)(`span`,{className:`shrink-0 w-3 h-3 flex items-center justify-center`,children:c}),(0,t.jsx)(`span`,{className:`truncate`,children:d}),s&&!l&&(0,t.jsx)(`button`,{type:`button`,tabIndex:-1,onClick:e=>{e.stopPropagation(),s()},className:e.t(`shrink-0 ml-0.5 transition-colors cursor-pointer`,r[a]),"aria-label":`Remove${typeof d==`string`?` ${d}`:``}`,children:(0,t.jsx)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,t.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]})}exports.Tag=a;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type TagVariant = "default" | "success" | "warning" | "error" | "info";
|
|
3
|
+
type TagSize = "sm" | "md";
|
|
4
|
+
export interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
variant?: TagVariant;
|
|
6
|
+
size?: TagSize;
|
|
7
|
+
onRemove?: () => void;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function Tag({ variant, size, onRemove, icon, disabled, className, children, ...props }: TagProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|