@sia.soul/sia-react-ui 0.1.0 → 0.1.3
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/THIRD_PARTY_NOTICES.md +0 -1
- package/dist/{chunk-YCVXUMGP.js → chunk-2RRTDU3N.js} +2 -2
- package/dist/{chunk-DZ45HRVP.js → chunk-IMZT6VCU.js} +1 -1
- package/dist/{chunk-JKZGAZMB.js → chunk-OAC7BSUR.js} +1 -1
- package/dist/{chunk-OMA75YLM.js → chunk-OQLDEVCF.js} +2 -2
- package/dist/{chunk-ULEGTKXR.js → chunk-Q4XNFMUH.js} +18 -4
- package/dist/{chunk-34TTF4Y7.js → chunk-R4OWKIXJ.js} +70 -20
- package/dist/{core-BeiAQiDY.d.ts → core-DFYheaoJ.d.ts} +2 -0
- package/dist/{core-DRICIs2n.d.cts → core-De2pRX5w.d.cts} +2 -0
- package/dist/core.cjs +16 -2
- package/dist/core.css +158 -12
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +4 -4
- package/dist/index.cjs +736 -115
- package/dist/index.css +158 -12
- package/dist/index.d.cts +110 -10
- package/dist/index.d.ts +110 -10
- package/dist/index.js +653 -99
- package/dist/rich-text-editor.cjs +2 -2
- package/dist/rich-text-editor.js +3 -3
- package/dist/{select-date-range-BDWdo7qt.d.ts → select-date-range-DOyG1DGp.d.ts} +10 -3
- package/dist/{select-date-range-DWik3ADr.d.cts → select-date-range-UyYrHex6.d.cts} +10 -3
- package/dist/select-date-range.cjs +70 -20
- package/dist/select-date-range.d.cts +1 -1
- package/dist/select-date-range.d.ts +1 -1
- package/dist/select-date-range.js +3 -3
- package/package.json +129 -129
package/dist/index.css
CHANGED
|
@@ -63,6 +63,18 @@
|
|
|
63
63
|
width: 0;
|
|
64
64
|
height: 0;
|
|
65
65
|
}
|
|
66
|
+
.sia-scrollbar-track {
|
|
67
|
+
--sia-scrollbar-size: 3px;
|
|
68
|
+
}
|
|
69
|
+
.sia-scrollbar-track:hover,
|
|
70
|
+
.sia-scrollbar-track:has(> :active) {
|
|
71
|
+
--sia-scrollbar-size: 6px;
|
|
72
|
+
}
|
|
73
|
+
@media (prefers-reduced-motion: reduce) {
|
|
74
|
+
.sia-scrollbar-track > * {
|
|
75
|
+
transition: none !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
66
78
|
.sia-floating-scrollbar-layer {
|
|
67
79
|
position: fixed;
|
|
68
80
|
z-index: 2147483646;
|
|
@@ -100,14 +112,16 @@
|
|
|
100
112
|
background: var(--sia-scrollbar-thumb-hover);
|
|
101
113
|
}
|
|
102
114
|
.sia-floating-scrollbar--horizontal .sia-floating-scrollbar__thumb {
|
|
103
|
-
|
|
115
|
+
bottom: 0;
|
|
104
116
|
left: 0;
|
|
105
|
-
height:
|
|
117
|
+
height: var(--sia-scrollbar-size);
|
|
118
|
+
transition: background-color 120ms ease, height 150ms ease;
|
|
106
119
|
}
|
|
107
120
|
.sia-floating-scrollbar--vertical .sia-floating-scrollbar__thumb {
|
|
108
121
|
top: 0;
|
|
109
|
-
|
|
110
|
-
width:
|
|
122
|
+
right: 0;
|
|
123
|
+
width: var(--sia-scrollbar-size);
|
|
124
|
+
transition: background-color 120ms ease, width 150ms ease;
|
|
111
125
|
}
|
|
112
126
|
.sia-button,
|
|
113
127
|
.sia-input,
|
|
@@ -3232,18 +3246,20 @@
|
|
|
3232
3246
|
background: rgb(64 64 64 / 82%);
|
|
3233
3247
|
}
|
|
3234
3248
|
.sia-table__scrollbar--horizontal .sia-table__scrollbar-thumb {
|
|
3235
|
-
|
|
3249
|
+
bottom: 0;
|
|
3236
3250
|
left: 0;
|
|
3237
3251
|
width: var(--sia-table-scrollbar-x-size, 0);
|
|
3238
|
-
height:
|
|
3252
|
+
height: var(--sia-scrollbar-size);
|
|
3239
3253
|
transform: translateX(var(--sia-table-scrollbar-x-position, 0));
|
|
3254
|
+
transition: background-color 120ms ease, height 150ms ease;
|
|
3240
3255
|
}
|
|
3241
3256
|
.sia-table__scrollbar--vertical .sia-table__scrollbar-thumb {
|
|
3242
3257
|
top: 0;
|
|
3243
|
-
|
|
3244
|
-
width:
|
|
3258
|
+
right: 0;
|
|
3259
|
+
width: var(--sia-scrollbar-size);
|
|
3245
3260
|
height: var(--sia-table-scrollbar-y-size, 0);
|
|
3246
3261
|
transform: translateY(var(--sia-table-scrollbar-y-position, 0));
|
|
3262
|
+
transition: background-color 120ms ease, width 150ms ease;
|
|
3247
3263
|
}
|
|
3248
3264
|
.sia-table__empty {
|
|
3249
3265
|
position: absolute;
|
|
@@ -3915,6 +3931,17 @@
|
|
|
3915
3931
|
.sia-space-compact--vertical > *:not(:first-child) {
|
|
3916
3932
|
margin-top: -1px;
|
|
3917
3933
|
}
|
|
3934
|
+
.sia-space-compact--horizontal > *:not(:first-child) :is(.sia-input, .sia-input-control, .sia-select, .sia-tree-select__trigger, .sia-picker, .sia-input-number) {
|
|
3935
|
+
border-top-left-radius: 0;
|
|
3936
|
+
border-bottom-left-radius: 0;
|
|
3937
|
+
}
|
|
3938
|
+
.sia-space-compact--horizontal > *:not(:last-child) :is(.sia-input, .sia-input-control, .sia-select, .sia-tree-select__trigger, .sia-picker, .sia-input-number) {
|
|
3939
|
+
border-top-right-radius: 0;
|
|
3940
|
+
border-bottom-right-radius: 0;
|
|
3941
|
+
}
|
|
3942
|
+
.sia-space-compact > *:focus-within {
|
|
3943
|
+
z-index: 1;
|
|
3944
|
+
}
|
|
3918
3945
|
.sia-row {
|
|
3919
3946
|
--sia-grid-gutter-x: 0px;
|
|
3920
3947
|
--sia-grid-gutter-y: 0px;
|
|
@@ -5674,10 +5701,20 @@
|
|
|
5674
5701
|
font-size: 12px;
|
|
5675
5702
|
}
|
|
5676
5703
|
.sia-tree-select__clear {
|
|
5704
|
+
position: absolute;
|
|
5705
|
+
right: 30px;
|
|
5706
|
+
top: 50%;
|
|
5707
|
+
transform: translateY(-50%);
|
|
5677
5708
|
display: none;
|
|
5709
|
+
align-items: center;
|
|
5710
|
+
padding: 2px;
|
|
5711
|
+
border: 0;
|
|
5712
|
+
background: var(--sia-color-surface);
|
|
5678
5713
|
color: var(--sia-color-text-secondary);
|
|
5714
|
+
cursor: pointer;
|
|
5679
5715
|
}
|
|
5680
|
-
.sia-tree-
|
|
5716
|
+
.sia-tree-select:hover .sia-tree-select__clear,
|
|
5717
|
+
.sia-tree-select:focus-within .sia-tree-select__clear {
|
|
5681
5718
|
display: inline-flex;
|
|
5682
5719
|
}
|
|
5683
5720
|
.sia-tree-select__dropdown {
|
|
@@ -6124,7 +6161,7 @@
|
|
|
6124
6161
|
border-radius: 2px 2px 0 0;
|
|
6125
6162
|
}
|
|
6126
6163
|
.sia-menu__popup {
|
|
6127
|
-
|
|
6164
|
+
width: max-content;
|
|
6128
6165
|
padding: 4px;
|
|
6129
6166
|
color: var(--sia-color-text);
|
|
6130
6167
|
background: var(--sia-color-surface);
|
|
@@ -6279,7 +6316,7 @@
|
|
|
6279
6316
|
pointer-events: none;
|
|
6280
6317
|
}
|
|
6281
6318
|
.sia-dropdown__popup {
|
|
6282
|
-
|
|
6319
|
+
width: max-content;
|
|
6283
6320
|
padding: 4px;
|
|
6284
6321
|
color: var(--sia-color-text);
|
|
6285
6322
|
background: var(--sia-color-surface);
|
|
@@ -6299,7 +6336,7 @@
|
|
|
6299
6336
|
animation: sia-dropdown-popup-out 150ms cubic-bezier(.4, 0, 1, 1) both;
|
|
6300
6337
|
}
|
|
6301
6338
|
.sia-dropdown__menu {
|
|
6302
|
-
min-width:
|
|
6339
|
+
min-width: 0;
|
|
6303
6340
|
padding: 0;
|
|
6304
6341
|
background: transparent;
|
|
6305
6342
|
border: 0;
|
|
@@ -8382,6 +8419,115 @@ button.sia-treemap__tile:focus-visible,
|
|
|
8382
8419
|
transition-duration: .01ms;
|
|
8383
8420
|
}
|
|
8384
8421
|
}
|
|
8422
|
+
.sia-input-select {
|
|
8423
|
+
min-width: 0;
|
|
8424
|
+
}
|
|
8425
|
+
.sia-input-select__suffix,
|
|
8426
|
+
.sia-selection-panel__actions {
|
|
8427
|
+
display: flex;
|
|
8428
|
+
align-items: center;
|
|
8429
|
+
gap: 4px;
|
|
8430
|
+
}
|
|
8431
|
+
.sia-input-select__suffix .sia-button {
|
|
8432
|
+
padding: 0 3px;
|
|
8433
|
+
min-width: 18px;
|
|
8434
|
+
}
|
|
8435
|
+
.sia-input-select__popup {
|
|
8436
|
+
z-index: 1100;
|
|
8437
|
+
width: max(240px, var(--sia-popup-anchor-width));
|
|
8438
|
+
max-width: calc(100vw - 24px);
|
|
8439
|
+
padding: 8px;
|
|
8440
|
+
background: var(--sia-color-bg, white);
|
|
8441
|
+
border: 1px solid var(--sia-color-border, #ddd);
|
|
8442
|
+
border-radius: 6px;
|
|
8443
|
+
box-shadow: 0 6px 24px #0002;
|
|
8444
|
+
}
|
|
8445
|
+
.sia-selection-panel {
|
|
8446
|
+
min-width: 0;
|
|
8447
|
+
display: grid;
|
|
8448
|
+
gap: 8px;
|
|
8449
|
+
}
|
|
8450
|
+
.sia-selection-panel__actions {
|
|
8451
|
+
margin-bottom: 4px;
|
|
8452
|
+
flex-wrap: wrap;
|
|
8453
|
+
font-size: 12px;
|
|
8454
|
+
}
|
|
8455
|
+
.sia-selection-panel__actions > span {
|
|
8456
|
+
margin-left: auto;
|
|
8457
|
+
color: var(--sia-color-text-secondary, #777);
|
|
8458
|
+
}
|
|
8459
|
+
.sia-selection-panel__list {
|
|
8460
|
+
overflow: auto;
|
|
8461
|
+
outline-offset: 1px;
|
|
8462
|
+
}
|
|
8463
|
+
.sia-selection-panel__row {
|
|
8464
|
+
display: grid;
|
|
8465
|
+
gap: 4px;
|
|
8466
|
+
}
|
|
8467
|
+
.sia-selection-panel__group {
|
|
8468
|
+
display: flex;
|
|
8469
|
+
align-items: center;
|
|
8470
|
+
font-size: 12px;
|
|
8471
|
+
font-weight: 600;
|
|
8472
|
+
color: var(--sia-color-text-secondary, #777);
|
|
8473
|
+
padding: 0 6px;
|
|
8474
|
+
}
|
|
8475
|
+
.sia-selection-panel__option {
|
|
8476
|
+
width: 100%;
|
|
8477
|
+
height: 100%;
|
|
8478
|
+
display: flex;
|
|
8479
|
+
align-items: center;
|
|
8480
|
+
gap: 6px;
|
|
8481
|
+
border: 0;
|
|
8482
|
+
background: transparent;
|
|
8483
|
+
border-radius: 4px;
|
|
8484
|
+
padding: 4px 8px;
|
|
8485
|
+
text-align: left;
|
|
8486
|
+
color: inherit;
|
|
8487
|
+
cursor: pointer;
|
|
8488
|
+
min-width: 0;
|
|
8489
|
+
font: inherit;
|
|
8490
|
+
}
|
|
8491
|
+
.sia-selection-panel__option:hover,
|
|
8492
|
+
.sia-selection-panel__option.is-active {
|
|
8493
|
+
background: var(--sia-color-fill-secondary, #f2f5f8);
|
|
8494
|
+
}
|
|
8495
|
+
.sia-selection-panel__option[aria-selected=true] {
|
|
8496
|
+
background: var(--sia-color-primary-bg, #eaf4ff);
|
|
8497
|
+
color: var(--sia-color-primary, #1677ff);
|
|
8498
|
+
}
|
|
8499
|
+
.sia-selection-panel__option[aria-disabled=true] {
|
|
8500
|
+
opacity: .45;
|
|
8501
|
+
cursor: not-allowed;
|
|
8502
|
+
}
|
|
8503
|
+
.sia-selection-panel__check {
|
|
8504
|
+
width: 14px;
|
|
8505
|
+
height: 14px;
|
|
8506
|
+
flex-shrink: 0;
|
|
8507
|
+
border: 1px solid currentColor;
|
|
8508
|
+
border-radius: 3px;
|
|
8509
|
+
line-height: 12px;
|
|
8510
|
+
text-align: center;
|
|
8511
|
+
}
|
|
8512
|
+
.sia-selection-panel__text {
|
|
8513
|
+
overflow: hidden;
|
|
8514
|
+
white-space: nowrap;
|
|
8515
|
+
text-overflow: ellipsis;
|
|
8516
|
+
}
|
|
8517
|
+
.sia-selection-panel__text small {
|
|
8518
|
+
display: block;
|
|
8519
|
+
opacity: .65;
|
|
8520
|
+
font-size: 11px;
|
|
8521
|
+
}
|
|
8522
|
+
.sia-selection-panel__divider {
|
|
8523
|
+
align-self: center;
|
|
8524
|
+
border-top: 1px solid var(--sia-color-border, #ddd);
|
|
8525
|
+
}
|
|
8526
|
+
.sia-selection-panel__empty {
|
|
8527
|
+
padding: 16px;
|
|
8528
|
+
text-align: center;
|
|
8529
|
+
color: var(--sia-color-text-secondary, #777);
|
|
8530
|
+
}
|
|
8385
8531
|
|
|
8386
8532
|
/* src/breadcrumb.css */
|
|
8387
8533
|
.sia-breadcrumb {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import { O as OverlayContainer, a as OverlayApiHandle } from './core-
|
|
4
|
-
export { B as Badge, b as BadgeProps, c as BadgeRibbonProps, d as BadgeStatus, e as Breadcrumb, f as BreadcrumbItem, g as BreadcrumbProps, h as Button, i as ButtonProps, j as ButtonSize, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, T as IconVariant, U as Image, V as ImagePreview, W as ImagePreviewConfig, X as ImagePreviewProps, Y as ImageProps, Z as Input, _ as InputProps, $ as Menu, a0 as MenuClickInfo, a1 as MenuItem, a2 as MenuMode, a3 as MenuProps, a4 as MenuTheme, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, ae as NotificationConfig, af as NotificationPlacement, ag as NotificationType, ah as Popconfirm, ai as PopconfirmProps, aj as Popover, ak as PopoverProps, al as Progress, am as ProgressProps, an as ProgressStatus, ao as Rate, ap as RateProps, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, au as Spin, av as SpinProps, aw as StepItem, ax as StepStatus, ay as Steps, az as StepsProps, aA as TabItem, aB as Tabs, aC as TabsContextMenuClickInfo, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, 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, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-
|
|
5
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
2
|
+
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { O as OverlayContainer, a as OverlayApiHandle } from './core-De2pRX5w.cjs';
|
|
4
|
+
export { B as Badge, b as BadgeProps, c as BadgeRibbonProps, d as BadgeStatus, e as Breadcrumb, f as BreadcrumbItem, g as BreadcrumbProps, h as Button, i as ButtonProps, j as ButtonSize, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, T as IconVariant, U as Image, V as ImagePreview, W as ImagePreviewConfig, X as ImagePreviewProps, Y as ImageProps, Z as Input, _ as InputProps, $ as Menu, a0 as MenuClickInfo, a1 as MenuItem, a2 as MenuMode, a3 as MenuProps, a4 as MenuTheme, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, ae as NotificationConfig, af as NotificationPlacement, ag as NotificationType, ah as Popconfirm, ai as PopconfirmProps, aj as Popover, ak as PopoverProps, al as Progress, am as ProgressProps, an as ProgressStatus, ao as Rate, ap as RateProps, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, au as Spin, av as SpinProps, aw as StepItem, ax as StepStatus, ay as Steps, az as StepsProps, aA as TabItem, aB as Tabs, aC as TabsContextMenuClickInfo, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, 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, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-De2pRX5w.cjs';
|
|
5
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-UyYrHex6.cjs';
|
|
6
6
|
import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './Select-CJJ5LQap.cjs';
|
|
7
7
|
export { S as Select, b as SelectChangeValue, c as SelectMode, d as SelectOption, e as SelectProps, f as SelectValue } from './Select-CJJ5LQap.cjs';
|
|
8
8
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.cjs';
|
|
@@ -328,7 +328,7 @@ interface FormItemProps {
|
|
|
328
328
|
children?: ReactNode | ((form: FormInstance) => ReactNode);
|
|
329
329
|
className?: string;
|
|
330
330
|
}
|
|
331
|
-
declare function FormItem({ name, label, rules, required, extra, help, validateStatus, valuePropName, trigger, validateTrigger, getValueFromEvent, noStyle, children, className, }: FormItemProps):
|
|
331
|
+
declare function FormItem({ name, label, rules, required, extra, help, validateStatus, valuePropName, trigger, validateTrigger, getValueFromEvent, noStyle, children, className, }: FormItemProps): react.JSX.Element;
|
|
332
332
|
interface FormListField {
|
|
333
333
|
key: number;
|
|
334
334
|
name: number;
|
|
@@ -493,11 +493,13 @@ interface TreeSelectNode {
|
|
|
493
493
|
key?: string | number;
|
|
494
494
|
disabled?: boolean;
|
|
495
495
|
selectable?: boolean;
|
|
496
|
+
disableCheckbox?: boolean;
|
|
497
|
+
checkable?: boolean;
|
|
496
498
|
children?: readonly TreeSelectNode[];
|
|
497
499
|
}
|
|
498
|
-
interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
|
|
500
|
+
interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "onSelect"> {
|
|
499
501
|
treeData: readonly TreeSelectNode[];
|
|
500
|
-
value?: TreeSelectValue | readonly TreeSelectValue[];
|
|
502
|
+
value?: TreeSelectValue | readonly TreeSelectValue[] | null;
|
|
501
503
|
defaultValue?: TreeSelectValue | readonly TreeSelectValue[];
|
|
502
504
|
multiple?: boolean;
|
|
503
505
|
treeCheckable?: boolean;
|
|
@@ -510,11 +512,46 @@ interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultV
|
|
|
510
512
|
disabled?: boolean;
|
|
511
513
|
size?: ControlSize;
|
|
512
514
|
status?: ControlStatus;
|
|
515
|
+
open?: boolean;
|
|
516
|
+
defaultOpen?: boolean;
|
|
517
|
+
searchValue?: string;
|
|
518
|
+
treeExpandedKeys?: readonly TreeSelectValue[];
|
|
519
|
+
treeDefaultExpandedKeys?: readonly TreeSelectValue[];
|
|
520
|
+
onTreeExpand?: (keys: TreeSelectValue[]) => void;
|
|
521
|
+
filterTreeNode?: false | ((search: string, node: TreeSelectNode) => boolean);
|
|
522
|
+
/** 默认独立勾选;关闭后父子节点联动,禁用节点作为边界。 */
|
|
523
|
+
treeCheckStrictly?: boolean;
|
|
524
|
+
showCheckedStrategy?: "all" | "parent" | "child";
|
|
525
|
+
loading?: boolean;
|
|
526
|
+
listHeight?: number;
|
|
527
|
+
popupClassName?: string;
|
|
528
|
+
popupStyle?: React.CSSProperties;
|
|
529
|
+
dropdownFooter?: ReactNode;
|
|
530
|
+
displayRender?: (nodes: readonly TreeSelectNode[]) => ReactNode;
|
|
531
|
+
renderTrigger?: (state: {
|
|
532
|
+
open: boolean;
|
|
533
|
+
toggle: () => void;
|
|
534
|
+
clear: () => void;
|
|
535
|
+
}) => ReactNode;
|
|
536
|
+
onClear?: () => void;
|
|
537
|
+
onSelect?: (value: TreeSelectValue, node: TreeSelectNode) => void;
|
|
538
|
+
onDeselect?: (value: TreeSelectValue, node: TreeSelectNode) => void;
|
|
513
539
|
onChange?: (value: TreeSelectValue | readonly TreeSelectValue[] | undefined, nodes: readonly TreeSelectNode[]) => void;
|
|
514
540
|
onSearch?: (value: string) => void;
|
|
515
541
|
onDropdownVisibleChange?: (open: boolean) => void;
|
|
516
542
|
}
|
|
517
|
-
declare function TreeSelect({ treeData, value, defaultValue, multiple, treeCheckable, showSearch, allowClear, treeDefaultExpandAll, placeholder, searchPlaceholder, maxTagCount, disabled, size, status, className, onChange, onSearch, onDropdownVisibleChange, ...props }: TreeSelectProps): react.JSX.Element;
|
|
543
|
+
declare function TreeSelect({ treeData, value, defaultValue, multiple, treeCheckable, showSearch, allowClear, treeDefaultExpandAll, placeholder, searchPlaceholder, maxTagCount, disabled, size, status, className, onChange, onSearch, onDropdownVisibleChange, open: controlledOpen, defaultOpen, searchValue, treeExpandedKeys, treeDefaultExpandedKeys, onTreeExpand, filterTreeNode, treeCheckStrictly, showCheckedStrategy, loading, listHeight, popupClassName, popupStyle, dropdownFooter, displayRender, renderTrigger, onClear, onSelect, onDeselect, ...props }: TreeSelectProps): react.JSX.Element;
|
|
544
|
+
|
|
545
|
+
interface FlatTreeOptions {
|
|
546
|
+
idField?: string;
|
|
547
|
+
parentIdField?: string;
|
|
548
|
+
rootParentId?: unknown;
|
|
549
|
+
}
|
|
550
|
+
type FlatTreeNode<T> = T & {
|
|
551
|
+
children: FlatTreeNode<T>[];
|
|
552
|
+
};
|
|
553
|
+
/** 平级列表转树;容忍孤儿节点,并切断自引用和循环关系,防止递归溢出。 */
|
|
554
|
+
declare function buildFlatTree<T extends Record<string, any>>(items: readonly T[], options?: FlatTreeOptions): FlatTreeNode<T>[];
|
|
518
555
|
|
|
519
556
|
interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
520
557
|
label?: ReactNode;
|
|
@@ -828,6 +865,7 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
828
865
|
dataSource?: readonly T[];
|
|
829
866
|
columns?: readonly TableColumn<T>[];
|
|
830
867
|
rowKey?: keyof T | string | ((record: T, index: number) => TableKey);
|
|
868
|
+
/** 默认启用行悬停高亮;传入 createHighlightPlugin({ row: false }) 可关闭。 */
|
|
831
869
|
plugins?: readonly AnyTablePlugin<T>[];
|
|
832
870
|
loading?: boolean;
|
|
833
871
|
emptyText?: ReactNode;
|
|
@@ -908,7 +946,7 @@ interface TableSettingsAdapter {
|
|
|
908
946
|
|
|
909
947
|
declare const Table: <T extends Record<string, unknown> = Record<string, unknown>>(props: TableProps<T> & {
|
|
910
948
|
ref?: Ref<TableRef<T>>;
|
|
911
|
-
}) =>
|
|
949
|
+
}) => ReactElement | null;
|
|
912
950
|
|
|
913
951
|
interface TableColumnTransformPluginOptions<T> {
|
|
914
952
|
prepend?: readonly TableColumn<T>[];
|
|
@@ -1219,4 +1257,66 @@ declare const SIA_THEME: {
|
|
|
1219
1257
|
};
|
|
1220
1258
|
declare function applySiaTheme(mode: SiaThemeMode, target?: HTMLElement): void;
|
|
1221
1259
|
|
|
1222
|
-
|
|
1260
|
+
type SelectionValue = string | number;
|
|
1261
|
+
interface SelectionOption {
|
|
1262
|
+
value: SelectionValue;
|
|
1263
|
+
label: ReactNode;
|
|
1264
|
+
disabled?: boolean;
|
|
1265
|
+
disabledTip?: ReactNode;
|
|
1266
|
+
group?: string;
|
|
1267
|
+
optionType?: "divider";
|
|
1268
|
+
}
|
|
1269
|
+
interface SelectionPanelProps {
|
|
1270
|
+
options: readonly SelectionOption[];
|
|
1271
|
+
value: readonly SelectionValue[];
|
|
1272
|
+
onChange: (values: SelectionValue[]) => void;
|
|
1273
|
+
multiple?: boolean;
|
|
1274
|
+
disabled?: boolean;
|
|
1275
|
+
loading?: boolean;
|
|
1276
|
+
showSearch?: boolean;
|
|
1277
|
+
searchValue?: string;
|
|
1278
|
+
onSearch?: (value: string) => void;
|
|
1279
|
+
selectedOnly?: boolean;
|
|
1280
|
+
showValue?: boolean;
|
|
1281
|
+
displayField?: "label" | "value";
|
|
1282
|
+
columns?: number;
|
|
1283
|
+
maxHeight?: number;
|
|
1284
|
+
autoFocusSearch?: boolean;
|
|
1285
|
+
}
|
|
1286
|
+
/** 可嵌入下拉或弹窗的分组选择面板,长列表按行虚拟化。 */
|
|
1287
|
+
declare function SelectionPanel({ options, value, onChange, multiple, disabled, loading, showSearch, searchValue, onSearch, selectedOnly, showValue, displayField, columns, maxHeight, autoFocusSearch }: SelectionPanelProps): react.JSX.Element;
|
|
1288
|
+
|
|
1289
|
+
interface InputSelectProps {
|
|
1290
|
+
options: readonly SelectionOption[];
|
|
1291
|
+
value?: SelectionValue | readonly SelectionValue[] | null;
|
|
1292
|
+
defaultValue?: SelectionValue | readonly SelectionValue[];
|
|
1293
|
+
onChange?: (value: SelectionValue | SelectionValue[] | undefined) => void;
|
|
1294
|
+
multiple?: boolean;
|
|
1295
|
+
displayField?: "label" | "value";
|
|
1296
|
+
showValue?: boolean;
|
|
1297
|
+
placeholder?: string;
|
|
1298
|
+
size?: ControlSize;
|
|
1299
|
+
status?: ControlStatus;
|
|
1300
|
+
disabled?: boolean;
|
|
1301
|
+
loading?: boolean;
|
|
1302
|
+
allowClear?: boolean;
|
|
1303
|
+
hideSearch?: boolean;
|
|
1304
|
+
inputMaxLength?: number;
|
|
1305
|
+
parseInput?: (text: string) => SelectionValue | SelectionValue[] | undefined;
|
|
1306
|
+
enableModal?: boolean | {
|
|
1307
|
+
title?: string;
|
|
1308
|
+
width?: number | string;
|
|
1309
|
+
columns?: number;
|
|
1310
|
+
maxHeight?: number;
|
|
1311
|
+
};
|
|
1312
|
+
suffix?: ReactNode;
|
|
1313
|
+
style?: CSSProperties;
|
|
1314
|
+
className?: string;
|
|
1315
|
+
id?: string;
|
|
1316
|
+
"aria-label"?: string;
|
|
1317
|
+
"aria-required"?: boolean | "true" | "false";
|
|
1318
|
+
onOpenChange?: (open: boolean) => void;
|
|
1319
|
+
}
|
|
1320
|
+
declare const InputSelect: react.ForwardRefExoticComponent<InputSelectProps & react.RefAttributes<HTMLInputElement>>;
|
|
1321
|
+
|
|
1322
|
+
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import { O as OverlayContainer, a as OverlayApiHandle } from './core-
|
|
4
|
-
export { B as Badge, b as BadgeProps, c as BadgeRibbonProps, d as BadgeStatus, e as Breadcrumb, f as BreadcrumbItem, g as BreadcrumbProps, h as Button, i as ButtonProps, j as ButtonSize, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, T as IconVariant, U as Image, V as ImagePreview, W as ImagePreviewConfig, X as ImagePreviewProps, Y as ImageProps, Z as Input, _ as InputProps, $ as Menu, a0 as MenuClickInfo, a1 as MenuItem, a2 as MenuMode, a3 as MenuProps, a4 as MenuTheme, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, ae as NotificationConfig, af as NotificationPlacement, ag as NotificationType, ah as Popconfirm, ai as PopconfirmProps, aj as Popover, ak as PopoverProps, al as Progress, am as ProgressProps, an as ProgressStatus, ao as Rate, ap as RateProps, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, au as Spin, av as SpinProps, aw as StepItem, ax as StepStatus, ay as Steps, az as StepsProps, aA as TabItem, aB as Tabs, aC as TabsContextMenuClickInfo, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, 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, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-
|
|
5
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
2
|
+
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { O as OverlayContainer, a as OverlayApiHandle } from './core-DFYheaoJ.js';
|
|
4
|
+
export { B as Badge, b as BadgeProps, c as BadgeRibbonProps, d as BadgeStatus, e as Breadcrumb, f as BreadcrumbItem, g as BreadcrumbProps, h as Button, i as ButtonProps, j as ButtonSize, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, T as IconVariant, U as Image, V as ImagePreview, W as ImagePreviewConfig, X as ImagePreviewProps, Y as ImageProps, Z as Input, _ as InputProps, $ as Menu, a0 as MenuClickInfo, a1 as MenuItem, a2 as MenuMode, a3 as MenuProps, a4 as MenuTheme, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, ae as NotificationConfig, af as NotificationPlacement, ag as NotificationType, ah as Popconfirm, ai as PopconfirmProps, aj as Popover, ak as PopoverProps, al as Progress, am as ProgressProps, an as ProgressStatus, ao as Rate, ap as RateProps, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, au as Spin, av as SpinProps, aw as StepItem, ax as StepStatus, ay as Steps, az as StepsProps, aA as TabItem, aB as Tabs, aC as TabsContextMenuClickInfo, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, 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, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-DFYheaoJ.js';
|
|
5
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-DOyG1DGp.js';
|
|
6
6
|
import { C as ControlSize, a as ControlStatus, I as InputPlaceholderMode } from './Select-CJJ5LQap.js';
|
|
7
7
|
export { S as Select, b as SelectChangeValue, c as SelectMode, d as SelectOption, e as SelectProps, f as SelectValue } from './Select-CJJ5LQap.js';
|
|
8
8
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.js';
|
|
@@ -328,7 +328,7 @@ interface FormItemProps {
|
|
|
328
328
|
children?: ReactNode | ((form: FormInstance) => ReactNode);
|
|
329
329
|
className?: string;
|
|
330
330
|
}
|
|
331
|
-
declare function FormItem({ name, label, rules, required, extra, help, validateStatus, valuePropName, trigger, validateTrigger, getValueFromEvent, noStyle, children, className, }: FormItemProps):
|
|
331
|
+
declare function FormItem({ name, label, rules, required, extra, help, validateStatus, valuePropName, trigger, validateTrigger, getValueFromEvent, noStyle, children, className, }: FormItemProps): react.JSX.Element;
|
|
332
332
|
interface FormListField {
|
|
333
333
|
key: number;
|
|
334
334
|
name: number;
|
|
@@ -493,11 +493,13 @@ interface TreeSelectNode {
|
|
|
493
493
|
key?: string | number;
|
|
494
494
|
disabled?: boolean;
|
|
495
495
|
selectable?: boolean;
|
|
496
|
+
disableCheckbox?: boolean;
|
|
497
|
+
checkable?: boolean;
|
|
496
498
|
children?: readonly TreeSelectNode[];
|
|
497
499
|
}
|
|
498
|
-
interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
|
|
500
|
+
interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "onSelect"> {
|
|
499
501
|
treeData: readonly TreeSelectNode[];
|
|
500
|
-
value?: TreeSelectValue | readonly TreeSelectValue[];
|
|
502
|
+
value?: TreeSelectValue | readonly TreeSelectValue[] | null;
|
|
501
503
|
defaultValue?: TreeSelectValue | readonly TreeSelectValue[];
|
|
502
504
|
multiple?: boolean;
|
|
503
505
|
treeCheckable?: boolean;
|
|
@@ -510,11 +512,46 @@ interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultV
|
|
|
510
512
|
disabled?: boolean;
|
|
511
513
|
size?: ControlSize;
|
|
512
514
|
status?: ControlStatus;
|
|
515
|
+
open?: boolean;
|
|
516
|
+
defaultOpen?: boolean;
|
|
517
|
+
searchValue?: string;
|
|
518
|
+
treeExpandedKeys?: readonly TreeSelectValue[];
|
|
519
|
+
treeDefaultExpandedKeys?: readonly TreeSelectValue[];
|
|
520
|
+
onTreeExpand?: (keys: TreeSelectValue[]) => void;
|
|
521
|
+
filterTreeNode?: false | ((search: string, node: TreeSelectNode) => boolean);
|
|
522
|
+
/** 默认独立勾选;关闭后父子节点联动,禁用节点作为边界。 */
|
|
523
|
+
treeCheckStrictly?: boolean;
|
|
524
|
+
showCheckedStrategy?: "all" | "parent" | "child";
|
|
525
|
+
loading?: boolean;
|
|
526
|
+
listHeight?: number;
|
|
527
|
+
popupClassName?: string;
|
|
528
|
+
popupStyle?: React.CSSProperties;
|
|
529
|
+
dropdownFooter?: ReactNode;
|
|
530
|
+
displayRender?: (nodes: readonly TreeSelectNode[]) => ReactNode;
|
|
531
|
+
renderTrigger?: (state: {
|
|
532
|
+
open: boolean;
|
|
533
|
+
toggle: () => void;
|
|
534
|
+
clear: () => void;
|
|
535
|
+
}) => ReactNode;
|
|
536
|
+
onClear?: () => void;
|
|
537
|
+
onSelect?: (value: TreeSelectValue, node: TreeSelectNode) => void;
|
|
538
|
+
onDeselect?: (value: TreeSelectValue, node: TreeSelectNode) => void;
|
|
513
539
|
onChange?: (value: TreeSelectValue | readonly TreeSelectValue[] | undefined, nodes: readonly TreeSelectNode[]) => void;
|
|
514
540
|
onSearch?: (value: string) => void;
|
|
515
541
|
onDropdownVisibleChange?: (open: boolean) => void;
|
|
516
542
|
}
|
|
517
|
-
declare function TreeSelect({ treeData, value, defaultValue, multiple, treeCheckable, showSearch, allowClear, treeDefaultExpandAll, placeholder, searchPlaceholder, maxTagCount, disabled, size, status, className, onChange, onSearch, onDropdownVisibleChange, ...props }: TreeSelectProps): react.JSX.Element;
|
|
543
|
+
declare function TreeSelect({ treeData, value, defaultValue, multiple, treeCheckable, showSearch, allowClear, treeDefaultExpandAll, placeholder, searchPlaceholder, maxTagCount, disabled, size, status, className, onChange, onSearch, onDropdownVisibleChange, open: controlledOpen, defaultOpen, searchValue, treeExpandedKeys, treeDefaultExpandedKeys, onTreeExpand, filterTreeNode, treeCheckStrictly, showCheckedStrategy, loading, listHeight, popupClassName, popupStyle, dropdownFooter, displayRender, renderTrigger, onClear, onSelect, onDeselect, ...props }: TreeSelectProps): react.JSX.Element;
|
|
544
|
+
|
|
545
|
+
interface FlatTreeOptions {
|
|
546
|
+
idField?: string;
|
|
547
|
+
parentIdField?: string;
|
|
548
|
+
rootParentId?: unknown;
|
|
549
|
+
}
|
|
550
|
+
type FlatTreeNode<T> = T & {
|
|
551
|
+
children: FlatTreeNode<T>[];
|
|
552
|
+
};
|
|
553
|
+
/** 平级列表转树;容忍孤儿节点,并切断自引用和循环关系,防止递归溢出。 */
|
|
554
|
+
declare function buildFlatTree<T extends Record<string, any>>(items: readonly T[], options?: FlatTreeOptions): FlatTreeNode<T>[];
|
|
518
555
|
|
|
519
556
|
interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
520
557
|
label?: ReactNode;
|
|
@@ -828,6 +865,7 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
828
865
|
dataSource?: readonly T[];
|
|
829
866
|
columns?: readonly TableColumn<T>[];
|
|
830
867
|
rowKey?: keyof T | string | ((record: T, index: number) => TableKey);
|
|
868
|
+
/** 默认启用行悬停高亮;传入 createHighlightPlugin({ row: false }) 可关闭。 */
|
|
831
869
|
plugins?: readonly AnyTablePlugin<T>[];
|
|
832
870
|
loading?: boolean;
|
|
833
871
|
emptyText?: ReactNode;
|
|
@@ -908,7 +946,7 @@ interface TableSettingsAdapter {
|
|
|
908
946
|
|
|
909
947
|
declare const Table: <T extends Record<string, unknown> = Record<string, unknown>>(props: TableProps<T> & {
|
|
910
948
|
ref?: Ref<TableRef<T>>;
|
|
911
|
-
}) =>
|
|
949
|
+
}) => ReactElement | null;
|
|
912
950
|
|
|
913
951
|
interface TableColumnTransformPluginOptions<T> {
|
|
914
952
|
prepend?: readonly TableColumn<T>[];
|
|
@@ -1219,4 +1257,66 @@ declare const SIA_THEME: {
|
|
|
1219
1257
|
};
|
|
1220
1258
|
declare function applySiaTheme(mode: SiaThemeMode, target?: HTMLElement): void;
|
|
1221
1259
|
|
|
1222
|
-
|
|
1260
|
+
type SelectionValue = string | number;
|
|
1261
|
+
interface SelectionOption {
|
|
1262
|
+
value: SelectionValue;
|
|
1263
|
+
label: ReactNode;
|
|
1264
|
+
disabled?: boolean;
|
|
1265
|
+
disabledTip?: ReactNode;
|
|
1266
|
+
group?: string;
|
|
1267
|
+
optionType?: "divider";
|
|
1268
|
+
}
|
|
1269
|
+
interface SelectionPanelProps {
|
|
1270
|
+
options: readonly SelectionOption[];
|
|
1271
|
+
value: readonly SelectionValue[];
|
|
1272
|
+
onChange: (values: SelectionValue[]) => void;
|
|
1273
|
+
multiple?: boolean;
|
|
1274
|
+
disabled?: boolean;
|
|
1275
|
+
loading?: boolean;
|
|
1276
|
+
showSearch?: boolean;
|
|
1277
|
+
searchValue?: string;
|
|
1278
|
+
onSearch?: (value: string) => void;
|
|
1279
|
+
selectedOnly?: boolean;
|
|
1280
|
+
showValue?: boolean;
|
|
1281
|
+
displayField?: "label" | "value";
|
|
1282
|
+
columns?: number;
|
|
1283
|
+
maxHeight?: number;
|
|
1284
|
+
autoFocusSearch?: boolean;
|
|
1285
|
+
}
|
|
1286
|
+
/** 可嵌入下拉或弹窗的分组选择面板,长列表按行虚拟化。 */
|
|
1287
|
+
declare function SelectionPanel({ options, value, onChange, multiple, disabled, loading, showSearch, searchValue, onSearch, selectedOnly, showValue, displayField, columns, maxHeight, autoFocusSearch }: SelectionPanelProps): react.JSX.Element;
|
|
1288
|
+
|
|
1289
|
+
interface InputSelectProps {
|
|
1290
|
+
options: readonly SelectionOption[];
|
|
1291
|
+
value?: SelectionValue | readonly SelectionValue[] | null;
|
|
1292
|
+
defaultValue?: SelectionValue | readonly SelectionValue[];
|
|
1293
|
+
onChange?: (value: SelectionValue | SelectionValue[] | undefined) => void;
|
|
1294
|
+
multiple?: boolean;
|
|
1295
|
+
displayField?: "label" | "value";
|
|
1296
|
+
showValue?: boolean;
|
|
1297
|
+
placeholder?: string;
|
|
1298
|
+
size?: ControlSize;
|
|
1299
|
+
status?: ControlStatus;
|
|
1300
|
+
disabled?: boolean;
|
|
1301
|
+
loading?: boolean;
|
|
1302
|
+
allowClear?: boolean;
|
|
1303
|
+
hideSearch?: boolean;
|
|
1304
|
+
inputMaxLength?: number;
|
|
1305
|
+
parseInput?: (text: string) => SelectionValue | SelectionValue[] | undefined;
|
|
1306
|
+
enableModal?: boolean | {
|
|
1307
|
+
title?: string;
|
|
1308
|
+
width?: number | string;
|
|
1309
|
+
columns?: number;
|
|
1310
|
+
maxHeight?: number;
|
|
1311
|
+
};
|
|
1312
|
+
suffix?: ReactNode;
|
|
1313
|
+
style?: CSSProperties;
|
|
1314
|
+
className?: string;
|
|
1315
|
+
id?: string;
|
|
1316
|
+
"aria-label"?: string;
|
|
1317
|
+
"aria-required"?: boolean | "true" | "false";
|
|
1318
|
+
onOpenChange?: (open: boolean) => void;
|
|
1319
|
+
}
|
|
1320
|
+
declare const InputSelect: react.ForwardRefExoticComponent<InputSelectProps & react.RefAttributes<HTMLInputElement>>;
|
|
1321
|
+
|
|
1322
|
+
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };
|