aot-ui 0.1.0 → 0.2.1
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/README.md +26 -20
- package/dist-lib/aot-ui.css +1 -1
- package/dist-lib/aot-ui.js +30265 -19141
- package/dist-lib/index.d.ts +16 -0
- package/dist-lib/modules/affix/components/Affix.d.ts +3 -6
- package/dist-lib/modules/affix/index.d.ts +1 -1
- package/dist-lib/modules/affix/types.d.ts +21 -5
- package/dist-lib/modules/alert/components/Alert.d.ts +1 -1
- package/dist-lib/modules/alert/index.d.ts +1 -1
- package/dist-lib/modules/alert/types.d.ts +39 -2
- package/dist-lib/modules/anchor/components/Anchor.d.ts +3 -2
- package/dist-lib/modules/anchor/index.d.ts +1 -1
- package/dist-lib/modules/anchor/types.d.ts +26 -4
- package/dist-lib/modules/arc-progress/components/ArcProgress.d.ts +5 -0
- package/dist-lib/modules/arc-progress/constants.d.ts +6 -0
- package/dist-lib/modules/arc-progress/index.d.ts +3 -0
- package/dist-lib/modules/arc-progress/types.d.ts +22 -0
- package/dist-lib/modules/autocomplete/components/Autocomplete.d.ts +2 -2
- package/dist-lib/modules/autocomplete/index.d.ts +1 -1
- package/dist-lib/modules/autocomplete/types.d.ts +103 -13
- package/dist-lib/modules/avatar/components/Avatar.d.ts +1 -1
- package/dist-lib/modules/avatar/components/AvatarGroup.d.ts +2 -0
- package/dist-lib/modules/avatar/context.d.ts +3 -0
- package/dist-lib/modules/avatar/index.d.ts +2 -1
- package/dist-lib/modules/avatar/types.d.ts +74 -3
- package/dist-lib/modules/back-top/components/BackTop.d.ts +1 -1
- package/dist-lib/modules/back-top/types.d.ts +22 -3
- package/dist-lib/modules/badge/components/Badge.d.ts +1 -1
- package/dist-lib/modules/badge/index.d.ts +1 -1
- package/dist-lib/modules/badge/types.d.ts +49 -3
- package/dist-lib/modules/border/components/Border.d.ts +5 -0
- package/dist-lib/modules/border/constants.d.ts +4 -0
- package/dist-lib/modules/border/index.d.ts +3 -0
- package/dist-lib/modules/border/types.d.ts +34 -0
- package/dist-lib/modules/breadcrumb/components/Breadcrumb.d.ts +1 -1
- package/dist-lib/modules/breadcrumb/index.d.ts +1 -1
- package/dist-lib/modules/breadcrumb/types.d.ts +30 -2
- package/dist-lib/modules/button/components/Button.d.ts +1 -1
- package/dist-lib/modules/button/components/ButtonGroup.d.ts +5 -0
- package/dist-lib/modules/button/context.d.ts +3 -0
- package/dist-lib/modules/button/index.d.ts +2 -1
- package/dist-lib/modules/button/types.d.ts +68 -6
- package/dist-lib/modules/button-fill/components/ButtonFill.d.ts +6 -0
- package/dist-lib/modules/button-fill/constants.d.ts +2 -0
- package/dist-lib/modules/button-fill/index.d.ts +3 -0
- package/dist-lib/modules/button-fill/types.d.ts +28 -0
- package/dist-lib/modules/card/components/Card.d.ts +1 -1
- package/dist-lib/modules/card/index.d.ts +1 -1
- package/dist-lib/modules/card/types.d.ts +33 -6
- package/dist-lib/modules/carousel/components/Carousel.d.ts +2 -2
- package/dist-lib/modules/carousel/components/CarouselItem.d.ts +6 -0
- package/dist-lib/modules/carousel/index.d.ts +2 -1
- package/dist-lib/modules/carousel/types.d.ts +100 -4
- package/dist-lib/modules/cascader/components/Cascader.d.ts +2 -2
- package/dist-lib/modules/cascader/components/CascaderPanel.d.ts +6 -0
- package/dist-lib/modules/cascader/index.d.ts +2 -1
- package/dist-lib/modules/cascader/pathUtils.d.ts +14 -2
- package/dist-lib/modules/cascader/types.d.ts +186 -17
- package/dist-lib/modules/collapse/components/Collapse.d.ts +2 -2
- package/dist-lib/modules/collapse/components/CollapseItem.d.ts +6 -0
- package/dist-lib/modules/collapse/index.d.ts +2 -1
- package/dist-lib/modules/collapse/types.d.ts +57 -7
- package/dist-lib/modules/color/components/Color.d.ts +5 -0
- package/dist-lib/modules/color/index.d.ts +3 -0
- package/dist-lib/modules/color/palette.d.ts +48 -0
- package/dist-lib/modules/color/types.d.ts +49 -0
- package/dist-lib/modules/color-picker/colorUtils.d.ts +35 -0
- package/dist-lib/modules/color-picker/components/ColorPicker.d.ts +2 -2
- package/dist-lib/modules/color-picker/components/ColorPickerPanel.d.ts +2 -0
- package/dist-lib/modules/color-picker/index.d.ts +2 -1
- package/dist-lib/modules/color-picker/types.d.ts +82 -3
- package/dist-lib/modules/config-provider/components/ConfigProvider.d.ts +11 -2
- package/dist-lib/modules/config-provider/index.d.ts +3 -2
- package/dist-lib/modules/config-provider/locale/enUS.d.ts +2 -0
- package/dist-lib/modules/config-provider/types.d.ts +93 -5
- package/dist-lib/modules/date-picker/components/DatePicker.d.ts +2 -2
- package/dist-lib/modules/date-picker/components/DatePickerPanel.d.ts +2 -0
- package/dist-lib/modules/date-picker/index.d.ts +2 -1
- package/dist-lib/modules/date-picker/types.d.ts +89 -14
- package/dist-lib/modules/date-picker/utils.d.ts +17 -0
- package/dist-lib/modules/datetime-picker/components/DateTimePicker.d.ts +2 -2
- package/dist-lib/modules/datetime-picker/index.d.ts +1 -1
- package/dist-lib/modules/datetime-picker/types.d.ts +81 -7
- package/dist-lib/modules/datetime-picker/utils.d.ts +5 -1
- package/dist-lib/modules/descriptions/components/Descriptions.d.ts +4 -1
- package/dist-lib/modules/descriptions/components/DescriptionsItem.d.ts +6 -0
- package/dist-lib/modules/descriptions/index.d.ts +2 -1
- package/dist-lib/modules/descriptions/types.d.ts +61 -8
- package/dist-lib/modules/divider/components/Divider.d.ts +1 -1
- package/dist-lib/modules/divider/index.d.ts +1 -1
- package/dist-lib/modules/divider/types.d.ts +7 -1
- package/dist-lib/modules/download/components/Download.d.ts +2 -0
- package/dist-lib/modules/download/constants.d.ts +20 -0
- package/dist-lib/modules/download/index.d.ts +3 -0
- package/dist-lib/modules/download/resumeStorage.d.ts +12 -0
- package/dist-lib/modules/download/types.d.ts +67 -0
- package/dist-lib/modules/drawer/components/Drawer.d.ts +1 -3
- package/dist-lib/modules/drawer/index.d.ts +1 -1
- package/dist-lib/modules/drawer/types.d.ts +55 -4
- package/dist-lib/modules/dropdown/components/Dropdown.d.ts +3 -2
- package/dist-lib/modules/dropdown/index.d.ts +1 -1
- package/dist-lib/modules/dropdown/types.d.ts +49 -3
- package/dist-lib/modules/fluid-progress/components/FluidProgress.d.ts +5 -0
- package/dist-lib/modules/fluid-progress/constants.d.ts +3 -0
- package/dist-lib/modules/fluid-progress/index.d.ts +3 -0
- package/dist-lib/modules/fluid-progress/types.d.ts +25 -0
- package/dist-lib/modules/form/components/Form.d.ts +2 -2
- package/dist-lib/modules/form/index.d.ts +2 -2
- package/dist-lib/modules/form/types.d.ts +111 -6
- package/dist-lib/modules/form/useForm.d.ts +18 -2
- package/dist-lib/modules/fox-progress/components/FoxProgress.d.ts +5 -0
- package/dist-lib/modules/fox-progress/constants.d.ts +1 -0
- package/dist-lib/modules/fox-progress/index.d.ts +3 -0
- package/dist-lib/modules/fox-progress/types.d.ts +19 -0
- package/dist-lib/modules/image/components/Image.d.ts +2 -2
- package/dist-lib/modules/image/components/ImageLightbox.d.ts +4 -10
- package/dist-lib/modules/image/components/ImagePreviewGroup.d.ts +1 -1
- package/dist-lib/modules/image/index.d.ts +2 -2
- package/dist-lib/modules/image/types.d.ts +145 -22
- package/dist-lib/modules/input/components/Input.d.ts +2 -2
- package/dist-lib/modules/input/index.d.ts +1 -1
- package/dist-lib/modules/input/types.d.ts +70 -5
- package/dist-lib/modules/input-number/components/InputNumber.d.ts +2 -2
- package/dist-lib/modules/input-number/index.d.ts +1 -1
- package/dist-lib/modules/input-number/types.d.ts +74 -5
- package/dist-lib/modules/input-otp/components/InputOtp.d.ts +2 -0
- package/dist-lib/modules/input-otp/index.d.ts +2 -0
- package/dist-lib/modules/input-otp/types.d.ts +67 -0
- package/dist-lib/modules/input-tag/components/InputTag.d.ts +2 -0
- package/dist-lib/modules/input-tag/index.d.ts +2 -0
- package/dist-lib/modules/input-tag/types.d.ts +114 -0
- package/dist-lib/modules/layout/components/Layout.d.ts +20 -5
- package/dist-lib/modules/layout/components/Row.d.ts +867 -2
- package/dist-lib/modules/layout/index.d.ts +1 -1
- package/dist-lib/modules/layout/types.d.ts +86 -5
- package/dist-lib/modules/link/components/Link.d.ts +1 -1
- package/dist-lib/modules/link/index.d.ts +1 -1
- package/dist-lib/modules/link/types.d.ts +44 -2
- package/dist-lib/modules/liquid-progress/components/LiquidProgress.d.ts +5 -0
- package/dist-lib/modules/liquid-progress/constants.d.ts +2 -0
- package/dist-lib/modules/liquid-progress/index.d.ts +3 -0
- package/dist-lib/modules/liquid-progress/types.d.ts +22 -0
- package/dist-lib/modules/mention/components/Mention.d.ts +2 -2
- package/dist-lib/modules/mention/index.d.ts +1 -1
- package/dist-lib/modules/mention/types.d.ts +105 -5
- package/dist-lib/modules/menu/components/Menu.d.ts +1 -1
- package/dist-lib/modules/menu/types.d.ts +31 -0
- package/dist-lib/modules/message-box/components/MessageBoxView.d.ts +1 -1
- package/dist-lib/modules/message-box/index.d.ts +1 -1
- package/dist-lib/modules/message-box/types.d.ts +40 -2
- package/dist-lib/modules/modal/components/Modal.d.ts +2 -2
- package/dist-lib/modules/modal/index.d.ts +1 -1
- package/dist-lib/modules/modal/types.d.ts +61 -1
- package/dist-lib/modules/notification/components/NotificationProvider.d.ts +1 -1
- package/dist-lib/modules/notification/index.d.ts +1 -1
- package/dist-lib/modules/notification/types.d.ts +31 -1
- package/dist-lib/modules/pagination/components/Pagination.d.ts +4 -1
- package/dist-lib/modules/pagination/index.d.ts +1 -1
- package/dist-lib/modules/pagination/math.d.ts +2 -3
- package/dist-lib/modules/pagination/types.d.ts +76 -16
- package/dist-lib/modules/panel-morph/constants.d.ts +2 -1
- package/dist-lib/modules/photo-upload/components/PhotoUpload.d.ts +1 -1
- package/dist-lib/modules/photo-upload/constants.d.ts +4 -0
- package/dist-lib/modules/photo-upload/index.d.ts +1 -0
- package/dist-lib/modules/photo-upload/types.d.ts +14 -0
- package/dist-lib/modules/popconfirm/components/Popconfirm.d.ts +1 -1
- package/dist-lib/modules/popconfirm/types.d.ts +9 -2
- package/dist-lib/modules/popover/components/Popover.d.ts +1 -1
- package/dist-lib/modules/popover/types.d.ts +12 -2
- package/dist-lib/modules/progress/components/Progress.d.ts +4 -1
- package/dist-lib/modules/progress/index.d.ts +1 -1
- package/dist-lib/modules/progress/types.d.ts +82 -9
- package/dist-lib/modules/radio/components/Radio.d.ts +2 -0
- package/dist-lib/modules/radio/components/RadioButton.d.ts +5 -0
- package/dist-lib/modules/radio/components/RadioGroup.d.ts +1 -1
- package/dist-lib/modules/radio/context.d.ts +3 -0
- package/dist-lib/modules/radio/index.d.ts +3 -1
- package/dist-lib/modules/radio/types.d.ts +100 -5
- package/dist-lib/modules/range-picker/components/RangePicker.d.ts +1 -1
- package/dist-lib/modules/range-picker/index.d.ts +1 -1
- package/dist-lib/modules/range-picker/types.d.ts +29 -2
- package/dist-lib/modules/rate/components/Rate.d.ts +2 -2
- package/dist-lib/modules/rate/index.d.ts +1 -1
- package/dist-lib/modules/rate/types.d.ts +100 -1
- package/dist-lib/modules/result/components/Result.d.ts +4 -1
- package/dist-lib/modules/result/index.d.ts +1 -1
- package/dist-lib/modules/result/types.d.ts +15 -2
- package/dist-lib/modules/scrollbar/components/Scrollbar.d.ts +2 -2
- package/dist-lib/modules/scrollbar/index.d.ts +1 -1
- package/dist-lib/modules/scrollbar/types.d.ts +86 -1
- package/dist-lib/modules/search/components/Search.d.ts +2 -0
- package/dist-lib/modules/search/index.d.ts +2 -0
- package/dist-lib/modules/search/types.d.ts +20 -0
- package/dist-lib/modules/segmented/components/Segmented.d.ts +2 -1
- package/dist-lib/modules/segmented/index.d.ts +1 -1
- package/dist-lib/modules/segmented/types.d.ts +31 -8
- package/dist-lib/modules/select/components/Select.d.ts +2 -2
- package/dist-lib/modules/select/index.d.ts +1 -1
- package/dist-lib/modules/select/types.d.ts +112 -16
- package/dist-lib/modules/skeleton/components/Skeleton.d.ts +4 -1
- package/dist-lib/modules/skeleton/components/SkeletonItem.d.ts +5 -0
- package/dist-lib/modules/skeleton/index.d.ts +2 -1
- package/dist-lib/modules/skeleton/types.d.ts +55 -3
- package/dist-lib/modules/slider/components/Slider.d.ts +2 -0
- package/dist-lib/modules/slider/index.d.ts +3 -2
- package/dist-lib/modules/slider/types.d.ts +102 -0
- package/dist-lib/modules/space/components/Space.d.ts +1 -1
- package/dist-lib/modules/space/index.d.ts +1 -1
- package/dist-lib/modules/space/types.d.ts +47 -4
- package/dist-lib/modules/spin/components/Spin.d.ts +1 -1
- package/dist-lib/modules/spin/components/loadingService.d.ts +44 -0
- package/dist-lib/modules/spin/index.d.ts +2 -0
- package/dist-lib/modules/spin/types.d.ts +26 -1
- package/dist-lib/modules/splash-intro/components/AppSplash.d.ts +25 -0
- package/dist-lib/modules/splash-intro/components/SplashIntro.d.ts +38 -0
- package/dist-lib/modules/splash-intro/components/SplashLogo.d.ts +2 -0
- package/dist-lib/modules/splash-intro/components/SplashStagger.d.ts +14 -0
- package/dist-lib/modules/splash-intro/constants.d.ts +8 -0
- package/dist-lib/modules/splash-intro/context.d.ts +13 -0
- package/dist-lib/modules/splash-intro/index.d.ts +10 -0
- package/dist-lib/modules/splash-intro/types.d.ts +4 -0
- package/dist-lib/modules/splitter/components/Splitter.d.ts +7 -1
- package/dist-lib/modules/splitter/index.d.ts +1 -1
- package/dist-lib/modules/splitter/types.d.ts +75 -9
- package/dist-lib/modules/statistic/components/Countdown.d.ts +3 -0
- package/dist-lib/modules/statistic/components/Statistic.d.ts +3 -2
- package/dist-lib/modules/statistic/index.d.ts +2 -1
- package/dist-lib/modules/statistic/types.d.ts +28 -3
- package/dist-lib/modules/steps/components/Steps.d.ts +1 -1
- package/dist-lib/modules/steps/types.d.ts +17 -0
- package/dist-lib/modules/storybook-welcome/components/StorybookWelcome.d.ts +1 -1
- package/dist-lib/modules/storybook-welcome/types.d.ts +22 -2
- package/dist-lib/modules/switch/components/Switch.d.ts +2 -2
- package/dist-lib/modules/switch/index.d.ts +1 -1
- package/dist-lib/modules/switch/types.d.ts +100 -3
- package/dist-lib/modules/table/components/Table.d.ts +6 -2
- package/dist-lib/modules/table/index.d.ts +1 -1
- package/dist-lib/modules/table/types.d.ts +129 -22
- package/dist-lib/modules/table-v2/components/AutoResizer.d.ts +3 -0
- package/dist-lib/modules/table-v2/components/TableV2.d.ts +6 -0
- package/dist-lib/modules/table-v2/index.d.ts +3 -0
- package/dist-lib/modules/table-v2/types.d.ts +161 -0
- package/dist-lib/modules/tabs/components/Tabs.d.ts +1 -1
- package/dist-lib/modules/tabs/types.d.ts +18 -2
- package/dist-lib/modules/tag/components/CheckTag.d.ts +3 -0
- package/dist-lib/modules/tag/components/Tag.d.ts +2 -1
- package/dist-lib/modules/tag/index.d.ts +2 -1
- package/dist-lib/modules/tag/types.d.ts +32 -3
- package/dist-lib/modules/text/components/Text.d.ts +2 -0
- package/dist-lib/modules/text/index.d.ts +2 -0
- package/dist-lib/modules/text/types.d.ts +37 -0
- package/dist-lib/modules/thread-expand/components/ThreadExpand.d.ts +1 -1
- package/dist-lib/modules/thread-expand/constants.d.ts +28 -0
- package/dist-lib/modules/thread-expand/index.d.ts +1 -1
- package/dist-lib/modules/thread-expand/types.d.ts +14 -0
- package/dist-lib/modules/timeline/components/Timeline.d.ts +2 -1
- package/dist-lib/modules/timeline/index.d.ts +1 -1
- package/dist-lib/modules/timeline/types.d.ts +35 -1
- package/dist-lib/modules/toast/components/ToastProvider.d.ts +1 -1
- package/dist-lib/modules/toast/index.d.ts +1 -1
- package/dist-lib/modules/toast/types.d.ts +39 -1
- package/dist-lib/modules/tooltip/components/Tooltip.d.ts +1 -1
- package/dist-lib/modules/tooltip/index.d.ts +1 -1
- package/dist-lib/modules/tooltip/types.d.ts +15 -3
- package/dist-lib/modules/tour/components/Tour.d.ts +2 -1
- package/dist-lib/modules/tour/index.d.ts +1 -1
- package/dist-lib/modules/tour/types.d.ts +60 -6
- package/dist-lib/modules/transfer/components/Transfer.d.ts +2 -2
- package/dist-lib/modules/transfer/components/TransferVirtualBody.d.ts +10 -0
- package/dist-lib/modules/transfer/index.d.ts +1 -1
- package/dist-lib/modules/transfer/types.d.ts +111 -18
- package/dist-lib/modules/transition/components/CollapseTransition.d.ts +5 -0
- package/dist-lib/modules/transition/components/Transition.d.ts +6 -0
- package/dist-lib/modules/transition/constants.d.ts +9 -0
- package/dist-lib/modules/transition/index.d.ts +5 -0
- package/dist-lib/modules/transition/types.d.ts +59 -0
- package/dist-lib/modules/tree/checkUtils.d.ts +3 -0
- package/dist-lib/modules/tree/components/Tree.d.ts +3 -2
- package/dist-lib/modules/tree/dragUtils.d.ts +5 -2
- package/dist-lib/modules/tree/index.d.ts +1 -1
- package/dist-lib/modules/tree/types.d.ts +93 -51
- package/dist-lib/modules/tree-select/components/TreeSelect.d.ts +2 -2
- package/dist-lib/modules/tree-select/index.d.ts +1 -1
- package/dist-lib/modules/tree-select/types.d.ts +85 -13
- package/dist-lib/modules/tree-select/utils.d.ts +14 -3
- package/dist-lib/modules/tree-v2/components/TreeV2.d.ts +3 -0
- package/dist-lib/modules/tree-v2/index.d.ts +2 -0
- package/dist-lib/modules/tree-v2/types.d.ts +97 -0
- package/dist-lib/modules/tree-v2/utils.d.ts +24 -0
- package/dist-lib/modules/typography/components/Typography.d.ts +9 -4
- package/dist-lib/modules/typography/constants.d.ts +27 -0
- package/dist-lib/modules/typography/index.d.ts +2 -1
- package/dist-lib/modules/typography/types.d.ts +14 -0
- package/dist-lib/modules/upload/ajaxUpload.d.ts +2 -0
- package/dist-lib/modules/upload/chunkUpload.d.ts +6 -0
- package/dist-lib/modules/upload/components/Upload.d.ts +2 -2
- package/dist-lib/modules/upload/index.d.ts +2 -1
- package/dist-lib/modules/upload/resumeStorage.d.ts +16 -0
- package/dist-lib/modules/upload/types.d.ts +160 -24
- package/package.json +80 -73
|
@@ -1,11 +1,57 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
/** 项目约定 tone;兼容 Element type(含 info) */
|
|
3
|
+
export type BadgeTone = "primary" | "success" | "warning" | "danger" | "info" | "neutral";
|
|
4
|
+
export type BadgeType = BadgeTone;
|
|
3
5
|
export type BadgeProps = {
|
|
4
6
|
children?: ReactNode;
|
|
5
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 显示值
|
|
9
|
+
* @default ""
|
|
10
|
+
*/
|
|
11
|
+
value?: string | number | ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* 自定义显示内容(优先于 value)
|
|
14
|
+
*/
|
|
15
|
+
content?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* 最大值,仅 value 为 number 时生效,超过显示 {max}+
|
|
18
|
+
* @default 99
|
|
19
|
+
*/
|
|
6
20
|
max?: number;
|
|
21
|
+
/**
|
|
22
|
+
* 是否显示小圆点
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
isDot?: boolean;
|
|
26
|
+
/** @deprecated 请使用 isDot */
|
|
7
27
|
dot?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 是否隐藏
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
8
32
|
hidden?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 类型(Element: type)
|
|
35
|
+
* @default "danger"
|
|
36
|
+
*/
|
|
37
|
+
type?: BadgeType;
|
|
38
|
+
/** @deprecated 请使用 type;neutral 对应 info 的弱化语义 */
|
|
9
39
|
tone?: BadgeTone;
|
|
40
|
+
/**
|
|
41
|
+
* 值为 0 时是否仍显示
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
showZero?: boolean;
|
|
45
|
+
/** 自定义背景色 */
|
|
46
|
+
color?: string;
|
|
47
|
+
/**
|
|
48
|
+
* 偏移 [right, top](相对默认 translate(50%, -50%) 的额外位移,单位 px)
|
|
49
|
+
* @default [0, 0]
|
|
50
|
+
*/
|
|
51
|
+
offset?: [number, number];
|
|
52
|
+
/** 徽标节点自定义样式 */
|
|
53
|
+
badgeStyle?: CSSProperties;
|
|
54
|
+
/** 徽标节点自定义类名 */
|
|
55
|
+
badgeClass?: string;
|
|
10
56
|
className?: string;
|
|
11
57
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BorderRadiusItem, BorderShadowItem, BorderStyleItem } from './types';
|
|
2
|
+
export declare const DEFAULT_BORDER_STYLES: BorderStyleItem[];
|
|
3
|
+
export declare const DEFAULT_BORDER_RADIUSES: BorderRadiusItem[];
|
|
4
|
+
export declare const DEFAULT_BORDER_SHADOWS: BorderShadowItem[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type BorderStyleItem = {
|
|
2
|
+
name: string;
|
|
3
|
+
thickness: string;
|
|
4
|
+
/** CSS border-top 简写或用 token 拼出 */
|
|
5
|
+
demoStyle: string;
|
|
6
|
+
token?: string;
|
|
7
|
+
};
|
|
8
|
+
export type BorderRadiusItem = {
|
|
9
|
+
name: string;
|
|
10
|
+
/** 展示用值文案 */
|
|
11
|
+
value: string;
|
|
12
|
+
token?: string;
|
|
13
|
+
/** 实际用于预览的 radius */
|
|
14
|
+
radius: string;
|
|
15
|
+
};
|
|
16
|
+
export type BorderShadowItem = {
|
|
17
|
+
name: string;
|
|
18
|
+
token: string;
|
|
19
|
+
};
|
|
20
|
+
export type BorderProps = {
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* 点击 token / 色值是否复制
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
copyable?: boolean;
|
|
27
|
+
/** 自定义边框样式行;默认内置 Solid / Dashed */
|
|
28
|
+
styles?: BorderStyleItem[];
|
|
29
|
+
/** 自定义圆角;默认 none / small / base / round */
|
|
30
|
+
radiuses?: BorderRadiusItem[];
|
|
31
|
+
/** 自定义阴影;默认 base / light / lighter / dark */
|
|
32
|
+
shadows?: BorderShadowItem[];
|
|
33
|
+
onCopy?: (text: string) => void;
|
|
34
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BreadcrumbProps } from '../types';
|
|
2
|
-
export declare function Breadcrumb({ items, separator, className, onNavigate, }: BreadcrumbProps): import('react').JSX.Element;
|
|
2
|
+
export declare function Breadcrumb({ items, separator, className, router, onNavigate, }: BreadcrumbProps): import('react').JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Breadcrumb } from './components/Breadcrumb';
|
|
2
|
-
export type { BreadcrumbItem, BreadcrumbProps } from './types';
|
|
2
|
+
export type { BreadcrumbItem, BreadcrumbNavigateInfo, BreadcrumbProps, } from './types';
|
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { To } from 'react-router-dom';
|
|
2
3
|
export type BreadcrumbItem = {
|
|
3
4
|
key: string;
|
|
4
5
|
label: ReactNode;
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* 链接目标;未传 onNavigate 时自动跳转。
|
|
8
|
+
* router 模式下走 react-router navigate。
|
|
9
|
+
*/
|
|
10
|
+
href?: To;
|
|
11
|
+
/**
|
|
12
|
+
* 为 true 时 replace 导航(不留下历史记录)
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
replace?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type BreadcrumbNavigateInfo = {
|
|
18
|
+
key: string;
|
|
19
|
+
href?: To;
|
|
20
|
+
replace: boolean;
|
|
6
21
|
};
|
|
7
22
|
export type BreadcrumbProps = {
|
|
8
23
|
items: BreadcrumbItem[];
|
|
24
|
+
/**
|
|
25
|
+
* 分隔符(可为图标等 ReactNode)
|
|
26
|
+
* @default "/"
|
|
27
|
+
*/
|
|
9
28
|
separator?: ReactNode;
|
|
10
29
|
className?: string;
|
|
11
|
-
|
|
30
|
+
/**
|
|
31
|
+
* 使用 react-router 跳转 href(需在 Router 内)
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
router?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 点击可交互项。
|
|
37
|
+
* 若同时有 href:仍会在回调后执行跳转(除非返回 false)。
|
|
38
|
+
*/
|
|
39
|
+
onNavigate?: (key: string, info: BreadcrumbNavigateInfo) => void | boolean | Promise<void | boolean>;
|
|
12
40
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ButtonProps } from '../types';
|
|
2
|
-
export declare function Button({ children, tone, size, loading, block, plain, round, circle, icon, disabled, className, type, ...rest }: ButtonProps): import('react').JSX.Element;
|
|
2
|
+
export declare function Button({ children, tone: toneProp, size: sizeProp, loading, loadingIcon, block, plain: plainProp, text: textProp, bg, link, round: roundProp, circle, dashed: dashedProp, icon, iconPosition, color, autoInsertSpace: autoInsertSpaceProp, tag, disabled, className, type, style, ...rest }: ButtonProps): import('react').JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { Button } from './components/Button';
|
|
2
|
-
export
|
|
2
|
+
export { ButtonGroup } from './components/ButtonGroup';
|
|
3
|
+
export type { ButtonProps, ButtonSize, ButtonTone, ButtonIconPosition, ButtonGroupProps, ButtonGroupDirection, } from './types';
|
|
@@ -1,32 +1,94 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export type ButtonTone = "primary" | "success" | "warning" | "danger" | "info" | "neutral" | "ghost" | "text";
|
|
3
3
|
export type ButtonSize = "sm" | "md" | "lg";
|
|
4
|
+
export type ButtonIconPosition = "start" | "end";
|
|
4
5
|
export type ButtonProps = {
|
|
5
6
|
children?: ReactNode;
|
|
6
7
|
/**
|
|
7
|
-
* 按钮类型 /
|
|
8
|
+
* 按钮类型 / 语义色;设置 color 时以后者为准
|
|
8
9
|
* @default primary
|
|
9
10
|
*/
|
|
10
11
|
tone?: ButtonTone;
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @default md
|
|
13
|
+
* 尺寸;省略时跟随 ButtonGroup / ConfigProvider
|
|
14
|
+
* @default ConfigProvider.size / md
|
|
14
15
|
*/
|
|
15
16
|
size?: ButtonSize;
|
|
16
17
|
/** 是否加载中 */
|
|
17
18
|
loading?: boolean;
|
|
19
|
+
/** 自定义加载图标;优先级低于 loading 插槽式用法时直接传节点 */
|
|
20
|
+
loadingIcon?: ReactNode;
|
|
18
21
|
/** 是否禁用 */
|
|
19
22
|
disabled?: boolean;
|
|
20
23
|
/** 是否块级(宽度 100%) */
|
|
21
24
|
block?: boolean;
|
|
22
25
|
/** 朴素按钮(描边浅底) */
|
|
23
26
|
plain?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 是否为文字按钮(无边框;可用 bg 显示浅底)
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
text?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 文字按钮是否始终显示背景
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
bg?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 是否为链接按钮(无边框/背景,悬停下划线)
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
link?: boolean;
|
|
24
42
|
/** 圆角按钮 */
|
|
25
43
|
round?: boolean;
|
|
26
44
|
/** 圆形按钮(常用于图标) */
|
|
27
45
|
circle?: boolean;
|
|
28
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* 是否虚线边框按钮
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
dashed?: boolean;
|
|
51
|
+
/** 图标节点 */
|
|
29
52
|
icon?: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* 图标位置
|
|
55
|
+
* @default "start"
|
|
56
|
+
*/
|
|
57
|
+
iconPosition?: ButtonIconPosition;
|
|
58
|
+
/**
|
|
59
|
+
* 自定义主色;自动推导 hover / active
|
|
60
|
+
*/
|
|
61
|
+
color?: string;
|
|
62
|
+
/**
|
|
63
|
+
* 两个中文字符之间自动插入空格
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
autoInsertSpace?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* 渲染的 HTML 标签
|
|
69
|
+
* @default "button"
|
|
70
|
+
*/
|
|
71
|
+
tag?: ElementType;
|
|
72
|
+
/** tag 为 a 时的链接地址 */
|
|
73
|
+
href?: string;
|
|
30
74
|
/** 自定义类名 */
|
|
31
75
|
className?: string;
|
|
32
|
-
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className">;
|
|
76
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className" | "color">;
|
|
77
|
+
export type ButtonGroupDirection = "horizontal" | "vertical";
|
|
78
|
+
export type ButtonGroupProps = {
|
|
79
|
+
children?: ReactNode;
|
|
80
|
+
/** 组内按钮默认尺寸 */
|
|
81
|
+
size?: ButtonSize;
|
|
82
|
+
/** 组内按钮默认 tone */
|
|
83
|
+
tone?: ButtonTone;
|
|
84
|
+
/**
|
|
85
|
+
* 排列方向
|
|
86
|
+
* @default "horizontal"
|
|
87
|
+
*/
|
|
88
|
+
direction?: ButtonGroupDirection;
|
|
89
|
+
className?: string;
|
|
90
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "className" | "children" | "color">;
|
|
91
|
+
export type ButtonGroupContextValue = {
|
|
92
|
+
size?: ButtonSize;
|
|
93
|
+
tone?: ButtonTone;
|
|
94
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ButtonFillProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Button fill: one press starts an internal fill; at 100% it becomes "done".
|
|
4
|
+
* Supports pause / exception visual states.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ButtonFill({ className, durationMs, label, doneLabel, pausedLabel, exceptionLabel, fillColor, status, defaultProgress, disabled, onComplete, onPause, onResume, onException, onReset, }: ButtonFillProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ButtonFillPhase = "idle" | "filling" | "paused" | "done" | "exception";
|
|
2
|
+
export type ButtonFillProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
/** 填满所需毫秒 */
|
|
5
|
+
durationMs?: number;
|
|
6
|
+
/** 空闲文案 */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** 完成文案 */
|
|
9
|
+
doneLabel?: string;
|
|
10
|
+
/** 暂停文案 */
|
|
11
|
+
pausedLabel?: string;
|
|
12
|
+
/** 失败文案 */
|
|
13
|
+
exceptionLabel?: string;
|
|
14
|
+
/** 填充色 */
|
|
15
|
+
fillColor?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 受控状态;传入后覆盖内部 phase(用于展示暂停/失败样式)
|
|
18
|
+
*/
|
|
19
|
+
status?: Exclude<ButtonFillPhase, "idle" | "filling"> | "normal";
|
|
20
|
+
/** 演示用初始进度 0–1(仅非受控) */
|
|
21
|
+
defaultProgress?: number;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
onComplete?: () => void;
|
|
24
|
+
onPause?: (progress: number) => void;
|
|
25
|
+
onResume?: (progress: number) => void;
|
|
26
|
+
onException?: (progress: number) => void;
|
|
27
|
+
onReset?: () => void;
|
|
28
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CardProps } from '../types';
|
|
2
|
-
export declare function Card({ children, title, extra, footer, hoverable, bordered, shadow, className,
|
|
2
|
+
export declare function Card({ children, header, title, extra, footer, bodyStyle, headerClass, bodyClass, bodyClassName, footerClass, hoverable, bordered, shadow: shadowProp, className, style, }: CardProps): import('react').JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Card } from './components/Card';
|
|
2
|
-
export type { CardProps } from './types';
|
|
2
|
+
export type { CardProps, CardShadow } from './types';
|
|
@@ -1,17 +1,44 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
export type CardShadow = "never" | "hover" | "always";
|
|
3
3
|
export type CardProps = {
|
|
4
4
|
children?: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* 卡片标题(Element: header)
|
|
7
|
+
*/
|
|
8
|
+
header?: ReactNode;
|
|
9
|
+
/** @deprecated 请使用 header;兼容旧 API */
|
|
5
10
|
title?: ReactNode;
|
|
11
|
+
/** 标题栏右侧操作区(库扩展) */
|
|
6
12
|
extra?: ReactNode;
|
|
13
|
+
/** 页脚 */
|
|
7
14
|
footer?: ReactNode;
|
|
8
|
-
hoverable?: boolean;
|
|
9
|
-
bordered?: boolean;
|
|
10
15
|
/**
|
|
11
|
-
*
|
|
12
|
-
|
|
16
|
+
* body 内联样式
|
|
17
|
+
*/
|
|
18
|
+
bodyStyle?: CSSProperties;
|
|
19
|
+
/** header 自定义类名 */
|
|
20
|
+
headerClass?: string;
|
|
21
|
+
/** body 自定义类名 */
|
|
22
|
+
bodyClass?: string;
|
|
23
|
+
/** @deprecated 请使用 bodyClass */
|
|
24
|
+
bodyClassName?: string;
|
|
25
|
+
/** footer 自定义类名 */
|
|
26
|
+
footerClass?: string;
|
|
27
|
+
/**
|
|
28
|
+
* 阴影显示时机
|
|
29
|
+
* @default "always"
|
|
13
30
|
*/
|
|
14
31
|
shadow?: CardShadow;
|
|
32
|
+
/**
|
|
33
|
+
* 悬停抬起;为 true 时等同 shadow="hover"
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
hoverable?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 是否显示边框
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
|
+
bordered?: boolean;
|
|
15
42
|
className?: string;
|
|
16
|
-
|
|
43
|
+
style?: CSSProperties;
|
|
17
44
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CarouselProps } from '../types';
|
|
2
|
-
export declare
|
|
1
|
+
import { CarouselProps, CarouselRef } from '../types';
|
|
2
|
+
export declare const Carousel: import('react').ForwardRefExoticComponent<CarouselProps & import('react').RefAttributes<CarouselRef>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CarouselItemProps } from '../types';
|
|
2
|
+
/** 走马灯子项;需作为 Carousel 的子节点使用 */
|
|
3
|
+
export declare function CarouselItem({ children, className, style }: CarouselItemProps): import('react').JSX.Element;
|
|
4
|
+
export declare namespace CarouselItem {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { Carousel } from './components/Carousel';
|
|
2
|
-
export
|
|
2
|
+
export { CarouselItem } from './components/CarouselItem';
|
|
3
|
+
export type { CarouselArrow, CarouselDirection, CarouselIndicatorPosition, CarouselItemData, CarouselItemProps, CarouselProps, CarouselRef, CarouselTrigger, CarouselType, } from './types';
|
|
@@ -1,14 +1,110 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export type
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export type CarouselDirection = "horizontal" | "vertical";
|
|
3
|
+
export type CarouselTrigger = "hover" | "click";
|
|
4
|
+
export type CarouselArrow = "always" | "hover" | "never";
|
|
5
|
+
export type CarouselIndicatorPosition = "" | "outside" | "none";
|
|
6
|
+
export type CarouselType = "" | "card";
|
|
7
|
+
/** items 数据项(也可改用 <CarouselItem> 子节点) */
|
|
8
|
+
export type CarouselItemData = {
|
|
3
9
|
key: string;
|
|
10
|
+
/** 可用作 setActiveItem 参数 */
|
|
11
|
+
name?: string;
|
|
12
|
+
/** 指示器文本 */
|
|
13
|
+
label?: string | number;
|
|
4
14
|
content: ReactNode;
|
|
5
15
|
};
|
|
16
|
+
export type CarouselItemProps = {
|
|
17
|
+
name?: string;
|
|
18
|
+
label?: string | number;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: CSSProperties;
|
|
22
|
+
};
|
|
6
23
|
export type CarouselProps = {
|
|
7
|
-
|
|
24
|
+
/** 轮播项;与 children 二选一,children 优先 */
|
|
25
|
+
items?: CarouselItemData[];
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* 高度;传 "auto" 时随当前项内容自适应
|
|
29
|
+
* @default ""
|
|
30
|
+
*/
|
|
31
|
+
height?: string;
|
|
32
|
+
/**
|
|
33
|
+
* 初始激活索引(从 0 开始)
|
|
34
|
+
* @default 0
|
|
35
|
+
*/
|
|
36
|
+
initialIndex?: number;
|
|
37
|
+
/**
|
|
38
|
+
* 指示器触发方式
|
|
39
|
+
* @default "hover"
|
|
40
|
+
*/
|
|
41
|
+
trigger?: CarouselTrigger;
|
|
42
|
+
/**
|
|
43
|
+
* 是否自动切换
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
8
46
|
autoplay?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* 自动切换间隔(ms)
|
|
49
|
+
* @default 3000
|
|
50
|
+
*/
|
|
9
51
|
interval?: number;
|
|
52
|
+
/**
|
|
53
|
+
* 指示器位置;"" 内部,outside 外部,none 隐藏
|
|
54
|
+
* @default ""
|
|
55
|
+
*/
|
|
56
|
+
indicatorPosition?: CarouselIndicatorPosition;
|
|
57
|
+
/**
|
|
58
|
+
* 箭头显示时机
|
|
59
|
+
* @default "hover"
|
|
60
|
+
*/
|
|
61
|
+
arrow?: CarouselArrow;
|
|
62
|
+
/**
|
|
63
|
+
* 类型;card 为卡片模式
|
|
64
|
+
* @default ""
|
|
65
|
+
*/
|
|
66
|
+
type?: CarouselType;
|
|
67
|
+
/**
|
|
68
|
+
* type=card 时两侧卡片缩放
|
|
69
|
+
* @default 0.83
|
|
70
|
+
*/
|
|
71
|
+
cardScale?: number;
|
|
72
|
+
/**
|
|
73
|
+
* 是否循环
|
|
74
|
+
* @default true
|
|
75
|
+
*/
|
|
76
|
+
loop?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 方向
|
|
79
|
+
* @default "horizontal"
|
|
80
|
+
*/
|
|
81
|
+
direction?: CarouselDirection;
|
|
82
|
+
/**
|
|
83
|
+
* 悬停暂停自动切换
|
|
84
|
+
* @default true
|
|
85
|
+
*/
|
|
86
|
+
pauseOnHover?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 切换时动态模糊
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
motionBlur?: boolean;
|
|
92
|
+
/** @deprecated 请使用 indicatorPosition;false 等同 none */
|
|
10
93
|
showDots?: boolean;
|
|
94
|
+
/** @deprecated 请使用 arrow;false 等同 never,true 等同 hover */
|
|
11
95
|
showArrows?: boolean;
|
|
12
96
|
className?: string;
|
|
13
|
-
|
|
97
|
+
style?: CSSProperties;
|
|
98
|
+
/**
|
|
99
|
+
* 切换时触发:(新索引, 旧索引)
|
|
100
|
+
*/
|
|
101
|
+
onChange?: (current: number, prev: number) => void;
|
|
102
|
+
};
|
|
103
|
+
export type CarouselRef = {
|
|
104
|
+
/** 当前幻灯片索引 */
|
|
105
|
+
activeIndex: number;
|
|
106
|
+
/** 按索引或 name 切换 */
|
|
107
|
+
setActiveItem: (indexOrName: number | string) => void;
|
|
108
|
+
prev: () => void;
|
|
109
|
+
next: () => void;
|
|
14
110
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CascaderProps } from '../types';
|
|
2
|
-
export declare
|
|
1
|
+
import { CascaderHandle, CascaderProps } from '../types';
|
|
2
|
+
export declare const Cascader: import('react').ForwardRefExoticComponent<CascaderProps & import('react').RefAttributes<CascaderHandle>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CascaderOption, CascaderPanelProps } from '../types';
|
|
2
|
+
export type CascaderPanelHandleLogic = {
|
|
3
|
+
options: CascaderOption[];
|
|
4
|
+
setOptions: (next: CascaderOption[]) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function CascaderPanel({ options: optionsProp, value: valueProp, defaultValue, multiple, checkStrictly, changeOnSelect, expandTrigger, lazy, lazyLoad, checkOnClickNode, checkOnClickLeaf, showPrefix, className, renderOption, empty, onChange, onExpandChange, onOptionsChange, }: CascaderPanelProps): import('react').JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { Cascader } from './components/Cascader';
|
|
2
|
-
export
|
|
2
|
+
export { CascaderPanel } from './components/CascaderPanel';
|
|
3
|
+
export type { CascaderExpandTrigger, CascaderFilterNode, CascaderHandle, CascaderLazyNode, CascaderOption, CascaderPanelProps, CascaderPlacement, CascaderProps, CascaderPropsConfig, CascaderShowCheckedStrategy, CascaderSize, CascaderTagEffect, CascaderTagType, CascaderValue, } from './types';
|
|
@@ -15,5 +15,17 @@ export declare function isPathSelected(selected: string[][], path: string[]): bo
|
|
|
15
15
|
export declare function hasAnyLeafSelected(options: CascaderOption[], selected: string[][], path: string[]): boolean;
|
|
16
16
|
export declare function hasAllLeavesSelected(options: CascaderOption[], selected: string[][], path: string[]): boolean;
|
|
17
17
|
export declare function togglePaths(selected: string[][], paths: string[][], checked: boolean): string[][];
|
|
18
|
-
|
|
19
|
-
export declare function
|
|
18
|
+
/** DFS:按节点 value 找路径(emitPath=false 时还原) */
|
|
19
|
+
export declare function findPathByNodeValue(options: CascaderOption[], target: string, prefix?: string[]): string[] | null;
|
|
20
|
+
export declare function toMultipleValue(value: unknown, fallback?: string[][], options?: CascaderOption[], emitPath?: boolean): string[][];
|
|
21
|
+
export declare function toSingleValue(value: unknown, fallback?: string[], options?: CascaderOption[], emitPath?: boolean): string[];
|
|
22
|
+
export declare function pathToEmitValue(path: string[], emitPath: boolean): string | string[];
|
|
23
|
+
export declare function pathsToEmitValue(paths: string[][], emitPath: boolean): string[] | string[][];
|
|
24
|
+
export declare function pathToEmitLabels(labels: string[], emitPath: boolean): string | string[];
|
|
25
|
+
export declare function pathsToEmitLabels(labelPaths: string[][], emitPath: boolean): string[] | string[][];
|
|
26
|
+
/**
|
|
27
|
+
* 多选展示策略:parent 时,若某节点下全部叶子均已选中,则只展示该父路径。
|
|
28
|
+
*/
|
|
29
|
+
export declare function pathsForCheckedStrategy(options: CascaderOption[], selected: string[][], strategy: "child" | "parent"): string[][];
|
|
30
|
+
export declare function isLeafOption(opt: CascaderOption): boolean;
|
|
31
|
+
export declare function mergeChildrenAtPath(tree: CascaderOption[], path: string[], children: CascaderOption[]): CascaderOption[];
|