@sia.soul/sia-react-ui 0.1.17 → 0.1.20
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-Ce2Irbpt.d.ts → Select-Cz3hzQl_.d.ts} +1 -1
- package/dist/{Select-CVvF4mcy.d.cts → Select-Da9CLN0X.d.cts} +1 -1
- package/dist/{chunk-KJYKC5IV.js → chunk-3RWL67CK.js} +2 -2
- package/dist/{chunk-VXSG4EAO.js → chunk-4HB6GC24.js} +9 -3
- package/dist/{chunk-MUTJVDM6.js → chunk-I3EF5SF2.js} +1 -1
- package/dist/{chunk-G47MREYI.js → chunk-LO3BUBWU.js} +2 -2
- package/dist/{chunk-ALWHRV4L.js → chunk-SUMXP2SF.js} +10 -5
- package/dist/{core-AeKYVPDZ.d.cts → core-CM79w-7A.d.cts} +4 -2
- package/dist/{core-DcSXqSRs.d.ts → core-CdoVqv0o.d.ts} +4 -2
- package/dist/core.cjs +18 -7
- package/dist/core.css +34 -5
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +3 -3
- package/dist/index.cjs +1695 -1556
- package/dist/index.css +34 -5
- package/dist/index.d.cts +24 -6
- package/dist/index.d.ts +24 -6
- package/dist/index.js +359 -232
- package/dist/rich-text-editor.cjs +10 -5
- package/dist/rich-text-editor.js +2 -2
- package/dist/{select-date-range-shDQ5uJA.d.cts → select-date-range-4tEYkA5O.d.cts} +1 -1
- package/dist/{select-date-range-Bdb-hi9c.d.ts → select-date-range-D-ynrB5k.d.ts} +1 -1
- package/dist/select-date-range.cjs +8 -2
- package/dist/select-date-range.d.cts +2 -2
- package/dist/select-date-range.d.ts +2 -2
- package/dist/select-date-range.js +3 -3
- package/package.json +1 -1
|
@@ -54,4 +54,4 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
|
|
|
54
54
|
}
|
|
55
55
|
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
56
56
|
|
|
57
|
-
export {
|
|
57
|
+
export { type SelectOption as S, type SelectChangeValue as a, type SelectProps as b, Select as c, type SelectMode as d, type SelectValue as e };
|
|
@@ -54,4 +54,4 @@ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "def
|
|
|
54
54
|
}
|
|
55
55
|
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
|
|
56
56
|
|
|
57
|
-
export {
|
|
57
|
+
export { type SelectOption as S, type SelectChangeValue as a, type SelectProps as b, Select as c, type SelectMode as d, type SelectValue as e };
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
Popover,
|
|
6
6
|
Tooltip,
|
|
7
7
|
useOverlayLifecycle
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4HB6GC24.js";
|
|
9
9
|
import {
|
|
10
10
|
Dropdown,
|
|
11
11
|
Icon
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SUMXP2SF.js";
|
|
13
13
|
import {
|
|
14
14
|
Button
|
|
15
15
|
} from "./chunk-TZGUBGA4.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
Icon,
|
|
4
4
|
Input,
|
|
5
5
|
PopupPortal
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SUMXP2SF.js";
|
|
7
7
|
import {
|
|
8
8
|
Button
|
|
9
9
|
} from "./chunk-TZGUBGA4.js";
|
|
@@ -637,6 +637,7 @@ var ModalRoot = forwardRef2(function Modal({
|
|
|
637
637
|
title,
|
|
638
638
|
children,
|
|
639
639
|
footer,
|
|
640
|
+
footerExtra,
|
|
640
641
|
type = "default",
|
|
641
642
|
okText = "\u786E\u5B9A",
|
|
642
643
|
cancelText = "\u53D6\u6D88",
|
|
@@ -761,7 +762,10 @@ var ModalRoot = forwardRef2(function Modal({
|
|
|
761
762
|
closable ? /* @__PURE__ */ jsx3("button", { type: "button", className: "sia-modal__close", "aria-label": "\u5173\u95ED\u5BF9\u8BDD\u6846", onClick: requestClose, children: /* @__PURE__ */ jsx3(Icon, { name: "close", size: 17 }) }) : null
|
|
762
763
|
] }),
|
|
763
764
|
children !== void 0 ? /* @__PURE__ */ jsx3("div", { className: "sia-modal__body", children }) : null,
|
|
764
|
-
footer !== null ? /* @__PURE__ */
|
|
765
|
+
footer !== null ? /* @__PURE__ */ jsxs3("div", { className: "sia-modal__footer", children: [
|
|
766
|
+
footer === void 0 && footerExtra != null ? /* @__PURE__ */ jsx3("div", { style: { marginRight: "auto" }, children: footerExtra }) : null,
|
|
767
|
+
footer ?? defaultFooter
|
|
768
|
+
] }) : null
|
|
765
769
|
]
|
|
766
770
|
}
|
|
767
771
|
)
|
|
@@ -843,6 +847,7 @@ function SelectionPanel({
|
|
|
843
847
|
value,
|
|
844
848
|
onChange,
|
|
845
849
|
multiple = false,
|
|
850
|
+
allowDeselect = false,
|
|
846
851
|
disabled = false,
|
|
847
852
|
loading = false,
|
|
848
853
|
showSearch = true,
|
|
@@ -908,7 +913,7 @@ function SelectionPanel({
|
|
|
908
913
|
function toggle(option) {
|
|
909
914
|
if (disabled || loading || option.disabled || option.optionType === "divider") return;
|
|
910
915
|
setActive(option.value);
|
|
911
|
-
onChange(multiple ? selected.has(option.value) ? value.filter((item) => item !== option.value) : [...value, option.value] : [option.value]);
|
|
916
|
+
onChange(multiple ? selected.has(option.value) ? value.filter((item) => item !== option.value) : [...value, option.value] : allowDeselect && selected.has(option.value) ? [] : [option.value]);
|
|
912
917
|
}
|
|
913
918
|
function batch(operation) {
|
|
914
919
|
if (disabled || loading) return;
|
|
@@ -1847,6 +1852,7 @@ var Select = forwardRef3(function Select2({
|
|
|
1847
1852
|
value: modalValues,
|
|
1848
1853
|
onChange: setModalValues,
|
|
1849
1854
|
multiple,
|
|
1855
|
+
allowDeselect: allowClear,
|
|
1850
1856
|
selectedOnly,
|
|
1851
1857
|
showValue,
|
|
1852
1858
|
showSearch: false,
|
|
@@ -974,7 +974,8 @@ function MenuEntry({
|
|
|
974
974
|
item,
|
|
975
975
|
level,
|
|
976
976
|
parents,
|
|
977
|
-
props
|
|
977
|
+
props,
|
|
978
|
+
reserveIcon
|
|
978
979
|
}) {
|
|
979
980
|
const anchorRef = useRef2(null);
|
|
980
981
|
const closeTimerRef = useRef2(void 0);
|
|
@@ -1023,7 +1024,7 @@ function MenuEntry({
|
|
|
1023
1024
|
"aria-expanded": hasChildren ? isOpen : void 0,
|
|
1024
1025
|
onClick: (event) => hasChildren ? props.toggle(item.key) : props.select(item, path, event),
|
|
1025
1026
|
children: [
|
|
1026
|
-
|
|
1027
|
+
reserveIcon ? /* @__PURE__ */ jsx4("span", { className: "sia-menu__icon", "aria-hidden": !item.icon || void 0, children: item.icon }) : null,
|
|
1027
1028
|
!collapsed ? /* @__PURE__ */ jsx4("span", { className: "sia-menu__label", children: item.label }) : null,
|
|
1028
1029
|
!collapsed && item.extra ? /* @__PURE__ */ jsx4("span", { className: "sia-menu__extra", children: item.extra }) : null,
|
|
1029
1030
|
!collapsed && hasChildren ? /* @__PURE__ */ jsx4(Icon, { className: "sia-menu__expand-icon", name: "chevron-down", size: 13 }) : null
|
|
@@ -1047,19 +1048,23 @@ function MenuEntry({
|
|
|
1047
1048
|
}
|
|
1048
1049
|
);
|
|
1049
1050
|
}
|
|
1051
|
+
function hasMenuIcon(items) {
|
|
1052
|
+
return items.some((item) => item.type === "group" ? hasMenuIcon(item.children ?? []) : item.type !== "divider" && Boolean(item.icon));
|
|
1053
|
+
}
|
|
1050
1054
|
function MenuLevel({
|
|
1051
1055
|
items,
|
|
1052
1056
|
level,
|
|
1053
1057
|
parents,
|
|
1054
|
-
props
|
|
1058
|
+
props,
|
|
1059
|
+
reserveIcon = hasMenuIcon(items)
|
|
1055
1060
|
}) {
|
|
1056
1061
|
return /* @__PURE__ */ jsx4(Fragment3, { children: items.map((item, index) => {
|
|
1057
1062
|
if (item.type === "divider") return /* @__PURE__ */ jsx4("li", { className: "sia-menu__divider", role: "separator" }, item.key || `divider-${index}`);
|
|
1058
1063
|
if (item.type === "group") return /* @__PURE__ */ jsxs3("li", { className: "sia-menu__group", children: [
|
|
1059
1064
|
/* @__PURE__ */ jsx4("div", { className: "sia-menu__group-title", children: item.label }),
|
|
1060
|
-
/* @__PURE__ */ jsx4("ul", { role: "group", children: /* @__PURE__ */ jsx4(MenuLevel, { items: item.children ?? [], level: level + 1, parents: [...parents, item.key], props }) })
|
|
1065
|
+
/* @__PURE__ */ jsx4("ul", { role: "group", children: /* @__PURE__ */ jsx4(MenuLevel, { items: item.children ?? [], level: level + 1, parents: [...parents, item.key], props, reserveIcon }) })
|
|
1061
1066
|
] }, item.key);
|
|
1062
|
-
return /* @__PURE__ */ jsx4(MenuEntry, { item, level, parents, props }, item.key);
|
|
1067
|
+
return /* @__PURE__ */ jsx4(MenuEntry, { item, level, parents, props, reserveIcon }, item.key);
|
|
1063
1068
|
}) });
|
|
1064
1069
|
}
|
|
1065
1070
|
function Menu({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes } from 'react';
|
|
3
3
|
import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-DAYZvZVu.cjs';
|
|
4
|
-
import './Select-
|
|
4
|
+
import './Select-Da9CLN0X.cjs';
|
|
5
5
|
|
|
6
6
|
type ButtonVariant = "primary" | "default" | "dashed" | "filled" | "text" | "link";
|
|
7
7
|
type ButtonSize = ControlSize;
|
|
@@ -917,6 +917,8 @@ interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "onS
|
|
|
917
917
|
title?: ReactNode;
|
|
918
918
|
children?: ReactNode;
|
|
919
919
|
footer?: ReactNode | null;
|
|
920
|
+
/** 默认底部操作区左侧的扩展内容。 */
|
|
921
|
+
footerExtra?: ReactNode;
|
|
920
922
|
type?: ModalType;
|
|
921
923
|
okText?: ReactNode;
|
|
922
924
|
cancelText?: ReactNode;
|
|
@@ -1079,4 +1081,4 @@ declare const FloatButton: react.ForwardRefExoticComponent<FloatButtonProps & re
|
|
|
1079
1081
|
BackTop: typeof FloatButtonBackTop;
|
|
1080
1082
|
};
|
|
1081
1083
|
|
|
1082
|
-
export { type
|
|
1084
|
+
export { type ImageProps as $, type DropdownPlacement as A, type ButtonProps as B, Calendar as C, Dropdown as D, type DropdownProps as E, type DropdownTrigger as F, FILLED_ICON_NAMES as G, type FilledIconName as H, FloatButton as I, type FloatButtonBackTopProps as J, type FloatButtonGroupProps as K, type FloatButtonProps as L, type ModalOpenConfig as M, type FloatButtonShape as N, type OverlayContainer as O, type FloatingPlacement as P, type FloatingTrigger as Q, ICON_NAMES as R, Icon as S, type TagStatus as T, type IconName as U, type IconProps as V, type IconVariant as W, Image as X, ImagePreview as Y, type ImagePreviewConfig as Z, type ImagePreviewProps as _, type OverlayApiHandle as a, type TypographyTitleProps as a$, Input as a0, type InputProps as a1, Menu as a2, type MenuClickInfo as a3, type MenuItem as a4, type MenuMode as a5, type MenuProps as a6, type MenuTheme as a7, type MessageConfig as a8, type MessageHandle as a9, type StepsProps as aA, type TabItem as aB, Tabs as aC, type TabsContextMenuClickInfo as aD, type TabsOrientation as aE, type TabsPosition as aF, type TabsProps as aG, type TabsType as aH, Tag as aI, type TagProps as aJ, type TagVariant as aK, Timeline as aL, type TimelineItem as aM, type TimelineProps as aN, Tooltip as aO, type TooltipProps as aP, Tour as aQ, type TourProps as aR, type TourStep as aS, Tree as aT, type TreeDropPosition as aU, type TreeKey as aV, type TreeNode as aW, type TreeProps as aX, Typography as aY, type TypographyLinkProps as aZ, type TypographyProps as a_, type MessageKey as aa, type MessageType as ab, Modal as ac, type ModalProps as ad, type ModalType as ae, type NotificationConfig as af, type NotificationPlacement as ag, type NotificationType as ah, Popconfirm as ai, type PopconfirmProps as aj, Popover as ak, type PopoverProps as al, Progress as am, type ProgressProps as an, type ProgressStatus as ao, Rate as ap, type RateProps as aq, Segmented as ar, type SegmentedOption as as, type SegmentedProps as at, type SegmentedValue as au, Spin as av, type SpinProps as aw, type StepItem as ax, type StepStatus as ay, Steps as az, type ModalActionResult as b, type TypographyType as b0, Upload as b1, type UploadChangeInfo as b2, type UploadDraggerProps as b3, type UploadFile as b4, type UploadFileStatus as b5, type UploadProps as b6, type UploadRequestOptions as b7, Watermark as b8, type WatermarkFont as b9, type WatermarkProps as ba, message as bb, notification as bc, type ButtonSize as c, type BadgeProps as d, Badge as e, type BadgeRibbonProps as f, type BadgeStatus as g, Breadcrumb as h, type BreadcrumbItem as i, type BreadcrumbProps as j, Button as k, type ButtonVariant as l, type CalendarProps as m, Card as n, type CardAccent as o, type CardProps as p, Carousel as q, type CarouselProps as r, type CarouselRef as s, Collapse as t, type CollapseItem as u, type CollapseKey as v, type CollapseProps as w, type DropdownButtonProps as x, type DropdownMenuProps as y, type DropdownOpenSource as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties, MouseEvent, ReactElement, ImgHTMLAttributes, InputHTMLAttributes, MouseEventHandler, AnchorHTMLAttributes } from 'react';
|
|
3
3
|
import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './shared-DAYZvZVu.js';
|
|
4
|
-
import './Select-
|
|
4
|
+
import './Select-Cz3hzQl_.js';
|
|
5
5
|
|
|
6
6
|
type ButtonVariant = "primary" | "default" | "dashed" | "filled" | "text" | "link";
|
|
7
7
|
type ButtonSize = ControlSize;
|
|
@@ -917,6 +917,8 @@ interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "onS
|
|
|
917
917
|
title?: ReactNode;
|
|
918
918
|
children?: ReactNode;
|
|
919
919
|
footer?: ReactNode | null;
|
|
920
|
+
/** 默认底部操作区左侧的扩展内容。 */
|
|
921
|
+
footerExtra?: ReactNode;
|
|
920
922
|
type?: ModalType;
|
|
921
923
|
okText?: ReactNode;
|
|
922
924
|
cancelText?: ReactNode;
|
|
@@ -1079,4 +1081,4 @@ declare const FloatButton: react.ForwardRefExoticComponent<FloatButtonProps & re
|
|
|
1079
1081
|
BackTop: typeof FloatButtonBackTop;
|
|
1080
1082
|
};
|
|
1081
1083
|
|
|
1082
|
-
export { type
|
|
1084
|
+
export { type ImageProps as $, type DropdownPlacement as A, type ButtonProps as B, Calendar as C, Dropdown as D, type DropdownProps as E, type DropdownTrigger as F, FILLED_ICON_NAMES as G, type FilledIconName as H, FloatButton as I, type FloatButtonBackTopProps as J, type FloatButtonGroupProps as K, type FloatButtonProps as L, type ModalOpenConfig as M, type FloatButtonShape as N, type OverlayContainer as O, type FloatingPlacement as P, type FloatingTrigger as Q, ICON_NAMES as R, Icon as S, type TagStatus as T, type IconName as U, type IconProps as V, type IconVariant as W, Image as X, ImagePreview as Y, type ImagePreviewConfig as Z, type ImagePreviewProps as _, type OverlayApiHandle as a, type TypographyTitleProps as a$, Input as a0, type InputProps as a1, Menu as a2, type MenuClickInfo as a3, type MenuItem as a4, type MenuMode as a5, type MenuProps as a6, type MenuTheme as a7, type MessageConfig as a8, type MessageHandle as a9, type StepsProps as aA, type TabItem as aB, Tabs as aC, type TabsContextMenuClickInfo as aD, type TabsOrientation as aE, type TabsPosition as aF, type TabsProps as aG, type TabsType as aH, Tag as aI, type TagProps as aJ, type TagVariant as aK, Timeline as aL, type TimelineItem as aM, type TimelineProps as aN, Tooltip as aO, type TooltipProps as aP, Tour as aQ, type TourProps as aR, type TourStep as aS, Tree as aT, type TreeDropPosition as aU, type TreeKey as aV, type TreeNode as aW, type TreeProps as aX, Typography as aY, type TypographyLinkProps as aZ, type TypographyProps as a_, type MessageKey as aa, type MessageType as ab, Modal as ac, type ModalProps as ad, type ModalType as ae, type NotificationConfig as af, type NotificationPlacement as ag, type NotificationType as ah, Popconfirm as ai, type PopconfirmProps as aj, Popover as ak, type PopoverProps as al, Progress as am, type ProgressProps as an, type ProgressStatus as ao, Rate as ap, type RateProps as aq, Segmented as ar, type SegmentedOption as as, type SegmentedProps as at, type SegmentedValue as au, Spin as av, type SpinProps as aw, type StepItem as ax, type StepStatus as ay, Steps as az, type ModalActionResult as b, type TypographyType as b0, Upload as b1, type UploadChangeInfo as b2, type UploadDraggerProps as b3, type UploadFile as b4, type UploadFileStatus as b5, type UploadProps as b6, type UploadRequestOptions as b7, Watermark as b8, type WatermarkFont as b9, type WatermarkProps as ba, message as bb, notification as bc, type ButtonSize as c, type BadgeProps as d, Badge as e, type BadgeRibbonProps as f, type BadgeStatus as g, Breadcrumb as h, type BreadcrumbItem as i, type BreadcrumbProps as j, Button as k, type ButtonVariant as l, type CalendarProps as m, Card as n, type CardAccent as o, type CardProps as p, Carousel as q, type CarouselProps as r, type CarouselRef as s, Collapse as t, type CollapseItem as u, type CollapseKey as v, type CollapseProps as w, type DropdownButtonProps as x, type DropdownMenuProps as y, type DropdownOpenSource as z };
|
package/dist/core.cjs
CHANGED
|
@@ -1188,7 +1188,8 @@ function MenuEntry({
|
|
|
1188
1188
|
item,
|
|
1189
1189
|
level,
|
|
1190
1190
|
parents,
|
|
1191
|
-
props
|
|
1191
|
+
props,
|
|
1192
|
+
reserveIcon
|
|
1192
1193
|
}) {
|
|
1193
1194
|
const anchorRef = (0, import_react6.useRef)(null);
|
|
1194
1195
|
const closeTimerRef = (0, import_react6.useRef)(void 0);
|
|
@@ -1237,7 +1238,7 @@ function MenuEntry({
|
|
|
1237
1238
|
"aria-expanded": hasChildren ? isOpen : void 0,
|
|
1238
1239
|
onClick: (event) => hasChildren ? props.toggle(item.key) : props.select(item, path, event),
|
|
1239
1240
|
children: [
|
|
1240
|
-
|
|
1241
|
+
reserveIcon ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sia-menu__icon", "aria-hidden": !item.icon || void 0, children: item.icon }) : null,
|
|
1241
1242
|
!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sia-menu__label", children: item.label }) : null,
|
|
1242
1243
|
!collapsed && item.extra ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sia-menu__extra", children: item.extra }) : null,
|
|
1243
1244
|
!collapsed && hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { className: "sia-menu__expand-icon", name: "chevron-down", size: 13 }) : null
|
|
@@ -1261,19 +1262,23 @@ function MenuEntry({
|
|
|
1261
1262
|
}
|
|
1262
1263
|
);
|
|
1263
1264
|
}
|
|
1265
|
+
function hasMenuIcon(items) {
|
|
1266
|
+
return items.some((item) => item.type === "group" ? hasMenuIcon(item.children ?? []) : item.type !== "divider" && Boolean(item.icon));
|
|
1267
|
+
}
|
|
1264
1268
|
function MenuLevel({
|
|
1265
1269
|
items,
|
|
1266
1270
|
level,
|
|
1267
1271
|
parents,
|
|
1268
|
-
props
|
|
1272
|
+
props,
|
|
1273
|
+
reserveIcon = hasMenuIcon(items)
|
|
1269
1274
|
}) {
|
|
1270
1275
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: items.map((item, index) => {
|
|
1271
1276
|
if (item.type === "divider") return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { className: "sia-menu__divider", role: "separator" }, item.key || `divider-${index}`);
|
|
1272
1277
|
if (item.type === "group") return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("li", { className: "sia-menu__group", children: [
|
|
1273
1278
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "sia-menu__group-title", children: item.label }),
|
|
1274
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { role: "group", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuLevel, { items: item.children ?? [], level: level + 1, parents: [...parents, item.key], props }) })
|
|
1279
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { role: "group", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuLevel, { items: item.children ?? [], level: level + 1, parents: [...parents, item.key], props, reserveIcon }) })
|
|
1275
1280
|
] }, item.key);
|
|
1276
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuEntry, { item, level, parents, props }, item.key);
|
|
1281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuEntry, { item, level, parents, props, reserveIcon }, item.key);
|
|
1277
1282
|
}) });
|
|
1278
1283
|
}
|
|
1279
1284
|
function Menu({
|
|
@@ -2315,6 +2320,7 @@ var ModalRoot = (0, import_react14.forwardRef)(function Modal({
|
|
|
2315
2320
|
title,
|
|
2316
2321
|
children,
|
|
2317
2322
|
footer,
|
|
2323
|
+
footerExtra,
|
|
2318
2324
|
type = "default",
|
|
2319
2325
|
okText = "\u786E\u5B9A",
|
|
2320
2326
|
cancelText = "\u53D6\u6D88",
|
|
@@ -2439,7 +2445,10 @@ var ModalRoot = (0, import_react14.forwardRef)(function Modal({
|
|
|
2439
2445
|
closable ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", className: "sia-modal__close", "aria-label": "\u5173\u95ED\u5BF9\u8BDD\u6846", onClick: requestClose, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "close", size: 17 }) }) : null
|
|
2440
2446
|
] }),
|
|
2441
2447
|
children !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "sia-modal__body", children }) : null,
|
|
2442
|
-
footer !== null ? /* @__PURE__ */ (0, import_jsx_runtime15.
|
|
2448
|
+
footer !== null ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sia-modal__footer", children: [
|
|
2449
|
+
footer === void 0 && footerExtra != null ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { marginRight: "auto" }, children: footerExtra }) : null,
|
|
2450
|
+
footer ?? defaultFooter
|
|
2451
|
+
] }) : null
|
|
2443
2452
|
]
|
|
2444
2453
|
}
|
|
2445
2454
|
)
|
|
@@ -2625,6 +2634,7 @@ function SelectionPanel({
|
|
|
2625
2634
|
value,
|
|
2626
2635
|
onChange,
|
|
2627
2636
|
multiple = false,
|
|
2637
|
+
allowDeselect = false,
|
|
2628
2638
|
disabled = false,
|
|
2629
2639
|
loading = false,
|
|
2630
2640
|
showSearch = true,
|
|
@@ -2690,7 +2700,7 @@ function SelectionPanel({
|
|
|
2690
2700
|
function toggle(option) {
|
|
2691
2701
|
if (disabled || loading || option.disabled || option.optionType === "divider") return;
|
|
2692
2702
|
setActive(option.value);
|
|
2693
|
-
onChange(multiple ? selected.has(option.value) ? value.filter((item) => item !== option.value) : [...value, option.value] : [option.value]);
|
|
2703
|
+
onChange(multiple ? selected.has(option.value) ? value.filter((item) => item !== option.value) : [...value, option.value] : allowDeselect && selected.has(option.value) ? [] : [option.value]);
|
|
2694
2704
|
}
|
|
2695
2705
|
function batch(operation) {
|
|
2696
2706
|
if (disabled || loading) return;
|
|
@@ -3626,6 +3636,7 @@ var Select = (0, import_react20.forwardRef)(function Select2({
|
|
|
3626
3636
|
value: modalValues,
|
|
3627
3637
|
onChange: setModalValues,
|
|
3628
3638
|
multiple,
|
|
3639
|
+
allowDeselect: allowClear,
|
|
3629
3640
|
selectedOnly,
|
|
3630
3641
|
showValue,
|
|
3631
3642
|
showSearch: false,
|
package/dist/core.css
CHANGED
|
@@ -484,27 +484,47 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
484
484
|
position: absolute;
|
|
485
485
|
box-sizing: border-box;
|
|
486
486
|
cursor: default;
|
|
487
|
+
touch-action: none;
|
|
488
|
+
}
|
|
489
|
+
.sia-floating-scrollbar__thumb::before {
|
|
490
|
+
content: none;
|
|
491
|
+
}
|
|
492
|
+
.sia-floating-scrollbar__thumb::after {
|
|
493
|
+
content: "";
|
|
494
|
+
position: absolute;
|
|
495
|
+
right: 0;
|
|
496
|
+
bottom: 0;
|
|
497
|
+
box-sizing: border-box;
|
|
498
|
+
pointer-events: none;
|
|
487
499
|
background: var(--sia-scrollbar-thumb);
|
|
488
500
|
border: 1px solid rgb(255 255 255 / 24%);
|
|
489
501
|
border-radius: 999px;
|
|
490
502
|
box-shadow: 0 1px 1px rgb(0 0 0 / 24%);
|
|
491
|
-
|
|
492
|
-
|
|
503
|
+
transition:
|
|
504
|
+
background-color 120ms ease,
|
|
505
|
+
width 150ms ease,
|
|
506
|
+
height 150ms ease;
|
|
493
507
|
}
|
|
494
|
-
.sia-floating-scrollbar__thumb:hover {
|
|
508
|
+
.sia-floating-scrollbar__thumb:hover::after {
|
|
495
509
|
background: var(--sia-scrollbar-thumb-hover);
|
|
496
510
|
}
|
|
497
511
|
.sia-floating-scrollbar--horizontal .sia-floating-scrollbar__thumb {
|
|
498
512
|
bottom: 0;
|
|
499
513
|
left: 0;
|
|
514
|
+
height: 100%;
|
|
515
|
+
}
|
|
516
|
+
.sia-floating-scrollbar--horizontal .sia-floating-scrollbar__thumb::after {
|
|
517
|
+
width: 100%;
|
|
500
518
|
height: var(--sia-scrollbar-size);
|
|
501
|
-
transition: background-color 120ms ease, height 150ms ease;
|
|
502
519
|
}
|
|
503
520
|
.sia-floating-scrollbar--vertical .sia-floating-scrollbar__thumb {
|
|
504
521
|
top: 0;
|
|
505
522
|
right: 0;
|
|
523
|
+
width: 100%;
|
|
524
|
+
}
|
|
525
|
+
.sia-floating-scrollbar--vertical .sia-floating-scrollbar__thumb::after {
|
|
506
526
|
width: var(--sia-scrollbar-size);
|
|
507
|
-
|
|
527
|
+
height: 100%;
|
|
508
528
|
}
|
|
509
529
|
.sia-button,
|
|
510
530
|
.sia-input,
|
|
@@ -7133,6 +7153,15 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
7133
7153
|
display: inline-flex;
|
|
7134
7154
|
flex: 0 0 auto;
|
|
7135
7155
|
}
|
|
7156
|
+
.sia-menu__icon {
|
|
7157
|
+
justify-content: center;
|
|
7158
|
+
align-items: center;
|
|
7159
|
+
width: var(--sia-menu-icon-size, 16px);
|
|
7160
|
+
flex-basis: var(--sia-menu-icon-size, 16px);
|
|
7161
|
+
}
|
|
7162
|
+
.sia-menu__icon > * {
|
|
7163
|
+
max-width: 100%;
|
|
7164
|
+
}
|
|
7136
7165
|
.sia-menu__extra {
|
|
7137
7166
|
color: var(--sia-color-text-secondary);
|
|
7138
7167
|
font-size: 12px;
|
package/dist/core.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { h as Breadcrumb, i as BreadcrumbItem, j as BreadcrumbProps, k as Button, B as ButtonProps, c as ButtonSize, l as ButtonVariant, n as Card, o as CardAccent, p as CardProps, t as Collapse, u as CollapseItem, v as CollapseKey, w as CollapseProps, H as FilledIconName, I as FloatButton, J as FloatButtonBackTopProps, K as FloatButtonGroupProps, L as FloatButtonProps, N as FloatButtonShape, S as Icon, U as IconName, V as IconProps, W as IconVariant, a0 as Input, a1 as InputProps, a8 as MessageConfig, a9 as MessageHandle, aa as MessageKey, ab as MessageType, ac as Modal, b as ModalActionResult, M as ModalOpenConfig, ad as ModalProps, ae as ModalType, a as OverlayApiHandle, am as Progress, an as ProgressProps, ao as ProgressStatus, ar as Segmented, as as SegmentedOption, at as SegmentedProps, au as SegmentedValue, aB as TabItem, aC as Tabs, aE as TabsOrientation, aF as TabsPosition, aG as TabsProps, aH as TabsType, aI as Tag, aJ as TagProps, T as TagStatus, aK as TagVariant, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, bb as message } from './core-CM79w-7A.cjs';
|
|
2
|
+
export { c as Select, S as SelectOption, b as SelectProps, e as SelectValue } from './Select-Da9CLN0X.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-DAYZvZVu.cjs';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { h as Breadcrumb, i as BreadcrumbItem, j as BreadcrumbProps, k as Button, B as ButtonProps, c as ButtonSize, l as ButtonVariant, n as Card, o as CardAccent, p as CardProps, t as Collapse, u as CollapseItem, v as CollapseKey, w as CollapseProps, H as FilledIconName, I as FloatButton, J as FloatButtonBackTopProps, K as FloatButtonGroupProps, L as FloatButtonProps, N as FloatButtonShape, S as Icon, U as IconName, V as IconProps, W as IconVariant, a0 as Input, a1 as InputProps, a8 as MessageConfig, a9 as MessageHandle, aa as MessageKey, ab as MessageType, ac as Modal, b as ModalActionResult, M as ModalOpenConfig, ad as ModalProps, ae as ModalType, a as OverlayApiHandle, am as Progress, an as ProgressProps, ao as ProgressStatus, ar as Segmented, as as SegmentedOption, at as SegmentedProps, au as SegmentedValue, aB as TabItem, aC as Tabs, aE as TabsOrientation, aF as TabsPosition, aG as TabsProps, aH as TabsType, aI as Tag, aJ as TagProps, T as TagStatus, aK as TagVariant, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, bb as message } from './core-CdoVqv0o.js';
|
|
2
|
+
export { c as Select, S as SelectOption, b as SelectProps, e as SelectValue } from './Select-Cz3hzQl_.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-DAYZvZVu.js';
|
package/dist/core.js
CHANGED
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
Typography,
|
|
10
10
|
Upload,
|
|
11
11
|
message
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3RWL67CK.js";
|
|
13
13
|
import "./chunk-YT6E3X2K.js";
|
|
14
14
|
import {
|
|
15
15
|
Modal,
|
|
16
16
|
Select
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4HB6GC24.js";
|
|
18
18
|
import {
|
|
19
19
|
Icon,
|
|
20
20
|
Input,
|
|
21
21
|
Segmented
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SUMXP2SF.js";
|
|
23
23
|
import {
|
|
24
24
|
Button
|
|
25
25
|
} from "./chunk-TZGUBGA4.js";
|