antdv-next 1.0.0-alpha.5 → 1.0.0-beta.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/dist/_util/PurePanel.js +106 -0
- package/dist/_util/hooks/useMergeSemantic.js +3 -3
- package/dist/_util/styleUtils.js +10 -0
- package/dist/alert/Alert.d.ts +3 -3
- package/dist/anchor/Anchor.d.ts +3 -3
- package/dist/antd.js +113 -105
- package/dist/app/App.d.ts +2 -2
- package/dist/auto-complete/index.d.ts +4 -3
- package/dist/auto-complete/index.js +8 -1
- package/dist/avatar/Avatar.d.ts +3 -3
- package/dist/avatar/AvatarGroup.d.ts +2 -2
- package/dist/badge/Ribbon.d.ts +3 -3
- package/dist/badge/ScrollNumber.js +1 -1
- package/dist/badge/SingleNumber.js +1 -1
- package/dist/badge/index.d.ts +3 -3
- package/dist/badge/index.js +5 -3
- package/dist/badge/style/index.js +1 -1
- package/dist/breadcrumb/Breadcrumb.d.ts +3 -3
- package/dist/button/Button.d.ts +3 -3
- package/dist/calendar/generateCalendar.d.ts +3 -3
- package/dist/calendar/index.d.ts +3 -3
- package/dist/calendar/style/index.d.ts +1 -1
- package/dist/calendar/style/index.js +1 -1
- package/dist/card/Card.d.ts +3 -3
- package/dist/card/CardGrid.d.ts +2 -2
- package/dist/card/CardMeta.d.ts +3 -3
- package/dist/card/style/index.js +11 -2
- package/dist/cascader/Panel.d.ts +3 -3
- package/dist/cascader/index.d.ts +1 -0
- package/dist/cascader/index.js +2 -0
- package/dist/checkbox/Checkbox.d.ts +3 -3
- package/dist/checkbox/Group.d.ts +3 -3
- package/dist/checkbox/style/index.d.ts +1 -1
- package/dist/color-picker/ColorPicker.d.ts +4 -4
- package/dist/color-picker/ColorPicker.js +11 -0
- package/dist/components.d.ts +8 -6
- package/dist/config-provider/context.d.ts +2 -1
- package/dist/config-provider/context.js +1 -1
- package/dist/config-provider/define.d.ts +14 -0
- package/dist/config-provider/index.d.ts +3 -3
- package/dist/config-provider/index.js +21 -2
- package/dist/date-picker/generatePicker/generateRangePicker.js +1 -1
- package/dist/date-picker/generatePicker/generateSinglePicker.js +2 -1
- package/dist/date-picker/generatePicker/index.d.ts +17 -17
- package/dist/date-picker/index.d.ts +29 -27
- package/dist/date-picker/index.js +3 -0
- package/dist/date-picker/style/panel.js +4 -4
- package/dist/descriptions/index.d.ts +3 -3
- package/dist/divider/index.d.ts +2 -2
- package/dist/drawer/index.d.ts +6 -4
- package/dist/drawer/index.js +17 -5
- package/dist/drawer/useFocusable.d.ts +10 -0
- package/dist/drawer/useFocusable.js +18 -0
- package/dist/dropdown/dropdown.d.ts +3 -3
- package/dist/dropdown/dropdown.js +7 -0
- package/dist/empty/index.d.ts +3 -3
- package/dist/flex/index.d.ts +3 -3
- package/dist/flex/index.js +1 -1
- package/dist/float-button/BackTop.d.ts +3 -3
- package/dist/float-button/BackTop.js +4 -1
- package/dist/float-button/FloatButton.d.ts +3 -3
- package/dist/float-button/FloatButtonGroup.d.ts +3 -3
- package/dist/float-button/PurePanel.js +5 -5
- package/dist/form/ErrorList.js +4 -7
- package/dist/form/Form.d.ts +7 -3
- package/dist/form/Form.js +39 -22
- package/dist/form/FormItem/ItemHolder.js +0 -1
- package/dist/form/FormItem/index.d.ts +5 -5
- package/dist/form/FormItem/index.js +48 -29
- package/dist/form/FormItemInput.js +17 -19
- package/dist/form/utils/valueUtil.js +4 -1
- package/dist/grid/col.js +7 -2
- package/dist/grid/index.d.ts +2 -2
- package/dist/grid/style/index.js +6 -5
- package/dist/image/PreviewGroup.d.ts +2 -2
- package/dist/image/index.d.ts +7 -4
- package/dist/image/index.js +2 -0
- package/dist/image/style/index.d.ts +1 -1
- package/dist/index.d.ts +12 -9
- package/dist/index.js +3 -1
- package/dist/input/TextArea.d.ts +3 -3
- package/dist/input/index.d.ts +11 -11
- package/dist/input/style/index.d.ts +2 -2
- package/dist/input-number/index.d.ts +4 -4
- package/dist/input-number/index.js +1 -5
- package/dist/layout/index.d.ts +6 -6
- package/dist/layout/layout.d.ts +2 -2
- package/dist/layout/style/sider.js +1 -1
- package/dist/masonry/Masonry.d.ts +3 -3
- package/dist/mentions/index.d.ts +4 -3
- package/dist/mentions/index.js +3 -1
- package/dist/menu/MenuDivider.d.ts +2 -2
- package/dist/menu/MenuItem.d.ts +3 -3
- package/dist/menu/SubMenu.d.ts +3 -3
- package/dist/menu/index.d.ts +5 -5
- package/dist/menu/style/horizontal.js +1 -1
- package/dist/menu/style/index.js +5 -5
- package/dist/message/PurePanel.d.ts +2 -2
- package/dist/message/useMessage.d.ts +1 -0
- package/dist/modal/ConfirmDialog.js +1 -1
- package/dist/modal/Modal.d.ts +3 -3
- package/dist/modal/Modal.js +17 -6
- package/dist/modal/PurePanel.js +305 -0
- package/dist/modal/index.js +2 -0
- package/dist/modal/interface.d.ts +3 -1
- package/dist/notification/PurePanel.d.ts +2 -2
- package/dist/notification/PurePanel.js +4 -3
- package/dist/notification/style/index.d.ts +1 -1
- package/dist/notification/useNotification.d.ts +3 -2
- package/dist/notification/useNotification.js +7 -7
- package/dist/package.d.ts +34 -0
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.d.ts +3 -3
- package/dist/popconfirm/PurePanel.d.ts +2 -2
- package/dist/popconfirm/PurePanel.js +2 -1
- package/dist/popconfirm/index.d.ts +3 -3
- package/dist/popover/PurePanel.js +4 -2
- package/dist/popover/index.d.ts +9 -6
- package/dist/popover/index.js +2 -1
- package/dist/progress/progress.d.ts +3 -3
- package/dist/qrcode/index.d.ts +3 -3
- package/dist/radio/index.d.ts +5 -5
- package/dist/radio/radio.d.ts +3 -3
- package/dist/radio/style/index.js +1 -1
- package/dist/rate/index.d.ts +3 -3
- package/dist/rate/style/index.d.ts +1 -1
- package/dist/result/index.d.ts +3 -3
- package/dist/segmented/index.d.ts +3 -3
- package/dist/select/index.d.ts +5 -5
- package/dist/select/index.js +3 -1
- package/dist/select/style/dropdown.js +1 -1
- package/dist/skeleton/Avatar.d.ts +2 -2
- package/dist/skeleton/Button.d.ts +2 -2
- package/dist/skeleton/Image.d.ts +2 -2
- package/dist/skeleton/Input.d.ts +2 -2
- package/dist/skeleton/Node.d.ts +3 -3
- package/dist/skeleton/Skeleton.d.ts +3 -3
- package/dist/skeleton/Skeleton.js +1 -1
- package/dist/skeleton/Title.d.ts +1 -2
- package/dist/skeleton/Title.js +0 -5
- package/dist/slider/index.d.ts +3 -3
- package/dist/space/index.d.ts +5 -5
- package/dist/spin/index.d.ts +3 -3
- package/dist/spin/index.js +7 -6
- package/dist/splitter/Splitter.d.ts +3 -3
- package/dist/splitter/index.d.ts +2 -2
- package/dist/statistic/Statistic.d.ts +3 -3
- package/dist/statistic/Timer.d.ts +5 -5
- package/dist/statistic/index.d.ts +5 -5
- package/dist/steps/index.d.ts +3 -3
- package/dist/steps/style/icon.js +1 -1
- package/dist/steps/style/inline.js +1 -1
- package/dist/steps/style/panel.js +1 -1
- package/dist/switch/index.d.ts +3 -3
- package/dist/table/Column.d.ts +3 -3
- package/dist/table/ColumnGroup.d.ts +3 -3
- package/dist/table/InternalTable.js +19 -5
- package/dist/table/Table.d.ts +3 -3
- package/dist/table/style/index.js +3 -3
- package/dist/table/style/radius.js +6 -0
- package/dist/table/style/virtual.js +1 -1
- package/dist/tabs/TabPane.d.ts +3 -3
- package/dist/tabs/index.d.ts +3 -3
- package/dist/tag/CheckableTag.d.ts +3 -3
- package/dist/tag/CheckableTagGroup.d.ts +3 -3
- package/dist/tag/CheckableTagGroup.js +3 -3
- package/dist/tag/index.d.ts +3 -3
- package/dist/theme/context.d.ts +2 -2
- package/dist/theme/index.d.ts +4 -4
- package/dist/theme/useToken.d.ts +2 -2
- package/dist/theme/useToken.js +1 -1
- package/dist/theme/util/genStyleUtils.d.ts +2 -2
- package/dist/theme/util/useResetIconStyle.js +1 -1
- package/dist/time-picker/index.d.ts +8 -7
- package/dist/time-picker/index.js +17 -13
- package/dist/timeline/Timeline.d.ts +3 -3
- package/dist/tooltip/PurePanel.d.ts +2 -2
- package/dist/tooltip/PurePanel.js +10 -6
- package/dist/tooltip/UniqueProvider/index.d.ts +2 -2
- package/dist/tooltip/index.d.ts +3 -3
- package/dist/tour/PurePanel.js +243 -0
- package/dist/tour/index.d.ts +3 -3
- package/dist/tour/index.js +2 -0
- package/dist/transfer/Actions.d.ts +2 -2
- package/dist/transfer/Section.d.ts +2 -2
- package/dist/transfer/Transfer.d.ts +3 -3
- package/dist/transfer/Transfer.js +1 -1
- package/dist/transfer/search.d.ts +3 -3
- package/dist/tree/DirectoryTree.d.ts +3 -3
- package/dist/tree/Tree.d.ts +3 -3
- package/dist/tree/style/index.d.ts +1 -1
- package/dist/tree-select/index.d.ts +5 -4
- package/dist/tree-select/index.js +2 -0
- package/dist/typography/Paragraph.d.ts +3 -3
- package/dist/typography/Text.d.ts +3 -3
- package/dist/typography/Title.d.ts +3 -3
- package/dist/typography/Typography.d.ts +3 -3
- package/dist/typography/index.d.ts +9 -9
- package/dist/upload/Dragger.d.ts +3 -3
- package/dist/upload/Upload.d.ts +3 -3
- package/dist/upload/Upload.js +15 -1
- package/dist/upload/index.d.ts +3 -3
- package/dist/upload/interface.d.ts +4 -4
- package/dist/watermark/index.d.ts +2 -2
- package/global.d.ts +1 -0
- package/package.json +49 -15
- package/web-tags.json +2452 -1907
- package/web-types.json +7148 -5592
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { useBaseConfig } from "../config-provider/context.js";
|
|
2
|
+
import config_provider_default from "../config-provider/index.js";
|
|
3
|
+
import { createVNode, defineComponent, mergeProps, shallowRef, useAttrs, useSlots, watch } from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/_util/PurePanel.tsx
|
|
6
|
+
function withPureRenderTheme(Component$1) {
|
|
7
|
+
return (props) => {
|
|
8
|
+
const slots = useSlots();
|
|
9
|
+
const attrs = useAttrs();
|
|
10
|
+
return createVNode(config_provider_default, { "theme": { token: {
|
|
11
|
+
motion: false,
|
|
12
|
+
zIndexPopupBase: 0
|
|
13
|
+
} } }, { default: () => [createVNode(Component$1, {
|
|
14
|
+
...props,
|
|
15
|
+
...attrs
|
|
16
|
+
}, slots)] });
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/* istanbul ignore next */
|
|
20
|
+
function genPurePanel(Component$1, alignPropName, postProps, defaultPrefixCls, getDropdownCls) {
|
|
21
|
+
return withPureRenderTheme(/* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
22
|
+
const holderRef = shallowRef();
|
|
23
|
+
const popupHeight = shallowRef(0);
|
|
24
|
+
const popupWidth = shallowRef(0);
|
|
25
|
+
const open = shallowRef(props?.open ?? false);
|
|
26
|
+
const setOpen = (value) => {
|
|
27
|
+
if (props.open !== void 0) return;
|
|
28
|
+
open.value = value;
|
|
29
|
+
};
|
|
30
|
+
watch(() => props.open, () => {
|
|
31
|
+
open.value = props.open ?? false;
|
|
32
|
+
});
|
|
33
|
+
const { prefixCls } = useBaseConfig(defaultPrefixCls ?? "select", props);
|
|
34
|
+
watch(prefixCls, (_, _o, onCleanup) => {
|
|
35
|
+
setOpen(true);
|
|
36
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
37
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
38
|
+
const element = entries[0].target;
|
|
39
|
+
popupHeight.value = element.offsetHeight + 8;
|
|
40
|
+
popupWidth.value = element.offsetWidth;
|
|
41
|
+
});
|
|
42
|
+
const interval = setInterval(() => {
|
|
43
|
+
const dropdownCls = getDropdownCls ? `.${getDropdownCls(prefixCls.value)}` : `.${prefixCls.value}-dropdown`;
|
|
44
|
+
const popup = holderRef.value?.querySelector(dropdownCls);
|
|
45
|
+
if (popup) {
|
|
46
|
+
clearInterval(interval);
|
|
47
|
+
resizeObserver.observe(popup);
|
|
48
|
+
}
|
|
49
|
+
}, 10);
|
|
50
|
+
onCleanup(() => {
|
|
51
|
+
clearInterval(interval);
|
|
52
|
+
resizeObserver.disconnect();
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
immediate: true,
|
|
57
|
+
flush: "post"
|
|
58
|
+
});
|
|
59
|
+
return () => {
|
|
60
|
+
const { style } = props;
|
|
61
|
+
let mergedProps = {
|
|
62
|
+
...props,
|
|
63
|
+
style: {
|
|
64
|
+
...style,
|
|
65
|
+
margin: 0
|
|
66
|
+
},
|
|
67
|
+
open: open.value,
|
|
68
|
+
getPopupContainer: () => holderRef.value
|
|
69
|
+
};
|
|
70
|
+
if (postProps) mergedProps = postProps(mergedProps);
|
|
71
|
+
if (alignPropName) Object.assign(mergedProps, { [alignPropName]: { overflow: {
|
|
72
|
+
adjustX: false,
|
|
73
|
+
adjustY: false
|
|
74
|
+
} } });
|
|
75
|
+
const mergedStyle = {
|
|
76
|
+
paddingBottom: `${popupHeight.value}px`,
|
|
77
|
+
position: "relative",
|
|
78
|
+
minWidth: `${popupWidth.value}px`
|
|
79
|
+
};
|
|
80
|
+
return createVNode("div", {
|
|
81
|
+
"ref": holderRef,
|
|
82
|
+
"style": mergedStyle
|
|
83
|
+
}, [createVNode(Component$1, mergeProps(attrs, mergedProps), slots)]);
|
|
84
|
+
};
|
|
85
|
+
}, { props: {
|
|
86
|
+
prefixCls: {
|
|
87
|
+
type: String,
|
|
88
|
+
required: false,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
91
|
+
style: {
|
|
92
|
+
type: Object,
|
|
93
|
+
required: false,
|
|
94
|
+
default: void 0
|
|
95
|
+
},
|
|
96
|
+
open: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
required: false,
|
|
99
|
+
default: void 0
|
|
100
|
+
}
|
|
101
|
+
} }));
|
|
102
|
+
}
|
|
103
|
+
var PurePanel_default = genPurePanel;
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
export { PurePanel_default as default, withPureRenderTheme };
|
|
@@ -104,10 +104,10 @@ function pureAttrs(attrs, options = defaultOptions) {
|
|
|
104
104
|
if (options.omit) return omit(newAttrs, options.omit);
|
|
105
105
|
return newAttrs;
|
|
106
106
|
}
|
|
107
|
-
function getAttrStyleAndClass(attrs, options) {
|
|
107
|
+
function getAttrStyleAndClass(attrs, options, props) {
|
|
108
108
|
return {
|
|
109
|
-
className: attrs.class,
|
|
110
|
-
style: attrs.style,
|
|
109
|
+
className: attrs.class ?? props?.class,
|
|
110
|
+
style: attrs.style ?? props?.style,
|
|
111
111
|
restAttrs: pureAttrs(attrs, options)
|
|
112
112
|
};
|
|
113
113
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/_util/styleUtils.ts
|
|
2
|
+
function formatUnit(value) {
|
|
3
|
+
if (value === void 0 || value === null) return;
|
|
4
|
+
if (typeof value === "number") return `${value}px`;
|
|
5
|
+
if (typeof value === "string" && !value.endsWith("px") && !Number.isNaN(Number(value))) return `${value}px`;
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { formatUnit };
|
package/dist/alert/Alert.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMe
|
|
|
3
3
|
import "../_util/hooks/index.js";
|
|
4
4
|
import { ClosableType } from "../_util/hooks/useClosable.js";
|
|
5
5
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
6
|
-
import * as
|
|
6
|
+
import * as vue222 from "vue";
|
|
7
7
|
import { SlotsType } from "vue";
|
|
8
8
|
|
|
9
9
|
//#region src/alert/Alert.d.ts
|
|
@@ -53,8 +53,8 @@ interface AlertEmits {
|
|
|
53
53
|
click: (e: any) => any;
|
|
54
54
|
[key: string]: (e: any) => any;
|
|
55
55
|
}
|
|
56
|
-
declare const Alert:
|
|
56
|
+
declare const Alert: vue222.DefineSetupFnComponent<AlertProps, AlertEmits, SlotsType<AlertSlots>, AlertProps & {
|
|
57
57
|
[x: `on${Capitalize<string>}`]: ((e: any) => any) | undefined;
|
|
58
|
-
},
|
|
58
|
+
}, vue222.PublicProps>;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { Alert, AlertEmits, AlertProps, AlertSlots };
|
package/dist/anchor/Anchor.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import "../_util/hooks/index.js";
|
|
|
4
4
|
import { AnchorLinkBaseProps } from "./AnchorLink.js";
|
|
5
5
|
import { ComponentBaseProps } from "../config-provider/context.js";
|
|
6
6
|
import { AffixProps } from "../affix/index.js";
|
|
7
|
-
import * as
|
|
7
|
+
import * as vue338 from "vue";
|
|
8
8
|
import { SlotsType, VNodeChild } from "vue";
|
|
9
9
|
import { Key } from "@v-c/util/dist/type";
|
|
10
10
|
|
|
@@ -45,8 +45,8 @@ interface AnchorEmits {
|
|
|
45
45
|
type AnchorSlots = SlotsDefineType<{
|
|
46
46
|
item: (item: AnchorLinkItemProps) => any;
|
|
47
47
|
}>;
|
|
48
|
-
declare const Anchor:
|
|
48
|
+
declare const Anchor: vue338.DefineSetupFnComponent<AnchorProps, AnchorEmits, SlotsType<AnchorSlots>, AnchorProps & {
|
|
49
49
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
50
|
-
},
|
|
50
|
+
}, vue338.PublicProps>;
|
|
51
51
|
//#endregion
|
|
52
52
|
export { Anchor, AnchorEmits, AnchorProps, AnchorSlots };
|