@pactor-app/ui 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{chunk-L45CSL6I.js → chunk-7KC6DMKH.js} +3 -3
- package/dist/{chunk-HJPHJKVA.js → chunk-EVGIS2ZE.js} +170 -227
- package/dist/{chunk-F3H23KYG.js → chunk-F42SGQNW.js} +31 -93
- package/dist/chunk-L4Z7MNYY.js +1197 -0
- package/dist/{chunk-LMEJ242M.js → chunk-P54Y23AP.js} +36 -32
- package/dist/{chunk-22TEN3ER.js → chunk-TDVG7MZ5.js} +13 -13
- package/dist/{chunk-Q5NUGUJG.js → chunk-UKA7C3JP.js} +204 -413
- package/dist/chunk-WKJUCGV4.js +78 -0
- package/dist/components/index.cjs +1012 -691
- package/dist/components/index.d.cts +30 -12
- package/dist/components/index.d.ts +30 -12
- package/dist/components/index.js +8 -6
- package/dist/index.cjs +1261 -940
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -8
- package/dist/interaction/index.cjs +10 -6
- package/dist/interaction/index.js +3 -3
- package/dist/layout/index.cjs +695 -265
- package/dist/layout/index.d.cts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +4 -4
- package/dist/ui/index.cjs +1688 -533
- package/dist/ui/index.d.cts +130 -16
- package/dist/ui/index.d.ts +130 -16
- package/dist/ui/index.js +481 -22
- package/package.json +6 -5
- package/styles.css +936 -107
- package/dist/chunk-2LYMCWEJ.js +0 -289
- package/dist/chunk-RQHJBTEU.js +0 -10
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Icon,
|
|
3
3
|
Menu,
|
|
4
4
|
Sidebar
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EVGIS2ZE.js";
|
|
6
6
|
import {
|
|
7
7
|
Alert,
|
|
8
8
|
AlertDescription,
|
|
@@ -71,7 +71,6 @@ import {
|
|
|
71
71
|
HoverCard,
|
|
72
72
|
HoverCardContent,
|
|
73
73
|
HoverCardTrigger,
|
|
74
|
-
Input,
|
|
75
74
|
InputGroup,
|
|
76
75
|
InputOTP,
|
|
77
76
|
InputOTPGroup,
|
|
@@ -116,12 +115,6 @@ import {
|
|
|
116
115
|
SelectItem,
|
|
117
116
|
SelectTrigger,
|
|
118
117
|
SelectValue,
|
|
119
|
-
Separator,
|
|
120
|
-
Sheet,
|
|
121
|
-
SheetContent,
|
|
122
|
-
SheetHeader,
|
|
123
|
-
SheetTitle,
|
|
124
|
-
Skeleton,
|
|
125
118
|
Slider,
|
|
126
119
|
SliderControl,
|
|
127
120
|
SliderIndicator,
|
|
@@ -148,9 +141,8 @@ import {
|
|
|
148
141
|
chartColor,
|
|
149
142
|
navigationMenuTriggerStyle,
|
|
150
143
|
toast
|
|
151
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-UKA7C3JP.js";
|
|
152
145
|
import {
|
|
153
|
-
Button,
|
|
154
146
|
Dialog,
|
|
155
147
|
DialogContent,
|
|
156
148
|
DialogDescription,
|
|
@@ -161,7 +153,7 @@ import {
|
|
|
161
153
|
DrawerContent,
|
|
162
154
|
DrawerHeader,
|
|
163
155
|
DrawerTitle
|
|
164
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-F42SGQNW.js";
|
|
165
157
|
import {
|
|
166
158
|
Accordion,
|
|
167
159
|
AccordionContent,
|
|
@@ -171,16 +163,24 @@ import {
|
|
|
171
163
|
CardContent,
|
|
172
164
|
CardHeader,
|
|
173
165
|
CardTitle,
|
|
166
|
+
Input,
|
|
174
167
|
Popover,
|
|
175
168
|
PopoverContent,
|
|
176
169
|
PopoverTrigger,
|
|
170
|
+
Separator,
|
|
171
|
+
Sheet,
|
|
172
|
+
SheetContent,
|
|
173
|
+
SheetHeader,
|
|
174
|
+
SheetTitle,
|
|
175
|
+
Skeleton,
|
|
177
176
|
Tooltip,
|
|
178
177
|
TooltipContent,
|
|
179
178
|
TooltipTrigger
|
|
180
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-L4Z7MNYY.js";
|
|
181
180
|
import {
|
|
181
|
+
Button,
|
|
182
182
|
cn
|
|
183
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-WKJUCGV4.js";
|
|
184
184
|
|
|
185
185
|
// src/components/register.ts
|
|
186
186
|
import { Registry } from "@pactor-app/core";
|
|
@@ -930,7 +930,7 @@ function ChatInput({
|
|
|
930
930
|
{
|
|
931
931
|
"data-slot": "chat-input",
|
|
932
932
|
className: cn(
|
|
933
|
-
"rounded-xl border border-border bg-
|
|
933
|
+
"rounded-xl border border-border bg-card transition-shadow focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",
|
|
934
934
|
className
|
|
935
935
|
),
|
|
936
936
|
style,
|
|
@@ -1304,9 +1304,9 @@ function Field2({ label, description, error, children, className, style }) {
|
|
|
1304
1304
|
// src/components/components/Flex/index.tsx
|
|
1305
1305
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1306
1306
|
var gapClass = {
|
|
1307
|
-
small: "gap-
|
|
1308
|
-
middle: "gap-
|
|
1309
|
-
large: "gap-
|
|
1307
|
+
small: "gap-(--flex-gap-sm)",
|
|
1308
|
+
middle: "gap-(--flex-gap-md)",
|
|
1309
|
+
large: "gap-(--flex-gap-lg)"
|
|
1310
1310
|
};
|
|
1311
1311
|
var justifyClass = {
|
|
1312
1312
|
start: "justify-start",
|
|
@@ -1339,6 +1339,7 @@ function Flex({
|
|
|
1339
1339
|
className: cn(
|
|
1340
1340
|
"flex",
|
|
1341
1341
|
direction === "vertical" && "flex-col",
|
|
1342
|
+
gap === void 0 && "gap-(--flex-gap)",
|
|
1342
1343
|
typeof gap === "string" && gapClass[gap],
|
|
1343
1344
|
justify && justifyClass[justify],
|
|
1344
1345
|
align && alignClass[align],
|
|
@@ -1479,7 +1480,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
1479
1480
|
{
|
|
1480
1481
|
"data-slot": "grid",
|
|
1481
1482
|
"data-columns": cols,
|
|
1482
|
-
className: cn("grid", className),
|
|
1483
|
+
className: cn("grid", gap === void 0 && "gap-(--grid-gap)", className),
|
|
1483
1484
|
style: {
|
|
1484
1485
|
gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,
|
|
1485
1486
|
...gap !== void 0 ? { gap } : {},
|
|
@@ -1520,7 +1521,7 @@ function Header({
|
|
|
1520
1521
|
const hasLocales = locales !== void 0 && locales.length > 0;
|
|
1521
1522
|
const hasUser = user !== void 0;
|
|
1522
1523
|
const rootClass = cn(
|
|
1523
|
-
"flex h-14 shrink-0 items-center gap-4 border-b bg-
|
|
1524
|
+
"flex h-14 shrink-0 items-center gap-4 border-b bg-card px-4",
|
|
1524
1525
|
className
|
|
1525
1526
|
);
|
|
1526
1527
|
if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales) {
|
|
@@ -1565,7 +1566,7 @@ function HeaderDropdownArea({
|
|
|
1565
1566
|
DropdownMenuTrigger,
|
|
1566
1567
|
{
|
|
1567
1568
|
"data-slot": "header-dropdown",
|
|
1568
|
-
className: cn(menuItemClass, "outline-hidden"),
|
|
1569
|
+
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
1569
1570
|
children: [
|
|
1570
1571
|
dropdown.label,
|
|
1571
1572
|
/* @__PURE__ */ jsx32(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
@@ -1597,7 +1598,7 @@ function HeaderMenuArea({
|
|
|
1597
1598
|
{
|
|
1598
1599
|
"data-slot": "header-menu-item",
|
|
1599
1600
|
"data-key": item.key,
|
|
1600
|
-
className: cn(menuItemClass, "outline-hidden"),
|
|
1601
|
+
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
1601
1602
|
children: [
|
|
1602
1603
|
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1603
1604
|
item.label,
|
|
@@ -1629,7 +1630,7 @@ function HeaderMenuEntry({
|
|
|
1629
1630
|
}) {
|
|
1630
1631
|
if (item.children !== void 0 && item.children.length > 0) {
|
|
1631
1632
|
return /* @__PURE__ */ jsxs23(DropdownMenuSub, { children: [
|
|
1632
|
-
/* @__PURE__ */ jsxs23(DropdownMenuSubTrigger, { "data-key": item.key, children: [
|
|
1633
|
+
/* @__PURE__ */ jsxs23(DropdownMenuSubTrigger, { "data-key": item.key, className: "cursor-pointer", children: [
|
|
1633
1634
|
item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
|
|
1634
1635
|
item.label
|
|
1635
1636
|
] }),
|
|
@@ -1660,7 +1661,7 @@ function HeaderUserArea({
|
|
|
1660
1661
|
DropdownMenuTrigger,
|
|
1661
1662
|
{
|
|
1662
1663
|
"data-slot": "header-user",
|
|
1663
|
-
className: "flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors outline-hidden hover:bg-accent/50",
|
|
1664
|
+
className: "flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors outline-hidden hover:bg-accent/50 cursor-pointer",
|
|
1664
1665
|
children: identity
|
|
1665
1666
|
}
|
|
1666
1667
|
),
|
|
@@ -1681,7 +1682,7 @@ function HeaderLocalesArea({
|
|
|
1681
1682
|
DropdownMenuTrigger,
|
|
1682
1683
|
{
|
|
1683
1684
|
"data-slot": "header-locales",
|
|
1684
|
-
className: cn(menuItemClass, "outline-hidden"),
|
|
1685
|
+
className: cn(menuItemClass, "outline-hidden cursor-pointer"),
|
|
1685
1686
|
children: [
|
|
1686
1687
|
current?.label ?? locale,
|
|
1687
1688
|
/* @__PURE__ */ jsx32(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
@@ -2247,7 +2248,9 @@ function Resizable({
|
|
|
2247
2248
|
/* @__PURE__ */ jsx50(
|
|
2248
2249
|
Panel,
|
|
2249
2250
|
{
|
|
2250
|
-
defaultSize: typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
|
|
2251
|
+
defaultSize: typeof panel.defaultSizePx === "number" ? `${panel.defaultSizePx}px` : typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
|
|
2252
|
+
minSize: typeof panel.minSizePx === "number" ? `${panel.minSizePx}px` : void 0,
|
|
2253
|
+
maxSize: typeof panel.maxSizePx === "number" ? `${panel.maxSizePx}px` : void 0,
|
|
2251
2254
|
children: renderChildren(panel.children)
|
|
2252
2255
|
}
|
|
2253
2256
|
)
|
|
@@ -2436,7 +2439,7 @@ function Sider({
|
|
|
2436
2439
|
"data-slot": "layout-sider",
|
|
2437
2440
|
"data-collapsed": collapsed || void 0,
|
|
2438
2441
|
className: cn(
|
|
2439
|
-
"flex min-h-0 shrink-0 flex-col border-r bg-
|
|
2442
|
+
"flex min-h-0 shrink-0 flex-col border-r bg-sidebar transition-[width]",
|
|
2440
2443
|
className
|
|
2441
2444
|
),
|
|
2442
2445
|
style: { width: current, ...style },
|
|
@@ -2528,10 +2531,10 @@ function Slider2({
|
|
|
2528
2531
|
onValueChange: handleChange,
|
|
2529
2532
|
className: inForm ? void 0 : className,
|
|
2530
2533
|
style: inForm ? void 0 : style,
|
|
2531
|
-
children: /* @__PURE__ */
|
|
2532
|
-
/* @__PURE__ */ jsx57(SliderIndicator, {}),
|
|
2534
|
+
children: /* @__PURE__ */ jsxs39(SliderControl, { children: [
|
|
2535
|
+
/* @__PURE__ */ jsx57(SliderTrack, { children: /* @__PURE__ */ jsx57(SliderIndicator, {}) }),
|
|
2533
2536
|
/* @__PURE__ */ jsx57(SliderThumb, {})
|
|
2534
|
-
] })
|
|
2537
|
+
] })
|
|
2535
2538
|
}
|
|
2536
2539
|
);
|
|
2537
2540
|
if (inForm && form && name) {
|
|
@@ -2704,7 +2707,7 @@ function Table2({
|
|
|
2704
2707
|
"div",
|
|
2705
2708
|
{
|
|
2706
2709
|
"data-slot": "table-loading",
|
|
2707
|
-
className: "absolute inset-0 z-10 flex items-center justify-center bg-
|
|
2710
|
+
className: "absolute inset-0 z-10 flex items-center justify-center bg-card/60 text-sm text-muted-foreground",
|
|
2708
2711
|
children: t("pactor.table.loading")
|
|
2709
2712
|
}
|
|
2710
2713
|
) : null,
|
|
@@ -2780,8 +2783,8 @@ import { jsx as jsx64 } from "react/jsx-runtime";
|
|
|
2780
2783
|
var typeClassMap = {
|
|
2781
2784
|
default: "",
|
|
2782
2785
|
secondary: "text-muted-foreground",
|
|
2783
|
-
success: "text-
|
|
2784
|
-
warning: "text-
|
|
2786
|
+
success: "text-success",
|
|
2787
|
+
warning: "text-warning",
|
|
2785
2788
|
danger: "text-destructive"
|
|
2786
2789
|
};
|
|
2787
2790
|
function Text({
|
|
@@ -3082,6 +3085,7 @@ export {
|
|
|
3082
3085
|
Combobox2 as Combobox,
|
|
3083
3086
|
Command2 as Command,
|
|
3084
3087
|
Chart,
|
|
3088
|
+
ChatInput,
|
|
3085
3089
|
Content,
|
|
3086
3090
|
ContextMenu2 as ContextMenu,
|
|
3087
3091
|
DataTable,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Icon,
|
|
3
3
|
Menu,
|
|
4
4
|
Sidebar
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EVGIS2ZE.js";
|
|
6
6
|
import {
|
|
7
7
|
Accordion,
|
|
8
8
|
AccordionContent,
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
Popover,
|
|
16
16
|
PopoverContent,
|
|
17
17
|
PopoverTrigger
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L4Z7MNYY.js";
|
|
19
19
|
import {
|
|
20
20
|
cn
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WKJUCGV4.js";
|
|
22
22
|
|
|
23
23
|
// src/layout/admin/menu-chain.ts
|
|
24
24
|
function findMenuChain(registry, menuId) {
|
|
@@ -121,7 +121,7 @@ function navigateMenuItem(menu, bridge) {
|
|
|
121
121
|
}
|
|
122
122
|
bridge.push(menu.path);
|
|
123
123
|
}
|
|
124
|
-
var menuItemClass = "flex w-full cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-
|
|
124
|
+
var menuItemClass = "flex w-full cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-(--menu-hover-background) hover:text-(--menu-hover-foreground) disabled:pointer-events-none disabled:opacity-50";
|
|
125
125
|
function CollapsedGroupFlyout({
|
|
126
126
|
menu,
|
|
127
127
|
registry,
|
|
@@ -227,7 +227,7 @@ function MenuTree({
|
|
|
227
227
|
className: cn(
|
|
228
228
|
menuItemClass,
|
|
229
229
|
"mx-auto size-10 justify-center px-0 font-semibold",
|
|
230
|
-
menu.id === activeMenuId && "bg-
|
|
230
|
+
menu.id === activeMenuId && "bg-(--menu-active-background) font-semibold text-(--menu-active-foreground)"
|
|
231
231
|
),
|
|
232
232
|
disabled: menu.disabled,
|
|
233
233
|
title: menu.title,
|
|
@@ -290,7 +290,7 @@ function MenuTree({
|
|
|
290
290
|
"data-active": menu.id === activeMenuId || void 0,
|
|
291
291
|
className: cn(
|
|
292
292
|
menuItemClass,
|
|
293
|
-
menu.id === activeMenuId && "bg-
|
|
293
|
+
menu.id === activeMenuId && "bg-(--menu-active-background) font-semibold text-(--menu-active-foreground)"
|
|
294
294
|
),
|
|
295
295
|
disabled: menu.disabled,
|
|
296
296
|
title: menu.title,
|
|
@@ -396,7 +396,7 @@ function AdminLayout({
|
|
|
396
396
|
{
|
|
397
397
|
"data-slot": "admin-header",
|
|
398
398
|
className: cn(
|
|
399
|
-
"flex h-14 items-center gap-4 border-b border-border bg-
|
|
399
|
+
"flex h-14 items-center gap-4 border-b border-border bg-card px-6",
|
|
400
400
|
fixedHeader && "sticky top-0 z-20"
|
|
401
401
|
),
|
|
402
402
|
children: [
|
|
@@ -423,7 +423,7 @@ function AdminLayout({
|
|
|
423
423
|
className: cn(
|
|
424
424
|
menuItemClass,
|
|
425
425
|
"size-10 justify-center px-0 font-semibold",
|
|
426
|
-
(menu.id === secondaryTopId || menu.id === activeTopId) && "bg-
|
|
426
|
+
(menu.id === secondaryTopId || menu.id === activeTopId) && "bg-(--menu-active-background) text-(--menu-active-foreground)"
|
|
427
427
|
),
|
|
428
428
|
disabled: menu.disabled,
|
|
429
429
|
title: menu.title,
|
|
@@ -447,7 +447,7 @@ function AdminLayout({
|
|
|
447
447
|
"data-slot": "admin-sidebar",
|
|
448
448
|
"data-collapsed": effectiveCollapsed || void 0,
|
|
449
449
|
className: cn(
|
|
450
|
-
"shrink-0 overflow-auto border-r border-border bg-
|
|
450
|
+
"shrink-0 overflow-auto border-r border-border bg-sidebar py-2",
|
|
451
451
|
effectiveCollapsed ? "w-16 px-1.5" : "w-52",
|
|
452
452
|
fixedSider && (mode === "side-full" ? "sticky top-0 h-screen" : "sticky top-14 h-[calc(100vh-3.5rem)]")
|
|
453
453
|
),
|
|
@@ -494,7 +494,7 @@ function AdminLayout({
|
|
|
494
494
|
"data-slot": "admin-collapse-trigger",
|
|
495
495
|
"aria-label": effectiveCollapsed ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
|
|
496
496
|
"aria-expanded": !effectiveCollapsed,
|
|
497
|
-
className: "sticky bottom-0 flex w-full cursor-pointer items-center justify-center border-t border-border bg-
|
|
497
|
+
className: "sticky bottom-0 flex w-full cursor-pointer items-center justify-center border-t border-border bg-sidebar py-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
498
498
|
onClick: () => setCollapsed((value) => !value),
|
|
499
499
|
children: effectiveCollapsed ? "\xBB" : "\xAB"
|
|
500
500
|
}
|
|
@@ -508,7 +508,7 @@ function AdminLayout({
|
|
|
508
508
|
{
|
|
509
509
|
"data-slot": "admin-tabs",
|
|
510
510
|
role: "tablist",
|
|
511
|
-
className: "flex items-center gap-1 border-b border-border bg-
|
|
511
|
+
className: "flex items-center gap-1 border-b border-border bg-card px-4 pt-2",
|
|
512
512
|
children: tabs.map((tab, index) => /* @__PURE__ */ jsxs(
|
|
513
513
|
"div",
|
|
514
514
|
{
|
|
@@ -517,7 +517,7 @@ function AdminLayout({
|
|
|
517
517
|
role: "presentation",
|
|
518
518
|
className: cn(
|
|
519
519
|
"inline-flex items-center gap-1 rounded-t-md border border-b-0 border-border px-3 py-1.5 text-sm",
|
|
520
|
-
tab.key === currentPath ? "bg-
|
|
520
|
+
tab.key === currentPath ? "bg-card font-medium text-foreground" : "bg-muted text-muted-foreground"
|
|
521
521
|
),
|
|
522
522
|
children: [
|
|
523
523
|
/* @__PURE__ */ jsx(
|
|
@@ -827,7 +827,7 @@ function LandingLayout({
|
|
|
827
827
|
"header",
|
|
828
828
|
{
|
|
829
829
|
"data-slot": "landing-navbar",
|
|
830
|
-
className: "border-b border-border bg-
|
|
830
|
+
className: "border-b border-border bg-card",
|
|
831
831
|
children: navbar
|
|
832
832
|
}
|
|
833
833
|
),
|