@sia.soul/sia-react-ui 0.1.51 → 0.1.53
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/{chunk-FJ3FP4YV.js → chunk-MFR2FYQA.js} +4 -1
- package/dist/{core-murmERqF.d.ts → core-DXJ4b0lT.d.ts} +2 -0
- package/dist/{core-KIaXZ4_O.d.cts → core-DtGYdU61.d.cts} +2 -0
- package/dist/core.cjs +4 -1
- package/dist/core.css +22 -4
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +516 -433
- package/dist/index.css +22 -4
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +121 -41
- package/package.json +1 -1
|
@@ -1461,6 +1461,7 @@ var UploadRoot = forwardRef(function UploadRoot2({
|
|
|
1461
1461
|
downloadRequest,
|
|
1462
1462
|
itemRender,
|
|
1463
1463
|
children,
|
|
1464
|
+
onChoose,
|
|
1464
1465
|
className = "",
|
|
1465
1466
|
style,
|
|
1466
1467
|
onDragOver,
|
|
@@ -1663,7 +1664,9 @@ var UploadRoot = forwardRef(function UploadRoot2({
|
|
|
1663
1664
|
event.preventDefault();
|
|
1664
1665
|
ingest(selected.map((file) => ({ file, path: file.name })));
|
|
1665
1666
|
}
|
|
1666
|
-
const trigger = !(listType === "picture-card" && full) && /* @__PURE__ */ jsx8("div", { className: "sia-upload__trigger", children: /* @__PURE__ */ jsx8(Button, { className: "sia-upload__choose", "aria-label": compactCard ? directory ? "\u9009\u62E9\u6587\u4EF6\u5939" : "\u9009\u62E9\u6587\u4EF6" : void 0, disabled: disabled || full, onClick: () =>
|
|
1667
|
+
const trigger = !(listType === "picture-card" && full) && /* @__PURE__ */ jsx8("div", { className: "sia-upload__trigger", children: /* @__PURE__ */ jsx8(Button, { className: "sia-upload__choose", "aria-label": compactCard ? directory ? "\u9009\u62E9\u6587\u4EF6\u5939" : "\u9009\u62E9\u6587\u4EF6" : void 0, disabled: disabled || full, onClick: () => {
|
|
1668
|
+
if (!disabled && !full && onChoose?.() !== false) inputRef.current?.click();
|
|
1669
|
+
}, children: children ?? (listType === "picture-card" ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
1667
1670
|
/* @__PURE__ */ jsx8(Icon, { name: "plus", size: 24 }),
|
|
1668
1671
|
/* @__PURE__ */ jsx8("span", { children: "\u4E0A\u4F20\u56FE\u7247" })
|
|
1669
1672
|
] }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
@@ -2027,6 +2027,8 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
2027
2027
|
itemRender?: (node: ReactNode, file: UploadFile, fileList: readonly UploadFile[], actions: UploadItemActions) => ReactNode;
|
|
2028
2028
|
/** 上传按钮内容,不应嵌套其他交互控件;外层负责点击和键盘操作。 */
|
|
2029
2029
|
children?: ReactNode;
|
|
2030
|
+
/** 点击或键盘激活上传入口时同步调用;返回 false 阻止打开系统文件选择器,可用于打开业务上传弹框。默认打开系统选择器。禁用或已达数量上限时不调用,不影响拖拽与粘贴。 */
|
|
2031
|
+
onChoose?: () => boolean | void;
|
|
2030
2032
|
}
|
|
2031
2033
|
/** 拖拽区域继承全部 Upload 能力,ref 同样支持手动控制。 */
|
|
2032
2034
|
interface UploadDraggerProps extends UploadProps {
|
|
@@ -2027,6 +2027,8 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
2027
2027
|
itemRender?: (node: ReactNode, file: UploadFile, fileList: readonly UploadFile[], actions: UploadItemActions) => ReactNode;
|
|
2028
2028
|
/** 上传按钮内容,不应嵌套其他交互控件;外层负责点击和键盘操作。 */
|
|
2029
2029
|
children?: ReactNode;
|
|
2030
|
+
/** 点击或键盘激活上传入口时同步调用;返回 false 阻止打开系统文件选择器,可用于打开业务上传弹框。默认打开系统选择器。禁用或已达数量上限时不调用,不影响拖拽与粘贴。 */
|
|
2031
|
+
onChoose?: () => boolean | void;
|
|
2030
2032
|
}
|
|
2031
2033
|
/** 拖拽区域继承全部 Upload 能力,ref 同样支持手动控制。 */
|
|
2032
2034
|
interface UploadDraggerProps extends UploadProps {
|
package/dist/core.cjs
CHANGED
|
@@ -4562,6 +4562,7 @@ var UploadRoot = (0, import_react24.forwardRef)(function UploadRoot2({
|
|
|
4562
4562
|
downloadRequest,
|
|
4563
4563
|
itemRender,
|
|
4564
4564
|
children,
|
|
4565
|
+
onChoose,
|
|
4565
4566
|
className = "",
|
|
4566
4567
|
style,
|
|
4567
4568
|
onDragOver,
|
|
@@ -4764,7 +4765,9 @@ var UploadRoot = (0, import_react24.forwardRef)(function UploadRoot2({
|
|
|
4764
4765
|
event.preventDefault();
|
|
4765
4766
|
ingest(selected.map((file) => ({ file, path: file.name })));
|
|
4766
4767
|
}
|
|
4767
|
-
const trigger = !(listType === "picture-card" && full) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "sia-upload__trigger", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { className: "sia-upload__choose", "aria-label": compactCard ? directory ? "\u9009\u62E9\u6587\u4EF6\u5939" : "\u9009\u62E9\u6587\u4EF6" : void 0, disabled: disabled || full, onClick: () =>
|
|
4768
|
+
const trigger = !(listType === "picture-card" && full) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "sia-upload__trigger", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { className: "sia-upload__choose", "aria-label": compactCard ? directory ? "\u9009\u62E9\u6587\u4EF6\u5939" : "\u9009\u62E9\u6587\u4EF6" : void 0, disabled: disabled || full, onClick: () => {
|
|
4769
|
+
if (!disabled && !full && onChoose?.() !== false) inputRef.current?.click();
|
|
4770
|
+
}, children: children ?? (listType === "picture-card" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
4768
4771
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "plus", size: 24 }),
|
|
4769
4772
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "\u4E0A\u4F20\u56FE\u7247" })
|
|
4770
4773
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
package/dist/core.css
CHANGED
|
@@ -2190,14 +2190,24 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
2190
2190
|
overflow: var(--sia-scroll-overflow, auto);
|
|
2191
2191
|
padding: 10vh 16px 32px;
|
|
2192
2192
|
color: var(--sia-color-text);
|
|
2193
|
+
isolation: isolate;
|
|
2194
|
+
}
|
|
2195
|
+
.sia-modal-root::before {
|
|
2196
|
+
content: "";
|
|
2197
|
+
position: fixed;
|
|
2198
|
+
inset: 0;
|
|
2199
|
+
z-index: 0;
|
|
2193
2200
|
background: rgb(0 0 0 / 45%);
|
|
2194
|
-
animation: sia-modal-mask-in
|
|
2201
|
+
animation: sia-modal-mask-in 220ms ease both;
|
|
2202
|
+
will-change: opacity;
|
|
2195
2203
|
}
|
|
2196
2204
|
.sia-modal-root--centered {
|
|
2197
2205
|
align-items: center;
|
|
2198
2206
|
padding-block: 24px;
|
|
2199
2207
|
}
|
|
2200
2208
|
.sia-modal {
|
|
2209
|
+
position: relative;
|
|
2210
|
+
z-index: 1;
|
|
2201
2211
|
width: min(var(--sia-modal-width), calc(100vw - 32px));
|
|
2202
2212
|
overflow: hidden;
|
|
2203
2213
|
background: var(--sia-color-surface);
|
|
@@ -2210,6 +2220,8 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
2210
2220
|
}
|
|
2211
2221
|
.sia-modal-root[data-state=closing] {
|
|
2212
2222
|
pointer-events: none;
|
|
2223
|
+
}
|
|
2224
|
+
.sia-modal-root[data-state=closing]::before {
|
|
2213
2225
|
animation: sia-modal-mask-out 220ms ease both;
|
|
2214
2226
|
}
|
|
2215
2227
|
.sia-modal-root[data-state=closing] .sia-modal {
|
|
@@ -4401,12 +4413,18 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
4401
4413
|
}
|
|
4402
4414
|
@keyframes sia-modal-mask-in {
|
|
4403
4415
|
from {
|
|
4404
|
-
|
|
4416
|
+
opacity: 0;
|
|
4417
|
+
}
|
|
4418
|
+
to {
|
|
4419
|
+
opacity: 1;
|
|
4405
4420
|
}
|
|
4406
4421
|
}
|
|
4407
4422
|
@keyframes sia-modal-mask-out {
|
|
4423
|
+
from {
|
|
4424
|
+
opacity: 1;
|
|
4425
|
+
}
|
|
4408
4426
|
to {
|
|
4409
|
-
|
|
4427
|
+
opacity: 0;
|
|
4410
4428
|
}
|
|
4411
4429
|
}
|
|
4412
4430
|
@keyframes sia-modal-slide-in {
|
|
@@ -4554,7 +4572,7 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
4554
4572
|
.sia-button::after,
|
|
4555
4573
|
.sia-icon--spin,
|
|
4556
4574
|
.sia-icon--pulse,
|
|
4557
|
-
.sia-modal-root,
|
|
4575
|
+
.sia-modal-root::before,
|
|
4558
4576
|
.sia-modal,
|
|
4559
4577
|
.sia-drawer,
|
|
4560
4578
|
.sia-drawer__mask,
|
package/dist/core.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-
|
|
1
|
+
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-DtGYdU61.cjs';
|
|
2
2
|
export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-YJbT-MF1.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-Bx4B28Wh.cjs';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-
|
|
1
|
+
export { d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, h as Card, i as CardAccent, j as CardProps, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, K as Icon, L as IconName, M as IconProps, N as IconVariant, U as Input, V as InputProps, a0 as MessageConfig, a1 as MessageHandle, a2 as MessageKey, a3 as MessageType, ab as Progress, ac as ProgressProps, ad as ProgressStatus, ag as Segmented, ah as SegmentedOption, ai as SegmentedProps, aj as SegmentedValue, aq as TabItem, ar as Tabs, at as TabsOrientation, au as TabsPosition, av as TabsProps, aw as TabsType, ax as Tag, ay as TagProps, az as TagSize, T as TagStatus, aA as TagVariant, aE as Toolbar, aF as ToolbarItem, aG as ToolbarProps, aR as Typography, aS as TypographyLinkProps, aT as TypographyProps, aU as TypographyTitleProps, aV as TypographyType, aW as Upload, aX as UploadChangeInfo, aY as UploadDraggerProps, aZ as UploadFile, a_ as UploadFileStatus, b1 as UploadProps, b5 as UploadRequestOptions, b9 as message } from './core-DXJ4b0lT.js';
|
|
2
2
|
export { f as Button, B as ButtonProps, e as ButtonSize, g as ButtonVariant, h as Modal, d as ModalActionResult, M as ModalOpenConfig, i as ModalProps, j as ModalType, a as OverlayApiHandle, k as Select, S as SelectOption, c as SelectProps, m as SelectValue } from './Select-CCrPqULn.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-Bx4B28Wh.js';
|