@douglasneuroinformatics/libui 2.0.0-beta.8 → 2.0.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 +14 -0
- package/dist/components/index.d.ts +56 -10
- package/dist/components/index.js +431 -234
- package/dist/components/index.js.map +1 -1
- package/dist/i18n.d.ts +335 -4
- package/dist/i18n.js +21 -5
- package/dist/i18n.js.map +1 -1
- package/package.json +2 -2
package/dist/components/index.js
CHANGED
|
@@ -1737,7 +1737,7 @@ var NumberRecordField = ({
|
|
|
1737
1737
|
}
|
|
1738
1738
|
return /* @__PURE__ */ jsxs25("div", { className: "space-y-4", children: [
|
|
1739
1739
|
/* @__PURE__ */ jsx89(Heading, { variant: "h5", children: label }),
|
|
1740
|
-
/* @__PURE__ */ jsx89("div", { className: "space-y-
|
|
1740
|
+
/* @__PURE__ */ jsx89("div", { className: "space-y-6", children: Object.keys(items).map((name) => {
|
|
1741
1741
|
const item = items[name];
|
|
1742
1742
|
return /* @__PURE__ */ jsx89(
|
|
1743
1743
|
NumberField,
|
|
@@ -2306,7 +2306,7 @@ var RecordArrayField = memo(function RecordArrayField2({
|
|
|
2306
2306
|
setValue: setArrayValue,
|
|
2307
2307
|
value: arrayValue
|
|
2308
2308
|
}) {
|
|
2309
|
-
const { t } = useTranslation4();
|
|
2309
|
+
const { t } = useTranslation4("libui");
|
|
2310
2310
|
const createNewRecord = () => Object.fromEntries(Object.keys(fieldset).map((fieldName) => [fieldName, void 0]));
|
|
2311
2311
|
useEffect6(() => {
|
|
2312
2312
|
setArrayValue([createNewRecord()]);
|
|
@@ -2324,7 +2324,7 @@ var RecordArrayField = memo(function RecordArrayField2({
|
|
|
2324
2324
|
};
|
|
2325
2325
|
return /* @__PURE__ */ jsxs38("div", { className: "space-y-4", children: [
|
|
2326
2326
|
/* @__PURE__ */ jsx113(Heading, { variant: "h5", children: label }),
|
|
2327
|
-
/* @__PURE__ */ jsx113("div", { className: "space-y-
|
|
2327
|
+
/* @__PURE__ */ jsx113("div", { className: "space-y-6", children: arrayValue.map((fields, i) => /* @__PURE__ */ jsxs38("div", { className: "space-y-4", children: [
|
|
2328
2328
|
/* @__PURE__ */ jsx113(Label3, { className: "font-semibold italic", children: label + " " + (i + 1) }),
|
|
2329
2329
|
Object.keys(fields).map((name) => {
|
|
2330
2330
|
const field = fieldset[name];
|
|
@@ -2493,7 +2493,7 @@ var Form = ({
|
|
|
2493
2493
|
validationSchema,
|
|
2494
2494
|
...props
|
|
2495
2495
|
}) => {
|
|
2496
|
-
const { t } = useTranslation5();
|
|
2496
|
+
const { t } = useTranslation5("libui");
|
|
2497
2497
|
const [rootError, setRootError] = useState5(null);
|
|
2498
2498
|
const [errors, setErrors] = useState5({});
|
|
2499
2499
|
const [values, setValues] = useState5(
|
|
@@ -2536,16 +2536,16 @@ var Form = ({
|
|
|
2536
2536
|
"form",
|
|
2537
2537
|
{
|
|
2538
2538
|
autoComplete: "off",
|
|
2539
|
-
className: twMerge("
|
|
2539
|
+
className: twMerge("w-full", isGrouped ? "space-y-8 divide-y" : "space-y-6", className),
|
|
2540
2540
|
id,
|
|
2541
2541
|
onSubmit: handleSubmit,
|
|
2542
2542
|
...props,
|
|
2543
2543
|
children: [
|
|
2544
2544
|
isGrouped ? content.map((fieldGroup, i) => {
|
|
2545
|
-
return /* @__PURE__ */ jsxs39("div", { className: "space-y-
|
|
2546
|
-
/* @__PURE__ */ jsxs39("div", { children: [
|
|
2545
|
+
return /* @__PURE__ */ jsxs39("div", { className: "space-y-6 [&:not(:first-child)]:pt-8", children: [
|
|
2546
|
+
/* @__PURE__ */ jsxs39("div", { className: "space-y-1", children: [
|
|
2547
2547
|
/* @__PURE__ */ jsx116(Heading, { variant: "h4", children: fieldGroup.title }),
|
|
2548
|
-
fieldGroup.description && /* @__PURE__ */ jsx116("
|
|
2548
|
+
fieldGroup.description && /* @__PURE__ */ jsx116("p", { className: "text-sm italic leading-tight text-muted-foreground", children: fieldGroup.description })
|
|
2549
2549
|
] }),
|
|
2550
2550
|
/* @__PURE__ */ jsx116(
|
|
2551
2551
|
FieldsComponent,
|
|
@@ -2612,10 +2612,15 @@ var HoverCard = Object.assign(Root14, {
|
|
|
2612
2612
|
import { LanguagesIcon } from "lucide-react";
|
|
2613
2613
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
2614
2614
|
import { jsx as jsx118, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
2615
|
-
var LanguageToggle = ({
|
|
2616
|
-
|
|
2615
|
+
var LanguageToggle = ({
|
|
2616
|
+
align = "start",
|
|
2617
|
+
options = {},
|
|
2618
|
+
triggerClassName,
|
|
2619
|
+
variant = "outline"
|
|
2620
|
+
}) => {
|
|
2621
|
+
const { i18n } = useTranslation6("libui");
|
|
2617
2622
|
return /* @__PURE__ */ jsxs40(DropdownMenu, { children: [
|
|
2618
|
-
/* @__PURE__ */ jsx118(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx118(Button, { size: "icon", variant
|
|
2623
|
+
/* @__PURE__ */ jsx118(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx118(Button, { className: triggerClassName, size: "icon", variant, children: /* @__PURE__ */ jsx118(LanguagesIcon, {}) }) }),
|
|
2619
2624
|
/* @__PURE__ */ jsx118(DropdownMenu.Content, { align, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx118(DropdownMenu.Item, { onClick: () => void i18n.changeLanguage(option), children: options[option] }, option)) })
|
|
2620
2625
|
] });
|
|
2621
2626
|
};
|
|
@@ -2915,10 +2920,187 @@ var LegacyStepper = ({ className, steps }) => {
|
|
|
2915
2920
|
] }) });
|
|
2916
2921
|
};
|
|
2917
2922
|
|
|
2918
|
-
// src/components/
|
|
2919
|
-
import
|
|
2920
|
-
import { toBasicISOString as toBasicISOString2 } from "@douglasneuroinformatics/libjs";
|
|
2923
|
+
// src/components/LegacyTable/LegacyClientTable.tsx
|
|
2924
|
+
import { useState as useState7 } from "react";
|
|
2921
2925
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
2926
|
+
|
|
2927
|
+
// src/components/LegacyTable/LegacyTable.tsx
|
|
2928
|
+
import { range as range3, toBasicISOString as toBasicISOString2 } from "@douglasneuroinformatics/libjs";
|
|
2929
|
+
import { clsx as clsx5 } from "clsx";
|
|
2930
|
+
import { twMerge as twMerge3 } from "tailwind-merge";
|
|
2931
|
+
|
|
2932
|
+
// src/components/LegacyTable/LegacyTableColumnHeader.tsx
|
|
2933
|
+
import React85 from "react";
|
|
2934
|
+
import { Menu as Menu2, Transition as Transition5 } from "@headlessui/react";
|
|
2935
|
+
import { ChevronDownIcon as ChevronDownIcon4 } from "@heroicons/react/24/solid";
|
|
2936
|
+
import { clsx as clsx4 } from "clsx";
|
|
2937
|
+
import { jsx as jsx124, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
2938
|
+
var LegacyTableColumnHeader = ({
|
|
2939
|
+
column,
|
|
2940
|
+
dropdownOptions
|
|
2941
|
+
}) => {
|
|
2942
|
+
return /* @__PURE__ */ jsxs46(Menu2, { as: "div", className: "relative", children: [
|
|
2943
|
+
/* @__PURE__ */ jsxs46(
|
|
2944
|
+
Menu2.Button,
|
|
2945
|
+
{
|
|
2946
|
+
className: clsx4(
|
|
2947
|
+
"flex min-w-[10rem] flex-shrink-0 items-center justify-between px-6 py-3 text-sm font-semibold text-slate-800 dark:text-slate-200",
|
|
2948
|
+
{ "cursor-default": !dropdownOptions }
|
|
2949
|
+
),
|
|
2950
|
+
children: [
|
|
2951
|
+
column.label,
|
|
2952
|
+
dropdownOptions && /* @__PURE__ */ jsx124(ChevronDownIcon4, { className: "ml-3", height: 16, width: 16 })
|
|
2953
|
+
]
|
|
2954
|
+
}
|
|
2955
|
+
),
|
|
2956
|
+
dropdownOptions && /* @__PURE__ */ jsx124(
|
|
2957
|
+
Transition5,
|
|
2958
|
+
{
|
|
2959
|
+
as: React85.Fragment,
|
|
2960
|
+
enter: "transition ease-out duration-100",
|
|
2961
|
+
enterFrom: "transform opacity-0 scale-95",
|
|
2962
|
+
enterTo: "transform opacity-100 scale-100",
|
|
2963
|
+
leave: "transition ease-in duration-75",
|
|
2964
|
+
leaveFrom: "transform opacity-100 scale-100",
|
|
2965
|
+
leaveTo: "transform opacity-0 scale-95",
|
|
2966
|
+
children: /* @__PURE__ */ jsx124(Menu2.Items, { className: "absolute right-4 z-50 mt-2 w-32 origin-top-right overflow-hidden rounded-md bg-slate-50 shadow-sm ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-slate-700", children: dropdownOptions.map((option) => {
|
|
2967
|
+
const Icon = option.icon;
|
|
2968
|
+
return /* @__PURE__ */ jsxs46(
|
|
2969
|
+
Menu2.Item,
|
|
2970
|
+
{
|
|
2971
|
+
as: "button",
|
|
2972
|
+
className: "flex w-full items-center text-ellipsis whitespace-nowrap px-3 py-2 hover:backdrop-brightness-95 dark:hover:backdrop-brightness-150",
|
|
2973
|
+
type: "button",
|
|
2974
|
+
onClick: () => {
|
|
2975
|
+
option.onSelection(column);
|
|
2976
|
+
},
|
|
2977
|
+
children: [
|
|
2978
|
+
Icon && /* @__PURE__ */ jsx124(Icon, { className: "mr-2", height: 16, width: 16 }),
|
|
2979
|
+
option.label
|
|
2980
|
+
]
|
|
2981
|
+
},
|
|
2982
|
+
option.label
|
|
2983
|
+
);
|
|
2984
|
+
}) })
|
|
2985
|
+
}
|
|
2986
|
+
)
|
|
2987
|
+
] });
|
|
2988
|
+
};
|
|
2989
|
+
|
|
2990
|
+
// src/components/LegacyTable/LegacyTable.tsx
|
|
2991
|
+
import { jsx as jsx125, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
2992
|
+
function defaultFormatter(value) {
|
|
2993
|
+
if (typeof value === "string") {
|
|
2994
|
+
return value;
|
|
2995
|
+
} else if (typeof value === "number") {
|
|
2996
|
+
return value.toFixed(2).toString();
|
|
2997
|
+
} else if (typeof value === "undefined") {
|
|
2998
|
+
return "NA";
|
|
2999
|
+
}
|
|
3000
|
+
if (value instanceof Date) {
|
|
3001
|
+
return toBasicISOString2(value);
|
|
3002
|
+
}
|
|
3003
|
+
return JSON.stringify(value);
|
|
3004
|
+
}
|
|
3005
|
+
var LegacyTable = ({
|
|
3006
|
+
className,
|
|
3007
|
+
columnDropdownOptions,
|
|
3008
|
+
columns,
|
|
3009
|
+
data,
|
|
3010
|
+
minRows,
|
|
3011
|
+
onEntryClick
|
|
3012
|
+
}) => {
|
|
3013
|
+
const nRows = Math.max(data.length, minRows ?? -1);
|
|
3014
|
+
return /* @__PURE__ */ jsx125("div", { className: twMerge3("min-w-full overflow-hidden rounded-md bg-slate-50 shadow dark:bg-slate-800", className), children: /* @__PURE__ */ jsx125("div", { className: "w-full overflow-x-scroll", children: /* @__PURE__ */ jsxs47("table", { className: "w-full table-auto", children: [
|
|
3015
|
+
/* @__PURE__ */ jsx125("thead", { className: "border-b border-slate-300 bg-slate-50 dark:border-0 dark:bg-slate-700", children: /* @__PURE__ */ jsx125("tr", { children: columns.map((column, i) => /* @__PURE__ */ jsx125(
|
|
3016
|
+
"th",
|
|
3017
|
+
{
|
|
3018
|
+
className: "whitespace-nowrap text-left text-sm font-semibold text-slate-800 dark:text-slate-200",
|
|
3019
|
+
children: /* @__PURE__ */ jsx125(LegacyTableColumnHeader, { column, dropdownOptions: columnDropdownOptions })
|
|
3020
|
+
},
|
|
3021
|
+
i
|
|
3022
|
+
)) }) }),
|
|
3023
|
+
/* @__PURE__ */ jsx125("tbody", { className: "divide-y dark:divide-slate-600", children: nRows > 0 && range3(nRows).map((i) => {
|
|
3024
|
+
const entry = data[i];
|
|
3025
|
+
return /* @__PURE__ */ jsx125(
|
|
3026
|
+
"tr",
|
|
3027
|
+
{
|
|
3028
|
+
className: clsx5("whitespace-nowrap p-4 text-sm text-muted-foreground", {
|
|
3029
|
+
"cursor-pointer hover:backdrop-brightness-95": entry && typeof onEntryClick === "function"
|
|
3030
|
+
}),
|
|
3031
|
+
"data-cy": "table-row",
|
|
3032
|
+
onClick: () => {
|
|
3033
|
+
entry && onEntryClick && onEntryClick(entry);
|
|
3034
|
+
},
|
|
3035
|
+
children: columns.map(({ field, formatter }, j) => {
|
|
3036
|
+
let value;
|
|
3037
|
+
if (!entry) {
|
|
3038
|
+
value = "";
|
|
3039
|
+
} else if (typeof field === "function") {
|
|
3040
|
+
value = field(entry);
|
|
3041
|
+
} else {
|
|
3042
|
+
value = entry[field];
|
|
3043
|
+
}
|
|
3044
|
+
const formattedValue = entry && formatter ? formatter(value) : defaultFormatter(value);
|
|
3045
|
+
return /* @__PURE__ */ jsx125("td", { className: "whitespace-nowrap px-6", "data-cy": "table-data-item", style: { height: 42 }, children: /* @__PURE__ */ jsx125("span", { className: "block text-ellipsis leading-none", children: formattedValue }) }, j);
|
|
3046
|
+
})
|
|
3047
|
+
},
|
|
3048
|
+
i
|
|
3049
|
+
);
|
|
3050
|
+
}) })
|
|
3051
|
+
] }) }) });
|
|
3052
|
+
};
|
|
3053
|
+
|
|
3054
|
+
// src/components/LegacyTable/LegacyClientTable.tsx
|
|
3055
|
+
import { jsx as jsx126, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
3056
|
+
var LegacyClientTable = ({ data, ...props }) => {
|
|
3057
|
+
const [currentPage, setCurrentPage] = useState7(1);
|
|
3058
|
+
const [entriesPerPage] = useState7(10);
|
|
3059
|
+
const { t } = useTranslation7("libui");
|
|
3060
|
+
const pageCount = Math.ceil(data.length / entriesPerPage);
|
|
3061
|
+
const firstEntry = data.length === 0 ? 0 : (currentPage - 1) * entriesPerPage + 1;
|
|
3062
|
+
const lastEntry = Math.min(firstEntry + entriesPerPage - 1, data.length);
|
|
3063
|
+
const currentEntries = data.slice(firstEntry - 1, lastEntry);
|
|
3064
|
+
return /* @__PURE__ */ jsxs48("div", { children: [
|
|
3065
|
+
/* @__PURE__ */ jsx126(LegacyTable, { data: currentEntries, ...props }),
|
|
3066
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center justify-between px-1 py-3", children: [
|
|
3067
|
+
/* @__PURE__ */ jsx126("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsx126("p", { className: "text-sm font-medium text-muted-foreground", children: t("pagination.info", {
|
|
3068
|
+
first: firstEntry,
|
|
3069
|
+
last: lastEntry,
|
|
3070
|
+
total: data.length
|
|
3071
|
+
}) }) }),
|
|
3072
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex flex-1 justify-between sm:justify-end", children: [
|
|
3073
|
+
/* @__PURE__ */ jsx126(
|
|
3074
|
+
"button",
|
|
3075
|
+
{
|
|
3076
|
+
className: "relative inline-flex items-center rounded-md border border-slate-300 bg-slate-50 px-4 py-2 text-sm font-medium text-muted-foreground disabled:opacity-75 dark:border-slate-600 dark:bg-slate-800",
|
|
3077
|
+
disabled: currentPage === 1,
|
|
3078
|
+
onClick: () => {
|
|
3079
|
+
setCurrentPage(currentPage - 1);
|
|
3080
|
+
},
|
|
3081
|
+
children: t("pagination.previous")
|
|
3082
|
+
}
|
|
3083
|
+
),
|
|
3084
|
+
/* @__PURE__ */ jsx126(
|
|
3085
|
+
"button",
|
|
3086
|
+
{
|
|
3087
|
+
className: "relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-slate-50 px-4 py-2 text-sm font-medium text-muted-foreground disabled:opacity-75 dark:border-slate-600 dark:bg-slate-800",
|
|
3088
|
+
disabled: currentPage === pageCount,
|
|
3089
|
+
onClick: () => {
|
|
3090
|
+
setCurrentPage(currentPage + 1);
|
|
3091
|
+
},
|
|
3092
|
+
children: t("pagination.next")
|
|
3093
|
+
}
|
|
3094
|
+
)
|
|
3095
|
+
] })
|
|
3096
|
+
] })
|
|
3097
|
+
] });
|
|
3098
|
+
};
|
|
3099
|
+
|
|
3100
|
+
// src/components/LineGraph/LineGraph.tsx
|
|
3101
|
+
import React86 from "react";
|
|
3102
|
+
import { toBasicISOString as toBasicISOString3 } from "@douglasneuroinformatics/libjs";
|
|
3103
|
+
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
2922
3104
|
import {
|
|
2923
3105
|
CartesianGrid,
|
|
2924
3106
|
ErrorBar,
|
|
@@ -2931,7 +3113,7 @@ import {
|
|
|
2931
3113
|
XAxis,
|
|
2932
3114
|
YAxis
|
|
2933
3115
|
} from "recharts";
|
|
2934
|
-
import { jsx as
|
|
3116
|
+
import { jsx as jsx127, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
2935
3117
|
import { createElement as createElement2 } from "react";
|
|
2936
3118
|
var strokeColors = {
|
|
2937
3119
|
dark: "#cbd5e1",
|
|
@@ -2958,11 +3140,11 @@ function LineGraphComponent({
|
|
|
2958
3140
|
lines,
|
|
2959
3141
|
xAxis
|
|
2960
3142
|
}) {
|
|
2961
|
-
const { i18n } =
|
|
3143
|
+
const { i18n } = useTranslation8("libui");
|
|
2962
3144
|
const [theme] = useTheme();
|
|
2963
|
-
return /* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
2965
|
-
/* @__PURE__ */
|
|
3145
|
+
return /* @__PURE__ */ jsx127(ResponsiveContainer, { height: 400, width: "100%", children: /* @__PURE__ */ jsxs49(LineChart, { data: [...data], margin: { bottom: 5, left: 15, right: 15, top: 5 }, children: [
|
|
3146
|
+
/* @__PURE__ */ jsx127(CartesianGrid, { stroke: "#64748b", strokeDasharray: "5 5" }),
|
|
3147
|
+
/* @__PURE__ */ jsx127(
|
|
2966
3148
|
XAxis,
|
|
2967
3149
|
{
|
|
2968
3150
|
axisLine: { stroke: "#64748b" },
|
|
@@ -2972,15 +3154,15 @@ function LineGraphComponent({
|
|
|
2972
3154
|
interval: "preserveStartEnd",
|
|
2973
3155
|
padding: { left: 20, right: 20 },
|
|
2974
3156
|
stroke: strokeColors[theme],
|
|
2975
|
-
tickFormatter: (time) =>
|
|
3157
|
+
tickFormatter: (time) => toBasicISOString3(new Date(time)),
|
|
2976
3158
|
tickLine: { stroke: "#64748b" },
|
|
2977
3159
|
tickMargin: 8,
|
|
2978
3160
|
tickSize: 8,
|
|
2979
3161
|
type: "number",
|
|
2980
|
-
children: /* @__PURE__ */
|
|
3162
|
+
children: /* @__PURE__ */ jsx127(Label6, { fill: strokeColors[theme], offset: 0, position: "insideBottom", value: xAxis?.label })
|
|
2981
3163
|
}
|
|
2982
3164
|
),
|
|
2983
|
-
/* @__PURE__ */
|
|
3165
|
+
/* @__PURE__ */ jsx127(
|
|
2984
3166
|
YAxis,
|
|
2985
3167
|
{
|
|
2986
3168
|
axisLine: { stroke: "#64748b" },
|
|
@@ -2991,7 +3173,7 @@ function LineGraphComponent({
|
|
|
2991
3173
|
width: 40
|
|
2992
3174
|
}
|
|
2993
3175
|
),
|
|
2994
|
-
/* @__PURE__ */
|
|
3176
|
+
/* @__PURE__ */ jsx127(
|
|
2995
3177
|
Tooltip,
|
|
2996
3178
|
{
|
|
2997
3179
|
contentStyle: tooltipStyles[theme],
|
|
@@ -3015,23 +3197,23 @@ function LineGraphComponent({
|
|
|
3015
3197
|
stroke: stroke ?? strokeColors[theme],
|
|
3016
3198
|
type: type ?? "linear"
|
|
3017
3199
|
},
|
|
3018
|
-
err && /* @__PURE__ */
|
|
3200
|
+
err && /* @__PURE__ */ jsx127(ErrorBar, { dataKey: err, stroke: "#64748b" })
|
|
3019
3201
|
)),
|
|
3020
|
-
/* @__PURE__ */
|
|
3202
|
+
/* @__PURE__ */ jsx127(Legend, { wrapperStyle: { paddingLeft: 40, paddingTop: 10 } })
|
|
3021
3203
|
] }) });
|
|
3022
3204
|
}
|
|
3023
|
-
var LineGraph =
|
|
3205
|
+
var LineGraph = React86.memo(LineGraphComponent);
|
|
3024
3206
|
|
|
3025
3207
|
// src/components/MenuBar/MenuBar.tsx
|
|
3026
|
-
import { Group as Group4, Menu as
|
|
3208
|
+
import { Group as Group4, Menu as Menu3, Portal as Portal10, RadioGroup as RadioGroup5, Sub as Sub3 } from "@radix-ui/react-menubar";
|
|
3027
3209
|
|
|
3028
3210
|
// src/components/MenuBar/MenuBarCheckboxItem.tsx
|
|
3029
|
-
import
|
|
3211
|
+
import React87 from "react";
|
|
3030
3212
|
import { CheckboxItem as CheckboxItem3, ItemIndicator as ItemIndicator6 } from "@radix-ui/react-menubar";
|
|
3031
3213
|
import { CheckIcon as CheckIcon6 } from "lucide-react";
|
|
3032
|
-
import { jsx as
|
|
3033
|
-
var MenuBarCheckboxItem =
|
|
3034
|
-
return /* @__PURE__ */
|
|
3214
|
+
import { jsx as jsx128, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
3215
|
+
var MenuBarCheckboxItem = React87.forwardRef(function MenuBarCheckboxItem2({ checked, children, className, ...props }, ref) {
|
|
3216
|
+
return /* @__PURE__ */ jsxs50(
|
|
3035
3217
|
CheckboxItem3,
|
|
3036
3218
|
{
|
|
3037
3219
|
checked,
|
|
@@ -3042,7 +3224,7 @@ var MenuBarCheckboxItem = React86.forwardRef(function MenuBarCheckboxItem2({ che
|
|
|
3042
3224
|
ref,
|
|
3043
3225
|
...props,
|
|
3044
3226
|
children: [
|
|
3045
|
-
/* @__PURE__ */
|
|
3227
|
+
/* @__PURE__ */ jsx128("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx128(ItemIndicator6, { children: /* @__PURE__ */ jsx128(CheckIcon6, { className: "h-4 w-4" }) }) }),
|
|
3046
3228
|
children
|
|
3047
3229
|
]
|
|
3048
3230
|
}
|
|
@@ -3050,11 +3232,11 @@ var MenuBarCheckboxItem = React86.forwardRef(function MenuBarCheckboxItem2({ che
|
|
|
3050
3232
|
});
|
|
3051
3233
|
|
|
3052
3234
|
// src/components/MenuBar/MenuBarContent.tsx
|
|
3053
|
-
import
|
|
3235
|
+
import React88 from "react";
|
|
3054
3236
|
import { Content as Content10, Portal as Portal9 } from "@radix-ui/react-menubar";
|
|
3055
|
-
import { jsx as
|
|
3056
|
-
var MenuBarContent =
|
|
3057
|
-
return /* @__PURE__ */
|
|
3237
|
+
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
3238
|
+
var MenuBarContent = React88.forwardRef(function MenuBarContent2({ align = "start", alignOffset = -4, className, sideOffset = 8, ...props }, ref) {
|
|
3239
|
+
return /* @__PURE__ */ jsx129(Portal9, { children: /* @__PURE__ */ jsx129(
|
|
3058
3240
|
Content10,
|
|
3059
3241
|
{
|
|
3060
3242
|
align,
|
|
@@ -3071,11 +3253,11 @@ var MenuBarContent = React87.forwardRef(function MenuBarContent2({ align = "star
|
|
|
3071
3253
|
});
|
|
3072
3254
|
|
|
3073
3255
|
// src/components/MenuBar/MenuBarItem.tsx
|
|
3074
|
-
import
|
|
3256
|
+
import React89 from "react";
|
|
3075
3257
|
import { Item as Item6 } from "@radix-ui/react-menubar";
|
|
3076
|
-
import { jsx as
|
|
3077
|
-
var MenuBarItem =
|
|
3078
|
-
return /* @__PURE__ */
|
|
3258
|
+
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
3259
|
+
var MenuBarItem = React89.forwardRef(function MenuBarItem2({ className, inset, ...props }, ref) {
|
|
3260
|
+
return /* @__PURE__ */ jsx130(
|
|
3079
3261
|
Item6,
|
|
3080
3262
|
{
|
|
3081
3263
|
className: cn(
|
|
@@ -3090,20 +3272,20 @@ var MenuBarItem = React88.forwardRef(function MenuBarItem2({ className, inset, .
|
|
|
3090
3272
|
});
|
|
3091
3273
|
|
|
3092
3274
|
// src/components/MenuBar/MenuBarLabel.tsx
|
|
3093
|
-
import
|
|
3275
|
+
import React90 from "react";
|
|
3094
3276
|
import { Label as Label7 } from "@radix-ui/react-menubar";
|
|
3095
|
-
import { jsx as
|
|
3096
|
-
var MenuBarLabel =
|
|
3097
|
-
return /* @__PURE__ */
|
|
3277
|
+
import { jsx as jsx131 } from "react/jsx-runtime";
|
|
3278
|
+
var MenuBarLabel = React90.forwardRef(function MenuBarLabel2({ className, inset, ...props }, ref) {
|
|
3279
|
+
return /* @__PURE__ */ jsx131(Label7, { className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ref, ...props });
|
|
3098
3280
|
});
|
|
3099
3281
|
|
|
3100
3282
|
// src/components/MenuBar/MenuBarRadioItem.tsx
|
|
3101
|
-
import
|
|
3283
|
+
import React91 from "react";
|
|
3102
3284
|
import { ItemIndicator as ItemIndicator7, RadioItem as RadioItem3 } from "@radix-ui/react-menubar";
|
|
3103
3285
|
import { CircleIcon as CircleIcon4 } from "lucide-react";
|
|
3104
|
-
import { jsx as
|
|
3105
|
-
var MenuBarRadioItem =
|
|
3106
|
-
return /* @__PURE__ */
|
|
3286
|
+
import { jsx as jsx132, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
3287
|
+
var MenuBarRadioItem = React91.forwardRef(function MenuBarRadioItem2({ children, className, ...props }, ref) {
|
|
3288
|
+
return /* @__PURE__ */ jsxs51(
|
|
3107
3289
|
RadioItem3,
|
|
3108
3290
|
{
|
|
3109
3291
|
className: cn(
|
|
@@ -3113,7 +3295,7 @@ var MenuBarRadioItem = React90.forwardRef(function MenuBarRadioItem2({ children,
|
|
|
3113
3295
|
ref,
|
|
3114
3296
|
...props,
|
|
3115
3297
|
children: [
|
|
3116
|
-
/* @__PURE__ */
|
|
3298
|
+
/* @__PURE__ */ jsx132("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx132(ItemIndicator7, { children: /* @__PURE__ */ jsx132(CircleIcon4, { className: "fill-current", style: { height: 8, width: 8 } }) }) }),
|
|
3117
3299
|
children
|
|
3118
3300
|
]
|
|
3119
3301
|
}
|
|
@@ -3121,12 +3303,12 @@ var MenuBarRadioItem = React90.forwardRef(function MenuBarRadioItem2({ children,
|
|
|
3121
3303
|
});
|
|
3122
3304
|
|
|
3123
3305
|
// src/components/MenuBar/MenuBarRoot.tsx
|
|
3124
|
-
import
|
|
3306
|
+
import React92 from "react";
|
|
3125
3307
|
import { Root as Root15 } from "@radix-ui/react-menubar";
|
|
3126
|
-
import { jsx as
|
|
3127
|
-
var MenuBarRoot =
|
|
3308
|
+
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
3309
|
+
var MenuBarRoot = React92.forwardRef(
|
|
3128
3310
|
function MenuBarRoot2({ className, ...props }, ref) {
|
|
3129
|
-
return /* @__PURE__ */
|
|
3311
|
+
return /* @__PURE__ */ jsx133(
|
|
3130
3312
|
Root15,
|
|
3131
3313
|
{
|
|
3132
3314
|
className: cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", className),
|
|
@@ -3138,26 +3320,26 @@ var MenuBarRoot = React91.forwardRef(
|
|
|
3138
3320
|
);
|
|
3139
3321
|
|
|
3140
3322
|
// src/components/MenuBar/MenuBarSeparator.tsx
|
|
3141
|
-
import
|
|
3323
|
+
import React93 from "react";
|
|
3142
3324
|
import { Separator as Separator4 } from "@radix-ui/react-menubar";
|
|
3143
|
-
import { jsx as
|
|
3144
|
-
var MenuBarSeparator =
|
|
3145
|
-
return /* @__PURE__ */
|
|
3325
|
+
import { jsx as jsx134 } from "react/jsx-runtime";
|
|
3326
|
+
var MenuBarSeparator = React93.forwardRef(function MenuBarSeparator2({ className, ...props }, ref) {
|
|
3327
|
+
return /* @__PURE__ */ jsx134(Separator4, { className: cn("-mx-1 my-1 h-px bg-muted", className), ref, ...props });
|
|
3146
3328
|
});
|
|
3147
3329
|
|
|
3148
3330
|
// src/components/MenuBar/MenuBarShortcut.tsx
|
|
3149
3331
|
import "react";
|
|
3150
|
-
import { jsx as
|
|
3332
|
+
import { jsx as jsx135 } from "react/jsx-runtime";
|
|
3151
3333
|
var MenuBarShortcut = ({ className, ...props }) => {
|
|
3152
|
-
return /* @__PURE__ */
|
|
3334
|
+
return /* @__PURE__ */ jsx135("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
3153
3335
|
};
|
|
3154
3336
|
|
|
3155
3337
|
// src/components/MenuBar/MenuBarSubContent.tsx
|
|
3156
|
-
import
|
|
3338
|
+
import React95 from "react";
|
|
3157
3339
|
import { SubContent as SubContent3 } from "@radix-ui/react-menubar";
|
|
3158
|
-
import { jsx as
|
|
3159
|
-
var MenuBarSubContent =
|
|
3160
|
-
return /* @__PURE__ */
|
|
3340
|
+
import { jsx as jsx136 } from "react/jsx-runtime";
|
|
3341
|
+
var MenuBarSubContent = React95.forwardRef(function MenuBarSubContent2({ className, ...props }, ref) {
|
|
3342
|
+
return /* @__PURE__ */ jsx136(
|
|
3161
3343
|
SubContent3,
|
|
3162
3344
|
{
|
|
3163
3345
|
className: cn(
|
|
@@ -3171,12 +3353,12 @@ var MenuBarSubContent = React94.forwardRef(function MenuBarSubContent2({ classNa
|
|
|
3171
3353
|
});
|
|
3172
3354
|
|
|
3173
3355
|
// src/components/MenuBar/MenuBarSubTrigger.tsx
|
|
3174
|
-
import
|
|
3356
|
+
import React96 from "react";
|
|
3175
3357
|
import { SubTrigger as SubTrigger3 } from "@radix-ui/react-menubar";
|
|
3176
3358
|
import { ChevronRightIcon as ChevronRightIcon4 } from "lucide-react";
|
|
3177
|
-
import { jsx as
|
|
3178
|
-
var MenuBarSubTrigger =
|
|
3179
|
-
return /* @__PURE__ */
|
|
3359
|
+
import { jsx as jsx137, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
3360
|
+
var MenuBarSubTrigger = React96.forwardRef(function MenuBarSubTrigger2({ children, className, inset, ...props }, ref) {
|
|
3361
|
+
return /* @__PURE__ */ jsxs52(
|
|
3180
3362
|
SubTrigger3,
|
|
3181
3363
|
{
|
|
3182
3364
|
className: cn(
|
|
@@ -3188,18 +3370,18 @@ var MenuBarSubTrigger = React95.forwardRef(function MenuBarSubTrigger2({ childre
|
|
|
3188
3370
|
...props,
|
|
3189
3371
|
children: [
|
|
3190
3372
|
children,
|
|
3191
|
-
/* @__PURE__ */
|
|
3373
|
+
/* @__PURE__ */ jsx137(ChevronRightIcon4, { className: "ml-auto h-4 w-4" })
|
|
3192
3374
|
]
|
|
3193
3375
|
}
|
|
3194
3376
|
);
|
|
3195
3377
|
});
|
|
3196
3378
|
|
|
3197
3379
|
// src/components/MenuBar/MenuBarTrigger.tsx
|
|
3198
|
-
import
|
|
3380
|
+
import React97 from "react";
|
|
3199
3381
|
import { Trigger as Trigger9 } from "@radix-ui/react-menubar";
|
|
3200
|
-
import { jsx as
|
|
3201
|
-
var MenuBarTrigger =
|
|
3202
|
-
return /* @__PURE__ */
|
|
3382
|
+
import { jsx as jsx138 } from "react/jsx-runtime";
|
|
3383
|
+
var MenuBarTrigger = React97.forwardRef(function MenuBarTrigger2({ className, ...props }, ref) {
|
|
3384
|
+
return /* @__PURE__ */ jsx138(
|
|
3203
3385
|
Trigger9,
|
|
3204
3386
|
{
|
|
3205
3387
|
className: cn(
|
|
@@ -3219,7 +3401,7 @@ var MenuBar = Object.assign(MenuBarRoot, {
|
|
|
3219
3401
|
Group: Group4,
|
|
3220
3402
|
Item: MenuBarItem,
|
|
3221
3403
|
Label: MenuBarLabel,
|
|
3222
|
-
Menu:
|
|
3404
|
+
Menu: Menu3,
|
|
3223
3405
|
Portal: Portal10,
|
|
3224
3406
|
RadioGroup: RadioGroup5,
|
|
3225
3407
|
RadioItem: MenuBarRadioItem,
|
|
@@ -3234,30 +3416,30 @@ var MenuBar = Object.assign(MenuBarRoot, {
|
|
|
3234
3416
|
// src/components/NotificationHub/NotificationHub.tsx
|
|
3235
3417
|
import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
|
|
3236
3418
|
import { XIcon as XIcon2 } from "lucide-react";
|
|
3237
|
-
import { useTranslation as
|
|
3419
|
+
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
3238
3420
|
|
|
3239
3421
|
// src/components/NotificationHub/NotificationIcon.tsx
|
|
3240
3422
|
import { CheckCircleIcon, ExclamationCircleIcon, InformationCircleIcon, XCircleIcon } from "@heroicons/react/24/solid";
|
|
3241
|
-
import { jsx as
|
|
3423
|
+
import { jsx as jsx139 } from "react/jsx-runtime";
|
|
3242
3424
|
var NotificationIcon = ({ type }) => {
|
|
3243
3425
|
switch (type) {
|
|
3244
3426
|
case "info":
|
|
3245
|
-
return /* @__PURE__ */
|
|
3427
|
+
return /* @__PURE__ */ jsx139(InformationCircleIcon, { "aria-hidden": "true", className: "h-6 w-6 text-blue-500" });
|
|
3246
3428
|
case "success":
|
|
3247
|
-
return /* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ jsx139(CheckCircleIcon, { "aria-hidden": "true", className: "h-6 w-6 text-green-500" });
|
|
3248
3430
|
case "warning":
|
|
3249
|
-
return /* @__PURE__ */
|
|
3431
|
+
return /* @__PURE__ */ jsx139(ExclamationCircleIcon, { "aria-hidden": "true", className: "h-6 w-6 text-yellow-500" });
|
|
3250
3432
|
case "error":
|
|
3251
|
-
return /* @__PURE__ */
|
|
3433
|
+
return /* @__PURE__ */ jsx139(XCircleIcon, { "aria-hidden": "true", className: "h-6 w-6 text-red-500" });
|
|
3252
3434
|
}
|
|
3253
3435
|
};
|
|
3254
3436
|
|
|
3255
3437
|
// src/components/NotificationHub/NotificationHub.tsx
|
|
3256
|
-
import { jsx as
|
|
3438
|
+
import { jsx as jsx140, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
3257
3439
|
var NotificationHub = ({ timeout = 5e3 }) => {
|
|
3258
|
-
const { t } =
|
|
3440
|
+
const { t } = useTranslation9("libui");
|
|
3259
3441
|
const { dismissNotification, notifications } = useNotificationsStore();
|
|
3260
|
-
return /* @__PURE__ */
|
|
3442
|
+
return /* @__PURE__ */ jsx140("div", { className: "fixed bottom-0 z-50 w-full print:hidden", children: /* @__PURE__ */ jsx140(AnimatePresence3, { children: notifications.map((item) => /* @__PURE__ */ jsx140(
|
|
3261
3443
|
motion3.div,
|
|
3262
3444
|
{
|
|
3263
3445
|
animate: { height: "auto", opacity: 1 },
|
|
@@ -3265,12 +3447,12 @@ var NotificationHub = ({ timeout = 5e3 }) => {
|
|
|
3265
3447
|
exit: { height: 0, opacity: 0 },
|
|
3266
3448
|
initial: { height: 0, opacity: 0 },
|
|
3267
3449
|
transition: { bounce: 0.1, type: "spring" },
|
|
3268
|
-
children: /* @__PURE__ */
|
|
3269
|
-
/* @__PURE__ */
|
|
3270
|
-
/* @__PURE__ */
|
|
3271
|
-
/* @__PURE__ */
|
|
3272
|
-
/* @__PURE__ */
|
|
3273
|
-
/* @__PURE__ */
|
|
3450
|
+
children: /* @__PURE__ */ jsx140("div", { className: "w-full p-2", children: /* @__PURE__ */ jsxs53(Card, { className: "w-full rounded-lg p-0", children: [
|
|
3451
|
+
/* @__PURE__ */ jsxs53("div", { className: "p-4", children: [
|
|
3452
|
+
/* @__PURE__ */ jsxs53("div", { className: "mb-2 flex items-center", children: [
|
|
3453
|
+
/* @__PURE__ */ jsx140(NotificationIcon, { type: item.type }),
|
|
3454
|
+
/* @__PURE__ */ jsx140("h5", { className: "ml-3 flex-grow font-medium text-slate-900 dark:text-slate-100", children: item.title ?? t(`notifications.types.${item.type}`) }),
|
|
3455
|
+
/* @__PURE__ */ jsx140(
|
|
3274
3456
|
"button",
|
|
3275
3457
|
{
|
|
3276
3458
|
className: "inline-flex rounded-md text-slate-400 hover:text-slate-500 focus:outline-none focus:ring-1 focus:ring-sky-500 dark:focus:ring-sky-600",
|
|
@@ -3278,13 +3460,13 @@ var NotificationHub = ({ timeout = 5e3 }) => {
|
|
|
3278
3460
|
onClick: () => {
|
|
3279
3461
|
dismissNotification(item.id);
|
|
3280
3462
|
},
|
|
3281
|
-
children: /* @__PURE__ */
|
|
3463
|
+
children: /* @__PURE__ */ jsx140(XIcon2, { "aria-hidden": "true", className: "h-5 w-5" })
|
|
3282
3464
|
}
|
|
3283
3465
|
)
|
|
3284
3466
|
] }),
|
|
3285
|
-
/* @__PURE__ */
|
|
3467
|
+
/* @__PURE__ */ jsx140("p", { className: "my-2 text-muted-foreground", children: item.message })
|
|
3286
3468
|
] }),
|
|
3287
|
-
/* @__PURE__ */
|
|
3469
|
+
/* @__PURE__ */ jsx140(
|
|
3288
3470
|
motion3.div,
|
|
3289
3471
|
{
|
|
3290
3472
|
animate: { width: "100%" },
|
|
@@ -3304,26 +3486,26 @@ var NotificationHub = ({ timeout = 5e3 }) => {
|
|
|
3304
3486
|
|
|
3305
3487
|
// src/components/Pagination/PaginationContent.tsx
|
|
3306
3488
|
import "react";
|
|
3307
|
-
import { jsx as
|
|
3308
|
-
var PaginationContent = ({ className, ...props }) => /* @__PURE__ */
|
|
3489
|
+
import { jsx as jsx141 } from "react/jsx-runtime";
|
|
3490
|
+
var PaginationContent = ({ className, ...props }) => /* @__PURE__ */ jsx141("ul", { className: cn("flex flex-row items-center gap-1", className), ...props });
|
|
3309
3491
|
|
|
3310
3492
|
// src/components/Pagination/PaginationEllipsis.tsx
|
|
3311
3493
|
import "react";
|
|
3312
3494
|
import { MoreHorizontalIcon as MoreHorizontalIcon2 } from "lucide-react";
|
|
3313
|
-
import { jsx as
|
|
3314
|
-
var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */
|
|
3315
|
-
/* @__PURE__ */
|
|
3316
|
-
/* @__PURE__ */
|
|
3495
|
+
import { jsx as jsx142, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
3496
|
+
var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs54("span", { "aria-hidden": true, className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [
|
|
3497
|
+
/* @__PURE__ */ jsx142(MoreHorizontalIcon2, { className: "h-4 w-4" }),
|
|
3498
|
+
/* @__PURE__ */ jsx142("span", { className: "sr-only", children: "More pages" })
|
|
3317
3499
|
] });
|
|
3318
3500
|
|
|
3319
3501
|
// src/components/Pagination/PaginationItem.tsx
|
|
3320
|
-
import { jsx as
|
|
3321
|
-
var PaginationItem = ({ className, ...props }) => /* @__PURE__ */
|
|
3502
|
+
import { jsx as jsx143 } from "react/jsx-runtime";
|
|
3503
|
+
var PaginationItem = ({ className, ...props }) => /* @__PURE__ */ jsx143("li", { className, ...props });
|
|
3322
3504
|
|
|
3323
3505
|
// src/components/Pagination/PaginationLink.tsx
|
|
3324
3506
|
import "react";
|
|
3325
|
-
import { jsx as
|
|
3326
|
-
var PaginationLink = ({ children, className, isActive, size = "icon", ...props }) => /* @__PURE__ */
|
|
3507
|
+
import { jsx as jsx144 } from "react/jsx-runtime";
|
|
3508
|
+
var PaginationLink = ({ children, className, isActive, size = "icon", ...props }) => /* @__PURE__ */ jsx144(
|
|
3327
3509
|
"a",
|
|
3328
3510
|
{
|
|
3329
3511
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -3342,32 +3524,32 @@ var PaginationLink = ({ children, className, isActive, size = "icon", ...props }
|
|
|
3342
3524
|
// src/components/Pagination/PaginationNext.tsx
|
|
3343
3525
|
import "react";
|
|
3344
3526
|
import { ChevronRightIcon as ChevronRightIcon5 } from "lucide-react";
|
|
3345
|
-
import { useTranslation as
|
|
3346
|
-
import { jsx as
|
|
3527
|
+
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
3528
|
+
import { jsx as jsx145, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
3347
3529
|
var PaginationNext = ({ className, ...props }) => {
|
|
3348
|
-
const { t } =
|
|
3349
|
-
return /* @__PURE__ */
|
|
3350
|
-
/* @__PURE__ */
|
|
3351
|
-
/* @__PURE__ */
|
|
3530
|
+
const { t } = useTranslation10("libui");
|
|
3531
|
+
return /* @__PURE__ */ jsxs55(PaginationLink, { "aria-label": "Go to next page", className: cn("gap-1 pr-2.5", className), size: "md", ...props, children: [
|
|
3532
|
+
/* @__PURE__ */ jsx145("span", { children: t("pagination.next") }),
|
|
3533
|
+
/* @__PURE__ */ jsx145(ChevronRightIcon5, { className: "h-4 w-4" })
|
|
3352
3534
|
] });
|
|
3353
3535
|
};
|
|
3354
3536
|
|
|
3355
3537
|
// src/components/Pagination/PaginationPrevious.tsx
|
|
3356
3538
|
import { ChevronLeftIcon } from "lucide-react";
|
|
3357
|
-
import { useTranslation as
|
|
3358
|
-
import { jsx as
|
|
3539
|
+
import { useTranslation as useTranslation11 } from "react-i18next";
|
|
3540
|
+
import { jsx as jsx146, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
3359
3541
|
var PaginationPrevious = ({ className, ...props }) => {
|
|
3360
|
-
const { t } =
|
|
3361
|
-
return /* @__PURE__ */
|
|
3362
|
-
/* @__PURE__ */
|
|
3363
|
-
/* @__PURE__ */
|
|
3542
|
+
const { t } = useTranslation11("libui");
|
|
3543
|
+
return /* @__PURE__ */ jsxs56(PaginationLink, { "aria-label": "Go to previous page", className: cn("gap-1 pl-2.5", className), size: "md", ...props, children: [
|
|
3544
|
+
/* @__PURE__ */ jsx146(ChevronLeftIcon, { className: "h-4 w-4" }),
|
|
3545
|
+
/* @__PURE__ */ jsx146("span", { children: t("pagination.previous") })
|
|
3364
3546
|
] });
|
|
3365
3547
|
};
|
|
3366
3548
|
|
|
3367
3549
|
// src/components/Pagination/PaginationRoot.tsx
|
|
3368
3550
|
import "react";
|
|
3369
|
-
import { jsx as
|
|
3370
|
-
var PaginationRoot = ({ className, ...props }) => /* @__PURE__ */
|
|
3551
|
+
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
3552
|
+
var PaginationRoot = ({ className, ...props }) => /* @__PURE__ */ jsx147(
|
|
3371
3553
|
"nav",
|
|
3372
3554
|
{
|
|
3373
3555
|
"aria-label": "pagination",
|
|
@@ -3388,17 +3570,17 @@ var Pagination = Object.assign(PaginationRoot, {
|
|
|
3388
3570
|
});
|
|
3389
3571
|
|
|
3390
3572
|
// src/components/Progress/Progress.tsx
|
|
3391
|
-
import
|
|
3573
|
+
import React103 from "react";
|
|
3392
3574
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3393
|
-
import { jsx as
|
|
3394
|
-
var Progress =
|
|
3395
|
-
return /* @__PURE__ */
|
|
3575
|
+
import { jsx as jsx148 } from "react/jsx-runtime";
|
|
3576
|
+
var Progress = React103.forwardRef(function Progress2({ className, value, ...props }, ref) {
|
|
3577
|
+
return /* @__PURE__ */ jsx148(
|
|
3396
3578
|
ProgressPrimitive.Root,
|
|
3397
3579
|
{
|
|
3398
3580
|
className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
|
|
3399
3581
|
ref,
|
|
3400
3582
|
...props,
|
|
3401
|
-
children: /* @__PURE__ */
|
|
3583
|
+
children: /* @__PURE__ */ jsx148(
|
|
3402
3584
|
ProgressPrimitive.Indicator,
|
|
3403
3585
|
{
|
|
3404
3586
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
@@ -3416,8 +3598,8 @@ import { Panel } from "react-resizable-panels";
|
|
|
3416
3598
|
// src/components/Resizable/ResizableHandle.tsx
|
|
3417
3599
|
import { GripVertical } from "lucide-react";
|
|
3418
3600
|
import { PanelResizeHandle } from "react-resizable-panels";
|
|
3419
|
-
import { jsx as
|
|
3420
|
-
var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */
|
|
3601
|
+
import { jsx as jsx149 } from "react/jsx-runtime";
|
|
3602
|
+
var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */ jsx149(
|
|
3421
3603
|
PanelResizeHandle,
|
|
3422
3604
|
{
|
|
3423
3605
|
className: cn(
|
|
@@ -3425,14 +3607,14 @@ var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */ j
|
|
|
3425
3607
|
className
|
|
3426
3608
|
),
|
|
3427
3609
|
...props,
|
|
3428
|
-
children: withHandle && /* @__PURE__ */
|
|
3610
|
+
children: withHandle && /* @__PURE__ */ jsx149("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx149(GripVertical, { className: "h-2.5 w-2.5" }) })
|
|
3429
3611
|
}
|
|
3430
3612
|
);
|
|
3431
3613
|
|
|
3432
3614
|
// src/components/Resizable/ResizablePanelGroup.tsx
|
|
3433
3615
|
import { PanelGroup } from "react-resizable-panels";
|
|
3434
|
-
import { jsx as
|
|
3435
|
-
var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */
|
|
3616
|
+
import { jsx as jsx150 } from "react/jsx-runtime";
|
|
3617
|
+
var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx150(
|
|
3436
3618
|
PanelGroup,
|
|
3437
3619
|
{
|
|
3438
3620
|
className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
@@ -3441,8 +3623,8 @@ var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx147(
|
|
|
3441
3623
|
);
|
|
3442
3624
|
|
|
3443
3625
|
// src/components/Resizable/Resizable.tsx
|
|
3444
|
-
import { Fragment, jsx as
|
|
3445
|
-
var ResizableRoot = ({ children }) => /* @__PURE__ */
|
|
3626
|
+
import { Fragment, jsx as jsx151 } from "react/jsx-runtime";
|
|
3627
|
+
var ResizableRoot = ({ children }) => /* @__PURE__ */ jsx151(Fragment, { children });
|
|
3446
3628
|
var Resizable = Object.assign(ResizableRoot, {
|
|
3447
3629
|
Handle: ResizableHandle,
|
|
3448
3630
|
Panel,
|
|
@@ -3451,13 +3633,13 @@ var Resizable = Object.assign(ResizableRoot, {
|
|
|
3451
3633
|
|
|
3452
3634
|
// src/components/SearchBar/SearchBar.tsx
|
|
3453
3635
|
import { SearchIcon as SearchIcon2 } from "lucide-react";
|
|
3454
|
-
import { useTranslation as
|
|
3455
|
-
import { jsx as
|
|
3456
|
-
var SearchBar = ({ className, onValueChange, placeholder, value }) => {
|
|
3457
|
-
const { t } =
|
|
3458
|
-
return /* @__PURE__ */
|
|
3459
|
-
/* @__PURE__ */
|
|
3460
|
-
/* @__PURE__ */
|
|
3636
|
+
import { useTranslation as useTranslation12 } from "react-i18next";
|
|
3637
|
+
import { jsx as jsx152, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
3638
|
+
var SearchBar = ({ className, onClick, onValueChange, placeholder, value }) => {
|
|
3639
|
+
const { t } = useTranslation12("libui");
|
|
3640
|
+
return /* @__PURE__ */ jsxs57("form", { className: cn("relative", className), children: [
|
|
3641
|
+
/* @__PURE__ */ jsx152(SearchIcon2, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
|
|
3642
|
+
/* @__PURE__ */ jsx152(
|
|
3461
3643
|
Input,
|
|
3462
3644
|
{
|
|
3463
3645
|
className: "pl-8",
|
|
@@ -3466,18 +3648,19 @@ var SearchBar = ({ className, onValueChange, placeholder, value }) => {
|
|
|
3466
3648
|
value,
|
|
3467
3649
|
onChange: (event) => {
|
|
3468
3650
|
onValueChange?.(event.target.value);
|
|
3469
|
-
}
|
|
3651
|
+
},
|
|
3652
|
+
onClick: () => onClick?.()
|
|
3470
3653
|
}
|
|
3471
3654
|
)
|
|
3472
3655
|
] });
|
|
3473
3656
|
};
|
|
3474
3657
|
|
|
3475
3658
|
// src/components/Separator/Separator.tsx
|
|
3476
|
-
import
|
|
3659
|
+
import React105 from "react";
|
|
3477
3660
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3478
|
-
import { jsx as
|
|
3479
|
-
var Separator5 =
|
|
3480
|
-
return /* @__PURE__ */
|
|
3661
|
+
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
3662
|
+
var Separator5 = React105.forwardRef(function Separator6({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
|
|
3663
|
+
return /* @__PURE__ */ jsx153(
|
|
3481
3664
|
SeparatorPrimitive.Root,
|
|
3482
3665
|
{
|
|
3483
3666
|
className: cn(
|
|
@@ -3498,11 +3681,11 @@ var Separator5 = React104.forwardRef(function Separator6({ className, decorative
|
|
|
3498
3681
|
import { Close as Close3, Portal as Portal12, Root as Root18, Trigger as Trigger10 } from "@radix-ui/react-dialog";
|
|
3499
3682
|
|
|
3500
3683
|
// src/components/Sheet/SheetContent.tsx
|
|
3501
|
-
import
|
|
3684
|
+
import React106 from "react";
|
|
3502
3685
|
import { Close as Close2, Content as Content11, Overlay as Overlay3, Portal as Portal11 } from "@radix-ui/react-dialog";
|
|
3503
3686
|
import { cva as cva5 } from "class-variance-authority";
|
|
3504
3687
|
import { XIcon as XIcon3 } from "lucide-react";
|
|
3505
|
-
import { jsx as
|
|
3688
|
+
import { jsx as jsx154, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
3506
3689
|
var sheetVariants = cva5(
|
|
3507
3690
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
3508
3691
|
{
|
|
@@ -3519,43 +3702,43 @@ var sheetVariants = cva5(
|
|
|
3519
3702
|
}
|
|
3520
3703
|
}
|
|
3521
3704
|
);
|
|
3522
|
-
var SheetContent =
|
|
3523
|
-
return /* @__PURE__ */
|
|
3524
|
-
/* @__PURE__ */
|
|
3525
|
-
/* @__PURE__ */
|
|
3705
|
+
var SheetContent = React106.forwardRef(function SheetContent2({ children, className, side = "right", ...props }, ref) {
|
|
3706
|
+
return /* @__PURE__ */ jsxs58(Portal11, { children: [
|
|
3707
|
+
/* @__PURE__ */ jsx154(Overlay3, {}),
|
|
3708
|
+
/* @__PURE__ */ jsxs58(Content11, { className: cn(sheetVariants({ side }), className), ref, ...props, children: [
|
|
3526
3709
|
children,
|
|
3527
|
-
/* @__PURE__ */
|
|
3528
|
-
/* @__PURE__ */
|
|
3529
|
-
/* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ jsxs58(Close2, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
3711
|
+
/* @__PURE__ */ jsx154(XIcon3, { className: "h-4 w-4" }),
|
|
3712
|
+
/* @__PURE__ */ jsx154("span", { className: "sr-only", children: "Close" })
|
|
3530
3713
|
] })
|
|
3531
3714
|
] })
|
|
3532
3715
|
] });
|
|
3533
3716
|
});
|
|
3534
3717
|
|
|
3535
3718
|
// src/components/Sheet/SheetDescription.tsx
|
|
3536
|
-
import
|
|
3719
|
+
import React107 from "react";
|
|
3537
3720
|
import { Description as Description3 } from "@radix-ui/react-dialog";
|
|
3538
|
-
import { jsx as
|
|
3539
|
-
var SheetDescription =
|
|
3540
|
-
return /* @__PURE__ */
|
|
3721
|
+
import { jsx as jsx155 } from "react/jsx-runtime";
|
|
3722
|
+
var SheetDescription = React107.forwardRef(function SheetDescription2({ className, ...props }, ref) {
|
|
3723
|
+
return /* @__PURE__ */ jsx155(Description3, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
|
|
3541
3724
|
});
|
|
3542
3725
|
|
|
3543
3726
|
// src/components/Sheet/SheetFooter.tsx
|
|
3544
3727
|
import "react";
|
|
3545
|
-
import { jsx as
|
|
3546
|
-
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
3728
|
+
import { jsx as jsx156 } from "react/jsx-runtime";
|
|
3729
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx156("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
3547
3730
|
|
|
3548
3731
|
// src/components/Sheet/SheetHeader.tsx
|
|
3549
3732
|
import "react";
|
|
3550
|
-
import { jsx as
|
|
3551
|
-
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
3733
|
+
import { jsx as jsx157 } from "react/jsx-runtime";
|
|
3734
|
+
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx157("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
3552
3735
|
|
|
3553
3736
|
// src/components/Sheet/SheetOverlay.tsx
|
|
3554
|
-
import
|
|
3737
|
+
import React110 from "react";
|
|
3555
3738
|
import { Overlay as Overlay4 } from "@radix-ui/react-dialog";
|
|
3556
|
-
import { jsx as
|
|
3557
|
-
var SheetOverlay =
|
|
3558
|
-
return /* @__PURE__ */
|
|
3739
|
+
import { jsx as jsx158 } from "react/jsx-runtime";
|
|
3740
|
+
var SheetOverlay = React110.forwardRef(function SheetOverlay2({ className, ...props }, ref) {
|
|
3741
|
+
return /* @__PURE__ */ jsx158(
|
|
3559
3742
|
Overlay4,
|
|
3560
3743
|
{
|
|
3561
3744
|
className: cn(
|
|
@@ -3569,11 +3752,11 @@ var SheetOverlay = React109.forwardRef(function SheetOverlay2({ className, ...pr
|
|
|
3569
3752
|
});
|
|
3570
3753
|
|
|
3571
3754
|
// src/components/Sheet/SheetTitle.tsx
|
|
3572
|
-
import
|
|
3755
|
+
import React111 from "react";
|
|
3573
3756
|
import { Title as Title3 } from "@radix-ui/react-dialog";
|
|
3574
|
-
import { jsx as
|
|
3575
|
-
var SheetTitle =
|
|
3576
|
-
return /* @__PURE__ */
|
|
3757
|
+
import { jsx as jsx159 } from "react/jsx-runtime";
|
|
3758
|
+
var SheetTitle = React111.forwardRef(function SheetTitle2({ className, ...props }, ref) {
|
|
3759
|
+
return /* @__PURE__ */ jsx159(Title3, { className: cn("text-lg font-semibold text-foreground", className), ref, ...props });
|
|
3577
3760
|
});
|
|
3578
3761
|
|
|
3579
3762
|
// src/components/Sheet/Sheet.tsx
|
|
@@ -3590,9 +3773,9 @@ var Sheet = Object.assign(Root18, {
|
|
|
3590
3773
|
});
|
|
3591
3774
|
|
|
3592
3775
|
// src/components/Spinner/Spinner.tsx
|
|
3593
|
-
import { jsx as
|
|
3776
|
+
import { jsx as jsx160 } from "react/jsx-runtime";
|
|
3594
3777
|
var Spinner = ({ className, ...props }) => {
|
|
3595
|
-
return /* @__PURE__ */
|
|
3778
|
+
return /* @__PURE__ */ jsx160("div", { className: cn("flex h-full w-full items-center justify-center", className), ...props, children: /* @__PURE__ */ jsx160(
|
|
3596
3779
|
"span",
|
|
3597
3780
|
{
|
|
3598
3781
|
className: "relative animate-spinner overflow-hidden text-slate-900 dark:text-slate-100",
|
|
@@ -3609,8 +3792,8 @@ var Spinner = ({ className, ...props }) => {
|
|
|
3609
3792
|
};
|
|
3610
3793
|
|
|
3611
3794
|
// src/components/SpinnerIcon/SpinnerIcon.tsx
|
|
3612
|
-
import { jsx as
|
|
3613
|
-
var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */
|
|
3795
|
+
import { jsx as jsx161 } from "react/jsx-runtime";
|
|
3796
|
+
var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */ jsx161(
|
|
3614
3797
|
"svg",
|
|
3615
3798
|
{
|
|
3616
3799
|
className: cn("animate-spin", className),
|
|
@@ -3624,16 +3807,16 @@ var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */ jsx158(
|
|
|
3624
3807
|
width: "24",
|
|
3625
3808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3626
3809
|
...props,
|
|
3627
|
-
children: /* @__PURE__ */
|
|
3810
|
+
children: /* @__PURE__ */ jsx161("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
3628
3811
|
}
|
|
3629
3812
|
);
|
|
3630
3813
|
|
|
3631
3814
|
// src/components/Switch/Switch.tsx
|
|
3632
|
-
import
|
|
3815
|
+
import React112 from "react";
|
|
3633
3816
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3634
|
-
import { jsx as
|
|
3635
|
-
var Switch =
|
|
3636
|
-
return /* @__PURE__ */
|
|
3817
|
+
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
3818
|
+
var Switch = React112.forwardRef(function Switch2({ className, ...props }, ref) {
|
|
3819
|
+
return /* @__PURE__ */ jsx162(
|
|
3637
3820
|
SwitchPrimitives.Root,
|
|
3638
3821
|
{
|
|
3639
3822
|
className: cn(
|
|
@@ -3642,7 +3825,7 @@ var Switch = React111.forwardRef(function Switch2({ className, ...props }, ref)
|
|
|
3642
3825
|
),
|
|
3643
3826
|
...props,
|
|
3644
3827
|
ref,
|
|
3645
|
-
children: /* @__PURE__ */
|
|
3828
|
+
children: /* @__PURE__ */ jsx162(
|
|
3646
3829
|
SwitchPrimitives.Thumb,
|
|
3647
3830
|
{
|
|
3648
3831
|
className: cn(
|
|
@@ -3655,38 +3838,38 @@ var Switch = React111.forwardRef(function Switch2({ className, ...props }, ref)
|
|
|
3655
3838
|
});
|
|
3656
3839
|
|
|
3657
3840
|
// src/components/Table/TableBody.tsx
|
|
3658
|
-
import
|
|
3659
|
-
import { jsx as
|
|
3660
|
-
var TableBody =
|
|
3841
|
+
import React113 from "react";
|
|
3842
|
+
import { jsx as jsx163 } from "react/jsx-runtime";
|
|
3843
|
+
var TableBody = React113.forwardRef(
|
|
3661
3844
|
function TableBody2({ className, ...props }, ref) {
|
|
3662
|
-
return /* @__PURE__ */
|
|
3845
|
+
return /* @__PURE__ */ jsx163("tbody", { className: cn("[&_tr:last-child]:border-0", className), ref, ...props });
|
|
3663
3846
|
}
|
|
3664
3847
|
);
|
|
3665
3848
|
|
|
3666
3849
|
// src/components/Table/TableCaption.tsx
|
|
3667
|
-
import
|
|
3668
|
-
import { jsx as
|
|
3669
|
-
var TableCaption =
|
|
3850
|
+
import React114 from "react";
|
|
3851
|
+
import { jsx as jsx164 } from "react/jsx-runtime";
|
|
3852
|
+
var TableCaption = React114.forwardRef(
|
|
3670
3853
|
function TableCaption2({ className, ...props }, ref) {
|
|
3671
|
-
return /* @__PURE__ */
|
|
3854
|
+
return /* @__PURE__ */ jsx164("caption", { className: cn("mt-4 text-sm text-muted-foreground", className), ref, ...props });
|
|
3672
3855
|
}
|
|
3673
3856
|
);
|
|
3674
3857
|
|
|
3675
3858
|
// src/components/Table/TableCell.tsx
|
|
3676
|
-
import
|
|
3677
|
-
import { jsx as
|
|
3678
|
-
var TableCell =
|
|
3859
|
+
import React115 from "react";
|
|
3860
|
+
import { jsx as jsx165 } from "react/jsx-runtime";
|
|
3861
|
+
var TableCell = React115.forwardRef(
|
|
3679
3862
|
function TableCell2({ className, ...props }, ref) {
|
|
3680
|
-
return /* @__PURE__ */
|
|
3863
|
+
return /* @__PURE__ */ jsx165("td", { className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ref, ...props });
|
|
3681
3864
|
}
|
|
3682
3865
|
);
|
|
3683
3866
|
|
|
3684
3867
|
// src/components/Table/TableFooter.tsx
|
|
3685
|
-
import
|
|
3686
|
-
import { jsx as
|
|
3687
|
-
var TableFooter =
|
|
3868
|
+
import React116 from "react";
|
|
3869
|
+
import { jsx as jsx166 } from "react/jsx-runtime";
|
|
3870
|
+
var TableFooter = React116.forwardRef(
|
|
3688
3871
|
function TableFooter2({ className, ...props }, ref) {
|
|
3689
|
-
return /* @__PURE__ */
|
|
3872
|
+
return /* @__PURE__ */ jsx166(
|
|
3690
3873
|
"tfoot",
|
|
3691
3874
|
{
|
|
3692
3875
|
className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
|
|
@@ -3698,11 +3881,11 @@ var TableFooter = React115.forwardRef(
|
|
|
3698
3881
|
);
|
|
3699
3882
|
|
|
3700
3883
|
// src/components/Table/TableHead.tsx
|
|
3701
|
-
import
|
|
3702
|
-
import { jsx as
|
|
3703
|
-
var TableHead =
|
|
3884
|
+
import React117 from "react";
|
|
3885
|
+
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
3886
|
+
var TableHead = React117.forwardRef(
|
|
3704
3887
|
function TableHead2({ className, ...props }, ref) {
|
|
3705
|
-
return /* @__PURE__ */
|
|
3888
|
+
return /* @__PURE__ */ jsx167(
|
|
3706
3889
|
"th",
|
|
3707
3890
|
{
|
|
3708
3891
|
className: cn(
|
|
@@ -3717,27 +3900,27 @@ var TableHead = React116.forwardRef(
|
|
|
3717
3900
|
);
|
|
3718
3901
|
|
|
3719
3902
|
// src/components/Table/TableHeader.tsx
|
|
3720
|
-
import
|
|
3721
|
-
import { jsx as
|
|
3722
|
-
var TableHeader =
|
|
3903
|
+
import React118 from "react";
|
|
3904
|
+
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
3905
|
+
var TableHeader = React118.forwardRef(
|
|
3723
3906
|
function TableHeader2({ className, ...props }, ref) {
|
|
3724
|
-
return /* @__PURE__ */
|
|
3907
|
+
return /* @__PURE__ */ jsx168("thead", { className: cn("[&_tr]:border-b", className), ref, ...props });
|
|
3725
3908
|
}
|
|
3726
3909
|
);
|
|
3727
3910
|
|
|
3728
3911
|
// src/components/Table/TableRoot.tsx
|
|
3729
|
-
import
|
|
3730
|
-
import { jsx as
|
|
3731
|
-
var TableRoot =
|
|
3732
|
-
return /* @__PURE__ */
|
|
3912
|
+
import React119 from "react";
|
|
3913
|
+
import { jsx as jsx169 } from "react/jsx-runtime";
|
|
3914
|
+
var TableRoot = React119.forwardRef(function TableRoot2({ className, ...props }, ref) {
|
|
3915
|
+
return /* @__PURE__ */ jsx169("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx169("table", { className: cn("w-full caption-bottom text-sm", className), ref, ...props }) });
|
|
3733
3916
|
});
|
|
3734
3917
|
|
|
3735
3918
|
// src/components/Table/TableRow.tsx
|
|
3736
|
-
import
|
|
3737
|
-
import { jsx as
|
|
3738
|
-
var TableRow =
|
|
3919
|
+
import React120 from "react";
|
|
3920
|
+
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
3921
|
+
var TableRow = React120.forwardRef(
|
|
3739
3922
|
function TableRow2({ className, ...props }, ref) {
|
|
3740
|
-
return /* @__PURE__ */
|
|
3923
|
+
return /* @__PURE__ */ jsx170(
|
|
3741
3924
|
"tr",
|
|
3742
3925
|
{
|
|
3743
3926
|
className: cn("hover:bg-muted/50 border-b transition-colors data-[state=selected]:bg-muted", className),
|
|
@@ -3763,11 +3946,11 @@ var Table = Object.assign(TableRoot, {
|
|
|
3763
3946
|
import * as TabsPrimitive4 from "@radix-ui/react-tabs";
|
|
3764
3947
|
|
|
3765
3948
|
// src/components/Tabs/TabsContent.tsx
|
|
3766
|
-
import
|
|
3949
|
+
import React121 from "react";
|
|
3767
3950
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3768
|
-
import { jsx as
|
|
3769
|
-
var TabsContent =
|
|
3770
|
-
return /* @__PURE__ */
|
|
3951
|
+
import { jsx as jsx171 } from "react/jsx-runtime";
|
|
3952
|
+
var TabsContent = React121.forwardRef(function TabsContent2({ className, ...props }, ref) {
|
|
3953
|
+
return /* @__PURE__ */ jsx171(
|
|
3771
3954
|
TabsPrimitive.Content,
|
|
3772
3955
|
{
|
|
3773
3956
|
className: cn(
|
|
@@ -3781,11 +3964,11 @@ var TabsContent = React120.forwardRef(function TabsContent2({ className, ...prop
|
|
|
3781
3964
|
});
|
|
3782
3965
|
|
|
3783
3966
|
// src/components/Tabs/TabsList.tsx
|
|
3784
|
-
import
|
|
3967
|
+
import React122 from "react";
|
|
3785
3968
|
import * as TabsPrimitive2 from "@radix-ui/react-tabs";
|
|
3786
|
-
import { jsx as
|
|
3787
|
-
var TabsList =
|
|
3788
|
-
return /* @__PURE__ */
|
|
3969
|
+
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
3970
|
+
var TabsList = React122.forwardRef(function TabsList2({ className, ...props }, ref) {
|
|
3971
|
+
return /* @__PURE__ */ jsx172(
|
|
3789
3972
|
TabsPrimitive2.List,
|
|
3790
3973
|
{
|
|
3791
3974
|
className: cn(
|
|
@@ -3799,11 +3982,11 @@ var TabsList = React121.forwardRef(function TabsList2({ className, ...props }, r
|
|
|
3799
3982
|
});
|
|
3800
3983
|
|
|
3801
3984
|
// src/components/Tabs/TabsTrigger.tsx
|
|
3802
|
-
import
|
|
3985
|
+
import React123 from "react";
|
|
3803
3986
|
import * as TabsPrimitive3 from "@radix-ui/react-tabs";
|
|
3804
|
-
import { jsx as
|
|
3805
|
-
var TabsTrigger =
|
|
3806
|
-
return /* @__PURE__ */
|
|
3987
|
+
import { jsx as jsx173 } from "react/jsx-runtime";
|
|
3988
|
+
var TabsTrigger = React123.forwardRef(function TabsTrigger2({ className, ...props }, ref) {
|
|
3989
|
+
return /* @__PURE__ */ jsx173(
|
|
3807
3990
|
TabsPrimitive3.Trigger,
|
|
3808
3991
|
{
|
|
3809
3992
|
className: cn(
|
|
@@ -3825,25 +4008,37 @@ var Tabs = Object.assign(TabsPrimitive4.Root, {
|
|
|
3825
4008
|
|
|
3826
4009
|
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
3827
4010
|
import { MoonIcon, SunIcon } from "lucide-react";
|
|
3828
|
-
import { jsx as
|
|
3829
|
-
var ThemeToggle = () => {
|
|
4011
|
+
import { jsx as jsx174, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
4012
|
+
var ThemeToggle = ({ onClick, variant = "outline", ...props }) => {
|
|
3830
4013
|
const [theme, setTheme] = useTheme();
|
|
3831
4014
|
const toggleTheme = () => {
|
|
3832
4015
|
setTheme(theme === "dark" ? "light" : "dark");
|
|
3833
4016
|
};
|
|
3834
|
-
return /* @__PURE__ */
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
4017
|
+
return /* @__PURE__ */ jsxs59(
|
|
4018
|
+
Button,
|
|
4019
|
+
{
|
|
4020
|
+
size: "icon",
|
|
4021
|
+
variant,
|
|
4022
|
+
onClick: (event) => {
|
|
4023
|
+
toggleTheme();
|
|
4024
|
+
onClick?.(event);
|
|
4025
|
+
},
|
|
4026
|
+
...props,
|
|
4027
|
+
children: [
|
|
4028
|
+
/* @__PURE__ */ jsx174(SunIcon, { className: "rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
4029
|
+
/* @__PURE__ */ jsx174(MoonIcon, { className: "absolute rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
|
|
4030
|
+
]
|
|
4031
|
+
}
|
|
4032
|
+
);
|
|
3838
4033
|
};
|
|
3839
4034
|
|
|
3840
4035
|
// src/components/Tooltip/TooltipContent.tsx
|
|
3841
|
-
import
|
|
4036
|
+
import React124 from "react";
|
|
3842
4037
|
import { Content as Content13 } from "@radix-ui/react-tooltip";
|
|
3843
|
-
import { jsx as
|
|
3844
|
-
var TooltipContent =
|
|
4038
|
+
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
4039
|
+
var TooltipContent = React124.forwardRef(
|
|
3845
4040
|
function TooltipContent2({ className, collisionPadding = 0, sideOffset = 4, ...props }, ref) {
|
|
3846
|
-
return /* @__PURE__ */
|
|
4041
|
+
return /* @__PURE__ */ jsx175(
|
|
3847
4042
|
Content13,
|
|
3848
4043
|
{
|
|
3849
4044
|
className: cn(
|
|
@@ -3862,18 +4057,18 @@ var TooltipContent = React123.forwardRef(
|
|
|
3862
4057
|
// src/components/Tooltip/TooltipRoot.tsx
|
|
3863
4058
|
import "react";
|
|
3864
4059
|
import { Provider, Root as Root21 } from "@radix-ui/react-tooltip";
|
|
3865
|
-
import { jsx as
|
|
4060
|
+
import { jsx as jsx176 } from "react/jsx-runtime";
|
|
3866
4061
|
var TooltipRoot = ({ children, delayDuration = 0, skipDelayDuration = 300 }) => {
|
|
3867
|
-
return /* @__PURE__ */
|
|
4062
|
+
return /* @__PURE__ */ jsx176(Provider, { delayDuration, skipDelayDuration, children: /* @__PURE__ */ jsx176(Root21, { children }) });
|
|
3868
4063
|
};
|
|
3869
4064
|
|
|
3870
4065
|
// src/components/Tooltip/TooltipTrigger.tsx
|
|
3871
|
-
import
|
|
4066
|
+
import React126 from "react";
|
|
3872
4067
|
import { Trigger as Trigger12 } from "@radix-ui/react-tooltip";
|
|
3873
|
-
import { jsx as
|
|
3874
|
-
var TooltipTrigger =
|
|
4068
|
+
import { jsx as jsx177 } from "react/jsx-runtime";
|
|
4069
|
+
var TooltipTrigger = React126.forwardRef(
|
|
3875
4070
|
function TooltipTrigger2({ variant = "outline", ...props }, ref) {
|
|
3876
|
-
return /* @__PURE__ */
|
|
4071
|
+
return /* @__PURE__ */ jsx177(Trigger12, { asChild: true, ref, children: /* @__PURE__ */ jsx177(Button, { variant, ...props }) });
|
|
3877
4072
|
}
|
|
3878
4073
|
);
|
|
3879
4074
|
|
|
@@ -3909,11 +4104,13 @@ export {
|
|
|
3909
4104
|
Input,
|
|
3910
4105
|
Label3 as Label,
|
|
3911
4106
|
LanguageToggle,
|
|
4107
|
+
LegacyClientTable,
|
|
3912
4108
|
LegacyDropdown,
|
|
3913
4109
|
LegacyModal,
|
|
3914
4110
|
LegacySelectDropdown,
|
|
3915
4111
|
LegacySlider,
|
|
3916
4112
|
LegacyStepper,
|
|
4113
|
+
LegacyTable,
|
|
3917
4114
|
LineGraph,
|
|
3918
4115
|
MenuBar,
|
|
3919
4116
|
NotificationHub,
|