@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.
@@ -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 { c as SelectOption, e as SelectValue } from './Select-CVvF4mcy.cjs';
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 { c as SelectOption, e as SelectValue } from './Select-Ce2Irbpt.js';
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.jsx)("div", { className: "sia-modal__footer", children: footer ?? defaultFooter }) : null
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-shDQ5uJA.cjs';
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-CVvF4mcy.cjs';
4
+ import './Select-Da9CLN0X.cjs';
@@ -1,4 +1,4 @@
1
- export { S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-Bdb-hi9c.js';
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-Ce2Irbpt.js';
4
+ import './Select-Cz3hzQl_.js';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SelectDateRange
3
- } from "./chunk-UCQZZ2YC.js";
4
- import "./chunk-LPRFOSRZ.js";
3
+ } from "./chunk-LO3BUBWU.js";
4
+ import "./chunk-4HB6GC24.js";
5
5
  import "./chunk-SUMXP2SF.js";
6
6
  import "./chunk-TZGUBGA4.js";
7
7
  import "./chunk-3VJ4CZDQ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",