@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
|
@@ -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 };
|
|
@@ -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,
|
|
@@ -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
|
@@ -2320,6 +2320,7 @@ var ModalRoot = (0, import_react14.forwardRef)(function Modal({
|
|
|
2320
2320
|
title,
|
|
2321
2321
|
children,
|
|
2322
2322
|
footer,
|
|
2323
|
+
footerExtra,
|
|
2323
2324
|
type = "default",
|
|
2324
2325
|
okText = "\u786E\u5B9A",
|
|
2325
2326
|
cancelText = "\u53D6\u6D88",
|
|
@@ -2444,7 +2445,10 @@ var ModalRoot = (0, import_react14.forwardRef)(function Modal({
|
|
|
2444
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
|
|
2445
2446
|
] }),
|
|
2446
2447
|
children !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "sia-modal__body", children }) : null,
|
|
2447
|
-
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
|
|
2448
2452
|
]
|
|
2449
2453
|
}
|
|
2450
2454
|
)
|
|
@@ -2630,6 +2634,7 @@ function SelectionPanel({
|
|
|
2630
2634
|
value,
|
|
2631
2635
|
onChange,
|
|
2632
2636
|
multiple = false,
|
|
2637
|
+
allowDeselect = false,
|
|
2633
2638
|
disabled = false,
|
|
2634
2639
|
loading = false,
|
|
2635
2640
|
showSearch = true,
|
|
@@ -2695,7 +2700,7 @@ function SelectionPanel({
|
|
|
2695
2700
|
function toggle(option) {
|
|
2696
2701
|
if (disabled || loading || option.disabled || option.optionType === "divider") return;
|
|
2697
2702
|
setActive(option.value);
|
|
2698
|
-
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]);
|
|
2699
2704
|
}
|
|
2700
2705
|
function batch(operation) {
|
|
2701
2706
|
if (disabled || loading) return;
|
|
@@ -3631,6 +3636,7 @@ var Select = (0, import_react20.forwardRef)(function Select2({
|
|
|
3631
3636
|
value: modalValues,
|
|
3632
3637
|
onChange: setModalValues,
|
|
3633
3638
|
multiple,
|
|
3639
|
+
allowDeselect: allowClear,
|
|
3634
3640
|
selectedOnly,
|
|
3635
3641
|
showValue,
|
|
3636
3642
|
showSearch: false,
|
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,12 +9,12 @@ 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,
|