@jc-times/business-ui 0.2.43 → 0.2.54

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/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
- # 公共组件维护入口
2
-
3
- - 开始组件使用、选型或修改前,先读 [Agent 使用指南](docs/agent-guide.md),再按需读取 API 和专题文档。
4
- - 公共参数以当前源码和导出为准;消费项目以其安装版本的类型声明为准,不把本地新增能力当成已发布能力。
5
- - 新增或改变公共能力时,同步指南的场景选型、对应 API/专题和 package.json 发布文件清单。README 保持入口与导航,详细用法集中维护。
6
- - 通用交互、无障碍与响应式在本库实现;业务权限、接口、领域状态与文案由消费方组合。验证和发布遵循 docs/viewport-qa.md 与 docs/release.md。
1
+ # 公共组件维护入口
2
+
3
+ - 开始组件使用、选型或修改前,先读 [Agent 使用指南](docs/agent-guide.md),再按需读取 API 和专题文档。
4
+ - 公共参数以当前源码和导出为准;消费项目以其安装版本的类型声明为准,不把本地新增能力当成已发布能力。
5
+ - 新增或改变公共能力时,同步指南的场景选型、对应 API/专题和 package.json 发布文件清单。README 保持入口与导航,详细用法集中维护。
6
+ - 通用交互、无障碍与响应式在本库实现;业务权限、接口、领域状态与文案由消费方组合。验证和发布遵循 docs/viewport-qa.md 与 docs/release.md。
package/CHANGELOG.md CHANGED
@@ -1,17 +1,40 @@
1
- # 0.2.43
2
-
3
- - 新增语义化 `LinkButton`,以真实链接承载导航和文件下载,并复用 Button 的变体、尺寸、图标无障碍和禁用样式。
4
- - 收紧 `LinkButton` 的必填 `href` 契约;禁用链接保留可访问语义并隔离父级点击,补充下载属性、可访问名称和真实浏览器下载回归。
5
-
6
- # 0.2.42
7
-
8
- - DataTable 新增可选底部吸附横向滚动条,在内容溢出时显示并与 MRT 原生滚动区双向同步;支持业务化无障碍名称,默认不改变既有表格布局。
9
-
10
- # 0.2.41
11
-
12
- - 修复高分屏上 PDFium 左侧缩略图按设备像素尺寸显示而被裁切的问题;缩略图按插件逻辑尺寸完整缩放并保持高清渲染。
13
-
14
- # 0.2.40
1
+ # 0.2.53
2
+
3
+ - 新增 `UserProfilePopover`:紧凑的人员标签和只读资料卡,支持姓名、编号、部门、身份标签、头像与受控打开状态;资料卡随视口在 300–560px 间缩放,并保留键盘关闭与焦点归还。
4
+
5
+ ## 0.2.51
6
+ - Add MultilineAutoComplete: a single textarea with React Aria suggestions, explicit selection, free text and newlines. Preserves focus when choosing suggestions with mouse or touch.
7
+
8
+ ## 0.2.50
9
+ - SortableList supports scoped transfers between nested lists, source placeholders and insertion highlights; consumers retain membership and order updates.
10
+ - Fences stale/missing transfer items and resolves nested drop indicators to the unique current owner. Disabling drag remounts the React Aria grid to keep its hook topology stable.
11
+
12
+ # 0.2.49
13
+
14
+ - SortableList supports optional internal drop onto eligible items, with controlled domain callbacks and React Aria mouse, touch and keyboard behavior.
15
+
16
+ # 0.2.47
17
+
18
+ - 修复表格横向滚动同步条异步事件回写旧位置,避免中断触控板连续滚动;每帧最多同步一次,卸载时取消待执行同步。
19
+
20
+ # 0.2.45
21
+
22
+ - PDFium/Headless 正文和缩略图默认渲染 PDF 内已有批注(包括 Stamp 和 FreeText),修复审核文件签章提示缺失;不启用批注编辑,不改写源文件。
23
+
24
+ # 0.2.43
25
+
26
+ - 新增语义化 `LinkButton`,以真实链接承载导航和文件下载,并复用 Button 的变体、尺寸、图标无障碍和禁用样式。
27
+ - 收紧 `LinkButton` 的必填 `href` 契约;禁用链接保留可访问语义并隔离父级点击,补充下载属性、可访问名称和真实浏览器下载回归。
28
+
29
+ # 0.2.42
30
+
31
+ - DataTable 新增可选底部吸附横向滚动条,在内容溢出时显示并与 MRT 原生滚动区双向同步;支持业务化无障碍名称,默认不改变既有表格布局。
32
+
33
+ # 0.2.41
34
+
35
+ - 修复高分屏上 PDFium 左侧缩略图按设备像素尺寸显示而被裁切的问题;缩略图按插件逻辑尺寸完整缩放并保持高清渲染。
36
+
37
+ # 0.2.40
15
38
 
