@pactor-app/ui 1.0.0 → 1.1.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/dist/{chunk-FVZMNP5P.js → chunk-6B5ZX7L3.js} +780 -465
- package/dist/{chunk-UR3I4WXQ.js → chunk-6JNCDPGS.js} +22 -1
- package/dist/{chunk-TUXCPXPA.js → chunk-BVHAP22U.js} +276 -276
- package/dist/{chunk-D6G4J5XS.js → chunk-GV5R6TUT.js} +1 -1
- package/dist/components/index.cjs +1105 -785
- package/dist/components/index.d.cts +98 -14
- package/dist/components/index.d.ts +98 -14
- package/dist/components/index.js +9 -5
- package/dist/index.cjs +1261 -941
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -6
- package/dist/layout/index.cjs +13 -1
- package/dist/layout/index.js +2 -2
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +5 -5
- package/styles.css +88 -7
|
@@ -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,
|
|
@@ -104,7 +105,8 @@ __export(components_exports, {
|
|
|
104
105
|
normalizeIconName: () => normalizeIconName,
|
|
105
106
|
registerShadcnComponents: () => registerShadcnComponents,
|
|
106
107
|
shadcnComponents: () => shadcnComponents,
|
|
107
|
-
useFormContext: () => useFormContext
|
|
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,344 @@ 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)("main", { "data-slot": "sidebar-content", className: "min-w-0 flex-1", children: [
|
|
4221
|
+
drawer ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4222
|
+
"div",
|
|
4223
|
+
{
|
|
4224
|
+
"data-slot": "sidebar-topbar",
|
|
4225
|
+
className: "flex h-14 items-center gap-2 border-b border-sidebar-border bg-sidebar px-3 md:hidden",
|
|
4226
|
+
children: [
|
|
4227
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4228
|
+
"button",
|
|
4229
|
+
{
|
|
4230
|
+
type: "button",
|
|
4231
|
+
"data-slot": "sidebar-menu-trigger",
|
|
4232
|
+
"aria-label": t("pactor.layout.openNavigation"),
|
|
4233
|
+
"aria-expanded": drawerOpen,
|
|
4234
|
+
className: "flex size-8 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",
|
|
4235
|
+
onClick: () => setDrawerOpen(true),
|
|
4236
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon, { name: "menu", size: 18 })
|
|
4237
|
+
}
|
|
4238
|
+
),
|
|
4239
|
+
brandNode
|
|
4240
|
+
]
|
|
4241
|
+
}
|
|
4242
|
+
) : null,
|
|
4243
|
+
children
|
|
4244
|
+
] })
|
|
4245
|
+
]
|
|
4246
|
+
}
|
|
4247
|
+
)
|
|
4248
|
+
}
|
|
4249
|
+
);
|
|
4250
|
+
}
|
|
4251
|
+
function SidebarEntry({
|
|
4252
|
+
item,
|
|
4253
|
+
depth,
|
|
4254
|
+
collapsed
|
|
4255
|
+
}) {
|
|
4256
|
+
const entryClass = cn(
|
|
4257
|
+
"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors",
|
|
4258
|
+
"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
4259
|
+
collapsed && "justify-center px-0"
|
|
4260
|
+
);
|
|
4261
|
+
const indentStyle = !collapsed && depth > 0 ? { paddingLeft: 12 + depth * 16 } : void 0;
|
|
4262
|
+
const labelNode = collapsed ? null : item.label;
|
|
4263
|
+
const iconNode = item.icon ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon, { name: item.icon, size: "sm" }) : null;
|
|
4264
|
+
const entry = item.href ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4265
|
+
"a",
|
|
4266
|
+
{
|
|
4267
|
+
"data-slot": "sidebar-item",
|
|
4268
|
+
href: item.href,
|
|
4269
|
+
className: entryClass,
|
|
4270
|
+
style: indentStyle,
|
|
4271
|
+
children: [
|
|
4272
|
+
iconNode,
|
|
4273
|
+
labelNode
|
|
4274
|
+
]
|
|
4275
|
+
}
|
|
4276
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { "data-slot": "sidebar-item", className: entryClass, style: indentStyle, children: [
|
|
4277
|
+
iconNode,
|
|
4278
|
+
labelNode
|
|
4279
|
+
] });
|
|
4280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { "data-slot": "sidebar-entry", children: [
|
|
4281
|
+
collapsed ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(RailTooltip, { label: item.label, children: entry }) : entry,
|
|
4282
|
+
item.children?.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4283
|
+
SidebarEntry,
|
|
4284
|
+
{
|
|
4285
|
+
item: child,
|
|
4286
|
+
depth: depth + 1,
|
|
4287
|
+
collapsed
|
|
4288
|
+
},
|
|
4289
|
+
child.href ?? child.label ?? index
|
|
4290
|
+
))
|
|
4291
|
+
] });
|
|
4292
|
+
}
|
|
4293
|
+
|
|
4294
|
+
// src/components/components/Menu/index.tsx
|
|
4295
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3827
4296
|
function Menu2({
|
|
3828
4297
|
items = [],
|
|
3829
4298
|
mode = "inline",
|
|
@@ -3832,27 +4301,48 @@ function Menu2({
|
|
|
3832
4301
|
className,
|
|
3833
4302
|
style
|
|
3834
4303
|
}) {
|
|
3835
|
-
|
|
4304
|
+
const drawer = useSidebarDrawer();
|
|
4305
|
+
const collapsed = mode === "inline" && drawer?.collapsed === true;
|
|
4306
|
+
let previousGroup;
|
|
4307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3836
4308
|
"nav",
|
|
3837
4309
|
{
|
|
3838
4310
|
"data-slot": "menu",
|
|
3839
4311
|
"data-mode": mode,
|
|
4312
|
+
"data-collapsed": collapsed || void 0,
|
|
3840
4313
|
className: cn(
|
|
3841
4314
|
mode === "horizontal" ? "flex items-center gap-1" : "flex flex-col gap-0.5 p-2",
|
|
3842
4315
|
className
|
|
3843
4316
|
),
|
|
3844
4317
|
style,
|
|
3845
|
-
children: items.map((item) =>
|
|
3846
|
-
|
|
3847
|
-
{
|
|
3848
|
-
item
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
4318
|
+
children: items.map((item) => {
|
|
4319
|
+
let groupLabel;
|
|
4320
|
+
if (!collapsed && mode === "inline" && item.group !== void 0 && item.group !== previousGroup) {
|
|
4321
|
+
groupLabel = item.group;
|
|
4322
|
+
}
|
|
4323
|
+
previousGroup = item.group;
|
|
4324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { "data-slot": "menu-group-entry", children: [
|
|
4325
|
+
groupLabel !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4326
|
+
"div",
|
|
4327
|
+
{
|
|
4328
|
+
"data-slot": "menu-group",
|
|
4329
|
+
className: "px-3 pb-1 pt-3 text-xs font-medium text-muted-foreground first:pt-1",
|
|
4330
|
+
children: groupLabel
|
|
4331
|
+
}
|
|
4332
|
+
),
|
|
4333
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4334
|
+
MenuEntry,
|
|
4335
|
+
{
|
|
4336
|
+
item,
|
|
4337
|
+
mode,
|
|
4338
|
+
depth: 0,
|
|
4339
|
+
selectedKey,
|
|
4340
|
+
onSelect,
|
|
4341
|
+
collapsed
|
|
4342
|
+
}
|
|
4343
|
+
)
|
|
4344
|
+
] }, item.key);
|
|
4345
|
+
})
|
|
3856
4346
|
}
|
|
3857
4347
|
);
|
|
3858
4348
|
}
|
|
@@ -3861,37 +4351,56 @@ function MenuEntry({
|
|
|
3861
4351
|
mode,
|
|
3862
4352
|
depth,
|
|
3863
4353
|
selectedKey,
|
|
3864
|
-
onSelect
|
|
4354
|
+
onSelect,
|
|
4355
|
+
collapsed = false
|
|
3865
4356
|
}) {
|
|
3866
4357
|
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
|
-
|
|
4358
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
4359
|
+
"button",
|
|
4360
|
+
{
|
|
4361
|
+
type: "button",
|
|
4362
|
+
"data-slot": "menu-item",
|
|
4363
|
+
"aria-current": selected ? "page" : void 0,
|
|
4364
|
+
disabled: item.disabled,
|
|
4365
|
+
className: cn(
|
|
4366
|
+
"flex w-full items-center gap-2 rounded-md text-sm transition-colors",
|
|
4367
|
+
mode === "horizontal" ? "px-3 py-2" : "px-3 py-2 text-left",
|
|
4368
|
+
collapsed && "justify-center px-0",
|
|
4369
|
+
selected ? "bg-accent font-medium text-accent-foreground" : "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
|
|
4370
|
+
item.disabled && "cursor-not-allowed opacity-50 hover:bg-transparent hover:text-muted-foreground"
|
|
4371
|
+
),
|
|
4372
|
+
style: mode === "inline" && depth > 0 && !collapsed ? { paddingLeft: 12 + depth * 16 } : void 0,
|
|
4373
|
+
onClick: () => {
|
|
4374
|
+
if (!item.disabled) {
|
|
4375
|
+
onSelect?.(item.key);
|
|
4376
|
+
}
|
|
4377
|
+
},
|
|
4378
|
+
children: [
|
|
4379
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
4380
|
+
collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: item.label }),
|
|
4381
|
+
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,
|
|
4382
|
+
item.badge !== void 0 && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4383
|
+
"span",
|
|
4384
|
+
{
|
|
4385
|
+
"data-slot": "menu-item-badge",
|
|
4386
|
+
className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
4387
|
+
children: item.badge
|
|
4388
|
+
}
|
|
4389
|
+
) : null
|
|
4390
|
+
]
|
|
4391
|
+
}
|
|
4392
|
+
);
|
|
4393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { "data-slot": "menu-entry", "data-key": item.key, children: [
|
|
4394
|
+
collapsed ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(RailTooltip, { label: item.label, children: button }) : button,
|
|
4395
|
+
item.children?.map((child) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3888
4396
|
MenuEntry,
|
|
3889
4397
|
{
|
|
3890
4398
|
item: child,
|
|
3891
4399
|
mode,
|
|
3892
4400
|
depth: depth + 1,
|
|
3893
4401
|
selectedKey,
|
|
3894
|
-
onSelect
|
|
4402
|
+
onSelect,
|
|
4403
|
+
collapsed
|
|
3895
4404
|
},
|
|
3896
4405
|
child.key
|
|
3897
4406
|
))
|
|
@@ -3901,12 +4410,12 @@ function MenuEntry({
|
|
|
3901
4410
|
// src/ui/menubar.tsx
|
|
3902
4411
|
var import_menu2 = require("@base-ui/react/menu");
|
|
3903
4412
|
var import_menubar = require("@base-ui/react/menubar");
|
|
3904
|
-
var
|
|
4413
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3905
4414
|
function Menubar({
|
|
3906
4415
|
className,
|
|
3907
4416
|
...props
|
|
3908
4417
|
}) {
|
|
3909
|
-
return /* @__PURE__ */ (0,
|
|
4418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3910
4419
|
import_menubar.Menubar,
|
|
3911
4420
|
{
|
|
3912
4421
|
"data-slot": "menubar",
|
|
@@ -3921,13 +4430,13 @@ function Menubar({
|
|
|
3921
4430
|
function MenubarMenu({
|
|
3922
4431
|
...props
|
|
3923
4432
|
}) {
|
|
3924
|
-
return /* @__PURE__ */ (0,
|
|
4433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_menu2.Menu.Root, { "data-slot": "menubar-menu", ...props });
|
|
3925
4434
|
}
|
|
3926
4435
|
function MenubarTrigger({
|
|
3927
4436
|
className,
|
|
3928
4437
|
...props
|
|
3929
4438
|
}) {
|
|
3930
|
-
return /* @__PURE__ */ (0,
|
|
4439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3931
4440
|
import_menu2.Menu.Trigger,
|
|
3932
4441
|
{
|
|
3933
4442
|
"data-slot": "menubar-trigger",
|
|
@@ -3946,14 +4455,14 @@ function MenubarContent({
|
|
|
3946
4455
|
sideOffset = 8,
|
|
3947
4456
|
...props
|
|
3948
4457
|
}) {
|
|
3949
|
-
return /* @__PURE__ */ (0,
|
|
4458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_menu2.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3950
4459
|
import_menu2.Menu.Positioner,
|
|
3951
4460
|
{
|
|
3952
4461
|
align,
|
|
3953
4462
|
side,
|
|
3954
4463
|
sideOffset,
|
|
3955
4464
|
className: "isolate z-50",
|
|
3956
|
-
children: /* @__PURE__ */ (0,
|
|
4465
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3957
4466
|
import_menu2.Menu.Popup,
|
|
3958
4467
|
{
|
|
3959
4468
|
"data-slot": "menubar-content",
|
|
@@ -3972,7 +4481,7 @@ function MenubarItem({
|
|
|
3972
4481
|
variant = "default",
|
|
3973
4482
|
...props
|
|
3974
4483
|
}) {
|
|
3975
|
-
return /* @__PURE__ */ (0,
|
|
4484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3976
4485
|
import_menu2.Menu.Item,
|
|
3977
4486
|
{
|
|
3978
4487
|
"data-slot": "menubar-item",
|
|
@@ -3987,17 +4496,17 @@ function MenubarItem({
|
|
|
3987
4496
|
}
|
|
3988
4497
|
|
|
3989
4498
|
// src/components/components/Menubar/index.tsx
|
|
3990
|
-
var
|
|
4499
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3991
4500
|
function Menubar2({ menus = [], onSelect, className, style }) {
|
|
3992
|
-
return /* @__PURE__ */ (0,
|
|
3993
|
-
/* @__PURE__ */ (0,
|
|
3994
|
-
/* @__PURE__ */ (0,
|
|
4501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Menubar, { className, style, children: menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(MenubarMenu, { children: [
|
|
4502
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MenubarTrigger, { children: menu.label }),
|
|
4503
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MenubarContent, { children: menu.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
3995
4504
|
MenubarItem,
|
|
3996
4505
|
{
|
|
3997
4506
|
disabled: item.disabled,
|
|
3998
4507
|
onClick: () => onSelect?.(item.value),
|
|
3999
4508
|
children: [
|
|
4000
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
4509
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
4001
4510
|
item.label
|
|
4002
4511
|
]
|
|
4003
4512
|
},
|
|
@@ -4008,15 +4517,15 @@ function Menubar2({ menus = [], onSelect, className, style }) {
|
|
|
4008
4517
|
|
|
4009
4518
|
// src/ui/navigation-menu.tsx
|
|
4010
4519
|
var import_navigation_menu = require("@base-ui/react/navigation-menu");
|
|
4011
|
-
var
|
|
4520
|
+
var import_lucide_react18 = require("lucide-react");
|
|
4012
4521
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
4013
|
-
var
|
|
4522
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4014
4523
|
function NavigationMenu({
|
|
4015
4524
|
className,
|
|
4016
4525
|
children,
|
|
4017
4526
|
...props
|
|
4018
4527
|
}) {
|
|
4019
|
-
return /* @__PURE__ */ (0,
|
|
4528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
4020
4529
|
import_navigation_menu.NavigationMenu.Root,
|
|
4021
4530
|
{
|
|
4022
4531
|
"data-slot": "navigation-menu",
|
|
@@ -4024,7 +4533,7 @@ function NavigationMenu({
|
|
|
4024
4533
|
...props,
|
|
4025
4534
|
children: [
|
|
4026
4535
|
children,
|
|
4027
|
-
/* @__PURE__ */ (0,
|
|
4536
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NavigationMenuViewport, {})
|
|
4028
4537
|
]
|
|
4029
4538
|
}
|
|
4030
4539
|
);
|
|
@@ -4033,7 +4542,7 @@ function NavigationMenuList({
|
|
|
4033
4542
|
className,
|
|
4034
4543
|
...props
|
|
4035
4544
|
}) {
|
|
4036
|
-
return /* @__PURE__ */ (0,
|
|
4545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4037
4546
|
import_navigation_menu.NavigationMenu.List,
|
|
4038
4547
|
{
|
|
4039
4548
|
"data-slot": "navigation-menu-list",
|
|
@@ -4046,7 +4555,7 @@ function NavigationMenuItem({
|
|
|
4046
4555
|
className,
|
|
4047
4556
|
...props
|
|
4048
4557
|
}) {
|
|
4049
|
-
return /* @__PURE__ */ (0,
|
|
4558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4050
4559
|
import_navigation_menu.NavigationMenu.Item,
|
|
4051
4560
|
{
|
|
4052
4561
|
"data-slot": "navigation-menu-item",
|
|
@@ -4063,7 +4572,7 @@ function NavigationMenuTrigger({
|
|
|
4063
4572
|
children,
|
|
4064
4573
|
...props
|
|
4065
4574
|
}) {
|
|
4066
|
-
return /* @__PURE__ */ (0,
|
|
4575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
4067
4576
|
import_navigation_menu.NavigationMenu.Trigger,
|
|
4068
4577
|
{
|
|
4069
4578
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -4071,8 +4580,8 @@ function NavigationMenuTrigger({
|
|
|
4071
4580
|
...props,
|
|
4072
4581
|
children: [
|
|
4073
4582
|
children,
|
|
4074
|
-
/* @__PURE__ */ (0,
|
|
4075
|
-
|
|
4583
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4584
|
+
import_lucide_react18.ChevronDownIcon,
|
|
4076
4585
|
{
|
|
4077
4586
|
className: "relative top-px ml-1 size-3 transition-transform duration-200 group-data-open/navigation-menu-trigger:rotate-180",
|
|
4078
4587
|
"aria-hidden": "true"
|
|
@@ -4086,7 +4595,7 @@ function NavigationMenuContent({
|
|
|
4086
4595
|
className,
|
|
4087
4596
|
...props
|
|
4088
4597
|
}) {
|
|
4089
|
-
return /* @__PURE__ */ (0,
|
|
4598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4090
4599
|
import_navigation_menu.NavigationMenu.Content,
|
|
4091
4600
|
{
|
|
4092
4601
|
"data-slot": "navigation-menu-content",
|
|
@@ -4099,13 +4608,13 @@ function NavigationMenuContent({
|
|
|
4099
4608
|
);
|
|
4100
4609
|
}
|
|
4101
4610
|
function NavigationMenuViewport({ className }) {
|
|
4102
|
-
return /* @__PURE__ */ (0,
|
|
4611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_navigation_menu.NavigationMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4103
4612
|
import_navigation_menu.NavigationMenu.Positioner,
|
|
4104
4613
|
{
|
|
4105
4614
|
side: "bottom",
|
|
4106
4615
|
align: "start",
|
|
4107
4616
|
className: "isolate z-50",
|
|
4108
|
-
children: /* @__PURE__ */ (0,
|
|
4617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4109
4618
|
import_navigation_menu.NavigationMenu.Popup,
|
|
4110
4619
|
{
|
|
4111
4620
|
"data-slot": "navigation-menu-popup",
|
|
@@ -4113,7 +4622,7 @@ function NavigationMenuViewport({ className }) {
|
|
|
4113
4622
|
"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
4623
|
className
|
|
4115
4624
|
),
|
|
4116
|
-
children: /* @__PURE__ */ (0,
|
|
4625
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_navigation_menu.NavigationMenu.Viewport, { "data-slot": "navigation-menu-viewport" })
|
|
4117
4626
|
}
|
|
4118
4627
|
)
|
|
4119
4628
|
}
|
|
@@ -4123,7 +4632,7 @@ function NavigationMenuLink({
|
|
|
4123
4632
|
className,
|
|
4124
4633
|
...props
|
|
4125
4634
|
}) {
|
|
4126
|
-
return /* @__PURE__ */ (0,
|
|
4635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4127
4636
|
import_navigation_menu.NavigationMenu.Link,
|
|
4128
4637
|
{
|
|
4129
4638
|
"data-slot": "navigation-menu-link",
|
|
@@ -4137,33 +4646,33 @@ function NavigationMenuLink({
|
|
|
4137
4646
|
}
|
|
4138
4647
|
|
|
4139
4648
|
// src/components/components/NavigationMenu/index.tsx
|
|
4140
|
-
var
|
|
4649
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4141
4650
|
function NavigationMenu2({ items = [], className, style }) {
|
|
4142
|
-
return /* @__PURE__ */ (0,
|
|
4143
|
-
/* @__PURE__ */ (0,
|
|
4651
|
+
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: [
|
|
4652
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
4144
4653
|
NavigationMenuTrigger,
|
|
4145
4654
|
{
|
|
4146
4655
|
className: item.icon !== void 0 ? "gap-2" : void 0,
|
|
4147
4656
|
children: [
|
|
4148
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
4657
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
4149
4658
|
item.label
|
|
4150
4659
|
]
|
|
4151
4660
|
}
|
|
4152
4661
|
),
|
|
4153
|
-
/* @__PURE__ */ (0,
|
|
4154
|
-
/* @__PURE__ */ (0,
|
|
4662
|
+
/* @__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: [
|
|
4663
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
4155
4664
|
"span",
|
|
4156
4665
|
{
|
|
4157
4666
|
className: child.icon !== void 0 ? "flex items-center gap-2 font-medium" : "font-medium",
|
|
4158
4667
|
children: [
|
|
4159
|
-
child.icon ? /* @__PURE__ */ (0,
|
|
4668
|
+
child.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: child.icon, size: "sm" }) : null,
|
|
4160
4669
|
child.label
|
|
4161
4670
|
]
|
|
4162
4671
|
}
|
|
4163
4672
|
),
|
|
4164
|
-
child.description ? /* @__PURE__ */ (0,
|
|
4673
|
+
child.description ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-muted-foreground", children: child.description }) : null
|
|
4165
4674
|
] }) }, child.href)) }) })
|
|
4166
|
-
] }) : /* @__PURE__ */ (0,
|
|
4675
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
4167
4676
|
NavigationMenuLink,
|
|
4168
4677
|
{
|
|
4169
4678
|
href: item.href,
|
|
@@ -4172,7 +4681,7 @@ function NavigationMenu2({ items = [], className, style }) {
|
|
|
4172
4681
|
item.icon !== void 0 && "gap-2"
|
|
4173
4682
|
),
|
|
4174
4683
|
children: [
|
|
4175
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
4684
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
|
|
4176
4685
|
item.label
|
|
4177
4686
|
]
|
|
4178
4687
|
}
|
|
@@ -4180,22 +4689,22 @@ function NavigationMenu2({ items = [], className, style }) {
|
|
|
4180
4689
|
}
|
|
4181
4690
|
|
|
4182
4691
|
// src/components/components/Page/index.tsx
|
|
4183
|
-
var
|
|
4692
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
4184
4693
|
function Page({ title, className, style, children }) {
|
|
4185
|
-
return /* @__PURE__ */ (0,
|
|
4186
|
-
title ? /* @__PURE__ */ (0,
|
|
4187
|
-
/* @__PURE__ */ (0,
|
|
4694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
|
|
4695
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
|
|
4696
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { "data-slot": "page-content", className: "space-y-5", children })
|
|
4188
4697
|
] });
|
|
4189
4698
|
}
|
|
4190
4699
|
|
|
4191
4700
|
// src/components/components/Pagination/index.tsx
|
|
4192
|
-
var
|
|
4701
|
+
var import_react17 = require("react");
|
|
4193
4702
|
|
|
4194
4703
|
// src/ui/pagination.tsx
|
|
4195
|
-
var
|
|
4196
|
-
var
|
|
4704
|
+
var import_lucide_react19 = require("lucide-react");
|
|
4705
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
4197
4706
|
function Pagination({ className, ...props }) {
|
|
4198
|
-
return /* @__PURE__ */ (0,
|
|
4707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4199
4708
|
"nav",
|
|
4200
4709
|
{
|
|
4201
4710
|
role: "navigation",
|
|
@@ -4207,7 +4716,7 @@ function Pagination({ className, ...props }) {
|
|
|
4207
4716
|
);
|
|
4208
4717
|
}
|
|
4209
4718
|
function PaginationContent({ className, ...props }) {
|
|
4210
|
-
return /* @__PURE__ */ (0,
|
|
4719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4211
4720
|
"ul",
|
|
4212
4721
|
{
|
|
4213
4722
|
"data-slot": "pagination-content",
|
|
@@ -4217,7 +4726,7 @@ function PaginationContent({ className, ...props }) {
|
|
|
4217
4726
|
);
|
|
4218
4727
|
}
|
|
4219
4728
|
function PaginationItem({ ...props }) {
|
|
4220
|
-
return /* @__PURE__ */ (0,
|
|
4729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
4221
4730
|
}
|
|
4222
4731
|
function PaginationLink({
|
|
4223
4732
|
className,
|
|
@@ -4225,7 +4734,7 @@ function PaginationLink({
|
|
|
4225
4734
|
disabled,
|
|
4226
4735
|
...props
|
|
4227
4736
|
}) {
|
|
4228
|
-
return /* @__PURE__ */ (0,
|
|
4737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4229
4738
|
"a",
|
|
4230
4739
|
{
|
|
4231
4740
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -4248,15 +4757,15 @@ function PaginationPrevious({
|
|
|
4248
4757
|
className,
|
|
4249
4758
|
...props
|
|
4250
4759
|
}) {
|
|
4251
|
-
return /* @__PURE__ */ (0,
|
|
4760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
4252
4761
|
PaginationLink,
|
|
4253
4762
|
{
|
|
4254
4763
|
"aria-label": "Go to previous page",
|
|
4255
4764
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
4256
4765
|
...props,
|
|
4257
4766
|
children: [
|
|
4258
|
-
/* @__PURE__ */ (0,
|
|
4259
|
-
/* @__PURE__ */ (0,
|
|
4767
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react19.ChevronLeftIcon, {}),
|
|
4768
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "hidden sm:block", children: "Previous" })
|
|
4260
4769
|
]
|
|
4261
4770
|
}
|
|
4262
4771
|
);
|
|
@@ -4265,21 +4774,21 @@ function PaginationNext({
|
|
|
4265
4774
|
className,
|
|
4266
4775
|
...props
|
|
4267
4776
|
}) {
|
|
4268
|
-
return /* @__PURE__ */ (0,
|
|
4777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
4269
4778
|
PaginationLink,
|
|
4270
4779
|
{
|
|
4271
4780
|
"aria-label": "Go to next page",
|
|
4272
4781
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
4273
4782
|
...props,
|
|
4274
4783
|
children: [
|
|
4275
|
-
/* @__PURE__ */ (0,
|
|
4276
|
-
/* @__PURE__ */ (0,
|
|
4784
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "hidden sm:block", children: "Next" }),
|
|
4785
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react19.ChevronRightIcon, {})
|
|
4277
4786
|
]
|
|
4278
4787
|
}
|
|
4279
4788
|
);
|
|
4280
4789
|
}
|
|
4281
4790
|
function PaginationEllipsis({ className, ...props }) {
|
|
4282
|
-
return /* @__PURE__ */ (0,
|
|
4791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
4283
4792
|
"span",
|
|
4284
4793
|
{
|
|
4285
4794
|
"aria-hidden": true,
|
|
@@ -4287,15 +4796,15 @@ function PaginationEllipsis({ className, ...props }) {
|
|
|
4287
4796
|
className: cn("flex size-9 items-center justify-center", className),
|
|
4288
4797
|
...props,
|
|
4289
4798
|
children: [
|
|
4290
|
-
/* @__PURE__ */ (0,
|
|
4291
|
-
/* @__PURE__ */ (0,
|
|
4799
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react19.MoreHorizontalIcon, { className: "size-4" }),
|
|
4800
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
4292
4801
|
]
|
|
4293
4802
|
}
|
|
4294
4803
|
);
|
|
4295
4804
|
}
|
|
4296
4805
|
|
|
4297
4806
|
// src/components/components/Pagination/index.tsx
|
|
4298
|
-
var
|
|
4807
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4299
4808
|
function pageItems(current, count) {
|
|
4300
4809
|
if (count <= 7) {
|
|
4301
4810
|
return Array.from({ length: count }, (_, i) => i + 1);
|
|
@@ -4316,7 +4825,7 @@ function Pagination2({
|
|
|
4316
4825
|
className,
|
|
4317
4826
|
style
|
|
4318
4827
|
}) {
|
|
4319
|
-
const [innerPage, setInnerPage] = (0,
|
|
4828
|
+
const [innerPage, setInnerPage] = (0, import_react17.useState)(1);
|
|
4320
4829
|
const pageCount = Math.max(1, Math.ceil(total / Math.max(1, pageSize)));
|
|
4321
4830
|
const current = Math.min(Math.max(1, page ?? innerPage), pageCount);
|
|
4322
4831
|
const goTo = (next) => {
|
|
@@ -4329,8 +4838,8 @@ function Pagination2({
|
|
|
4329
4838
|
}
|
|
4330
4839
|
onChange?.(target);
|
|
4331
4840
|
};
|
|
4332
|
-
return /* @__PURE__ */ (0,
|
|
4333
|
-
/* @__PURE__ */ (0,
|
|
4841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Pagination, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(PaginationContent, { children: [
|
|
4842
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4334
4843
|
PaginationPrevious,
|
|
4335
4844
|
{
|
|
4336
4845
|
href: "#",
|
|
@@ -4341,7 +4850,7 @@ function Pagination2({
|
|
|
4341
4850
|
}
|
|
4342
4851
|
}
|
|
4343
4852
|
) }),
|
|
4344
|
-
pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ (0,
|
|
4853
|
+
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
4854
|
PaginationLink,
|
|
4346
4855
|
{
|
|
4347
4856
|
href: "#",
|
|
@@ -4353,7 +4862,7 @@ function Pagination2({
|
|
|
4353
4862
|
children: item
|
|
4354
4863
|
}
|
|
4355
4864
|
) }, item === "ellipsis" ? `ellipsis-${index}` : item)),
|
|
4356
|
-
/* @__PURE__ */ (0,
|
|
4865
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4357
4866
|
PaginationNext,
|
|
4358
4867
|
{
|
|
4359
4868
|
href: "#",
|
|
@@ -4368,15 +4877,15 @@ function Pagination2({
|
|
|
4368
4877
|
}
|
|
4369
4878
|
|
|
4370
4879
|
// src/components/components/Popover/index.tsx
|
|
4371
|
-
var
|
|
4372
|
-
var
|
|
4880
|
+
var import_runtime14 = require("@pactor-app/runtime");
|
|
4881
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4373
4882
|
function isDslNode3(value) {
|
|
4374
4883
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
4375
4884
|
}
|
|
4376
4885
|
function Popover2({ content, children, className, style }) {
|
|
4377
|
-
const { renderChildren } = (0,
|
|
4378
|
-
return /* @__PURE__ */ (0,
|
|
4379
|
-
/* @__PURE__ */ (0,
|
|
4886
|
+
const { renderChildren } = (0, import_runtime14.useRenderer)();
|
|
4887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(Popover, { children: [
|
|
4888
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4380
4889
|
PopoverTrigger,
|
|
4381
4890
|
{
|
|
4382
4891
|
nativeButton: false,
|
|
@@ -4384,15 +4893,15 @@ function Popover2({ content, children, className, style }) {
|
|
|
4384
4893
|
children
|
|
4385
4894
|
}
|
|
4386
4895
|
),
|
|
4387
|
-
/* @__PURE__ */ (0,
|
|
4896
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PopoverContent, { className, style, children: isDslNode3(content) ? renderChildren([content]) : content })
|
|
4388
4897
|
] });
|
|
4389
4898
|
}
|
|
4390
4899
|
|
|
4391
4900
|
// src/ui/progress.tsx
|
|
4392
4901
|
var import_progress = require("@base-ui/react/progress");
|
|
4393
|
-
var
|
|
4902
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4394
4903
|
function Progress({ className, ...props }) {
|
|
4395
|
-
return /* @__PURE__ */ (0,
|
|
4904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4396
4905
|
import_progress.Progress.Root,
|
|
4397
4906
|
{
|
|
4398
4907
|
"data-slot": "progress",
|
|
@@ -4402,7 +4911,7 @@ function Progress({ className, ...props }) {
|
|
|
4402
4911
|
);
|
|
4403
4912
|
}
|
|
4404
4913
|
function ProgressTrack({ className, ...props }) {
|
|
4405
|
-
return /* @__PURE__ */ (0,
|
|
4914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4406
4915
|
import_progress.Progress.Track,
|
|
4407
4916
|
{
|
|
4408
4917
|
"data-slot": "progress-track",
|
|
@@ -4415,7 +4924,7 @@ function ProgressIndicator({
|
|
|
4415
4924
|
className,
|
|
4416
4925
|
...props
|
|
4417
4926
|
}) {
|
|
4418
|
-
return /* @__PURE__ */ (0,
|
|
4927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4419
4928
|
import_progress.Progress.Indicator,
|
|
4420
4929
|
{
|
|
4421
4930
|
"data-slot": "progress-indicator",
|
|
@@ -4429,21 +4938,21 @@ function ProgressIndicator({
|
|
|
4429
4938
|
}
|
|
4430
4939
|
|
|
4431
4940
|
// src/components/components/Progress/index.tsx
|
|
4432
|
-
var
|
|
4941
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4433
4942
|
function Progress2({ value, className, style }) {
|
|
4434
4943
|
const resolved = typeof value === "number" && Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : null;
|
|
4435
|
-
return /* @__PURE__ */ (0,
|
|
4944
|
+
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
4945
|
}
|
|
4437
4946
|
|
|
4438
4947
|
// src/components/components/RadioGroup/index.tsx
|
|
4439
|
-
var
|
|
4948
|
+
var import_react18 = require("react");
|
|
4440
4949
|
|
|
4441
4950
|
// src/ui/radio-group.tsx
|
|
4442
4951
|
var import_radio = require("@base-ui/react/radio");
|
|
4443
4952
|
var import_radio_group = require("@base-ui/react/radio-group");
|
|
4444
|
-
var
|
|
4953
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
4445
4954
|
function RadioGroup({ className, ...props }) {
|
|
4446
|
-
return /* @__PURE__ */ (0,
|
|
4955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4447
4956
|
import_radio_group.RadioGroup,
|
|
4448
4957
|
{
|
|
4449
4958
|
"data-slot": "radio-group",
|
|
@@ -4453,7 +4962,7 @@ function RadioGroup({ className, ...props }) {
|
|
|
4453
4962
|
);
|
|
4454
4963
|
}
|
|
4455
4964
|
function RadioGroupItem({ className, ...props }) {
|
|
4456
|
-
return /* @__PURE__ */ (0,
|
|
4965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4457
4966
|
import_radio.Radio.Root,
|
|
4458
4967
|
{
|
|
4459
4968
|
"data-slot": "radio-group-item",
|
|
@@ -4462,12 +4971,12 @@ function RadioGroupItem({ className, ...props }) {
|
|
|
4462
4971
|
className
|
|
4463
4972
|
),
|
|
4464
4973
|
...props,
|
|
4465
|
-
children: /* @__PURE__ */ (0,
|
|
4974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4466
4975
|
import_radio.Radio.Indicator,
|
|
4467
4976
|
{
|
|
4468
4977
|
"data-slot": "radio-group-indicator",
|
|
4469
4978
|
className: "flex items-center justify-center",
|
|
4470
|
-
children: /* @__PURE__ */ (0,
|
|
4979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "size-2 rounded-full bg-primary" })
|
|
4471
4980
|
}
|
|
4472
4981
|
)
|
|
4473
4982
|
}
|
|
@@ -4475,7 +4984,7 @@ function RadioGroupItem({ className, ...props }) {
|
|
|
4475
4984
|
}
|
|
4476
4985
|
|
|
4477
4986
|
// src/components/components/Form/form-item.tsx
|
|
4478
|
-
var
|
|
4987
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
4479
4988
|
function FieldShell({
|
|
4480
4989
|
layout,
|
|
4481
4990
|
label,
|
|
@@ -4485,14 +4994,14 @@ function FieldShell({
|
|
|
4485
4994
|
style,
|
|
4486
4995
|
children
|
|
4487
4996
|
}) {
|
|
4488
|
-
return /* @__PURE__ */ (0,
|
|
4997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
4489
4998
|
"div",
|
|
4490
4999
|
{
|
|
4491
5000
|
"data-slot": "form-item",
|
|
4492
5001
|
className: cn(formItemClass(layout), className),
|
|
4493
5002
|
style,
|
|
4494
5003
|
children: [
|
|
4495
|
-
label ? /* @__PURE__ */ (0,
|
|
5004
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
4496
5005
|
"label",
|
|
4497
5006
|
{
|
|
4498
5007
|
htmlFor,
|
|
@@ -4501,14 +5010,14 @@ function FieldShell({
|
|
|
4501
5010
|
}
|
|
4502
5011
|
) : null,
|
|
4503
5012
|
children,
|
|
4504
|
-
error ? /* @__PURE__ */ (0,
|
|
5013
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4505
5014
|
]
|
|
4506
5015
|
}
|
|
4507
5016
|
);
|
|
4508
5017
|
}
|
|
4509
5018
|
|
|
4510
5019
|
// src/components/components/RadioGroup/index.tsx
|
|
4511
|
-
var
|
|
5020
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4512
5021
|
function RadioGroup2({
|
|
4513
5022
|
name,
|
|
4514
5023
|
label,
|
|
@@ -4521,9 +5030,9 @@ function RadioGroup2({
|
|
|
4521
5030
|
style
|
|
4522
5031
|
}) {
|
|
4523
5032
|
const form = useFormContext();
|
|
4524
|
-
const controlId = (0,
|
|
5033
|
+
const controlId = (0, import_react18.useId)();
|
|
4525
5034
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
4526
|
-
(0,
|
|
5035
|
+
(0, import_react18.useEffect)(() => {
|
|
4527
5036
|
if (inForm && form && name) {
|
|
4528
5037
|
form.registerField(name, rules, value);
|
|
4529
5038
|
return () => form.unregisterField(name);
|
|
@@ -4538,7 +5047,7 @@ function RadioGroup2({
|
|
|
4538
5047
|
onChange?.(next);
|
|
4539
5048
|
};
|
|
4540
5049
|
const groupValue = current ?? "";
|
|
4541
|
-
const group = /* @__PURE__ */ (0,
|
|
5050
|
+
const group = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4542
5051
|
RadioGroup,
|
|
4543
5052
|
{
|
|
4544
5053
|
value: groupValue,
|
|
@@ -4549,8 +5058,8 @@ function RadioGroup2({
|
|
|
4549
5058
|
style: inForm ? void 0 : style,
|
|
4550
5059
|
children: options.map((option, index) => {
|
|
4551
5060
|
const optionId = `${controlId}-${index}`;
|
|
4552
|
-
return /* @__PURE__ */ (0,
|
|
4553
|
-
/* @__PURE__ */ (0,
|
|
5061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
|
|
5062
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4554
5063
|
RadioGroupItem,
|
|
4555
5064
|
{
|
|
4556
5065
|
id: optionId,
|
|
@@ -4558,13 +5067,13 @@ function RadioGroup2({
|
|
|
4558
5067
|
disabled: option.disabled
|
|
4559
5068
|
}
|
|
4560
5069
|
),
|
|
4561
|
-
/* @__PURE__ */ (0,
|
|
5070
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("label", { htmlFor: optionId, className: "text-sm leading-none font-medium", children: option.label })
|
|
4562
5071
|
] }, String(option.value));
|
|
4563
5072
|
})
|
|
4564
5073
|
}
|
|
4565
5074
|
);
|
|
4566
5075
|
if (inForm && form && name) {
|
|
4567
|
-
return /* @__PURE__ */ (0,
|
|
5076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4568
5077
|
FieldShell,
|
|
4569
5078
|
{
|
|
4570
5079
|
layout: form.layout,
|
|
@@ -4580,18 +5089,18 @@ function RadioGroup2({
|
|
|
4580
5089
|
}
|
|
4581
5090
|
|
|
4582
5091
|
// src/components/components/Resizable/index.tsx
|
|
4583
|
-
var
|
|
4584
|
-
var
|
|
5092
|
+
var import_runtime15 = require("@pactor-app/runtime");
|
|
5093
|
+
var import_react19 = require("react");
|
|
4585
5094
|
|
|
4586
5095
|
// src/ui/resizable.tsx
|
|
4587
|
-
var
|
|
5096
|
+
var import_lucide_react20 = require("lucide-react");
|
|
4588
5097
|
var import_react_resizable_panels = require("react-resizable-panels");
|
|
4589
|
-
var
|
|
5098
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
4590
5099
|
function PanelGroup({
|
|
4591
5100
|
className,
|
|
4592
5101
|
...props
|
|
4593
5102
|
}) {
|
|
4594
|
-
return /* @__PURE__ */ (0,
|
|
5103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4595
5104
|
import_react_resizable_panels.Group,
|
|
4596
5105
|
{
|
|
4597
5106
|
"data-slot": "resizable-panel-group",
|
|
@@ -4604,14 +5113,14 @@ function PanelGroup({
|
|
|
4604
5113
|
);
|
|
4605
5114
|
}
|
|
4606
5115
|
function Panel({ ...props }) {
|
|
4607
|
-
return /* @__PURE__ */ (0,
|
|
5116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_resizable_panels.Panel, { "data-slot": "resizable-panel", ...props });
|
|
4608
5117
|
}
|
|
4609
5118
|
function ResizableHandle({
|
|
4610
5119
|
withHandle,
|
|
4611
5120
|
className,
|
|
4612
5121
|
...props
|
|
4613
5122
|
}) {
|
|
4614
|
-
return /* @__PURE__ */ (0,
|
|
5123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4615
5124
|
import_react_resizable_panels.Separator,
|
|
4616
5125
|
{
|
|
4617
5126
|
"data-slot": "resizable-handle",
|
|
@@ -4620,23 +5129,23 @@ function ResizableHandle({
|
|
|
4620
5129
|
className
|
|
4621
5130
|
),
|
|
4622
5131
|
...props,
|
|
4623
|
-
children: withHandle ? /* @__PURE__ */ (0,
|
|
5132
|
+
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
5133
|
}
|
|
4625
5134
|
);
|
|
4626
5135
|
}
|
|
4627
5136
|
|
|
4628
5137
|
// src/components/components/Resizable/index.tsx
|
|
4629
|
-
var
|
|
5138
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
4630
5139
|
function Resizable({
|
|
4631
5140
|
panels = [],
|
|
4632
5141
|
direction = "horizontal",
|
|
4633
5142
|
className,
|
|
4634
5143
|
style
|
|
4635
5144
|
}) {
|
|
4636
|
-
const { renderChildren } = (0,
|
|
4637
|
-
return /* @__PURE__ */ (0,
|
|
4638
|
-
index > 0 ? /* @__PURE__ */ (0,
|
|
4639
|
-
/* @__PURE__ */ (0,
|
|
5145
|
+
const { renderChildren } = (0, import_runtime15.useRenderer)();
|
|
5146
|
+
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: [
|
|
5147
|
+
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ResizableHandle, { withHandle: true }) : null,
|
|
5148
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
4640
5149
|
Panel,
|
|
4641
5150
|
{
|
|
4642
5151
|
defaultSize: typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
|
|
@@ -4648,20 +5157,20 @@ function Resizable({
|
|
|
4648
5157
|
|
|
4649
5158
|
// src/ui/scroll-area.tsx
|
|
4650
5159
|
var import_scroll_area = require("@base-ui/react/scroll-area");
|
|
4651
|
-
var
|
|
5160
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
4652
5161
|
function ScrollArea({
|
|
4653
5162
|
className,
|
|
4654
5163
|
children,
|
|
4655
5164
|
...props
|
|
4656
5165
|
}) {
|
|
4657
|
-
return /* @__PURE__ */ (0,
|
|
5166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
4658
5167
|
import_scroll_area.ScrollArea.Root,
|
|
4659
5168
|
{
|
|
4660
5169
|
"data-slot": "scroll-area",
|
|
4661
5170
|
className: cn("relative overflow-hidden", className),
|
|
4662
5171
|
...props,
|
|
4663
5172
|
children: [
|
|
4664
|
-
/* @__PURE__ */ (0,
|
|
5173
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4665
5174
|
import_scroll_area.ScrollArea.Viewport,
|
|
4666
5175
|
{
|
|
4667
5176
|
"data-slot": "scroll-area-viewport",
|
|
@@ -4669,8 +5178,8 @@ function ScrollArea({
|
|
|
4669
5178
|
children
|
|
4670
5179
|
}
|
|
4671
5180
|
),
|
|
4672
|
-
/* @__PURE__ */ (0,
|
|
4673
|
-
/* @__PURE__ */ (0,
|
|
5181
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ScrollBar, {}),
|
|
5182
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_scroll_area.ScrollArea.Corner, {})
|
|
4674
5183
|
]
|
|
4675
5184
|
}
|
|
4676
5185
|
);
|
|
@@ -4680,7 +5189,7 @@ function ScrollBar({
|
|
|
4680
5189
|
orientation = "vertical",
|
|
4681
5190
|
...props
|
|
4682
5191
|
}) {
|
|
4683
|
-
return /* @__PURE__ */ (0,
|
|
5192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4684
5193
|
import_scroll_area.ScrollArea.Scrollbar,
|
|
4685
5194
|
{
|
|
4686
5195
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -4692,7 +5201,7 @@ function ScrollBar({
|
|
|
4692
5201
|
className
|
|
4693
5202
|
),
|
|
4694
5203
|
...props,
|
|
4695
|
-
children: /* @__PURE__ */ (0,
|
|
5204
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4696
5205
|
import_scroll_area.ScrollArea.Thumb,
|
|
4697
5206
|
{
|
|
4698
5207
|
"data-slot": "scroll-area-thumb",
|
|
@@ -4704,7 +5213,7 @@ function ScrollBar({
|
|
|
4704
5213
|
}
|
|
4705
5214
|
|
|
4706
5215
|
// src/components/components/ScrollArea/index.tsx
|
|
4707
|
-
var
|
|
5216
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
4708
5217
|
function ScrollArea2({
|
|
4709
5218
|
maxHeight,
|
|
4710
5219
|
maxWidth,
|
|
@@ -4712,7 +5221,7 @@ function ScrollArea2({
|
|
|
4712
5221
|
style,
|
|
4713
5222
|
children
|
|
4714
5223
|
}) {
|
|
4715
|
-
return /* @__PURE__ */ (0,
|
|
5224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
4716
5225
|
ScrollArea,
|
|
4717
5226
|
{
|
|
4718
5227
|
className,
|
|
@@ -4723,18 +5232,18 @@ function ScrollArea2({
|
|
|
4723
5232
|
}
|
|
4724
5233
|
|
|
4725
5234
|
// src/components/components/Select/index.tsx
|
|
4726
|
-
var
|
|
4727
|
-
var
|
|
5235
|
+
var import_runtime16 = require("@pactor-app/runtime");
|
|
5236
|
+
var import_react20 = require("react");
|
|
4728
5237
|
|
|
4729
5238
|
// src/ui/select.tsx
|
|
4730
5239
|
var import_select = require("@base-ui/react/select");
|
|
4731
|
-
var
|
|
4732
|
-
var
|
|
5240
|
+
var import_lucide_react21 = require("lucide-react");
|
|
5241
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
4733
5242
|
var Select = import_select.Select.Root;
|
|
4734
5243
|
function SelectValue({
|
|
4735
5244
|
...props
|
|
4736
5245
|
}) {
|
|
4737
|
-
return /* @__PURE__ */ (0,
|
|
5246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.Value, { "data-slot": "select-value", ...props });
|
|
4738
5247
|
}
|
|
4739
5248
|
function SelectTrigger({
|
|
4740
5249
|
className,
|
|
@@ -4742,7 +5251,7 @@ function SelectTrigger({
|
|
|
4742
5251
|
children,
|
|
4743
5252
|
...props
|
|
4744
5253
|
}) {
|
|
4745
|
-
return /* @__PURE__ */ (0,
|
|
5254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
4746
5255
|
import_select.Select.Trigger,
|
|
4747
5256
|
{
|
|
4748
5257
|
"data-slot": "select-trigger",
|
|
@@ -4754,10 +5263,10 @@ function SelectTrigger({
|
|
|
4754
5263
|
...props,
|
|
4755
5264
|
children: [
|
|
4756
5265
|
children,
|
|
4757
|
-
/* @__PURE__ */ (0,
|
|
5266
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
4758
5267
|
import_select.Select.Icon,
|
|
4759
5268
|
{
|
|
4760
|
-
render: /* @__PURE__ */ (0,
|
|
5269
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
4761
5270
|
}
|
|
4762
5271
|
)
|
|
4763
5272
|
]
|
|
@@ -4773,7 +5282,7 @@ function SelectContent({
|
|
|
4773
5282
|
alignItemWithTrigger = false,
|
|
4774
5283
|
...props
|
|
4775
5284
|
}) {
|
|
4776
|
-
return /* @__PURE__ */ (0,
|
|
5285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
4777
5286
|
import_select.Select.Positioner,
|
|
4778
5287
|
{
|
|
4779
5288
|
side,
|
|
@@ -4781,7 +5290,7 @@ function SelectContent({
|
|
|
4781
5290
|
align,
|
|
4782
5291
|
alignItemWithTrigger,
|
|
4783
5292
|
className: "isolate z-50",
|
|
4784
|
-
children: /* @__PURE__ */ (0,
|
|
5293
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
4785
5294
|
import_select.Select.Popup,
|
|
4786
5295
|
{
|
|
4787
5296
|
"data-slot": "select-content",
|
|
@@ -4791,9 +5300,9 @@ function SelectContent({
|
|
|
4791
5300
|
),
|
|
4792
5301
|
...props,
|
|
4793
5302
|
children: [
|
|
4794
|
-
/* @__PURE__ */ (0,
|
|
4795
|
-
/* @__PURE__ */ (0,
|
|
4796
|
-
/* @__PURE__ */ (0,
|
|
5303
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollUpButton, {}),
|
|
5304
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.List, { className: "p-1", children }),
|
|
5305
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollDownButton, {})
|
|
4797
5306
|
]
|
|
4798
5307
|
}
|
|
4799
5308
|
)
|
|
@@ -4805,7 +5314,7 @@ function SelectItem({
|
|
|
4805
5314
|
children,
|
|
4806
5315
|
...props
|
|
4807
5316
|
}) {
|
|
4808
|
-
return /* @__PURE__ */ (0,
|
|
5317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
4809
5318
|
import_select.Select.Item,
|
|
4810
5319
|
{
|
|
4811
5320
|
"data-slot": "select-item",
|
|
@@ -4815,8 +5324,8 @@ function SelectItem({
|
|
|
4815
5324
|
),
|
|
4816
5325
|
...props,
|
|
4817
5326
|
children: [
|
|
4818
|
-
/* @__PURE__ */ (0,
|
|
4819
|
-
/* @__PURE__ */ (0,
|
|
5327
|
+
/* @__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" }) }) }),
|
|
5328
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.ItemText, { children })
|
|
4820
5329
|
]
|
|
4821
5330
|
}
|
|
4822
5331
|
);
|
|
@@ -4825,7 +5334,7 @@ function SelectScrollUpButton({
|
|
|
4825
5334
|
className,
|
|
4826
5335
|
...props
|
|
4827
5336
|
}) {
|
|
4828
|
-
return /* @__PURE__ */ (0,
|
|
5337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
4829
5338
|
import_select.Select.ScrollUpArrow,
|
|
4830
5339
|
{
|
|
4831
5340
|
"data-slot": "select-scroll-up-button",
|
|
@@ -4834,7 +5343,7 @@ function SelectScrollUpButton({
|
|
|
4834
5343
|
className
|
|
4835
5344
|
),
|
|
4836
5345
|
...props,
|
|
4837
|
-
children: /* @__PURE__ */ (0,
|
|
5346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronUpIcon, { className: "size-4" })
|
|
4838
5347
|
}
|
|
4839
5348
|
);
|
|
4840
5349
|
}
|
|
@@ -4842,7 +5351,7 @@ function SelectScrollDownButton({
|
|
|
4842
5351
|
className,
|
|
4843
5352
|
...props
|
|
4844
5353
|
}) {
|
|
4845
|
-
return /* @__PURE__ */ (0,
|
|
5354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
4846
5355
|
import_select.Select.ScrollDownArrow,
|
|
4847
5356
|
{
|
|
4848
5357
|
"data-slot": "select-scroll-down-button",
|
|
@@ -4851,13 +5360,13 @@ function SelectScrollDownButton({
|
|
|
4851
5360
|
className
|
|
4852
5361
|
),
|
|
4853
5362
|
...props,
|
|
4854
|
-
children: /* @__PURE__ */ (0,
|
|
5363
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4" })
|
|
4855
5364
|
}
|
|
4856
5365
|
);
|
|
4857
5366
|
}
|
|
4858
5367
|
|
|
4859
5368
|
// src/components/components/Select/index.tsx
|
|
4860
|
-
var
|
|
5369
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
4861
5370
|
function Select2({
|
|
4862
5371
|
name,
|
|
4863
5372
|
label,
|
|
@@ -4872,10 +5381,10 @@ function Select2({
|
|
|
4872
5381
|
style
|
|
4873
5382
|
}) {
|
|
4874
5383
|
const form = useFormContext();
|
|
4875
|
-
const { t } = (0,
|
|
4876
|
-
const controlId = (0,
|
|
5384
|
+
const { t } = (0, import_runtime16.useI18n)();
|
|
5385
|
+
const controlId = (0, import_react20.useId)();
|
|
4877
5386
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
4878
|
-
(0,
|
|
5387
|
+
(0, import_react20.useEffect)(() => {
|
|
4879
5388
|
if (inForm && form && name) {
|
|
4880
5389
|
form.registerField(name, rules, value);
|
|
4881
5390
|
return () => form.unregisterField(name);
|
|
@@ -4891,13 +5400,13 @@ function Select2({
|
|
|
4891
5400
|
onChange?.(next ?? void 0);
|
|
4892
5401
|
};
|
|
4893
5402
|
const inFormRoot = inForm === true;
|
|
4894
|
-
const select = /* @__PURE__ */ (0,
|
|
5403
|
+
const select = /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
4895
5404
|
"span",
|
|
4896
5405
|
{
|
|
4897
5406
|
className: cn("inline-flex items-center gap-1", !inFormRoot && className),
|
|
4898
5407
|
style: inFormRoot ? void 0 : style,
|
|
4899
5408
|
children: [
|
|
4900
|
-
/* @__PURE__ */ (0,
|
|
5409
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
4901
5410
|
Select,
|
|
4902
5411
|
{
|
|
4903
5412
|
items: options,
|
|
@@ -4906,8 +5415,8 @@ function Select2({
|
|
|
4906
5415
|
disabled,
|
|
4907
5416
|
name: inForm ? name : void 0,
|
|
4908
5417
|
children: [
|
|
4909
|
-
/* @__PURE__ */ (0,
|
|
4910
|
-
/* @__PURE__ */ (0,
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectTrigger, { id: controlId, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectValue, { placeholder }) }),
|
|
5419
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
4911
5420
|
SelectItem,
|
|
4912
5421
|
{
|
|
4913
5422
|
value: option.value,
|
|
@@ -4919,7 +5428,7 @@ function Select2({
|
|
|
4919
5428
|
]
|
|
4920
5429
|
}
|
|
4921
5430
|
),
|
|
4922
|
-
allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ (0,
|
|
5431
|
+
allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
4923
5432
|
"button",
|
|
4924
5433
|
{
|
|
4925
5434
|
type: "button",
|
|
@@ -4939,14 +5448,14 @@ function Select2({
|
|
|
4939
5448
|
);
|
|
4940
5449
|
if (inForm && form && name) {
|
|
4941
5450
|
const error = form.errors[name];
|
|
4942
|
-
return /* @__PURE__ */ (0,
|
|
5451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
4943
5452
|
"div",
|
|
4944
5453
|
{
|
|
4945
5454
|
"data-slot": "form-item",
|
|
4946
5455
|
className: cn(formItemClass(form.layout), className),
|
|
4947
5456
|
style,
|
|
4948
5457
|
children: [
|
|
4949
|
-
label ? /* @__PURE__ */ (0,
|
|
5458
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
4950
5459
|
"label",
|
|
4951
5460
|
{
|
|
4952
5461
|
htmlFor: controlId,
|
|
@@ -4955,7 +5464,7 @@ function Select2({
|
|
|
4955
5464
|
}
|
|
4956
5465
|
) : null,
|
|
4957
5466
|
select,
|
|
4958
|
-
error ? /* @__PURE__ */ (0,
|
|
5467
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
4959
5468
|
]
|
|
4960
5469
|
}
|
|
4961
5470
|
);
|
|
@@ -4965,14 +5474,14 @@ function Select2({
|
|
|
4965
5474
|
|
|
4966
5475
|
// src/ui/separator.tsx
|
|
4967
5476
|
var import_separator = require("@base-ui/react/separator");
|
|
4968
|
-
var
|
|
5477
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
4969
5478
|
function Separator({
|
|
4970
5479
|
className,
|
|
4971
5480
|
orientation = "horizontal",
|
|
4972
5481
|
decorative: _decorative,
|
|
4973
5482
|
...props
|
|
4974
5483
|
}) {
|
|
4975
|
-
return /* @__PURE__ */ (0,
|
|
5484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
4976
5485
|
import_separator.Separator,
|
|
4977
5486
|
{
|
|
4978
5487
|
"data-slot": "separator",
|
|
@@ -4987,31 +5496,31 @@ function Separator({
|
|
|
4987
5496
|
}
|
|
4988
5497
|
|
|
4989
5498
|
// src/components/components/Separator/index.tsx
|
|
4990
|
-
var
|
|
5499
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
4991
5500
|
function Separator2({ orientation = "horizontal", className, style }) {
|
|
4992
|
-
return /* @__PURE__ */ (0,
|
|
5501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Separator, { orientation, className, style });
|
|
4993
5502
|
}
|
|
4994
5503
|
|
|
4995
5504
|
// src/ui/sheet.tsx
|
|
4996
5505
|
var import_dialog3 = require("@base-ui/react/dialog");
|
|
4997
|
-
var
|
|
5506
|
+
var import_lucide_react22 = require("lucide-react");
|
|
4998
5507
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
4999
|
-
var
|
|
5508
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
5000
5509
|
function Sheet({
|
|
5001
5510
|
...props
|
|
5002
5511
|
}) {
|
|
5003
|
-
return /* @__PURE__ */ (0,
|
|
5512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_dialog3.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
5004
5513
|
}
|
|
5005
5514
|
function SheetPortal({
|
|
5006
5515
|
...props
|
|
5007
5516
|
}) {
|
|
5008
|
-
return /* @__PURE__ */ (0,
|
|
5517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_dialog3.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
5009
5518
|
}
|
|
5010
5519
|
function SheetOverlay({
|
|
5011
5520
|
className,
|
|
5012
5521
|
...props
|
|
5013
5522
|
}) {
|
|
5014
|
-
return /* @__PURE__ */ (0,
|
|
5523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5015
5524
|
import_dialog3.Dialog.Backdrop,
|
|
5016
5525
|
{
|
|
5017
5526
|
"data-slot": "sheet-overlay",
|
|
@@ -5045,9 +5554,9 @@ function SheetContent({
|
|
|
5045
5554
|
side = "right",
|
|
5046
5555
|
...props
|
|
5047
5556
|
}) {
|
|
5048
|
-
return /* @__PURE__ */ (0,
|
|
5049
|
-
/* @__PURE__ */ (0,
|
|
5050
|
-
/* @__PURE__ */ (0,
|
|
5557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(SheetPortal, { "data-slot": "sheet-portal", children: [
|
|
5558
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(SheetOverlay, {}),
|
|
5559
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
5051
5560
|
import_dialog3.Dialog.Popup,
|
|
5052
5561
|
{
|
|
5053
5562
|
"data-slot": "sheet-content",
|
|
@@ -5055,11 +5564,11 @@ function SheetContent({
|
|
|
5055
5564
|
...props,
|
|
5056
5565
|
children: [
|
|
5057
5566
|
children,
|
|
5058
|
-
/* @__PURE__ */ (0,
|
|
5567
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
5059
5568
|
import_dialog3.Dialog.Close,
|
|
5060
5569
|
{
|
|
5061
5570
|
"data-slot": "sheet-close",
|
|
5062
|
-
render: /* @__PURE__ */ (0,
|
|
5571
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5063
5572
|
"button",
|
|
5064
5573
|
{
|
|
5065
5574
|
type: "button",
|
|
@@ -5067,8 +5576,8 @@ function SheetContent({
|
|
|
5067
5576
|
}
|
|
5068
5577
|
),
|
|
5069
5578
|
children: [
|
|
5070
|
-
/* @__PURE__ */ (0,
|
|
5071
|
-
/* @__PURE__ */ (0,
|
|
5579
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react22.XIcon, {}),
|
|
5580
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "sr-only", children: "Close" })
|
|
5072
5581
|
]
|
|
5073
5582
|
}
|
|
5074
5583
|
)
|
|
@@ -5078,7 +5587,7 @@ function SheetContent({
|
|
|
5078
5587
|
] });
|
|
5079
5588
|
}
|
|
5080
5589
|
function SheetHeader({ className, ...props }) {
|
|
5081
|
-
return /* @__PURE__ */ (0,
|
|
5590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5082
5591
|
"div",
|
|
5083
5592
|
{
|
|
5084
5593
|
"data-slot": "sheet-header",
|
|
@@ -5091,7 +5600,7 @@ function SheetTitle({
|
|
|
5091
5600
|
className,
|
|
5092
5601
|
...props
|
|
5093
5602
|
}) {
|
|
5094
|
-
return /* @__PURE__ */ (0,
|
|
5603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5095
5604
|
import_dialog3.Dialog.Title,
|
|
5096
5605
|
{
|
|
5097
5606
|
"data-slot": "sheet-title",
|
|
@@ -5102,7 +5611,7 @@ function SheetTitle({
|
|
|
5102
5611
|
}
|
|
5103
5612
|
|
|
5104
5613
|
// src/components/components/Sheet/index.tsx
|
|
5105
|
-
var
|
|
5614
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
5106
5615
|
function Sheet2({
|
|
5107
5616
|
title,
|
|
5108
5617
|
open,
|
|
@@ -5112,7 +5621,7 @@ function Sheet2({
|
|
|
5112
5621
|
className,
|
|
5113
5622
|
style
|
|
5114
5623
|
}) {
|
|
5115
|
-
return /* @__PURE__ */ (0,
|
|
5624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
5116
5625
|
Sheet,
|
|
5117
5626
|
{
|
|
5118
5627
|
open: open ?? false,
|
|
@@ -5121,128 +5630,17 @@ function Sheet2({
|
|
|
5121
5630
|
onClose?.();
|
|
5122
5631
|
}
|
|
5123
5632
|
},
|
|
5124
|
-
children: /* @__PURE__ */ (0,
|
|
5125
|
-
title ? /* @__PURE__ */ (0,
|
|
5126
|
-
/* @__PURE__ */ (0,
|
|
5633
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(SheetContent, { side, className, style, children: [
|
|
5634
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SheetTitle, { children: title }) }) : null,
|
|
5635
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex-1 overflow-auto px-4", children })
|
|
5127
5636
|
] })
|
|
5128
5637
|
}
|
|
5129
5638
|
);
|
|
5130
5639
|
}
|
|
5131
5640
|
|
|
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
5641
|
// src/components/components/Sider/index.tsx
|
|
5244
|
-
var
|
|
5245
|
-
var
|
|
5642
|
+
var import_lucide_react23 = require("lucide-react");
|
|
5643
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
5246
5644
|
function Sider({
|
|
5247
5645
|
width = 200,
|
|
5248
5646
|
collapsible,
|
|
@@ -5254,7 +5652,7 @@ function Sider({
|
|
|
5254
5652
|
children
|
|
5255
5653
|
}) {
|
|
5256
5654
|
const current = collapsed ? collapsedWidth : width;
|
|
5257
|
-
return /* @__PURE__ */ (0,
|
|
5655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
5258
5656
|
"aside",
|
|
5259
5657
|
{
|
|
5260
5658
|
"data-slot": "layout-sider",
|
|
@@ -5265,15 +5663,15 @@ function Sider({
|
|
|
5265
5663
|
),
|
|
5266
5664
|
style: { width: current, ...style },
|
|
5267
5665
|
children: [
|
|
5268
|
-
/* @__PURE__ */ (0,
|
|
5269
|
-
collapsible ? /* @__PURE__ */ (0,
|
|
5666
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "min-h-0 flex-1 overflow-auto", children }),
|
|
5667
|
+
collapsible ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5270
5668
|
"button",
|
|
5271
5669
|
{
|
|
5272
5670
|
type: "button",
|
|
5273
5671
|
"aria-label": collapsed ? "expand sider" : "collapse sider",
|
|
5274
5672
|
className: "flex h-10 shrink-0 items-center justify-center border-t text-muted-foreground hover:text-foreground",
|
|
5275
5673
|
onClick: () => onCollapse?.(!collapsed),
|
|
5276
|
-
children: collapsed ? /* @__PURE__ */ (0,
|
|
5674
|
+
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
5675
|
}
|
|
5278
5676
|
) : null
|
|
5279
5677
|
]
|
|
@@ -5282,9 +5680,9 @@ function Sider({
|
|
|
5282
5680
|
}
|
|
5283
5681
|
|
|
5284
5682
|
// src/ui/skeleton.tsx
|
|
5285
|
-
var
|
|
5683
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
5286
5684
|
function Skeleton({ className, ...props }) {
|
|
5287
|
-
return /* @__PURE__ */ (0,
|
|
5685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5288
5686
|
"div",
|
|
5289
5687
|
{
|
|
5290
5688
|
"data-slot": "skeleton",
|
|
@@ -5295,7 +5693,7 @@ function Skeleton({ className, ...props }) {
|
|
|
5295
5693
|
}
|
|
5296
5694
|
|
|
5297
5695
|
// src/components/components/Skeleton/index.tsx
|
|
5298
|
-
var
|
|
5696
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
5299
5697
|
var shapeDefaults = {
|
|
5300
5698
|
line: { className: "h-4 w-full", style: {} },
|
|
5301
5699
|
circle: { className: "rounded-full", style: { width: 40, height: 40 } },
|
|
@@ -5306,7 +5704,7 @@ function toSize(value) {
|
|
|
5306
5704
|
}
|
|
5307
5705
|
function Skeleton2({ shape = "line", width, height, className, style }) {
|
|
5308
5706
|
const defaults = shapeDefaults[shape];
|
|
5309
|
-
return /* @__PURE__ */ (0,
|
|
5707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
5310
5708
|
Skeleton,
|
|
5311
5709
|
{
|
|
5312
5710
|
className: cn(defaults.className, className),
|
|
@@ -5321,13 +5719,13 @@ function Skeleton2({ shape = "line", width, height, className, style }) {
|
|
|
5321
5719
|
}
|
|
5322
5720
|
|
|
5323
5721
|
// src/components/components/Slider/index.tsx
|
|
5324
|
-
var
|
|
5722
|
+
var import_react21 = require("react");
|
|
5325
5723
|
|
|
5326
5724
|
// src/ui/slider.tsx
|
|
5327
5725
|
var import_slider = require("@base-ui/react/slider");
|
|
5328
|
-
var
|
|
5726
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
5329
5727
|
function Slider({ className, ...props }) {
|
|
5330
|
-
return /* @__PURE__ */ (0,
|
|
5728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5331
5729
|
import_slider.Slider.Root,
|
|
5332
5730
|
{
|
|
5333
5731
|
"data-slot": "slider",
|
|
@@ -5340,7 +5738,7 @@ function Slider({ className, ...props }) {
|
|
|
5340
5738
|
);
|
|
5341
5739
|
}
|
|
5342
5740
|
function SliderControl({ className, ...props }) {
|
|
5343
|
-
return /* @__PURE__ */ (0,
|
|
5741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5344
5742
|
import_slider.Slider.Control,
|
|
5345
5743
|
{
|
|
5346
5744
|
"data-slot": "slider-control",
|
|
@@ -5350,7 +5748,7 @@ function SliderControl({ className, ...props }) {
|
|
|
5350
5748
|
);
|
|
5351
5749
|
}
|
|
5352
5750
|
function SliderTrack({ className, ...props }) {
|
|
5353
|
-
return /* @__PURE__ */ (0,
|
|
5751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5354
5752
|
import_slider.Slider.Track,
|
|
5355
5753
|
{
|
|
5356
5754
|
"data-slot": "slider-track",
|
|
@@ -5363,7 +5761,7 @@ function SliderTrack({ className, ...props }) {
|
|
|
5363
5761
|
);
|
|
5364
5762
|
}
|
|
5365
5763
|
function SliderIndicator({ className, ...props }) {
|
|
5366
|
-
return /* @__PURE__ */ (0,
|
|
5764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5367
5765
|
import_slider.Slider.Indicator,
|
|
5368
5766
|
{
|
|
5369
5767
|
"data-slot": "slider-indicator",
|
|
@@ -5373,7 +5771,7 @@ function SliderIndicator({ className, ...props }) {
|
|
|
5373
5771
|
);
|
|
5374
5772
|
}
|
|
5375
5773
|
function SliderThumb({ className, ...props }) {
|
|
5376
|
-
return /* @__PURE__ */ (0,
|
|
5774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5377
5775
|
import_slider.Slider.Thumb,
|
|
5378
5776
|
{
|
|
5379
5777
|
"data-slot": "slider-thumb",
|
|
@@ -5387,7 +5785,7 @@ function SliderThumb({ className, ...props }) {
|
|
|
5387
5785
|
}
|
|
5388
5786
|
|
|
5389
5787
|
// src/components/components/Slider/index.tsx
|
|
5390
|
-
var
|
|
5788
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
5391
5789
|
function Slider2({
|
|
5392
5790
|
name,
|
|
5393
5791
|
label,
|
|
@@ -5403,7 +5801,7 @@ function Slider2({
|
|
|
5403
5801
|
}) {
|
|
5404
5802
|
const form = useFormContext();
|
|
5405
5803
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
5406
|
-
(0,
|
|
5804
|
+
(0, import_react21.useEffect)(() => {
|
|
5407
5805
|
if (inForm && form && name) {
|
|
5408
5806
|
form.registerField(name, rules, value);
|
|
5409
5807
|
return () => form.unregisterField(name);
|
|
@@ -5418,7 +5816,7 @@ function Slider2({
|
|
|
5418
5816
|
}
|
|
5419
5817
|
onChange?.(next);
|
|
5420
5818
|
};
|
|
5421
|
-
const slider = /* @__PURE__ */ (0,
|
|
5819
|
+
const slider = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
5422
5820
|
Slider,
|
|
5423
5821
|
{
|
|
5424
5822
|
value: numberValue,
|
|
@@ -5430,14 +5828,14 @@ function Slider2({
|
|
|
5430
5828
|
onValueChange: handleChange,
|
|
5431
5829
|
className: inForm ? void 0 : className,
|
|
5432
5830
|
style: inForm ? void 0 : style,
|
|
5433
|
-
children: /* @__PURE__ */ (0,
|
|
5434
|
-
/* @__PURE__ */ (0,
|
|
5435
|
-
/* @__PURE__ */ (0,
|
|
5831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SliderControl, { children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(SliderTrack, { children: [
|
|
5832
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SliderIndicator, {}),
|
|
5833
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SliderThumb, {})
|
|
5436
5834
|
] }) })
|
|
5437
5835
|
}
|
|
5438
5836
|
);
|
|
5439
5837
|
if (inForm && form && name) {
|
|
5440
|
-
return /* @__PURE__ */ (0,
|
|
5838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
5441
5839
|
FieldShell,
|
|
5442
5840
|
{
|
|
5443
5841
|
layout: form.layout,
|
|
@@ -5453,13 +5851,13 @@ function Slider2({
|
|
|
5453
5851
|
}
|
|
5454
5852
|
|
|
5455
5853
|
// src/components/components/Sonner/index.tsx
|
|
5456
|
-
var
|
|
5457
|
-
var
|
|
5854
|
+
var import_runtime17 = require("@pactor-app/runtime");
|
|
5855
|
+
var import_react22 = require("react");
|
|
5458
5856
|
|
|
5459
5857
|
// src/ui/toast.tsx
|
|
5460
5858
|
var import_toast = require("@base-ui/react/toast");
|
|
5461
|
-
var
|
|
5462
|
-
var
|
|
5859
|
+
var import_lucide_react24 = require("lucide-react");
|
|
5860
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
5463
5861
|
var toastManager = import_toast.Toast.createToastManager();
|
|
5464
5862
|
function toast(message, options = {}) {
|
|
5465
5863
|
return toastManager.add({
|
|
@@ -5475,7 +5873,7 @@ var toastVariantClass = {
|
|
|
5475
5873
|
};
|
|
5476
5874
|
function ToasterViewport({ className }) {
|
|
5477
5875
|
const { toasts } = import_toast.Toast.useToastManager();
|
|
5478
|
-
return /* @__PURE__ */ (0,
|
|
5876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_toast.Toast.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5479
5877
|
import_toast.Toast.Viewport,
|
|
5480
5878
|
{
|
|
5481
5879
|
"data-slot": "toast-viewport",
|
|
@@ -5483,7 +5881,7 @@ function ToasterViewport({ className }) {
|
|
|
5483
5881
|
"fixed top-4 right-4 z-[100] flex w-80 flex-col gap-2 outline-none",
|
|
5484
5882
|
className
|
|
5485
5883
|
),
|
|
5486
|
-
children: toasts.map((item) => /* @__PURE__ */ (0,
|
|
5884
|
+
children: toasts.map((item) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5487
5885
|
import_toast.Toast.Root,
|
|
5488
5886
|
{
|
|
5489
5887
|
toast: item,
|
|
@@ -5493,16 +5891,16 @@ function ToasterViewport({ className }) {
|
|
|
5493
5891
|
"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
5892
|
toastVariantClass[item.type ?? "info"] ?? toastVariantClass.info
|
|
5495
5893
|
),
|
|
5496
|
-
children: /* @__PURE__ */ (0,
|
|
5497
|
-
/* @__PURE__ */ (0,
|
|
5498
|
-
/* @__PURE__ */ (0,
|
|
5894
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_toast.Toast.Content, { className: "flex items-start justify-between gap-2", children: [
|
|
5895
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "grid gap-0.5", children: [
|
|
5896
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5499
5897
|
import_toast.Toast.Title,
|
|
5500
5898
|
{
|
|
5501
5899
|
"data-slot": "toast-title",
|
|
5502
5900
|
className: "font-medium"
|
|
5503
5901
|
}
|
|
5504
5902
|
),
|
|
5505
|
-
/* @__PURE__ */ (0,
|
|
5903
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5506
5904
|
import_toast.Toast.Description,
|
|
5507
5905
|
{
|
|
5508
5906
|
"data-slot": "toast-description",
|
|
@@ -5510,13 +5908,13 @@ function ToasterViewport({ className }) {
|
|
|
5510
5908
|
}
|
|
5511
5909
|
)
|
|
5512
5910
|
] }),
|
|
5513
|
-
/* @__PURE__ */ (0,
|
|
5911
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5514
5912
|
import_toast.Toast.Close,
|
|
5515
5913
|
{
|
|
5516
5914
|
"data-slot": "toast-close",
|
|
5517
5915
|
"aria-label": "Close",
|
|
5518
5916
|
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,
|
|
5917
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react24.XIcon, {})
|
|
5520
5918
|
}
|
|
5521
5919
|
)
|
|
5522
5920
|
] })
|
|
@@ -5527,14 +5925,14 @@ function ToasterViewport({ className }) {
|
|
|
5527
5925
|
) });
|
|
5528
5926
|
}
|
|
5529
5927
|
function Toaster({ className }) {
|
|
5530
|
-
return /* @__PURE__ */ (0,
|
|
5928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_toast.Toast.Provider, { toastManager, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(ToasterViewport, { className }) });
|
|
5531
5929
|
}
|
|
5532
5930
|
|
|
5533
5931
|
// src/components/components/Sonner/index.tsx
|
|
5534
|
-
var
|
|
5932
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
5535
5933
|
function Sonner({ className, style }) {
|
|
5536
|
-
const { context } = (0,
|
|
5537
|
-
(0,
|
|
5934
|
+
const { context } = (0, import_runtime17.useRenderer)();
|
|
5935
|
+
(0, import_react22.useEffect)(() => {
|
|
5538
5936
|
const { actions } = context;
|
|
5539
5937
|
if (actions.has("toast")) {
|
|
5540
5938
|
return;
|
|
@@ -5548,15 +5946,15 @@ function Sonner({ className, style }) {
|
|
|
5548
5946
|
return { ok: true };
|
|
5549
5947
|
});
|
|
5550
5948
|
}, [context]);
|
|
5551
|
-
return /* @__PURE__ */ (0,
|
|
5949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Toaster, {}) });
|
|
5552
5950
|
}
|
|
5553
5951
|
|
|
5554
5952
|
// src/ui/spinner.tsx
|
|
5555
|
-
var
|
|
5556
|
-
var
|
|
5953
|
+
var import_lucide_react25 = require("lucide-react");
|
|
5954
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
5557
5955
|
function Spinner({ className, ...props }) {
|
|
5558
|
-
return /* @__PURE__ */ (0,
|
|
5559
|
-
|
|
5956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
5957
|
+
import_lucide_react25.Loader2Icon,
|
|
5560
5958
|
{
|
|
5561
5959
|
role: "status",
|
|
5562
5960
|
"aria-label": "Loading",
|
|
@@ -5568,37 +5966,37 @@ function Spinner({ className, ...props }) {
|
|
|
5568
5966
|
}
|
|
5569
5967
|
|
|
5570
5968
|
// src/components/components/Spinner/index.tsx
|
|
5571
|
-
var
|
|
5969
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
5572
5970
|
var sizeClass = {
|
|
5573
5971
|
sm: "size-3",
|
|
5574
5972
|
default: "size-4",
|
|
5575
5973
|
lg: "size-6"
|
|
5576
5974
|
};
|
|
5577
5975
|
function Spinner2({ size = "default", className, style }) {
|
|
5578
|
-
return /* @__PURE__ */ (0,
|
|
5976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Spinner, { className: cn(sizeClass[size], className), style });
|
|
5579
5977
|
}
|
|
5580
5978
|
|
|
5581
5979
|
// src/components/components/Statistic/index.tsx
|
|
5582
|
-
var
|
|
5980
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
5583
5981
|
function Statistic({ title, value, precision, suffix, className, style }) {
|
|
5584
5982
|
const display = typeof value === "number" && precision !== void 0 ? value.toFixed(precision) : value;
|
|
5585
|
-
return /* @__PURE__ */ (0,
|
|
5586
|
-
title ? /* @__PURE__ */ (0,
|
|
5587
|
-
/* @__PURE__ */ (0,
|
|
5983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { "data-slot": "statistic", className: cn(className), style, children: [
|
|
5984
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
|
|
5985
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
|
|
5588
5986
|
display,
|
|
5589
|
-
suffix ? /* @__PURE__ */ (0,
|
|
5987
|
+
suffix ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
|
|
5590
5988
|
] })
|
|
5591
5989
|
] });
|
|
5592
5990
|
}
|
|
5593
5991
|
|
|
5594
5992
|
// src/components/components/Switch/index.tsx
|
|
5595
|
-
var
|
|
5993
|
+
var import_react23 = require("react");
|
|
5596
5994
|
|
|
5597
5995
|
// src/ui/switch.tsx
|
|
5598
5996
|
var import_switch = require("@base-ui/react/switch");
|
|
5599
|
-
var
|
|
5997
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
5600
5998
|
function Switch({ className, ...props }) {
|
|
5601
|
-
return /* @__PURE__ */ (0,
|
|
5999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
5602
6000
|
import_switch.Switch.Root,
|
|
5603
6001
|
{
|
|
5604
6002
|
"data-slot": "switch",
|
|
@@ -5607,7 +6005,7 @@ function Switch({ className, ...props }) {
|
|
|
5607
6005
|
className
|
|
5608
6006
|
),
|
|
5609
6007
|
...props,
|
|
5610
|
-
children: /* @__PURE__ */ (0,
|
|
6008
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
5611
6009
|
import_switch.Switch.Thumb,
|
|
5612
6010
|
{
|
|
5613
6011
|
"data-slot": "switch-thumb",
|
|
@@ -5619,7 +6017,7 @@ function Switch({ className, ...props }) {
|
|
|
5619
6017
|
}
|
|
5620
6018
|
|
|
5621
6019
|
// src/components/components/Switch/index.tsx
|
|
5622
|
-
var
|
|
6020
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
5623
6021
|
function Switch2({
|
|
5624
6022
|
name,
|
|
5625
6023
|
label,
|
|
@@ -5631,9 +6029,9 @@ function Switch2({
|
|
|
5631
6029
|
style
|
|
5632
6030
|
}) {
|
|
5633
6031
|
const form = useFormContext();
|
|
5634
|
-
const controlId = (0,
|
|
6032
|
+
const controlId = (0, import_react23.useId)();
|
|
5635
6033
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
5636
|
-
(0,
|
|
6034
|
+
(0, import_react23.useEffect)(() => {
|
|
5637
6035
|
if (inForm && form && name) {
|
|
5638
6036
|
form.registerField(name, rules, value);
|
|
5639
6037
|
return () => form.unregisterField(name);
|
|
@@ -5648,13 +6046,13 @@ function Switch2({
|
|
|
5648
6046
|
}
|
|
5649
6047
|
onChange?.(next);
|
|
5650
6048
|
};
|
|
5651
|
-
const control = /* @__PURE__ */ (0,
|
|
6049
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
5652
6050
|
"span",
|
|
5653
6051
|
{
|
|
5654
6052
|
className: cn("inline-flex items-center gap-2", !inForm && className),
|
|
5655
6053
|
style: inForm ? void 0 : style,
|
|
5656
6054
|
children: [
|
|
5657
|
-
/* @__PURE__ */ (0,
|
|
6055
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
5658
6056
|
Switch,
|
|
5659
6057
|
{
|
|
5660
6058
|
id: controlId,
|
|
@@ -5664,12 +6062,12 @@ function Switch2({
|
|
|
5664
6062
|
onCheckedChange: handleChange
|
|
5665
6063
|
}
|
|
5666
6064
|
),
|
|
5667
|
-
label ? /* @__PURE__ */ (0,
|
|
6065
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
|
|
5668
6066
|
]
|
|
5669
6067
|
}
|
|
5670
6068
|
);
|
|
5671
6069
|
if (inForm && form && name) {
|
|
5672
|
-
return /* @__PURE__ */ (0,
|
|
6070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
5673
6071
|
"div",
|
|
5674
6072
|
{
|
|
5675
6073
|
"data-slot": "form-item",
|
|
@@ -5677,7 +6075,7 @@ function Switch2({
|
|
|
5677
6075
|
style,
|
|
5678
6076
|
children: [
|
|
5679
6077
|
control,
|
|
5680
|
-
form.errors[name] ? /* @__PURE__ */ (0,
|
|
6078
|
+
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
6079
|
]
|
|
5682
6080
|
}
|
|
5683
6081
|
);
|
|
@@ -5686,9 +6084,9 @@ function Switch2({
|
|
|
5686
6084
|
}
|
|
5687
6085
|
|
|
5688
6086
|
// src/components/components/Table/index.tsx
|
|
5689
|
-
var
|
|
5690
|
-
var
|
|
5691
|
-
var
|
|
6087
|
+
var import_runtime18 = require("@pactor-app/runtime");
|
|
6088
|
+
var import_react24 = require("react");
|
|
6089
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
5692
6090
|
function renderCellValue2(value) {
|
|
5693
6091
|
if (value === void 0 || value === null) {
|
|
5694
6092
|
return "";
|
|
@@ -5708,9 +6106,9 @@ function Table3({
|
|
|
5708
6106
|
className,
|
|
5709
6107
|
style
|
|
5710
6108
|
}) {
|
|
5711
|
-
const { renderChildren } = (0,
|
|
5712
|
-
const { t } = (0,
|
|
5713
|
-
const [current, setCurrent] = (0,
|
|
6109
|
+
const { renderChildren } = (0, import_runtime18.useRenderer)();
|
|
6110
|
+
const { t } = (0, import_runtime18.useI18n)();
|
|
6111
|
+
const [current, setCurrent] = (0, import_react24.useState)(1);
|
|
5714
6112
|
const pageSize = pagination === false ? void 0 : pagination?.pageSize;
|
|
5715
6113
|
const total = dataSource.length;
|
|
5716
6114
|
const pageCount = pageSize !== void 0 && pageSize > 0 ? Math.max(1, Math.ceil(total / pageSize)) : 1;
|
|
@@ -5719,8 +6117,8 @@ function Table3({
|
|
|
5719
6117
|
setCurrent(page);
|
|
5720
6118
|
onChange?.({ current: page, pageSize, total });
|
|
5721
6119
|
};
|
|
5722
|
-
return /* @__PURE__ */ (0,
|
|
5723
|
-
loading ? /* @__PURE__ */ (0,
|
|
6120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { "data-slot": "dsl-table", className: cn("relative", className), style, children: [
|
|
6121
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
5724
6122
|
"div",
|
|
5725
6123
|
{
|
|
5726
6124
|
"data-slot": "table-loading",
|
|
@@ -5728,8 +6126,8 @@ function Table3({
|
|
|
5728
6126
|
children: t("pactor.table.loading")
|
|
5729
6127
|
}
|
|
5730
6128
|
) : null,
|
|
5731
|
-
/* @__PURE__ */ (0,
|
|
5732
|
-
/* @__PURE__ */ (0,
|
|
6129
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Table2, { children: [
|
|
6130
|
+
/* @__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
6131
|
TableHead,
|
|
5734
6132
|
{
|
|
5735
6133
|
style: column.width !== void 0 ? { width: column.width } : void 0,
|
|
@@ -5737,7 +6135,7 @@ function Table3({
|
|
|
5737
6135
|
},
|
|
5738
6136
|
column.dataIndex ?? String(index)
|
|
5739
6137
|
)) }) }),
|
|
5740
|
-
/* @__PURE__ */ (0,
|
|
6138
|
+
/* @__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
6139
|
"div",
|
|
5742
6140
|
{
|
|
5743
6141
|
"data-slot": "table-empty",
|
|
@@ -5746,10 +6144,10 @@ function Table3({
|
|
|
5746
6144
|
}
|
|
5747
6145
|
) }) }) : pageRows.map((row, rowIndex) => {
|
|
5748
6146
|
const key = row[rowKey];
|
|
5749
|
-
return /* @__PURE__ */ (0,
|
|
6147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
5750
6148
|
TableRow,
|
|
5751
6149
|
{
|
|
5752
|
-
children: columns.map((column, columnIndex) => /* @__PURE__ */ (0,
|
|
6150
|
+
children: columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableCell, { children: column.cell ? renderChildren([column.cell], { row, rowIndex }) : renderCellValue2(
|
|
5753
6151
|
column.dataIndex === void 0 ? void 0 : row[column.dataIndex]
|
|
5754
6152
|
) }, column.dataIndex ?? String(columnIndex)))
|
|
5755
6153
|
},
|
|
@@ -5757,8 +6155,8 @@ function Table3({
|
|
|
5757
6155
|
);
|
|
5758
6156
|
}) })
|
|
5759
6157
|
] }),
|
|
5760
|
-
pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0,
|
|
5761
|
-
(page) => /* @__PURE__ */ (0,
|
|
6158
|
+
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(
|
|
6159
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
5762
6160
|
Button,
|
|
5763
6161
|
{
|
|
5764
6162
|
type: "button",
|
|
@@ -5775,16 +6173,16 @@ function Table3({
|
|
|
5775
6173
|
}
|
|
5776
6174
|
|
|
5777
6175
|
// src/components/components/Tabs/index.tsx
|
|
5778
|
-
var
|
|
6176
|
+
var import_runtime19 = require("@pactor-app/runtime");
|
|
5779
6177
|
|
|
5780
6178
|
// src/ui/tabs.tsx
|
|
5781
6179
|
var import_tabs = require("@base-ui/react/tabs");
|
|
5782
|
-
var
|
|
6180
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
5783
6181
|
function Tabs({
|
|
5784
6182
|
className,
|
|
5785
6183
|
...props
|
|
5786
6184
|
}) {
|
|
5787
|
-
return /* @__PURE__ */ (0,
|
|
6185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
5788
6186
|
import_tabs.Tabs.Root,
|
|
5789
6187
|
{
|
|
5790
6188
|
"data-slot": "tabs",
|
|
@@ -5797,7 +6195,7 @@ function TabsList({
|
|
|
5797
6195
|
className,
|
|
5798
6196
|
...props
|
|
5799
6197
|
}) {
|
|
5800
|
-
return /* @__PURE__ */ (0,
|
|
6198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
5801
6199
|
import_tabs.Tabs.List,
|
|
5802
6200
|
{
|
|
5803
6201
|
"data-slot": "tabs-list",
|
|
@@ -5813,7 +6211,7 @@ function TabsTrigger({
|
|
|
5813
6211
|
className,
|
|
5814
6212
|
...props
|
|
5815
6213
|
}) {
|
|
5816
|
-
return /* @__PURE__ */ (0,
|
|
6214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
5817
6215
|
import_tabs.Tabs.Tab,
|
|
5818
6216
|
{
|
|
5819
6217
|
"data-slot": "tabs-trigger",
|
|
@@ -5829,7 +6227,7 @@ function TabsContent({
|
|
|
5829
6227
|
className,
|
|
5830
6228
|
...props
|
|
5831
6229
|
}) {
|
|
5832
|
-
return /* @__PURE__ */ (0,
|
|
6230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
5833
6231
|
import_tabs.Tabs.Panel,
|
|
5834
6232
|
{
|
|
5835
6233
|
"data-slot": "tabs-content",
|
|
@@ -5840,10 +6238,10 @@ function TabsContent({
|
|
|
5840
6238
|
}
|
|
5841
6239
|
|
|
5842
6240
|
// src/components/components/Tabs/index.tsx
|
|
5843
|
-
var
|
|
6241
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
5844
6242
|
function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
5845
|
-
const { renderChildren } = (0,
|
|
5846
|
-
return /* @__PURE__ */ (0,
|
|
6243
|
+
const { renderChildren } = (0, import_runtime19.useRenderer)();
|
|
6244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
5847
6245
|
Tabs,
|
|
5848
6246
|
{
|
|
5849
6247
|
value: activeKey,
|
|
@@ -5852,15 +6250,15 @@ function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
|
5852
6250
|
className,
|
|
5853
6251
|
style,
|
|
5854
6252
|
children: [
|
|
5855
|
-
/* @__PURE__ */ (0,
|
|
5856
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
6253
|
+
/* @__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)) }),
|
|
6254
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
|
|
5857
6255
|
]
|
|
5858
6256
|
}
|
|
5859
6257
|
);
|
|
5860
6258
|
}
|
|
5861
6259
|
|
|
5862
6260
|
// src/components/components/Text/index.tsx
|
|
5863
|
-
var
|
|
6261
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
5864
6262
|
var typeClassMap = {
|
|
5865
6263
|
default: "",
|
|
5866
6264
|
secondary: "text-muted-foreground",
|
|
@@ -5879,7 +6277,7 @@ function Text({
|
|
|
5879
6277
|
style,
|
|
5880
6278
|
children
|
|
5881
6279
|
}) {
|
|
5882
|
-
return /* @__PURE__ */ (0,
|
|
6280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
5883
6281
|
"span",
|
|
5884
6282
|
{
|
|
5885
6283
|
"data-slot": "text",
|
|
@@ -5899,29 +6297,8 @@ function Text({
|
|
|
5899
6297
|
}
|
|
5900
6298
|
|
|
5901
6299
|
// 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");
|
|
6300
|
+
var import_react25 = require("react");
|
|
6301
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
5925
6302
|
function Textarea2({
|
|
5926
6303
|
name,
|
|
5927
6304
|
label,
|
|
@@ -5935,9 +6312,9 @@ function Textarea2({
|
|
|
5935
6312
|
style
|
|
5936
6313
|
}) {
|
|
5937
6314
|
const form = useFormContext();
|
|
5938
|
-
const controlId = (0,
|
|
6315
|
+
const controlId = (0, import_react25.useId)();
|
|
5939
6316
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
5940
|
-
(0,
|
|
6317
|
+
(0, import_react25.useEffect)(() => {
|
|
5941
6318
|
if (inForm && form && name) {
|
|
5942
6319
|
form.registerField(name, rules, value);
|
|
5943
6320
|
return () => form.unregisterField(name);
|
|
@@ -5946,7 +6323,7 @@ function Textarea2({
|
|
|
5946
6323
|
});
|
|
5947
6324
|
if (inForm && form && name) {
|
|
5948
6325
|
const fieldValue = form.values[name];
|
|
5949
|
-
return /* @__PURE__ */ (0,
|
|
6326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5950
6327
|
FieldShell,
|
|
5951
6328
|
{
|
|
5952
6329
|
layout: form.layout,
|
|
@@ -5955,7 +6332,7 @@ function Textarea2({
|
|
|
5955
6332
|
error: form.errors[name],
|
|
5956
6333
|
className,
|
|
5957
6334
|
style,
|
|
5958
|
-
children: /* @__PURE__ */ (0,
|
|
6335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5959
6336
|
Textarea,
|
|
5960
6337
|
{
|
|
5961
6338
|
id: controlId,
|
|
@@ -5972,7 +6349,7 @@ function Textarea2({
|
|
|
5972
6349
|
}
|
|
5973
6350
|
);
|
|
5974
6351
|
}
|
|
5975
|
-
return /* @__PURE__ */ (0,
|
|
6352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5976
6353
|
Textarea,
|
|
5977
6354
|
{
|
|
5978
6355
|
value: value ?? "",
|
|
@@ -5989,7 +6366,7 @@ function Textarea2({
|
|
|
5989
6366
|
// src/ui/toggle.tsx
|
|
5990
6367
|
var import_toggle = require("@base-ui/react/toggle");
|
|
5991
6368
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
5992
|
-
var
|
|
6369
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
5993
6370
|
var toggleVariants = (0, import_class_variance_authority6.cva)(
|
|
5994
6371
|
"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
6372
|
{
|
|
@@ -6016,7 +6393,7 @@ function Toggle({
|
|
|
6016
6393
|
size,
|
|
6017
6394
|
...props
|
|
6018
6395
|
}) {
|
|
6019
|
-
return /* @__PURE__ */ (0,
|
|
6396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
6020
6397
|
import_toggle.Toggle,
|
|
6021
6398
|
{
|
|
6022
6399
|
"data-slot": "toggle",
|
|
@@ -6027,7 +6404,7 @@ function Toggle({
|
|
|
6027
6404
|
}
|
|
6028
6405
|
|
|
6029
6406
|
// src/components/components/Toggle/index.tsx
|
|
6030
|
-
var
|
|
6407
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
6031
6408
|
function Toggle2({
|
|
6032
6409
|
text,
|
|
6033
6410
|
pressed,
|
|
@@ -6038,7 +6415,7 @@ function Toggle2({
|
|
|
6038
6415
|
className,
|
|
6039
6416
|
style
|
|
6040
6417
|
}) {
|
|
6041
|
-
return /* @__PURE__ */ (0,
|
|
6418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
6042
6419
|
Toggle,
|
|
6043
6420
|
{
|
|
6044
6421
|
pressed,
|
|
@@ -6057,7 +6434,7 @@ function Toggle2({
|
|
|
6057
6434
|
var import_toggle3 = require("@base-ui/react/toggle");
|
|
6058
6435
|
var import_toggle_group = require("@base-ui/react/toggle-group");
|
|
6059
6436
|
var React4 = __toESM(require("react"), 1);
|
|
6060
|
-
var
|
|
6437
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
6061
6438
|
var ToggleGroupContext = React4.createContext({
|
|
6062
6439
|
size: "default",
|
|
6063
6440
|
variant: "default"
|
|
@@ -6069,7 +6446,7 @@ function ToggleGroup({
|
|
|
6069
6446
|
children,
|
|
6070
6447
|
...props
|
|
6071
6448
|
}) {
|
|
6072
|
-
return /* @__PURE__ */ (0,
|
|
6449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
6073
6450
|
import_toggle_group.ToggleGroup,
|
|
6074
6451
|
{
|
|
6075
6452
|
"data-slot": "toggle-group",
|
|
@@ -6080,7 +6457,7 @@ function ToggleGroup({
|
|
|
6080
6457
|
className
|
|
6081
6458
|
),
|
|
6082
6459
|
...props,
|
|
6083
|
-
children: /* @__PURE__ */ (0,
|
|
6460
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
6084
6461
|
}
|
|
6085
6462
|
);
|
|
6086
6463
|
}
|
|
@@ -6092,7 +6469,7 @@ function ToggleGroupItem({
|
|
|
6092
6469
|
...props
|
|
6093
6470
|
}) {
|
|
6094
6471
|
const context = React4.useContext(ToggleGroupContext);
|
|
6095
|
-
return /* @__PURE__ */ (0,
|
|
6472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
6096
6473
|
import_toggle3.Toggle,
|
|
6097
6474
|
{
|
|
6098
6475
|
"data-slot": "toggle-group-item",
|
|
@@ -6113,7 +6490,7 @@ function ToggleGroupItem({
|
|
|
6113
6490
|
}
|
|
6114
6491
|
|
|
6115
6492
|
// src/components/components/ToggleGroup/index.tsx
|
|
6116
|
-
var
|
|
6493
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
6117
6494
|
function ToggleGroup2({
|
|
6118
6495
|
options = [],
|
|
6119
6496
|
value,
|
|
@@ -6133,7 +6510,7 @@ function ToggleGroup2({
|
|
|
6133
6510
|
onChange?.(added ?? void 0);
|
|
6134
6511
|
}
|
|
6135
6512
|
};
|
|
6136
|
-
return /* @__PURE__ */ (0,
|
|
6513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
6137
6514
|
ToggleGroup,
|
|
6138
6515
|
{
|
|
6139
6516
|
value: groupValue,
|
|
@@ -6142,7 +6519,7 @@ function ToggleGroup2({
|
|
|
6142
6519
|
onValueChange: (next) => handleChange(next),
|
|
6143
6520
|
className,
|
|
6144
6521
|
style,
|
|
6145
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
6522
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
6146
6523
|
ToggleGroupItem,
|
|
6147
6524
|
{
|
|
6148
6525
|
value: option.value,
|
|
@@ -6155,78 +6532,18 @@ function ToggleGroup2({
|
|
|
6155
6532
|
);
|
|
6156
6533
|
}
|
|
6157
6534
|
|
|
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
6535
|
// src/components/components/Tooltip/index.tsx
|
|
6219
|
-
var
|
|
6536
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
6220
6537
|
function Tooltip3({ content, children, className, style }) {
|
|
6221
|
-
return /* @__PURE__ */ (0,
|
|
6222
|
-
/* @__PURE__ */ (0,
|
|
6223
|
-
/* @__PURE__ */ (0,
|
|
6538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(Tooltip2, { children: [
|
|
6539
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
|
|
6540
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(TooltipContent, { className, style, children: content })
|
|
6224
6541
|
] });
|
|
6225
6542
|
}
|
|
6226
6543
|
|
|
6227
6544
|
// src/ui/typography.tsx
|
|
6228
6545
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
6229
|
-
var
|
|
6546
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
6230
6547
|
var typographyVariants = (0, import_class_variance_authority7.cva)("", {
|
|
6231
6548
|
variants: {
|
|
6232
6549
|
variant: {
|
|
@@ -6262,7 +6579,7 @@ var variantTagMap = {
|
|
|
6262
6579
|
};
|
|
6263
6580
|
function Typography({ className, variant = "p", ...props }) {
|
|
6264
6581
|
const Tag2 = variantTagMap[variant ?? "p"];
|
|
6265
|
-
return /* @__PURE__ */ (0,
|
|
6582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6266
6583
|
Tag2,
|
|
6267
6584
|
{
|
|
6268
6585
|
"data-slot": "typography",
|
|
@@ -6274,14 +6591,14 @@ function Typography({ className, variant = "p", ...props }) {
|
|
|
6274
6591
|
}
|
|
6275
6592
|
|
|
6276
6593
|
// src/components/components/Typography/index.tsx
|
|
6277
|
-
var
|
|
6594
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
6278
6595
|
function Typography2({
|
|
6279
6596
|
variant = "p",
|
|
6280
6597
|
text,
|
|
6281
6598
|
className,
|
|
6282
6599
|
style
|
|
6283
6600
|
}) {
|
|
6284
|
-
return /* @__PURE__ */ (0,
|
|
6601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Typography, { variant, className, style, children: text });
|
|
6285
6602
|
}
|
|
6286
6603
|
|
|
6287
6604
|
// src/components/register.ts
|
|
@@ -6325,6 +6642,7 @@ var shadcnComponents = {
|
|
|
6325
6642
|
Slider: Slider2,
|
|
6326
6643
|
Label: Label2,
|
|
6327
6644
|
Field: Field2,
|
|
6645
|
+
ChatInput,
|
|
6328
6646
|
// 导航类扩展组件
|
|
6329
6647
|
Breadcrumb: Breadcrumb2,
|
|
6330
6648
|
Pagination: Pagination2,
|
|
@@ -6425,6 +6743,7 @@ function createShadcnComponentRegistry() {
|
|
|
6425
6743
|
Popover,
|
|
6426
6744
|
Progress,
|
|
6427
6745
|
RadioGroup,
|
|
6746
|
+
RailTooltip,
|
|
6428
6747
|
Resizable,
|
|
6429
6748
|
ScrollArea,
|
|
6430
6749
|
Select,
|
|
@@ -6450,5 +6769,6 @@ function createShadcnComponentRegistry() {
|
|
|
6450
6769
|
normalizeIconName,
|
|
6451
6770
|
registerShadcnComponents,
|
|
6452
6771
|
shadcnComponents,
|
|
6453
|
-
useFormContext
|
|
6772
|
+
useFormContext,
|
|
6773
|
+
useSidebarDrawer
|
|
6454
6774
|
});
|