@sia.soul/sia-react-ui 0.1.22 → 0.1.24
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-O_yY51vc.d.ts +307 -0
- package/dist/Select-W_xpkpOW.d.cts +307 -0
- package/dist/chart.cjs +1401 -1160
- package/dist/chart.css +21 -0
- package/dist/chart.js +4 -4
- package/dist/{chunk-3TRRBMXY.js → chunk-6R7JY7IY.js} +44 -21
- package/dist/{chunk-TZGUBGA4.js → chunk-6WBABNAX.js} +4 -3
- package/dist/{chunk-OKP4DIQH.js → chunk-GUXAWU63.js} +29 -26
- package/dist/{chunk-QJ4OQNQ4.js → chunk-LA7O3PN4.js} +4 -3
- package/dist/{chunk-7RNS52YG.js → chunk-LIYCU2GU.js} +349 -278
- package/dist/{chunk-KLI65JVD.js → chunk-LRPQ5FGE.js} +68 -186
- package/dist/chunk-NSSPGXNM.js +284 -0
- package/dist/{chunk-YT6E3X2K.js → chunk-OH6YILJW.js} +4 -3
- package/dist/{chunk-RWGSZW32.js → chunk-RGXVPS37.js} +7 -6
- package/dist/{chunk-VN6PIPP7.js → chunk-T2QIW4OO.js} +8 -7
- package/dist/{core-DeZknKwc.d.ts → core-BOzLwiXG.d.ts} +40 -158
- package/dist/{core-C5OnrCi4.d.cts → core-tbb9ZiBY.d.cts} +40 -158
- package/dist/core.cjs +1656 -1443
- package/dist/core.css +60 -0
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +8 -6
- package/dist/index.cjs +3801 -3580
- package/dist/index.css +60 -0
- package/dist/index.d.cts +33 -16
- package/dist/index.d.ts +33 -16
- package/dist/index.js +94 -85
- package/dist/markdown-editor.cjs +269 -28
- package/dist/markdown-editor.css +20 -0
- package/dist/markdown-editor.js +2 -2
- package/dist/rich-text-editor.cjs +1156 -1031
- package/dist/rich-text-editor.css +20 -0
- package/dist/rich-text-editor.js +4 -4
- package/dist/{select-date-range-CGRb3-W8.d.ts → select-date-range-BjqFUeU6.d.ts} +1 -1
- package/dist/{select-date-range-DDmYGDD4.d.cts → select-date-range-C9w8z3G8.d.cts} +1 -1
- package/dist/select-date-range.cjs +1209 -1061
- package/dist/select-date-range.css +20 -0
- package/dist/select-date-range.d.cts +2 -2
- package/dist/select-date-range.d.ts +2 -2
- package/dist/select-date-range.js +5 -5
- package/package.json +2 -2
- package/dist/Select-4hGJt3RJ.d.cts +0 -142
- package/dist/Select-BNSE67xn.d.ts +0 -142
- package/dist/chunk-3VJ4CZDQ.js +0 -43
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
smoothSvgPath,
|
|
57
57
|
svgArcPath,
|
|
58
58
|
transferCompositeValue
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-GUXAWU63.js";
|
|
60
60
|
import {
|
|
61
61
|
Badge,
|
|
62
62
|
Breadcrumb,
|
|
@@ -73,28 +73,29 @@ import {
|
|
|
73
73
|
Spin,
|
|
74
74
|
Tabs,
|
|
75
75
|
Tag,
|
|
76
|
+
Toolbar,
|
|
76
77
|
Tour,
|
|
77
78
|
Typography,
|
|
78
79
|
Upload,
|
|
79
80
|
Watermark,
|
|
80
81
|
message,
|
|
81
82
|
notification
|
|
82
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-LIYCU2GU.js";
|
|
83
84
|
import {
|
|
84
85
|
TextArea
|
|
85
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-OH6YILJW.js";
|
|
86
87
|
import {
|
|
87
88
|
MarkdownEditor
|
|
88
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-LA7O3PN4.js";
|
|
89
90
|
import {
|
|
90
91
|
RichTextContent,
|
|
91
92
|
RichTextEditor
|
|
92
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-RGXVPS37.js";
|
|
93
94
|
import {
|
|
94
95
|
DatePicker,
|
|
95
96
|
SelectDateRange,
|
|
96
97
|
TimePanel
|
|
97
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-T2QIW4OO.js";
|
|
98
99
|
import {
|
|
99
100
|
Checkbox,
|
|
100
101
|
FloatingScrollbarProvider,
|
|
@@ -109,7 +110,7 @@ import {
|
|
|
109
110
|
Tree,
|
|
110
111
|
useOverlayLifecycle,
|
|
111
112
|
useScrollbarProximity
|
|
112
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-6R7JY7IY.js";
|
|
113
114
|
import {
|
|
114
115
|
Dropdown,
|
|
115
116
|
FILLED_ICON_NAMES,
|
|
@@ -117,21 +118,22 @@ import {
|
|
|
117
118
|
Icon,
|
|
118
119
|
Input,
|
|
119
120
|
Menu,
|
|
120
|
-
PopupPortal,
|
|
121
121
|
Segmented,
|
|
122
122
|
Steps
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-LRPQ5FGE.js";
|
|
124
124
|
import {
|
|
125
125
|
Button
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-6WBABNAX.js";
|
|
127
127
|
import {
|
|
128
128
|
ControlSizeContext,
|
|
129
129
|
PlaceholderModeContext,
|
|
130
|
+
PopupPortal,
|
|
130
131
|
useControlSize,
|
|
131
132
|
useControllableState,
|
|
132
133
|
useFloatingPlaceholder,
|
|
133
|
-
usePlaceholderMode
|
|
134
|
-
|
|
134
|
+
usePlaceholderMode,
|
|
135
|
+
withTitleTooltip
|
|
136
|
+
} from "./chunk-NSSPGXNM.js";
|
|
135
137
|
|
|
136
138
|
// src/components/Alert.tsx
|
|
137
139
|
import { useState } from "react";
|
|
@@ -161,7 +163,7 @@ function Alert({
|
|
|
161
163
|
const [visible, setVisible] = useState(true);
|
|
162
164
|
const resolvedStatus = status ?? type ?? (banner ? "warning" : "info");
|
|
163
165
|
if (!visible) return null;
|
|
164
|
-
return /* @__PURE__ */ jsxs("div", { className: `sia-alert sia-alert--${resolvedStatus}${banner ? " sia-alert--banner" : ""}${description ? " sia-alert--with-description" : ""} ${className}`.trim(), role: "alert", ...props, children: [
|
|
166
|
+
return /* @__PURE__ */ jsxs("div", { className: `sia-alert sia-alert--${resolvedStatus}${banner ? " sia-alert--banner" : ""}${description ? " sia-alert--with-description" : ""} ${className}`.trim(), role: "alert", ...withTitleTooltip(props), children: [
|
|
165
167
|
showIcon || banner ? /* @__PURE__ */ jsx("span", { className: "sia-alert__icon", "aria-hidden": "true", children: alertIcons[resolvedStatus] }) : null,
|
|
166
168
|
/* @__PURE__ */ jsxs("div", { className: "sia-alert__content", children: [
|
|
167
169
|
/* @__PURE__ */ jsx("strong", { children: message2 ?? title }),
|
|
@@ -233,7 +235,7 @@ function Pagination({
|
|
|
233
235
|
if (refreshing === void 0) setInternalRefreshing(false);
|
|
234
236
|
}
|
|
235
237
|
}
|
|
236
|
-
return /* @__PURE__ */ jsxs2("nav", { className: `sia-pagination sia-pagination--${controlSize} ${className}`.trim(), "aria-label": "\u5206\u9875", ...props, children: [
|
|
238
|
+
return /* @__PURE__ */ jsxs2("nav", { className: `sia-pagination sia-pagination--${controlSize} ${className}`.trim(), "aria-label": "\u5206\u9875", ...withTitleTooltip(props), children: [
|
|
237
239
|
/* @__PURE__ */ jsxs2("span", { className: "sia-pagination__current-count", "aria-live": "polite", children: [
|
|
238
240
|
"\u5F53\u524D\u9875 ",
|
|
239
241
|
pageCount,
|
|
@@ -433,7 +435,7 @@ function Cascader({
|
|
|
433
435
|
if (children?.length) columns.push(children);
|
|
434
436
|
});
|
|
435
437
|
const floating = useFloatingPlaceholder({ mode: placeholderMode, placeholder, filled: selectedPaths.length > 0, active: open });
|
|
436
|
-
return /* @__PURE__ */ jsxs3("div", { ref: rootRef, className: `sia-cascader sia-cascader--${size}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...props, children: [
|
|
438
|
+
return /* @__PURE__ */ jsxs3("div", { ref: rootRef, className: `sia-cascader sia-cascader--${size}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...withTitleTooltip(props), children: [
|
|
437
439
|
/* @__PURE__ */ jsxs3("button", { type: "button", className: `sia-cascader__trigger${floating.className}`, disabled, "aria-haspopup": "listbox", "aria-expanded": open, onClick: toggleOpen, children: [
|
|
438
440
|
/* @__PURE__ */ jsx3("span", { className: "sia-cascader__value", children: display ? multiple && Array.isArray(display) ? display.map((label, index) => /* @__PURE__ */ jsx3("span", { className: "sia-cascader__tag", children: label }, pathKey(selectedPaths[index] ?? []))) : display : /* @__PURE__ */ jsx3("span", { className: "sia-cascader__placeholder", children: placeholder }) }),
|
|
439
441
|
allowClear && selectedPaths.length ? /* @__PURE__ */ jsx3("span", { className: "sia-cascader__clear", role: "button", "aria-label": "\u6E05\u9664\u9009\u62E9", onClick: (event) => {
|
|
@@ -538,10 +540,10 @@ function Flex({
|
|
|
538
540
|
flex,
|
|
539
541
|
...style
|
|
540
542
|
};
|
|
541
|
-
return /* @__PURE__ */ jsx4(Component, { className: `sia-flex${isVertical ? " sia-flex--vertical" : ""} ${className}`.trim(), style: mergedStyle, ...props });
|
|
543
|
+
return /* @__PURE__ */ jsx4(Component, { className: `sia-flex${isVertical ? " sia-flex--vertical" : ""} ${className}`.trim(), style: mergedStyle, ...withTitleTooltip(props) });
|
|
542
544
|
}
|
|
543
545
|
function SpaceCompact({ direction = "horizontal", block = false, className = "", ...props }) {
|
|
544
|
-
return /* @__PURE__ */ jsx4("div", { className: `sia-space-compact sia-space-compact--${direction}${block ? " sia-space-compact--block" : ""} ${className}`.trim(), ...props });
|
|
546
|
+
return /* @__PURE__ */ jsx4("div", { className: `sia-space-compact sia-space-compact--${direction}${block ? " sia-space-compact--block" : ""} ${className}`.trim(), ...withTitleTooltip(props) });
|
|
545
547
|
}
|
|
546
548
|
function SpaceRoot({
|
|
547
549
|
direction = "horizontal",
|
|
@@ -563,7 +565,7 @@ function SpaceRoot({
|
|
|
563
565
|
alignItems: resolveAlign(align),
|
|
564
566
|
...style
|
|
565
567
|
};
|
|
566
|
-
return /* @__PURE__ */ jsx4("div", { className: `sia-space sia-space--${direction} ${className}`.trim(), style: mergedStyle, ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs4("span", { className: "sia-space__item", children: [
|
|
568
|
+
return /* @__PURE__ */ jsx4("div", { className: `sia-space sia-space--${direction} ${className}`.trim(), style: mergedStyle, ...withTitleTooltip(props), children: items.map((item, index) => /* @__PURE__ */ jsxs4("span", { className: "sia-space__item", children: [
|
|
567
569
|
item,
|
|
568
570
|
split !== void 0 && index < items.length - 1 ? /* @__PURE__ */ jsx4("span", { className: "sia-space__split", children: split }) : null
|
|
569
571
|
] }, index)) });
|
|
@@ -587,7 +589,7 @@ function Divider({
|
|
|
587
589
|
className: `sia-divider sia-divider--${orientation} sia-divider--${variant} sia-divider--text-${textAlign}${children ? " sia-divider--with-text" : ""}${plain ? " sia-divider--plain" : ""} ${className}`.trim(),
|
|
588
590
|
role: "separator",
|
|
589
591
|
"aria-orientation": orientation,
|
|
590
|
-
...props,
|
|
592
|
+
...withTitleTooltip(props),
|
|
591
593
|
children: children ? /* @__PURE__ */ jsx4("span", { className: "sia-divider__text", children }) : null
|
|
592
594
|
}
|
|
593
595
|
);
|
|
@@ -608,7 +610,7 @@ function Row({ gutter = 0, align, justify, wrap = true, className = "", style, .
|
|
|
608
610
|
flexWrap: wrap ? "wrap" : "nowrap",
|
|
609
611
|
...style
|
|
610
612
|
};
|
|
611
|
-
return /* @__PURE__ */ jsx4("div", { className: `sia-row ${className}`.trim(), style: mergedStyle, ...props });
|
|
613
|
+
return /* @__PURE__ */ jsx4("div", { className: `sia-row ${className}`.trim(), style: mergedStyle, ...withTitleTooltip(props) });
|
|
612
614
|
}
|
|
613
615
|
function setColVariables(style, prefix, value) {
|
|
614
616
|
if (value === void 0) return;
|
|
@@ -648,7 +650,7 @@ function Col({
|
|
|
648
650
|
setColVariables(mergedStyle, "lg-", lg);
|
|
649
651
|
setColVariables(mergedStyle, "xl-", xl);
|
|
650
652
|
setColVariables(mergedStyle, "xxl-", xxl);
|
|
651
|
-
return /* @__PURE__ */ jsx4("div", { className: `sia-col ${className}`.trim(), style: mergedStyle, ...props });
|
|
653
|
+
return /* @__PURE__ */ jsx4("div", { className: `sia-col ${className}`.trim(), style: mergedStyle, ...withTitleTooltip(props) });
|
|
652
654
|
}
|
|
653
655
|
|
|
654
656
|
// src/components/Splitter.tsx
|
|
@@ -667,7 +669,7 @@ function SplitterPanel({
|
|
|
667
669
|
className = "",
|
|
668
670
|
...props
|
|
669
671
|
}) {
|
|
670
|
-
return /* @__PURE__ */ jsx5("div", { className: `sia-splitter__panel ${className}`.trim(), ...props });
|
|
672
|
+
return /* @__PURE__ */ jsx5("div", { className: `sia-splitter__panel ${className}`.trim(), ...withTitleTooltip(props) });
|
|
671
673
|
}
|
|
672
674
|
function normalizeExpandedSizes(panels) {
|
|
673
675
|
const specified = panels.map((panel) => panel.props.defaultSize);
|
|
@@ -783,7 +785,7 @@ function SplitterRoot({
|
|
|
783
785
|
onResize?.(next);
|
|
784
786
|
onResizeEnd?.(next);
|
|
785
787
|
}
|
|
786
|
-
return /* @__PURE__ */ jsx5("div", { ref: rootRef, className: `sia-splitter sia-splitter--${orientation} ${className}`.trim(), ...props, children: panels.flatMap((panel, index) => {
|
|
788
|
+
return /* @__PURE__ */ jsx5("div", { ref: rootRef, className: `sia-splitter sia-splitter--${orientation} ${className}`.trim(), ...withTitleTooltip(props), children: panels.flatMap((panel, index) => {
|
|
787
789
|
const panelCollapsed = Boolean(panel.props.collapsible) && (sizes[index] ?? 0) <= collapsedSize(panel) + 0.01;
|
|
788
790
|
const collapsedContent = panel.props.collapsedContent;
|
|
789
791
|
const expandFromCollapsedContent = () => {
|
|
@@ -979,7 +981,7 @@ function ToolPanel({
|
|
|
979
981
|
"aria-expanded": expanded,
|
|
980
982
|
"aria-controls": `${panelId}-content-${index}`,
|
|
981
983
|
"aria-label": `${expanded ? "\u6536\u8D77" : "\u5C55\u5F00"}${label}\u9762\u677F`,
|
|
982
|
-
title: typeof item.title === "string" ? item.title : void 0,
|
|
984
|
+
...withTitleTooltip({ title: typeof item.title === "string" ? item.title : void 0 }),
|
|
983
985
|
disabled: item.disabled,
|
|
984
986
|
onClick: () => activatePanel(item),
|
|
985
987
|
children: [
|
|
@@ -1029,7 +1031,7 @@ function ToolPanel({
|
|
|
1029
1031
|
className: `sia-tool-panel sia-tool-panel--${placement}${isOpen ? " is-open" : ""} ${className}`.trim(),
|
|
1030
1032
|
style: panelStyle,
|
|
1031
1033
|
"data-placement": placement,
|
|
1032
|
-
...props,
|
|
1034
|
+
...withTitleTooltip(props),
|
|
1033
1035
|
children: placement === "left" ? /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1034
1036
|
rail,
|
|
1035
1037
|
content,
|
|
@@ -1078,7 +1080,7 @@ function WindowFrame({
|
|
|
1078
1080
|
{
|
|
1079
1081
|
className: `sia-window-frame ${className}`.trim(),
|
|
1080
1082
|
"data-sia-window-mode": "custom",
|
|
1081
|
-
...props,
|
|
1083
|
+
...withTitleTooltip(props),
|
|
1082
1084
|
children: [
|
|
1083
1085
|
titleBar,
|
|
1084
1086
|
children
|
|
@@ -1108,7 +1110,7 @@ function WindowControls({
|
|
|
1108
1110
|
className: `sia-window-controls ${className}`.trim(),
|
|
1109
1111
|
"data-sia-window-no-drag": "",
|
|
1110
1112
|
"aria-label": "\u7A97\u53E3\u63A7\u5236",
|
|
1111
|
-
...props,
|
|
1113
|
+
...withTitleTooltip(props),
|
|
1112
1114
|
children: [
|
|
1113
1115
|
showMinimize ? /* @__PURE__ */ jsx7(
|
|
1114
1116
|
"button",
|
|
@@ -1116,7 +1118,7 @@ function WindowControls({
|
|
|
1116
1118
|
type: "button",
|
|
1117
1119
|
className: "sia-window-control",
|
|
1118
1120
|
"aria-label": mergedLabels.minimize,
|
|
1119
|
-
title: mergedLabels.minimize,
|
|
1121
|
+
...withTitleTooltip({ title: mergedLabels.minimize }),
|
|
1120
1122
|
disabled: isDisabled("minimize"),
|
|
1121
1123
|
onClick: () => runAction("minimize"),
|
|
1122
1124
|
children: /* @__PURE__ */ jsx7(Icon, { name: "minus", size: 14 })
|
|
@@ -1128,7 +1130,7 @@ function WindowControls({
|
|
|
1128
1130
|
type: "button",
|
|
1129
1131
|
className: "sia-window-control",
|
|
1130
1132
|
"aria-label": maximized ? mergedLabels.restore : mergedLabels.maximize,
|
|
1131
|
-
title: maximized ? mergedLabels.restore : mergedLabels.maximize,
|
|
1133
|
+
...withTitleTooltip({ title: maximized ? mergedLabels.restore : mergedLabels.maximize }),
|
|
1132
1134
|
disabled: isDisabled("toggle-maximize"),
|
|
1133
1135
|
onClick: () => runAction("toggle-maximize"),
|
|
1134
1136
|
children: /* @__PURE__ */ jsx7(Icon, { name: maximized ? "fullscreen-exit" : "fullscreen", size: 13 })
|
|
@@ -1140,7 +1142,7 @@ function WindowControls({
|
|
|
1140
1142
|
type: "button",
|
|
1141
1143
|
className: "sia-window-control sia-window-control--close",
|
|
1142
1144
|
"aria-label": mergedLabels.close,
|
|
1143
|
-
title: mergedLabels.close,
|
|
1145
|
+
...withTitleTooltip({ title: mergedLabels.close }),
|
|
1144
1146
|
disabled: isDisabled("close"),
|
|
1145
1147
|
onClick: () => runAction("close"),
|
|
1146
1148
|
children: /* @__PURE__ */ jsx7(Icon, { name: "close", size: 14 })
|
|
@@ -1189,7 +1191,7 @@ function WindowTitleBar({
|
|
|
1189
1191
|
className: `sia-window-titlebar ${className}`.trim(),
|
|
1190
1192
|
"data-actions-align": actionsAlign,
|
|
1191
1193
|
onMouseDown: handleMouseDown,
|
|
1192
|
-
...props,
|
|
1194
|
+
...withTitleTooltip(props),
|
|
1193
1195
|
children: [
|
|
1194
1196
|
leading ? /* @__PURE__ */ jsx7("div", { className: "sia-window-titlebar__leading", children: leading }) : null,
|
|
1195
1197
|
actionsAlign === "left" ? renderedActions : null,
|
|
@@ -1324,7 +1326,7 @@ var DrawerRoot = forwardRef(function Drawer({
|
|
|
1324
1326
|
"aria-modal": "true",
|
|
1325
1327
|
"aria-labelledby": title ? titleId : void 0,
|
|
1326
1328
|
tabIndex: -1,
|
|
1327
|
-
...props,
|
|
1329
|
+
...withTitleTooltip(props),
|
|
1328
1330
|
children: [
|
|
1329
1331
|
/* @__PURE__ */ jsxs8("div", { className: "sia-drawer__header", children: [
|
|
1330
1332
|
/* @__PURE__ */ jsxs8("div", { className: "sia-drawer__heading", children: [
|
|
@@ -1428,7 +1430,7 @@ var Switch = forwardRef2(function Switch2({
|
|
|
1428
1430
|
onChange?.(event);
|
|
1429
1431
|
};
|
|
1430
1432
|
return /* @__PURE__ */ jsxs9("label", { className: `sia-switch-wrap sia-switch-wrap--${size} ${className}`.trim(), children: [
|
|
1431
|
-
/* @__PURE__ */ jsx9("input", { ref, type: "checkbox", role: "switch", className: "sia-switch-input", onChange: handleChange, ...props }),
|
|
1433
|
+
/* @__PURE__ */ jsx9("input", { ref, type: "checkbox", role: "switch", className: "sia-switch-input", onChange: handleChange, ...withTitleTooltip(props) }),
|
|
1432
1434
|
/* @__PURE__ */ jsxs9(
|
|
1433
1435
|
"span",
|
|
1434
1436
|
{
|
|
@@ -1656,7 +1658,7 @@ function FormRoot({
|
|
|
1656
1658
|
return /* @__PURE__ */ jsx9(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx9(PlaceholderModeContext.Provider, { value: resolvedPlaceholderMode, children: /* @__PURE__ */ jsx9(ControlSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx9(
|
|
1657
1659
|
"form",
|
|
1658
1660
|
{
|
|
1659
|
-
...props,
|
|
1661
|
+
...withTitleTooltip(props),
|
|
1660
1662
|
className: `sia-form sia-form--${layout} sia-form--${size}${disabled ? " is-disabled" : ""} ${className}`.trim(),
|
|
1661
1663
|
"data-required-mark": requiredMark,
|
|
1662
1664
|
onSubmit: (event) => {
|
|
@@ -1827,7 +1829,7 @@ var RadioRoot = forwardRef3(function Radio({ value, size: sizeProp, children, di
|
|
|
1827
1829
|
/* @__PURE__ */ jsx10(
|
|
1828
1830
|
"input",
|
|
1829
1831
|
{
|
|
1830
|
-
...props,
|
|
1832
|
+
...withTitleTooltip(props),
|
|
1831
1833
|
ref,
|
|
1832
1834
|
id: props.id ?? fallbackId,
|
|
1833
1835
|
className: "sia-radio__input",
|
|
@@ -1947,7 +1949,7 @@ function Slider({
|
|
|
1947
1949
|
{
|
|
1948
1950
|
className: `sia-slider${range ? " sia-slider--range" : ""}${vertical ? " sia-slider--vertical" : ""}${reverse ? " sia-slider--reverse" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(),
|
|
1949
1951
|
style,
|
|
1950
|
-
...props,
|
|
1952
|
+
...withTitleTooltip(props),
|
|
1951
1953
|
children: [
|
|
1952
1954
|
/* @__PURE__ */ jsx11("div", { className: "sia-slider__rail", children: /* @__PURE__ */ jsx11("span", { className: "sia-slider__track" }) }),
|
|
1953
1955
|
values.map((item, index) => /* @__PURE__ */ jsxs11("div", { className: "sia-slider__thumb-wrap", children: [
|
|
@@ -2205,7 +2207,7 @@ function ColorPicker({
|
|
|
2205
2207
|
const triggerBackground = color || "transparent";
|
|
2206
2208
|
const triggerText = color || "\u65E0\u8272";
|
|
2207
2209
|
const opaqueColor = rgbaToHex({ ...rgba, a: 100 }, false);
|
|
2208
|
-
return /* @__PURE__ */ jsxs12("div", { ref: rootRef, className: `sia-color-picker sia-color-picker--${size}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...props, children: [
|
|
2210
|
+
return /* @__PURE__ */ jsxs12("div", { ref: rootRef, className: `sia-color-picker sia-color-picker--${size}${disabled ? " is-disabled" : ""} ${className}`.trim(), ...withTitleTooltip(props), children: [
|
|
2209
2211
|
/* @__PURE__ */ jsxs12(
|
|
2210
2212
|
"button",
|
|
2211
2213
|
{
|
|
@@ -2225,7 +2227,7 @@ function ColorPicker({
|
|
|
2225
2227
|
/* @__PURE__ */ jsxs12(PopupPortal, { ref: popupRef, anchorRef: rootRef, open, className: "sia-color-picker__popup", role: "dialog", "aria-label": "\u989C\u8272\u9009\u62E9\u5668", children: [
|
|
2226
2228
|
/* @__PURE__ */ jsxs12("div", { className: "sia-color-picker__mode-row", children: [
|
|
2227
2229
|
modes.length > 1 ? /* @__PURE__ */ jsx12("div", { className: "sia-color-picker__modes", role: "tablist", "aria-label": "\u989C\u8272\u6A21\u5F0F", children: modes.map((item) => /* @__PURE__ */ jsx12("button", { type: "button", role: "tab", "aria-selected": currentMode === item, className: currentMode === item ? "is-active" : "", onClick: () => switchMode(item), children: item === "solid" ? "\u5355\u8272" : "\u6E10\u53D8\u8272" }, item)) }) : /* @__PURE__ */ jsx12("strong", { children: currentMode === "solid" ? "\u5355\u8272" : "\u6E10\u53D8\u8272" }),
|
|
2228
|
-
allowClear ? /* @__PURE__ */ jsx12("button", { type: "button", className: `sia-color-picker__none${color ? "" : " is-active"}`, "aria-label": "\u9009\u62E9\u65E0\u8272", title: "\u65E0\u8272", onClick: selectNoColor, children: /* @__PURE__ */ jsx12("span", {}) }) : null
|
|
2230
|
+
allowClear ? /* @__PURE__ */ jsx12("button", { type: "button", className: `sia-color-picker__none${color ? "" : " is-active"}`, "aria-label": "\u9009\u62E9\u65E0\u8272", ...withTitleTooltip({ title: "\u65E0\u8272" }), onClick: selectNoColor, children: /* @__PURE__ */ jsx12("span", {}) }) : null
|
|
2229
2231
|
] }),
|
|
2230
2232
|
currentMode === "gradient" ? /* @__PURE__ */ jsxs12("div", { className: "sia-color-picker__gradient-editor", children: [
|
|
2231
2233
|
/* @__PURE__ */ jsx12("div", { className: "sia-color-picker__gradient-preview", style: { background: gradientValue }, onPointerDown: addGradientStop, children: gradientStops.map((stop) => /* @__PURE__ */ jsx12(
|
|
@@ -2414,7 +2416,7 @@ function TimePicker({
|
|
|
2414
2416
|
/* @__PURE__ */ jsx13(
|
|
2415
2417
|
"input",
|
|
2416
2418
|
{
|
|
2417
|
-
...props,
|
|
2419
|
+
...withTitleTooltip(props),
|
|
2418
2420
|
ref: inputRef,
|
|
2419
2421
|
id: props.id ?? id,
|
|
2420
2422
|
type: "text",
|
|
@@ -2721,7 +2723,7 @@ function TreeSelect({
|
|
|
2721
2723
|
{
|
|
2722
2724
|
ref: rootRef,
|
|
2723
2725
|
className: `sia-tree-select sia-tree-select--${size} sia-tree-select--${status}${open ? " is-open" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(),
|
|
2724
|
-
...props,
|
|
2726
|
+
...withTitleTooltip(props),
|
|
2725
2727
|
onKeyDown: (event) => {
|
|
2726
2728
|
props.onKeyDown?.(event);
|
|
2727
2729
|
if (event.key === "Escape") {
|
|
@@ -3942,7 +3944,7 @@ function Markdown({ content, emptyText = "\u6682\u65E0 Markdown \u5185\u5BB9", r
|
|
|
3942
3944
|
return /* @__PURE__ */ jsx16("div", { className: `sia-markdown sia-markdown--empty ${className}`.trim(), children: emptyText });
|
|
3943
3945
|
}
|
|
3944
3946
|
return /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
3945
|
-
/* @__PURE__ */ jsx16("article", { ...props, ref: rootRef, className: `sia-markdown ${className}`.trim(), onClick: handleClick, onKeyDown: handleKeyDown, dangerouslySetInnerHTML: { __html: html } }),
|
|
3947
|
+
/* @__PURE__ */ jsx16("article", { ...withTitleTooltip(props), ref: rootRef, className: `sia-markdown ${className}`.trim(), onClick: handleClick, onKeyDown: handleKeyDown, dangerouslySetInnerHTML: { __html: html } }),
|
|
3946
3948
|
/* @__PURE__ */ jsx16(ImagePreview, { open: Boolean(previewImage), src: previewImage?.src, alt: previewImage?.alt, onOpenChange: (open) => {
|
|
3947
3949
|
if (!open) setPreviewImage(null);
|
|
3948
3950
|
} })
|
|
@@ -4043,7 +4045,7 @@ var InputNumber = forwardRef4(function InputNumber2({
|
|
|
4043
4045
|
const input = /* @__PURE__ */ jsx17(
|
|
4044
4046
|
"input",
|
|
4045
4047
|
{
|
|
4046
|
-
...props,
|
|
4048
|
+
...withTitleTooltip(props),
|
|
4047
4049
|
ref: setRef,
|
|
4048
4050
|
id: inputId,
|
|
4049
4051
|
type: "text",
|
|
@@ -4096,6 +4098,7 @@ function SelectModalBody({ config, values, disabled, onChange }) {
|
|
|
4096
4098
|
onChange([...next]);
|
|
4097
4099
|
};
|
|
4098
4100
|
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
4101
|
+
config.headerExtra != null && config.headerExtra !== false ? /* @__PURE__ */ jsx18("div", { className: "sia-select-modal__header-extra", children: config.headerExtra }) : null,
|
|
4099
4102
|
/* @__PURE__ */ jsxs18("div", { className: "sia-select-modal__heading", children: [
|
|
4100
4103
|
/* @__PURE__ */ jsxs18("div", { role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
|
|
4101
4104
|
/* @__PURE__ */ jsx18(Button, { role: "tab", "aria-selected": !selectedOnly, variant: "link", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
|
|
@@ -4167,7 +4170,7 @@ function openSelectModal(config) {
|
|
|
4167
4170
|
} });
|
|
4168
4171
|
}
|
|
4169
4172
|
function modalConfig() {
|
|
4170
|
-
const { options, value, mode, showValue, columns, maxHeight, searchPlaceholder, filterOption, onSearch, onConfirm, ...modal } = current;
|
|
4173
|
+
const { options, value, mode, showValue, columns, maxHeight, headerExtra, extraValues, searchPlaceholder, filterOption, onSearch, onConfirm, ...modal } = current;
|
|
4171
4174
|
return {
|
|
4172
4175
|
...modal,
|
|
4173
4176
|
title: current.title ?? "\u8BF7\u9009\u62E9",
|
|
@@ -4181,7 +4184,8 @@ function openSelectModal(config) {
|
|
|
4181
4184
|
try {
|
|
4182
4185
|
return await current.onConfirm?.(
|
|
4183
4186
|
current.mode === "multiple" ? [...values] : values[0] ?? null,
|
|
4184
|
-
current.mode === "multiple" ? selected : selected[0] ?? null
|
|
4187
|
+
current.mode === "multiple" ? selected : selected[0] ?? null,
|
|
4188
|
+
{ ...current.extraValues }
|
|
4185
4189
|
);
|
|
4186
4190
|
} finally {
|
|
4187
4191
|
submitting = false;
|
|
@@ -4205,6 +4209,7 @@ function openSelectModal(config) {
|
|
|
4205
4209
|
// src/components/Treemap.tsx
|
|
4206
4210
|
import { useEffect as useEffect10, useMemo as useMemo8, useRef as useRef12, useState as useState15 } from "react";
|
|
4207
4211
|
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4212
|
+
import { createElement } from "react";
|
|
4208
4213
|
function positiveValue(value) {
|
|
4209
4214
|
return Number.isFinite(value) && value > 0 ? value : 1;
|
|
4210
4215
|
}
|
|
@@ -4552,7 +4557,7 @@ function Treemap({
|
|
|
4552
4557
|
return /* @__PURE__ */ jsxs19(
|
|
4553
4558
|
"div",
|
|
4554
4559
|
{
|
|
4555
|
-
...props,
|
|
4560
|
+
...withTitleTooltip(props),
|
|
4556
4561
|
ref: containerRef,
|
|
4557
4562
|
className: `sia-treemap ${className}`.trim(),
|
|
4558
4563
|
style,
|
|
@@ -4577,46 +4582,46 @@ function Treemap({
|
|
|
4577
4582
|
const hasChildren = Boolean(node.hasChildren || node.children?.length);
|
|
4578
4583
|
const title = `${node.label} \xB7 ${String(valueFormatter(node.value, node))}`;
|
|
4579
4584
|
if (expanded) {
|
|
4580
|
-
return /* @__PURE__ */
|
|
4585
|
+
return /* @__PURE__ */ createElement(
|
|
4581
4586
|
"div",
|
|
4582
4587
|
{
|
|
4583
4588
|
className: `sia-treemap__tile sia-treemap__tile--directory is-expanded${effectiveFocusedNode?.key === node.key ? " is-focused" : ""}${active ? " is-active" : ""}`,
|
|
4584
4589
|
style: tileStyle,
|
|
4585
4590
|
role: "treeitem",
|
|
4586
4591
|
"aria-expanded": "true",
|
|
4587
|
-
title,
|
|
4592
|
+
...withTitleTooltip({ title }),
|
|
4588
4593
|
"data-treemap-key": node.key,
|
|
4589
|
-
|
|
4590
|
-
/* @__PURE__ */ jsxs19(
|
|
4591
|
-
"button",
|
|
4592
|
-
{
|
|
4593
|
-
type: "button",
|
|
4594
|
-
className: "sia-treemap__header-main",
|
|
4595
|
-
disabled: node.disabled,
|
|
4596
|
-
onClick: (event) => handleNodeClick(node, event),
|
|
4597
|
-
children: [
|
|
4598
|
-
/* @__PURE__ */ jsx19("span", { className: "sia-treemap__label", children: node.label }),
|
|
4599
|
-
showValue ? /* @__PURE__ */ jsx19("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
|
|
4600
|
-
]
|
|
4601
|
-
}
|
|
4602
|
-
),
|
|
4603
|
-
/* @__PURE__ */ jsx19(
|
|
4604
|
-
"button",
|
|
4605
|
-
{
|
|
4606
|
-
type: "button",
|
|
4607
|
-
className: "sia-treemap__focus",
|
|
4608
|
-
"aria-label": effectiveFocusedNode?.key === node.key ? `\u8FD8\u539F ${node.label}` : `\u805A\u7126\u5C55\u5F00 ${node.label}`,
|
|
4609
|
-
title: effectiveFocusedNode?.key === node.key ? "\u8FD8\u539F\u539F\u6709\u89C6\u56FE" : "\u5C55\u5F00\u5230\u6574\u4E2A\u533A\u57DF",
|
|
4610
|
-
onClick: () => updateFocusedKey(effectiveFocusedNode?.key === node.key ? null : node.key),
|
|
4611
|
-
children: /* @__PURE__ */ jsx19(Icon, { name: effectiveFocusedNode?.key === node.key ? "fullscreen-exit" : "fullscreen", size: 14 })
|
|
4612
|
-
}
|
|
4613
|
-
)
|
|
4614
|
-
] })
|
|
4594
|
+
key: node.key
|
|
4615
4595
|
},
|
|
4616
|
-
|
|
4596
|
+
/* @__PURE__ */ jsxs19("div", { className: "sia-treemap__header", children: [
|
|
4597
|
+
/* @__PURE__ */ jsxs19(
|
|
4598
|
+
"button",
|
|
4599
|
+
{
|
|
4600
|
+
type: "button",
|
|
4601
|
+
className: "sia-treemap__header-main",
|
|
4602
|
+
disabled: node.disabled,
|
|
4603
|
+
onClick: (event) => handleNodeClick(node, event),
|
|
4604
|
+
children: [
|
|
4605
|
+
/* @__PURE__ */ jsx19("span", { className: "sia-treemap__label", children: node.label }),
|
|
4606
|
+
showValue ? /* @__PURE__ */ jsx19("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
|
|
4607
|
+
]
|
|
4608
|
+
}
|
|
4609
|
+
),
|
|
4610
|
+
/* @__PURE__ */ jsx19(
|
|
4611
|
+
"button",
|
|
4612
|
+
{
|
|
4613
|
+
type: "button",
|
|
4614
|
+
className: "sia-treemap__focus",
|
|
4615
|
+
"aria-label": effectiveFocusedNode?.key === node.key ? `\u8FD8\u539F ${node.label}` : `\u805A\u7126\u5C55\u5F00 ${node.label}`,
|
|
4616
|
+
...withTitleTooltip({ title: effectiveFocusedNode?.key === node.key ? "\u8FD8\u539F\u539F\u6709\u89C6\u56FE" : "\u5C55\u5F00\u5230\u6574\u4E2A\u533A\u57DF" }),
|
|
4617
|
+
onClick: () => updateFocusedKey(effectiveFocusedNode?.key === node.key ? null : node.key),
|
|
4618
|
+
children: /* @__PURE__ */ jsx19(Icon, { name: effectiveFocusedNode?.key === node.key ? "fullscreen-exit" : "fullscreen", size: 14 })
|
|
4619
|
+
}
|
|
4620
|
+
)
|
|
4621
|
+
] })
|
|
4617
4622
|
);
|
|
4618
4623
|
}
|
|
4619
|
-
return /* @__PURE__ */
|
|
4624
|
+
return /* @__PURE__ */ createElement(
|
|
4620
4625
|
"button",
|
|
4621
4626
|
{
|
|
4622
4627
|
type: "button",
|
|
@@ -4625,15 +4630,15 @@ function Treemap({
|
|
|
4625
4630
|
role: "treeitem",
|
|
4626
4631
|
"aria-expanded": node.kind === "directory" && hasChildren ? "false" : void 0,
|
|
4627
4632
|
disabled: node.disabled,
|
|
4628
|
-
title,
|
|
4633
|
+
...withTitleTooltip({ title }),
|
|
4629
4634
|
"data-treemap-key": node.key,
|
|
4630
4635
|
onClick: (event) => handleNodeClick(node, event),
|
|
4631
|
-
|
|
4632
|
-
/* @__PURE__ */ jsx19("span", { className: "sia-treemap__label", children: node.label }),
|
|
4633
|
-
showValue ? /* @__PURE__ */ jsx19("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
|
|
4634
|
-
] }) : null
|
|
4636
|
+
key: node.key
|
|
4635
4637
|
},
|
|
4636
|
-
|
|
4638
|
+
showLabel ? /* @__PURE__ */ jsxs19("span", { className: "sia-treemap__content", children: [
|
|
4639
|
+
/* @__PURE__ */ jsx19("span", { className: "sia-treemap__label", children: node.label }),
|
|
4640
|
+
showValue ? /* @__PURE__ */ jsx19("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
|
|
4641
|
+
] }) : null
|
|
4637
4642
|
);
|
|
4638
4643
|
})
|
|
4639
4644
|
]
|
|
@@ -7324,6 +7329,7 @@ function TableInner(props, ref) {
|
|
|
7324
7329
|
overscan = 6,
|
|
7325
7330
|
stickyHeader = true,
|
|
7326
7331
|
resizable = true,
|
|
7332
|
+
cellSelection = true,
|
|
7327
7333
|
onRowClick,
|
|
7328
7334
|
onRowDoubleClick,
|
|
7329
7335
|
onCellContextMenu,
|
|
@@ -7346,12 +7352,14 @@ function TableInner(props, ref) {
|
|
|
7346
7352
|
const getRowKey = useCallback2((record, index) => typeof rowKey === "function" ? rowKey(record, index) : record[String(rowKey)] ?? index, [rowKey]);
|
|
7347
7353
|
const builtInResizePlugin = useMemo9(() => createResizePlugin(), []);
|
|
7348
7354
|
const builtInHighlightPlugin = useMemo9(() => createHighlightPlugin(), []);
|
|
7355
|
+
const builtInCellSelectionPlugin = useMemo9(() => createCellSelectionPlugin(), []);
|
|
7349
7356
|
const activePlugins = useMemo9(() => {
|
|
7350
|
-
const plugins = providedPlugins.filter((plugin) => resizable || plugin.id !== "resize");
|
|
7357
|
+
const plugins = providedPlugins.filter((plugin) => (resizable || plugin.id !== "resize") && (cellSelection || plugin.id !== "cellSelection"));
|
|
7351
7358
|
if (!plugins.some((plugin) => plugin.id === "highlight")) plugins.push(builtInHighlightPlugin);
|
|
7352
7359
|
if (resizable && !plugins.some((plugin) => plugin.id === "resize")) plugins.push(builtInResizePlugin);
|
|
7360
|
+
if (cellSelection && !plugins.some((plugin) => plugin.id === "cellSelection")) plugins.push(builtInCellSelectionPlugin);
|
|
7353
7361
|
return plugins;
|
|
7354
|
-
}, [builtInHighlightPlugin, builtInResizePlugin, providedPlugins, resizable]);
|
|
7362
|
+
}, [builtInHighlightPlugin, builtInResizePlugin, builtInCellSelectionPlugin, providedPlugins, resizable, cellSelection]);
|
|
7355
7363
|
const sortedPlugins = useMemo9(() => [...activePlugins].sort((a, b) => (a.order ?? 100) - (b.order ?? 100)), [activePlugins]);
|
|
7356
7364
|
const pluginsByIdRef = useRef15(/* @__PURE__ */ new Map());
|
|
7357
7365
|
pluginsByIdRef.current = new Map(sortedPlugins.map((plugin) => [plugin.id, plugin]));
|
|
@@ -7729,7 +7737,7 @@ function TableInner(props, ref) {
|
|
|
7729
7737
|
"data-has-fixed-right": right > 0,
|
|
7730
7738
|
"data-scrolled-left": "false",
|
|
7731
7739
|
"data-scrolled-right": "true",
|
|
7732
|
-
...htmlProps,
|
|
7740
|
+
...withTitleTooltip(htmlProps),
|
|
7733
7741
|
onPointerDownCapture: (event) => {
|
|
7734
7742
|
htmlProps.onPointerDownCapture?.(event);
|
|
7735
7743
|
if (event.defaultPrevented || loading || internalLoading) return;
|
|
@@ -7927,7 +7935,7 @@ var ThemeSwitch = forwardRef6(function ThemeSwitch2({
|
|
|
7927
7935
|
"aria-label": checked ? darkLabel : lightLabel,
|
|
7928
7936
|
className: `sia-theme-switch${checked ? " sia-theme-switch--dark" : ""} ${className}`.trim(),
|
|
7929
7937
|
onClick: handleClick,
|
|
7930
|
-
...props,
|
|
7938
|
+
...withTitleTooltip(props),
|
|
7931
7939
|
children: [
|
|
7932
7940
|
/* @__PURE__ */ jsx23("span", { className: "sia-theme-switch__selection", "aria-hidden": "true" }),
|
|
7933
7941
|
/* @__PURE__ */ jsx23("span", { className: `sia-theme-switch__icon${checked ? "" : " is-active"}`, "aria-hidden": "true", children: /* @__PURE__ */ jsxs22("svg", { viewBox: "0 0 24 24", children: [
|
|
@@ -8568,6 +8576,7 @@ export {
|
|
|
8568
8576
|
TimePicker,
|
|
8569
8577
|
Timeline,
|
|
8570
8578
|
ToolPanel,
|
|
8579
|
+
Toolbar,
|
|
8571
8580
|
Tooltip,
|
|
8572
8581
|
Tour,
|
|
8573
8582
|
Tree,
|