@pactor-app/ui 1.0.0 → 1.2.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 +25 -31
- package/dist/{chunk-D6G4J5XS.js → chunk-22TEN3ER.js} +169 -38
- package/dist/{chunk-GL7IO22L.js → chunk-2LYMCWEJ.js} +65 -1
- package/dist/chunk-HJPHJKVA.js +671 -0
- package/dist/{chunk-BZSRLTQQ.js → chunk-L45CSL6I.js} +5 -5
- package/dist/{chunk-FVZMNP5P.js → chunk-LMEJ242M.js} +357 -442
- package/dist/{chunk-TUXCPXPA.js → chunk-Q5NUGUJG.js} +195 -259
- package/dist/components/index.cjs +1123 -796
- package/dist/components/index.d.cts +105 -21
- package/dist/components/index.d.ts +105 -21
- package/dist/components/index.js +18 -14
- package/dist/index.cjs +1433 -988
- package/dist/index.d.cts +3 -36
- package/dist/index.d.ts +3 -36
- package/dist/index.js +38 -43
- package/dist/interaction/index.cjs +7 -7
- package/dist/interaction/index.d.cts +13 -16
- package/dist/interaction/index.d.ts +13 -16
- package/dist/interaction/index.js +5 -5
- package/dist/layout/index.cjs +655 -52
- package/dist/layout/index.d.cts +97 -19
- package/dist/layout/index.d.ts +97 -19
- package/dist/layout/index.js +17 -15
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.js +7 -7
- package/package.json +5 -5
- package/styles.css +88 -7
- package/dist/chunk-UR3I4WXQ.js +0 -236
|
@@ -79,6 +79,7 @@ __export(components_exports, {
|
|
|
79
79
|
Popover: () => Popover2,
|
|
80
80
|
Progress: () => Progress2,
|
|
81
81
|
RadioGroup: () => RadioGroup2,
|
|
82
|
+
RailTooltip: () => RailTooltip,
|
|
82
83
|
Resizable: () => Resizable,
|
|
83
84
|
ScrollArea: () => ScrollArea2,
|
|
84
85
|
Select: () => Select2,
|
|
@@ -100,11 +101,12 @@ __export(components_exports, {
|
|
|
100
101
|
ToggleGroup: () => ToggleGroup2,
|
|
101
102
|
Tooltip: () => Tooltip3,
|
|
102
103
|
Typography: () => Typography2,
|
|
103
|
-
|
|
104
|
+
builtinComponents: () => builtinComponents,
|
|
105
|
+
createComponentRegistry: () => createComponentRegistry,
|
|
104
106
|
normalizeIconName: () => normalizeIconName,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
registerBuiltinComponents: () => registerBuiltinComponents,
|
|
108
|
+
useFormContext: () => useFormContext,
|
|
109
|
+
useSidebarDrawer: () => useSidebarDrawer
|
|
108
110
|
});
|
|
109
111
|
module.exports = __toCommonJS(components_exports);
|
|
110
112
|
|
|
@@ -1866,7 +1868,19 @@ var ICONS = {
|
|
|
1866
1868
|
code: import_lucide_react10.Code,
|
|
1867
1869
|
database: import_lucide_react10.Database,
|
|
1868
1870
|
cloud: import_lucide_react10.Cloud,
|
|
1869
|
-
languages: import_lucide_react10.Languages
|
|
1871
|
+
languages: import_lucide_react10.Languages,
|
|
1872
|
+
// @pactor-app/chat 收敛(spec: chat-icon-convergence):chat 既有图标与
|
|
1873
|
+
// 契约图标名(menu.icon / messageActions[].icon 的既有取值)直通
|
|
1874
|
+
"chevrons-up-down": import_lucide_react10.ChevronsUpDown,
|
|
1875
|
+
"file-text": import_lucide_react10.FileText,
|
|
1876
|
+
"panel-left": import_lucide_react10.PanelLeft,
|
|
1877
|
+
"panel-right-open": import_lucide_react10.PanelRightOpen,
|
|
1878
|
+
square: import_lucide_react10.Square,
|
|
1879
|
+
history: import_lucide_react10.History,
|
|
1880
|
+
"rotate-ccw": import_lucide_react10.RotateCcw,
|
|
1881
|
+
quote: import_lucide_react10.Quote,
|
|
1882
|
+
chat: import_lucide_react10.MessageSquare,
|
|
1883
|
+
brain: import_lucide_react10.Brain
|
|
1870
1884
|
};
|
|
1871
1885
|
function normalizeIconName(name) {
|
|
1872
1886
|
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
@@ -2075,10 +2089,129 @@ function Chart({
|
|
|
2075
2089
|
);
|
|
2076
2090
|
}
|
|
2077
2091
|
|
|
2078
|
-
// src/components/components/
|
|
2092
|
+
// src/components/components/ChatInput/index.tsx
|
|
2093
|
+
var import_runtime5 = require("@pactor-app/runtime");
|
|
2094
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2095
|
+
var import_react9 = require("react");
|
|
2096
|
+
|
|
2097
|
+
// src/ui/textarea.tsx
|
|
2079
2098
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2080
|
-
function
|
|
2099
|
+
function Textarea({
|
|
2100
|
+
className,
|
|
2101
|
+
...props
|
|
2102
|
+
}) {
|
|
2081
2103
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2104
|
+
"textarea",
|
|
2105
|
+
{
|
|
2106
|
+
"data-slot": "textarea",
|
|
2107
|
+
className: cn(
|
|
2108
|
+
"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2109
|
+
className
|
|
2110
|
+
),
|
|
2111
|
+
...props
|
|
2112
|
+
}
|
|
2113
|
+
);
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
// src/components/components/ChatInput/index.tsx
|
|
2117
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2118
|
+
function ChatInput({
|
|
2119
|
+
value,
|
|
2120
|
+
placeholder,
|
|
2121
|
+
disabled,
|
|
2122
|
+
rows = 3,
|
|
2123
|
+
hideSend,
|
|
2124
|
+
toolbarStart,
|
|
2125
|
+
toolbarEnd,
|
|
2126
|
+
header,
|
|
2127
|
+
footer,
|
|
2128
|
+
onChange,
|
|
2129
|
+
onSubmit,
|
|
2130
|
+
className,
|
|
2131
|
+
style
|
|
2132
|
+
}) {
|
|
2133
|
+
const { renderChildren } = (0, import_runtime5.useRenderer)();
|
|
2134
|
+
const controlled = value !== void 0;
|
|
2135
|
+
const [draft, setDraft] = (0, import_react9.useState)("");
|
|
2136
|
+
const text = controlled ? value : draft;
|
|
2137
|
+
const canSubmit = !disabled && text.trim() !== "";
|
|
2138
|
+
const composingRef = (0, import_react9.useRef)(false);
|
|
2139
|
+
const handleChange = (next) => {
|
|
2140
|
+
if (!controlled) {
|
|
2141
|
+
setDraft(next);
|
|
2142
|
+
}
|
|
2143
|
+
onChange?.(next);
|
|
2144
|
+
};
|
|
2145
|
+
const submit = () => {
|
|
2146
|
+
if (!canSubmit) {
|
|
2147
|
+
return;
|
|
2148
|
+
}
|
|
2149
|
+
onSubmit?.(text);
|
|
2150
|
+
if (!controlled) {
|
|
2151
|
+
setDraft("");
|
|
2152
|
+
}
|
|
2153
|
+
};
|
|
2154
|
+
const handleKeyDown = (event) => {
|
|
2155
|
+
if (event.key === "Enter" && !event.shiftKey && !composingRef.current && !event.nativeEvent.isComposing) {
|
|
2156
|
+
event.preventDefault();
|
|
2157
|
+
submit();
|
|
2158
|
+
}
|
|
2159
|
+
};
|
|
2160
|
+
const handleComposition = (event) => {
|
|
2161
|
+
composingRef.current = event.type === "compositionstart";
|
|
2162
|
+
};
|
|
2163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2164
|
+
"div",
|
|
2165
|
+
{
|
|
2166
|
+
"data-slot": "chat-input",
|
|
2167
|
+
className: cn(
|
|
2168
|
+
"rounded-xl border border-border bg-background transition-shadow focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",
|
|
2169
|
+
className
|
|
2170
|
+
),
|
|
2171
|
+
style,
|
|
2172
|
+
children: [
|
|
2173
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "px-3 pt-3", children: renderChildren([header]) }) : null,
|
|
2174
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2175
|
+
Textarea,
|
|
2176
|
+
{
|
|
2177
|
+
value: text,
|
|
2178
|
+
placeholder,
|
|
2179
|
+
disabled,
|
|
2180
|
+
rows,
|
|
2181
|
+
onChange: (event) => handleChange(event.target.value),
|
|
2182
|
+
onKeyDown: handleKeyDown,
|
|
2183
|
+
onCompositionStart: handleComposition,
|
|
2184
|
+
onCompositionEnd: handleComposition,
|
|
2185
|
+
className: "min-h-[60px] resize-none border-0 px-4 pt-3 pb-1 shadow-none focus-visible:border-transparent focus-visible:ring-0"
|
|
2186
|
+
}
|
|
2187
|
+
),
|
|
2188
|
+
toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-1 px-2 pb-2", children: [
|
|
2189
|
+
toolbarStart ? renderChildren([toolbarStart]) : null,
|
|
2190
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "flex-1" }),
|
|
2191
|
+
toolbarEnd ? renderChildren([toolbarEnd]) : null,
|
|
2192
|
+
hideSend ? null : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2193
|
+
Button,
|
|
2194
|
+
{
|
|
2195
|
+
type: "button",
|
|
2196
|
+
size: "icon",
|
|
2197
|
+
"aria-label": "\u53D1\u9001",
|
|
2198
|
+
disabled: !canSubmit,
|
|
2199
|
+
onClick: submit,
|
|
2200
|
+
className: "size-8 rounded-full",
|
|
2201
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react11.ArrowUp, {})
|
|
2202
|
+
}
|
|
2203
|
+
)
|
|
2204
|
+
] }) : null,
|
|
2205
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "border-t border-border px-3 py-2", children: renderChildren([footer]) }) : null
|
|
2206
|
+
]
|
|
2207
|
+
}
|
|
2208
|
+
);
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
// src/components/components/Content/index.tsx
|
|
2212
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2213
|
+
function Content({ className, style, children }) {
|
|
2214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2082
2215
|
"main",
|
|
2083
2216
|
{
|
|
2084
2217
|
"data-slot": "layout-content",
|
|
@@ -2091,22 +2224,22 @@ function Content({ className, style, children }) {
|
|
|
2091
2224
|
|
|
2092
2225
|
// src/ui/context-menu.tsx
|
|
2093
2226
|
var import_context_menu = require("@base-ui/react/context-menu");
|
|
2094
|
-
var
|
|
2227
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2095
2228
|
function ContextMenu({
|
|
2096
2229
|
...props
|
|
2097
2230
|
}) {
|
|
2098
|
-
return /* @__PURE__ */ (0,
|
|
2231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_context_menu.ContextMenu.Root, { "data-slot": "context-menu", ...props });
|
|
2099
2232
|
}
|
|
2100
2233
|
function ContextMenuTrigger({
|
|
2101
2234
|
...props
|
|
2102
2235
|
}) {
|
|
2103
|
-
return /* @__PURE__ */ (0,
|
|
2236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_context_menu.ContextMenu.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
2104
2237
|
}
|
|
2105
2238
|
function ContextMenuContent({
|
|
2106
2239
|
className,
|
|
2107
2240
|
...props
|
|
2108
2241
|
}) {
|
|
2109
|
-
return /* @__PURE__ */ (0,
|
|
2242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_context_menu.ContextMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_context_menu.ContextMenu.Positioner, { className: "isolate z-50", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2110
2243
|
import_context_menu.ContextMenu.Popup,
|
|
2111
2244
|
{
|
|
2112
2245
|
"data-slot": "context-menu-content",
|
|
@@ -2123,7 +2256,7 @@ function ContextMenuItem({
|
|
|
2123
2256
|
variant = "default",
|
|
2124
2257
|
...props
|
|
2125
2258
|
}) {
|
|
2126
|
-
return /* @__PURE__ */ (0,
|
|
2259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2127
2260
|
import_context_menu.ContextMenu.Item,
|
|
2128
2261
|
{
|
|
2129
2262
|
"data-slot": "context-menu-item",
|
|
@@ -2138,7 +2271,7 @@ function ContextMenuItem({
|
|
|
2138
2271
|
}
|
|
2139
2272
|
|
|
2140
2273
|
// src/components/components/ContextMenu/index.tsx
|
|
2141
|
-
var
|
|
2274
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2142
2275
|
function ContextMenu2({
|
|
2143
2276
|
items = [],
|
|
2144
2277
|
onSelect,
|
|
@@ -2146,16 +2279,16 @@ function ContextMenu2({
|
|
|
2146
2279
|
className,
|
|
2147
2280
|
style
|
|
2148
2281
|
}) {
|
|
2149
|
-
return /* @__PURE__ */ (0,
|
|
2150
|
-
/* @__PURE__ */ (0,
|
|
2151
|
-
/* @__PURE__ */ (0,
|
|
2282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(ContextMenu, { children: [
|
|
2283
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ContextMenuTrigger, { children }),
|
|
2284
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ContextMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2152
2285
|
ContextMenuItem,
|
|
2153
2286
|
{
|
|
2154
2287
|
variant: item.danger ? "destructive" : "default",
|
|
2155
2288
|
disabled: item.disabled,
|
|
2156
2289
|
onClick: () => onSelect?.(item.value),
|
|
2157
2290
|
children: [
|
|
2158
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2291
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2159
2292
|
item.label
|
|
2160
2293
|
]
|
|
2161
2294
|
},
|
|
@@ -2165,14 +2298,14 @@ function ContextMenu2({
|
|
|
2165
2298
|
}
|
|
2166
2299
|
|
|
2167
2300
|
// src/components/components/DataTable/index.tsx
|
|
2168
|
-
var
|
|
2169
|
-
var
|
|
2170
|
-
var
|
|
2301
|
+
var import_runtime6 = require("@pactor-app/runtime");
|
|
2302
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2303
|
+
var import_react10 = require("react");
|
|
2171
2304
|
|
|
2172
2305
|
// src/ui/input.tsx
|
|
2173
|
-
var
|
|
2306
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2174
2307
|
function Input({ className, type, ...props }) {
|
|
2175
|
-
return /* @__PURE__ */ (0,
|
|
2308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2176
2309
|
"input",
|
|
2177
2310
|
{
|
|
2178
2311
|
type,
|
|
@@ -2187,14 +2320,14 @@ function Input({ className, type, ...props }) {
|
|
|
2187
2320
|
}
|
|
2188
2321
|
|
|
2189
2322
|
// src/ui/table.tsx
|
|
2190
|
-
var
|
|
2323
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2191
2324
|
function Table2({ className, ...props }) {
|
|
2192
|
-
return /* @__PURE__ */ (0,
|
|
2325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2193
2326
|
"div",
|
|
2194
2327
|
{
|
|
2195
2328
|
"data-slot": "table-container",
|
|
2196
2329
|
className: "relative w-full overflow-x-auto",
|
|
2197
|
-
children: /* @__PURE__ */ (0,
|
|
2330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2198
2331
|
"table",
|
|
2199
2332
|
{
|
|
2200
2333
|
"data-slot": "table",
|
|
@@ -2206,7 +2339,7 @@ function Table2({ className, ...props }) {
|
|
|
2206
2339
|
);
|
|
2207
2340
|
}
|
|
2208
2341
|
function TableHeader({ className, ...props }) {
|
|
2209
|
-
return /* @__PURE__ */ (0,
|
|
2342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2210
2343
|
"thead",
|
|
2211
2344
|
{
|
|
2212
2345
|
"data-slot": "table-header",
|
|
@@ -2216,7 +2349,7 @@ function TableHeader({ className, ...props }) {
|
|
|
2216
2349
|
);
|
|
2217
2350
|
}
|
|
2218
2351
|
function TableBody({ className, ...props }) {
|
|
2219
|
-
return /* @__PURE__ */ (0,
|
|
2352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2220
2353
|
"tbody",
|
|
2221
2354
|
{
|
|
2222
2355
|
"data-slot": "table-body",
|
|
@@ -2226,7 +2359,7 @@ function TableBody({ className, ...props }) {
|
|
|
2226
2359
|
);
|
|
2227
2360
|
}
|
|
2228
2361
|
function TableRow({ className, ...props }) {
|
|
2229
|
-
return /* @__PURE__ */ (0,
|
|
2362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2230
2363
|
"tr",
|
|
2231
2364
|
{
|
|
2232
2365
|
"data-slot": "table-row",
|
|
@@ -2239,7 +2372,7 @@ function TableRow({ className, ...props }) {
|
|
|
2239
2372
|
);
|
|
2240
2373
|
}
|
|
2241
2374
|
function TableHead({ className, ...props }) {
|
|
2242
|
-
return /* @__PURE__ */ (0,
|
|
2375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2243
2376
|
"th",
|
|
2244
2377
|
{
|
|
2245
2378
|
"data-slot": "table-head",
|
|
@@ -2252,7 +2385,7 @@ function TableHead({ className, ...props }) {
|
|
|
2252
2385
|
);
|
|
2253
2386
|
}
|
|
2254
2387
|
function TableCell({ className, ...props }) {
|
|
2255
|
-
return /* @__PURE__ */ (0,
|
|
2388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2256
2389
|
"td",
|
|
2257
2390
|
{
|
|
2258
2391
|
"data-slot": "table-cell",
|
|
@@ -2266,7 +2399,7 @@ function TableCell({ className, ...props }) {
|
|
|
2266
2399
|
}
|
|
2267
2400
|
|
|
2268
2401
|
// src/components/components/DataTable/index.tsx
|
|
2269
|
-
var
|
|
2402
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2270
2403
|
function renderCellValue(value) {
|
|
2271
2404
|
if (value === void 0 || value === null) {
|
|
2272
2405
|
return "";
|
|
@@ -2293,12 +2426,12 @@ function DataTable({
|
|
|
2293
2426
|
className,
|
|
2294
2427
|
style
|
|
2295
2428
|
}) {
|
|
2296
|
-
const { renderChildren } = (0,
|
|
2297
|
-
const { t } = (0,
|
|
2298
|
-
const [sortState, setSortState] = (0,
|
|
2299
|
-
const [filters, setFilters] = (0,
|
|
2300
|
-
const [current, setCurrent] = (0,
|
|
2301
|
-
const viewRows = (0,
|
|
2429
|
+
const { renderChildren } = (0, import_runtime6.useRenderer)();
|
|
2430
|
+
const { t } = (0, import_runtime6.useI18n)();
|
|
2431
|
+
const [sortState, setSortState] = (0, import_react10.useState)(sort);
|
|
2432
|
+
const [filters, setFilters] = (0, import_react10.useState)({});
|
|
2433
|
+
const [current, setCurrent] = (0, import_react10.useState)(1);
|
|
2434
|
+
const viewRows = (0, import_react10.useMemo)(() => {
|
|
2302
2435
|
const activeFilters = Object.entries(filters).filter(
|
|
2303
2436
|
([, keyword]) => keyword !== ""
|
|
2304
2437
|
);
|
|
@@ -2335,12 +2468,12 @@ function DataTable({
|
|
|
2335
2468
|
setCurrent(page);
|
|
2336
2469
|
onPageChange?.(page);
|
|
2337
2470
|
};
|
|
2338
|
-
return /* @__PURE__ */ (0,
|
|
2339
|
-
/* @__PURE__ */ (0,
|
|
2340
|
-
/* @__PURE__ */ (0,
|
|
2471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { "data-slot": "data-table", className: cn("relative", className), style, children: [
|
|
2472
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Table2, { children: [
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => {
|
|
2341
2474
|
const sorted = sortState?.key === column.key;
|
|
2342
|
-
return /* @__PURE__ */ (0,
|
|
2343
|
-
column.sortable ? /* @__PURE__ */ (0,
|
|
2475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
2476
|
+
column.sortable ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2344
2477
|
"button",
|
|
2345
2478
|
{
|
|
2346
2479
|
type: "button",
|
|
@@ -2351,8 +2484,8 @@ function DataTable({
|
|
|
2351
2484
|
onClick: () => toggleSort(column),
|
|
2352
2485
|
children: [
|
|
2353
2486
|
column.title,
|
|
2354
|
-
sorted ? sortState.order === "asc" ? /* @__PURE__ */ (0,
|
|
2355
|
-
|
|
2487
|
+
sorted ? sortState.order === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.ArrowUp, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react12.ArrowDown, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2488
|
+
import_lucide_react12.ArrowUpDown,
|
|
2356
2489
|
{
|
|
2357
2490
|
"aria-hidden": true,
|
|
2358
2491
|
className: "size-3.5 text-muted-foreground"
|
|
@@ -2360,8 +2493,8 @@ function DataTable({
|
|
|
2360
2493
|
)
|
|
2361
2494
|
]
|
|
2362
2495
|
}
|
|
2363
|
-
) : /* @__PURE__ */ (0,
|
|
2364
|
-
column.filterable ? /* @__PURE__ */ (0,
|
|
2496
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: column.title }),
|
|
2497
|
+
column.filterable ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2365
2498
|
Input,
|
|
2366
2499
|
{
|
|
2367
2500
|
"data-slot": "data-table-filter",
|
|
@@ -2374,7 +2507,7 @@ function DataTable({
|
|
|
2374
2507
|
) : null
|
|
2375
2508
|
] }) }, column.key ?? String(index));
|
|
2376
2509
|
}) }) }),
|
|
2377
|
-
/* @__PURE__ */ (0,
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2378
2511
|
"div",
|
|
2379
2512
|
{
|
|
2380
2513
|
"data-slot": "table-empty",
|
|
@@ -2383,20 +2516,20 @@ function DataTable({
|
|
|
2383
2516
|
}
|
|
2384
2517
|
) }) }) : pageRows.map((row, rowIndex) => {
|
|
2385
2518
|
const key = row[rowKey];
|
|
2386
|
-
return /* @__PURE__ */ (0,
|
|
2519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2387
2520
|
TableRow,
|
|
2388
2521
|
{
|
|
2389
2522
|
children: columns.map((column, columnIndex) => {
|
|
2390
2523
|
const template = column.children ?? column.renderChildren;
|
|
2391
|
-
return /* @__PURE__ */ (0,
|
|
2524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TableCell, { children: template ? renderChildren(template, { row, rowIndex }) : renderCellValue(row[column.key]) }, column.key ?? String(columnIndex));
|
|
2392
2525
|
})
|
|
2393
2526
|
},
|
|
2394
2527
|
key === void 0 || key === null ? rowIndex : String(key)
|
|
2395
2528
|
);
|
|
2396
2529
|
}) })
|
|
2397
2530
|
] }),
|
|
2398
|
-
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0,
|
|
2399
|
-
(page) => /* @__PURE__ */ (0,
|
|
2531
|
+
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
|
|
2532
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2400
2533
|
Button,
|
|
2401
2534
|
{
|
|
2402
2535
|
type: "button",
|
|
@@ -2413,33 +2546,33 @@ function DataTable({
|
|
|
2413
2546
|
}
|
|
2414
2547
|
|
|
2415
2548
|
// src/components/components/Dialog/index.tsx
|
|
2416
|
-
var
|
|
2417
|
-
var
|
|
2549
|
+
var import_runtime7 = require("@pactor-app/runtime");
|
|
2550
|
+
var import_react11 = require("react");
|
|
2418
2551
|
|
|
2419
2552
|
// src/ui/dialog.tsx
|
|
2420
2553
|
var import_dialog = require("@base-ui/react/dialog");
|
|
2421
|
-
var
|
|
2422
|
-
var
|
|
2554
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2555
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2423
2556
|
function Dialog({
|
|
2424
2557
|
...props
|
|
2425
2558
|
}) {
|
|
2426
|
-
return /* @__PURE__ */ (0,
|
|
2559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_dialog.Dialog.Root, { "data-slot": "dialog", ...props });
|
|
2427
2560
|
}
|
|
2428
2561
|
function DialogTrigger({
|
|
2429
2562
|
...props
|
|
2430
2563
|
}) {
|
|
2431
|
-
return /* @__PURE__ */ (0,
|
|
2564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
2432
2565
|
}
|
|
2433
2566
|
function DialogPortal({
|
|
2434
2567
|
...props
|
|
2435
2568
|
}) {
|
|
2436
|
-
return /* @__PURE__ */ (0,
|
|
2569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_dialog.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
|
|
2437
2570
|
}
|
|
2438
2571
|
function DialogOverlay({
|
|
2439
2572
|
className,
|
|
2440
2573
|
...props
|
|
2441
2574
|
}) {
|
|
2442
|
-
return /* @__PURE__ */ (0,
|
|
2575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2443
2576
|
import_dialog.Dialog.Backdrop,
|
|
2444
2577
|
{
|
|
2445
2578
|
"data-slot": "dialog-overlay",
|
|
@@ -2457,9 +2590,9 @@ function DialogContent({
|
|
|
2457
2590
|
showCloseButton = true,
|
|
2458
2591
|
...props
|
|
2459
2592
|
}) {
|
|
2460
|
-
return /* @__PURE__ */ (0,
|
|
2461
|
-
/* @__PURE__ */ (0,
|
|
2462
|
-
/* @__PURE__ */ (0,
|
|
2593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
2594
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DialogOverlay, {}),
|
|
2595
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2463
2596
|
import_dialog.Dialog.Popup,
|
|
2464
2597
|
{
|
|
2465
2598
|
"data-slot": "dialog-content",
|
|
@@ -2470,11 +2603,11 @@ function DialogContent({
|
|
|
2470
2603
|
...props,
|
|
2471
2604
|
children: [
|
|
2472
2605
|
children,
|
|
2473
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
2606
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2474
2607
|
import_dialog.Dialog.Close,
|
|
2475
2608
|
{
|
|
2476
2609
|
"data-slot": "dialog-close",
|
|
2477
|
-
render: /* @__PURE__ */ (0,
|
|
2610
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2478
2611
|
"button",
|
|
2479
2612
|
{
|
|
2480
2613
|
type: "button",
|
|
@@ -2482,8 +2615,8 @@ function DialogContent({
|
|
|
2482
2615
|
}
|
|
2483
2616
|
),
|
|
2484
2617
|
children: [
|
|
2485
|
-
/* @__PURE__ */ (0,
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
2618
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react13.XIcon, {}),
|
|
2619
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "sr-only", children: "Close" })
|
|
2487
2620
|
]
|
|
2488
2621
|
}
|
|
2489
2622
|
)
|
|
@@ -2493,7 +2626,7 @@ function DialogContent({
|
|
|
2493
2626
|
] });
|
|
2494
2627
|
}
|
|
2495
2628
|
function DialogHeader({ className, ...props }) {
|
|
2496
|
-
return /* @__PURE__ */ (0,
|
|
2629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2497
2630
|
"div",
|
|
2498
2631
|
{
|
|
2499
2632
|
"data-slot": "dialog-header",
|
|
@@ -2506,7 +2639,7 @@ function DialogTitle({
|
|
|
2506
2639
|
className,
|
|
2507
2640
|
...props
|
|
2508
2641
|
}) {
|
|
2509
|
-
return /* @__PURE__ */ (0,
|
|
2642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2510
2643
|
import_dialog.Dialog.Title,
|
|
2511
2644
|
{
|
|
2512
2645
|
"data-slot": "dialog-title",
|
|
@@ -2519,7 +2652,7 @@ function DialogDescription({
|
|
|
2519
2652
|
className,
|
|
2520
2653
|
...props
|
|
2521
2654
|
}) {
|
|
2522
|
-
return /* @__PURE__ */ (0,
|
|
2655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2523
2656
|
import_dialog.Dialog.Description,
|
|
2524
2657
|
{
|
|
2525
2658
|
"data-slot": "dialog-description",
|
|
@@ -2530,7 +2663,7 @@ function DialogDescription({
|
|
|
2530
2663
|
}
|
|
2531
2664
|
|
|
2532
2665
|
// src/components/components/Dialog/index.tsx
|
|
2533
|
-
var
|
|
2666
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2534
2667
|
function Dialog2({
|
|
2535
2668
|
title,
|
|
2536
2669
|
description,
|
|
@@ -2541,11 +2674,11 @@ function Dialog2({
|
|
|
2541
2674
|
className,
|
|
2542
2675
|
style
|
|
2543
2676
|
}) {
|
|
2544
|
-
const { renderChildren } = (0,
|
|
2545
|
-
const [innerOpen, setInnerOpen] = (0,
|
|
2677
|
+
const { renderChildren } = (0, import_runtime7.useRenderer)();
|
|
2678
|
+
const [innerOpen, setInnerOpen] = (0, import_react11.useState)(false);
|
|
2546
2679
|
const controlled = open !== void 0;
|
|
2547
2680
|
const visible = controlled ? open : innerOpen;
|
|
2548
|
-
return /* @__PURE__ */ (0,
|
|
2681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2549
2682
|
Dialog,
|
|
2550
2683
|
{
|
|
2551
2684
|
open: visible,
|
|
@@ -2558,7 +2691,7 @@ function Dialog2({
|
|
|
2558
2691
|
}
|
|
2559
2692
|
},
|
|
2560
2693
|
children: [
|
|
2561
|
-
trigger ? /* @__PURE__ */ (0,
|
|
2694
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2562
2695
|
DialogTrigger,
|
|
2563
2696
|
{
|
|
2564
2697
|
nativeButton: false,
|
|
@@ -2566,10 +2699,10 @@ function Dialog2({
|
|
|
2566
2699
|
children: renderChildren([trigger])
|
|
2567
2700
|
}
|
|
2568
2701
|
) : null,
|
|
2569
|
-
/* @__PURE__ */ (0,
|
|
2570
|
-
title || description ? /* @__PURE__ */ (0,
|
|
2571
|
-
title ? /* @__PURE__ */ (0,
|
|
2572
|
-
description ? /* @__PURE__ */ (0,
|
|
2702
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(DialogContent, { className, style, children: [
|
|
2703
|
+
title || description ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(DialogHeader, { children: [
|
|
2704
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DialogTitle, { children: title }) : null,
|
|
2705
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DialogDescription, { children: description }) : null
|
|
2573
2706
|
] }) : null,
|
|
2574
2707
|
children
|
|
2575
2708
|
] })
|
|
@@ -2580,22 +2713,22 @@ function Dialog2({
|
|
|
2580
2713
|
|
|
2581
2714
|
// src/ui/drawer.tsx
|
|
2582
2715
|
var import_vaul = require("vaul");
|
|
2583
|
-
var
|
|
2716
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2584
2717
|
function Drawer({
|
|
2585
2718
|
...props
|
|
2586
2719
|
}) {
|
|
2587
|
-
return /* @__PURE__ */ (0,
|
|
2720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_vaul.Drawer.Root, { "data-slot": "drawer", ...props });
|
|
2588
2721
|
}
|
|
2589
2722
|
function DrawerPortal({
|
|
2590
2723
|
...props
|
|
2591
2724
|
}) {
|
|
2592
|
-
return /* @__PURE__ */ (0,
|
|
2725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
|
|
2593
2726
|
}
|
|
2594
2727
|
function DrawerOverlay({
|
|
2595
2728
|
className,
|
|
2596
2729
|
...props
|
|
2597
2730
|
}) {
|
|
2598
|
-
return /* @__PURE__ */ (0,
|
|
2731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2599
2732
|
import_vaul.Drawer.Overlay,
|
|
2600
2733
|
{
|
|
2601
2734
|
"data-slot": "drawer-overlay",
|
|
@@ -2609,9 +2742,9 @@ function DrawerContent({
|
|
|
2609
2742
|
children,
|
|
2610
2743
|
...props
|
|
2611
2744
|
}) {
|
|
2612
|
-
return /* @__PURE__ */ (0,
|
|
2613
|
-
/* @__PURE__ */ (0,
|
|
2614
|
-
/* @__PURE__ */ (0,
|
|
2745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
2746
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DrawerOverlay, {}),
|
|
2747
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2615
2748
|
import_vaul.Drawer.Content,
|
|
2616
2749
|
{
|
|
2617
2750
|
"data-slot": "drawer-content",
|
|
@@ -2625,7 +2758,7 @@ function DrawerContent({
|
|
|
2625
2758
|
),
|
|
2626
2759
|
...props,
|
|
2627
2760
|
children: [
|
|
2628
|
-
/* @__PURE__ */ (0,
|
|
2761
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
2629
2762
|
children
|
|
2630
2763
|
]
|
|
2631
2764
|
}
|
|
@@ -2633,7 +2766,7 @@ function DrawerContent({
|
|
|
2633
2766
|
] });
|
|
2634
2767
|
}
|
|
2635
2768
|
function DrawerHeader({ className, ...props }) {
|
|
2636
|
-
return /* @__PURE__ */ (0,
|
|
2769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2637
2770
|
"div",
|
|
2638
2771
|
{
|
|
2639
2772
|
"data-slot": "drawer-header",
|
|
@@ -2646,7 +2779,7 @@ function DrawerTitle({
|
|
|
2646
2779
|
className,
|
|
2647
2780
|
...props
|
|
2648
2781
|
}) {
|
|
2649
|
-
return /* @__PURE__ */ (0,
|
|
2782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2650
2783
|
import_vaul.Drawer.Title,
|
|
2651
2784
|
{
|
|
2652
2785
|
"data-slot": "drawer-title",
|
|
@@ -2657,7 +2790,7 @@ function DrawerTitle({
|
|
|
2657
2790
|
}
|
|
2658
2791
|
|
|
2659
2792
|
// src/components/components/Drawer/index.tsx
|
|
2660
|
-
var
|
|
2793
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2661
2794
|
function Drawer2({
|
|
2662
2795
|
title,
|
|
2663
2796
|
open,
|
|
@@ -2667,7 +2800,7 @@ function Drawer2({
|
|
|
2667
2800
|
className,
|
|
2668
2801
|
style
|
|
2669
2802
|
}) {
|
|
2670
|
-
return /* @__PURE__ */ (0,
|
|
2803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2671
2804
|
Drawer,
|
|
2672
2805
|
{
|
|
2673
2806
|
direction: placement,
|
|
@@ -2677,9 +2810,9 @@ function Drawer2({
|
|
|
2677
2810
|
onClose?.();
|
|
2678
2811
|
}
|
|
2679
2812
|
},
|
|
2680
|
-
children: /* @__PURE__ */ (0,
|
|
2681
|
-
title ? /* @__PURE__ */ (0,
|
|
2682
|
-
/* @__PURE__ */ (0,
|
|
2813
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DrawerContent, { className, style, children: [
|
|
2814
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DrawerHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DrawerTitle, { children: title }) }) : null,
|
|
2815
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-1 overflow-auto p-4", children })
|
|
2683
2816
|
] })
|
|
2684
2817
|
}
|
|
2685
2818
|
);
|
|
@@ -2687,17 +2820,17 @@ function Drawer2({
|
|
|
2687
2820
|
|
|
2688
2821
|
// src/ui/dropdown-menu.tsx
|
|
2689
2822
|
var import_menu = require("@base-ui/react/menu");
|
|
2690
|
-
var
|
|
2691
|
-
var
|
|
2823
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2824
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2692
2825
|
function DropdownMenu({
|
|
2693
2826
|
...props
|
|
2694
2827
|
}) {
|
|
2695
|
-
return /* @__PURE__ */ (0,
|
|
2828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_menu.Menu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
2696
2829
|
}
|
|
2697
2830
|
function DropdownMenuTrigger({
|
|
2698
2831
|
...props
|
|
2699
2832
|
}) {
|
|
2700
|
-
return /* @__PURE__ */ (0,
|
|
2833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_menu.Menu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
2701
2834
|
}
|
|
2702
2835
|
function DropdownMenuContent({
|
|
2703
2836
|
className,
|
|
@@ -2706,14 +2839,14 @@ function DropdownMenuContent({
|
|
|
2706
2839
|
sideOffset = 4,
|
|
2707
2840
|
...props
|
|
2708
2841
|
}) {
|
|
2709
|
-
return /* @__PURE__ */ (0,
|
|
2842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2710
2843
|
import_menu.Menu.Positioner,
|
|
2711
2844
|
{
|
|
2712
2845
|
align,
|
|
2713
2846
|
side,
|
|
2714
2847
|
sideOffset,
|
|
2715
2848
|
className: "isolate z-50",
|
|
2716
|
-
children: /* @__PURE__ */ (0,
|
|
2849
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2717
2850
|
import_menu.Menu.Popup,
|
|
2718
2851
|
{
|
|
2719
2852
|
"data-slot": "dropdown-menu-content",
|
|
@@ -2732,7 +2865,7 @@ function DropdownMenuItem({
|
|
|
2732
2865
|
variant = "default",
|
|
2733
2866
|
...props
|
|
2734
2867
|
}) {
|
|
2735
|
-
return /* @__PURE__ */ (0,
|
|
2868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2736
2869
|
import_menu.Menu.Item,
|
|
2737
2870
|
{
|
|
2738
2871
|
"data-slot": "dropdown-menu-item",
|
|
@@ -2748,14 +2881,14 @@ function DropdownMenuItem({
|
|
|
2748
2881
|
function DropdownMenuSub({
|
|
2749
2882
|
...props
|
|
2750
2883
|
}) {
|
|
2751
|
-
return /* @__PURE__ */ (0,
|
|
2884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_menu.Menu.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
2752
2885
|
}
|
|
2753
2886
|
function DropdownMenuSubTrigger({
|
|
2754
2887
|
className,
|
|
2755
2888
|
children,
|
|
2756
2889
|
...props
|
|
2757
2890
|
}) {
|
|
2758
|
-
return /* @__PURE__ */ (0,
|
|
2891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2759
2892
|
import_menu.Menu.SubmenuTrigger,
|
|
2760
2893
|
{
|
|
2761
2894
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -2766,7 +2899,7 @@ function DropdownMenuSubTrigger({
|
|
|
2766
2899
|
...props,
|
|
2767
2900
|
children: [
|
|
2768
2901
|
children,
|
|
2769
|
-
/* @__PURE__ */ (0,
|
|
2902
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react14.ChevronRightIcon, { className: "ml-auto" })
|
|
2770
2903
|
]
|
|
2771
2904
|
}
|
|
2772
2905
|
);
|
|
@@ -2776,7 +2909,7 @@ function DropdownMenuSubContent({
|
|
|
2776
2909
|
sideOffset = 2,
|
|
2777
2910
|
...props
|
|
2778
2911
|
}) {
|
|
2779
|
-
return /* @__PURE__ */ (0,
|
|
2912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_menu.Menu.Positioner, { sideOffset, className: "isolate z-50", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2780
2913
|
import_menu.Menu.Popup,
|
|
2781
2914
|
{
|
|
2782
2915
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -2790,7 +2923,7 @@ function DropdownMenuSubContent({
|
|
|
2790
2923
|
}
|
|
2791
2924
|
|
|
2792
2925
|
// src/components/components/DropdownMenu/index.tsx
|
|
2793
|
-
var
|
|
2926
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2794
2927
|
function DropdownMenu2({
|
|
2795
2928
|
items = [],
|
|
2796
2929
|
onSelect,
|
|
@@ -2798,8 +2931,8 @@ function DropdownMenu2({
|
|
|
2798
2931
|
className,
|
|
2799
2932
|
style
|
|
2800
2933
|
}) {
|
|
2801
|
-
return /* @__PURE__ */ (0,
|
|
2802
|
-
/* @__PURE__ */ (0,
|
|
2934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenu, { children: [
|
|
2935
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2803
2936
|
DropdownMenuTrigger,
|
|
2804
2937
|
{
|
|
2805
2938
|
nativeButton: false,
|
|
@@ -2807,14 +2940,14 @@ function DropdownMenu2({
|
|
|
2807
2940
|
children
|
|
2808
2941
|
}
|
|
2809
2942
|
),
|
|
2810
|
-
/* @__PURE__ */ (0,
|
|
2943
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DropdownMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2811
2944
|
DropdownMenuItem,
|
|
2812
2945
|
{
|
|
2813
2946
|
variant: item.danger ? "destructive" : "default",
|
|
2814
2947
|
disabled: item.disabled,
|
|
2815
2948
|
onClick: () => onSelect?.(item.value),
|
|
2816
2949
|
children: [
|
|
2817
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
2950
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
2818
2951
|
item.label
|
|
2819
2952
|
]
|
|
2820
2953
|
},
|
|
@@ -2824,9 +2957,9 @@ function DropdownMenu2({
|
|
|
2824
2957
|
}
|
|
2825
2958
|
|
|
2826
2959
|
// src/ui/empty.tsx
|
|
2827
|
-
var
|
|
2960
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2828
2961
|
function Empty({ className, ...props }) {
|
|
2829
|
-
return /* @__PURE__ */ (0,
|
|
2962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2830
2963
|
"div",
|
|
2831
2964
|
{
|
|
2832
2965
|
"data-slot": "empty",
|
|
@@ -2839,7 +2972,7 @@ function Empty({ className, ...props }) {
|
|
|
2839
2972
|
);
|
|
2840
2973
|
}
|
|
2841
2974
|
function EmptyHeader({ className, ...props }) {
|
|
2842
|
-
return /* @__PURE__ */ (0,
|
|
2975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2843
2976
|
"div",
|
|
2844
2977
|
{
|
|
2845
2978
|
"data-slot": "empty-header",
|
|
@@ -2849,7 +2982,7 @@ function EmptyHeader({ className, ...props }) {
|
|
|
2849
2982
|
);
|
|
2850
2983
|
}
|
|
2851
2984
|
function EmptyTitle({ className, ...props }) {
|
|
2852
|
-
return /* @__PURE__ */ (0,
|
|
2985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2853
2986
|
"div",
|
|
2854
2987
|
{
|
|
2855
2988
|
"data-slot": "empty-title",
|
|
@@ -2859,7 +2992,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
2859
2992
|
);
|
|
2860
2993
|
}
|
|
2861
2994
|
function EmptyDescription({ className, ...props }) {
|
|
2862
|
-
return /* @__PURE__ */ (0,
|
|
2995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2863
2996
|
"p",
|
|
2864
2997
|
{
|
|
2865
2998
|
"data-slot": "empty-description",
|
|
@@ -2869,7 +3002,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
2869
3002
|
);
|
|
2870
3003
|
}
|
|
2871
3004
|
function EmptyContent({ className, ...props }) {
|
|
2872
|
-
return /* @__PURE__ */ (0,
|
|
3005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2873
3006
|
"div",
|
|
2874
3007
|
{
|
|
2875
3008
|
"data-slot": "empty-content",
|
|
@@ -2883,22 +3016,22 @@ function EmptyContent({ className, ...props }) {
|
|
|
2883
3016
|
}
|
|
2884
3017
|
|
|
2885
3018
|
// src/components/components/Empty/index.tsx
|
|
2886
|
-
var
|
|
3019
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2887
3020
|
function Empty2({ title, description, children, className, style }) {
|
|
2888
|
-
return /* @__PURE__ */ (0,
|
|
2889
|
-
/* @__PURE__ */ (0,
|
|
2890
|
-
title ? /* @__PURE__ */ (0,
|
|
2891
|
-
description ? /* @__PURE__ */ (0,
|
|
3021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Empty, { className, style, children: [
|
|
3022
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(EmptyHeader, { children: [
|
|
3023
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(EmptyTitle, { children: title }) : null,
|
|
3024
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(EmptyDescription, { children: description }) : null
|
|
2892
3025
|
] }),
|
|
2893
|
-
children ? /* @__PURE__ */ (0,
|
|
3026
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(EmptyContent, { children }) : null
|
|
2894
3027
|
] });
|
|
2895
3028
|
}
|
|
2896
3029
|
|
|
2897
3030
|
// src/ui/field.tsx
|
|
2898
3031
|
var import_field = require("@base-ui/react/field");
|
|
2899
|
-
var
|
|
3032
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2900
3033
|
function Field({ className, ...props }) {
|
|
2901
|
-
return /* @__PURE__ */ (0,
|
|
3034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2902
3035
|
import_field.Field.Root,
|
|
2903
3036
|
{
|
|
2904
3037
|
"data-slot": "field",
|
|
@@ -2908,7 +3041,7 @@ function Field({ className, ...props }) {
|
|
|
2908
3041
|
);
|
|
2909
3042
|
}
|
|
2910
3043
|
function FieldLabel({ className, ...props }) {
|
|
2911
|
-
return /* @__PURE__ */ (0,
|
|
3044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2912
3045
|
import_field.Field.Label,
|
|
2913
3046
|
{
|
|
2914
3047
|
"data-slot": "field-label",
|
|
@@ -2918,7 +3051,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
2918
3051
|
);
|
|
2919
3052
|
}
|
|
2920
3053
|
function FieldDescription({ className, ...props }) {
|
|
2921
|
-
return /* @__PURE__ */ (0,
|
|
3054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2922
3055
|
import_field.Field.Description,
|
|
2923
3056
|
{
|
|
2924
3057
|
"data-slot": "field-description",
|
|
@@ -2928,7 +3061,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
2928
3061
|
);
|
|
2929
3062
|
}
|
|
2930
3063
|
function FieldError({ className, ...props }) {
|
|
2931
|
-
return /* @__PURE__ */ (0,
|
|
3064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2932
3065
|
import_field.Field.Error,
|
|
2933
3066
|
{
|
|
2934
3067
|
"data-slot": "field-error",
|
|
@@ -2939,18 +3072,18 @@ function FieldError({ className, ...props }) {
|
|
|
2939
3072
|
}
|
|
2940
3073
|
|
|
2941
3074
|
// src/components/components/Field/index.tsx
|
|
2942
|
-
var
|
|
3075
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2943
3076
|
function Field2({ label, description, error, children, className, style }) {
|
|
2944
|
-
return /* @__PURE__ */ (0,
|
|
2945
|
-
label ? /* @__PURE__ */ (0,
|
|
3077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Field, { className, style, children: [
|
|
3078
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FieldLabel, { children: label }) : null,
|
|
2946
3079
|
children,
|
|
2947
|
-
description ? /* @__PURE__ */ (0,
|
|
2948
|
-
error ? /* @__PURE__ */ (0,
|
|
3080
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FieldDescription, { children: description }) : null,
|
|
3081
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FieldError, { match: true, children: error }) : null
|
|
2949
3082
|
] });
|
|
2950
3083
|
}
|
|
2951
3084
|
|
|
2952
3085
|
// src/components/components/Flex/index.tsx
|
|
2953
|
-
var
|
|
3086
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2954
3087
|
var gapClass = {
|
|
2955
3088
|
small: "gap-2",
|
|
2956
3089
|
middle: "gap-4",
|
|
@@ -2980,7 +3113,7 @@ function Flex({
|
|
|
2980
3113
|
style,
|
|
2981
3114
|
children
|
|
2982
3115
|
}) {
|
|
2983
|
-
return /* @__PURE__ */ (0,
|
|
3116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2984
3117
|
"div",
|
|
2985
3118
|
{
|
|
2986
3119
|
"data-slot": "flex",
|
|
@@ -2999,9 +3132,9 @@ function Flex({
|
|
|
2999
3132
|
}
|
|
3000
3133
|
|
|
3001
3134
|
// src/components/components/Footer/index.tsx
|
|
3002
|
-
var
|
|
3135
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3003
3136
|
function Footer({ className, style, children }) {
|
|
3004
|
-
return /* @__PURE__ */ (0,
|
|
3137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3005
3138
|
"footer",
|
|
3006
3139
|
{
|
|
3007
3140
|
"data-slot": "layout-footer",
|
|
@@ -3016,9 +3149,9 @@ function Footer({ className, style, children }) {
|
|
|
3016
3149
|
}
|
|
3017
3150
|
|
|
3018
3151
|
// src/components/components/Form/index.tsx
|
|
3019
|
-
var
|
|
3020
|
-
var
|
|
3021
|
-
var
|
|
3152
|
+
var import_runtime8 = require("@pactor-app/runtime");
|
|
3153
|
+
var import_react12 = require("react");
|
|
3154
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3022
3155
|
function isEmpty(value) {
|
|
3023
3156
|
return value === void 0 || value === null || value === "";
|
|
3024
3157
|
}
|
|
@@ -3032,23 +3165,23 @@ function Form({
|
|
|
3032
3165
|
onSubmit,
|
|
3033
3166
|
onValuesChange
|
|
3034
3167
|
}) {
|
|
3035
|
-
const { context } = (0,
|
|
3036
|
-
const [values, setValues] = (0,
|
|
3168
|
+
const { context } = (0, import_runtime8.useRenderer)();
|
|
3169
|
+
const [values, setValues] = (0, import_react12.useState)(() => ({
|
|
3037
3170
|
...initialValues
|
|
3038
3171
|
}));
|
|
3039
|
-
const [errors, setErrors] = (0,
|
|
3040
|
-
const fieldRulesRef = (0,
|
|
3041
|
-
const mergedInitialFieldsRef = (0,
|
|
3042
|
-
const setValuesBatch = (0,
|
|
3172
|
+
const [errors, setErrors] = (0, import_react12.useState)({});
|
|
3173
|
+
const fieldRulesRef = (0, import_react12.useRef)(/* @__PURE__ */ new Map());
|
|
3174
|
+
const mergedInitialFieldsRef = (0, import_react12.useRef)(/* @__PURE__ */ new Set());
|
|
3175
|
+
const setValuesBatch = (0, import_react12.useCallback)((partial) => {
|
|
3043
3176
|
setValues((prev) => ({ ...prev, ...partial }));
|
|
3044
3177
|
}, []);
|
|
3045
|
-
(0,
|
|
3178
|
+
(0, import_react12.useEffect)(() => {
|
|
3046
3179
|
context.forms.register(name, { setValues: setValuesBatch });
|
|
3047
3180
|
return () => {
|
|
3048
3181
|
context.forms.unregister(name);
|
|
3049
3182
|
};
|
|
3050
3183
|
}, [context, name, setValuesBatch]);
|
|
3051
|
-
const formContext = (0,
|
|
3184
|
+
const formContext = (0, import_react12.useMemo)(
|
|
3052
3185
|
() => ({
|
|
3053
3186
|
inForm: true,
|
|
3054
3187
|
layout,
|
|
@@ -3099,7 +3232,7 @@ function Form({
|
|
|
3099
3232
|
context.state.set("form", values);
|
|
3100
3233
|
onSubmit?.(values);
|
|
3101
3234
|
};
|
|
3102
|
-
return /* @__PURE__ */ (0,
|
|
3235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(FormContextProvider, { value: formContext, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3103
3236
|
"form",
|
|
3104
3237
|
{
|
|
3105
3238
|
"data-slot": "form",
|
|
@@ -3112,11 +3245,11 @@ function Form({
|
|
|
3112
3245
|
}
|
|
3113
3246
|
|
|
3114
3247
|
// src/components/components/Grid/index.tsx
|
|
3115
|
-
var
|
|
3116
|
-
var
|
|
3248
|
+
var import_react13 = require("react");
|
|
3249
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3117
3250
|
function Grid({ columns = 1, gap, className, style, children }) {
|
|
3118
3251
|
const cols = Math.max(1, columns);
|
|
3119
|
-
return /* @__PURE__ */ (0,
|
|
3252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3120
3253
|
"div",
|
|
3121
3254
|
{
|
|
3122
3255
|
"data-slot": "grid",
|
|
@@ -3127,15 +3260,15 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
3127
3260
|
...gap !== void 0 ? { gap } : {},
|
|
3128
3261
|
...style
|
|
3129
3262
|
},
|
|
3130
|
-
children:
|
|
3263
|
+
children: import_react13.Children.map(children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { "data-slot": "grid-item", children: child }, index))
|
|
3131
3264
|
}
|
|
3132
3265
|
);
|
|
3133
3266
|
}
|
|
3134
3267
|
|
|
3135
3268
|
// src/components/components/Header/index.tsx
|
|
3136
|
-
var
|
|
3137
|
-
var
|
|
3138
|
-
var
|
|
3269
|
+
var import_runtime9 = require("@pactor-app/runtime");
|
|
3270
|
+
var import_lucide_react15 = require("lucide-react");
|
|
3271
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3139
3272
|
var menuItemClass = "flex items-center gap-1 rounded-md px-3 py-2 text-sm transition-colors text-muted-foreground hover:bg-accent/50 hover:text-foreground";
|
|
3140
3273
|
function Header({
|
|
3141
3274
|
logo,
|
|
@@ -3166,10 +3299,10 @@ function Header({
|
|
|
3166
3299
|
className
|
|
3167
3300
|
);
|
|
3168
3301
|
if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales) {
|
|
3169
|
-
return /* @__PURE__ */ (0,
|
|
3302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("header", { "data-slot": "layout-header", className: rootClass, style, children });
|
|
3170
3303
|
}
|
|
3171
|
-
const brandNode = hasBrand && /* @__PURE__ */ (0,
|
|
3172
|
-
logo !== void 0 && /* @__PURE__ */ (0,
|
|
3304
|
+
const brandNode = hasBrand && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
|
|
3305
|
+
logo !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3173
3306
|
"img",
|
|
3174
3307
|
{
|
|
3175
3308
|
"data-slot": "header-brand-logo",
|
|
@@ -3178,23 +3311,23 @@ function Header({
|
|
|
3178
3311
|
className: "h-8 w-8 shrink-0 object-contain"
|
|
3179
3312
|
}
|
|
3180
3313
|
),
|
|
3181
|
-
title !== void 0 && /* @__PURE__ */ (0,
|
|
3314
|
+
title !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { "data-slot": "header-brand-title", className: "text-base font-semibold", children: title })
|
|
3182
3315
|
] });
|
|
3183
|
-
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ (0,
|
|
3316
|
+
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
|
|
3184
3317
|
const showLeft = brandLeft || dropdownLeft || hasMenu;
|
|
3185
3318
|
const showRight = dropdownRight || brandRight || hasLocales || hasUser;
|
|
3186
|
-
return /* @__PURE__ */ (0,
|
|
3187
|
-
showLeft && /* @__PURE__ */ (0,
|
|
3319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("header", { "data-slot": "layout-header", className: rootClass, style, children: [
|
|
3320
|
+
showLeft && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
|
|
3188
3321
|
brandLeft && brandNode,
|
|
3189
3322
|
dropdownLeft && dropdownNode,
|
|
3190
|
-
hasMenu && /* @__PURE__ */ (0,
|
|
3323
|
+
hasMenu && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HeaderMenuArea, { items: menu, onSelect: onMenuSelect })
|
|
3191
3324
|
] }),
|
|
3192
|
-
/* @__PURE__ */ (0,
|
|
3193
|
-
showRight && /* @__PURE__ */ (0,
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { "data-slot": "header-center", className: "flex flex-1 items-center gap-4", children }),
|
|
3326
|
+
showRight && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
|
|
3194
3327
|
dropdownRight && dropdownNode,
|
|
3195
3328
|
brandRight && brandNode,
|
|
3196
|
-
hasLocales && /* @__PURE__ */ (0,
|
|
3197
|
-
hasUser && /* @__PURE__ */ (0,
|
|
3329
|
+
hasLocales && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
|
|
3330
|
+
hasUser && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HeaderUserArea, { user, onSelect: onUserSelect })
|
|
3198
3331
|
] })
|
|
3199
3332
|
] });
|
|
3200
3333
|
}
|
|
@@ -3202,25 +3335,25 @@ function HeaderDropdownArea({
|
|
|
3202
3335
|
dropdown,
|
|
3203
3336
|
onSelect
|
|
3204
3337
|
}) {
|
|
3205
|
-
return /* @__PURE__ */ (0,
|
|
3206
|
-
/* @__PURE__ */ (0,
|
|
3338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenu, { children: [
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
3207
3340
|
DropdownMenuTrigger,
|
|
3208
3341
|
{
|
|
3209
3342
|
"data-slot": "header-dropdown",
|
|
3210
3343
|
className: cn(menuItemClass, "outline-hidden"),
|
|
3211
3344
|
children: [
|
|
3212
3345
|
dropdown.label,
|
|
3213
|
-
/* @__PURE__ */ (0,
|
|
3346
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react15.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3214
3347
|
]
|
|
3215
3348
|
}
|
|
3216
3349
|
),
|
|
3217
|
-
/* @__PURE__ */ (0,
|
|
3350
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuContent, { children: dropdown.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
3218
3351
|
DropdownMenuItem,
|
|
3219
3352
|
{
|
|
3220
3353
|
disabled: item.disabled,
|
|
3221
3354
|
onClick: () => onSelect?.(item.value),
|
|
3222
3355
|
children: [
|
|
3223
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3356
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3224
3357
|
item.label
|
|
3225
3358
|
]
|
|
3226
3359
|
},
|
|
@@ -3232,23 +3365,23 @@ function HeaderMenuArea({
|
|
|
3232
3365
|
items,
|
|
3233
3366
|
onSelect
|
|
3234
3367
|
}) {
|
|
3235
|
-
return /* @__PURE__ */ (0,
|
|
3236
|
-
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ (0,
|
|
3237
|
-
/* @__PURE__ */ (0,
|
|
3368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("nav", { "data-slot": "header-menu", className: "flex items-center gap-1", children: items.map(
|
|
3369
|
+
(item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenu, { children: [
|
|
3370
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
3238
3371
|
DropdownMenuTrigger,
|
|
3239
3372
|
{
|
|
3240
3373
|
"data-slot": "header-menu-item",
|
|
3241
3374
|
"data-key": item.key,
|
|
3242
3375
|
className: cn(menuItemClass, "outline-hidden"),
|
|
3243
3376
|
children: [
|
|
3244
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3377
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3245
3378
|
item.label,
|
|
3246
|
-
/* @__PURE__ */ (0,
|
|
3379
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react15.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3247
3380
|
]
|
|
3248
3381
|
}
|
|
3249
3382
|
),
|
|
3250
|
-
/* @__PURE__ */ (0,
|
|
3251
|
-
] }, item.key) : /* @__PURE__ */ (0,
|
|
3383
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuContent, { children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
3384
|
+
] }, item.key) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
3252
3385
|
"button",
|
|
3253
3386
|
{
|
|
3254
3387
|
type: "button",
|
|
@@ -3257,7 +3390,7 @@ function HeaderMenuArea({
|
|
|
3257
3390
|
className: menuItemClass,
|
|
3258
3391
|
onClick: () => onSelect?.(item.key),
|
|
3259
3392
|
children: [
|
|
3260
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3393
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3261
3394
|
item.label
|
|
3262
3395
|
]
|
|
3263
3396
|
},
|
|
@@ -3270,16 +3403,16 @@ function HeaderMenuEntry({
|
|
|
3270
3403
|
onSelect
|
|
3271
3404
|
}) {
|
|
3272
3405
|
if (item.children !== void 0 && item.children.length > 0) {
|
|
3273
|
-
return /* @__PURE__ */ (0,
|
|
3274
|
-
/* @__PURE__ */ (0,
|
|
3275
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuSub, { children: [
|
|
3407
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuSubTrigger, { "data-key": item.key, children: [
|
|
3408
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3276
3409
|
item.label
|
|
3277
3410
|
] }),
|
|
3278
|
-
/* @__PURE__ */ (0,
|
|
3411
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuSubContent, { children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
|
|
3279
3412
|
] });
|
|
3280
3413
|
}
|
|
3281
|
-
return /* @__PURE__ */ (0,
|
|
3282
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuItem, { "data-key": item.key, onClick: () => onSelect?.(item.key), children: [
|
|
3415
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3283
3416
|
item.label
|
|
3284
3417
|
] });
|
|
3285
3418
|
}
|
|
@@ -3287,18 +3420,18 @@ function HeaderUserArea({
|
|
|
3287
3420
|
user,
|
|
3288
3421
|
onSelect
|
|
3289
3422
|
}) {
|
|
3290
|
-
const identity = /* @__PURE__ */ (0,
|
|
3291
|
-
/* @__PURE__ */ (0,
|
|
3292
|
-
user.avatar !== void 0 && /* @__PURE__ */ (0,
|
|
3293
|
-
/* @__PURE__ */ (0,
|
|
3423
|
+
const identity = /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
3424
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Avatar, { className: "size-7", children: [
|
|
3425
|
+
user.avatar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(AvatarImage, { src: user.avatar, alt: user.name }),
|
|
3426
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(AvatarFallback, { children: user.name.charAt(0) })
|
|
3294
3427
|
] }),
|
|
3295
|
-
/* @__PURE__ */ (0,
|
|
3428
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-sm", children: user.name })
|
|
3296
3429
|
] });
|
|
3297
3430
|
if (user.items === void 0 || user.items.length === 0) {
|
|
3298
|
-
return /* @__PURE__ */ (0,
|
|
3431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { "data-slot": "header-user", className: "flex items-center gap-2", children: identity });
|
|
3299
3432
|
}
|
|
3300
|
-
return /* @__PURE__ */ (0,
|
|
3301
|
-
/* @__PURE__ */ (0,
|
|
3433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenu, { children: [
|
|
3434
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3302
3435
|
DropdownMenuTrigger,
|
|
3303
3436
|
{
|
|
3304
3437
|
"data-slot": "header-user",
|
|
@@ -3306,8 +3439,8 @@ function HeaderUserArea({
|
|
|
3306
3439
|
children: identity
|
|
3307
3440
|
}
|
|
3308
3441
|
),
|
|
3309
|
-
/* @__PURE__ */ (0,
|
|
3310
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
3442
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuContent, { align: "end", children: user.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuItem, { onClick: () => onSelect?.(item.value), children: [
|
|
3443
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
3311
3444
|
item.label
|
|
3312
3445
|
] }, item.value)) })
|
|
3313
3446
|
] });
|
|
@@ -3316,21 +3449,21 @@ function HeaderLocalesArea({
|
|
|
3316
3449
|
locales,
|
|
3317
3450
|
onSelect
|
|
3318
3451
|
}) {
|
|
3319
|
-
const { locale } = (0,
|
|
3452
|
+
const { locale } = (0, import_runtime9.useI18n)();
|
|
3320
3453
|
const current = locales.find((option) => option.value === locale);
|
|
3321
|
-
return /* @__PURE__ */ (0,
|
|
3322
|
-
/* @__PURE__ */ (0,
|
|
3454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenu, { children: [
|
|
3455
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
3323
3456
|
DropdownMenuTrigger,
|
|
3324
3457
|
{
|
|
3325
3458
|
"data-slot": "header-locales",
|
|
3326
3459
|
className: cn(menuItemClass, "outline-hidden"),
|
|
3327
3460
|
children: [
|
|
3328
3461
|
current?.label ?? locale,
|
|
3329
|
-
/* @__PURE__ */ (0,
|
|
3462
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react15.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
3330
3463
|
]
|
|
3331
3464
|
}
|
|
3332
3465
|
),
|
|
3333
|
-
/* @__PURE__ */ (0,
|
|
3466
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuContent, { align: "end", children: locales.map((option) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3334
3467
|
DropdownMenuItem,
|
|
3335
3468
|
{
|
|
3336
3469
|
onClick: () => onSelect?.(option.value),
|
|
@@ -3342,20 +3475,20 @@ function HeaderLocalesArea({
|
|
|
3342
3475
|
}
|
|
3343
3476
|
|
|
3344
3477
|
// src/components/components/HoverCard/index.tsx
|
|
3345
|
-
var
|
|
3478
|
+
var import_runtime10 = require("@pactor-app/runtime");
|
|
3346
3479
|
|
|
3347
3480
|
// src/ui/hover-card.tsx
|
|
3348
3481
|
var import_preview_card = require("@base-ui/react/preview-card");
|
|
3349
|
-
var
|
|
3482
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3350
3483
|
function HoverCard({
|
|
3351
3484
|
...props
|
|
3352
3485
|
}) {
|
|
3353
|
-
return /* @__PURE__ */ (0,
|
|
3486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_preview_card.PreviewCard.Root, { "data-slot": "hover-card", ...props });
|
|
3354
3487
|
}
|
|
3355
3488
|
function HoverCardTrigger({
|
|
3356
3489
|
...props
|
|
3357
3490
|
}) {
|
|
3358
|
-
return /* @__PURE__ */ (0,
|
|
3491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_preview_card.PreviewCard.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
3359
3492
|
}
|
|
3360
3493
|
function HoverCardContent({
|
|
3361
3494
|
className,
|
|
@@ -3364,14 +3497,14 @@ function HoverCardContent({
|
|
|
3364
3497
|
sideOffset = 4,
|
|
3365
3498
|
...props
|
|
3366
3499
|
}) {
|
|
3367
|
-
return /* @__PURE__ */ (0,
|
|
3500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_preview_card.PreviewCard.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3368
3501
|
import_preview_card.PreviewCard.Positioner,
|
|
3369
3502
|
{
|
|
3370
3503
|
align,
|
|
3371
3504
|
side,
|
|
3372
3505
|
sideOffset,
|
|
3373
3506
|
className: "isolate z-50",
|
|
3374
|
-
children: /* @__PURE__ */ (0,
|
|
3507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3375
3508
|
import_preview_card.PreviewCard.Popup,
|
|
3376
3509
|
{
|
|
3377
3510
|
"data-slot": "hover-card-content",
|
|
@@ -3387,21 +3520,21 @@ function HoverCardContent({
|
|
|
3387
3520
|
}
|
|
3388
3521
|
|
|
3389
3522
|
// src/components/components/HoverCard/index.tsx
|
|
3390
|
-
var
|
|
3523
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3391
3524
|
function isDslNode2(value) {
|
|
3392
3525
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
3393
3526
|
}
|
|
3394
3527
|
function HoverCard2({ content, children, className, style }) {
|
|
3395
|
-
const { renderChildren } = (0,
|
|
3396
|
-
return /* @__PURE__ */ (0,
|
|
3397
|
-
/* @__PURE__ */ (0,
|
|
3398
|
-
/* @__PURE__ */ (0,
|
|
3528
|
+
const { renderChildren } = (0, import_runtime10.useRenderer)();
|
|
3529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(HoverCard, { children: [
|
|
3530
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
|
|
3531
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
|
|
3399
3532
|
] });
|
|
3400
3533
|
}
|
|
3401
3534
|
|
|
3402
3535
|
// src/components/components/Input/index.tsx
|
|
3403
|
-
var
|
|
3404
|
-
var
|
|
3536
|
+
var import_react14 = require("react");
|
|
3537
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3405
3538
|
function Input2({
|
|
3406
3539
|
name,
|
|
3407
3540
|
label,
|
|
@@ -3415,9 +3548,9 @@ function Input2({
|
|
|
3415
3548
|
style
|
|
3416
3549
|
}) {
|
|
3417
3550
|
const form = useFormContext();
|
|
3418
|
-
const controlId = (0,
|
|
3551
|
+
const controlId = (0, import_react14.useId)();
|
|
3419
3552
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
3420
|
-
(0,
|
|
3553
|
+
(0, import_react14.useEffect)(() => {
|
|
3421
3554
|
if (inForm && form && name) {
|
|
3422
3555
|
form.registerField(name, rules, value);
|
|
3423
3556
|
return () => form.unregisterField(name);
|
|
@@ -3427,14 +3560,14 @@ function Input2({
|
|
|
3427
3560
|
if (inForm && form && name) {
|
|
3428
3561
|
const fieldValue = form.values[name];
|
|
3429
3562
|
const error = form.errors[name];
|
|
3430
|
-
return /* @__PURE__ */ (0,
|
|
3563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
3431
3564
|
"div",
|
|
3432
3565
|
{
|
|
3433
3566
|
"data-slot": "form-item",
|
|
3434
3567
|
className: cn(formItemClass(form.layout), className),
|
|
3435
3568
|
style,
|
|
3436
3569
|
children: [
|
|
3437
|
-
label ? /* @__PURE__ */ (0,
|
|
3570
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3438
3571
|
"label",
|
|
3439
3572
|
{
|
|
3440
3573
|
htmlFor: controlId,
|
|
@@ -3442,7 +3575,7 @@ function Input2({
|
|
|
3442
3575
|
children: label
|
|
3443
3576
|
}
|
|
3444
3577
|
) : null,
|
|
3445
|
-
/* @__PURE__ */ (0,
|
|
3578
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3446
3579
|
Input,
|
|
3447
3580
|
{
|
|
3448
3581
|
id: controlId,
|
|
@@ -3456,12 +3589,12 @@ function Input2({
|
|
|
3456
3589
|
}
|
|
3457
3590
|
}
|
|
3458
3591
|
),
|
|
3459
|
-
error ? /* @__PURE__ */ (0,
|
|
3592
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
3460
3593
|
]
|
|
3461
3594
|
}
|
|
3462
3595
|
);
|
|
3463
3596
|
}
|
|
3464
|
-
return /* @__PURE__ */ (0,
|
|
3597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3465
3598
|
Input,
|
|
3466
3599
|
{
|
|
3467
3600
|
type,
|
|
@@ -3476,9 +3609,9 @@ function Input2({
|
|
|
3476
3609
|
}
|
|
3477
3610
|
|
|
3478
3611
|
// src/ui/input-group.tsx
|
|
3479
|
-
var
|
|
3612
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3480
3613
|
function InputGroup({ className, ...props }) {
|
|
3481
|
-
return /* @__PURE__ */ (0,
|
|
3614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3482
3615
|
"div",
|
|
3483
3616
|
{
|
|
3484
3617
|
"data-slot": "input-group",
|
|
@@ -3497,25 +3630,25 @@ function InputGroup({ className, ...props }) {
|
|
|
3497
3630
|
}
|
|
3498
3631
|
|
|
3499
3632
|
// src/components/components/InputGroup/index.tsx
|
|
3500
|
-
var
|
|
3633
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3501
3634
|
function InputGroup2({ className, style, children }) {
|
|
3502
|
-
return /* @__PURE__ */ (0,
|
|
3635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputGroup, { className, style, children });
|
|
3503
3636
|
}
|
|
3504
3637
|
|
|
3505
3638
|
// src/components/components/InputOTP/index.tsx
|
|
3506
|
-
var
|
|
3639
|
+
var import_react15 = require("react");
|
|
3507
3640
|
|
|
3508
3641
|
// src/ui/input-otp.tsx
|
|
3509
3642
|
var import_input_otp = require("input-otp");
|
|
3510
|
-
var
|
|
3643
|
+
var import_lucide_react16 = require("lucide-react");
|
|
3511
3644
|
var React3 = __toESM(require("react"), 1);
|
|
3512
|
-
var
|
|
3645
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3513
3646
|
function InputOTP({
|
|
3514
3647
|
className,
|
|
3515
3648
|
containerClassName,
|
|
3516
3649
|
...props
|
|
3517
3650
|
}) {
|
|
3518
|
-
return /* @__PURE__ */ (0,
|
|
3651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3519
3652
|
import_input_otp.OTPInput,
|
|
3520
3653
|
{
|
|
3521
3654
|
"data-slot": "input-otp",
|
|
@@ -3529,7 +3662,7 @@ function InputOTP({
|
|
|
3529
3662
|
);
|
|
3530
3663
|
}
|
|
3531
3664
|
function InputOTPGroup({ className, ...props }) {
|
|
3532
|
-
return /* @__PURE__ */ (0,
|
|
3665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3533
3666
|
"div",
|
|
3534
3667
|
{
|
|
3535
3668
|
"data-slot": "input-otp-group",
|
|
@@ -3545,7 +3678,7 @@ function InputOTPSlot({
|
|
|
3545
3678
|
}) {
|
|
3546
3679
|
const inputOTPContext = React3.useContext(import_input_otp.OTPInputContext);
|
|
3547
3680
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
3548
|
-
return /* @__PURE__ */ (0,
|
|
3681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
3549
3682
|
"div",
|
|
3550
3683
|
{
|
|
3551
3684
|
"data-slot": "input-otp-slot",
|
|
@@ -3557,14 +3690,14 @@ function InputOTPSlot({
|
|
|
3557
3690
|
...props,
|
|
3558
3691
|
children: [
|
|
3559
3692
|
char,
|
|
3560
|
-
hasFakeCaret ? /* @__PURE__ */ (0,
|
|
3693
|
+
hasFakeCaret ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }) : null
|
|
3561
3694
|
]
|
|
3562
3695
|
}
|
|
3563
3696
|
);
|
|
3564
3697
|
}
|
|
3565
3698
|
|
|
3566
3699
|
// src/components/components/InputOTP/index.tsx
|
|
3567
|
-
var
|
|
3700
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3568
3701
|
function InputOTP2({
|
|
3569
3702
|
name,
|
|
3570
3703
|
label,
|
|
@@ -3579,15 +3712,15 @@ function InputOTP2({
|
|
|
3579
3712
|
}) {
|
|
3580
3713
|
const form = useFormContext();
|
|
3581
3714
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
3582
|
-
(0,
|
|
3715
|
+
(0, import_react15.useEffect)(() => {
|
|
3583
3716
|
if (inForm && form && name) {
|
|
3584
3717
|
form.registerField(name, rules, value);
|
|
3585
3718
|
return () => form.unregisterField(name);
|
|
3586
3719
|
}
|
|
3587
3720
|
return void 0;
|
|
3588
3721
|
});
|
|
3589
|
-
const [innerValue, setInnerValue] = (0,
|
|
3590
|
-
(0,
|
|
3722
|
+
const [innerValue, setInnerValue] = (0, import_react15.useState)(typeof value === "string" ? value : "");
|
|
3723
|
+
(0, import_react15.useEffect)(() => {
|
|
3591
3724
|
if (!inForm) setInnerValue(typeof value === "string" ? value : "");
|
|
3592
3725
|
}, [inForm, value]);
|
|
3593
3726
|
const current = inForm && form && name ? typeof form.values[name] === "string" ? form.values[name] : "" : innerValue;
|
|
@@ -3602,42 +3735,42 @@ function InputOTP2({
|
|
|
3602
3735
|
onComplete?.(next);
|
|
3603
3736
|
}
|
|
3604
3737
|
};
|
|
3605
|
-
const control = /* @__PURE__ */ (0,
|
|
3738
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3606
3739
|
InputOTP,
|
|
3607
3740
|
{
|
|
3608
3741
|
maxLength: length,
|
|
3609
3742
|
value: current,
|
|
3610
3743
|
onChange: handleChange,
|
|
3611
3744
|
disabled,
|
|
3612
|
-
children: /* @__PURE__ */ (0,
|
|
3745
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(InputOTPSlot, { index }, index)) })
|
|
3613
3746
|
}
|
|
3614
3747
|
);
|
|
3615
3748
|
if (inForm && form && name) {
|
|
3616
3749
|
const error = form.errors[name];
|
|
3617
|
-
return /* @__PURE__ */ (0,
|
|
3750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3618
3751
|
"div",
|
|
3619
3752
|
{
|
|
3620
3753
|
"data-slot": "form-item",
|
|
3621
3754
|
className: cn(formItemClass(form.layout), className),
|
|
3622
3755
|
style,
|
|
3623
3756
|
children: [
|
|
3624
|
-
label ? /* @__PURE__ */ (0,
|
|
3757
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
3625
3758
|
control,
|
|
3626
|
-
error ? /* @__PURE__ */ (0,
|
|
3759
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
3627
3760
|
]
|
|
3628
3761
|
}
|
|
3629
3762
|
);
|
|
3630
3763
|
}
|
|
3631
|
-
return /* @__PURE__ */ (0,
|
|
3764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { "data-slot": "input-otp-field", className: cn("inline-block", className), style, children: control });
|
|
3632
3765
|
}
|
|
3633
3766
|
|
|
3634
3767
|
// src/components/components/Item/index.tsx
|
|
3635
|
-
var
|
|
3768
|
+
var import_runtime11 = require("@pactor-app/runtime");
|
|
3636
3769
|
|
|
3637
3770
|
// src/ui/item.tsx
|
|
3638
|
-
var
|
|
3771
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3639
3772
|
function Item({ className, ...props }) {
|
|
3640
|
-
return /* @__PURE__ */ (0,
|
|
3773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3641
3774
|
"div",
|
|
3642
3775
|
{
|
|
3643
3776
|
"data-slot": "item",
|
|
@@ -3650,7 +3783,7 @@ function Item({ className, ...props }) {
|
|
|
3650
3783
|
);
|
|
3651
3784
|
}
|
|
3652
3785
|
function ItemMedia({ className, ...props }) {
|
|
3653
|
-
return /* @__PURE__ */ (0,
|
|
3786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3654
3787
|
"div",
|
|
3655
3788
|
{
|
|
3656
3789
|
"data-slot": "item-media",
|
|
@@ -3663,7 +3796,7 @@ function ItemMedia({ className, ...props }) {
|
|
|
3663
3796
|
);
|
|
3664
3797
|
}
|
|
3665
3798
|
function ItemContent({ className, ...props }) {
|
|
3666
|
-
return /* @__PURE__ */ (0,
|
|
3799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3667
3800
|
"div",
|
|
3668
3801
|
{
|
|
3669
3802
|
"data-slot": "item-content",
|
|
@@ -3673,7 +3806,7 @@ function ItemContent({ className, ...props }) {
|
|
|
3673
3806
|
);
|
|
3674
3807
|
}
|
|
3675
3808
|
function ItemTitle({ className, ...props }) {
|
|
3676
|
-
return /* @__PURE__ */ (0,
|
|
3809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3677
3810
|
"div",
|
|
3678
3811
|
{
|
|
3679
3812
|
"data-slot": "item-title",
|
|
@@ -3683,7 +3816,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
3683
3816
|
);
|
|
3684
3817
|
}
|
|
3685
3818
|
function ItemDescription({ className, ...props }) {
|
|
3686
|
-
return /* @__PURE__ */ (0,
|
|
3819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3687
3820
|
"p",
|
|
3688
3821
|
{
|
|
3689
3822
|
"data-slot": "item-description",
|
|
@@ -3693,7 +3826,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
3693
3826
|
);
|
|
3694
3827
|
}
|
|
3695
3828
|
function ItemActions({ className, ...props }) {
|
|
3696
|
-
return /* @__PURE__ */ (0,
|
|
3829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3697
3830
|
"div",
|
|
3698
3831
|
{
|
|
3699
3832
|
"data-slot": "item-actions",
|
|
@@ -3704,7 +3837,7 @@ function ItemActions({ className, ...props }) {
|
|
|
3704
3837
|
}
|
|
3705
3838
|
|
|
3706
3839
|
// src/components/components/Item/index.tsx
|
|
3707
|
-
var
|
|
3840
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3708
3841
|
function Item2({
|
|
3709
3842
|
title,
|
|
3710
3843
|
description,
|
|
@@ -3713,22 +3846,22 @@ function Item2({
|
|
|
3713
3846
|
className,
|
|
3714
3847
|
style
|
|
3715
3848
|
}) {
|
|
3716
|
-
const { renderChildren } = (0,
|
|
3849
|
+
const { renderChildren } = (0, import_runtime11.useRenderer)();
|
|
3717
3850
|
const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
|
|
3718
|
-
return /* @__PURE__ */ (0,
|
|
3719
|
-
mediaNodes.length > 0 ? /* @__PURE__ */ (0,
|
|
3720
|
-
/* @__PURE__ */ (0,
|
|
3721
|
-
title ? /* @__PURE__ */ (0,
|
|
3722
|
-
description ? /* @__PURE__ */ (0,
|
|
3851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Item, { className, style, children: [
|
|
3852
|
+
mediaNodes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
|
|
3853
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ItemContent, { children: [
|
|
3854
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ItemTitle, { children: title }) : null,
|
|
3855
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ItemDescription, { children: description }) : null
|
|
3723
3856
|
] }),
|
|
3724
|
-
actions && actions.length > 0 ? /* @__PURE__ */ (0,
|
|
3857
|
+
actions && actions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ItemActions, { children: renderChildren(actions) }) : null
|
|
3725
3858
|
] });
|
|
3726
3859
|
}
|
|
3727
3860
|
|
|
3728
3861
|
// src/ui/kbd.tsx
|
|
3729
|
-
var
|
|
3862
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3730
3863
|
function Kbd({ className, ...props }) {
|
|
3731
|
-
return /* @__PURE__ */ (0,
|
|
3864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3732
3865
|
"kbd",
|
|
3733
3866
|
{
|
|
3734
3867
|
"data-slot": "kbd",
|
|
@@ -3742,18 +3875,18 @@ function Kbd({ className, ...props }) {
|
|
|
3742
3875
|
}
|
|
3743
3876
|
|
|
3744
3877
|
// src/components/components/Kbd/index.tsx
|
|
3745
|
-
var
|
|
3878
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3746
3879
|
function Kbd2({ text, className, style }) {
|
|
3747
|
-
return /* @__PURE__ */ (0,
|
|
3880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Kbd, { className, style, children: text });
|
|
3748
3881
|
}
|
|
3749
3882
|
|
|
3750
3883
|
// src/ui/label.tsx
|
|
3751
|
-
var
|
|
3884
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3752
3885
|
function Label({
|
|
3753
3886
|
className,
|
|
3754
3887
|
...props
|
|
3755
3888
|
}) {
|
|
3756
|
-
return /* @__PURE__ */ (0,
|
|
3889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3757
3890
|
"label",
|
|
3758
3891
|
{
|
|
3759
3892
|
"data-slot": "label",
|
|
@@ -3767,22 +3900,22 @@ function Label({
|
|
|
3767
3900
|
}
|
|
3768
3901
|
|
|
3769
3902
|
// src/components/components/Label/index.tsx
|
|
3770
|
-
var
|
|
3903
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3771
3904
|
function Label2({ text, htmlFor, className, style }) {
|
|
3772
|
-
return /* @__PURE__ */ (0,
|
|
3905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Label, { htmlFor, className, style, children: text });
|
|
3773
3906
|
}
|
|
3774
3907
|
|
|
3775
3908
|
// src/components/components/Layout/index.tsx
|
|
3776
3909
|
var import_core = require("@pactor-app/core");
|
|
3777
|
-
var
|
|
3778
|
-
var
|
|
3910
|
+
var import_runtime12 = require("@pactor-app/runtime");
|
|
3911
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3779
3912
|
function Layout({ direction, className, style, dslChildren }) {
|
|
3780
|
-
const { renderChildren, context } = (0,
|
|
3913
|
+
const { renderChildren, context } = (0, import_runtime12.useRenderer)();
|
|
3781
3914
|
const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
|
|
3782
3915
|
(child) => !(0, import_core.isDslSourceRef)(child) && resolveRootType(child, context) === "Sider"
|
|
3783
3916
|
) : false;
|
|
3784
3917
|
const dir = direction ?? (hasSider ? "horizontal" : "vertical");
|
|
3785
|
-
return /* @__PURE__ */ (0,
|
|
3918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3786
3919
|
"div",
|
|
3787
3920
|
{
|
|
3788
3921
|
"data-slot": "layout",
|
|
@@ -3806,9 +3939,9 @@ function resolveRootType(node, context) {
|
|
|
3806
3939
|
}
|
|
3807
3940
|
|
|
3808
3941
|
// src/components/components/Link/index.tsx
|
|
3809
|
-
var
|
|
3942
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3810
3943
|
function Link2({ href, text, target, className, style, children }) {
|
|
3811
|
-
return /* @__PURE__ */ (0,
|
|
3944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3812
3945
|
"a",
|
|
3813
3946
|
{
|
|
3814
3947
|
"data-slot": "link",
|
|
@@ -3822,8 +3955,351 @@ function Link2({ href, text, target, className, style, children }) {
|
|
|
3822
3955
|
);
|
|
3823
3956
|
}
|
|
3824
3957
|
|
|
3825
|
-
// src/
|
|
3826
|
-
var
|
|
3958
|
+
// src/ui/tooltip.tsx
|
|
3959
|
+
var import_tooltip = require("@base-ui/react/tooltip");
|
|
3960
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3961
|
+
function TooltipProvider({
|
|
3962
|
+
delay = 0,
|
|
3963
|
+
...props
|
|
3964
|
+
}) {
|
|
3965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3966
|
+
import_tooltip.Tooltip.Provider,
|
|
3967
|
+
{
|
|
3968
|
+
"data-slot": "tooltip-provider",
|
|
3969
|
+
delay,
|
|
3970
|
+
...props
|
|
3971
|
+
}
|
|
3972
|
+
);
|
|
3973
|
+
}
|
|
3974
|
+
function Tooltip2({
|
|
3975
|
+
...props
|
|
3976
|
+
}) {
|
|
3977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props }) });
|
|
3978
|
+
}
|
|
3979
|
+
function TooltipTrigger({
|
|
3980
|
+
...props
|
|
3981
|
+
}) {
|
|
3982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
3983
|
+
}
|
|
3984
|
+
function TooltipContent({
|
|
3985
|
+
className,
|
|
3986
|
+
side = "top",
|
|
3987
|
+
sideOffset = 4,
|
|
3988
|
+
align = "center",
|
|
3989
|
+
children,
|
|
3990
|
+
...props
|
|
3991
|
+
}) {
|
|
3992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3993
|
+
import_tooltip.Tooltip.Positioner,
|
|
3994
|
+
{
|
|
3995
|
+
align,
|
|
3996
|
+
side,
|
|
3997
|
+
sideOffset,
|
|
3998
|
+
className: "isolate z-50",
|
|
3999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
4000
|
+
import_tooltip.Tooltip.Popup,
|
|
4001
|
+
{
|
|
4002
|
+
"data-slot": "tooltip-content",
|
|
4003
|
+
className: cn(
|
|
4004
|
+
"z-50 w-fit origin-(--transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
4005
|
+
className
|
|
4006
|
+
),
|
|
4007
|
+
...props,
|
|
4008
|
+
children: [
|
|
4009
|
+
children,
|
|
4010
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 rotate-45 rounded-[2px] bg-primary fill-primary data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1" })
|
|
4011
|
+
]
|
|
4012
|
+
}
|
|
4013
|
+
)
|
|
4014
|
+
}
|
|
4015
|
+
) });
|
|
4016
|
+
}
|
|
4017
|
+
|
|
4018
|
+
// src/components/components/Sidebar/rail-tooltip.tsx
|
|
4019
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4020
|
+
function RailTooltip({
|
|
4021
|
+
label,
|
|
4022
|
+
children
|
|
4023
|
+
}) {
|
|
4024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Tooltip2, { children: [
|
|
4025
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TooltipTrigger, { render: children }),
|
|
4026
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TooltipContent, { side: "right", sideOffset: 8, children: label })
|
|
4027
|
+
] });
|
|
4028
|
+
}
|
|
4029
|
+
|
|
4030
|
+
// src/components/components/Sidebar/index.tsx
|
|
4031
|
+
var import_runtime13 = require("@pactor-app/runtime");
|
|
4032
|
+
var import_lucide_react17 = require("lucide-react");
|
|
4033
|
+
var import_react16 = require("react");
|
|
4034
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4035
|
+
var SidebarDrawerContext = (0, import_react16.createContext)(null);
|
|
4036
|
+
function useSidebarDrawer() {
|
|
4037
|
+
return (0, import_react16.useContext)(SidebarDrawerContext);
|
|
4038
|
+
}
|
|
4039
|
+
var MOBILE_MEDIA_QUERY = "(max-width: 767px)";
|
|
4040
|
+
function useIsMobileViewport() {
|
|
4041
|
+
const [isMobile, setIsMobile] = (0, import_react16.useState)(
|
|
4042
|
+
() => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(MOBILE_MEDIA_QUERY).matches
|
|
4043
|
+
);
|
|
4044
|
+
(0, import_react16.useEffect)(() => {
|
|
4045
|
+
if (typeof window.matchMedia !== "function") {
|
|
4046
|
+
return;
|
|
4047
|
+
}
|
|
4048
|
+
const media = window.matchMedia(MOBILE_MEDIA_QUERY);
|
|
4049
|
+
const onChange = (event) => {
|
|
4050
|
+
setIsMobile(event.matches);
|
|
4051
|
+
};
|
|
4052
|
+
setIsMobile(media.matches);
|
|
4053
|
+
media.addEventListener("change", onChange);
|
|
4054
|
+
return () => media.removeEventListener("change", onChange);
|
|
4055
|
+
}, []);
|
|
4056
|
+
return isMobile;
|
|
4057
|
+
}
|
|
4058
|
+
function useOptionalRenderer() {
|
|
4059
|
+
try {
|
|
4060
|
+
return (0, import_runtime13.useRenderer)();
|
|
4061
|
+
} catch {
|
|
4062
|
+
return null;
|
|
4063
|
+
}
|
|
4064
|
+
}
|
|
4065
|
+
function SidebarContent({ content }) {
|
|
4066
|
+
const renderer = useOptionalRenderer();
|
|
4067
|
+
if (renderer !== null && typeof content === "object" && content !== null && !("$$typeof" in content) && "type" in content) {
|
|
4068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_jsx_runtime78.Fragment, { children: renderer.renderChildren([content]) });
|
|
4069
|
+
}
|
|
4070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_jsx_runtime78.Fragment, { children: content });
|
|
4071
|
+
}
|
|
4072
|
+
function isBrandObject(brand) {
|
|
4073
|
+
return typeof brand === "object" && brand !== null && !("$$typeof" in brand) && "title" in brand;
|
|
4074
|
+
}
|
|
4075
|
+
function Sidebar({
|
|
4076
|
+
brand,
|
|
4077
|
+
items = [],
|
|
4078
|
+
content,
|
|
4079
|
+
sidebarFooter,
|
|
4080
|
+
collapsible,
|
|
4081
|
+
onCollapse,
|
|
4082
|
+
locationKey,
|
|
4083
|
+
drawer = true,
|
|
4084
|
+
className,
|
|
4085
|
+
style,
|
|
4086
|
+
children
|
|
4087
|
+
}) {
|
|
4088
|
+
const { t } = (0, import_runtime13.useI18n)();
|
|
4089
|
+
const isMobile = useIsMobileViewport();
|
|
4090
|
+
const [drawerOpen, setDrawerOpen] = (0, import_react16.useState)(false);
|
|
4091
|
+
const [collapsed, setCollapsed] = (0, import_react16.useState)(false);
|
|
4092
|
+
const collapsedEffective = collapsible === true && collapsed && !isMobile;
|
|
4093
|
+
const close = (0, import_react16.useCallback)(() => setDrawerOpen(false), []);
|
|
4094
|
+
const toggleCollapsed = () => {
|
|
4095
|
+
const next = !collapsed;
|
|
4096
|
+
setCollapsed(next);
|
|
4097
|
+
onCollapse?.(next);
|
|
4098
|
+
};
|
|
4099
|
+
const [trackedLocationKey, setTrackedLocationKey] = (0, import_react16.useState)(locationKey);
|
|
4100
|
+
if (trackedLocationKey !== locationKey) {
|
|
4101
|
+
setTrackedLocationKey(locationKey);
|
|
4102
|
+
setDrawerOpen(false);
|
|
4103
|
+
}
|
|
4104
|
+
(0, import_react16.useEffect)(() => {
|
|
4105
|
+
if (!drawerOpen) {
|
|
4106
|
+
return;
|
|
4107
|
+
}
|
|
4108
|
+
const onKeyDown = (event) => {
|
|
4109
|
+
if (event.key === "Escape") {
|
|
4110
|
+
setDrawerOpen(false);
|
|
4111
|
+
}
|
|
4112
|
+
};
|
|
4113
|
+
window.addEventListener("keydown", onKeyDown);
|
|
4114
|
+
return () => window.removeEventListener("keydown", onKeyDown);
|
|
4115
|
+
}, [drawerOpen]);
|
|
4116
|
+
const brandNode = isBrandObject(brand) ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
4117
|
+
brand.logo ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4118
|
+
"img",
|
|
4119
|
+
{
|
|
4120
|
+
"data-slot": "sidebar-brand-logo",
|
|
4121
|
+
src: brand.logo,
|
|
4122
|
+
alt: brand.title,
|
|
4123
|
+
className: "size-6 shrink-0"
|
|
4124
|
+
}
|
|
4125
|
+
) : null,
|
|
4126
|
+
collapsedEffective ? null : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "truncate text-sm font-semibold", children: brand.title })
|
|
4127
|
+
] }) : brand;
|
|
4128
|
+
const collapseTrigger = collapsible && !isMobile ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4129
|
+
"button",
|
|
4130
|
+
{
|
|
4131
|
+
type: "button",
|
|
4132
|
+
"data-slot": "sidebar-collapse-trigger",
|
|
4133
|
+
"aria-label": collapsedEffective ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
|
|
4134
|
+
"aria-expanded": !collapsedEffective,
|
|
4135
|
+
title: collapsedEffective ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
|
|
4136
|
+
className: cn(
|
|
4137
|
+
"cursor-pointer flex size-8 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground"
|
|
4138
|
+
),
|
|
4139
|
+
onClick: toggleCollapsed,
|
|
4140
|
+
children: collapsedEffective ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react17.ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react17.ChevronLeft, { "aria-hidden": true, className: "size-4" })
|
|
4141
|
+
}
|
|
4142
|
+
) : null;
|
|
4143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4144
|
+
SidebarDrawerContext.Provider,
|
|
4145
|
+
{
|
|
4146
|
+
value: { close, collapsed: collapsedEffective },
|
|
4147
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4148
|
+
"div",
|
|
4149
|
+
{
|
|
4150
|
+
"data-slot": "sidebar-layout",
|
|
4151
|
+
className: cn("flex min-h-screen w-full", className),
|
|
4152
|
+
style,
|
|
4153
|
+
children: [
|
|
4154
|
+
drawer && drawerOpen ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4155
|
+
"div",
|
|
4156
|
+
{
|
|
4157
|
+
"data-slot": "sidebar-scrim",
|
|
4158
|
+
"aria-hidden": true,
|
|
4159
|
+
className: "fixed inset-0 z-40 bg-black/40 md:hidden",
|
|
4160
|
+
onClick: close
|
|
4161
|
+
}
|
|
4162
|
+
) : null,
|
|
4163
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4164
|
+
"aside",
|
|
4165
|
+
{
|
|
4166
|
+
"data-slot": "sidebar",
|
|
4167
|
+
"data-collapsed": collapsedEffective || void 0,
|
|
4168
|
+
"data-open": drawerOpen ? "true" : "false",
|
|
4169
|
+
inert: drawer && isMobile && !drawerOpen ? true : void 0,
|
|
4170
|
+
className: cn(
|
|
4171
|
+
"flex shrink-0 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width,transform]",
|
|
4172
|
+
collapsedEffective ? "w-16" : "w-60",
|
|
4173
|
+
// 移动端覆盖抽屉:退出文档流,关闭时移出屏幕
|
|
4174
|
+
drawer && "max-md:fixed max-md:inset-y-0 max-md:left-0 max-md:z-50 max-md:w-60 max-md:-translate-x-full max-md:data-[open=true]:translate-x-0"
|
|
4175
|
+
),
|
|
4176
|
+
children: [
|
|
4177
|
+
brand !== void 0 || collapseTrigger !== null ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4178
|
+
"div",
|
|
4179
|
+
{
|
|
4180
|
+
"data-slot": "sidebar-brand",
|
|
4181
|
+
className: cn(
|
|
4182
|
+
"flex h-14 shrink-0 items-center gap-2 border-b border-sidebar-border px-4",
|
|
4183
|
+
// 移动端品牌维持顶栏现状:抽屉内不重复渲染品牌行
|
|
4184
|
+
"max-md:hidden",
|
|
4185
|
+
collapsedEffective && "justify-center px-2"
|
|
4186
|
+
),
|
|
4187
|
+
children: [
|
|
4188
|
+
collapsedEffective ? null : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: brandNode }),
|
|
4189
|
+
collapseTrigger
|
|
4190
|
+
]
|
|
4191
|
+
}
|
|
4192
|
+
) : null,
|
|
4193
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4194
|
+
"nav",
|
|
4195
|
+
{
|
|
4196
|
+
"data-slot": "sidebar-nav",
|
|
4197
|
+
className: "min-h-0 flex-1 overflow-auto p-2",
|
|
4198
|
+
children: content !== void 0 && content !== null ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SidebarContent, { content }) : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4199
|
+
SidebarEntry,
|
|
4200
|
+
{
|
|
4201
|
+
item,
|
|
4202
|
+
depth: 0,
|
|
4203
|
+
collapsed: collapsedEffective
|
|
4204
|
+
},
|
|
4205
|
+
item.href ?? item.label ?? index
|
|
4206
|
+
))
|
|
4207
|
+
}
|
|
4208
|
+
),
|
|
4209
|
+
sidebarFooter !== void 0 && sidebarFooter !== null && !collapsedEffective ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4210
|
+
"div",
|
|
4211
|
+
{
|
|
4212
|
+
"data-slot": "sidebar-footer",
|
|
4213
|
+
className: "shrink-0 border-t border-sidebar-border p-2",
|
|
4214
|
+
children: sidebarFooter
|
|
4215
|
+
}
|
|
4216
|
+
) : null
|
|
4217
|
+
]
|
|
4218
|
+
}
|
|
4219
|
+
),
|
|
4220
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4221
|
+
"main",
|
|
4222
|
+
{
|
|
4223
|
+
"data-slot": "sidebar-content",
|
|
4224
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
4225
|
+
children: [
|
|
4226
|
+
drawer ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4227
|
+
"div",
|
|
4228
|
+
{
|
|
4229
|
+
"data-slot": "sidebar-topbar",
|
|
4230
|
+
className: "flex h-14 items-center gap-2 border-b border-sidebar-border bg-sidebar px-3 md:hidden",
|
|
4231
|
+
children: [
|
|
4232
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4233
|
+
"button",
|
|
4234
|
+
{
|
|
4235
|
+
type: "button",
|
|
4236
|
+
"data-slot": "sidebar-menu-trigger",
|
|
4237
|
+
"aria-label": t("pactor.layout.openNavigation"),
|
|
4238
|
+
"aria-expanded": drawerOpen,
|
|
4239
|
+
className: "flex size-8 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",
|
|
4240
|
+
onClick: () => setDrawerOpen(true),
|
|
4241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon, { name: "menu", size: 18 })
|
|
4242
|
+
}
|
|
4243
|
+
),
|
|
4244
|
+
brandNode
|
|
4245
|
+
]
|
|
4246
|
+
}
|
|
4247
|
+
) : null,
|
|
4248
|
+
children
|
|
4249
|
+
]
|
|
4250
|
+
}
|
|
4251
|
+
)
|
|
4252
|
+
]
|
|
4253
|
+
}
|
|
4254
|
+
)
|
|
4255
|
+
}
|
|
4256
|
+
);
|
|
4257
|
+
}
|
|
4258
|
+
function SidebarEntry({
|
|
4259
|
+
item,
|
|
4260
|
+
depth,
|
|
4261
|
+
collapsed
|
|
4262
|
+
}) {
|
|
4263
|
+
const entryClass = cn(
|
|
4264
|
+
"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors",
|
|
4265
|
+
"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
4266
|
+
collapsed && "justify-center px-0"
|
|
4267
|
+
);
|
|
4268
|
+
const indentStyle = !collapsed && depth > 0 ? { paddingLeft: 12 + depth * 16 } : void 0;
|
|
4269
|
+
const labelNode = collapsed ? null : item.label;
|
|
4270
|
+
const iconNode = item.icon ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon, { name: item.icon, size: "sm" }) : null;
|
|
4271
|
+
const entry = item.href ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4272
|
+
"a",
|
|
4273
|
+
{
|
|
4274
|
+
"data-slot": "sidebar-item",
|
|
4275
|
+
href: item.href,
|
|
4276
|
+
className: entryClass,
|
|
4277
|
+
style: indentStyle,
|
|
4278
|
+
children: [
|
|
4279
|
+
iconNode,
|
|
4280
|
+
labelNode
|
|
4281
|
+
]
|
|
4282
|
+
}
|
|
4283
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { "data-slot": "sidebar-item", className: entryClass, style: indentStyle, children: [
|
|
4284
|
+
iconNode,
|
|
4285
|
+
labelNode
|
|
4286
|
+
] });
|
|
4287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { "data-slot": "sidebar-entry", children: [
|
|
4288
|
+
collapsed ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(RailTooltip, { label: item.label, children: entry }) : entry,
|
|
4289
|
+
item.children?.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4290
|
+
SidebarEntry,
|
|
4291
|
+
{
|
|
4292
|
+
item: child,
|
|
4293
|
+
depth: depth + 1,
|
|
4294
|
+
collapsed
|
|
4295
|
+
},
|
|
4296
|
+
child.href ?? child.label ?? index
|
|
4297
|
+
))
|
|
4298
|
+
] });
|
|
4299
|
+
}
|
|
4300
|
+
|
|
4301
|
+
// src/components/components/Menu/index.tsx
|
|
4302
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3827
4303
|
function Menu2({
|
|
3828
4304
|
items = [],
|
|
3829
4305
|
mode = "inline",
|
|
@@ -3832,27 +4308,48 @@ function Menu2({
|
|
|
3832
4308
|
className,
|
|
3833
4309
|
style
|
|
3834
4310
|
}) {
|
|
3835
|
-
|
|
4311
|
+
const drawer = useSidebarDrawer();
|
|
4312
|
+
const collapsed = mode === "inline" && drawer?.collapsed === true;
|
|
4313
|
+
let previousGroup;
|
|
4314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3836
4315
|
"nav",
|
|
3837
4316
|
{
|
|
3838
4317
|
"data-slot": "menu",
|
|
3839
4318
|
"data-mode": mode,
|
|
4319
|
+
"data-collapsed": collapsed || void 0,
|
|
3840
4320
|
className: cn(
|
|
3841
4321
|
mode === "horizontal" ? "flex items-center gap-1" : "flex flex-col gap-0.5 p-2",
|
|
3842
4322
|
className
|
|
3843
4323
|
),
|
|
3844
4324
|
style,
|
|
3845
|
-
children: items.map((item) =>
|
|
3846
|
-
|
|
3847
|
-
{
|
|
3848
|
-
item
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
4325
|
+
children: items.map((item) => {
|
|
4326
|
+
let groupLabel;
|
|
4327
|
+
if (!collapsed && mode === "inline" && item.group !== void 0 && item.group !== previousGroup) {
|
|
4328
|
+
groupLabel = item.group;
|
|
4329
|
+
}
|
|
4330
|
+
previousGroup = item.group;
|
|
4331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { "data-slot": "menu-group-entry", children: [
|
|
4332
|
+
groupLabel !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4333
|
+
"div",
|
|
4334
|
+
{
|
|
4335
|
+
"data-slot": "menu-group",
|
|
4336
|
+
className: "px-3 pb-1 pt-3 text-xs font-medium text-muted-foreground first:pt-1",
|
|
4337
|
+
children: groupLabel
|
|
4338
|
+
}
|
|
4339
|
+
),
|
|
4340
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4341
|
+
MenuEntry,
|
|
4342
|
+
{
|
|
4343
|
+
item,
|
|
4344
|
+
mode,
|
|
4345
|
+
depth: 0,
|
|
4346
|
+
selectedKey,
|
|
4347
|
+
onSelect,
|
|
4348
|
+
collapsed
|
|
4349
|
+
}
|
|
4350
|
+
)
|
|
4351
|
+
] }, item.key);
|
|
4352
|
+
})
|
|
3856
4353
|
}
|
|
3857
4354
|
);
|
|
3858
4355
|
}
|
|
@@ -3861,37 +4358,56 @@ function MenuEntry({
|
|
|
3861
4358
|
mode,
|
|
3862
4359
|
depth,
|
|
3863
4360
|
selectedKey,
|
|
3864
|
-
onSelect
|
|
4361
|
+
onSelect,
|
|
4362
|
+
collapsed = false
|
|
3865
4363
|
}) {
|
|
3866
4364
|
const selected = item.key === selectedKey;
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
4365
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
4366
|
+
"button",
|
|
4367
|
+
{
|
|
4368
|
+
type: "button",
|
|
4369
|
+
"data-slot": "menu-item",
|
|
4370
|
+
"aria-current": selected ? "page" : void 0,
|
|
4371
|
+
disabled: item.disabled,
|
|
4372
|
+
className: cn(
|
|
4373
|
+
"flex w-full items-center gap-2 rounded-md text-sm transition-colors",
|
|
4374
|
+
mode === "horizontal" ? "px-3 py-2" : "px-3 py-2 text-left",
|
|
4375
|
+
collapsed && "justify-center px-0",
|
|
4376
|
+
selected ? "bg-accent font-medium text-accent-foreground" : "cursor-pointer text-muted-foreground hover:bg-accent/50 hover:text-foreground",
|
|
4377
|
+
item.disabled && "cursor-not-allowed opacity-50 hover:bg-transparent hover:text-muted-foreground"
|
|
4378
|
+
),
|
|
4379
|
+
style: mode === "inline" && depth > 0 && !collapsed ? { paddingLeft: 12 + depth * 16 } : void 0,
|
|
4380
|
+
onClick: () => {
|
|
4381
|
+
if (!item.disabled) {
|
|
4382
|
+
onSelect?.(item.key);
|
|
4383
|
+
}
|
|
4384
|
+
},
|
|
4385
|
+
children: [
|
|
4386
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
4387
|
+
collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: item.label }),
|
|
4388
|
+
item.dot && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { "data-slot": "menu-item-dot", className: "size-1.5 shrink-0 rounded-full bg-destructive" }) : null,
|
|
4389
|
+
item.badge !== void 0 && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4390
|
+
"span",
|
|
4391
|
+
{
|
|
4392
|
+
"data-slot": "menu-item-badge",
|
|
4393
|
+
className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
4394
|
+
children: item.badge
|
|
4395
|
+
}
|
|
4396
|
+
) : null
|
|
4397
|
+
]
|
|
4398
|
+
}
|
|
4399
|
+
);
|
|
4400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { "data-slot": "menu-entry", "data-key": item.key, children: [
|
|
4401
|
+
collapsed ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(RailTooltip, { label: item.label, children: button }) : button,
|
|
4402
|
+
item.children?.map((child) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3888
4403
|
MenuEntry,
|
|
3889
4404
|
{
|
|
3890
4405
|
item: child,
|
|
3891
4406
|
mode,
|
|
3892
4407
|
depth: depth + 1,
|
|
3893
4408
|
selectedKey,
|
|
3894
|
-
onSelect
|
|
4409
|
+
onSelect,
|
|
4410
|
+
collapsed
|
|
3895
4411
|
},
|
|
3896
4412
|
child.key
|
|
3897
4413
|
))
|
|
@@ -3901,12 +4417,12 @@ function MenuEntry({
|
|
|
3901
4417
|
// src/ui/menubar.tsx
|
|
3902
4418
|
var import_menu2 = require("@base-ui/react/menu");
|
|
3903
4419
|
var import_menubar = require("@base-ui/react/menubar");
|
|
3904
|
-
var
|
|
4420
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3905
4421
|
function Menubar({
|
|
3906
4422
|
className,
|
|
3907
4423
|
...props
|
|
3908
4424
|
}) {
|
|
3909
|
-
return /* @__PURE__ */ (0,
|
|
4425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3910
4426
|
import_menubar.Menubar,
|
|
3911
4427
|
{
|
|
3912
4428
|
"data-slot": "menubar",
|
|
@@ -3921,13 +4437,13 @@ function Menubar({
|
|
|
3921
4437
|
function MenubarMenu({
|
|
3922
4438
|
...props
|
|
3923
4439
|
}) {
|
|
3924
|
-
return /* @__PURE__ */ (0,
|
|
4440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_menu2.Menu.Root, { "data-slot": "menubar-menu", ...props });
|
|
3925
4441
|
}
|
|
3926
4442
|
function MenubarTrigger({
|
|
3927
4443
|
className,
|
|
3928
4444
|
...props
|
|
3929
4445
|
}) {
|
|
3930
|
-
return /* @__PURE__ */ (0,
|
|
4446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3931
4447
|
import_menu2.Menu.Trigger,
|
|
3932
4448
|
{
|
|
3933
4449
|
"data-slot": "menubar-trigger",
|
|
@@ -3946,14 +4462,14 @@ function MenubarContent({
|
|
|
3946
4462
|
sideOffset = 8,
|
|
3947
4463
|
...props
|
|
3948
4464
|
}) {
|
|
3949
|
-
return /* @__PURE__ */ (0,
|
|
4465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_menu2.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3950
4466
|
import_menu2.Menu.Positioner,
|
|
3951
4467
|
{
|
|
3952
4468
|
align,
|
|
3953
4469
|
side,
|
|
3954
4470
|
sideOffset,
|
|
3955
4471
|
className: "isolate z-50",
|
|
3956
|
-
children: /* @__PURE__ */ (0,
|
|
4472
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3957
4473
|
import_menu2.Menu.Popup,
|
|
3958
4474
|
{
|
|
3959
4475
|
"data-slot": "menubar-content",
|
|
@@ -3972,7 +4488,7 @@ function MenubarItem({
|
|
|
3972
4488
|
variant = "default",
|
|
3973
4489
|
...props
|
|
3974
4490
|
}) {
|
|
3975
|
-
return /* @__PURE__ */ (0,
|
|
4491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3976
4492
|
import_menu2.Menu.Item,
|
|
3977
4493
|
{
|
|
3978
4494
|
"data-slot": "menubar-item",
|
|
@@ -3987,17 +4503,17 @@ function MenubarItem({
|
|
|
3987
4503
|
}
|
|
3988
4504
|
|
|
3989
4505
|
// src/components/components/Menubar/index.tsx
|
|
3990
|
-
var
|
|
4506
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3991
4507
|
function Menubar2({ menus = [], onSelect, className, style }) {
|
|
3992
|
-
return /* @__PURE__ */ (0,
|
|
3993
|
-
/* @__PURE__ */ (0,
|
|
3994
|
-
/* @__PURE__ */ (0,
|
|
4508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Menubar, { className, style, children: menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(MenubarMenu, { children: [
|
|
4509
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MenubarTrigger, { children: menu.label }),
|
|
4510
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MenubarContent, { children: menu.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
3995
4511
|
MenubarItem,
|
|
3996
4512
|
{
|
|
3997
4513
|
disabled: item.disabled,
|
|
3998
4514
|
onClick: () => onSelect?.(item.value),
|
|
3999
4515
|
children: [
|
|
4000
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
4516
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
4001
4517
|
item.label
|
|
4002
4518
|
]
|
|
4003
4519
|
},
|
|
@@ -4008,15 +4524,15 @@ function Menubar2({ menus = [], onSelect, className, style }) {
|
|
|
4008
4524
|
|
|
4009
4525
|
// src/ui/navigation-menu.tsx
|
|
4010
4526
|
var import_navigation_menu = require("@base-ui/react/navigation-menu");
|
|
4011
|
-
var
|
|
4527
|
+
var import_lucide_react18 = require("lucide-react");
|
|
4012
4528
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
4013
|
-
var
|
|
4529
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4014
4530
|
function NavigationMenu({
|
|
4015
4531
|
className,
|
|
4016
4532
|
children,
|
|
4017
4533
|
...props
|
|
4018
4534
|
}) {
|
|
4019
|
-
return /* @__PURE__ */ (0,
|
|
4535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
4020
4536
|
import_navigation_menu.NavigationMenu.Root,
|
|
4021
4537
|
{
|
|
4022
4538
|
"data-slot": "navigation-menu",
|
|
@@ -4024,7 +4540,7 @@ function NavigationMenu({
|
|
|
4024
4540
|
...props,
|
|
4025
4541
|
children: [
|
|
4026
4542
|
children,
|
|
4027
|
-
/* @__PURE__ */ (0,
|
|
4543
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NavigationMenuViewport, {})
|
|
4028
4544
|
]
|
|
4029
4545
|
}
|
|
4030
4546
|
);
|
|
@@ -4033,7 +4549,7 @@ function NavigationMenuList({
|
|
|
4033
4549
|
className,
|
|
4034
4550
|
...props
|
|
4035
4551
|
}) {
|
|
4036
|
-
return /* @__PURE__ */ (0,
|
|
4552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4037
4553
|
import_navigation_menu.NavigationMenu.List,
|
|
4038
4554
|
{
|
|
4039
4555
|
"data-slot": "navigation-menu-list",
|
|
@@ -4046,7 +4562,7 @@ function NavigationMenuItem({
|
|
|
4046
4562
|
className,
|
|
4047
4563
|
...props
|
|
4048
4564
|
}) {
|
|
4049
|
-
return /* @__PURE__ */ (0,
|
|
4565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4050
4566
|
import_navigation_menu.NavigationMenu.Item,
|
|
4051
4567
|
{
|
|
4052
4568
|
"data-slot": "navigation-menu-item",
|
|
@@ -4063,7 +4579,7 @@ function NavigationMenuTrigger({
|
|
|
4063
4579
|
children,
|
|
4064
4580
|
...props
|
|
4065
4581
|
}) {
|
|
4066
|
-
return /* @__PURE__ */ (0,
|
|
4582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
4067
4583
|
import_navigation_menu.NavigationMenu.Trigger,
|
|
4068
4584
|
{
|
|
4069
4585
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -4071,8 +4587,8 @@ function NavigationMenuTrigger({
|
|
|
4071
4587
|
...props,
|
|
4072
4588
|
children: [
|
|
4073
4589
|
children,
|
|
4074
|
-
/* @__PURE__ */ (0,
|
|
4075
|
-
|
|
4590
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4591
|
+
import_lucide_react18.ChevronDownIcon,
|
|
4076
4592
|
{
|
|
4077
4593
|
className: "relative top-px ml-1 size-3 transition-transform duration-200 group-data-open/navigation-menu-trigger:rotate-180",
|
|
4078
4594
|
"aria-hidden": "true"
|
|
@@ -4086,7 +4602,7 @@ function NavigationMenuContent({
|
|
|
4086
4602
|
className,
|
|
4087
4603
|
...props
|
|
4088
4604
|
}) {
|
|
4089
|
-
return /* @__PURE__ */ (0,
|
|
4605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4090
4606
|
import_navigation_menu.NavigationMenu.Content,
|
|
4091
4607
|
{
|
|
4092
4608
|
"data-slot": "navigation-menu-content",
|
|
@@ -4099,13 +4615,13 @@ function NavigationMenuContent({
|
|
|
4099
4615
|
);
|
|
4100
4616
|
}
|
|
4101
4617
|
function NavigationMenuViewport({ className }) {
|
|
4102
|
-
return /* @__PURE__ */ (0,
|
|
4618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_navigation_menu.NavigationMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4103
4619
|
import_navigation_menu.NavigationMenu.Positioner,
|
|
4104
4620
|
{
|
|
4105
4621
|
side: "bottom",
|
|
4106
4622
|
align: "start",
|
|
4107
4623
|
className: "isolate z-50",
|
|
4108
|
-
children: /* @__PURE__ */ (0,
|
|
4624
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4109
4625
|
import_navigation_menu.NavigationMenu.Popup,
|
|
4110
4626
|
{
|
|
4111
4627
|
"data-slot": "navigation-menu-popup",
|
|
@@ -4113,7 +4629,7 @@ function NavigationMenuViewport({ className }) {
|
|
|
4113
4629
|
"origin-(--transform-origin) overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
4114
4630
|
className
|
|
4115
4631
|
),
|
|
4116
|
-
children: /* @__PURE__ */ (0,
|
|
4632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_navigation_menu.NavigationMenu.Viewport, { "data-slot": "navigation-menu-viewport" })
|
|
4117
4633
|
}
|
|
4118
4634
|
)
|
|
4119
4635
|
}
|
|
@@ -4123,7 +4639,7 @@ function NavigationMenuLink({
|
|
|
4123
4639
|
className,
|
|
4124
4640
|
...props
|
|
4125
4641
|
}) {
|
|
4126
|
-
return /* @__PURE__ */ (0,
|
|
4642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4127
4643
|
import_navigation_menu.NavigationMenu.Link,
|
|
4128
4644
|
{
|
|
4129
4645
|
"data-slot": "navigation-menu-link",
|
|
@@ -4137,33 +4653,33 @@ function NavigationMenuLink({
|
|
|
4137
4653
|
}
|
|
4138
4654
|
|
|
4139
4655
|
// src/components/components/NavigationMenu/index.tsx
|
|
4140
|
-
var
|
|
4656
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4141
4657
|
function NavigationMenu2({ items = [], className, style }) {
|
|
4142
|
-
return /* @__PURE__ */ (0,
|
|
4143
|
-
/* @__PURE__ */ (0,
|
|
4658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NavigationMenu, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NavigationMenuList, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NavigationMenuItem, { value: `item-${index}`, children: item.children && item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
4659
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
4144
4660
|
NavigationMenuTrigger,
|
|
4145
4661
|
{
|
|
4146
4662
|
className: item.icon !== void 0 ? "gap-2" : void 0,
|
|
4147
4663
|
children: [
|
|
4148
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
4664
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
4149
4665
|
item.label
|
|
4150
4666
|
]
|
|
4151
4667
|
}
|
|
4152
4668
|
),
|
|
4153
|
-
/* @__PURE__ */ (0,
|
|
4154
|
-
/* @__PURE__ */ (0,
|
|
4669
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NavigationMenuContent, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("ul", { className: "grid w-64 gap-1", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(NavigationMenuLink, { href: child.href, children: [
|
|
4670
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
4155
4671
|
"span",
|
|
4156
4672
|
{
|
|
4157
4673
|
className: child.icon !== void 0 ? "flex items-center gap-2 font-medium" : "font-medium",
|
|
4158
4674
|
children: [
|
|
4159
|
-
child.icon ? /* @__PURE__ */ (0,
|
|
4675
|
+
child.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: child.icon, size: "sm" }) : null,
|
|
4160
4676
|
child.label
|
|
4161
4677
|
]
|
|
4162
4678
|
}
|
|
4163
4679
|
),
|
|
4164
|
-
child.description ? /* @__PURE__ */ (0,
|
|
4680
|
+
child.description ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-muted-foreground", children: child.description }) : null
|
|
4165
4681
|
] }) }, child.href)) }) })
|
|
4166
|
-
] }) : /* @__PURE__ */ (0,
|
|
4682
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
4167
4683
|
NavigationMenuLink,
|
|
4168
4684
|
{
|
|
4169
4685
|
href: item.href,
|
|
@@ -4172,7 +4688,7 @@ function NavigationMenu2({ items = [], className, style }) {
|
|
|
4172
4688
|
item.icon !== void 0 && "gap-2"
|
|
4173
4689
|
),
|
|
4174
4690
|
children: [
|
|
4175
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
4691
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
4176
4692
|
item.label
|
|
4177
4693
|
]
|
|
4178
4694
|
}
|
|
@@ -4180,22 +4696,22 @@ function NavigationMenu2({ items = [], className, style }) {
|
|
|
4180
4696
|
}
|
|
4181
4697
|
|
|
4182
4698
|
// src/components/components/Page/index.tsx
|
|
4183
|
-
var
|
|
4699
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
4184
4700
|
function Page({ title, className, style, children }) {
|
|
4185
|
-
return /* @__PURE__ */ (0,
|
|
4186
|
-
title ? /* @__PURE__ */ (0,
|
|
4187
|
-
/* @__PURE__ */ (0,
|
|
4701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
|
|
4702
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
|
|
4703
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { "data-slot": "page-content", className: "space-y-5", children })
|
|
4188
4704
|
] });
|
|
4189
4705
|
}
|
|
4190
4706
|
|
|
4191
4707
|
// src/components/components/Pagination/index.tsx
|
|
4192
|
-
var
|
|
4708
|
+
var import_react17 = require("react");
|
|
4193
4709
|
|
|
4194
4710
|
// src/ui/pagination.tsx
|
|
4195
|
-
var
|
|
4196
|
-
var
|
|
4711
|
+
var import_lucide_react19 = require("lucide-react");
|
|
4712
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
4197
4713
|
function Pagination({ className, ...props }) {
|
|
4198
|
-
return /* @__PURE__ */ (0,
|
|
4714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4199
4715
|
"nav",
|
|
4200
4716
|
{
|
|
4201
4717
|
role: "navigation",
|
|
@@ -4207,7 +4723,7 @@ function Pagination({ className, ...props }) {
|
|
|
4207
4723
|
);
|
|
4208
4724
|
}
|
|
4209
4725
|
function PaginationContent({ className, ...props }) {
|
|
4210
|
-
return /* @__PURE__ */ (0,
|
|
4726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4211
4727
|
"ul",
|
|
4212
4728
|
{
|
|
4213
4729
|
"data-slot": "pagination-content",
|
|
@@ -4217,7 +4733,7 @@ function PaginationContent({ className, ...props }) {
|
|
|
4217
4733
|
);
|
|
4218
4734
|
}
|
|
4219
4735
|
function PaginationItem({ ...props }) {
|
|
4220
|
-
return /* @__PURE__ */ (0,
|
|
4736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
4221
4737
|
}
|
|
4222
4738
|
function PaginationLink({
|
|
4223
4739
|
className,
|
|
@@ -4225,7 +4741,7 @@ function PaginationLink({
|
|
|
4225
4741
|
disabled,
|
|
4226
4742
|
...props
|
|
4227
4743
|
}) {
|
|
4228
|
-
return /* @__PURE__ */ (0,
|
|
4744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4229
4745
|
"a",
|
|
4230
4746
|
{
|
|
4231
4747
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -4248,15 +4764,15 @@ function PaginationPrevious({
|
|
|
4248
4764
|
className,
|
|
4249
4765
|
...props
|
|
4250
4766
|
}) {
|
|
4251
|
-
return /* @__PURE__ */ (0,
|
|
4767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
4252
4768
|
PaginationLink,
|
|
4253
4769
|
{
|
|
4254
4770
|
"aria-label": "Go to previous page",
|
|
4255
4771
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
4256
4772
|
...props,
|
|
4257
4773
|
children: [
|
|
4258
|
-
/* @__PURE__ */ (0,
|
|
4259
|
-
/* @__PURE__ */ (0,
|
|
4774
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react19.ChevronLeftIcon, {}),
|
|
4775
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "hidden sm:block", children: "Previous" })
|
|
4260
4776
|
]
|
|
4261
4777
|
}
|
|
4262
4778
|
);
|
|
@@ -4265,21 +4781,21 @@ function PaginationNext({
|
|
|
4265
4781
|
className,
|
|
4266
4782
|
...props
|
|
4267
4783
|
}) {
|
|
4268
|
-
return /* @__PURE__ */ (0,
|
|
4784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
4269
4785
|
PaginationLink,
|
|
4270
4786
|
{
|
|
4271
4787
|
"aria-label": "Go to next page",
|
|
4272
4788
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
4273
4789
|
...props,
|
|
4274
4790
|
children: [
|
|
4275
|
-
/* @__PURE__ */ (0,
|
|
4276
|
-
/* @__PURE__ */ (0,
|
|
4791
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "hidden sm:block", children: "Next" }),
|
|
4792
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react19.ChevronRightIcon, {})
|
|
4277
4793
|
]
|
|
4278
4794
|
}
|
|
4279
4795
|
);
|
|
4280
4796
|
}
|
|
4281
4797
|
function PaginationEllipsis({ className, ...props }) {
|
|
4282
|
-
return /* @__PURE__ */ (0,
|
|
4798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
4283
4799
|
"span",
|
|
4284
4800
|
{
|
|
4285
4801
|
"aria-hidden": true,
|
|
@@ -4287,15 +4803,15 @@ function PaginationEllipsis({ className, ...props }) {
|
|
|
4287
4803
|
className: cn("flex size-9 items-center justify-center", className),
|
|
4288
4804
|
...props,
|
|
4289
4805
|
children: [
|
|
4290
|
-
/* @__PURE__ */ (0,
|
|
4291
|
-
/* @__PURE__ */ (0,
|
|
4806
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react19.MoreHorizontalIcon, { className: "size-4" }),
|
|
4807
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
4292
4808
|
]
|
|
4293
4809
|
}
|
|
4294
4810
|
);
|
|
4295
4811
|
}
|
|
4296
4812
|
|
|
4297
4813
|
// src/components/components/Pagination/index.tsx
|
|
4298
|
-
var
|
|
4814
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4299
4815
|
function pageItems(current, count) {
|
|
4300
4816
|
if (count <= 7) {
|
|
4301
4817
|
return Array.from({ length: count }, (_, i) => i + 1);
|
|
@@ -4316,7 +4832,7 @@ function Pagination2({
|
|
|
4316
4832
|
className,
|
|
4317
4833
|
style
|
|
4318
4834
|
}) {
|
|
4319
|
-
const [innerPage, setInnerPage] = (0,
|
|
4835
|
+
const [innerPage, setInnerPage] = (0, import_react17.useState)(1);
|
|
4320
4836
|
const pageCount = Math.max(1, Math.ceil(total / Math.max(1, pageSize)));
|
|
4321
4837
|
const current = Math.min(Math.max(1, page ?? innerPage), pageCount);
|
|
4322
4838
|
const goTo = (next) => {
|
|
@@ -4329,8 +4845,8 @@ function Pagination2({
|
|
|
4329
4845
|
}
|
|
4330
4846
|
onChange?.(target);
|
|
4331
4847
|
};
|
|
4332
|
-
return /* @__PURE__ */ (0,
|
|
4333
|
-
/* @__PURE__ */ (0,
|
|
4848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Pagination, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(PaginationContent, { children: [
|
|
4849
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4334
4850
|
PaginationPrevious,
|
|
4335
4851
|
{
|
|
4336
4852
|
href: "#",
|
|
@@ -4341,7 +4857,7 @@ function Pagination2({
|
|
|
4341
4857
|
}
|
|
4342
4858
|
}
|
|
4343
4859
|
) }),
|
|
4344
|
-
pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ (0,
|
|
4860
|
+
pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4345
4861
|
PaginationLink,
|
|
4346
4862
|
{
|
|
4347
4863
|
href: "#",
|
|
@@ -4353,7 +4869,7 @@ function Pagination2({
|
|
|
4353
4869
|
children: item
|
|
4354
4870
|
}
|
|
4355
4871
|
) }, item === "ellipsis" ? `ellipsis-${index}` : item)),
|
|
4356
|
-
/* @__PURE__ */ (0,
|
|
4872
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4357
4873
|
PaginationNext,
|
|
4358
4874
|
{
|
|
4359
4875
|
href: "#",
|
|
@@ -4368,15 +4884,15 @@ function Pagination2({
|
|
|
4368
4884
|
}
|
|
4369
4885
|
|
|
4370
4886
|
// src/components/components/Popover/index.tsx
|
|
4371
|
-
var
|
|
4372
|
-
var
|
|
4887
|
+
var import_runtime14 = require("@pactor-app/runtime");
|
|
4888
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4373
4889
|
function isDslNode3(value) {
|
|
4374
4890
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
4375
4891
|
}
|
|
4376
4892
|
function Popover2({ content, children, className, style }) {
|
|
4377
|
-
const { renderChildren } = (0,
|
|
4378
|
-
return /* @__PURE__ */ (0,
|
|
4379
|
-
/* @__PURE__ */ (0,
|
|
4893
|
+
const { renderChildren } = (0, import_runtime14.useRenderer)();
|
|
4894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(Popover, { children: [
|
|
4895
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4380
4896
|
PopoverTrigger,
|
|
4381
4897
|
{
|
|
4382
4898
|
nativeButton: false,
|
|
@@ -4384,15 +4900,15 @@ function Popover2({ content, children, className, style }) {
|
|
|
4384
4900
|
children
|
|
4385
4901
|
}
|
|
4386
4902
|
),
|
|
4387
|
-
/* @__PURE__ */ (0,
|
|
4903
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PopoverContent, { className, style, children: isDslNode3(content) ? renderChildren([content]) : content })
|
|
4388
4904
|
] });
|
|
4389
4905
|
}
|
|
4390
4906
|
|
|
4391
4907
|
// src/ui/progress.tsx
|
|
4392
4908
|
var import_progress = require("@base-ui/react/progress");
|
|
4393
|
-
var
|
|
4909
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4394
4910
|
function Progress({ className, ...props }) {
|
|
4395
|
-
return /* @__PURE__ */ (0,
|
|
4911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4396
4912
|
import_progress.Progress.Root,
|
|
4397
4913
|
{
|
|
4398
4914
|
"data-slot": "progress",
|
|
@@ -4402,7 +4918,7 @@ function Progress({ className, ...props }) {
|
|
|
4402
4918
|
);
|
|
4403
4919
|
}
|
|
4404
4920
|
function ProgressTrack({ className, ...props }) {
|
|
4405
|
-
return /* @__PURE__ */ (0,
|
|
4921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4406
4922
|
import_progress.Progress.Track,
|
|
4407
4923
|
{
|
|
4408
4924
|
"data-slot": "progress-track",
|
|
@@ -4415,7 +4931,7 @@ function ProgressIndicator({
|
|
|
4415
4931
|
className,
|
|
4416
4932
|
...props
|
|
4417
4933
|
}) {
|
|
4418
|
-
return /* @__PURE__ */ (0,
|
|
4934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4419
4935
|
import_progress.Progress.Indicator,
|
|
4420
4936
|
{
|
|
4421
4937
|
"data-slot": "progress-indicator",
|
|
@@ -4429,21 +4945,21 @@ function ProgressIndicator({
|
|
|
4429
4945
|
}
|
|
4430
4946
|
|
|
4431
4947
|
// src/components/components/Progress/index.tsx
|
|
4432
|
-
var
|
|
4948
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4433
4949
|
function Progress2({ value, className, style }) {
|
|
4434
4950
|
const resolved = typeof value === "number" && Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : null;
|
|
4435
|
-
return /* @__PURE__ */ (0,
|
|
4951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Progress, { value: resolved, className, style, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ProgressTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ProgressIndicator, {}) }) });
|
|
4436
4952
|
}
|
|
4437
4953
|
|
|
4438
4954
|
// src/components/components/RadioGroup/index.tsx
|
|
4439
|
-
var
|
|
4955
|
+
var import_react18 = require("react");
|
|
4440
4956
|
|
|
4441
4957
|
// src/ui/radio-group.tsx
|
|
4442
4958
|
var import_radio = require("@base-ui/react/radio");
|
|
4443
4959
|
var import_radio_group = require("@base-ui/react/radio-group");
|
|
4444
|
-
var
|
|
4960
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
4445
4961
|
function RadioGroup({ className, ...props }) {
|
|
4446
|
-
return /* @__PURE__ */ (0,
|
|
4962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4447
4963
|
import_radio_group.RadioGroup,
|
|
4448
4964
|
{
|
|
4449
4965
|
"data-slot": "radio-group",
|
|
@@ -4453,7 +4969,7 @@ function RadioGroup({ className, ...props }) {
|
|
|
4453
4969
|
);
|
|
4454
4970
|
}
|
|
4455
4971
|
function RadioGroupItem({ className, ...props }) {
|
|
4456
|
-
return /* @__PURE__ */ (0,
|
|
4972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4457
4973
|
import_radio.Radio.Root,
|
|
4458
4974
|
{
|
|
4459
4975
|
"data-slot": "radio-group-item",
|
|
@@ -4462,12 +4978,12 @@ function RadioGroupItem({ className, ...props }) {
|
|
|
4462
4978
|
className
|
|
4463
4979
|
),
|
|
4464
4980
|
...props,
|
|
4465
|
-
children: /* @__PURE__ */ (0,
|
|
4981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4466
4982
|
import_radio.Radio.Indicator,
|
|
4467
4983
|
{
|
|
4468
4984
|
"data-slot": "radio-group-indicator",
|
|
4469
4985
|
className: "flex items-center justify-center",
|
|
4470
|
-
children: /* @__PURE__ */ (0,
|
|
4986
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "size-2 rounded-full bg-primary" })
|
|
4471
4987
|
}
|
|
4472
4988
|
)
|
|
4473
4989
|
}
|
|
@@ -4475,7 +4991,7 @@ function RadioGroupItem({ className, ...props }) {
|
|
|
4475
4991
|
}
|
|
4476
4992
|
|
|
4477
4993
|
// src/components/components/Form/form-item.tsx
|
|
4478
|
-
var
|
|
4994
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
4479
4995
|
function FieldShell({
|
|
4480
4996
|
layout,
|
|
4481
4997
|
label,
|
|
@@ -4485,14 +5001,14 @@ function FieldShell({
|
|
|
4485
5001
|
style,
|
|
4486
5002
|
children
|
|
4487
5003
|
}) {
|
|
4488
|
-
return /* @__PURE__ */ (0,
|
|
5004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
4489
5005
|
"div",
|
|
4490
5006
|
{
|
|
4491
5007
|
"data-slot": "form-item",
|
|
4492
5008
|
className: cn(formItemClass(layout), className),
|
|
4493
5009
|
style,
|
|
4494
5010
|
children: [
|
|
4495
|
-
label ? /* @__PURE__ */ (0,
|
|
5011
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
4496
5012
|
"label",
|
|
4497
5013
|
{
|
|
4498
5014
|
htmlFor,
|
|
@@ -4501,14 +5017,14 @@ function FieldShell({
|
|
|
4501
5017
|
}
|
|
4502
5018
|
) : null,
|
|
4503
5019
|
children,
|
|
4504
|
-
error ? /* @__PURE__ */ (0,
|
|
5020
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4505
5021
|
]
|
|
4506
5022
|
}
|
|
4507
5023
|
);
|
|
4508
5024
|
}
|
|
4509
5025
|
|
|
4510
5026
|
// src/components/components/RadioGroup/index.tsx
|
|
4511
|
-
var
|
|
5027
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4512
5028
|
function RadioGroup2({
|
|
4513
5029
|
name,
|
|
4514
5030
|
label,
|
|
@@ -4521,9 +5037,9 @@ function RadioGroup2({
|
|
|
4521
5037
|
style
|
|
4522
5038
|
}) {
|
|
4523
5039
|
const form = useFormContext();
|
|
4524
|
-
const controlId = (0,
|
|
5040
|
+
const controlId = (0, import_react18.useId)();
|
|
4525
5041
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
4526
|
-
(0,
|
|
5042
|
+
(0, import_react18.useEffect)(() => {
|
|
4527
5043
|
if (inForm && form && name) {
|
|
4528
5044
|
form.registerField(name, rules, value);
|
|
4529
5045
|
return () => form.unregisterField(name);
|
|
@@ -4538,7 +5054,7 @@ function RadioGroup2({
|
|
|
4538
5054
|
onChange?.(next);
|
|
4539
5055
|
};
|
|
4540
5056
|
const groupValue = current ?? "";
|
|
4541
|
-
const group = /* @__PURE__ */ (0,
|
|
5057
|
+
const group = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4542
5058
|
RadioGroup,
|
|
4543
5059
|
{
|
|
4544
5060
|
value: groupValue,
|
|
@@ -4549,8 +5065,8 @@ function RadioGroup2({
|
|
|
4549
5065
|
style: inForm ? void 0 : style,
|
|
4550
5066
|
children: options.map((option, index) => {
|
|
4551
5067
|
const optionId = `${controlId}-${index}`;
|
|
4552
|
-
return /* @__PURE__ */ (0,
|
|
4553
|
-
/* @__PURE__ */ (0,
|
|
5068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
|
|
5069
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4554
5070
|
RadioGroupItem,
|
|
4555
5071
|
{
|
|
4556
5072
|
id: optionId,
|
|
@@ -4558,13 +5074,13 @@ function RadioGroup2({
|
|
|
4558
5074
|
disabled: option.disabled
|
|
4559
5075
|
}
|
|
4560
5076
|
),
|
|
4561
|
-
/* @__PURE__ */ (0,
|
|
5077
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("label", { htmlFor: optionId, className: "text-sm leading-none font-medium", children: option.label })
|
|
4562
5078
|
] }, String(option.value));
|
|
4563
5079
|
})
|
|
4564
5080
|
}
|
|
4565
5081
|
);
|
|
4566
5082
|
if (inForm && form && name) {
|
|
4567
|
-
return /* @__PURE__ */ (0,
|
|
5083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4568
5084
|
FieldShell,
|
|
4569
5085
|
{
|
|
4570
5086
|
layout: form.layout,
|
|
@@ -4580,18 +5096,18 @@ function RadioGroup2({
|
|
|
4580
5096
|
}
|
|
4581
5097
|
|
|
4582
5098
|
// src/components/components/Resizable/index.tsx
|
|
4583
|
-
var
|
|
4584
|
-
var
|
|
5099
|
+
var import_runtime15 = require("@pactor-app/runtime");
|
|
5100
|
+
var import_react19 = require("react");
|
|
4585
5101
|
|
|
4586
5102
|
// src/ui/resizable.tsx
|
|
4587
|
-
var
|
|
5103
|
+
var import_lucide_react20 = require("lucide-react");
|
|
4588
5104
|
var import_react_resizable_panels = require("react-resizable-panels");
|
|
4589
|
-
var
|
|
5105
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
4590
5106
|
function PanelGroup({
|
|
4591
5107
|
className,
|
|
4592
5108
|
...props
|
|
4593
5109
|
}) {
|
|
4594
|
-
return /* @__PURE__ */ (0,
|
|
5110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4595
5111
|
import_react_resizable_panels.Group,
|
|
4596
5112
|
{
|
|
4597
5113
|
"data-slot": "resizable-panel-group",
|
|
@@ -4604,14 +5120,14 @@ function PanelGroup({
|
|
|
4604
5120
|
);
|
|
4605
5121
|
}
|
|
4606
5122
|
function Panel({ ...props }) {
|
|
4607
|
-
return /* @__PURE__ */ (0,
|
|
5123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_resizable_panels.Panel, { "data-slot": "resizable-panel", ...props });
|
|
4608
5124
|
}
|
|
4609
5125
|
function ResizableHandle({
|
|
4610
5126
|
withHandle,
|
|
4611
5127
|
className,
|
|
4612
5128
|
...props
|
|
4613
5129
|
}) {
|
|
4614
|
-
return /* @__PURE__ */ (0,
|
|
5130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4615
5131
|
import_react_resizable_panels.Separator,
|
|
4616
5132
|
{
|
|
4617
5133
|
"data-slot": "resizable-handle",
|
|
@@ -4620,23 +5136,23 @@ function ResizableHandle({
|
|
|
4620
5136
|
className
|
|
4621
5137
|
),
|
|
4622
5138
|
...props,
|
|
4623
|
-
children: withHandle ? /* @__PURE__ */ (0,
|
|
5139
|
+
children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border border-border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react20.GripVerticalIcon, { className: "size-2.5" }) }) : null
|
|
4624
5140
|
}
|
|
4625
5141
|
);
|
|
4626
5142
|
}
|
|
4627
5143
|
|
|
4628
5144
|
// src/components/components/Resizable/index.tsx
|
|
4629
|
-
var
|
|
5145
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
4630
5146
|
function Resizable({
|
|
4631
5147
|
panels = [],
|
|
4632
5148
|
direction = "horizontal",
|
|
4633
5149
|
className,
|
|
4634
5150
|
style
|
|
4635
5151
|
}) {
|
|
4636
|
-
const { renderChildren } = (0,
|
|
4637
|
-
return /* @__PURE__ */ (0,
|
|
4638
|
-
index > 0 ? /* @__PURE__ */ (0,
|
|
4639
|
-
/* @__PURE__ */ (0,
|
|
5152
|
+
const { renderChildren } = (0, import_runtime15.useRenderer)();
|
|
5153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_react19.Fragment, { children: [
|
|
5154
|
+
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ResizableHandle, { withHandle: true }) : null,
|
|
5155
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
4640
5156
|
Panel,
|
|
4641
5157
|
{
|
|
4642
5158
|
defaultSize: typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
|
|
@@ -4648,20 +5164,20 @@ function Resizable({
|
|
|
4648
5164
|
|
|
4649
5165
|
// src/ui/scroll-area.tsx
|
|
4650
5166
|
var import_scroll_area = require("@base-ui/react/scroll-area");
|
|
4651
|
-
var
|
|
5167
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
4652
5168
|
function ScrollArea({
|
|
4653
5169
|
className,
|
|
4654
5170
|
children,
|
|
4655
5171
|
...props
|
|
4656
5172
|
}) {
|
|
4657
|
-
return /* @__PURE__ */ (0,
|
|
5173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
4658
5174
|
import_scroll_area.ScrollArea.Root,
|
|
4659
5175
|
{
|
|
4660
5176
|
"data-slot": "scroll-area",
|
|
4661
5177
|
className: cn("relative overflow-hidden", className),
|
|
4662
5178
|
...props,
|
|
4663
5179
|
children: [
|
|
4664
|
-
/* @__PURE__ */ (0,
|
|
5180
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4665
5181
|
import_scroll_area.ScrollArea.Viewport,
|
|
4666
5182
|
{
|
|
4667
5183
|
"data-slot": "scroll-area-viewport",
|
|
@@ -4669,8 +5185,8 @@ function ScrollArea({
|
|
|
4669
5185
|
children
|
|
4670
5186
|
}
|
|
4671
5187
|
),
|
|
4672
|
-
/* @__PURE__ */ (0,
|
|
4673
|
-
/* @__PURE__ */ (0,
|
|
5188
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ScrollBar, {}),
|
|
5189
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_scroll_area.ScrollArea.Corner, {})
|
|
4674
5190
|
]
|
|
4675
5191
|
}
|
|
4676
5192
|
);
|
|
@@ -4680,7 +5196,7 @@ function ScrollBar({
|
|
|
4680
5196
|
orientation = "vertical",
|
|
4681
5197
|
...props
|
|
4682
5198
|
}) {
|
|
4683
|
-
return /* @__PURE__ */ (0,
|
|
5199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4684
5200
|
import_scroll_area.ScrollArea.Scrollbar,
|
|
4685
5201
|
{
|
|
4686
5202
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -4692,7 +5208,7 @@ function ScrollBar({
|
|
|
4692
5208
|
className
|
|
4693
5209
|
),
|
|
4694
5210
|
...props,
|
|
4695
|
-
children: /* @__PURE__ */ (0,
|
|
5211
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4696
5212
|
import_scroll_area.ScrollArea.Thumb,
|
|
4697
5213
|
{
|
|
4698
5214
|
"data-slot": "scroll-area-thumb",
|
|
@@ -4704,7 +5220,7 @@ function ScrollBar({
|
|
|
4704
5220
|
}
|
|
4705
5221
|
|
|
4706
5222
|
// src/components/components/ScrollArea/index.tsx
|
|
4707
|
-
var
|
|
5223
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
4708
5224
|
function ScrollArea2({
|
|
4709
5225
|
maxHeight,
|
|
4710
5226
|
maxWidth,
|
|
@@ -4712,7 +5228,7 @@ function ScrollArea2({
|
|
|
4712
5228
|
style,
|
|
4713
5229
|
children
|
|
4714
5230
|
}) {
|
|
4715
|
-
return /* @__PURE__ */ (0,
|
|
5231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
4716
5232
|
ScrollArea,
|
|
4717
5233
|
{
|
|
4718
5234
|
className,
|
|
@@ -4723,18 +5239,18 @@ function ScrollArea2({
|
|
|
4723
5239
|
}
|
|
4724
5240
|
|
|
4725
5241
|
// src/components/components/Select/index.tsx
|
|
4726
|
-
var
|
|
4727
|
-
var
|
|
5242
|
+
var import_runtime16 = require("@pactor-app/runtime");
|
|
5243
|
+
var import_react20 = require("react");
|
|
4728
5244
|
|
|
4729
5245
|
// src/ui/select.tsx
|
|
4730
5246
|
var import_select = require("@base-ui/react/select");
|
|
4731
|
-
var
|
|
4732
|
-
var
|
|
5247
|
+
var import_lucide_react21 = require("lucide-react");
|
|
5248
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
4733
5249
|
var Select = import_select.Select.Root;
|
|
4734
5250
|
function SelectValue({
|
|
4735
5251
|
...props
|
|
4736
5252
|
}) {
|
|
4737
|
-
return /* @__PURE__ */ (0,
|
|
5253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.Value, { "data-slot": "select-value", ...props });
|
|
4738
5254
|
}
|
|
4739
5255
|
function SelectTrigger({
|
|
4740
5256
|
className,
|
|
@@ -4742,7 +5258,7 @@ function SelectTrigger({
|
|
|
4742
5258
|
children,
|
|
4743
5259
|
...props
|
|
4744
5260
|
}) {
|
|
4745
|
-
return /* @__PURE__ */ (0,
|
|
5261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
4746
5262
|
import_select.Select.Trigger,
|
|
4747
5263
|
{
|
|
4748
5264
|
"data-slot": "select-trigger",
|
|
@@ -4754,10 +5270,10 @@ function SelectTrigger({
|
|
|
4754
5270
|
...props,
|
|
4755
5271
|
children: [
|
|
4756
5272
|
children,
|
|
4757
|
-
/* @__PURE__ */ (0,
|
|
5273
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
4758
5274
|
import_select.Select.Icon,
|
|
4759
5275
|
{
|
|
4760
|
-
render: /* @__PURE__ */ (0,
|
|
5276
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
4761
5277
|
}
|
|
4762
5278
|
)
|
|
4763
5279
|
]
|
|
@@ -4773,7 +5289,7 @@ function SelectContent({
|
|
|
4773
5289
|
alignItemWithTrigger = false,
|
|
4774
5290
|
...props
|
|
4775
5291
|
}) {
|
|
4776
|
-
return /* @__PURE__ */ (0,
|
|
5292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
4777
5293
|
import_select.Select.Positioner,
|
|
4778
5294
|
{
|
|
4779
5295
|
side,
|
|
@@ -4781,7 +5297,7 @@ function SelectContent({
|
|
|
4781
5297
|
align,
|
|
4782
5298
|
alignItemWithTrigger,
|
|
4783
5299
|
className: "isolate z-50",
|
|
4784
|
-
children: /* @__PURE__ */ (0,
|
|
5300
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
4785
5301
|
import_select.Select.Popup,
|
|
4786
5302
|
{
|
|
4787
5303
|
"data-slot": "select-content",
|
|
@@ -4791,9 +5307,9 @@ function SelectContent({
|
|
|
4791
5307
|
),
|
|
4792
5308
|
...props,
|
|
4793
5309
|
children: [
|
|
4794
|
-
/* @__PURE__ */ (0,
|
|
4795
|
-
/* @__PURE__ */ (0,
|
|
4796
|
-
/* @__PURE__ */ (0,
|
|
5310
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollUpButton, {}),
|
|
5311
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.List, { className: "p-1", children }),
|
|
5312
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollDownButton, {})
|
|
4797
5313
|
]
|
|
4798
5314
|
}
|
|
4799
5315
|
)
|
|
@@ -4805,7 +5321,7 @@ function SelectItem({
|
|
|
4805
5321
|
children,
|
|
4806
5322
|
...props
|
|
4807
5323
|
}) {
|
|
4808
|
-
return /* @__PURE__ */ (0,
|
|
5324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
4809
5325
|
import_select.Select.Item,
|
|
4810
5326
|
{
|
|
4811
5327
|
"data-slot": "select-item",
|
|
@@ -4815,8 +5331,8 @@ function SelectItem({
|
|
|
4815
5331
|
),
|
|
4816
5332
|
...props,
|
|
4817
5333
|
children: [
|
|
4818
|
-
/* @__PURE__ */ (0,
|
|
4819
|
-
/* @__PURE__ */ (0,
|
|
5334
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.CheckIcon, { className: "size-4" }) }) }),
|
|
5335
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.ItemText, { children })
|
|
4820
5336
|
]
|
|
4821
5337
|
}
|
|
4822
5338
|
);
|
|
@@ -4825,7 +5341,7 @@ function SelectScrollUpButton({
|
|
|
4825
5341
|
className,
|
|
4826
5342
|
...props
|
|
4827
5343
|
}) {
|
|
4828
|
-
return /* @__PURE__ */ (0,
|
|
5344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
4829
5345
|
import_select.Select.ScrollUpArrow,
|
|
4830
5346
|
{
|
|
4831
5347
|
"data-slot": "select-scroll-up-button",
|
|
@@ -4834,7 +5350,7 @@ function SelectScrollUpButton({
|
|
|
4834
5350
|
className
|
|
4835
5351
|
),
|
|
4836
5352
|
...props,
|
|
4837
|
-
children: /* @__PURE__ */ (0,
|
|
5353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronUpIcon, { className: "size-4" })
|
|
4838
5354
|
}
|
|
4839
5355
|
);
|
|
4840
5356
|
}
|
|
@@ -4842,7 +5358,7 @@ function SelectScrollDownButton({
|
|
|
4842
5358
|
className,
|
|
4843
5359
|
...props
|
|
4844
5360
|
}) {
|
|
4845
|
-
return /* @__PURE__ */ (0,
|
|
5361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
4846
5362
|
import_select.Select.ScrollDownArrow,
|
|
4847
5363
|
{
|
|
4848
5364
|
"data-slot": "select-scroll-down-button",
|
|
@@ -4851,13 +5367,13 @@ function SelectScrollDownButton({
|
|
|
4851
5367
|
className
|
|
4852
5368
|
),
|
|
4853
5369
|
...props,
|
|
4854
|
-
children: /* @__PURE__ */ (0,
|
|
5370
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4" })
|
|
4855
5371
|
}
|
|
4856
5372
|
);
|
|
4857
5373
|
}
|
|
4858
5374
|
|
|
4859
5375
|
// src/components/components/Select/index.tsx
|
|
4860
|
-
var
|
|
5376
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
4861
5377
|
function Select2({
|
|
4862
5378
|
name,
|
|
4863
5379
|
label,
|
|
@@ -4872,10 +5388,10 @@ function Select2({
|
|
|
4872
5388
|
style
|
|
4873
5389
|
}) {
|
|
4874
5390
|
const form = useFormContext();
|
|
4875
|
-
const { t } = (0,
|
|
4876
|
-
const controlId = (0,
|
|
5391
|
+
const { t } = (0, import_runtime16.useI18n)();
|
|
5392
|
+
const controlId = (0, import_react20.useId)();
|
|
4877
5393
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
4878
|
-
(0,
|
|
5394
|
+
(0, import_react20.useEffect)(() => {
|
|
4879
5395
|
if (inForm && form && name) {
|
|
4880
5396
|
form.registerField(name, rules, value);
|
|
4881
5397
|
return () => form.unregisterField(name);
|
|
@@ -4891,13 +5407,13 @@ function Select2({
|
|
|
4891
5407
|
onChange?.(next ?? void 0);
|
|
4892
5408
|
};
|
|
4893
5409
|
const inFormRoot = inForm === true;
|
|
4894
|
-
const select = /* @__PURE__ */ (0,
|
|
5410
|
+
const select = /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
4895
5411
|
"span",
|
|
4896
5412
|
{
|
|
4897
5413
|
className: cn("inline-flex items-center gap-1", !inFormRoot && className),
|
|
4898
5414
|
style: inFormRoot ? void 0 : style,
|
|
4899
5415
|
children: [
|
|
4900
|
-
/* @__PURE__ */ (0,
|
|
5416
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
4901
5417
|
Select,
|
|
4902
5418
|
{
|
|
4903
5419
|
items: options,
|
|
@@ -4906,8 +5422,8 @@ function Select2({
|
|
|
4906
5422
|
disabled,
|
|
4907
5423
|
name: inForm ? name : void 0,
|
|
4908
5424
|
children: [
|
|
4909
|
-
/* @__PURE__ */ (0,
|
|
4910
|
-
/* @__PURE__ */ (0,
|
|
5425
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectTrigger, { id: controlId, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectValue, { placeholder }) }),
|
|
5426
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
4911
5427
|
SelectItem,
|
|
4912
5428
|
{
|
|
4913
5429
|
value: option.value,
|
|
@@ -4919,7 +5435,7 @@ function Select2({
|
|
|
4919
5435
|
]
|
|
4920
5436
|
}
|
|
4921
5437
|
),
|
|
4922
|
-
allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ (0,
|
|
5438
|
+
allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
4923
5439
|
"button",
|
|
4924
5440
|
{
|
|
4925
5441
|
type: "button",
|
|
@@ -4939,14 +5455,14 @@ function Select2({
|
|
|
4939
5455
|
);
|
|
4940
5456
|
if (inForm && form && name) {
|
|
4941
5457
|
const error = form.errors[name];
|
|
4942
|
-
return /* @__PURE__ */ (0,
|
|
5458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
4943
5459
|
"div",
|
|
4944
5460
|
{
|
|
4945
5461
|
"data-slot": "form-item",
|
|
4946
5462
|
className: cn(formItemClass(form.layout), className),
|
|
4947
5463
|
style,
|
|
4948
5464
|
children: [
|
|
4949
|
-
label ? /* @__PURE__ */ (0,
|
|
5465
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
4950
5466
|
"label",
|
|
4951
5467
|
{
|
|
4952
5468
|
htmlFor: controlId,
|
|
@@ -4955,7 +5471,7 @@ function Select2({
|
|
|
4955
5471
|
}
|
|
4956
5472
|
) : null,
|
|
4957
5473
|
select,
|
|
4958
|
-
error ? /* @__PURE__ */ (0,
|
|
5474
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4959
5475
|
]
|
|
4960
5476
|
}
|
|
4961
5477
|
);
|
|
@@ -4965,14 +5481,14 @@ function Select2({
|
|
|
4965
5481
|
|
|
4966
5482
|
// src/ui/separator.tsx
|
|
4967
5483
|
var import_separator = require("@base-ui/react/separator");
|
|
4968
|
-
var
|
|
5484
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
4969
5485
|
function Separator({
|
|
4970
5486
|
className,
|
|
4971
5487
|
orientation = "horizontal",
|
|
4972
5488
|
decorative: _decorative,
|
|
4973
5489
|
...props
|
|
4974
5490
|
}) {
|
|
4975
|
-
return /* @__PURE__ */ (0,
|
|
5491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
4976
5492
|
import_separator.Separator,
|
|
4977
5493
|
{
|
|
4978
5494
|
"data-slot": "separator",
|
|
@@ -4987,31 +5503,31 @@ function Separator({
|
|
|
4987
5503
|
}
|
|
4988
5504
|
|
|
4989
5505
|
// src/components/components/Separator/index.tsx
|
|
4990
|
-
var
|
|
5506
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
4991
5507
|
function Separator2({ orientation = "horizontal", className, style }) {
|
|
4992
|
-
return /* @__PURE__ */ (0,
|
|
5508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Separator, { orientation, className, style });
|
|
4993
5509
|
}
|
|
4994
5510
|
|
|
4995
5511
|
// src/ui/sheet.tsx
|
|
4996
5512
|
var import_dialog3 = require("@base-ui/react/dialog");
|
|
4997
|
-
var
|
|
5513
|
+
var import_lucide_react22 = require("lucide-react");
|
|
4998
5514
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
4999
|
-
var
|
|
5515
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
5000
5516
|
function Sheet({
|
|
5001
5517
|
...props
|
|
5002
5518
|
}) {
|
|
5003
|
-
return /* @__PURE__ */ (0,
|
|
5519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_dialog3.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
5004
5520
|
}
|
|
5005
5521
|
function SheetPortal({
|
|
5006
5522
|
...props
|
|
5007
5523
|
}) {
|
|
5008
|
-
return /* @__PURE__ */ (0,
|
|
5524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_dialog3.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
5009
5525
|
}
|
|
5010
5526
|
function SheetOverlay({
|
|
5011
5527
|
className,
|
|
5012
5528
|
...props
|
|
5013
5529
|
}) {
|
|
5014
|
-
return /* @__PURE__ */ (0,
|
|
5530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5015
5531
|
import_dialog3.Dialog.Backdrop,
|
|
5016
5532
|
{
|
|
5017
5533
|
"data-slot": "sheet-overlay",
|
|
@@ -5045,9 +5561,9 @@ function SheetContent({
|
|
|
5045
5561
|
side = "right",
|
|
5046
5562
|
...props
|
|
5047
5563
|
}) {
|
|
5048
|
-
return /* @__PURE__ */ (0,
|
|
5049
|
-
/* @__PURE__ */ (0,
|
|
5050
|
-
/* @__PURE__ */ (0,
|
|
5564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(SheetPortal, { "data-slot": "sheet-portal", children: [
|
|
5565
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(SheetOverlay, {}),
|
|
5566
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
5051
5567
|
import_dialog3.Dialog.Popup,
|
|
5052
5568
|
{
|
|
5053
5569
|
"data-slot": "sheet-content",
|
|
@@ -5055,11 +5571,11 @@ function SheetContent({
|
|
|
5055
5571
|
...props,
|
|
5056
5572
|
children: [
|
|
5057
5573
|
children,
|
|
5058
|
-
/* @__PURE__ */ (0,
|
|
5574
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
5059
5575
|
import_dialog3.Dialog.Close,
|
|
5060
5576
|
{
|
|
5061
5577
|
"data-slot": "sheet-close",
|
|
5062
|
-
render: /* @__PURE__ */ (0,
|
|
5578
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5063
5579
|
"button",
|
|
5064
5580
|
{
|
|
5065
5581
|
type: "button",
|
|
@@ -5067,8 +5583,8 @@ function SheetContent({
|
|
|
5067
5583
|
}
|
|
5068
5584
|
),
|
|
5069
5585
|
children: [
|
|
5070
|
-
/* @__PURE__ */ (0,
|
|
5071
|
-
/* @__PURE__ */ (0,
|
|
5586
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react22.XIcon, {}),
|
|
5587
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "sr-only", children: "Close" })
|
|
5072
5588
|
]
|
|
5073
5589
|
}
|
|
5074
5590
|
)
|
|
@@ -5078,7 +5594,7 @@ function SheetContent({
|
|
|
5078
5594
|
] });
|
|
5079
5595
|
}
|
|
5080
5596
|
function SheetHeader({ className, ...props }) {
|
|
5081
|
-
return /* @__PURE__ */ (0,
|
|
5597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5082
5598
|
"div",
|
|
5083
5599
|
{
|
|
5084
5600
|
"data-slot": "sheet-header",
|
|
@@ -5091,7 +5607,7 @@ function SheetTitle({
|
|
|
5091
5607
|
className,
|
|
5092
5608
|
...props
|
|
5093
5609
|
}) {
|
|
5094
|
-
return /* @__PURE__ */ (0,
|
|
5610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5095
5611
|
import_dialog3.Dialog.Title,
|
|
5096
5612
|
{
|
|
5097
5613
|
"data-slot": "sheet-title",
|
|
@@ -5102,7 +5618,7 @@ function SheetTitle({
|
|
|
5102
5618
|
}
|
|
5103
5619
|
|
|
5104
5620
|
// src/components/components/Sheet/index.tsx
|
|
5105
|
-
var
|
|
5621
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
5106
5622
|
function Sheet2({
|
|
5107
5623
|
title,
|
|
5108
5624
|
open,
|
|
@@ -5112,7 +5628,7 @@ function Sheet2({
|
|
|
5112
5628
|
className,
|
|
5113
5629
|
style
|
|
5114
5630
|
}) {
|
|
5115
|
-
return /* @__PURE__ */ (0,
|
|
5631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
5116
5632
|
Sheet,
|
|
5117
5633
|
{
|
|
5118
5634
|
open: open ?? false,
|
|
@@ -5121,128 +5637,17 @@ function Sheet2({
|
|
|
5121
5637
|
onClose?.();
|
|
5122
5638
|
}
|
|
5123
5639
|
},
|
|
5124
|
-
children: /* @__PURE__ */ (0,
|
|
5125
|
-
title ? /* @__PURE__ */ (0,
|
|
5126
|
-
/* @__PURE__ */ (0,
|
|
5640
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(SheetContent, { side, className, style, children: [
|
|
5641
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SheetTitle, { children: title }) }) : null,
|
|
5642
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex-1 overflow-auto px-4", children })
|
|
5127
5643
|
] })
|
|
5128
5644
|
}
|
|
5129
5645
|
);
|
|
5130
5646
|
}
|
|
5131
5647
|
|
|
5132
|
-
// src/components/components/Sidebar/index.tsx
|
|
5133
|
-
var import_runtime15 = require("@pactor-app/runtime");
|
|
5134
|
-
var import_lucide_react21 = require("lucide-react");
|
|
5135
|
-
var import_react19 = require("react");
|
|
5136
|
-
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
5137
|
-
function Sidebar({
|
|
5138
|
-
brand,
|
|
5139
|
-
items = [],
|
|
5140
|
-
collapsible,
|
|
5141
|
-
onCollapse,
|
|
5142
|
-
className,
|
|
5143
|
-
style,
|
|
5144
|
-
children
|
|
5145
|
-
}) {
|
|
5146
|
-
const { t } = (0, import_runtime15.useI18n)();
|
|
5147
|
-
const [collapsed, setCollapsed] = (0, import_react19.useState)(false);
|
|
5148
|
-
const toggleCollapsed = () => {
|
|
5149
|
-
const next = !collapsed;
|
|
5150
|
-
setCollapsed(next);
|
|
5151
|
-
onCollapse?.(next);
|
|
5152
|
-
};
|
|
5153
|
-
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
5154
|
-
"div",
|
|
5155
|
-
{
|
|
5156
|
-
"data-slot": "sidebar-layout",
|
|
5157
|
-
className: cn("flex min-h-screen w-full", className),
|
|
5158
|
-
style,
|
|
5159
|
-
children: [
|
|
5160
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
5161
|
-
"aside",
|
|
5162
|
-
{
|
|
5163
|
-
"data-slot": "sidebar",
|
|
5164
|
-
"data-collapsed": collapsed || void 0,
|
|
5165
|
-
className: cn(
|
|
5166
|
-
"flex shrink-0 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width]",
|
|
5167
|
-
collapsed ? "w-14" : "w-60"
|
|
5168
|
-
),
|
|
5169
|
-
children: [
|
|
5170
|
-
brand ? /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
5171
|
-
"div",
|
|
5172
|
-
{
|
|
5173
|
-
"data-slot": "sidebar-brand",
|
|
5174
|
-
className: "flex h-14 shrink-0 items-center gap-2 border-b border-sidebar-border px-4",
|
|
5175
|
-
children: [
|
|
5176
|
-
brand.logo ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5177
|
-
"img",
|
|
5178
|
-
{
|
|
5179
|
-
"data-slot": "sidebar-brand-logo",
|
|
5180
|
-
src: brand.logo,
|
|
5181
|
-
alt: brand.title,
|
|
5182
|
-
className: "size-6 shrink-0"
|
|
5183
|
-
}
|
|
5184
|
-
) : null,
|
|
5185
|
-
collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "truncate text-sm font-semibold", children: brand.title })
|
|
5186
|
-
]
|
|
5187
|
-
}
|
|
5188
|
-
) : null,
|
|
5189
|
-
collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("nav", { "data-slot": "sidebar-nav", className: "min-h-0 flex-1 overflow-auto p-2", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SidebarEntry, { item, depth: 0 }, item.href ?? item.label ?? index)) }),
|
|
5190
|
-
collapsible ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5191
|
-
"button",
|
|
5192
|
-
{
|
|
5193
|
-
type: "button",
|
|
5194
|
-
"data-slot": "sidebar-collapse-trigger",
|
|
5195
|
-
"aria-label": collapsed ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
|
|
5196
|
-
className: "flex h-10 shrink-0 items-center justify-center border-t border-sidebar-border text-sidebar-foreground/60 hover:text-sidebar-foreground",
|
|
5197
|
-
onClick: toggleCollapsed,
|
|
5198
|
-
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react21.ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react21.ChevronLeft, { "aria-hidden": true, className: "size-4" })
|
|
5199
|
-
}
|
|
5200
|
-
) : null
|
|
5201
|
-
]
|
|
5202
|
-
}
|
|
5203
|
-
),
|
|
5204
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("main", { "data-slot": "sidebar-content", className: "min-w-0 flex-1", children })
|
|
5205
|
-
]
|
|
5206
|
-
}
|
|
5207
|
-
);
|
|
5208
|
-
}
|
|
5209
|
-
function SidebarEntry({ item, depth }) {
|
|
5210
|
-
const entryClass = cn(
|
|
5211
|
-
"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors",
|
|
5212
|
-
"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
|
|
5213
|
-
);
|
|
5214
|
-
const indentStyle = depth > 0 ? { paddingLeft: 12 + depth * 16 } : void 0;
|
|
5215
|
-
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { "data-slot": "sidebar-entry", children: [
|
|
5216
|
-
item.href ? /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
5217
|
-
"a",
|
|
5218
|
-
{
|
|
5219
|
-
"data-slot": "sidebar-item",
|
|
5220
|
-
href: item.href,
|
|
5221
|
-
className: entryClass,
|
|
5222
|
-
style: indentStyle,
|
|
5223
|
-
children: [
|
|
5224
|
-
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
5225
|
-
item.label
|
|
5226
|
-
]
|
|
5227
|
-
}
|
|
5228
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { "data-slot": "sidebar-item", className: entryClass, style: indentStyle, children: [
|
|
5229
|
-
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
5230
|
-
item.label
|
|
5231
|
-
] }),
|
|
5232
|
-
item.children?.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5233
|
-
SidebarEntry,
|
|
5234
|
-
{
|
|
5235
|
-
item: child,
|
|
5236
|
-
depth: depth + 1
|
|
5237
|
-
},
|
|
5238
|
-
child.href ?? child.label ?? index
|
|
5239
|
-
))
|
|
5240
|
-
] });
|
|
5241
|
-
}
|
|
5242
|
-
|
|
5243
5648
|
// src/components/components/Sider/index.tsx
|
|
5244
|
-
var
|
|
5245
|
-
var
|
|
5649
|
+
var import_lucide_react23 = require("lucide-react");
|
|
5650
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
5246
5651
|
function Sider({
|
|
5247
5652
|
width = 200,
|
|
5248
5653
|
collapsible,
|
|
@@ -5254,7 +5659,7 @@ function Sider({
|
|
|
5254
5659
|
children
|
|
5255
5660
|
}) {
|
|
5256
5661
|
const current = collapsed ? collapsedWidth : width;
|
|
5257
|
-
return /* @__PURE__ */ (0,
|
|
5662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
5258
5663
|
"aside",
|
|
5259
5664
|
{
|
|
5260
5665
|
"data-slot": "layout-sider",
|
|
@@ -5265,15 +5670,15 @@ function Sider({
|
|
|
5265
5670
|
),
|
|
5266
5671
|
style: { width: current, ...style },
|
|
5267
5672
|
children: [
|
|
5268
|
-
/* @__PURE__ */ (0,
|
|
5269
|
-
collapsible ? /* @__PURE__ */ (0,
|
|
5673
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "min-h-0 flex-1 overflow-auto", children }),
|
|
5674
|
+
collapsible ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5270
5675
|
"button",
|
|
5271
5676
|
{
|
|
5272
5677
|
type: "button",
|
|
5273
5678
|
"aria-label": collapsed ? "expand sider" : "collapse sider",
|
|
5274
5679
|
className: "flex h-10 shrink-0 items-center justify-center border-t text-muted-foreground hover:text-foreground",
|
|
5275
5680
|
onClick: () => onCollapse?.(!collapsed),
|
|
5276
|
-
children: collapsed ? /* @__PURE__ */ (0,
|
|
5681
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react23.ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react23.ChevronLeft, { "aria-hidden": true, className: "size-4" })
|
|
5277
5682
|
}
|
|
5278
5683
|
) : null
|
|
5279
5684
|
]
|
|
@@ -5282,9 +5687,9 @@ function Sider({
|
|
|
5282
5687
|
}
|
|
5283
5688
|
|
|
5284
5689
|
// src/ui/skeleton.tsx
|
|
5285
|
-
var
|
|
5690
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
5286
5691
|
function Skeleton({ className, ...props }) {
|
|
5287
|
-
return /* @__PURE__ */ (0,
|
|
5692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5288
5693
|
"div",
|
|
5289
5694
|
{
|
|
5290
5695
|
"data-slot": "skeleton",
|
|
@@ -5295,7 +5700,7 @@ function Skeleton({ className, ...props }) {
|
|
|
5295
5700
|
}
|
|
5296
5701
|
|
|
5297
5702
|
// src/components/components/Skeleton/index.tsx
|
|
5298
|
-
var
|
|
5703
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
5299
5704
|
var shapeDefaults = {
|
|
5300
5705
|
line: { className: "h-4 w-full", style: {} },
|
|
5301
5706
|
circle: { className: "rounded-full", style: { width: 40, height: 40 } },
|
|
@@ -5306,7 +5711,7 @@ function toSize(value) {
|
|
|
5306
5711
|
}
|
|
5307
5712
|
function Skeleton2({ shape = "line", width, height, className, style }) {
|
|
5308
5713
|
const defaults = shapeDefaults[shape];
|
|
5309
|
-
return /* @__PURE__ */ (0,
|
|
5714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
5310
5715
|
Skeleton,
|
|
5311
5716
|
{
|
|
5312
5717
|
className: cn(defaults.className, className),
|
|
@@ -5321,13 +5726,13 @@ function Skeleton2({ shape = "line", width, height, className, style }) {
|
|
|
5321
5726
|
}
|
|
5322
5727
|
|
|
5323
5728
|
// src/components/components/Slider/index.tsx
|
|
5324
|
-
var
|
|
5729
|
+
var import_react21 = require("react");
|
|
5325
5730
|
|
|
5326
5731
|
// src/ui/slider.tsx
|
|
5327
5732
|
var import_slider = require("@base-ui/react/slider");
|
|
5328
|
-
var
|
|
5733
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
5329
5734
|
function Slider({ className, ...props }) {
|
|
5330
|
-
return /* @__PURE__ */ (0,
|
|
5735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5331
5736
|
import_slider.Slider.Root,
|
|
5332
5737
|
{
|
|
5333
5738
|
"data-slot": "slider",
|
|
@@ -5340,7 +5745,7 @@ function Slider({ className, ...props }) {
|
|
|
5340
5745
|
);
|
|
5341
5746
|
}
|
|
5342
5747
|
function SliderControl({ className, ...props }) {
|
|
5343
|
-
return /* @__PURE__ */ (0,
|
|
5748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5344
5749
|
import_slider.Slider.Control,
|
|
5345
5750
|
{
|
|
5346
5751
|
"data-slot": "slider-control",
|
|
@@ -5350,7 +5755,7 @@ function SliderControl({ className, ...props }) {
|
|
|
5350
5755
|
);
|
|
5351
5756
|
}
|
|
5352
5757
|
function SliderTrack({ className, ...props }) {
|
|
5353
|
-
return /* @__PURE__ */ (0,
|
|
5758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5354
5759
|
import_slider.Slider.Track,
|
|
5355
5760
|
{
|
|
5356
5761
|
"data-slot": "slider-track",
|
|
@@ -5363,7 +5768,7 @@ function SliderTrack({ className, ...props }) {
|
|
|
5363
5768
|
);
|
|
5364
5769
|
}
|
|
5365
5770
|
function SliderIndicator({ className, ...props }) {
|
|
5366
|
-
return /* @__PURE__ */ (0,
|
|
5771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5367
5772
|
import_slider.Slider.Indicator,
|
|
5368
5773
|
{
|
|
5369
5774
|
"data-slot": "slider-indicator",
|
|
@@ -5373,7 +5778,7 @@ function SliderIndicator({ className, ...props }) {
|
|
|
5373
5778
|
);
|
|
5374
5779
|
}
|
|
5375
5780
|
function SliderThumb({ className, ...props }) {
|
|
5376
|
-
return /* @__PURE__ */ (0,
|
|
5781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5377
5782
|
import_slider.Slider.Thumb,
|
|
5378
5783
|
{
|
|
5379
5784
|
"data-slot": "slider-thumb",
|
|
@@ -5387,7 +5792,7 @@ function SliderThumb({ className, ...props }) {
|
|
|
5387
5792
|
}
|
|
5388
5793
|
|
|
5389
5794
|
// src/components/components/Slider/index.tsx
|
|
5390
|
-
var
|
|
5795
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
5391
5796
|
function Slider2({
|
|
5392
5797
|
name,
|
|
5393
5798
|
label,
|
|
@@ -5403,7 +5808,7 @@ function Slider2({
|
|
|
5403
5808
|
}) {
|
|
5404
5809
|
const form = useFormContext();
|
|
5405
5810
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
5406
|
-
(0,
|
|
5811
|
+
(0, import_react21.useEffect)(() => {
|
|
5407
5812
|
if (inForm && form && name) {
|
|
5408
5813
|
form.registerField(name, rules, value);
|
|
5409
5814
|
return () => form.unregisterField(name);
|
|
@@ -5418,7 +5823,7 @@ function Slider2({
|
|
|
5418
5823
|
}
|
|
5419
5824
|
onChange?.(next);
|
|
5420
5825
|
};
|
|
5421
|
-
const slider = /* @__PURE__ */ (0,
|
|
5826
|
+
const slider = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
5422
5827
|
Slider,
|
|
5423
5828
|
{
|
|
5424
5829
|
value: numberValue,
|
|
@@ -5430,14 +5835,14 @@ function Slider2({
|
|
|
5430
5835
|
onValueChange: handleChange,
|
|
5431
5836
|
className: inForm ? void 0 : className,
|
|
5432
5837
|
style: inForm ? void 0 : style,
|
|
5433
|
-
children: /* @__PURE__ */ (0,
|
|
5434
|
-
/* @__PURE__ */ (0,
|
|
5435
|
-
/* @__PURE__ */ (0,
|
|
5838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SliderControl, { children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(SliderTrack, { children: [
|
|
5839
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SliderIndicator, {}),
|
|
5840
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SliderThumb, {})
|
|
5436
5841
|
] }) })
|
|
5437
5842
|
}
|
|
5438
5843
|
);
|
|
5439
5844
|
if (inForm && form && name) {
|
|
5440
|
-
return /* @__PURE__ */ (0,
|
|
5845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
5441
5846
|
FieldShell,
|
|
5442
5847
|
{
|
|
5443
5848
|
layout: form.layout,
|
|
@@ -5453,13 +5858,13 @@ function Slider2({
|
|
|
5453
5858
|
}
|
|
5454
5859
|
|
|
5455
5860
|
// src/components/components/Sonner/index.tsx
|
|
5456
|
-
var
|
|
5457
|
-
var
|
|
5861
|
+
var import_runtime17 = require("@pactor-app/runtime");
|
|
5862
|
+
var import_react22 = require("react");
|
|
5458
5863
|
|
|
5459
5864
|
// src/ui/toast.tsx
|
|
5460
5865
|
var import_toast = require("@base-ui/react/toast");
|
|
5461
|
-
var
|
|
5462
|
-
var
|
|
5866
|
+
var import_lucide_react24 = require("lucide-react");
|
|
5867
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
5463
5868
|
var toastManager = import_toast.Toast.createToastManager();
|
|
5464
5869
|
function toast(message, options = {}) {
|
|
5465
5870
|
return toastManager.add({
|
|
@@ -5475,7 +5880,7 @@ var toastVariantClass = {
|
|
|
5475
5880
|
};
|
|
5476
5881
|
function ToasterViewport({ className }) {
|
|
5477
5882
|
const { toasts } = import_toast.Toast.useToastManager();
|
|
5478
|
-
return /* @__PURE__ */ (0,
|
|
5883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_toast.Toast.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5479
5884
|
import_toast.Toast.Viewport,
|
|
5480
5885
|
{
|
|
5481
5886
|
"data-slot": "toast-viewport",
|
|
@@ -5483,7 +5888,7 @@ function ToasterViewport({ className }) {
|
|
|
5483
5888
|
"fixed top-4 right-4 z-[100] flex w-80 flex-col gap-2 outline-none",
|
|
5484
5889
|
className
|
|
5485
5890
|
),
|
|
5486
|
-
children: toasts.map((item) => /* @__PURE__ */ (0,
|
|
5891
|
+
children: toasts.map((item) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5487
5892
|
import_toast.Toast.Root,
|
|
5488
5893
|
{
|
|
5489
5894
|
toast: item,
|
|
@@ -5493,16 +5898,16 @@ function ToasterViewport({ className }) {
|
|
|
5493
5898
|
"rounded-md border border-border bg-popover px-4 py-3 text-sm text-popover-foreground shadow-md transition-[opacity,transform] duration-200 data-ending-style:animate-toast-out data-starting-style:animate-toast-in",
|
|
5494
5899
|
toastVariantClass[item.type ?? "info"] ?? toastVariantClass.info
|
|
5495
5900
|
),
|
|
5496
|
-
children: /* @__PURE__ */ (0,
|
|
5497
|
-
/* @__PURE__ */ (0,
|
|
5498
|
-
/* @__PURE__ */ (0,
|
|
5901
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_toast.Toast.Content, { className: "flex items-start justify-between gap-2", children: [
|
|
5902
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "grid gap-0.5", children: [
|
|
5903
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5499
5904
|
import_toast.Toast.Title,
|
|
5500
5905
|
{
|
|
5501
5906
|
"data-slot": "toast-title",
|
|
5502
5907
|
className: "font-medium"
|
|
5503
5908
|
}
|
|
5504
5909
|
),
|
|
5505
|
-
/* @__PURE__ */ (0,
|
|
5910
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5506
5911
|
import_toast.Toast.Description,
|
|
5507
5912
|
{
|
|
5508
5913
|
"data-slot": "toast-description",
|
|
@@ -5510,13 +5915,13 @@ function ToasterViewport({ className }) {
|
|
|
5510
5915
|
}
|
|
5511
5916
|
)
|
|
5512
5917
|
] }),
|
|
5513
|
-
/* @__PURE__ */ (0,
|
|
5918
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5514
5919
|
import_toast.Toast.Close,
|
|
5515
5920
|
{
|
|
5516
5921
|
"data-slot": "toast-close",
|
|
5517
5922
|
"aria-label": "Close",
|
|
5518
5923
|
className: "cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none [&_svg]:size-3.5",
|
|
5519
|
-
children: /* @__PURE__ */ (0,
|
|
5924
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react24.XIcon, {})
|
|
5520
5925
|
}
|
|
5521
5926
|
)
|
|
5522
5927
|
] })
|
|
@@ -5527,14 +5932,14 @@ function ToasterViewport({ className }) {
|
|
|
5527
5932
|
) });
|
|
5528
5933
|
}
|
|
5529
5934
|
function Toaster({ className }) {
|
|
5530
|
-
return /* @__PURE__ */ (0,
|
|
5935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_toast.Toast.Provider, { toastManager, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(ToasterViewport, { className }) });
|
|
5531
5936
|
}
|
|
5532
5937
|
|
|
5533
5938
|
// src/components/components/Sonner/index.tsx
|
|
5534
|
-
var
|
|
5939
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
5535
5940
|
function Sonner({ className, style }) {
|
|
5536
|
-
const { context } = (0,
|
|
5537
|
-
(0,
|
|
5941
|
+
const { context } = (0, import_runtime17.useRenderer)();
|
|
5942
|
+
(0, import_react22.useEffect)(() => {
|
|
5538
5943
|
const { actions } = context;
|
|
5539
5944
|
if (actions.has("toast")) {
|
|
5540
5945
|
return;
|
|
@@ -5548,15 +5953,15 @@ function Sonner({ className, style }) {
|
|
|
5548
5953
|
return { ok: true };
|
|
5549
5954
|
});
|
|
5550
5955
|
}, [context]);
|
|
5551
|
-
return /* @__PURE__ */ (0,
|
|
5956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Toaster, {}) });
|
|
5552
5957
|
}
|
|
5553
5958
|
|
|
5554
5959
|
// src/ui/spinner.tsx
|
|
5555
|
-
var
|
|
5556
|
-
var
|
|
5960
|
+
var import_lucide_react25 = require("lucide-react");
|
|
5961
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
5557
5962
|
function Spinner({ className, ...props }) {
|
|
5558
|
-
return /* @__PURE__ */ (0,
|
|
5559
|
-
|
|
5963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
5964
|
+
import_lucide_react25.Loader2Icon,
|
|
5560
5965
|
{
|
|
5561
5966
|
role: "status",
|
|
5562
5967
|
"aria-label": "Loading",
|
|
@@ -5568,37 +5973,37 @@ function Spinner({ className, ...props }) {
|
|
|
5568
5973
|
}
|
|
5569
5974
|
|
|
5570
5975
|
// src/components/components/Spinner/index.tsx
|
|
5571
|
-
var
|
|
5976
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
5572
5977
|
var sizeClass = {
|
|
5573
5978
|
sm: "size-3",
|
|
5574
5979
|
default: "size-4",
|
|
5575
5980
|
lg: "size-6"
|
|
5576
5981
|
};
|
|
5577
5982
|
function Spinner2({ size = "default", className, style }) {
|
|
5578
|
-
return /* @__PURE__ */ (0,
|
|
5983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Spinner, { className: cn(sizeClass[size], className), style });
|
|
5579
5984
|
}
|
|
5580
5985
|
|
|
5581
5986
|
// src/components/components/Statistic/index.tsx
|
|
5582
|
-
var
|
|
5987
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
5583
5988
|
function Statistic({ title, value, precision, suffix, className, style }) {
|
|
5584
5989
|
const display = typeof value === "number" && precision !== void 0 ? value.toFixed(precision) : value;
|
|
5585
|
-
return /* @__PURE__ */ (0,
|
|
5586
|
-
title ? /* @__PURE__ */ (0,
|
|
5587
|
-
/* @__PURE__ */ (0,
|
|
5990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { "data-slot": "statistic", className: cn(className), style, children: [
|
|
5991
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
|
|
5992
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
|
|
5588
5993
|
display,
|
|
5589
|
-
suffix ? /* @__PURE__ */ (0,
|
|
5994
|
+
suffix ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
|
|
5590
5995
|
] })
|
|
5591
5996
|
] });
|
|
5592
5997
|
}
|
|
5593
5998
|
|
|
5594
5999
|
// src/components/components/Switch/index.tsx
|
|
5595
|
-
var
|
|
6000
|
+
var import_react23 = require("react");
|
|
5596
6001
|
|
|
5597
6002
|
// src/ui/switch.tsx
|
|
5598
6003
|
var import_switch = require("@base-ui/react/switch");
|
|
5599
|
-
var
|
|
6004
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
5600
6005
|
function Switch({ className, ...props }) {
|
|
5601
|
-
return /* @__PURE__ */ (0,
|
|
6006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
5602
6007
|
import_switch.Switch.Root,
|
|
5603
6008
|
{
|
|
5604
6009
|
"data-slot": "switch",
|
|
@@ -5607,7 +6012,7 @@ function Switch({ className, ...props }) {
|
|
|
5607
6012
|
className
|
|
5608
6013
|
),
|
|
5609
6014
|
...props,
|
|
5610
|
-
children: /* @__PURE__ */ (0,
|
|
6015
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
5611
6016
|
import_switch.Switch.Thumb,
|
|
5612
6017
|
{
|
|
5613
6018
|
"data-slot": "switch-thumb",
|
|
@@ -5619,7 +6024,7 @@ function Switch({ className, ...props }) {
|
|
|
5619
6024
|
}
|
|
5620
6025
|
|
|
5621
6026
|
// src/components/components/Switch/index.tsx
|
|
5622
|
-
var
|
|
6027
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
5623
6028
|
function Switch2({
|
|
5624
6029
|
name,
|
|
5625
6030
|
label,
|
|
@@ -5631,9 +6036,9 @@ function Switch2({
|
|
|
5631
6036
|
style
|
|
5632
6037
|
}) {
|
|
5633
6038
|
const form = useFormContext();
|
|
5634
|
-
const controlId = (0,
|
|
6039
|
+
const controlId = (0, import_react23.useId)();
|
|
5635
6040
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
5636
|
-
(0,
|
|
6041
|
+
(0, import_react23.useEffect)(() => {
|
|
5637
6042
|
if (inForm && form && name) {
|
|
5638
6043
|
form.registerField(name, rules, value);
|
|
5639
6044
|
return () => form.unregisterField(name);
|
|
@@ -5648,13 +6053,13 @@ function Switch2({
|
|
|
5648
6053
|
}
|
|
5649
6054
|
onChange?.(next);
|
|
5650
6055
|
};
|
|
5651
|
-
const control = /* @__PURE__ */ (0,
|
|
6056
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
5652
6057
|
"span",
|
|
5653
6058
|
{
|
|
5654
6059
|
className: cn("inline-flex items-center gap-2", !inForm && className),
|
|
5655
6060
|
style: inForm ? void 0 : style,
|
|
5656
6061
|
children: [
|
|
5657
|
-
/* @__PURE__ */ (0,
|
|
6062
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
5658
6063
|
Switch,
|
|
5659
6064
|
{
|
|
5660
6065
|
id: controlId,
|
|
@@ -5664,12 +6069,12 @@ function Switch2({
|
|
|
5664
6069
|
onCheckedChange: handleChange
|
|
5665
6070
|
}
|
|
5666
6071
|
),
|
|
5667
|
-
label ? /* @__PURE__ */ (0,
|
|
6072
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
|
|
5668
6073
|
]
|
|
5669
6074
|
}
|
|
5670
6075
|
);
|
|
5671
6076
|
if (inForm && form && name) {
|
|
5672
|
-
return /* @__PURE__ */ (0,
|
|
6077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
5673
6078
|
"div",
|
|
5674
6079
|
{
|
|
5675
6080
|
"data-slot": "form-item",
|
|
@@ -5677,7 +6082,7 @@ function Switch2({
|
|
|
5677
6082
|
style,
|
|
5678
6083
|
children: [
|
|
5679
6084
|
control,
|
|
5680
|
-
form.errors[name] ? /* @__PURE__ */ (0,
|
|
6085
|
+
form.errors[name] ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
|
|
5681
6086
|
]
|
|
5682
6087
|
}
|
|
5683
6088
|
);
|
|
@@ -5686,9 +6091,9 @@ function Switch2({
|
|
|
5686
6091
|
}
|
|
5687
6092
|
|
|
5688
6093
|
// src/components/components/Table/index.tsx
|
|
5689
|
-
var
|
|
5690
|
-
var
|
|
5691
|
-
var
|
|
6094
|
+
var import_runtime18 = require("@pactor-app/runtime");
|
|
6095
|
+
var import_react24 = require("react");
|
|
6096
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
5692
6097
|
function renderCellValue2(value) {
|
|
5693
6098
|
if (value === void 0 || value === null) {
|
|
5694
6099
|
return "";
|
|
@@ -5708,9 +6113,9 @@ function Table3({
|
|
|
5708
6113
|
className,
|
|
5709
6114
|
style
|
|
5710
6115
|
}) {
|
|
5711
|
-
const { renderChildren } = (0,
|
|
5712
|
-
const { t } = (0,
|
|
5713
|
-
const [current, setCurrent] = (0,
|
|
6116
|
+
const { renderChildren } = (0, import_runtime18.useRenderer)();
|
|
6117
|
+
const { t } = (0, import_runtime18.useI18n)();
|
|
6118
|
+
const [current, setCurrent] = (0, import_react24.useState)(1);
|
|
5714
6119
|
const pageSize = pagination === false ? void 0 : pagination?.pageSize;
|
|
5715
6120
|
const total = dataSource.length;
|
|
5716
6121
|
const pageCount = pageSize !== void 0 && pageSize > 0 ? Math.max(1, Math.ceil(total / pageSize)) : 1;
|
|
@@ -5719,8 +6124,8 @@ function Table3({
|
|
|
5719
6124
|
setCurrent(page);
|
|
5720
6125
|
onChange?.({ current: page, pageSize, total });
|
|
5721
6126
|
};
|
|
5722
|
-
return /* @__PURE__ */ (0,
|
|
5723
|
-
loading ? /* @__PURE__ */ (0,
|
|
6127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { "data-slot": "dsl-table", className: cn("relative", className), style, children: [
|
|
6128
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
5724
6129
|
"div",
|
|
5725
6130
|
{
|
|
5726
6131
|
"data-slot": "table-loading",
|
|
@@ -5728,8 +6133,8 @@ function Table3({
|
|
|
5728
6133
|
children: t("pactor.table.loading")
|
|
5729
6134
|
}
|
|
5730
6135
|
) : null,
|
|
5731
|
-
/* @__PURE__ */ (0,
|
|
5732
|
-
/* @__PURE__ */ (0,
|
|
6136
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Table2, { children: [
|
|
6137
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
5733
6138
|
TableHead,
|
|
5734
6139
|
{
|
|
5735
6140
|
style: column.width !== void 0 ? { width: column.width } : void 0,
|
|
@@ -5737,7 +6142,7 @@ function Table3({
|
|
|
5737
6142
|
},
|
|
5738
6143
|
column.dataIndex ?? String(index)
|
|
5739
6144
|
)) }) }),
|
|
5740
|
-
/* @__PURE__ */ (0,
|
|
6145
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
5741
6146
|
"div",
|
|
5742
6147
|
{
|
|
5743
6148
|
"data-slot": "table-empty",
|
|
@@ -5746,10 +6151,10 @@ function Table3({
|
|
|
5746
6151
|
}
|
|
5747
6152
|
) }) }) : pageRows.map((row, rowIndex) => {
|
|
5748
6153
|
const key = row[rowKey];
|
|
5749
|
-
return /* @__PURE__ */ (0,
|
|
6154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
5750
6155
|
TableRow,
|
|
5751
6156
|
{
|
|
5752
|
-
children: columns.map((column, columnIndex) => /* @__PURE__ */ (0,
|
|
6157
|
+
children: columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableCell, { children: column.cell ? renderChildren([column.cell], { row, rowIndex }) : renderCellValue2(
|
|
5753
6158
|
column.dataIndex === void 0 ? void 0 : row[column.dataIndex]
|
|
5754
6159
|
) }, column.dataIndex ?? String(columnIndex)))
|
|
5755
6160
|
},
|
|
@@ -5757,8 +6162,8 @@ function Table3({
|
|
|
5757
6162
|
);
|
|
5758
6163
|
}) })
|
|
5759
6164
|
] }),
|
|
5760
|
-
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0,
|
|
5761
|
-
(page) => /* @__PURE__ */ (0,
|
|
6165
|
+
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
|
|
6166
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
5762
6167
|
Button,
|
|
5763
6168
|
{
|
|
5764
6169
|
type: "button",
|
|
@@ -5775,16 +6180,16 @@ function Table3({
|
|
|
5775
6180
|
}
|
|
5776
6181
|
|
|
5777
6182
|
// src/components/components/Tabs/index.tsx
|
|
5778
|
-
var
|
|
6183
|
+
var import_runtime19 = require("@pactor-app/runtime");
|
|
5779
6184
|
|
|
5780
6185
|
// src/ui/tabs.tsx
|
|
5781
6186
|
var import_tabs = require("@base-ui/react/tabs");
|
|
5782
|
-
var
|
|
6187
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
5783
6188
|
function Tabs({
|
|
5784
6189
|
className,
|
|
5785
6190
|
...props
|
|
5786
6191
|
}) {
|
|
5787
|
-
return /* @__PURE__ */ (0,
|
|
6192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
5788
6193
|
import_tabs.Tabs.Root,
|
|
5789
6194
|
{
|
|
5790
6195
|
"data-slot": "tabs",
|
|
@@ -5797,7 +6202,7 @@ function TabsList({
|
|
|
5797
6202
|
className,
|
|
5798
6203
|
...props
|
|
5799
6204
|
}) {
|
|
5800
|
-
return /* @__PURE__ */ (0,
|
|
6205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
5801
6206
|
import_tabs.Tabs.List,
|
|
5802
6207
|
{
|
|
5803
6208
|
"data-slot": "tabs-list",
|
|
@@ -5813,7 +6218,7 @@ function TabsTrigger({
|
|
|
5813
6218
|
className,
|
|
5814
6219
|
...props
|
|
5815
6220
|
}) {
|
|
5816
|
-
return /* @__PURE__ */ (0,
|
|
6221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
5817
6222
|
import_tabs.Tabs.Tab,
|
|
5818
6223
|
{
|
|
5819
6224
|
"data-slot": "tabs-trigger",
|
|
@@ -5829,7 +6234,7 @@ function TabsContent({
|
|
|
5829
6234
|
className,
|
|
5830
6235
|
...props
|
|
5831
6236
|
}) {
|
|
5832
|
-
return /* @__PURE__ */ (0,
|
|
6237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
5833
6238
|
import_tabs.Tabs.Panel,
|
|
5834
6239
|
{
|
|
5835
6240
|
"data-slot": "tabs-content",
|
|
@@ -5840,10 +6245,10 @@ function TabsContent({
|
|
|
5840
6245
|
}
|
|
5841
6246
|
|
|
5842
6247
|
// src/components/components/Tabs/index.tsx
|
|
5843
|
-
var
|
|
6248
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
5844
6249
|
function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
5845
|
-
const { renderChildren } = (0,
|
|
5846
|
-
return /* @__PURE__ */ (0,
|
|
6250
|
+
const { renderChildren } = (0, import_runtime19.useRenderer)();
|
|
6251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
5847
6252
|
Tabs,
|
|
5848
6253
|
{
|
|
5849
6254
|
value: activeKey,
|
|
@@ -5852,15 +6257,15 @@ function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
|
5852
6257
|
className,
|
|
5853
6258
|
style,
|
|
5854
6259
|
children: [
|
|
5855
|
-
/* @__PURE__ */ (0,
|
|
5856
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
6260
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TabsList, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
|
|
6261
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
|
|
5857
6262
|
]
|
|
5858
6263
|
}
|
|
5859
6264
|
);
|
|
5860
6265
|
}
|
|
5861
6266
|
|
|
5862
6267
|
// src/components/components/Text/index.tsx
|
|
5863
|
-
var
|
|
6268
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
5864
6269
|
var typeClassMap = {
|
|
5865
6270
|
default: "",
|
|
5866
6271
|
secondary: "text-muted-foreground",
|
|
@@ -5879,7 +6284,7 @@ function Text({
|
|
|
5879
6284
|
style,
|
|
5880
6285
|
children
|
|
5881
6286
|
}) {
|
|
5882
|
-
return /* @__PURE__ */ (0,
|
|
6287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
5883
6288
|
"span",
|
|
5884
6289
|
{
|
|
5885
6290
|
"data-slot": "text",
|
|
@@ -5899,29 +6304,8 @@ function Text({
|
|
|
5899
6304
|
}
|
|
5900
6305
|
|
|
5901
6306
|
// src/components/components/Textarea/index.tsx
|
|
5902
|
-
var
|
|
5903
|
-
|
|
5904
|
-
// src/ui/textarea.tsx
|
|
5905
|
-
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
5906
|
-
function Textarea({
|
|
5907
|
-
className,
|
|
5908
|
-
...props
|
|
5909
|
-
}) {
|
|
5910
|
-
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
5911
|
-
"textarea",
|
|
5912
|
-
{
|
|
5913
|
-
"data-slot": "textarea",
|
|
5914
|
-
className: cn(
|
|
5915
|
-
"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
5916
|
-
className
|
|
5917
|
-
),
|
|
5918
|
-
...props
|
|
5919
|
-
}
|
|
5920
|
-
);
|
|
5921
|
-
}
|
|
5922
|
-
|
|
5923
|
-
// src/components/components/Textarea/index.tsx
|
|
5924
|
-
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
6307
|
+
var import_react25 = require("react");
|
|
6308
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
5925
6309
|
function Textarea2({
|
|
5926
6310
|
name,
|
|
5927
6311
|
label,
|
|
@@ -5935,9 +6319,9 @@ function Textarea2({
|
|
|
5935
6319
|
style
|
|
5936
6320
|
}) {
|
|
5937
6321
|
const form = useFormContext();
|
|
5938
|
-
const controlId = (0,
|
|
6322
|
+
const controlId = (0, import_react25.useId)();
|
|
5939
6323
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
5940
|
-
(0,
|
|
6324
|
+
(0, import_react25.useEffect)(() => {
|
|
5941
6325
|
if (inForm && form && name) {
|
|
5942
6326
|
form.registerField(name, rules, value);
|
|
5943
6327
|
return () => form.unregisterField(name);
|
|
@@ -5946,7 +6330,7 @@ function Textarea2({
|
|
|
5946
6330
|
});
|
|
5947
6331
|
if (inForm && form && name) {
|
|
5948
6332
|
const fieldValue = form.values[name];
|
|
5949
|
-
return /* @__PURE__ */ (0,
|
|
6333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5950
6334
|
FieldShell,
|
|
5951
6335
|
{
|
|
5952
6336
|
layout: form.layout,
|
|
@@ -5955,7 +6339,7 @@ function Textarea2({
|
|
|
5955
6339
|
error: form.errors[name],
|
|
5956
6340
|
className,
|
|
5957
6341
|
style,
|
|
5958
|
-
children: /* @__PURE__ */ (0,
|
|
6342
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5959
6343
|
Textarea,
|
|
5960
6344
|
{
|
|
5961
6345
|
id: controlId,
|
|
@@ -5972,7 +6356,7 @@ function Textarea2({
|
|
|
5972
6356
|
}
|
|
5973
6357
|
);
|
|
5974
6358
|
}
|
|
5975
|
-
return /* @__PURE__ */ (0,
|
|
6359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5976
6360
|
Textarea,
|
|
5977
6361
|
{
|
|
5978
6362
|
value: value ?? "",
|
|
@@ -5989,7 +6373,7 @@ function Textarea2({
|
|
|
5989
6373
|
// src/ui/toggle.tsx
|
|
5990
6374
|
var import_toggle = require("@base-ui/react/toggle");
|
|
5991
6375
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
5992
|
-
var
|
|
6376
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
5993
6377
|
var toggleVariants = (0, import_class_variance_authority6.cva)(
|
|
5994
6378
|
"inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-colors outline-none hover:bg-muted hover:text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-pressed:bg-accent data-pressed:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
5995
6379
|
{
|
|
@@ -6016,7 +6400,7 @@ function Toggle({
|
|
|
6016
6400
|
size,
|
|
6017
6401
|
...props
|
|
6018
6402
|
}) {
|
|
6019
|
-
return /* @__PURE__ */ (0,
|
|
6403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
6020
6404
|
import_toggle.Toggle,
|
|
6021
6405
|
{
|
|
6022
6406
|
"data-slot": "toggle",
|
|
@@ -6027,7 +6411,7 @@ function Toggle({
|
|
|
6027
6411
|
}
|
|
6028
6412
|
|
|
6029
6413
|
// src/components/components/Toggle/index.tsx
|
|
6030
|
-
var
|
|
6414
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
6031
6415
|
function Toggle2({
|
|
6032
6416
|
text,
|
|
6033
6417
|
pressed,
|
|
@@ -6038,7 +6422,7 @@ function Toggle2({
|
|
|
6038
6422
|
className,
|
|
6039
6423
|
style
|
|
6040
6424
|
}) {
|
|
6041
|
-
return /* @__PURE__ */ (0,
|
|
6425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
6042
6426
|
Toggle,
|
|
6043
6427
|
{
|
|
6044
6428
|
pressed,
|
|
@@ -6057,7 +6441,7 @@ function Toggle2({
|
|
|
6057
6441
|
var import_toggle3 = require("@base-ui/react/toggle");
|
|
6058
6442
|
var import_toggle_group = require("@base-ui/react/toggle-group");
|
|
6059
6443
|
var React4 = __toESM(require("react"), 1);
|
|
6060
|
-
var
|
|
6444
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
6061
6445
|
var ToggleGroupContext = React4.createContext({
|
|
6062
6446
|
size: "default",
|
|
6063
6447
|
variant: "default"
|
|
@@ -6069,7 +6453,7 @@ function ToggleGroup({
|
|
|
6069
6453
|
children,
|
|
6070
6454
|
...props
|
|
6071
6455
|
}) {
|
|
6072
|
-
return /* @__PURE__ */ (0,
|
|
6456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
6073
6457
|
import_toggle_group.ToggleGroup,
|
|
6074
6458
|
{
|
|
6075
6459
|
"data-slot": "toggle-group",
|
|
@@ -6080,7 +6464,7 @@ function ToggleGroup({
|
|
|
6080
6464
|
className
|
|
6081
6465
|
),
|
|
6082
6466
|
...props,
|
|
6083
|
-
children: /* @__PURE__ */ (0,
|
|
6467
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
6084
6468
|
}
|
|
6085
6469
|
);
|
|
6086
6470
|
}
|
|
@@ -6092,7 +6476,7 @@ function ToggleGroupItem({
|
|
|
6092
6476
|
...props
|
|
6093
6477
|
}) {
|
|
6094
6478
|
const context = React4.useContext(ToggleGroupContext);
|
|
6095
|
-
return /* @__PURE__ */ (0,
|
|
6479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
6096
6480
|
import_toggle3.Toggle,
|
|
6097
6481
|
{
|
|
6098
6482
|
"data-slot": "toggle-group-item",
|
|
@@ -6113,7 +6497,7 @@ function ToggleGroupItem({
|
|
|
6113
6497
|
}
|
|
6114
6498
|
|
|
6115
6499
|
// src/components/components/ToggleGroup/index.tsx
|
|
6116
|
-
var
|
|
6500
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
6117
6501
|
function ToggleGroup2({
|
|
6118
6502
|
options = [],
|
|
6119
6503
|
value,
|
|
@@ -6133,7 +6517,7 @@ function ToggleGroup2({
|
|
|
6133
6517
|
onChange?.(added ?? void 0);
|
|
6134
6518
|
}
|
|
6135
6519
|
};
|
|
6136
|
-
return /* @__PURE__ */ (0,
|
|
6520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
6137
6521
|
ToggleGroup,
|
|
6138
6522
|
{
|
|
6139
6523
|
value: groupValue,
|
|
@@ -6142,7 +6526,7 @@ function ToggleGroup2({
|
|
|
6142
6526
|
onValueChange: (next) => handleChange(next),
|
|
6143
6527
|
className,
|
|
6144
6528
|
style,
|
|
6145
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
6529
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
6146
6530
|
ToggleGroupItem,
|
|
6147
6531
|
{
|
|
6148
6532
|
value: option.value,
|
|
@@ -6155,78 +6539,18 @@ function ToggleGroup2({
|
|
|
6155
6539
|
);
|
|
6156
6540
|
}
|
|
6157
6541
|
|
|
6158
|
-
// src/ui/tooltip.tsx
|
|
6159
|
-
var import_tooltip = require("@base-ui/react/tooltip");
|
|
6160
|
-
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
6161
|
-
function TooltipProvider({
|
|
6162
|
-
delay = 0,
|
|
6163
|
-
...props
|
|
6164
|
-
}) {
|
|
6165
|
-
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
6166
|
-
import_tooltip.Tooltip.Provider,
|
|
6167
|
-
{
|
|
6168
|
-
"data-slot": "tooltip-provider",
|
|
6169
|
-
delay,
|
|
6170
|
-
...props
|
|
6171
|
-
}
|
|
6172
|
-
);
|
|
6173
|
-
}
|
|
6174
|
-
function Tooltip2({
|
|
6175
|
-
...props
|
|
6176
|
-
}) {
|
|
6177
|
-
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_tooltip.Tooltip.Root, { "data-slot": "tooltip", ...props }) });
|
|
6178
|
-
}
|
|
6179
|
-
function TooltipTrigger({
|
|
6180
|
-
...props
|
|
6181
|
-
}) {
|
|
6182
|
-
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_tooltip.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
6183
|
-
}
|
|
6184
|
-
function TooltipContent({
|
|
6185
|
-
className,
|
|
6186
|
-
side = "top",
|
|
6187
|
-
sideOffset = 4,
|
|
6188
|
-
align = "center",
|
|
6189
|
-
children,
|
|
6190
|
-
...props
|
|
6191
|
-
}) {
|
|
6192
|
-
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
6193
|
-
import_tooltip.Tooltip.Positioner,
|
|
6194
|
-
{
|
|
6195
|
-
align,
|
|
6196
|
-
side,
|
|
6197
|
-
sideOffset,
|
|
6198
|
-
className: "isolate z-50",
|
|
6199
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
6200
|
-
import_tooltip.Tooltip.Popup,
|
|
6201
|
-
{
|
|
6202
|
-
"data-slot": "tooltip-content",
|
|
6203
|
-
className: cn(
|
|
6204
|
-
"z-50 w-fit origin-(--transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
6205
|
-
className
|
|
6206
|
-
),
|
|
6207
|
-
...props,
|
|
6208
|
-
children: [
|
|
6209
|
-
children,
|
|
6210
|
-
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-primary fill-primary" })
|
|
6211
|
-
]
|
|
6212
|
-
}
|
|
6213
|
-
)
|
|
6214
|
-
}
|
|
6215
|
-
) });
|
|
6216
|
-
}
|
|
6217
|
-
|
|
6218
6542
|
// src/components/components/Tooltip/index.tsx
|
|
6219
|
-
var
|
|
6543
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
6220
6544
|
function Tooltip3({ content, children, className, style }) {
|
|
6221
|
-
return /* @__PURE__ */ (0,
|
|
6222
|
-
/* @__PURE__ */ (0,
|
|
6223
|
-
/* @__PURE__ */ (0,
|
|
6545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(Tooltip2, { children: [
|
|
6546
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
|
|
6547
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(TooltipContent, { className, style, children: content })
|
|
6224
6548
|
] });
|
|
6225
6549
|
}
|
|
6226
6550
|
|
|
6227
6551
|
// src/ui/typography.tsx
|
|
6228
6552
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
6229
|
-
var
|
|
6553
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
6230
6554
|
var typographyVariants = (0, import_class_variance_authority7.cva)("", {
|
|
6231
6555
|
variants: {
|
|
6232
6556
|
variant: {
|
|
@@ -6262,7 +6586,7 @@ var variantTagMap = {
|
|
|
6262
6586
|
};
|
|
6263
6587
|
function Typography({ className, variant = "p", ...props }) {
|
|
6264
6588
|
const Tag2 = variantTagMap[variant ?? "p"];
|
|
6265
|
-
return /* @__PURE__ */ (0,
|
|
6589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6266
6590
|
Tag2,
|
|
6267
6591
|
{
|
|
6268
6592
|
"data-slot": "typography",
|
|
@@ -6274,18 +6598,18 @@ function Typography({ className, variant = "p", ...props }) {
|
|
|
6274
6598
|
}
|
|
6275
6599
|
|
|
6276
6600
|
// src/components/components/Typography/index.tsx
|
|
6277
|
-
var
|
|
6601
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
6278
6602
|
function Typography2({
|
|
6279
6603
|
variant = "p",
|
|
6280
6604
|
text,
|
|
6281
6605
|
className,
|
|
6282
6606
|
style
|
|
6283
6607
|
}) {
|
|
6284
|
-
return /* @__PURE__ */ (0,
|
|
6608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Typography, { variant, className, style, children: text });
|
|
6285
6609
|
}
|
|
6286
6610
|
|
|
6287
6611
|
// src/components/register.ts
|
|
6288
|
-
var
|
|
6612
|
+
var builtinComponents = {
|
|
6289
6613
|
Page,
|
|
6290
6614
|
Grid,
|
|
6291
6615
|
Flex,
|
|
@@ -6325,6 +6649,7 @@ var shadcnComponents = {
|
|
|
6325
6649
|
Slider: Slider2,
|
|
6326
6650
|
Label: Label2,
|
|
6327
6651
|
Field: Field2,
|
|
6652
|
+
ChatInput,
|
|
6328
6653
|
// 导航类扩展组件
|
|
6329
6654
|
Breadcrumb: Breadcrumb2,
|
|
6330
6655
|
Pagination: Pagination2,
|
|
@@ -6364,14 +6689,14 @@ var shadcnComponents = {
|
|
|
6364
6689
|
// 图标(lucide 白名单)
|
|
6365
6690
|
Icon
|
|
6366
6691
|
};
|
|
6367
|
-
function
|
|
6368
|
-
for (const [type, component] of Object.entries(
|
|
6692
|
+
function registerBuiltinComponents(registry) {
|
|
6693
|
+
for (const [type, component] of Object.entries(builtinComponents)) {
|
|
6369
6694
|
registry.register(type, component);
|
|
6370
6695
|
}
|
|
6371
6696
|
}
|
|
6372
|
-
function
|
|
6697
|
+
function createComponentRegistry() {
|
|
6373
6698
|
const registry = new import_core2.Registry("ComponentRegistry");
|
|
6374
|
-
|
|
6699
|
+
registerBuiltinComponents(registry);
|
|
6375
6700
|
return registry;
|
|
6376
6701
|
}
|
|
6377
6702
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -6425,6 +6750,7 @@ function createShadcnComponentRegistry() {
|
|
|
6425
6750
|
Popover,
|
|
6426
6751
|
Progress,
|
|
6427
6752
|
RadioGroup,
|
|
6753
|
+
RailTooltip,
|
|
6428
6754
|
Resizable,
|
|
6429
6755
|
ScrollArea,
|
|
6430
6756
|
Select,
|
|
@@ -6446,9 +6772,10 @@ function createShadcnComponentRegistry() {
|
|
|
6446
6772
|
ToggleGroup,
|
|
6447
6773
|
Tooltip,
|
|
6448
6774
|
Typography,
|
|
6449
|
-
|
|
6775
|
+
builtinComponents,
|
|
6776
|
+
createComponentRegistry,
|
|
6450
6777
|
normalizeIconName,
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6778
|
+
registerBuiltinComponents,
|
|
6779
|
+
useFormContext,
|
|
6780
|
+
useSidebarDrawer
|
|
6454
6781
|
});
|