@sia.soul/sia-react-ui 0.1.18 → 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-JX53ZBIW.js → chunk-3RWL67CK.js} +1 -1
- package/dist/{chunk-LPRFOSRZ.js → chunk-4HB6GC24.js} +8 -2
- package/dist/{chunk-UCQZZ2YC.js → chunk-LO3BUBWU.js} +1 -1
- 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 +8 -2
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/index.cjs +1685 -1551
- package/dist/index.d.cts +24 -6
- package/dist/index.d.ts +24 -6
- package/dist/index.js +357 -230
- 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 +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { InputHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-DAYZvZVu.cjs';
|
|
4
|
-
import {
|
|
4
|
+
import { S as SelectOption, e as SelectValue } from './Select-Da9CLN0X.cjs';
|
|
5
5
|
|
|
6
6
|
type DatePickerShowTime = boolean | {
|
|
7
7
|
showSecond?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { InputHTMLAttributes, ReactNode, HTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-DAYZvZVu.js';
|
|
4
|
-
import {
|
|
4
|
+
import { S as SelectOption, e as SelectValue } from './Select-Cz3hzQl_.js';
|
|
5
5
|
|
|
6
6
|
type DatePickerShowTime = boolean | {
|
|
7
7
|
showSecond?: boolean;
|
|
@@ -1947,6 +1947,7 @@ var ModalRoot = (0, import_react8.forwardRef)(function Modal({
|
|
|
1947
1947
|
title,
|
|
1948
1948
|
children,
|
|
1949
1949
|
footer,
|
|
1950
|
+
footerExtra,
|
|
1950
1951
|
type = "default",
|
|
1951
1952
|
okText = "\u786E\u5B9A",
|
|
1952
1953
|
cancelText = "\u53D6\u6D88",
|
|
@@ -2071,7 +2072,10 @@ var ModalRoot = (0, import_react8.forwardRef)(function Modal({
|
|
|
2071
2072
|
closable ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "sia-modal__close", "aria-label": "\u5173\u95ED\u5BF9\u8BDD\u6846", onClick: requestClose, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { name: "close", size: 17 }) }) : null
|
|
2072
2073
|
] }),
|
|
2073
2074
|
children !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "sia-modal__body", children }) : null,
|
|
2074
|
-
footer !== null ? /* @__PURE__ */ (0, import_jsx_runtime8.
|
|
2075
|
+
footer !== null ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "sia-modal__footer", children: [
|
|
2076
|
+
footer === void 0 && footerExtra != null ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginRight: "auto" }, children: footerExtra }) : null,
|
|
2077
|
+
footer ?? defaultFooter
|
|
2078
|
+
] }) : null
|
|
2075
2079
|
]
|
|
2076
2080
|
}
|
|
2077
2081
|
)
|
|
@@ -2523,6 +2527,7 @@ function SelectionPanel({
|
|
|
2523
2527
|
value,
|
|
2524
2528
|
onChange,
|
|
2525
2529
|
multiple = false,
|
|
2530
|
+
allowDeselect = false,
|
|
2526
2531
|
disabled = false,
|
|
2527
2532
|
loading = false,
|
|
2528
2533
|
showSearch = true,
|
|
@@ -2588,7 +2593,7 @@ function SelectionPanel({
|
|
|
2588
2593
|
function toggle(option) {
|
|
2589
2594
|
if (disabled || loading || option.disabled || option.optionType === "divider") return;
|
|
2590
2595
|
setActive(option.value);
|
|
2591
|
-
onChange(multiple ? selected.has(option.value) ? value.filter((item) => item !== option.value) : [...value, option.value] : [option.value]);
|
|
2596
|
+
onChange(multiple ? selected.has(option.value) ? value.filter((item) => item !== option.value) : [...value, option.value] : allowDeselect && selected.has(option.value) ? [] : [option.value]);
|
|
2592
2597
|
}
|
|
2593
2598
|
function batch(operation) {
|
|
2594
2599
|
if (disabled || loading) return;
|
|
@@ -3524,6 +3529,7 @@ var Select = (0, import_react16.forwardRef)(function Select2({
|
|
|
3524
3529
|
value: modalValues,
|
|
3525
3530
|
onChange: setModalValues,
|
|
3526
3531
|
multiple,
|
|
3532
|
+
allowDeselect: allowClear,
|
|
3527
3533
|
selectedOnly,
|
|
3528
3534
|
showValue,
|
|
3529
3535
|
showSearch: false,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
1
|
+
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-4tEYkA5O.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './shared-DAYZvZVu.cjs';
|
|
4
|
-
import './Select-
|
|
4
|
+
import './Select-Da9CLN0X.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
1
|
+
export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-D-ynrB5k.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './shared-DAYZvZVu.js';
|
|
4
|
-
import './Select-
|
|
4
|
+
import './Select-Cz3hzQl_.js';
|