@sia.soul/sia-react-ui 0.1.21 → 0.1.23
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-BO3VyE2n.d.cts +305 -0
- package/dist/Select-BoVx-D0D.d.ts +305 -0
- package/dist/{chunk-VN6PIPP7.js → chunk-GM47DAAN.js} +1 -1
- package/dist/{chunk-7RNS52YG.js → chunk-NPB33IXJ.js} +1 -1
- package/dist/{chunk-3TRRBMXY.js → chunk-VX2JECOU.js} +24 -5
- package/dist/{core-DeZknKwc.d.ts → core-Cqgl6Z7h.d.ts} +3 -160
- package/dist/{core-C5OnrCi4.d.cts → core-DF0pknX6.d.cts} +3 -160
- package/dist/core.cjs +24 -5
- package/dist/core.css +19 -4
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/index.cjs +67 -11
- package/dist/index.css +19 -4
- package/dist/index.d.cts +12 -8
- package/dist/index.d.ts +12 -8
- package/dist/index.js +46 -9
- package/dist/{select-date-range-DDmYGDD4.d.cts → select-date-range-IOe6MMqu.d.cts} +1 -1
- package/dist/{select-date-range-CGRb3-W8.d.ts → select-date-range-a6nzK7Wu.d.ts} +1 -1
- package/dist/select-date-range.cjs +24 -5
- 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
- package/dist/Select-4hGJt3RJ.d.cts +0 -142
- package/dist/Select-BNSE67xn.d.ts +0 -142
|
@@ -1,46 +1,7 @@
|
|
|
1
|
+
import { B as ButtonProps, f as Button } from './Select-BoVx-D0D.js';
|
|
1
2
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
+
import { HTMLAttributes, ReactNode, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
4
|
import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-Bx4B28Wh.js';
|
|
4
|
-
import './Select-BNSE67xn.js';
|
|
5
|
-
|
|
6
|
-
/** 按钮视觉样式,可选择主按钮、默认按钮、文本按钮或链接等形式。 */
|
|
7
|
-
type ButtonVariant = "primary" | "default" | "dashed" | "filled" | "text" | "link";
|
|
8
|
-
/** 按钮尺寸等级。 */
|
|
9
|
-
type ButtonSize = ControlSize;
|
|
10
|
-
/** 按钮的属性配置。 */
|
|
11
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
|
-
/**
|
|
13
|
-
组件的视觉样式。
|
|
14
|
-
* @defaultValue "default"
|
|
15
|
-
*/
|
|
16
|
-
variant?: ButtonVariant;
|
|
17
|
-
/** small / medium / large 高度为 22 / 30 / 38px;默认继承 Form,组件自身 size 优先 */
|
|
18
|
-
size?: ButtonSize;
|
|
19
|
-
/**
|
|
20
|
-
* 显示加载状态并禁止重复点击
|
|
21
|
-
* @defaultValue false
|
|
22
|
-
*/
|
|
23
|
-
loading?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* 宽度撑满父容器
|
|
26
|
-
* @defaultValue false
|
|
27
|
-
*/
|
|
28
|
-
block?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* 危险操作样式
|
|
31
|
-
* @defaultValue false
|
|
32
|
-
*/
|
|
33
|
-
danger?: boolean;
|
|
34
|
-
/** 按钮图标 */
|
|
35
|
-
icon?: ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* 图标位置
|
|
38
|
-
* @defaultValue "start"
|
|
39
|
-
*/
|
|
40
|
-
iconPosition?: "start" | "end";
|
|
41
|
-
}
|
|
42
|
-
/** 按钮组件。 */
|
|
43
|
-
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
44
5
|
|
|
45
6
|
/** 卡片强调装饰的显示方式。 */
|
|
46
7
|
type CardAccent = "primary" | "success" | "warning" | "error";
|
|
@@ -1918,124 +1879,6 @@ declare const Upload: typeof UploadRoot & {
|
|
|
1918
1879
|
LIST_IGNORE: symbol;
|
|
1919
1880
|
};
|
|
1920
1881
|
|
|
1921
|
-
/** 弹层挂载节点或返回挂载节点的函数。 */
|
|
1922
|
-
type OverlayContainer = HTMLElement | (() => HTMLElement);
|
|
1923
|
-
|
|
1924
|
-
/** 模态框的类型标识。 */
|
|
1925
|
-
type ModalType = "default" | "info" | "success" | "warning" | "error" | "confirm";
|
|
1926
|
-
/** 确认操作的返回值;false 阻止关闭,Promise 可用于等待异步操作。 */
|
|
1927
|
-
type ModalActionResult = void | boolean | Promise<void | boolean>;
|
|
1928
|
-
/** 模态框的属性配置。 */
|
|
1929
|
-
interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "onSubmit"> {
|
|
1930
|
-
/** 是否显示对话框 */
|
|
1931
|
-
open: boolean;
|
|
1932
|
-
/** 标题 */
|
|
1933
|
-
title?: ReactNode;
|
|
1934
|
-
/** 子内容;组件嵌套内容或当前节点的子项。 */
|
|
1935
|
-
children?: ReactNode;
|
|
1936
|
-
/** 自定义底部操作区,传 null 隐藏 */
|
|
1937
|
-
footer?: ReactNode | null;
|
|
1938
|
-
/** 默认底部操作区左侧的扩展内容。 */
|
|
1939
|
-
footerExtra?: ReactNode;
|
|
1940
|
-
/**
|
|
1941
|
-
* 类型标识,用于选择对应的表现形式。
|
|
1942
|
-
* @defaultValue "default"
|
|
1943
|
-
*/
|
|
1944
|
-
type?: ModalType;
|
|
1945
|
-
/**
|
|
1946
|
-
* 确定按钮文案。
|
|
1947
|
-
* @defaultValue "确定"
|
|
1948
|
-
*/
|
|
1949
|
-
okText?: ReactNode;
|
|
1950
|
-
/**
|
|
1951
|
-
* 取消按钮文案。
|
|
1952
|
-
* @defaultValue "取消"
|
|
1953
|
-
*/
|
|
1954
|
-
cancelText?: ReactNode;
|
|
1955
|
-
/**
|
|
1956
|
-
* 是否显示取消按钮。
|
|
1957
|
-
* @defaultValue type === "default" || type === "confirm"
|
|
1958
|
-
*/
|
|
1959
|
-
showCancel?: boolean;
|
|
1960
|
-
/**
|
|
1961
|
-
* 确定操作是否正在执行;为 true 时阻止重复提交和关闭。
|
|
1962
|
-
* @defaultValue false
|
|
1963
|
-
*/
|
|
1964
|
-
confirmLoading?: boolean;
|
|
1965
|
-
/** 确定按钮的 Button 属性。 */
|
|
1966
|
-
okButtonProps?: ButtonProps;
|
|
1967
|
-
/** 取消按钮的 Button 属性。 */
|
|
1968
|
-
cancelButtonProps?: ButtonProps;
|
|
1969
|
-
/**
|
|
1970
|
-
* 是否显示关闭入口。
|
|
1971
|
-
* @defaultValue true
|
|
1972
|
-
*/
|
|
1973
|
-
closable?: boolean;
|
|
1974
|
-
/**
|
|
1975
|
-
* 点击遮罩时是否允许关闭。
|
|
1976
|
-
* @defaultValue true
|
|
1977
|
-
*/
|
|
1978
|
-
maskClosable?: boolean;
|
|
1979
|
-
/**
|
|
1980
|
-
* 是否允许通过 Esc 等键盘操作关闭。
|
|
1981
|
-
* @defaultValue true
|
|
1982
|
-
*/
|
|
1983
|
-
keyboard?: boolean;
|
|
1984
|
-
/**
|
|
1985
|
-
* 弹框是否垂直居中。
|
|
1986
|
-
* @defaultValue false
|
|
1987
|
-
*/
|
|
1988
|
-
centered?: boolean;
|
|
1989
|
-
/**
|
|
1990
|
-
* 宽度;数值按像素处理,字符串可使用 CSS 尺寸。
|
|
1991
|
-
* @defaultValue 520
|
|
1992
|
-
*/
|
|
1993
|
-
width?: number | string;
|
|
1994
|
-
/**
|
|
1995
|
-
组件或浮层的堆叠层级。
|
|
1996
|
-
* @defaultValue 1000
|
|
1997
|
-
*/
|
|
1998
|
-
zIndex?: number;
|
|
1999
|
-
/** 弹层挂载目标;可提供元素或返回元素的函数,默认挂载到页面容器。 */
|
|
2000
|
-
getContainer?: OverlayContainer;
|
|
2001
|
-
/** 确认回调,支持 Promise 与返回 false 阻止关闭 */
|
|
2002
|
-
onOk?: () => ModalActionResult;
|
|
2003
|
-
/** 用户取消或通过关闭入口退出时调用。 */
|
|
2004
|
-
onCancel?: () => void;
|
|
2005
|
-
/** 打开状态变化回调 */
|
|
2006
|
-
onOpenChange?: (open: boolean) => void;
|
|
2007
|
-
/** 动画完成后触发,适用于聚焦内容和释放外部挂载点。 */
|
|
2008
|
-
afterOpenChange?: (open: boolean) => void;
|
|
2009
|
-
}
|
|
2010
|
-
/** ModalOpen的配置。 */
|
|
2011
|
-
interface ModalOpenConfig extends Omit<ModalProps, "open"> {
|
|
2012
|
-
}
|
|
2013
|
-
/** OverlayApi的操作句柄。 */
|
|
2014
|
-
interface OverlayApiHandle<T> {
|
|
2015
|
-
/** 关闭弹层并在退出动画后释放挂载点。程序化关闭不会模拟用户取消按钮点击。 */
|
|
2016
|
-
destroy: () => void;
|
|
2017
|
-
/** 合并更新已打开弹层的配置,未提供的属性保留原值。 */
|
|
2018
|
-
update: (next: Partial<T>) => void;
|
|
2019
|
-
}
|
|
2020
|
-
declare function openModal(config: ModalOpenConfig): OverlayApiHandle<ModalOpenConfig>;
|
|
2021
|
-
/** 模态框组件。 */
|
|
2022
|
-
declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<HTMLDivElement>> & {
|
|
2023
|
-
/** 直接打开实例,返回可用于更新或关闭的操作句柄。 */
|
|
2024
|
-
open: typeof openModal;
|
|
2025
|
-
/** 显示普通信息提示。 */
|
|
2026
|
-
info: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2027
|
-
/** 显示成功提示。 */
|
|
2028
|
-
success: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2029
|
-
/** 显示警告提示。 */
|
|
2030
|
-
warning: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2031
|
-
/** 显示错误提示。 */
|
|
2032
|
-
error: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2033
|
-
/** 打开确认弹框,支持异步确认;返回 false 可阻止关闭。 */
|
|
2034
|
-
confirm: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2035
|
-
/** 关闭由此 API 打开的所有弹层。 */
|
|
2036
|
-
destroyAll(): void;
|
|
2037
|
-
};
|
|
2038
|
-
|
|
2039
1882
|
/** 全局消息的类型标识。 */
|
|
2040
1883
|
type MessageType = "info" | "success" | "warning" | "error" | "loading";
|
|
2041
1884
|
/** 全局消息的唯一标识,用于更新或关闭已有消息。 */
|
|
@@ -2285,4 +2128,4 @@ declare const FloatButton: react.ForwardRefExoticComponent<FloatButtonProps & re
|
|
|
2285
2128
|
BackTop: typeof FloatButtonBackTop;
|
|
2286
2129
|
};
|
|
2287
2130
|
|
|
2288
|
-
export { type
|
|
2131
|
+
export { type MenuTheme as $, type FloatButtonGroupProps as A, type BadgeProps as B, Calendar as C, Dropdown as D, type FloatButtonProps as E, FILLED_ICON_NAMES as F, type FloatButtonShape as G, type FloatingPlacement as H, type FloatingTrigger as I, ICON_NAMES as J, Icon as K, type IconName as L, type IconProps as M, type IconVariant as N, Image as O, ImagePreview as P, type ImagePreviewConfig as Q, type ImagePreviewProps as R, type ImageProps as S, type TagStatus as T, Input as U, type InputProps as V, Menu as W, type MenuClickInfo as X, type MenuItem as Y, type MenuMode as Z, type MenuProps as _, Badge as a, type WatermarkProps as a$, type MessageConfig as a0, type MessageHandle as a1, type MessageKey as a2, type MessageType as a3, type NotificationConfig as a4, type NotificationPlacement as a5, type NotificationType as a6, Popconfirm as a7, type PopconfirmProps as a8, Popover as a9, Timeline as aA, type TimelineItem as aB, type TimelineProps as aC, Tooltip as aD, type TooltipProps as aE, Tour as aF, type TourProps as aG, type TourStep as aH, Tree as aI, type TreeDropPosition as aJ, type TreeKey as aK, type TreeNode as aL, type TreeProps as aM, Typography as aN, type TypographyLinkProps as aO, type TypographyProps as aP, type TypographyTitleProps as aQ, type TypographyType as aR, Upload as aS, type UploadChangeInfo as aT, type UploadDraggerProps as aU, type UploadFile as aV, type UploadFileStatus as aW, type UploadProps as aX, type UploadRequestOptions as aY, Watermark as aZ, type WatermarkFont as a_, type PopoverProps as aa, Progress as ab, type ProgressProps as ac, type ProgressStatus as ad, Rate as ae, type RateProps as af, Segmented as ag, type SegmentedOption as ah, type SegmentedProps as ai, type SegmentedValue as aj, Spin as ak, type SpinProps as al, type StepItem as am, type StepStatus as an, Steps as ao, type StepsProps as ap, type TabItem as aq, Tabs as ar, type TabsContextMenuClickInfo as as, type TabsOrientation as at, type TabsPosition as au, type TabsProps as av, type TabsType as aw, Tag as ax, type TagProps as ay, type TagVariant as az, type BadgeRibbonProps as b, message as b0, notification as b1, type BadgeStatus as c, Breadcrumb as d, type BreadcrumbItem as e, type BreadcrumbProps as f, type CalendarProps as g, Card as h, type CardAccent as i, type CardProps as j, Carousel as k, type CarouselProps as l, type CarouselRef as m, Collapse as n, type CollapseItem as o, type CollapseKey as p, type CollapseProps as q, type DropdownButtonProps as r, type DropdownMenuProps as s, type DropdownOpenSource as t, type DropdownPlacement as u, type DropdownProps as v, type DropdownTrigger as w, type FilledIconName as x, FloatButton as y, type FloatButtonBackTopProps as z };
|
|
@@ -1,46 +1,7 @@
|
|
|
1
|
+
import { B as ButtonProps, f as Button } from './Select-BO3VyE2n.cjs';
|
|
1
2
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
+
import { HTMLAttributes, ReactNode, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
4
|
import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-Bx4B28Wh.cjs';
|
|
4
|
-
import './Select-4hGJt3RJ.cjs';
|
|
5
|
-
|
|
6
|
-
/** 按钮视觉样式,可选择主按钮、默认按钮、文本按钮或链接等形式。 */
|
|
7
|
-
type ButtonVariant = "primary" | "default" | "dashed" | "filled" | "text" | "link";
|
|
8
|
-
/** 按钮尺寸等级。 */
|
|
9
|
-
type ButtonSize = ControlSize;
|
|
10
|
-
/** 按钮的属性配置。 */
|
|
11
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
|
-
/**
|
|
13
|
-
组件的视觉样式。
|
|
14
|
-
* @defaultValue "default"
|
|
15
|
-
*/
|
|
16
|
-
variant?: ButtonVariant;
|
|
17
|
-
/** small / medium / large 高度为 22 / 30 / 38px;默认继承 Form,组件自身 size 优先 */
|
|
18
|
-
size?: ButtonSize;
|
|
19
|
-
/**
|
|
20
|
-
* 显示加载状态并禁止重复点击
|
|
21
|
-
* @defaultValue false
|
|
22
|
-
*/
|
|
23
|
-
loading?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* 宽度撑满父容器
|
|
26
|
-
* @defaultValue false
|
|
27
|
-
*/
|
|
28
|
-
block?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* 危险操作样式
|
|
31
|
-
* @defaultValue false
|
|
32
|
-
*/
|
|
33
|
-
danger?: boolean;
|
|
34
|
-
/** 按钮图标 */
|
|
35
|
-
icon?: ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* 图标位置
|
|
38
|
-
* @defaultValue "start"
|
|
39
|
-
*/
|
|
40
|
-
iconPosition?: "start" | "end";
|
|
41
|
-
}
|
|
42
|
-
/** 按钮组件。 */
|
|
43
|
-
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
44
5
|
|
|
45
6
|
/** 卡片强调装饰的显示方式。 */
|
|
46
7
|
type CardAccent = "primary" | "success" | "warning" | "error";
|
|
@@ -1918,124 +1879,6 @@ declare const Upload: typeof UploadRoot & {
|
|
|
1918
1879
|
LIST_IGNORE: symbol;
|
|
1919
1880
|
};
|
|
1920
1881
|
|
|
1921
|
-
/** 弹层挂载节点或返回挂载节点的函数。 */
|
|
1922
|
-
type OverlayContainer = HTMLElement | (() => HTMLElement);
|
|
1923
|
-
|
|
1924
|
-
/** 模态框的类型标识。 */
|
|
1925
|
-
type ModalType = "default" | "info" | "success" | "warning" | "error" | "confirm";
|
|
1926
|
-
/** 确认操作的返回值;false 阻止关闭,Promise 可用于等待异步操作。 */
|
|
1927
|
-
type ModalActionResult = void | boolean | Promise<void | boolean>;
|
|
1928
|
-
/** 模态框的属性配置。 */
|
|
1929
|
-
interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "onSubmit"> {
|
|
1930
|
-
/** 是否显示对话框 */
|
|
1931
|
-
open: boolean;
|
|
1932
|
-
/** 标题 */
|
|
1933
|
-
title?: ReactNode;
|
|
1934
|
-
/** 子内容;组件嵌套内容或当前节点的子项。 */
|
|
1935
|
-
children?: ReactNode;
|
|
1936
|
-
/** 自定义底部操作区,传 null 隐藏 */
|
|
1937
|
-
footer?: ReactNode | null;
|
|
1938
|
-
/** 默认底部操作区左侧的扩展内容。 */
|
|
1939
|
-
footerExtra?: ReactNode;
|
|
1940
|
-
/**
|
|
1941
|
-
* 类型标识,用于选择对应的表现形式。
|
|
1942
|
-
* @defaultValue "default"
|
|
1943
|
-
*/
|
|
1944
|
-
type?: ModalType;
|
|
1945
|
-
/**
|
|
1946
|
-
* 确定按钮文案。
|
|
1947
|
-
* @defaultValue "确定"
|
|
1948
|
-
*/
|
|
1949
|
-
okText?: ReactNode;
|
|
1950
|
-
/**
|
|
1951
|
-
* 取消按钮文案。
|
|
1952
|
-
* @defaultValue "取消"
|
|
1953
|
-
*/
|
|
1954
|
-
cancelText?: ReactNode;
|
|
1955
|
-
/**
|
|
1956
|
-
* 是否显示取消按钮。
|
|
1957
|
-
* @defaultValue type === "default" || type === "confirm"
|
|
1958
|
-
*/
|
|
1959
|
-
showCancel?: boolean;
|
|
1960
|
-
/**
|
|
1961
|
-
* 确定操作是否正在执行;为 true 时阻止重复提交和关闭。
|
|
1962
|
-
* @defaultValue false
|
|
1963
|
-
*/
|
|
1964
|
-
confirmLoading?: boolean;
|
|
1965
|
-
/** 确定按钮的 Button 属性。 */
|
|
1966
|
-
okButtonProps?: ButtonProps;
|
|
1967
|
-
/** 取消按钮的 Button 属性。 */
|
|
1968
|
-
cancelButtonProps?: ButtonProps;
|
|
1969
|
-
/**
|
|
1970
|
-
* 是否显示关闭入口。
|
|
1971
|
-
* @defaultValue true
|
|
1972
|
-
*/
|
|
1973
|
-
closable?: boolean;
|
|
1974
|
-
/**
|
|
1975
|
-
* 点击遮罩时是否允许关闭。
|
|
1976
|
-
* @defaultValue true
|
|
1977
|
-
*/
|
|
1978
|
-
maskClosable?: boolean;
|
|
1979
|
-
/**
|
|
1980
|
-
* 是否允许通过 Esc 等键盘操作关闭。
|
|
1981
|
-
* @defaultValue true
|
|
1982
|
-
*/
|
|
1983
|
-
keyboard?: boolean;
|
|
1984
|
-
/**
|
|
1985
|
-
* 弹框是否垂直居中。
|
|
1986
|
-
* @defaultValue false
|
|
1987
|
-
*/
|
|
1988
|
-
centered?: boolean;
|
|
1989
|
-
/**
|
|
1990
|
-
* 宽度;数值按像素处理,字符串可使用 CSS 尺寸。
|
|
1991
|
-
* @defaultValue 520
|
|
1992
|
-
*/
|
|
1993
|
-
width?: number | string;
|
|
1994
|
-
/**
|
|
1995
|
-
组件或浮层的堆叠层级。
|
|
1996
|
-
* @defaultValue 1000
|
|
1997
|
-
*/
|
|
1998
|
-
zIndex?: number;
|
|
1999
|
-
/** 弹层挂载目标;可提供元素或返回元素的函数,默认挂载到页面容器。 */
|
|
2000
|
-
getContainer?: OverlayContainer;
|
|
2001
|
-
/** 确认回调,支持 Promise 与返回 false 阻止关闭 */
|
|
2002
|
-
onOk?: () => ModalActionResult;
|
|
2003
|
-
/** 用户取消或通过关闭入口退出时调用。 */
|
|
2004
|
-
onCancel?: () => void;
|
|
2005
|
-
/** 打开状态变化回调 */
|
|
2006
|
-
onOpenChange?: (open: boolean) => void;
|
|
2007
|
-
/** 动画完成后触发,适用于聚焦内容和释放外部挂载点。 */
|
|
2008
|
-
afterOpenChange?: (open: boolean) => void;
|
|
2009
|
-
}
|
|
2010
|
-
/** ModalOpen的配置。 */
|
|
2011
|
-
interface ModalOpenConfig extends Omit<ModalProps, "open"> {
|
|
2012
|
-
}
|
|
2013
|
-
/** OverlayApi的操作句柄。 */
|
|
2014
|
-
interface OverlayApiHandle<T> {
|
|
2015
|
-
/** 关闭弹层并在退出动画后释放挂载点。程序化关闭不会模拟用户取消按钮点击。 */
|
|
2016
|
-
destroy: () => void;
|
|
2017
|
-
/** 合并更新已打开弹层的配置,未提供的属性保留原值。 */
|
|
2018
|
-
update: (next: Partial<T>) => void;
|
|
2019
|
-
}
|
|
2020
|
-
declare function openModal(config: ModalOpenConfig): OverlayApiHandle<ModalOpenConfig>;
|
|
2021
|
-
/** 模态框组件。 */
|
|
2022
|
-
declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<HTMLDivElement>> & {
|
|
2023
|
-
/** 直接打开实例,返回可用于更新或关闭的操作句柄。 */
|
|
2024
|
-
open: typeof openModal;
|
|
2025
|
-
/** 显示普通信息提示。 */
|
|
2026
|
-
info: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2027
|
-
/** 显示成功提示。 */
|
|
2028
|
-
success: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2029
|
-
/** 显示警告提示。 */
|
|
2030
|
-
warning: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2031
|
-
/** 显示错误提示。 */
|
|
2032
|
-
error: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2033
|
-
/** 打开确认弹框,支持异步确认;返回 false 可阻止关闭。 */
|
|
2034
|
-
confirm: (config: ModalOpenConfig) => OverlayApiHandle<ModalOpenConfig>;
|
|
2035
|
-
/** 关闭由此 API 打开的所有弹层。 */
|
|
2036
|
-
destroyAll(): void;
|
|
2037
|
-
};
|
|
2038
|
-
|
|
2039
1882
|
/** 全局消息的类型标识。 */
|
|
2040
1883
|
type MessageType = "info" | "success" | "warning" | "error" | "loading";
|
|
2041
1884
|
/** 全局消息的唯一标识,用于更新或关闭已有消息。 */
|
|
@@ -2285,4 +2128,4 @@ declare const FloatButton: react.ForwardRefExoticComponent<FloatButtonProps & re
|
|
|
2285
2128
|
BackTop: typeof FloatButtonBackTop;
|
|
2286
2129
|
};
|
|
2287
2130
|
|
|
2288
|
-
export { type
|
|
2131
|
+
export { type MenuTheme as $, type FloatButtonGroupProps as A, type BadgeProps as B, Calendar as C, Dropdown as D, type FloatButtonProps as E, FILLED_ICON_NAMES as F, type FloatButtonShape as G, type FloatingPlacement as H, type FloatingTrigger as I, ICON_NAMES as J, Icon as K, type IconName as L, type IconProps as M, type IconVariant as N, Image as O, ImagePreview as P, type ImagePreviewConfig as Q, type ImagePreviewProps as R, type ImageProps as S, type TagStatus as T, Input as U, type InputProps as V, Menu as W, type MenuClickInfo as X, type MenuItem as Y, type MenuMode as Z, type MenuProps as _, Badge as a, type WatermarkProps as a$, type MessageConfig as a0, type MessageHandle as a1, type MessageKey as a2, type MessageType as a3, type NotificationConfig as a4, type NotificationPlacement as a5, type NotificationType as a6, Popconfirm as a7, type PopconfirmProps as a8, Popover as a9, Timeline as aA, type TimelineItem as aB, type TimelineProps as aC, Tooltip as aD, type TooltipProps as aE, Tour as aF, type TourProps as aG, type TourStep as aH, Tree as aI, type TreeDropPosition as aJ, type TreeKey as aK, type TreeNode as aL, type TreeProps as aM, Typography as aN, type TypographyLinkProps as aO, type TypographyProps as aP, type TypographyTitleProps as aQ, type TypographyType as aR, Upload as aS, type UploadChangeInfo as aT, type UploadDraggerProps as aU, type UploadFile as aV, type UploadFileStatus as aW, type UploadProps as aX, type UploadRequestOptions as aY, Watermark as aZ, type WatermarkFont as a_, type PopoverProps as aa, Progress as ab, type ProgressProps as ac, type ProgressStatus as ad, Rate as ae, type RateProps as af, Segmented as ag, type SegmentedOption as ah, type SegmentedProps as ai, type SegmentedValue as aj, Spin as ak, type SpinProps as al, type StepItem as am, type StepStatus as an, Steps as ao, type StepsProps as ap, type TabItem as aq, Tabs as ar, type TabsContextMenuClickInfo as as, type TabsOrientation as at, type TabsPosition as au, type TabsProps as av, type TabsType as aw, Tag as ax, type TagProps as ay, type TagVariant as az, type BadgeRibbonProps as b, message as b0, notification as b1, type BadgeStatus as c, Breadcrumb as d, type BreadcrumbItem as e, type BreadcrumbProps as f, type CalendarProps as g, Card as h, type CardAccent as i, type CardProps as j, Carousel as k, type CarouselProps as l, type CarouselRef as m, Collapse as n, type CollapseItem as o, type CollapseKey as p, type CollapseProps as q, type DropdownButtonProps as r, type DropdownMenuProps as s, type DropdownOpenSource as t, type DropdownPlacement as u, type DropdownProps as v, type DropdownTrigger as w, type FilledIconName as x, FloatButton as y, type FloatButtonBackTopProps as z };
|
package/dist/core.cjs
CHANGED
|
@@ -3313,6 +3313,8 @@ var Select = (0, import_react20.forwardRef)(function Select2({
|
|
|
3313
3313
|
const [openedMode, setOpenedMode] = (0, import_react20.useState)(automaticMode);
|
|
3314
3314
|
const popupMode = open ? openedMode : automaticMode;
|
|
3315
3315
|
const [modalValues, setModalValues] = (0, import_react20.useState)([]);
|
|
3316
|
+
const [modalSubmitting, setModalSubmitting] = (0, import_react20.useState)(false);
|
|
3317
|
+
const modalSubmitLock = (0, import_react20.useRef)(false);
|
|
3316
3318
|
const [selectedOnly, setSelectedOnly] = (0, import_react20.useState)(false);
|
|
3317
3319
|
const [query, setQuery] = (0, import_react20.useState)("");
|
|
3318
3320
|
const [activeIndex, setActiveIndex] = (0, import_react20.useState)(-1);
|
|
@@ -3381,6 +3383,24 @@ var Select = (0, import_react20.forwardRef)(function Select2({
|
|
|
3381
3383
|
setQuery("");
|
|
3382
3384
|
setScrollTop(0);
|
|
3383
3385
|
}
|
|
3386
|
+
async function confirmModalSelection() {
|
|
3387
|
+
if (disabled || loading || modalSubmitLock.current) return;
|
|
3388
|
+
modalSubmitLock.current = true;
|
|
3389
|
+
const nextValue = multiple ? [...modalValues] : modalValues[0] ?? null;
|
|
3390
|
+
const selected = modalValues.map((selectedValue) => availableOptions.find((option) => option.value === selectedValue) ?? (allowInput ? { value: selectedValue, label: String(selectedValue) } : void 0)).filter((option) => option !== void 0);
|
|
3391
|
+
const extraValues = { ...modalConfig?.extraValues };
|
|
3392
|
+
setModalSubmitting(true);
|
|
3393
|
+
try {
|
|
3394
|
+
const result = await modalConfig?.onConfirm?.(nextValue, multiple ? selected : selected[0] ?? null, extraValues);
|
|
3395
|
+
if (result === false) return;
|
|
3396
|
+
setCurrentValue(nextValue);
|
|
3397
|
+
closeDropdown();
|
|
3398
|
+
} catch {
|
|
3399
|
+
} finally {
|
|
3400
|
+
modalSubmitLock.current = false;
|
|
3401
|
+
setModalSubmitting(false);
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3384
3404
|
function openDropdown() {
|
|
3385
3405
|
if (disabled || loading) return;
|
|
3386
3406
|
setOpenedMode(automaticMode);
|
|
@@ -3605,6 +3625,7 @@ var Select = (0, import_react20.forwardRef)(function Select2({
|
|
|
3605
3625
|
open,
|
|
3606
3626
|
title: modalConfig?.title ?? placeholder,
|
|
3607
3627
|
width: modalConfig?.width ?? 900,
|
|
3628
|
+
confirmLoading: modalSubmitting,
|
|
3608
3629
|
onOpenChange: (next) => {
|
|
3609
3630
|
if (!next) closeDropdown();
|
|
3610
3631
|
},
|
|
@@ -3612,14 +3633,12 @@ var Select = (0, import_react20.forwardRef)(function Select2({
|
|
|
3612
3633
|
footer: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "sia-select-modal__footer", children: [
|
|
3613
3634
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: modalConfig?.footerExtra }),
|
|
3614
3635
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
3615
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { onClick: closeDropdown, children: "\u53D6\u6D88" }),
|
|
3616
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { variant: "primary", disabled: disabled || loading, onClick:
|
|
3617
|
-
setCurrentValue(multiple ? modalValues : modalValues[0] ?? null);
|
|
3618
|
-
closeDropdown();
|
|
3619
|
-
}, children: "\u786E\u5B9A" })
|
|
3636
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { disabled: modalSubmitting, onClick: closeDropdown, children: "\u53D6\u6D88" }),
|
|
3637
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { variant: "primary", loading: modalSubmitting, disabled: disabled || loading, onClick: confirmModalSelection, children: "\u786E\u5B9A" })
|
|
3620
3638
|
] })
|
|
3621
3639
|
] }),
|
|
3622
3640
|
children: open ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
3641
|
+
modalConfig?.headerExtra != null && modalConfig.headerExtra !== false ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "sia-select-modal__header-extra", children: modalConfig.headerExtra }) : null,
|
|
3623
3642
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "sia-select-modal__heading", children: [
|
|
3624
3643
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
|
|
3625
3644
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { role: "tab", "aria-selected": !selectedOnly, variant: "link", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
|
package/dist/core.css
CHANGED
|
@@ -4419,6 +4419,14 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
4419
4419
|
border: 1px solid var(--sia-table-border-color, #EFF2F6);
|
|
4420
4420
|
border-radius: 0 0 var(--sia-radius) var(--sia-radius);
|
|
4421
4421
|
}
|
|
4422
|
+
.sia-select-modal__header-extra {
|
|
4423
|
+
display: flex;
|
|
4424
|
+
align-items: center;
|
|
4425
|
+
flex-wrap: wrap;
|
|
4426
|
+
gap: 12px;
|
|
4427
|
+
min-width: 0;
|
|
4428
|
+
margin-bottom: 16px;
|
|
4429
|
+
}
|
|
4422
4430
|
.sia-select-modal__heading {
|
|
4423
4431
|
display: flex;
|
|
4424
4432
|
justify-content: space-between;
|
|
@@ -4757,15 +4765,22 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
4757
4765
|
display: flex;
|
|
4758
4766
|
flex-wrap: wrap;
|
|
4759
4767
|
align-items: center;
|
|
4760
|
-
gap: 12px;
|
|
4768
|
+
gap: var(--sia-query-field-gap, 12px);
|
|
4761
4769
|
padding-top: 8px;
|
|
4762
4770
|
}
|
|
4763
4771
|
.sia-query-form__field {
|
|
4764
|
-
|
|
4765
|
-
|
|
4772
|
+
--sia-query-item-width: var(--sia-query-field-width, 220px);
|
|
4773
|
+
flex: 0 1 var(--sia-query-item-width);
|
|
4774
|
+
width: var(--sia-query-item-width);
|
|
4766
4775
|
min-width: 0;
|
|
4767
4776
|
max-width: 100%;
|
|
4768
4777
|
}
|
|
4778
|
+
.sia-query-form__field:has(.sia-picker-range-control, .sia-time-range, .sia-select-date-range, .sia-space-compact:not(.sia-space-compact--vertical) > :nth-child(2)) {
|
|
4779
|
+
--sia-query-item-width: calc(var(--sia-query-field-width, 220px) + var(--sia-query-field-width, 220px) + var(--sia-query-field-gap, 12px));
|
|
4780
|
+
}
|
|
4781
|
+
.sia-query-form__field :is(.sia-picker-range-control, .sia-time-range, .sia-select-date-range, .sia-space-compact:not(.sia-space-compact--vertical)) {
|
|
4782
|
+
width: 100%;
|
|
4783
|
+
}
|
|
4769
4784
|
.sia-query-form__field[hidden] {
|
|
4770
4785
|
display: none;
|
|
4771
4786
|
}
|
|
@@ -4848,7 +4863,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
4848
4863
|
@media (max-width: 600px) {
|
|
4849
4864
|
.sia-query-form__fields.is-collapsed > .sia-query-form__field {
|
|
4850
4865
|
flex-basis: auto !important;
|
|
4851
|
-
width: var(--sia-query-
|
|
4866
|
+
width: var(--sia-query-item-width) !important;
|
|
4852
4867
|
}
|
|
4853
4868
|
}
|
|
4854
4869
|
.sia-query-form__quick > .sia-badge:has(.sia-badge__count) {
|
package/dist/core.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
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-BO3VyE2n.cjs';
|
|
2
|
+
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, T as TagStatus, az as TagVariant, aN as Typography, aO as TypographyLinkProps, aP as TypographyProps, aQ as TypographyTitleProps, aR as TypographyType, aS as Upload, aT as UploadChangeInfo, aU as UploadDraggerProps, aV as UploadFile, aW as UploadFileStatus, aX as UploadProps, aY as UploadRequestOptions, b0 as message } from './core-DF0pknX6.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-Bx4B28Wh.cjs';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
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-BoVx-D0D.js';
|
|
2
|
+
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, T as TagStatus, az as TagVariant, aN as Typography, aO as TypographyLinkProps, aP as TypographyProps, aQ as TypographyTitleProps, aR as TypographyType, aS as Upload, aT as UploadChangeInfo, aU as UploadDraggerProps, aV as UploadFile, aW as UploadFileStatus, aX as UploadProps, aY as UploadRequestOptions, b0 as message } from './core-Cqgl6Z7h.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-Bx4B28Wh.js';
|
package/dist/core.js
CHANGED
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
Typography,
|
|
10
10
|
Upload,
|
|
11
11
|
message
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NPB33IXJ.js";
|
|
13
13
|
import "./chunk-YT6E3X2K.js";
|
|
14
14
|
import {
|
|
15
15
|
Modal,
|
|
16
16
|
Select
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VX2JECOU.js";
|
|
18
18
|
import {
|
|
19
19
|
Icon,
|
|
20
20
|
Input,
|