@sia.soul/sia-react-ui 0.1.73 → 0.1.75
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/{Select-DBw1N_mj.d.cts → Select-Bv2AmXRD.d.cts} +4 -3
- package/dist/{Select-DxrU73F5.d.ts → Select-Cc1owuvN.d.ts} +4 -3
- package/dist/{chunk-SN3I2TKG.js → chunk-QDZXP2UO.js} +1 -1
- package/dist/{chunk-RRAXLKS6.js → chunk-TG7ZYXA7.js} +1 -1
- package/dist/{chunk-KN6FDE2C.js → chunk-TKCXP6RZ.js} +20 -8
- package/dist/{core-BlcyqiYZ.d.ts → core-CFukvTes.d.ts} +1 -1
- package/dist/{core-CpZqKpbl.d.cts → core-DErc-oXr.d.cts} +1 -1
- package/dist/core.cjs +20 -8
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/index.cjs +20 -8
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/{select-date-range-DUkZnviM.d.cts → select-date-range-DN4eBuVx.d.cts} +1 -1
- package/dist/{select-date-range-BE6wRSCh.d.ts → select-date-range-YrK9kuKW.d.ts} +1 -1
- package/dist/select-date-range.cjs +20 -8
- package/dist/select-date-range.d.cts +2 -2
- package/dist/select-date-range.d.ts +2 -2
- package/dist/select-date-range.js +2 -2
- package/package.json +1 -1
|
@@ -145,7 +145,7 @@ interface OverlayApiHandle<T> {
|
|
|
145
145
|
declare function openModal(config: ModalOpenConfig): OverlayApiHandle<ModalOpenConfig>;
|
|
146
146
|
/** 模态框组件。 */
|
|
147
147
|
declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<HTMLDivElement>> & {
|
|
148
|
-
/**
|
|
148
|
+
/** 直接打开实例,返回更新和关闭句柄;关闭动画完成后先调用 afterOpenChange(false),再卸载实例。 */
|
|
149
149
|
open: typeof openModal;
|
|
150
150
|
/** 显示普通信息提示。 */
|
|
151
151
|
info: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
@@ -244,8 +244,9 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
|
|
|
244
244
|
*/
|
|
245
245
|
loading?: boolean;
|
|
246
246
|
/**
|
|
247
|
-
|
|
248
|
-
*
|
|
247
|
+
* 是否显示下拉搜索输入框。未设置时,options 总数超过 15 项自动显示;显式值优先。
|
|
248
|
+
* 弹框始终提供搜索,allowInput 仍会显示输入框;此规则独立于 modalThreshold。
|
|
249
|
+
* @defaultValue options.length > 15
|
|
249
250
|
*/
|
|
250
251
|
showSearch?: boolean;
|
|
251
252
|
/** 在选项名称下方显示对应的 value。 */
|
|
@@ -145,7 +145,7 @@ interface OverlayApiHandle<T> {
|
|
|
145
145
|
declare function openModal(config: ModalOpenConfig): OverlayApiHandle<ModalOpenConfig>;
|
|
146
146
|
/** 模态框组件。 */
|
|
147
147
|
declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<HTMLDivElement>> & {
|
|
148
|
-
/**
|
|
148
|
+
/** 直接打开实例,返回更新和关闭句柄;关闭动画完成后先调用 afterOpenChange(false),再卸载实例。 */
|
|
149
149
|
open: typeof openModal;
|
|
150
150
|
/** 显示普通信息提示。 */
|
|
151
151
|
info: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
@@ -244,8 +244,9 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
|
|
|
244
244
|
*/
|
|
245
245
|
loading?: boolean;
|
|
246
246
|
/**
|
|
247
|
-
|
|
248
|
-
*
|
|
247
|
+
* 是否显示下拉搜索输入框。未设置时,options 总数超过 15 项自动显示;显式值优先。
|
|
248
|
+
* 弹框始终提供搜索,allowInput 仍会显示输入框;此规则独立于 modalThreshold。
|
|
249
|
+
* @defaultValue options.length > 15
|
|
249
250
|
*/
|
|
250
251
|
showSearch?: boolean;
|
|
251
252
|
/** 在选项名称下方显示对应的 value。 */
|
|
@@ -1394,11 +1394,10 @@ function openModal(config) {
|
|
|
1394
1394
|
let currentConfig = config;
|
|
1395
1395
|
let currentOpen = true;
|
|
1396
1396
|
let destroyed = false;
|
|
1397
|
-
let
|
|
1397
|
+
let mounted = false;
|
|
1398
1398
|
function cleanup2() {
|
|
1399
1399
|
if (destroyed) return;
|
|
1400
1400
|
destroyed = true;
|
|
1401
|
-
if (cleanupTimer !== void 0) window.clearTimeout(cleanupTimer);
|
|
1402
1401
|
root.unmount();
|
|
1403
1402
|
container.remove();
|
|
1404
1403
|
modalHandles.delete(handle);
|
|
@@ -1407,13 +1406,25 @@ function openModal(config) {
|
|
|
1407
1406
|
if (destroyed || !currentOpen) return;
|
|
1408
1407
|
currentOpen = false;
|
|
1409
1408
|
render();
|
|
1410
|
-
cleanupTimer = window.setTimeout(cleanup2, MODAL_MOTION_DURATION);
|
|
1411
1409
|
}
|
|
1412
|
-
function
|
|
1413
|
-
|
|
1410
|
+
function ModalInstance() {
|
|
1411
|
+
useEffect6(() => {
|
|
1412
|
+
mounted = true;
|
|
1413
|
+
if (!currentOpen) render();
|
|
1414
|
+
}, []);
|
|
1415
|
+
return /* @__PURE__ */ jsx3(ModalRoot, { ...currentConfig, open: !mounted || currentOpen, onOpenChange: (nextOpen) => {
|
|
1414
1416
|
currentConfig.onOpenChange?.(nextOpen);
|
|
1415
1417
|
if (!nextOpen) closeWithMotion();
|
|
1416
|
-
}
|
|
1418
|
+
}, afterOpenChange: (nextOpen) => {
|
|
1419
|
+
try {
|
|
1420
|
+
currentConfig.afterOpenChange?.(nextOpen);
|
|
1421
|
+
} finally {
|
|
1422
|
+
if (!nextOpen) queueMicrotask(cleanup2);
|
|
1423
|
+
}
|
|
1424
|
+
} });
|
|
1425
|
+
}
|
|
1426
|
+
function render() {
|
|
1427
|
+
root.render(/* @__PURE__ */ jsx3(ModalInstance, {}));
|
|
1417
1428
|
}
|
|
1418
1429
|
const handle = {
|
|
1419
1430
|
destroy: closeWithMotion,
|
|
@@ -1439,7 +1450,7 @@ function preset(type, defaults = {}) {
|
|
|
1439
1450
|
});
|
|
1440
1451
|
}
|
|
1441
1452
|
var Modal2 = Object.assign(ModalRoot, {
|
|
1442
|
-
/**
|
|
1453
|
+
/** 直接打开实例,返回更新和关闭句柄;关闭动画完成后先调用 afterOpenChange(false),再卸载实例。 */
|
|
1443
1454
|
open: openModal,
|
|
1444
1455
|
/** 显示普通信息提示。 */
|
|
1445
1456
|
info: preset("info", { title: "\u63D0\u793A" }),
|
|
@@ -1720,7 +1731,7 @@ var Select = forwardRef3(function Select2({
|
|
|
1720
1731
|
status = "default",
|
|
1721
1732
|
allowClear = true,
|
|
1722
1733
|
loading = false,
|
|
1723
|
-
showSearch
|
|
1734
|
+
showSearch: showSearchProp,
|
|
1724
1735
|
showValue = false,
|
|
1725
1736
|
allowInput = false,
|
|
1726
1737
|
inputMaxLength,
|
|
@@ -1742,6 +1753,7 @@ var Select = forwardRef3(function Select2({
|
|
|
1742
1753
|
onKeyDown,
|
|
1743
1754
|
...props
|
|
1744
1755
|
}, forwardedRef) {
|
|
1756
|
+
const showSearch = showSearchProp ?? options.length > 15;
|
|
1745
1757
|
const size = useControlSize(sizeProp);
|
|
1746
1758
|
const fallbackId = useId5();
|
|
1747
1759
|
const selectId = id ?? fallbackId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, HTMLAttributes, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import { B as ButtonProps, f as Button } from './Select-
|
|
3
|
+
import { B as ButtonProps, f as Button } from './Select-Cc1owuvN.js';
|
|
4
4
|
import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-Bx4B28Wh.js';
|
|
5
5
|
|
|
6
6
|
/** 单个工具栏操作及其下拉菜单。 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, HTMLAttributes, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import { B as ButtonProps, f as Button } from './Select-
|
|
3
|
+
import { B as ButtonProps, f as Button } from './Select-Bv2AmXRD.cjs';
|
|
4
4
|
import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-Bx4B28Wh.cjs';
|
|
5
5
|
|
|
6
6
|
/** 单个工具栏操作及其下拉菜单。 */
|
package/dist/core.cjs
CHANGED
|
@@ -3376,11 +3376,10 @@ function openModal(config) {
|
|
|
3376
3376
|
let currentConfig = config;
|
|
3377
3377
|
let currentOpen = true;
|
|
3378
3378
|
let destroyed = false;
|
|
3379
|
-
let
|
|
3379
|
+
let mounted = false;
|
|
3380
3380
|
function cleanup2() {
|
|
3381
3381
|
if (destroyed) return;
|
|
3382
3382
|
destroyed = true;
|
|
3383
|
-
if (cleanupTimer !== void 0) window.clearTimeout(cleanupTimer);
|
|
3384
3383
|
root.unmount();
|
|
3385
3384
|
container.remove();
|
|
3386
3385
|
modalHandles.delete(handle);
|
|
@@ -3389,13 +3388,25 @@ function openModal(config) {
|
|
|
3389
3388
|
if (destroyed || !currentOpen) return;
|
|
3390
3389
|
currentOpen = false;
|
|
3391
3390
|
render();
|
|
3392
|
-
cleanupTimer = window.setTimeout(cleanup2, MODAL_MOTION_DURATION);
|
|
3393
3391
|
}
|
|
3394
|
-
function
|
|
3395
|
-
|
|
3392
|
+
function ModalInstance() {
|
|
3393
|
+
(0, import_react19.useEffect)(() => {
|
|
3394
|
+
mounted = true;
|
|
3395
|
+
if (!currentOpen) render();
|
|
3396
|
+
}, []);
|
|
3397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModalRoot, { ...currentConfig, open: !mounted || currentOpen, onOpenChange: (nextOpen) => {
|
|
3396
3398
|
currentConfig.onOpenChange?.(nextOpen);
|
|
3397
3399
|
if (!nextOpen) closeWithMotion();
|
|
3398
|
-
}
|
|
3400
|
+
}, afterOpenChange: (nextOpen) => {
|
|
3401
|
+
try {
|
|
3402
|
+
currentConfig.afterOpenChange?.(nextOpen);
|
|
3403
|
+
} finally {
|
|
3404
|
+
if (!nextOpen) queueMicrotask(cleanup2);
|
|
3405
|
+
}
|
|
3406
|
+
} });
|
|
3407
|
+
}
|
|
3408
|
+
function render() {
|
|
3409
|
+
root.render(/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ModalInstance, {}));
|
|
3399
3410
|
}
|
|
3400
3411
|
const handle = {
|
|
3401
3412
|
destroy: closeWithMotion,
|
|
@@ -3421,7 +3432,7 @@ function preset(type, defaults = {}) {
|
|
|
3421
3432
|
});
|
|
3422
3433
|
}
|
|
3423
3434
|
var Modal2 = Object.assign(ModalRoot, {
|
|
3424
|
-
/**
|
|
3435
|
+
/** 直接打开实例,返回更新和关闭句柄;关闭动画完成后先调用 afterOpenChange(false),再卸载实例。 */
|
|
3425
3436
|
open: openModal,
|
|
3426
3437
|
/** 显示普通信息提示。 */
|
|
3427
3438
|
info: preset("info", { title: "\u63D0\u793A" }),
|
|
@@ -3803,7 +3814,7 @@ var Select = (0, import_react23.forwardRef)(function Select2({
|
|
|
3803
3814
|
status = "default",
|
|
3804
3815
|
allowClear = true,
|
|
3805
3816
|
loading = false,
|
|
3806
|
-
showSearch
|
|
3817
|
+
showSearch: showSearchProp,
|
|
3807
3818
|
showValue = false,
|
|
3808
3819
|
allowInput = false,
|
|
3809
3820
|
inputMaxLength,
|
|
@@ -3825,6 +3836,7 @@ var Select = (0, import_react23.forwardRef)(function Select2({
|
|
|
3825
3836
|
onKeyDown,
|
|
3826
3837
|
...props
|
|
3827
3838
|
}, forwardedRef) {
|
|
3839
|
+
const showSearch = showSearchProp ?? options.length > 15;
|
|
3828
3840
|
const size = useControlSize(sizeProp);
|
|
3829
3841
|
const fallbackId = (0, import_react23.useId)();
|
|
3830
3842
|
const selectId = id ?? fallbackId;
|
package/dist/core.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-
|
|
2
|
-
export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-
|
|
1
|
+
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-DErc-oXr.cjs';
|
|
2
|
+
export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-Bv2AmXRD.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-Bx4B28Wh.cjs';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-
|
|
2
|
-
export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-
|
|
1
|
+
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-CFukvTes.js';
|
|
2
|
+
export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-Cc1owuvN.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-Bx4B28Wh.js';
|
package/dist/core.js
CHANGED
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
Typography,
|
|
11
11
|
Upload,
|
|
12
12
|
message
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QDZXP2UO.js";
|
|
14
14
|
import "./chunk-SMCYEPBL.js";
|
|
15
15
|
import {
|
|
16
16
|
Modal,
|
|
17
17
|
Select
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TKCXP6RZ.js";
|
|
19
19
|
import {
|
|
20
20
|
Icon,
|
|
21
21
|
Input,
|
package/dist/index.cjs
CHANGED
|
@@ -2236,11 +2236,10 @@ function openModal(config) {
|
|
|
2236
2236
|
let currentConfig = config;
|
|
2237
2237
|
let currentOpen = true;
|
|
2238
2238
|
let destroyed = false;
|
|
2239
|
-
let
|
|
2239
|
+
let mounted = false;
|
|
2240
2240
|
function cleanup2() {
|
|
2241
2241
|
if (destroyed) return;
|
|
2242
2242
|
destroyed = true;
|
|
2243
|
-
if (cleanupTimer !== void 0) window.clearTimeout(cleanupTimer);
|
|
2244
2243
|
root.unmount();
|
|
2245
2244
|
container.remove();
|
|
2246
2245
|
modalHandles.delete(handle);
|
|
@@ -2249,13 +2248,25 @@ function openModal(config) {
|
|
|
2249
2248
|
if (destroyed || !currentOpen) return;
|
|
2250
2249
|
currentOpen = false;
|
|
2251
2250
|
render();
|
|
2252
|
-
cleanupTimer = window.setTimeout(cleanup2, MODAL_MOTION_DURATION);
|
|
2253
2251
|
}
|
|
2254
|
-
function
|
|
2255
|
-
|
|
2252
|
+
function ModalInstance() {
|
|
2253
|
+
(0, import_react11.useEffect)(() => {
|
|
2254
|
+
mounted = true;
|
|
2255
|
+
if (!currentOpen) render();
|
|
2256
|
+
}, []);
|
|
2257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ModalRoot, { ...currentConfig, open: !mounted || currentOpen, onOpenChange: (nextOpen) => {
|
|
2256
2258
|
currentConfig.onOpenChange?.(nextOpen);
|
|
2257
2259
|
if (!nextOpen) closeWithMotion();
|
|
2258
|
-
}
|
|
2260
|
+
}, afterOpenChange: (nextOpen) => {
|
|
2261
|
+
try {
|
|
2262
|
+
currentConfig.afterOpenChange?.(nextOpen);
|
|
2263
|
+
} finally {
|
|
2264
|
+
if (!nextOpen) queueMicrotask(cleanup2);
|
|
2265
|
+
}
|
|
2266
|
+
} });
|
|
2267
|
+
}
|
|
2268
|
+
function render() {
|
|
2269
|
+
root.render(/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ModalInstance, {}));
|
|
2259
2270
|
}
|
|
2260
2271
|
const handle = {
|
|
2261
2272
|
destroy: closeWithMotion,
|
|
@@ -2281,7 +2292,7 @@ function preset(type, defaults = {}) {
|
|
|
2281
2292
|
});
|
|
2282
2293
|
}
|
|
2283
2294
|
var Modal2 = Object.assign(ModalRoot, {
|
|
2284
|
-
/**
|
|
2295
|
+
/** 直接打开实例,返回更新和关闭句柄;关闭动画完成后先调用 afterOpenChange(false),再卸载实例。 */
|
|
2285
2296
|
open: openModal,
|
|
2286
2297
|
/** 显示普通信息提示。 */
|
|
2287
2298
|
info: preset("info", { title: "\u63D0\u793A" }),
|
|
@@ -3799,7 +3810,7 @@ var Select = (0, import_react19.forwardRef)(function Select2({
|
|
|
3799
3810
|
status = "default",
|
|
3800
3811
|
allowClear = true,
|
|
3801
3812
|
loading = false,
|
|
3802
|
-
showSearch
|
|
3813
|
+
showSearch: showSearchProp,
|
|
3803
3814
|
showValue = false,
|
|
3804
3815
|
allowInput = false,
|
|
3805
3816
|
inputMaxLength,
|
|
@@ -3821,6 +3832,7 @@ var Select = (0, import_react19.forwardRef)(function Select2({
|
|
|
3821
3832
|
onKeyDown,
|
|
3822
3833
|
...props
|
|
3823
3834
|
}, forwardedRef) {
|
|
3835
|
+
const showSearch = showSearchProp ?? options.length > 15;
|
|
3824
3836
|
const size = useControlSize(sizeProp);
|
|
3825
3837
|
const fallbackId = (0, import_react19.useId)();
|
|
3826
3838
|
const selectId = id ?? fallbackId;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
2
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-
|
|
1
|
+
import { T as TagStatus, B as BadgeProps } from './core-DErc-oXr.cjs';
|
|
2
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-DErc-oXr.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
|
|
6
|
-
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-
|
|
7
|
-
export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-
|
|
8
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
6
|
+
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-Bv2AmXRD.cjs';
|
|
7
|
+
export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-Bv2AmXRD.cjs';
|
|
8
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-DN4eBuVx.cjs';
|
|
9
9
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.cjs';
|
|
10
10
|
export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.cjs';
|
|
11
11
|
import * as Monaco from 'monaco-editor';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
2
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-
|
|
1
|
+
import { T as TagStatus, B as BadgeProps } from './core-CFukvTes.js';
|
|
2
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewProps, S as ImageProps, U as Input, V as InputProps, W as Menu, X as MenuClickInfo, Y as MenuItem, Z as MenuMode, _ as MenuProps, $ as MenuTheme, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, a4 as NotificationConfig, a5 as NotificationPlacement, a6 as NotificationType, a7 as Popconfirm, a8 as PopconfirmProps, a9 as Popover, aa as PopoverProps, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ae as Rate, af as RateProps, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, ak as Spin, al as SpinProps, am as StepItem, an as StepStatus, ao as Steps, ap as StepsProps, aq as TabItem, ar as Tabs, as as TabsContextMenuClickInfo, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, aA as TagVariant, aB as Timeline, aC as TimelineItem, aD as TimelineProps, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aH as Tooltip, aI as TooltipProps, aJ as Tour, aK as TourProps, aL as TourStep, aM as Tree, aN as TreeDropPosition, aO as TreeKey, aP as TreeNode, aQ as TreeProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, a$ as UploadHttpRequest, b0 as UploadItemActions, b1 as UploadProps, b2 as UploadRef, b3 as UploadRejectInfo, b4 as UploadRequestHandle, b5 as UploadRequestOptions, b6 as Watermark, b7 as WatermarkFont, b8 as WatermarkProps, b9 as message, ba as notification } from './core-CFukvTes.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
|
|
6
|
-
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-
|
|
7
|
-
export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-
|
|
8
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
6
|
+
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-Cc1owuvN.js';
|
|
7
|
+
export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-Cc1owuvN.js';
|
|
8
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-YrK9kuKW.js';
|
|
9
9
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.js';
|
|
10
10
|
export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.js';
|
|
11
11
|
import * as Monaco from 'monaco-editor';
|
package/dist/index.js
CHANGED
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
Watermark,
|
|
81
81
|
message,
|
|
82
82
|
notification
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-QDZXP2UO.js";
|
|
84
84
|
import {
|
|
85
85
|
TextArea
|
|
86
86
|
} from "./chunk-SMCYEPBL.js";
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
DatePicker,
|
|
96
96
|
SelectDateRange,
|
|
97
97
|
TimePanel
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-TG7ZYXA7.js";
|
|
99
99
|
import {
|
|
100
100
|
Checkbox,
|
|
101
101
|
FloatingScrollbarProvider,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
Tree,
|
|
111
111
|
useOverlayLifecycle,
|
|
112
112
|
useScrollbarProximity
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-TKCXP6RZ.js";
|
|
114
114
|
import {
|
|
115
115
|
Dropdown,
|
|
116
116
|
FILLED_ICON_NAMES,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { InputHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
|
|
4
|
-
import { S as SelectOption, m as SelectValue } from './Select-
|
|
4
|
+
import { S as SelectOption, m as SelectValue } from './Select-Bv2AmXRD.cjs';
|
|
5
5
|
|
|
6
6
|
/** 日期选择附带的时间选择配置。 */
|
|
7
7
|
type DatePickerShowTime = boolean | {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { InputHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-Bx4B28Wh.js';
|
|
4
|
-
import { S as SelectOption, m as SelectValue } from './Select-
|
|
4
|
+
import { S as SelectOption, m as SelectValue } from './Select-Cc1owuvN.js';
|
|
5
5
|
|
|
6
6
|
/** 日期选择附带的时间选择配置。 */
|
|
7
7
|
type DatePickerShowTime = boolean | {
|
|
@@ -2659,11 +2659,10 @@ function openModal(config) {
|
|
|
2659
2659
|
let currentConfig = config;
|
|
2660
2660
|
let currentOpen = true;
|
|
2661
2661
|
let destroyed = false;
|
|
2662
|
-
let
|
|
2662
|
+
let mounted = false;
|
|
2663
2663
|
function cleanup2() {
|
|
2664
2664
|
if (destroyed) return;
|
|
2665
2665
|
destroyed = true;
|
|
2666
|
-
if (cleanupTimer !== void 0) window.clearTimeout(cleanupTimer);
|
|
2667
2666
|
root.unmount();
|
|
2668
2667
|
container.remove();
|
|
2669
2668
|
modalHandles.delete(handle);
|
|
@@ -2672,13 +2671,25 @@ function openModal(config) {
|
|
|
2672
2671
|
if (destroyed || !currentOpen) return;
|
|
2673
2672
|
currentOpen = false;
|
|
2674
2673
|
render();
|
|
2675
|
-
cleanupTimer = window.setTimeout(cleanup2, MODAL_MOTION_DURATION);
|
|
2676
2674
|
}
|
|
2677
|
-
function
|
|
2678
|
-
|
|
2675
|
+
function ModalInstance() {
|
|
2676
|
+
(0, import_react10.useEffect)(() => {
|
|
2677
|
+
mounted = true;
|
|
2678
|
+
if (!currentOpen) render();
|
|
2679
|
+
}, []);
|
|
2680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ModalRoot, { ...currentConfig, open: !mounted || currentOpen, onOpenChange: (nextOpen) => {
|
|
2679
2681
|
currentConfig.onOpenChange?.(nextOpen);
|
|
2680
2682
|
if (!nextOpen) closeWithMotion();
|
|
2681
|
-
}
|
|
2683
|
+
}, afterOpenChange: (nextOpen) => {
|
|
2684
|
+
try {
|
|
2685
|
+
currentConfig.afterOpenChange?.(nextOpen);
|
|
2686
|
+
} finally {
|
|
2687
|
+
if (!nextOpen) queueMicrotask(cleanup2);
|
|
2688
|
+
}
|
|
2689
|
+
} });
|
|
2690
|
+
}
|
|
2691
|
+
function render() {
|
|
2692
|
+
root.render(/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ModalInstance, {}));
|
|
2682
2693
|
}
|
|
2683
2694
|
const handle = {
|
|
2684
2695
|
destroy: closeWithMotion,
|
|
@@ -2704,7 +2715,7 @@ function preset(type, defaults = {}) {
|
|
|
2704
2715
|
});
|
|
2705
2716
|
}
|
|
2706
2717
|
var Modal2 = Object.assign(ModalRoot, {
|
|
2707
|
-
/**
|
|
2718
|
+
/** 直接打开实例,返回更新和关闭句柄;关闭动画完成后先调用 afterOpenChange(false),再卸载实例。 */
|
|
2708
2719
|
open: openModal,
|
|
2709
2720
|
/** 显示普通信息提示。 */
|
|
2710
2721
|
info: preset("info", { title: "\u63D0\u793A" }),
|
|
@@ -3418,7 +3429,7 @@ var Select = (0, import_react16.forwardRef)(function Select2({
|
|
|
3418
3429
|
status = "default",
|
|
3419
3430
|
allowClear = true,
|
|
3420
3431
|
loading = false,
|
|
3421
|
-
showSearch
|
|
3432
|
+
showSearch: showSearchProp,
|
|
3422
3433
|
showValue = false,
|
|
3423
3434
|
allowInput = false,
|
|
3424
3435
|
inputMaxLength,
|
|
@@ -3440,6 +3451,7 @@ var Select = (0, import_react16.forwardRef)(function Select2({
|
|
|
3440
3451
|
onKeyDown,
|
|
3441
3452
|
...props
|
|
3442
3453
|
}, forwardedRef) {
|
|
3454
|
+
const showSearch = showSearchProp ?? options.length > 15;
|
|
3443
3455
|
const size = useControlSize(sizeProp);
|
|
3444
3456
|
const fallbackId = (0, import_react16.useId)();
|
|
3445
3457
|
const selectId = id ?? fallbackId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
1
|
+
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-DN4eBuVx.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './shared-Bx4B28Wh.cjs';
|
|
4
|
-
import './Select-
|
|
4
|
+
import './Select-Bv2AmXRD.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
1
|
+
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-YrK9kuKW.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './shared-Bx4B28Wh.js';
|
|
4
|
-
import './Select-
|
|
4
|
+
import './Select-Cc1owuvN.js';
|