16
39
  - 公共 PDF 全屏在 Escape 时退出浏览器原生全屏,由 fullscreenchange 同步状态,避免退出按钮提前消失。
17
40
 
@@ -25,6 +48,15 @@
25
48
 
26
49
  # Changelog
27
50
 
51
+ ## 0.2.54
52
+
53
+ - PDFium Headless 新增 `mobileMode="continuous-reader"`:手机/粗指针连续阅读时恢复原生纵向滚动,收起缩略图与分页底栏,并压缩工具栏;`searchMode="collapsible"` 统一提供搜索开关和手机图标布局。
54
+
55
+ ## 0.2.48
56
+
57
+ - Cascader:按可见视口处理多列展开的边缘碰撞,修复右侧表单区县列超出屏幕的问题。
58
+ - 回归:1280px 右侧340px表单旧逻辑浮层右边缘为1395px;修正后保持在1280px内。
59
+
28
60
  ## 0.2.37
29
61
 
30
62
  - Headless 新增可选 initialZoom="fit-width",通过官方缩放插件适配窄屏;既有默认比例与受控 zoom 保持兼容。
@@ -265,3 +297,12 @@
265
297
  - Cascader 取消聚焦自动展开:标签点击和 Tab 只聚焦;保留点击、输入搜索与方向键展开。
266
298
 
267
299
  - StructuredAddressInput 默认取消地址类型,海外使用顶级地区;旧模式显式启用时复用公共 Select,不再手写原生 select。
300
+
301
+ ## 0.2.44 — 2026-09-14
302
+ - PDFium 双指缩放使用统一引擎比例,修复松手边界回跳;增加 defaultRailCollapsed 侧栏初始配置。
303
+
304
+ ## 0.2.45 — 2026-09-14
305
+ - 恢复官方低开销触控缩放;修复可见页码回传造成的跳页,触屏/滚轮预览和提交使用同一缩放边界。
306
+
307
+ ## 0.2.52
308
+ - AutoComplete and Combobox accept grouped options with non-selectable, muted headings and preserve filtering and keyboard selection.
@@ -26,4 +26,6 @@
26
26
 
27
27
  ## @rc-component/cascader 1.25.0
28
28
 
