@pactor-app/ui 1.13.0 → 1.15.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-GQE62HDV.js → chunk-5PTCPU2F.js} +1 -1
- package/dist/{chunk-CFUWF54N.js → chunk-E3BFTXSJ.js} +84 -16
- package/dist/{chunk-AUSWAD26.js → chunk-HGVZUEZG.js} +6 -1
- package/dist/{chunk-V2J6FHWX.js → chunk-PQA6RJ52.js} +2 -2
- package/dist/{chunk-NQQAPB7Q.js → chunk-VFPLY2GI.js} +1 -1
- package/dist/components/index.cjs +122 -49
- package/dist/components/index.d.cts +30 -10
- package/dist/components/index.d.ts +30 -10
- package/dist/components/index.js +4 -4
- package/dist/index.cjs +156 -83
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/layout/index.cjs +6 -1
- package/dist/layout/index.js +3 -3
- package/dist/ui/index.cjs +6 -1
- package/dist/ui/index.js +2 -2
- package/package.json +5 -5
- package/styles.css +1 -1
|
@@ -3528,18 +3528,49 @@ function FieldError({ className, ...props }) {
|
|
|
3528
3528
|
|
|
3529
3529
|
// src/components/components/Field/index.tsx
|
|
3530
3530
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3531
|
-
function Field2({
|
|
3531
|
+
function Field2({
|
|
3532
|
+
label,
|
|
3533
|
+
required,
|
|
3534
|
+
description,
|
|
3535
|
+
error,
|
|
3536
|
+
children,
|
|
3537
|
+
className,
|
|
3538
|
+
style,
|
|
3539
|
+
labelClassName,
|
|
3540
|
+
labelStyle,
|
|
3541
|
+
controlClassName,
|
|
3542
|
+
controlStyle,
|
|
3543
|
+
descriptionClassName,
|
|
3544
|
+
descriptionStyle,
|
|
3545
|
+
errorClassName,
|
|
3546
|
+
errorStyle
|
|
3547
|
+
}) {
|
|
3532
3548
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Field, { className, style, children: [
|
|
3533
|
-
label ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FieldLabel, { children: [
|
|
3549
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(FieldLabel, { className: labelClassName, style: labelStyle, children: [
|
|
3534
3550
|
required ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { "aria-hidden": true, className: "text-destructive", children: [
|
|
3535
3551
|
"*",
|
|
3536
3552
|
" "
|
|
3537
3553
|
] }) : null,
|
|
3538
3554
|
label
|
|
3539
3555
|
] }) : null,
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3556
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3557
|
+
"div",
|
|
3558
|
+
{
|
|
3559
|
+
"data-slot": "field-control",
|
|
3560
|
+
className: cn(label ? "mt-2" : void 0, controlClassName),
|
|
3561
|
+
style: controlStyle,
|
|
3562
|
+
children
|
|
3563
|
+
}
|
|
3564
|
+
),
|
|
3565
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3566
|
+
FieldDescription,
|
|
3567
|
+
{
|
|
3568
|
+
className: descriptionClassName,
|
|
3569
|
+
style: descriptionStyle,
|
|
3570
|
+
children: description
|
|
3571
|
+
}
|
|
3572
|
+
) : null,
|
|
3573
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FieldError, { match: true, className: errorClassName, style: errorStyle, children: error }) : null
|
|
3543
3574
|
] });
|
|
3544
3575
|
}
|
|
3545
3576
|
|
|
@@ -3730,6 +3761,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
|
|
|
3730
3761
|
// src/components/components/Header/index.tsx
|
|
3731
3762
|
var import_runtime11 = require("@pactor-app/runtime");
|
|
3732
3763
|
var import_lucide_react16 = require("lucide-react");
|
|
3764
|
+
var import_react15 = require("react");
|
|
3733
3765
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3734
3766
|
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";
|
|
3735
3767
|
function Header({
|
|
@@ -3740,6 +3772,8 @@ function Header({
|
|
|
3740
3772
|
menu,
|
|
3741
3773
|
user,
|
|
3742
3774
|
locales,
|
|
3775
|
+
themeToggle = false,
|
|
3776
|
+
onThemeChange,
|
|
3743
3777
|
onMenuSelect,
|
|
3744
3778
|
onDropdownSelect,
|
|
3745
3779
|
onUserSelect,
|
|
@@ -3760,7 +3794,7 @@ function Header({
|
|
|
3760
3794
|
"flex h-14 shrink-0 items-center gap-4 border-b bg-card px-4",
|
|
3761
3795
|
className
|
|
3762
3796
|
);
|
|
3763
|
-
if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales) {
|
|
3797
|
+
if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales && !themeToggle) {
|
|
3764
3798
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("header", { "data-slot": "layout-header", className: rootClass, style, children });
|
|
3765
3799
|
}
|
|
3766
3800
|
const brandNode = hasBrand && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
|
|
@@ -3777,7 +3811,7 @@ function Header({
|
|
|
3777
3811
|
] });
|
|
3778
3812
|
const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
|
|
3779
3813
|
const showLeft = brandLeft || dropdownLeft || hasMenu;
|
|
3780
|
-
const showRight = dropdownRight || brandRight || hasLocales || hasUser;
|
|
3814
|
+
const showRight = dropdownRight || brandRight || hasLocales || hasUser || themeToggle;
|
|
3781
3815
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("header", { "data-slot": "layout-header", className: rootClass, style, children: [
|
|
3782
3816
|
showLeft && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
|
|
3783
3817
|
brandLeft && brandNode,
|
|
@@ -3788,6 +3822,7 @@ function Header({
|
|
|
3788
3822
|
showRight && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
|
|
3789
3823
|
dropdownRight && dropdownNode,
|
|
3790
3824
|
brandRight && brandNode,
|
|
3825
|
+
themeToggle && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderThemeToggle, { onSelect: onThemeChange }),
|
|
3791
3826
|
hasLocales && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
|
|
3792
3827
|
hasUser && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeaderUserArea, { user, onSelect: onUserSelect })
|
|
3793
3828
|
] })
|
|
@@ -3935,6 +3970,39 @@ function HeaderLocalesArea({
|
|
|
3935
3970
|
)) })
|
|
3936
3971
|
] });
|
|
3937
3972
|
}
|
|
3973
|
+
function readCurrentTheme() {
|
|
3974
|
+
if (typeof document === "undefined") {
|
|
3975
|
+
return "light";
|
|
3976
|
+
}
|
|
3977
|
+
return document.documentElement.getAttribute("data-pactor-theme") === "dark" ? "dark" : "light";
|
|
3978
|
+
}
|
|
3979
|
+
function HeaderThemeToggle({
|
|
3980
|
+
onSelect
|
|
3981
|
+
}) {
|
|
3982
|
+
const [theme, setTheme] = (0, import_react15.useState)(readCurrentTheme);
|
|
3983
|
+
const handleToggle = () => {
|
|
3984
|
+
const next = readCurrentTheme() === "dark" ? "light" : "dark";
|
|
3985
|
+
if (next === "dark") {
|
|
3986
|
+
document.documentElement.setAttribute("data-pactor-theme", "dark");
|
|
3987
|
+
} else {
|
|
3988
|
+
document.documentElement.removeAttribute("data-pactor-theme");
|
|
3989
|
+
}
|
|
3990
|
+
setTheme(next);
|
|
3991
|
+
onSelect?.(next);
|
|
3992
|
+
};
|
|
3993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3994
|
+
"button",
|
|
3995
|
+
{
|
|
3996
|
+
type: "button",
|
|
3997
|
+
"data-slot": "header-theme-toggle",
|
|
3998
|
+
className: "flex size-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",
|
|
3999
|
+
title: theme === "dark" ? "\u5207\u6362\u4E3A\u6D45\u8272" : "\u5207\u6362\u4E3A\u6DF1\u8272",
|
|
4000
|
+
"aria-label": "\u5207\u6362\u660E\u6697\u4E3B\u9898",
|
|
4001
|
+
onClick: handleToggle,
|
|
4002
|
+
children: theme === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: "sun", size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: "moon", size: "sm" })
|
|
4003
|
+
}
|
|
4004
|
+
);
|
|
4005
|
+
}
|
|
3938
4006
|
|
|
3939
4007
|
// src/components/components/HoverCard/index.tsx
|
|
3940
4008
|
var import_runtime12 = require("@pactor-app/runtime");
|
|
@@ -3996,7 +4064,7 @@ function HoverCard2({ content, children, className, style }) {
|
|
|
3996
4064
|
|
|
3997
4065
|
// src/components/components/Input/index.tsx
|
|
3998
4066
|
var import_runtime13 = require("@pactor-app/runtime");
|
|
3999
|
-
var
|
|
4067
|
+
var import_react16 = require("react");
|
|
4000
4068
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4001
4069
|
function Input2({
|
|
4002
4070
|
name,
|
|
@@ -4014,9 +4082,9 @@ function Input2({
|
|
|
4014
4082
|
}) {
|
|
4015
4083
|
const form = useFormContext();
|
|
4016
4084
|
const { t } = (0, import_runtime13.useI18n)();
|
|
4017
|
-
const controlId = (0,
|
|
4085
|
+
const controlId = (0, import_react16.useId)();
|
|
4018
4086
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
4019
|
-
(0,
|
|
4087
|
+
(0, import_react16.useEffect)(() => {
|
|
4020
4088
|
if (inForm && form && name) {
|
|
4021
4089
|
form.registerField(name, rules, value);
|
|
4022
4090
|
return () => form.unregisterField(name);
|
|
@@ -4133,7 +4201,7 @@ function InputGroup2({ className, style, children }) {
|
|
|
4133
4201
|
}
|
|
4134
4202
|
|
|
4135
4203
|
// src/components/components/InputOTP/index.tsx
|
|
4136
|
-
var
|
|
4204
|
+
var import_react17 = require("react");
|
|
4137
4205
|
|
|
4138
4206
|
// src/ui/input-otp.tsx
|
|
4139
4207
|
var import_input_otp = require("input-otp");
|
|
@@ -4209,15 +4277,15 @@ function InputOTP2({
|
|
|
4209
4277
|
}) {
|
|
4210
4278
|
const form = useFormContext();
|
|
4211
4279
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
4212
|
-
(0,
|
|
4280
|
+
(0, import_react17.useEffect)(() => {
|
|
4213
4281
|
if (inForm && form && name) {
|
|
4214
4282
|
form.registerField(name, rules, value);
|
|
4215
4283
|
return () => form.unregisterField(name);
|
|
4216
4284
|
}
|
|
4217
4285
|
return void 0;
|
|
4218
4286
|
});
|
|
4219
|
-
const [innerValue, setInnerValue] = (0,
|
|
4220
|
-
(0,
|
|
4287
|
+
const [innerValue, setInnerValue] = (0, import_react17.useState)(typeof value === "string" ? value : "");
|
|
4288
|
+
(0, import_react17.useEffect)(() => {
|
|
4221
4289
|
if (!inForm) setInnerValue(typeof value === "string" ? value : "");
|
|
4222
4290
|
}, [inForm, value]);
|
|
4223
4291
|
const current = inForm && form && name ? typeof form.values[name] === "string" ? form.values[name] : "" : innerValue;
|
|
@@ -4455,7 +4523,7 @@ function Link2({ href, text, target, className, style, children }) {
|
|
|
4455
4523
|
}
|
|
4456
4524
|
|
|
4457
4525
|
// src/components/components/Menu/index.tsx
|
|
4458
|
-
var
|
|
4526
|
+
var import_react20 = require("react");
|
|
4459
4527
|
|
|
4460
4528
|
// src/components/components/Sidebar/rail-tooltip.tsx
|
|
4461
4529
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
@@ -4471,7 +4539,7 @@ function RailTooltip({
|
|
|
4471
4539
|
|
|
4472
4540
|
// src/components/components/Sidebar/index.tsx
|
|
4473
4541
|
var import_runtime16 = require("@pactor-app/runtime");
|
|
4474
|
-
var
|
|
4542
|
+
var import_react19 = require("react");
|
|
4475
4543
|
|
|
4476
4544
|
// src/ui/sidebar.tsx
|
|
4477
4545
|
var React5 = __toESM(require("react"), 1);
|
|
@@ -4479,13 +4547,13 @@ var import_class_variance_authority5 = require("class-variance-authority");
|
|
|
4479
4547
|
var import_lucide_react19 = require("lucide-react");
|
|
4480
4548
|
|
|
4481
4549
|
// src/hooks/use-mobile.ts
|
|
4482
|
-
var
|
|
4550
|
+
var import_react18 = require("react");
|
|
4483
4551
|
var MOBILE_MEDIA_QUERY = "(max-width: 767px)";
|
|
4484
4552
|
function useIsMobile() {
|
|
4485
|
-
const [isMobile, setIsMobile] = (0,
|
|
4553
|
+
const [isMobile, setIsMobile] = (0, import_react18.useState)(
|
|
4486
4554
|
() => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(MOBILE_MEDIA_QUERY).matches
|
|
4487
4555
|
);
|
|
4488
|
-
(0,
|
|
4556
|
+
(0, import_react18.useEffect)(() => {
|
|
4489
4557
|
if (typeof window.matchMedia !== "function") {
|
|
4490
4558
|
return;
|
|
4491
4559
|
}
|
|
@@ -4817,7 +4885,12 @@ function SidebarRoot({
|
|
|
4817
4885
|
className: cn(
|
|
4818
4886
|
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
4819
4887
|
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
4820
|
-
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" :
|
|
4888
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : (
|
|
4889
|
+
// 边框色显式声明:不能只给宽度——宿主引入 Tailwind 时其
|
|
4890
|
+
// preflight(同为 base 层且后加载)会把默认 border-color
|
|
4891
|
+
// 重置为 currentColor,宽度型边框会脱离皮肤令牌
|
|
4892
|
+
"border-sidebar-border group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l"
|
|
4893
|
+
),
|
|
4821
4894
|
className
|
|
4822
4895
|
),
|
|
4823
4896
|
...props,
|
|
@@ -5118,14 +5191,14 @@ function SidebarInner({
|
|
|
5118
5191
|
const isMobile = useIsMobile();
|
|
5119
5192
|
const { state, setOpenMobile, toggleSidebar } = useSidebar();
|
|
5120
5193
|
const collapsed = state === "collapsed";
|
|
5121
|
-
const prevCollapsed = (0,
|
|
5122
|
-
(0,
|
|
5194
|
+
const prevCollapsed = (0, import_react19.useRef)(collapsed);
|
|
5195
|
+
(0, import_react19.useEffect)(() => {
|
|
5123
5196
|
if (prevCollapsed.current !== collapsed) {
|
|
5124
5197
|
prevCollapsed.current = collapsed;
|
|
5125
5198
|
onCollapse?.(collapsed);
|
|
5126
5199
|
}
|
|
5127
5200
|
}, [collapsed, onCollapse]);
|
|
5128
|
-
(0,
|
|
5201
|
+
(0, import_react19.useEffect)(() => {
|
|
5129
5202
|
if (locationKey !== void 0) {
|
|
5130
5203
|
setOpenMobile(false);
|
|
5131
5204
|
}
|
|
@@ -5223,7 +5296,7 @@ function Menu2({
|
|
|
5223
5296
|
const drawer = useSidebarDrawer();
|
|
5224
5297
|
const collapsed = mode === "inline" && drawer?.collapsed === true;
|
|
5225
5298
|
const collapsibleOn = collapsible && mode === "inline" && !collapsed;
|
|
5226
|
-
const [expandedKeys, setExpandedKeys] = (0,
|
|
5299
|
+
const [expandedKeys, setExpandedKeys] = (0, import_react20.useState)(() => {
|
|
5227
5300
|
const initial = new Set(defaultExpandedKeys ?? []);
|
|
5228
5301
|
if (selectedKey !== void 0) {
|
|
5229
5302
|
collectAncestors(items, selectedKey, initial);
|
|
@@ -5303,8 +5376,8 @@ function MenuEntry({
|
|
|
5303
5376
|
const isDirectory = collapsible && hasChildren;
|
|
5304
5377
|
const expanded = isDirectory && expandedKeys?.has(item.key) === true;
|
|
5305
5378
|
const railDirectory = collapsed && hasChildren;
|
|
5306
|
-
const [flyoutOpen, setFlyoutOpen] = (0,
|
|
5307
|
-
const flyoutTimer = (0,
|
|
5379
|
+
const [flyoutOpen, setFlyoutOpen] = (0, import_react20.useState)(false);
|
|
5380
|
+
const flyoutTimer = (0, import_react20.useRef)(void 0);
|
|
5308
5381
|
const flyoutOpenNow = () => {
|
|
5309
5382
|
window.clearTimeout(flyoutTimer.current);
|
|
5310
5383
|
setFlyoutOpen(true);
|
|
@@ -5313,7 +5386,7 @@ function MenuEntry({
|
|
|
5313
5386
|
window.clearTimeout(flyoutTimer.current);
|
|
5314
5387
|
flyoutTimer.current = window.setTimeout(() => setFlyoutOpen(false), 200);
|
|
5315
5388
|
};
|
|
5316
|
-
(0,
|
|
5389
|
+
(0, import_react20.useEffect)(() => () => window.clearTimeout(flyoutTimer.current), []);
|
|
5317
5390
|
const button = /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
5318
5391
|
"button",
|
|
5319
5392
|
{
|
|
@@ -5712,7 +5785,7 @@ function Page({ title, className, style, children }) {
|
|
|
5712
5785
|
}
|
|
5713
5786
|
|
|
5714
5787
|
// src/components/components/Pagination/index.tsx
|
|
5715
|
-
var
|
|
5788
|
+
var import_react21 = require("react");
|
|
5716
5789
|
|
|
5717
5790
|
// src/ui/pagination.tsx
|
|
5718
5791
|
var import_lucide_react21 = require("lucide-react");
|
|
@@ -5840,7 +5913,7 @@ function Pagination2({
|
|
|
5840
5913
|
className,
|
|
5841
5914
|
style
|
|
5842
5915
|
}) {
|
|
5843
|
-
const [innerPage, setInnerPage] = (0,
|
|
5916
|
+
const [innerPage, setInnerPage] = (0, import_react21.useState)(1);
|
|
5844
5917
|
const pageCount = Math.max(1, Math.ceil(total / Math.max(1, pageSize)));
|
|
5845
5918
|
const current = Math.min(Math.max(1, page ?? innerPage), pageCount);
|
|
5846
5919
|
const goTo = (next) => {
|
|
@@ -5960,7 +6033,7 @@ function Progress2({ value, className, style }) {
|
|
|
5960
6033
|
}
|
|
5961
6034
|
|
|
5962
6035
|
// src/components/components/RadioGroup/index.tsx
|
|
5963
|
-
var
|
|
6036
|
+
var import_react22 = require("react");
|
|
5964
6037
|
|
|
5965
6038
|
// src/ui/radio-group.tsx
|
|
5966
6039
|
var import_radio = require("@base-ui/react/radio");
|
|
@@ -6046,9 +6119,9 @@ function RadioGroup2({
|
|
|
6046
6119
|
style
|
|
6047
6120
|
}) {
|
|
6048
6121
|
const form = useFormContext();
|
|
6049
|
-
const controlId = (0,
|
|
6122
|
+
const controlId = (0, import_react22.useId)();
|
|
6050
6123
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
6051
|
-
(0,
|
|
6124
|
+
(0, import_react22.useEffect)(() => {
|
|
6052
6125
|
if (inForm && form && name) {
|
|
6053
6126
|
form.registerField(name, rules, value);
|
|
6054
6127
|
return () => form.unregisterField(name);
|
|
@@ -6120,7 +6193,7 @@ function RadioGroup2({
|
|
|
6120
6193
|
|
|
6121
6194
|
// src/components/components/Resizable/index.tsx
|
|
6122
6195
|
var import_runtime18 = require("@pactor-app/runtime");
|
|
6123
|
-
var
|
|
6196
|
+
var import_react23 = require("react");
|
|
6124
6197
|
|
|
6125
6198
|
// src/ui/resizable.tsx
|
|
6126
6199
|
var import_lucide_react22 = require("lucide-react");
|
|
@@ -6173,7 +6246,7 @@ function Resizable({
|
|
|
6173
6246
|
style
|
|
6174
6247
|
}) {
|
|
6175
6248
|
const { renderChildren } = (0, import_runtime18.useRenderer)();
|
|
6176
|
-
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
6249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react23.Fragment, { children: [
|
|
6177
6250
|
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ResizableHandle, { withHandle: true }) : null,
|
|
6178
6251
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6179
6252
|
Panel,
|
|
@@ -6265,7 +6338,7 @@ function ScrollArea2({
|
|
|
6265
6338
|
|
|
6266
6339
|
// src/components/components/Select/index.tsx
|
|
6267
6340
|
var import_runtime19 = require("@pactor-app/runtime");
|
|
6268
|
-
var
|
|
6341
|
+
var import_react24 = require("react");
|
|
6269
6342
|
|
|
6270
6343
|
// src/ui/select.tsx
|
|
6271
6344
|
var import_select = require("@base-ui/react/select");
|
|
@@ -6415,9 +6488,9 @@ function Select2({
|
|
|
6415
6488
|
}) {
|
|
6416
6489
|
const form = useFormContext();
|
|
6417
6490
|
const { t } = (0, import_runtime19.useI18n)();
|
|
6418
|
-
const controlId = (0,
|
|
6491
|
+
const controlId = (0, import_react24.useId)();
|
|
6419
6492
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
6420
|
-
(0,
|
|
6493
|
+
(0, import_react24.useEffect)(() => {
|
|
6421
6494
|
if (inForm && form && name) {
|
|
6422
6495
|
form.registerField(name, rules, value);
|
|
6423
6496
|
return () => form.unregisterField(name);
|
|
@@ -6612,7 +6685,7 @@ function Skeleton2({ shape = "line", width, height, className, style }) {
|
|
|
6612
6685
|
}
|
|
6613
6686
|
|
|
6614
6687
|
// src/components/components/Slider/index.tsx
|
|
6615
|
-
var
|
|
6688
|
+
var import_react25 = require("react");
|
|
6616
6689
|
|
|
6617
6690
|
// src/ui/slider.tsx
|
|
6618
6691
|
var import_slider = require("@base-ui/react/slider");
|
|
@@ -6694,7 +6767,7 @@ function Slider2({
|
|
|
6694
6767
|
}) {
|
|
6695
6768
|
const form = useFormContext();
|
|
6696
6769
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
6697
|
-
(0,
|
|
6770
|
+
(0, import_react25.useEffect)(() => {
|
|
6698
6771
|
if (inForm && form && name) {
|
|
6699
6772
|
form.registerField(name, rules, value);
|
|
6700
6773
|
return () => form.unregisterField(name);
|
|
@@ -6745,7 +6818,7 @@ function Slider2({
|
|
|
6745
6818
|
|
|
6746
6819
|
// src/components/components/Sonner/index.tsx
|
|
6747
6820
|
var import_runtime20 = require("@pactor-app/runtime");
|
|
6748
|
-
var
|
|
6821
|
+
var import_react26 = require("react");
|
|
6749
6822
|
|
|
6750
6823
|
// src/ui/toast.tsx
|
|
6751
6824
|
var import_toast = require("@base-ui/react/toast");
|
|
@@ -6825,7 +6898,7 @@ function Toaster({ className }) {
|
|
|
6825
6898
|
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
6826
6899
|
function Sonner({ className, style }) {
|
|
6827
6900
|
const { context } = (0, import_runtime20.useRenderer)();
|
|
6828
|
-
(0,
|
|
6901
|
+
(0, import_react26.useEffect)(() => {
|
|
6829
6902
|
const { actions } = context;
|
|
6830
6903
|
if (actions.has("toast")) {
|
|
6831
6904
|
return;
|
|
@@ -6883,7 +6956,7 @@ function Statistic({ title, value, precision, suffix, className, style }) {
|
|
|
6883
6956
|
}
|
|
6884
6957
|
|
|
6885
6958
|
// src/components/components/Switch/index.tsx
|
|
6886
|
-
var
|
|
6959
|
+
var import_react27 = require("react");
|
|
6887
6960
|
|
|
6888
6961
|
// src/ui/switch.tsx
|
|
6889
6962
|
var import_switch = require("@base-ui/react/switch");
|
|
@@ -6922,9 +6995,9 @@ function Switch2({
|
|
|
6922
6995
|
style
|
|
6923
6996
|
}) {
|
|
6924
6997
|
const form = useFormContext();
|
|
6925
|
-
const controlId = (0,
|
|
6998
|
+
const controlId = (0, import_react27.useId)();
|
|
6926
6999
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
6927
|
-
(0,
|
|
7000
|
+
(0, import_react27.useEffect)(() => {
|
|
6928
7001
|
if (inForm && form && name) {
|
|
6929
7002
|
form.registerField(name, rules, value);
|
|
6930
7003
|
return () => form.unregisterField(name);
|
|
@@ -6978,7 +7051,7 @@ function Switch2({
|
|
|
6978
7051
|
|
|
6979
7052
|
// src/components/components/Table/index.tsx
|
|
6980
7053
|
var import_runtime21 = require("@pactor-app/runtime");
|
|
6981
|
-
var
|
|
7054
|
+
var import_react28 = require("react");
|
|
6982
7055
|
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
6983
7056
|
function renderCellValue2(value) {
|
|
6984
7057
|
if (value === void 0 || value === null) {
|
|
@@ -7001,7 +7074,7 @@ function Table3({
|
|
|
7001
7074
|
}) {
|
|
7002
7075
|
const { renderChildren } = (0, import_runtime21.useRenderer)();
|
|
7003
7076
|
const { t } = (0, import_runtime21.useI18n)();
|
|
7004
|
-
const [current, setCurrent] = (0,
|
|
7077
|
+
const [current, setCurrent] = (0, import_react28.useState)(1);
|
|
7005
7078
|
const pageSize = pagination === false ? void 0 : pagination?.pageSize;
|
|
7006
7079
|
const total = dataSource.length;
|
|
7007
7080
|
const pageCount = pageSize !== void 0 && pageSize > 0 ? Math.max(1, Math.ceil(total / pageSize)) : 1;
|
|
@@ -7236,7 +7309,7 @@ function Text({
|
|
|
7236
7309
|
}
|
|
7237
7310
|
|
|
7238
7311
|
// src/components/components/Textarea/index.tsx
|
|
7239
|
-
var
|
|
7312
|
+
var import_react29 = require("react");
|
|
7240
7313
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
7241
7314
|
function Textarea2({
|
|
7242
7315
|
name,
|
|
@@ -7251,9 +7324,9 @@ function Textarea2({
|
|
|
7251
7324
|
style
|
|
7252
7325
|
}) {
|
|
7253
7326
|
const form = useFormContext();
|
|
7254
|
-
const controlId = (0,
|
|
7327
|
+
const controlId = (0, import_react29.useId)();
|
|
7255
7328
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
7256
|
-
(0,
|
|
7329
|
+
(0, import_react29.useEffect)(() => {
|
|
7257
7330
|
if (inForm && form && name) {
|
|
7258
7331
|
form.registerField(name, rules, value);
|
|
7259
7332
|
return () => form.unregisterField(name);
|
|
@@ -760,13 +760,27 @@ interface FieldProps {
|
|
|
760
760
|
className?: string;
|
|
761
761
|
/** 通用:根节点内联样式 */
|
|
762
762
|
style?: CSSProperties;
|
|
763
|
+
/** label 节点 class / style(必填星号随 label 节点) */
|
|
764
|
+
labelClassName?: string;
|
|
765
|
+
labelStyle?: CSSProperties;
|
|
766
|
+
/** 控件容器(label 下方)class / style;缺省有 label 时容器自带 mt-2 */
|
|
767
|
+
controlClassName?: string;
|
|
768
|
+
controlStyle?: CSSProperties;
|
|
769
|
+
/** 辅助说明节点 class / style */
|
|
770
|
+
descriptionClassName?: string;
|
|
771
|
+
descriptionStyle?: CSSProperties;
|
|
772
|
+
/** 错误节点 class / style */
|
|
773
|
+
errorClassName?: string;
|
|
774
|
+
errorStyle?: CSSProperties;
|
|
763
775
|
}
|
|
764
776
|
/**
|
|
765
|
-
* Field 适配器(shadcn kit):通用表单项容器(Base UI Field
|
|
766
|
-
* label / description / error
|
|
767
|
-
*
|
|
777
|
+
* Field 适配器(shadcn kit):通用表单项容器(Base UI Field 封装,
|
|
778
|
+
* 上下结构:label 在上、控件容器在下);label / description / error 为
|
|
779
|
+
* 框架级 props,error 声明式强制展示;`required` 在 label 前渲染必填星号
|
|
780
|
+
* (对齐 antd Form.Item required 语义);label 与控件容器之间默认 mt-2,
|
|
781
|
+
* 四个节点(label / 控件容器 / description / error)均可独立加样式。
|
|
768
782
|
*/
|
|
769
|
-
declare function Field({ label, required, description, error, children, className, style }: FieldProps): React.JSX.Element;
|
|
783
|
+
declare function Field({ label, required, description, error, children, className, style, labelClassName, labelStyle, controlClassName, controlStyle, descriptionClassName, descriptionStyle, errorClassName, errorStyle, }: FieldProps): React.JSX.Element;
|
|
770
784
|
|
|
771
785
|
interface FlexProps {
|
|
772
786
|
/** 主轴方向,默认 horizontal */
|
|
@@ -892,6 +906,8 @@ interface HeaderLocale {
|
|
|
892
906
|
label: string;
|
|
893
907
|
value: string;
|
|
894
908
|
}
|
|
909
|
+
/** 深浅色主题(themeToggle 切换结果) */
|
|
910
|
+
type HeaderTheme = 'light' | 'dark';
|
|
895
911
|
interface HeaderProps {
|
|
896
912
|
/** 品牌区 logo 图片地址(可含表达式) */
|
|
897
913
|
logo?: string;
|
|
@@ -907,6 +923,10 @@ interface HeaderProps {
|
|
|
907
923
|
user?: HeaderUser;
|
|
908
924
|
/** 国际化切换选项 */
|
|
909
925
|
locales?: HeaderLocale[];
|
|
926
|
+
/** 右侧展示深浅色切换按钮(缺省 false);点击切换 documentElement 的 data-pactor-theme */
|
|
927
|
+
themeToggle?: boolean;
|
|
928
|
+
/** 主题切换事件,传出切换后的主题('light' | 'dark') */
|
|
929
|
+
onThemeChange?: (theme: HeaderTheme) => void;
|
|
910
930
|
/** 菜单选中事件,传出选中项 key */
|
|
911
931
|
onMenuSelect?: (key: string) => void;
|
|
912
932
|
/** 通用下拉选中事件,传出选中项 value */
|
|
@@ -923,15 +943,15 @@ interface HeaderProps {
|
|
|
923
943
|
}
|
|
924
944
|
/**
|
|
925
945
|
* Header 顶部区域(shadcn kit,语义对齐 antd Layout.Header):
|
|
926
|
-
* 横向 flex、垂直居中、默认下边框。除 children
|
|
927
|
-
* 区域(品牌区 / 通用下拉 / 横向菜单 / 用户区 /
|
|
928
|
-
* props 缺省时退化为纯容器。
|
|
946
|
+
* 横向 flex、垂直居中、默认下边框。除 children 外可携带六个可选结构
|
|
947
|
+
* 区域(品牌区 / 通用下拉 / 横向菜单 / 深浅色切换 / 用户区 / 国际化切换);
|
|
948
|
+
* 全部区域 props 缺省时退化为纯容器。
|
|
929
949
|
*
|
|
930
950
|
* 排布固定:左区(品牌?→下拉?→菜单?)— flex-1 中区(children)—
|
|
931
|
-
*
|
|
951
|
+
* 右区(下拉?→品牌?→主题切换?→locales→user)。区域内部直接组合 src/ui 原语
|
|
932
952
|
* (dropdown-menu / avatar),事件值透传给 Header 自身的事件 props。
|
|
933
953
|
*/
|
|
934
|
-
declare function Header({ logo, title, brandPosition, dropdown, menu, user, locales, onMenuSelect, onDropdownSelect, onUserSelect, onLocaleChange, className, style, children, }: HeaderProps): React.JSX.Element;
|
|
954
|
+
declare function Header({ logo, title, brandPosition, dropdown, menu, user, locales, themeToggle, onThemeChange, onMenuSelect, onDropdownSelect, onUserSelect, onLocaleChange, className, style, children, }: HeaderProps): React.JSX.Element;
|
|
935
955
|
|
|
936
956
|
interface HoverCardProps {
|
|
937
957
|
/** 悬浮卡片内容:DSL 子树(对象,原样保留至渲染层求值)或纯文本 */
|
|
@@ -1984,4 +2004,4 @@ interface FormContextValue {
|
|
|
1984
2004
|
/** 在字段组件内探测 Form 上下文;不在 Form 内时返回 null */
|
|
1985
2005
|
declare function useFormContext(): FormContextValue | null;
|
|
1986
2006
|
|
|
1987
|
-
export { Accordion, type AccordionItemData, type AccordionProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Chart, type ChartProps, type ChartType, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Dialog, type DialogProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderUser, type HeaderUserItem, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, Page, type PageProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Resizable, type ResizablePanelData, type ResizableProps, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };
|
|
2007
|
+
export { Accordion, type AccordionItemData, type AccordionProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Chart, type ChartProps, type ChartType, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Dialog, type DialogProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderTheme, type HeaderUser, type HeaderUserItem, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, Page, type PageProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Resizable, type ResizablePanelData, type ResizableProps, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };
|
|
@@ -760,13 +760,27 @@ interface FieldProps {
|
|
|
760
760
|
className?: string;
|
|
761
761
|
/** 通用:根节点内联样式 */
|
|
762
762
|
style?: CSSProperties;
|
|
763
|
+
/** label 节点 class / style(必填星号随 label 节点) */
|
|
764
|
+
labelClassName?: string;
|
|
765
|
+
labelStyle?: CSSProperties;
|
|
766
|
+
/** 控件容器(label 下方)class / style;缺省有 label 时容器自带 mt-2 */
|
|
767
|
+
controlClassName?: string;
|
|
768
|
+
controlStyle?: CSSProperties;
|
|
769
|
+
/** 辅助说明节点 class / style */
|
|
770
|
+
descriptionClassName?: string;
|
|
771
|
+
descriptionStyle?: CSSProperties;
|
|
772
|
+
/** 错误节点 class / style */
|
|
773
|
+
errorClassName?: string;
|
|
774
|
+
errorStyle?: CSSProperties;
|
|
763
775
|
}
|
|
764
776
|
/**
|
|
765
|
-
* Field 适配器(shadcn kit):通用表单项容器(Base UI Field
|
|
766
|
-
* label / description / error
|
|
767
|
-
*
|
|
777
|
+
* Field 适配器(shadcn kit):通用表单项容器(Base UI Field 封装,
|
|
778
|
+
* 上下结构:label 在上、控件容器在下);label / description / error 为
|
|
779
|
+
* 框架级 props,error 声明式强制展示;`required` 在 label 前渲染必填星号
|
|
780
|
+
* (对齐 antd Form.Item required 语义);label 与控件容器之间默认 mt-2,
|
|
781
|
+
* 四个节点(label / 控件容器 / description / error)均可独立加样式。
|
|
768
782
|
*/
|
|
769
|
-
declare function Field({ label, required, description, error, children, className, style }: FieldProps): React.JSX.Element;
|
|
783
|
+
declare function Field({ label, required, description, error, children, className, style, labelClassName, labelStyle, controlClassName, controlStyle, descriptionClassName, descriptionStyle, errorClassName, errorStyle, }: FieldProps): React.JSX.Element;
|
|
770
784
|
|
|
771
785
|
interface FlexProps {
|
|
772
786
|
/** 主轴方向,默认 horizontal */
|
|
@@ -892,6 +906,8 @@ interface HeaderLocale {
|
|
|
892
906
|
label: string;
|
|
893
907
|
value: string;
|
|
894
908
|
}
|
|
909
|
+
/** 深浅色主题(themeToggle 切换结果) */
|
|
910
|
+
type HeaderTheme = 'light' | 'dark';
|
|
895
911
|
interface HeaderProps {
|
|
896
912
|
/** 品牌区 logo 图片地址(可含表达式) */
|
|
897
913
|
logo?: string;
|
|
@@ -907,6 +923,10 @@ interface HeaderProps {
|
|
|
907
923
|
user?: HeaderUser;
|
|
908
924
|
/** 国际化切换选项 */
|
|
909
925
|
locales?: HeaderLocale[];
|
|
926
|
+
/** 右侧展示深浅色切换按钮(缺省 false);点击切换 documentElement 的 data-pactor-theme */
|
|
927
|
+
themeToggle?: boolean;
|
|
928
|
+
/** 主题切换事件,传出切换后的主题('light' | 'dark') */
|
|
929
|
+
onThemeChange?: (theme: HeaderTheme) => void;
|
|
910
930
|
/** 菜单选中事件,传出选中项 key */
|
|
911
931
|
onMenuSelect?: (key: string) => void;
|
|
912
932
|
/** 通用下拉选中事件,传出选中项 value */
|
|
@@ -923,15 +943,15 @@ interface HeaderProps {
|
|
|
923
943
|
}
|
|
924
944
|
/**
|
|
925
945
|
* Header 顶部区域(shadcn kit,语义对齐 antd Layout.Header):
|
|
926
|
-
* 横向 flex、垂直居中、默认下边框。除 children
|
|
927
|
-
* 区域(品牌区 / 通用下拉 / 横向菜单 / 用户区 /
|
|
928
|
-
* props 缺省时退化为纯容器。
|
|
946
|
+
* 横向 flex、垂直居中、默认下边框。除 children 外可携带六个可选结构
|
|
947
|
+
* 区域(品牌区 / 通用下拉 / 横向菜单 / 深浅色切换 / 用户区 / 国际化切换);
|
|
948
|
+
* 全部区域 props 缺省时退化为纯容器。
|
|
929
949
|
*
|
|
930
950
|
* 排布固定:左区(品牌?→下拉?→菜单?)— flex-1 中区(children)—
|
|
931
|
-
*
|
|
951
|
+
* 右区(下拉?→品牌?→主题切换?→locales→user)。区域内部直接组合 src/ui 原语
|
|
932
952
|
* (dropdown-menu / avatar),事件值透传给 Header 自身的事件 props。
|
|
933
953
|
*/
|
|
934
|
-
declare function Header({ logo, title, brandPosition, dropdown, menu, user, locales, onMenuSelect, onDropdownSelect, onUserSelect, onLocaleChange, className, style, children, }: HeaderProps): React.JSX.Element;
|
|
954
|
+
declare function Header({ logo, title, brandPosition, dropdown, menu, user, locales, themeToggle, onThemeChange, onMenuSelect, onDropdownSelect, onUserSelect, onLocaleChange, className, style, children, }: HeaderProps): React.JSX.Element;
|
|
935
955
|
|
|
936
956
|
interface HoverCardProps {
|
|
937
957
|
/** 悬浮卡片内容:DSL 子树(对象,原样保留至渲染层求值)或纯文本 */
|
|
@@ -1984,4 +2004,4 @@ interface FormContextValue {
|
|
|
1984
2004
|
/** 在字段组件内探测 Form 上下文;不在 Form 内时返回 null */
|
|
1985
2005
|
declare function useFormContext(): FormContextValue | null;
|
|
1986
2006
|
|
|
1987
|
-
export { Accordion, type AccordionItemData, type AccordionProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Chart, type ChartProps, type ChartType, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Dialog, type DialogProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderUser, type HeaderUserItem, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, Page, type PageProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Resizable, type ResizablePanelData, type ResizableProps, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };
|
|
2007
|
+
export { Accordion, type AccordionItemData, type AccordionProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Chart, type ChartProps, type ChartType, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Dialog, type DialogProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderTheme, type HeaderUser, type HeaderUserItem, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, Page, type PageProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Resizable, type ResizablePanelData, type ResizableProps, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };
|
package/dist/components/index.js
CHANGED
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
createComponentRegistry,
|
|
72
72
|
registerBuiltinComponents,
|
|
73
73
|
useFormContext
|
|
74
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-E3BFTXSJ.js";
|
|
75
75
|
import {
|
|
76
76
|
ICONS,
|
|
77
77
|
Icon,
|
|
@@ -80,10 +80,10 @@ import {
|
|
|
80
80
|
Sidebar,
|
|
81
81
|
normalizeIconName,
|
|
82
82
|
useSidebarDrawer
|
|
83
|
-
} from "../chunk-
|
|
84
|
-
import "../chunk-
|
|
83
|
+
} from "../chunk-5PTCPU2F.js";
|
|
84
|
+
import "../chunk-VFPLY2GI.js";
|
|
85
85
|
import "../chunk-XUHJ5YSG.js";
|
|
86
|
-
import "../chunk-
|
|
86
|
+
import "../chunk-HGVZUEZG.js";
|
|
87
87
|
import "../chunk-WKJUCGV4.js";
|
|
88
88
|
export {
|
|
89
89
|
Accordion,
|