29
- MIT, Copyright (c) 2019-present react-component. Source: https://github.com/react-component/cascader. Used as the external Cascader interaction dependency; license reproduced in licenses/rc-cascader-MIT.txt. Transitive dependencies retain their own notices in their installed packages.
29
+ MIT, Copyright (c) 2019-present react-component. Source: https://github.com/react-component/cascader. Used as the external Cascader interaction dependency; license reproduced in licenses/rc-cascader-MIT.txt. Transitive dependencies retain their own notices in their installed packages.
30
+
31
+ 0.2.46 additionally bundles the React gesture entry of @embedpdf/plugin-zoom@2.15.0 with a pinned bounds/precision patch. Original MIT license: licenses/embedpdf-MIT.txt; patch: patches/@embedpdf__plugin-zoom@2.15.0.patch. Engine and core plugin implementations remain external.
@@ -7,18 +7,21 @@ function a({ children: a, enabled: o = !1, label: s = "表格横向滚动" }) {
7
7
  if (!o) return;
8
8
  let e = c.current, t = l.current, n = e?.querySelector(".MuiTableContainer-root"), r = n?.querySelector("table");
9
9
  if (!e || !t || !n || !r) return;
10
- let i = !1, a = () => {
10
+ let i = /* @__PURE__ */ new WeakMap(), a, s, u = (e, t) => {
11
+ t.scrollLeft !== e.scrollLeft && (t.scrollLeft = e.scrollLeft, i.set(t, t.scrollLeft));
12
+ }, f = (e) => {
13
+ let r = e === n ? t : n;
14
+ i.get(e) !== e.scrollLeft && r.scrollLeft !== e.scrollLeft && (i.delete(e), s = e, a === void 0 && (a = requestAnimationFrame(() => {
15
+ a = void 0, s && u(s, s === n ? t : n);
16
+ })));
17
+ }, p = () => {
11
18
  let e = n.scrollWidth > n.clientWidth + 1;
12
- d(e ? n.scrollWidth : 0), e && (t.scrollLeft = n.scrollLeft);
13
- }, s = () => {
14
- i ||= (i = !0, n.scrollLeft = t.scrollLeft, !1);
15
- }, u = () => {
16
- i ||= (i = !0, t.scrollLeft = n.scrollLeft, !1);
17
- };
18
- a();
19
- let f = typeof ResizeObserver > "u" ? null : new ResizeObserver(a);
20
- return f?.observe(n), f?.observe(r), t.addEventListener("scroll", s, { passive: !0 }), n.addEventListener("scroll", u, { passive: !0 }), () => {
21
- f?.disconnect(), t.removeEventListener("scroll", s), n.removeEventListener("scroll", u);
19
+ d(e ? n.scrollWidth : 0), e && u(n, t);
20
+ }, m = () => f(t), h = () => f(n);
21
+ p();
22
+ let g = typeof ResizeObserver > "u" ? null : new ResizeObserver(p);
23
+ return g?.observe(n), g?.observe(r), t.addEventListener("scroll", m, { passive: !0 }), n.addEventListener("scroll", h, { passive: !0 }), () => {
24
+ g?.disconnect(), a !== void 0 && cancelAnimationFrame(a), t.removeEventListener("scroll", m), n.removeEventListener("scroll", h);
22
25
  };
23
26
  }, [o]), o ? /* @__PURE__ */ i("div", {
24
27
  ref: c,
@@ -30,34 +30,35 @@ function l({ children: e, content: n, side: r = "top", delayDuration: i = 450, d
30
30
  })] })
31
31
  });
32
32
  }
33
- function u({ trigger: e, children: i, title: c, closeLabel: l = "关闭", side: u = "bottom", align: d = "start", open: f, defaultOpen: p, modal: m = !1, onOpenChange: h, contentClassName: g = "" }) {
34
- let _ = t(), v = `ui-popover-title-${r().replaceAll(":", "")}`;
33
+ function u({ trigger: e, children: i, title: c, contentLabel: l, closeLabel: u = "关闭", side: d = "bottom", align: f = "start", open: p, defaultOpen: m, modal: h = !1, onOpenChange: g, contentClassName: _ = "" }) {
34
+ let v = t(), y = `ui-popover-title-${r().replaceAll(":", "")}`;
35
35
  return /* @__PURE__ */ o(s.Root, {
36
- open: f,
37
- defaultOpen: p,
38
- modal: m,
39
- onOpenChange: h,
36
+ open: p,
37
+ defaultOpen: m,
38
+ modal: h,
39
+ onOpenChange: g,
40
40
  children: [/* @__PURE__ */ a(s.Trigger, {
41
41
  asChild: !0,
42
42
  children: e
43
43
  }), /* @__PURE__ */ a(s.Portal, {
44
- container: _,
44
+ container: v,
45
45
  children: /* @__PURE__ */ o(s.Content, {
46
- className: `ui-popover ${g}`.trim(),
47
- side: u,
48
- align: d,
46
+ className: `ui-popover ${_}`.trim(),
47
+ side: d,
48
+ align: f,
49
49
  sideOffset: 8,
50
50
  collisionPadding: 12,
51
- "aria-labelledby": c === void 0 ? void 0 : v,
51
+ "aria-label": l,
52
+ "aria-labelledby": c === void 0 ? void 0 : y,
52
53
  children: [
53
54
  c === void 0 ? null : /* @__PURE__ */ o("div", {
54
55
  className: "ui-popover-heading",
55
56
  children: [/* @__PURE__ */ a("strong", {
56
- id: v,
57
+ id: y,
57
58
  children: c
58
59
  }), /* @__PURE__ */ a(s.Close, {
59
60
  className: "ui-floating-close",
60
- "aria-label": l,
61
+ "aria-label": u,
61
62
  children: /* @__PURE__ */ a(n, { size: 16 })
62
63
  })]
63
64
  }),
@@ -0,0 +1,69 @@
1
+ import { Popover as e } from "./FloatingControls.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/UserProfilePopover.tsx
4
+ function r({ name: e, url: n, large: r = !1 }) {
5
+ return /* @__PURE__ */ t("span", {
6
+ className: `ui-user-avatar${r ? " ui-user-avatar-large" : ""}`,
7
+ "aria-hidden": "true",
8
+ children: n ? /* @__PURE__ */ t("img", {
9
+ src: n,
10
+ alt: ""
11
+ }) : Array.from(e.trim())[0] ?? "?"
12
+ });
13
+ }
14
+ function i({ name: i, code: a, department: o, tag: s, avatarUrl: c, avatarColor: l, trigger: u, codeLabel: d = "编号", departmentLabel: f = "部门", side: p = "bottom", align: m = "start", open: h, defaultOpen: g, onOpenChange: _, className: v = "" }) {
15
+ let y = l ? { "--ui-user-avatar-bg": l } : void 0;
16
+ return /* @__PURE__ */ t(e, {
17
+ trigger: u ?? /* @__PURE__ */ n("button", {
18
+ type: "button",
19
+ className: "ui-user-chip",
20
+ style: y,
21
+ children: [/* @__PURE__ */ t(r, {
22
+ name: i,
23
+ url: c
24
+ }), /* @__PURE__ */ t("span", {
25
+ className: "ui-user-chip-name",
26
+ children: i
27
+ })]
28
+ }),
29
+ side: p,
30
+ align: m,
31
+ open: h,
32
+ defaultOpen: g,
33
+ onOpenChange: _,
34
+ contentLabel: `${i}的用户资料`,
35
+ contentClassName: `ui-user-profile-popover ${v}`.trim(),
36
+ children: /* @__PURE__ */ n("div", {
37
+ className: "ui-user-profile",
38
+ style: y,
39
+ children: [/* @__PURE__ */ n("div", {
40
+ className: "ui-user-profile-header",
41
+ children: [/* @__PURE__ */ t(r, {
42
+ name: i,
43
+ url: c,
44
+ large: !0
45
+ }), /* @__PURE__ */ n("div", {
46
+ className: "ui-user-profile-heading",
47
+ children: [/* @__PURE__ */ t("strong", {
48
+ className: "ui-user-profile-name",
49
+ children: i
50
+ }), s == null ? null : /* @__PURE__ */ t("span", {
51
+ className: "ui-user-profile-tag",
52
+ children: s
53
+ })]
54
+ })]
55
+ }), a == null && o == null ? null : /* @__PURE__ */ n("dl", {
56
+ className: "ui-user-profile-details",
57
+ children: [a == null ? null : /* @__PURE__ */ n("div", {
58
+ className: "ui-user-profile-row",
59
+ children: [/* @__PURE__ */ t("dt", { children: d }), /* @__PURE__ */ t("dd", { children: a })]
60
+ }), o == null ? null : /* @__PURE__ */ n("div", {
61
+ className: "ui-user-profile-row",
62
+ children: [/* @__PURE__ */ t("dt", { children: f }), /* @__PURE__ */ t("dd", { children: o })]
63
+ })]
64
+ })]
65
+ })
66
+ });
67
+ }
68
+ //#endregion
69
+ export { i as UserProfilePopover };
@@ -0,0 +1,17 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, i = (t, n) => {
3
+ let r = {};
4
+ for (var i in t) e(r, i, {
5
+ get: t[i],
6
+ enumerable: !0
7
+ });
8
+ return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ }, a = (i, a, o, s) => {
10
+ if (a && typeof a == "object" || typeof a == "function") for (var c = n(a), l = 0, u = c.length, d; l < u; l++) d = c[l], !r.call(i, d) && d !== o && e(i, d, {
11
+ get: ((e) => a[e]).bind(null, d),
12
+ enumerable: !(s = t(a, d)) || s.enumerable
13
+ });
14
+ return i;
15
+ }, o = (e, t, n) => (a(e, t, "default"), n && a(n, t, "default"));
16
+ //#endregion
17
+ export { i as __exportAll, o as __reExport };
@@ -4,41 +4,42 @@ import { Alert as r } from "./Alert.js";
4
4
  import { EmptyState as i } from "./EmptyState.js";
5
5
  import { Skeleton as a, SkeletonText as o } from "./Skeleton.js";
6
6
  import { Popconfirm as s, Popover as c, Tooltip as l } from "./FloatingControls.js";
7
- import { Checkbox as u, FormField as d, SelectInput as f, TextArea as p, TextInput as m } from "./FormField.js";
8
- import { Select as h } from "./Select.js";
9
- import { Combobox as g } from "./Combobox.js";
10
- import { AutoComplete as _, Autocomplete as v } from "./AutoComplete.js";
11
- import { ToastProvider as y, useToast as b } from "./Toast.js";
12
- import { DataTableTheme as x } from "./DataTableTheme.js";
13
- import { DataTableMergedRows as S } from "./DataTableMergedRows.js";
14
- import { DataTable as C, DataTableView as w, sortRows as T, useDataTable as E } from "./data-table.js";
15
- import { ExplainableButton as D } from "./ExplainableButton.js";
16
- import { Dialog as O, ModalShell as k } from "./ModalShell.js";
17
- import { DateInput as A, calendarDays as j, parseDate as M } from "./DateInput.js";
18
- import { Pagination as N, clampPage as P, pageCount as F, visiblePages as I } from "./Pagination.js";
19
- import { RovingTabList as L, RovingTabPanel as R, nextRovingTabValue as z } from "./RovingTabs.js";
20
- import { ToggleSwitch as B } from "./ToggleSwitch.js";
21
- import { SegmentedControl as V } from "./SegmentedControl.js";
22
- import { AsyncState as H, RecoverableAsyncState as U } from "./RecoverableAsyncState.js";
23
- import { useModalFocusTrap as W } from "./useModalFocusTrap.js";
24
- import { AsyncSearchPicker as G } from "./AsyncSearchPicker.js";
25
- import { AsyncDirectoryPicker as K } from "./AsyncDirectoryPicker.js";
26
- import { DropdownMenu as q, Menu as J } from "./DropdownMenu.js";
27
- import { ConfirmDialog as Y } from "./ConfirmDialog.js";
28
- import { useDebouncedValue as X } from "./useDebouncedValue.js";
29
- import { Badge as Z } from "./Badge.js";
30
- import { MetricCard as Q } from "./MetricCard.js";
31
- import { PageHeader as $ } from "./PageHeader.js";
32
- import { SectionCard as ee } from "./SectionCard.js";
33
- import { SortableList as te, moveSortableItems as ne } from "./SortableList.js";
34
- import { TreeSelect as re, buildTreeSelectTree as ie, filterTreeSelectTree as ae } from "./TreeSelect.js";
35
- import { Cascader as oe, buildCascaderOptions as se, indexCascaderPaths as ce } from "./Cascader.js";
36
- import { StructuredAddressInput as le, findAddressRegionPath as ue, flattenAddressRegions as de, searchAddressRegions as fe } from "./StructuredAddressInput.js";
37
- import { FileDropzone as pe, acceptsFile as me } from "./FileDropzone.js";
38
- import { useFilePreparation as he } from "./useFilePreparation.js";
39
- import { FilePreparationDialog as ge } from "./FilePreparationDialog.js";
40
- import { PreparedFileDropzone as _e } from "./PreparedFileDropzone.js";
41
- import { formatDecimalAmount as ve, formatScaledMoney as ye } from "./amount-format.js";
42
- import { NumericInput as be, ScaledNumericInput as xe } from "./NumericInput.js";
43
- import { MultiSelect as Se } from "./MultiSelect.js";
44
- export { r as Alert, K as AsyncDirectoryPicker, G as AsyncSearchPicker, H as AsyncState, _ as AutoComplete, v as Autocomplete, Z as Badge, e as Button, oe as Cascader, u as Checkbox, g as Combobox, Y as ConfirmDialog, C as DataTable, S as DataTableMergedRows, x as DataTableTheme, w as DataTableView, A as DateInput, O as Dialog, q as DropdownMenu, i as EmptyState, D as ExplainableButton, pe as FileDropzone, ge as FilePreparationDialog, d as FormField, t as LinkButton, J as Menu, Q as MetricCard, k as ModalShell, Se as MultiSelect, be as NumericInput, $ as PageHeader, N as Pagination, s as Popconfirm, c as Popover, _e as PreparedFileDropzone, U as RecoverableAsyncState, L as RovingTabList, R as RovingTabPanel, xe as ScaledNumericInput, ee as SectionCard, V as SegmentedControl, h as Select, f as SelectInput, a as Skeleton, o as SkeletonText, te as SortableList, le as StructuredAddressInput, p as TextArea, m as TextInput, y as ToastProvider, B as ToggleSwitch, l as Tooltip, re as TreeSelect, me as acceptsFile, se as buildCascaderOptions, ie as buildTreeSelectTree, n as buttonClassName, j as calendarDays, P as clampPage, ae as filterTreeSelectTree, ue as findAddressRegionPath, de as flattenAddressRegions, ve as formatDecimalAmount, ye as formatScaledMoney, ce as indexCascaderPaths, ne as moveSortableItems, z as nextRovingTabValue, F as pageCount, M as parseDate, fe as searchAddressRegions, T as sortRows, E as useDataTable, X as useDebouncedValue, he as useFilePreparation, W as useModalFocusTrap, b as useToast, I as visiblePages };
7
+ import { UserProfilePopover as u } from "./UserProfilePopover.js";
8
+ import { Checkbox as d, FormField as f, SelectInput as p, TextArea as m, TextInput as h } from "./FormField.js";
9
+ import { Select as g } from "./Select.js";
10
+ import { Combobox as _ } from "./Combobox.js";
11
+ import { AutoComplete as v, Autocomplete as y } from "./AutoComplete.js";
12
+ import { ToastProvider as b, useToast as x } from "./Toast.js";
13
+ import { DataTableTheme as S } from "./DataTableTheme.js";
14
+ import { DataTableMergedRows as C } from "./DataTableMergedRows.js";
15
+ import { DataTable as w, DataTableView as T, sortRows as E, useDataTable as D } from "./data-table.js";
16
+ import { ExplainableButton as O } from "./ExplainableButton.js";
17
+ import { Dialog as k, ModalShell as A } from "./ModalShell.js";
18
+ import { DateInput as j, calendarDays as M, parseDate as N } from "./DateInput.js";
19
+ import { Pagination as P, clampPage as F, pageCount as I, visiblePages as L } from "./Pagination.js";
20
+ import { RovingTabList as R, RovingTabPanel as z, nextRovingTabValue as B } from "./RovingTabs.js";
21
+ import { ToggleSwitch as V } from "./ToggleSwitch.js";
22
+ import { SegmentedControl as H } from "./SegmentedControl.js";
23
+ import { AsyncState as U, RecoverableAsyncState as W } from "./RecoverableAsyncState.js";
24
+ import { useModalFocusTrap as G } from "./useModalFocusTrap.js";
25
+ import { AsyncSearchPicker as K } from "./AsyncSearchPicker.js";
26
+ import { AsyncDirectoryPicker as q } from "./AsyncDirectoryPicker.js";
27
+ import { DropdownMenu as J, Menu as Y } from "./DropdownMenu.js";
28
+ import { ConfirmDialog as X } from "./ConfirmDialog.js";
29
+ import { useDebouncedValue as Z } from "./useDebouncedValue.js";
30
+ import { Badge as Q } from "./Badge.js";
31
+ import { MetricCard as $ } from "./MetricCard.js";
32
+ import { PageHeader as ee } from "./PageHeader.js";
33
+ import { SectionCard as te } from "./SectionCard.js";
34
+ import { SortableList as ne, moveSortableItems as re } from "./SortableList.js";
35
+ import { TreeSelect as ie, buildTreeSelectTree as ae, filterTreeSelectTree as oe } from "./TreeSelect.js";
36
+ import { Cascader as se, buildCascaderOptions as ce, indexCascaderPaths as le } from "./Cascader.js";
37
+ import { StructuredAddressInput as ue, findAddressRegionPath as de, flattenAddressRegions as fe, searchAddressRegions as pe } from "./StructuredAddressInput.js";
38
+ import { FileDropzone as me, acceptsFile as he } from "./FileDropzone.js";
39
+ import { useFilePreparation as ge } from "./useFilePreparation.js";
40
+ import { FilePreparationDialog as _e } from "./FilePreparationDialog.js";
41
+ import { PreparedFileDropzone as ve } from "./PreparedFileDropzone.js";
42
+ import { formatDecimalAmount as ye, formatScaledMoney as be } from "./amount-format.js";
43
+ import { NumericInput as xe, ScaledNumericInput as Se } from "./NumericInput.js";
44
+ import { MultiSelect as Ce } from "./MultiSelect.js";
45
+ export { r as Alert, q as AsyncDirectoryPicker, K as AsyncSearchPicker, U as AsyncState, v as AutoComplete, y as Autocomplete, Q as Badge, e as Button, se as Cascader, d as Checkbox, _ as Combobox, X as ConfirmDialog, w as DataTable, C as DataTableMergedRows, S as DataTableTheme, T as DataTableView, j as DateInput, k as Dialog, J as DropdownMenu, i as EmptyState, O as ExplainableButton, me as FileDropzone, _e as FilePreparationDialog, f as FormField, t as LinkButton, Y as Menu, $ as MetricCard, A as ModalShell, Ce as MultiSelect, xe as NumericInput, ee as PageHeader, P as Pagination, s as Popconfirm, c as Popover, ve as PreparedFileDropzone, W as RecoverableAsyncState, R as RovingTabList, z as RovingTabPanel, Se as ScaledNumericInput, te as SectionCard, H as SegmentedControl, g as Select, p as SelectInput, a as Skeleton, o as SkeletonText, ne as SortableList, ue as StructuredAddressInput, m as TextArea, h as TextInput, b as ToastProvider, V as ToggleSwitch, l as Tooltip, ie as TreeSelect, u as UserProfilePopover, he as acceptsFile, ce as buildCascaderOptions, ae as buildTreeSelectTree, n as buttonClassName, M as calendarDays, F as clampPage, oe as filterTreeSelectTree, de as findAddressRegionPath, fe as flattenAddressRegions, ye as formatDecimalAmount, be as formatScaledMoney, le as indexCascaderPaths, re as moveSortableItems, B as nextRovingTabValue, I as pageCount, N as parseDate, pe as searchAddressRegions, E as sortRows, D as useDataTable, Z as useDebouncedValue, ge as useFilePreparation, G as useModalFocusTrap, x as useToast, L as visiblePages };
@@ -4,21 +4,23 @@ import { createContext as r, useContext as i, useEffect as a, useState as o } fr
4
4
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
5
5
  //#region src/document-viewer/PdfWorkspace.tsx
6
6
  var l = r(!1), u = () => i(l);
7
- function d({ rail: r, children: i, className: u = "", ...d }) {
8
- let [f, p] = o(() => typeof window < "u" && window.matchMedia("(max-width: 900px)").matches);
7
+ function d({ rail: r, children: i, defaultRailCollapsed: u, className: d = "", ...f }) {
8
+ let [p, m] = o(() => u ?? (typeof window < "u" && window.matchMedia("(max-width: 900px)").matches));
9
9
  return a(() => {
10
- let e = window.matchMedia("(max-width: 900px)"), t = () => p(e.matches);
10
+ let e = window.matchMedia("(max-width: 900px)"), t = () => {
11
+ (e.matches || u === void 0) && m(e.matches);
12
+ };
11
13
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
12
- }, []), /* @__PURE__ */ c("div", {
13
- ...d,
14
- className: `ui-pdf-workspace ${f ? "ui-rail-collapsed" : ""} ${u}`,
14
+ }, [u]), /* @__PURE__ */ c("div", {
15
+ ...f,
16
+ className: `ui-pdf-workspace ${p ? "ui-rail-collapsed" : ""} ${d}`,
15
17
  children: [
16
18
  /* @__PURE__ */ s("aside", {
17
19
  className: "ui-viewer-rail",
18
- hidden: f,
20
+ hidden: p,
19
21
  "aria-label": "页面缩略图",
20
22
  children: /* @__PURE__ */ s(l.Provider, {
21
- value: f,
23
+ value: p,
22
24
  children: r
23
25
  })
24
26
  }),
@@ -26,10 +28,10 @@ function d({ rail: r, children: i, className: u = "", ...d }) {
26
28
  variant: "secondary",
27
29
  size: "compact",
28
30
  className: "ui-viewer-rail-toggle",
29
- "aria-expanded": !f,
30
- "aria-label": f ? "显示页面缩略图" : "隐藏页面缩略图",
31
- onClick: () => p((e) => !e),
32
- children: [s(f ? n : t, { size: 17 }), /* @__PURE__ */ s("span", { children: f ? "页面" : "收起" })]
31
+ "aria-expanded": !p,
32
+ "aria-label": p ? "显示页面缩略图" : "隐藏页面缩略图",
33
+ onClick: () => m((e) => !e),
34
+ children: [s(p ? n : t, { size: 17 }), /* @__PURE__ */ s("span", { children: p ? "页面" : "收起" })]
33
35
  }),
34
36
  /* @__PURE__ */ s("div", {
35
37
  className: "ui-viewer-stage",