antdv-next 1.0.0-beta.2 → 1.0.0-rc.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.mjs +4 -4
- package/dist/_util/hooks/useClosable.d.mts +0 -1
- package/dist/_util/hooks/useClosable.mjs +1 -1
- package/dist/_util/hooks/useMergeSemantic.d.mts +2 -3
- package/dist/_util/hooks/useMergeSemantic.mjs +9 -9
- package/dist/_util/tools.mjs +1 -1
- package/dist/_util/warning.d.mts +0 -1
- package/dist/affix/index.d.mts +3 -3
- package/dist/alert/Alert.d.mts +24 -7
- package/dist/alert/Alert.mjs +91 -28
- package/dist/anchor/Anchor.d.mts +18 -7
- package/dist/antd.css +1 -1
- package/dist/antd.js +101 -112
- package/dist/app/App.d.mts +2 -2
- package/dist/app/App.mjs +2 -2
- package/dist/auto-complete/index.d.mts +23 -11
- package/dist/auto-complete/index.mjs +1 -1
- package/dist/avatar/Avatar.d.mts +3 -3
- package/dist/avatar/AvatarGroup.d.mts +2 -2
- package/dist/avatar/style/index.mjs +2 -2
- package/dist/badge/Ribbon.d.mts +18 -2
- package/dist/badge/Ribbon.mjs +44 -23
- package/dist/badge/SingleNumber.mjs +2 -1
- package/dist/badge/index.d.mts +14 -7
- package/dist/badge/style/ribbon.mjs +1 -1
- package/dist/breadcrumb/Breadcrumb.d.mts +17 -6
- package/dist/breadcrumb/Breadcrumb.mjs +18 -3
- package/dist/breadcrumb/BreadcrumbItem.d.mts +1 -0
- package/dist/breadcrumb/BreadcrumbItem.mjs +29 -4
- package/dist/breadcrumb/style/index.mjs +5 -5
- package/dist/button/Button.d.mts +18 -10
- package/dist/button/buttonHelper.d.mts +0 -1
- package/dist/button/index.d.mts +1 -1
- package/dist/button/style/compact.mjs +28 -19
- package/dist/button/style/token.d.mts +0 -5
- package/dist/button/style/variant.mjs +27 -3
- package/dist/calendar/generateCalendar.d.mts +20 -7
- package/dist/calendar/generateCalendar.mjs +1 -1
- package/dist/calendar/index.d.mts +3 -3
- package/dist/card/Card.d.mts +23 -6
- package/dist/card/CardGrid.d.mts +2 -2
- package/dist/card/CardMeta.d.mts +20 -7
- package/dist/cascader/index.d.mts +28 -7
- package/dist/checkbox/Checkbox.d.mts +16 -7
- package/dist/checkbox/Checkbox.mjs +1 -1
- package/dist/checkbox/Group.d.mts +4 -3
- package/dist/checkbox/Group.mjs +11 -2
- package/dist/collapse/Collapse.d.mts +19 -6
- package/dist/collapse/Collapse.mjs +1 -1
- package/dist/color-picker/ColorPicker.d.mts +3 -3
- package/dist/color-picker/interface.d.mts +15 -7
- package/dist/color-picker/style/input.mjs +2 -0
- package/dist/components.d.mts +2 -3
- package/dist/config-provider/context.d.mts +58 -12
- package/dist/config-provider/context.mjs +3 -3
- package/dist/config-provider/define.d.mts +7 -1
- package/dist/config-provider/index.d.mts +3 -4
- package/dist/config-provider/index.mjs +82 -8
- package/dist/date-picker/generatePicker/index.d.mts +15 -15
- package/dist/date-picker/generatePicker/interface.d.mts +37 -10
- package/dist/date-picker/hooks/useMergedPickerSemantic.mjs +2 -2
- package/dist/date-picker/index.d.mts +25 -25
- package/dist/descriptions/Cell.mjs +5 -5
- package/dist/descriptions/DescriptionsContext.d.mts +13 -0
- package/dist/descriptions/Item.d.mts +3 -3
- package/dist/descriptions/hooks/useRow.mjs +7 -7
- package/dist/descriptions/index.d.mts +22 -7
- package/dist/divider/index.d.mts +15 -5
- package/dist/drawer/DrawerPanel.d.mts +28 -3
- package/dist/drawer/DrawerPanel.mjs +3 -3
- package/dist/drawer/index.d.mts +4 -4
- package/dist/drawer/index.mjs +4 -0
- package/dist/drawer/style/index.mjs +9 -2
- package/dist/dropdown/dropdown.d.mts +20 -7
- package/dist/empty/index.d.mts +18 -7
- package/dist/flex/index.d.mts +3 -3
- package/dist/float-button/FloatButton.d.mts +3 -4
- package/dist/float-button/FloatButtonGroup.d.mts +22 -3
- package/dist/form/Form.d.mts +16 -7
- package/dist/form/FormItem/index.d.mts +3 -3
- package/dist/form/FormItem/index.mjs +1 -1
- package/dist/form/FormItemInput.d.mts +0 -1
- package/dist/image/PreviewGroup.d.mts +3 -5
- package/dist/image/index.d.mts +34 -14
- package/dist/index.d.mts +3 -4
- package/dist/input/Input.d.mts +17 -4
- package/dist/input/Input.mjs +2 -2
- package/dist/input/OTP/index.d.mts +13 -4
- package/dist/input/Password.mjs +3 -3
- package/dist/input/Search.d.mts +21 -9
- package/dist/input/TextArea.d.mts +16 -7
- package/dist/input/TextArea.mjs +2 -2
- package/dist/input/index.d.mts +11 -11
- package/dist/input/style/index.mjs +5 -2
- package/dist/input/style/variants.mjs +2 -1
- package/dist/input-number/index.d.mts +20 -7
- package/dist/layout/index.d.mts +6 -6
- package/dist/layout/layout.d.mts +0 -1
- package/dist/locale/index.d.mts +0 -1
- package/dist/masonry/Masonry.d.mts +14 -7
- package/dist/masonry/MasonryItem.mjs +2 -2
- package/dist/mentions/index.d.mts +18 -7
- package/dist/mentions/index.mjs +2 -2
- package/dist/mentions/style/index.mjs +2 -2
- package/dist/menu/MenuContext.d.mts +0 -1
- package/dist/menu/MenuDivider.d.mts +2 -2
- package/dist/menu/MenuItem.d.mts +3 -3
- package/dist/menu/MenuItem.mjs +4 -3
- package/dist/menu/SubMenu.d.mts +3 -3
- package/dist/menu/SubMenu.mjs +5 -0
- package/dist/menu/index.d.mts +5 -5
- package/dist/menu/menu.d.mts +42 -10
- package/dist/menu/menu.mjs +2 -2
- package/dist/menu/style/index.d.mts +1 -1
- package/dist/menu/style/vertical.mjs +1 -1
- package/dist/message/PurePanel.d.mts +5 -7
- package/dist/message/index.mjs +2 -2
- package/dist/message/interface.d.mts +20 -4
- package/dist/message/useMessage.d.mts +0 -1
- package/dist/modal/Modal.d.mts +3 -3
- package/dist/modal/confirm.mjs +8 -4
- package/dist/modal/interface.d.mts +22 -3
- package/dist/modal/style/index.mjs +11 -8
- package/dist/notification/PurePanel.d.mts +8 -8
- package/dist/notification/index.mjs +2 -2
- package/dist/notification/interface.d.mts +18 -5
- package/dist/notification/style/index.mjs +8 -8
- package/dist/notification/useNotification.d.mts +2 -3
- package/dist/package.d.mts +4 -0
- package/dist/package.mjs +1 -1
- package/dist/pagination/Pagination.d.mts +3 -3
- package/dist/pagination/Pagination.mjs +11 -10
- package/dist/pagination/interface.d.mts +14 -5
- package/dist/pagination/style/bordered.mjs +2 -2
- package/dist/pagination/style/index.d.mts +10 -5
- package/dist/pagination/style/index.mjs +52 -103
- package/dist/popconfirm/PurePanel.d.mts +5 -7
- package/dist/popconfirm/index.d.mts +8 -6
- package/dist/popconfirm/index.mjs +7 -3
- package/dist/popover/index.d.mts +16 -9
- package/dist/popover/index.mjs +8 -5
- package/dist/progress/Line.mjs +3 -3
- package/dist/progress/progress.d.mts +20 -7
- package/dist/qrcode/index.d.mts +3 -3
- package/dist/qrcode/index.mjs +2 -1
- package/dist/qrcode/interface.d.mts +11 -3
- package/dist/radio/group.mjs +3 -3
- package/dist/radio/index.d.mts +5 -5
- package/dist/radio/interface.d.mts +13 -3
- package/dist/radio/radio.d.mts +3 -3
- package/dist/radio/radio.mjs +1 -1
- package/dist/rate/index.d.mts +3 -3
- package/dist/result/index.d.mts +22 -7
- package/dist/result/index.mjs +11 -6
- package/dist/result/noFound.d.mts +2 -2
- package/dist/result/serverError.d.mts +2 -2
- package/dist/result/unauthorized.d.mts +2 -2
- package/dist/segmented/index.d.mts +18 -7
- package/dist/select/index.d.mts +48 -20
- package/dist/skeleton/Avatar.d.mts +2 -2
- package/dist/skeleton/Button.d.mts +2 -2
- package/dist/skeleton/Image.d.mts +2 -2
- package/dist/skeleton/Input.d.mts +2 -2
- package/dist/skeleton/Node.d.mts +3 -3
- package/dist/skeleton/Skeleton.d.mts +22 -7
- package/dist/slider/index.d.mts +19 -6
- package/dist/slider/index.mjs +4 -4
- package/dist/space/index.d.mts +18 -9
- package/dist/spin/Indicator/Progress.mjs +3 -3
- package/dist/spin/index.d.mts +19 -6
- package/dist/splitter/SplitBar.mjs +12 -12
- package/dist/splitter/Splitter.d.mts +3 -3
- package/dist/splitter/Splitter.mjs +1 -1
- package/dist/splitter/hooks/useItems.mjs +2 -2
- package/dist/splitter/hooks/useResizable.mjs +5 -5
- package/dist/splitter/hooks/useResize.mjs +2 -2
- package/dist/splitter/index.d.mts +2 -2
- package/dist/splitter/interface.d.mts +21 -7
- package/dist/splitter/style/index.mjs +2 -28
- package/dist/statistic/Statistic.d.mts +21 -6
- package/dist/statistic/Statistic.mjs +1 -1
- package/dist/statistic/Timer.d.mts +5 -5
- package/dist/statistic/index.d.mts +5 -5
- package/dist/steps/context.mjs +5 -2
- package/dist/steps/index.d.mts +31 -9
- package/dist/steps/index.mjs +3 -3
- package/dist/style/motion/fade.mjs +25 -0
- package/dist/switch/index.d.mts +14 -7
- package/dist/switch/index.mjs +2 -2
- package/dist/table/Column.d.mts +3 -3
- package/dist/table/ColumnGroup.d.mts +3 -3
- package/dist/table/InternalTable.d.mts +35 -13
- package/dist/table/InternalTable.mjs +12 -6
- package/dist/table/Table.d.mts +3 -3
- package/dist/table/TableMeasureRowContext.mjs +20 -0
- package/dist/table/hooks/useFilter/FilterDropdown.mjs +17 -12
- package/dist/table/hooks/useSelection.mjs +1 -1
- package/dist/table/interface.d.mts +1 -2
- package/dist/table/style/virtual.mjs +1 -1
- package/dist/tabs/TabPane.d.mts +3 -3
- package/dist/tabs/index.d.mts +27 -11
- package/dist/tabs/index.mjs +5 -5
- package/dist/tag/CheckableTag.d.mts +3 -3
- package/dist/tag/CheckableTagGroup.d.mts +3 -3
- package/dist/tag/index.d.mts +16 -7
- package/dist/tag/index.mjs +1 -1
- package/dist/tag/style/index.mjs +1 -1
- package/dist/theme/index.d.mts +1 -2
- package/dist/theme/interface/maps/index.d.mts +0 -1
- package/dist/theme/useToken.mjs +3 -3
- package/dist/theme/util/genStyleUtils.mjs +3 -2
- package/dist/time-picker/index.d.mts +38 -14
- package/dist/time-picker/index.mjs +1 -1
- package/dist/timeline/Timeline.d.mts +49 -14
- package/dist/timeline/Timeline.mjs +82 -11
- package/dist/timeline/index.d.mts +1 -2
- package/dist/timeline/style/horizontal.mjs +73 -0
- package/dist/timeline/style/index.d.mts +10 -5
- package/dist/timeline/style/index.mjs +93 -137
- package/dist/timeline/useItems.mjs +52 -0
- package/dist/tooltip/PurePanel.d.mts +2 -2
- package/dist/tooltip/UniqueProvider/index.d.mts +2 -2
- package/dist/tooltip/index.d.mts +17 -8
- package/dist/tooltip/index.mjs +11 -3
- package/dist/tooltip/style/index.d.mts +7 -1
- package/dist/tooltip/style/index.mjs +3 -2
- package/dist/tour/index.d.mts +3 -3
- package/dist/tour/index.mjs +1 -1
- package/dist/tour/interface.d.mts +29 -3
- package/dist/transfer/Actions.d.mts +2 -2
- package/dist/transfer/ListItem.mjs +4 -4
- package/dist/transfer/Section.d.mts +2 -2
- package/dist/transfer/Transfer.d.mts +3 -3
- package/dist/transfer/Transfer.mjs +4 -4
- package/dist/transfer/index.d.mts +1 -1
- package/dist/transfer/interface.d.mts +32 -7
- package/dist/transfer/search.d.mts +3 -3
- package/dist/tree/DirectoryTree.d.mts +3 -3
- package/dist/tree/Tree.d.mts +18 -7
- package/dist/tree/index.d.mts +0 -1
- package/dist/tree-select/index.d.mts +41 -12
- package/dist/tree-select/style/index.d.mts +1 -1
- package/dist/typography/Editable.mjs +4 -4
- package/dist/typography/Link.d.mts +3 -3
- package/dist/typography/Paragraph.d.mts +3 -3
- package/dist/typography/Text.d.mts +3 -3
- package/dist/typography/Title.d.mts +3 -3
- package/dist/typography/Typography.d.mts +3 -3
- package/dist/typography/Typography.mjs +2 -12
- package/dist/typography/index.d.mts +9 -10
- package/dist/typography/interface.d.mts +0 -2
- package/dist/typography/style/mixins.mjs +3 -3
- package/dist/upload/Dragger.d.mts +3 -3
- package/dist/upload/Upload.d.mts +3 -4
- package/dist/upload/index.d.mts +3 -3
- package/dist/upload/interface.d.mts +13 -4
- package/dist/watermark/index.d.mts +2 -2
- package/dist/watermark/index.mjs +3 -3
- package/package.json +45 -41
- package/web-tags.json +1108 -1067
- package/web-types.json +3861 -4257
- package/dist/timeline/TimelineItem.d.mts +0 -20
- package/dist/timeline/TimelineItem.mjs +0 -115
- package/dist/timeline/TimelineItemList.mjs +0 -158
- /package/dist/{reset.css/reset.css → reset.css} +0 -0
package/dist/_util/PurePanel.mjs
CHANGED
|
@@ -3,21 +3,21 @@ import config_provider_default from "../config-provider/index.mjs";
|
|
|
3
3
|
import { createVNode, defineComponent, mergeProps, shallowRef, useAttrs, useSlots, watch } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/_util/PurePanel.tsx
|
|
6
|
-
function withPureRenderTheme(Component
|
|
6
|
+
function withPureRenderTheme(Component) {
|
|
7
7
|
return (props) => {
|
|
8
8
|
const slots = useSlots();
|
|
9
9
|
const attrs = useAttrs();
|
|
10
10
|
return createVNode(config_provider_default, { "theme": { token: {
|
|
11
11
|
motion: false,
|
|
12
12
|
zIndexPopupBase: 0
|
|
13
|
-
} } }, { default: () => [createVNode(Component
|
|
13
|
+
} } }, { default: () => [createVNode(Component, {
|
|
14
14
|
...props,
|
|
15
15
|
...attrs
|
|
16
16
|
}, slots)] });
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
/* istanbul ignore next */
|
|
20
|
-
function genPurePanel(Component
|
|
20
|
+
function genPurePanel(Component, alignPropName, postProps, defaultPrefixCls, getDropdownCls) {
|
|
21
21
|
return withPureRenderTheme(/* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
22
22
|
const holderRef = shallowRef();
|
|
23
23
|
const popupHeight = shallowRef(0);
|
|
@@ -80,7 +80,7 @@ function genPurePanel(Component$1, alignPropName, postProps, defaultPrefixCls, g
|
|
|
80
80
|
return createVNode("div", {
|
|
81
81
|
"ref": holderRef,
|
|
82
82
|
"style": mergedStyle
|
|
83
|
-
}, [createVNode(Component
|
|
83
|
+
}, [createVNode(Component, mergeProps(attrs, mergedProps), slots)]);
|
|
84
84
|
};
|
|
85
85
|
}, { props: {
|
|
86
86
|
prefixCls: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getSlotPropsFnRun } from "../tools.mjs";
|
|
2
|
-
import { getVNode } from "../vueNode.mjs";
|
|
3
2
|
import en_US_default from "../../locale/en_US.mjs";
|
|
4
3
|
import useLocale_default from "../../locale/useLocale.mjs";
|
|
4
|
+
import { getVNode } from "../vueNode.mjs";
|
|
5
5
|
import extendsObject_default from "../extendsObject.mjs";
|
|
6
6
|
import isNonNullable_default from "../isNonNullable.mjs";
|
|
7
7
|
import { computed, createVNode, isVNode, mergeProps, ref, unref } from "vue";
|
|
@@ -2,13 +2,12 @@ import { AnyObject, EmptyObject } from "../type.mjs";
|
|
|
2
2
|
import { CSSProperties, Ref } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/_util/hooks/useMergeSemantic.d.ts
|
|
5
|
-
|
|
6
5
|
type SemanticClassNames<Name extends string> = Partial<Record<Name, string>>;
|
|
7
6
|
type SemanticStyles<Name extends string> = Partial<Record<Name, CSSProperties>>;
|
|
8
7
|
type Resolvable<T, P extends AnyObject> = T | ((info: {
|
|
9
8
|
props: P;
|
|
10
9
|
}) => T);
|
|
11
|
-
type SemanticClassNamesType<Props extends AnyObject,
|
|
12
|
-
type SemanticStylesType<Props extends AnyObject,
|
|
10
|
+
type SemanticClassNamesType<Props extends AnyObject, SemanticClassNames extends { [K in keyof SemanticClassNames]?: string }, NestedStructure extends EmptyObject = EmptyObject> = Resolvable<Readonly<SemanticClassNames>, Props> & NestedStructure;
|
|
11
|
+
type SemanticStylesType<Props extends AnyObject, SemanticStyles extends { [K in keyof SemanticStyles]?: CSSProperties }, NestedStructure extends EmptyObject = EmptyObject> = Resolvable<Readonly<SemanticStyles>, Props> & NestedStructure;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { Resolvable, SemanticClassNames, SemanticClassNamesType, SemanticStyles, SemanticStylesType };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed, unref } from "vue";
|
|
2
|
-
import { classNames } from "@v-c/util";
|
|
2
|
+
import { classNames as classNames$1 } from "@v-c/util";
|
|
3
3
|
import { omit } from "es-toolkit";
|
|
4
4
|
|
|
5
5
|
//#region src/_util/hooks/useMergeSemantic.ts
|
|
6
|
-
function mergeClassNames(schema, ...classNames
|
|
6
|
+
function mergeClassNames(schema, ...classNames) {
|
|
7
7
|
const mergedSchema = schema || {};
|
|
8
|
-
return classNames
|
|
8
|
+
return classNames.filter(Boolean).reduce((acc, cur) => {
|
|
9
9
|
Object.keys(cur || {}).forEach((key) => {
|
|
10
10
|
const keySchema = mergedSchema[key];
|
|
11
11
|
const curVal = cur[key];
|
|
@@ -14,16 +14,16 @@ function mergeClassNames(schema, ...classNames$1) {
|
|
|
14
14
|
const { _default: defaultField } = keySchema;
|
|
15
15
|
if (defaultField) {
|
|
16
16
|
acc[key] = acc[key] || {};
|
|
17
|
-
acc[key][defaultField] = classNames(acc[key][defaultField], curVal);
|
|
17
|
+
acc[key][defaultField] = classNames$1(acc[key][defaultField], curVal);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
else acc[key] = classNames(acc[key], curVal);
|
|
20
|
+
else acc[key] = classNames$1(acc[key], curVal);
|
|
21
21
|
});
|
|
22
22
|
return acc;
|
|
23
23
|
}, {});
|
|
24
24
|
}
|
|
25
|
-
function useSemanticClassNames(schema, ...classNames
|
|
26
|
-
return mergeClassNames(schema, ...classNames
|
|
25
|
+
function useSemanticClassNames(schema, ...classNames) {
|
|
26
|
+
return mergeClassNames(schema, ...classNames);
|
|
27
27
|
}
|
|
28
28
|
function mergeStyles(...styles) {
|
|
29
29
|
return styles.filter(Boolean).reduce((acc, cur = {}) => {
|
|
@@ -63,7 +63,7 @@ function resolveStyleOrClass(value, info) {
|
|
|
63
63
|
*/
|
|
64
64
|
function useMergeSemantic(classNamesList, stylesList, info, schema) {
|
|
65
65
|
const resolvedClassNamesList = computed(() => {
|
|
66
|
-
return classNamesList.value.map((classNames
|
|
66
|
+
return classNamesList.value.map((classNames) => classNames ? resolveStyleOrClass(classNames, info.value) : void 0);
|
|
67
67
|
});
|
|
68
68
|
const resolvedStylesList = computed(() => {
|
|
69
69
|
return stylesList.value.map((styles) => styles ? resolveStyleOrClass(styles, info.value) : void 0);
|
|
@@ -77,7 +77,7 @@ function useMergeSemantic(classNamesList, stylesList, info, schema) {
|
|
|
77
77
|
return [computed(() => _merged.value[0]), computed(() => _merged.value[1])];
|
|
78
78
|
}
|
|
79
79
|
function useMergeSemanticNoRef(classNamesList, stylesList, info, schema) {
|
|
80
|
-
const resolvedClassNamesList = classNamesList.map((classNames
|
|
80
|
+
const resolvedClassNamesList = classNamesList.map((classNames) => classNames ? resolveStyleOrClass(classNames, info) : void 0);
|
|
81
81
|
const resolvedStylesList = stylesList.map((styles) => styles ? resolveStyleOrClass(styles, info) : void 0);
|
|
82
82
|
const mergedClassNames = useSemanticClassNames(schema, ...resolvedClassNamesList);
|
|
83
83
|
const mergedStyles = useSemanticStyles(...resolvedStylesList);
|
package/dist/_util/tools.mjs
CHANGED
|
@@ -14,7 +14,7 @@ function getSlotPropsFnRun(slots, props, key, isNull = true, params) {
|
|
|
14
14
|
let node = fn?.(params);
|
|
15
15
|
if (!Array.isArray(node)) node = [node];
|
|
16
16
|
if (node && node.length === 1 && node[0] === null) return null;
|
|
17
|
-
const nodes = filterEmpty(node).filter((node
|
|
17
|
+
const nodes = filterEmpty(node).filter((node) => node !== void 0 && node !== null);
|
|
18
18
|
if (nodes.length) {
|
|
19
19
|
if (nodes.length === 1) return nodes[0];
|
|
20
20
|
return nodes;
|
package/dist/_util/warning.d.mts
CHANGED
package/dist/affix/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue63 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/affix/index.d.ts
|
|
5
5
|
interface AffixProps extends ComponentBaseProps {
|
|
@@ -17,10 +17,10 @@ interface AffixEmits {
|
|
|
17
17
|
type InternalAffixProps = AffixProps & {
|
|
18
18
|
onTestUpdatePosition?: any;
|
|
19
19
|
};
|
|
20
|
-
declare const Affix:
|
|
20
|
+
declare const Affix: vue63.DefineSetupFnComponent<InternalAffixProps, AffixEmits, {}, AffixProps & {
|
|
21
21
|
onTestUpdatePosition?: any;
|
|
22
22
|
} & {
|
|
23
23
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
24
|
-
},
|
|
24
|
+
}, vue63.PublicProps>;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { Affix, AffixProps };
|
package/dist/alert/Alert.d.mts
CHANGED
|
@@ -3,13 +3,30 @@ import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMe
|
|
|
3
3
|
import "../_util/hooks/index.mjs";
|
|
4
4
|
import { ClosableType } from "../_util/hooks/useClosable.mjs";
|
|
5
5
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
6
|
-
import * as
|
|
7
|
-
import { SlotsType } from "vue";
|
|
6
|
+
import * as vue293 from "vue";
|
|
7
|
+
import { CSSProperties, SlotsType } from "vue";
|
|
8
8
|
|
|
9
9
|
//#region src/alert/Alert.d.ts
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
interface AlertSemanticClassNames {
|
|
11
|
+
root?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
section?: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
actions?: string;
|
|
17
|
+
close?: string;
|
|
18
|
+
}
|
|
19
|
+
interface AlertSemanticStyles {
|
|
20
|
+
root?: CSSProperties;
|
|
21
|
+
icon?: CSSProperties;
|
|
22
|
+
section?: CSSProperties;
|
|
23
|
+
title?: CSSProperties;
|
|
24
|
+
description?: CSSProperties;
|
|
25
|
+
actions?: CSSProperties;
|
|
26
|
+
close?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
type AlertClassNamesType = SemanticClassNamesType<AlertProps, AlertSemanticClassNames>;
|
|
29
|
+
type AlertStylesType = SemanticStylesType<AlertProps, AlertSemanticStyles>;
|
|
13
30
|
interface AlertProps extends ComponentBaseProps {
|
|
14
31
|
/** Type of Alert styles, options:`success`, `info`, `warning`, `error` */
|
|
15
32
|
type?: 'success' | 'info' | 'warning' | 'error';
|
|
@@ -53,8 +70,8 @@ interface AlertEmits {
|
|
|
53
70
|
click: (e: any) => any;
|
|
54
71
|
[key: string]: (e: any) => any;
|
|
55
72
|
}
|
|
56
|
-
declare const Alert:
|
|
73
|
+
declare const Alert: vue293.DefineSetupFnComponent<AlertProps, AlertEmits, SlotsType<AlertSlots>, AlertProps & {
|
|
57
74
|
[x: `on${Capitalize<string>}`]: ((e: any) => any) | undefined;
|
|
58
|
-
},
|
|
75
|
+
}, vue293.PublicProps>;
|
|
59
76
|
//#endregion
|
|
60
77
|
export { Alert, AlertEmits, AlertProps, AlertSlots };
|
package/dist/alert/Alert.mjs
CHANGED
|
@@ -2,34 +2,33 @@ import { useComponentBaseConfig } from "../config-provider/context.mjs";
|
|
|
2
2
|
import { pureAttrs, useMergeSemanticNoRef } from "../_util/hooks/useMergeSemantic.mjs";
|
|
3
3
|
import "../_util/hooks/index.mjs";
|
|
4
4
|
import { getSlotPropFn, getSlotPropsFnRun, toPropsRefs } from "../_util/tools.mjs";
|
|
5
|
-
import { replaceElement } from "../_util/vueNode.mjs";
|
|
6
5
|
import style_default from "./style/index.mjs";
|
|
7
6
|
import { Transition, computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
|
|
8
|
-
import { classNames } from "@v-c/util";
|
|
9
|
-
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
7
|
+
import { classNames, clsx } from "@v-c/util";
|
|
8
|
+
import { filterEmpty, getAttrStyleAndClass } from "@v-c/util/dist/props-util";
|
|
10
9
|
import { CheckCircleFilled, CloseCircleFilled, CloseOutlined, ExclamationCircleFilled, InfoCircleFilled } from "@antdv-next/icons";
|
|
11
10
|
|
|
12
11
|
//#region src/alert/Alert.tsx
|
|
13
|
-
const iconMapFilled = {
|
|
14
|
-
success: CheckCircleFilled,
|
|
15
|
-
info: InfoCircleFilled,
|
|
16
|
-
error: CloseCircleFilled,
|
|
17
|
-
warning: ExclamationCircleFilled
|
|
18
|
-
};
|
|
19
12
|
const alertDefaultProps = { showIcon: void 0 };
|
|
20
13
|
const IconNode = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
21
14
|
return () => {
|
|
22
|
-
const { type
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
const { type } = props;
|
|
16
|
+
const successIcon = getSlotPropsFnRun({}, props, "successIcon");
|
|
17
|
+
const icon = getSlotPropsFnRun({}, props, "icon");
|
|
18
|
+
const infoIcon = getSlotPropsFnRun({}, props, "infoIcon");
|
|
19
|
+
const warningIcon = getSlotPropsFnRun({}, props, "warningIcon");
|
|
20
|
+
const errorIcon = getSlotPropsFnRun({}, props, "errorIcon");
|
|
21
|
+
const { className, style } = getAttrStyleAndClass(attrs);
|
|
22
|
+
const iconMapFilled = {
|
|
23
|
+
success: successIcon ?? createVNode(CheckCircleFilled, null, null),
|
|
24
|
+
info: infoIcon ?? createVNode(InfoCircleFilled, null, null),
|
|
25
|
+
error: errorIcon ?? createVNode(CloseCircleFilled, null, null),
|
|
26
|
+
warning: warningIcon ?? createVNode(ExclamationCircleFilled, null, null)
|
|
27
|
+
};
|
|
28
|
+
return createVNode("span", {
|
|
29
|
+
"class": clsx(`${props.prefixCls}-icon`, className),
|
|
30
|
+
"style": style
|
|
31
|
+
}, [icon ?? iconMapFilled[type]]);
|
|
33
32
|
};
|
|
34
33
|
}, { props: {
|
|
35
34
|
type: {
|
|
@@ -65,18 +64,68 @@ const IconNode = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
|
65
64
|
],
|
|
66
65
|
required: true,
|
|
67
66
|
default: void 0
|
|
67
|
+
},
|
|
68
|
+
successIcon: {
|
|
69
|
+
type: [
|
|
70
|
+
Function,
|
|
71
|
+
Boolean,
|
|
72
|
+
String,
|
|
73
|
+
Number,
|
|
74
|
+
null,
|
|
75
|
+
Object
|
|
76
|
+
],
|
|
77
|
+
required: false,
|
|
78
|
+
default: void 0
|
|
79
|
+
},
|
|
80
|
+
infoIcon: {
|
|
81
|
+
type: [
|
|
82
|
+
Function,
|
|
83
|
+
Boolean,
|
|
84
|
+
String,
|
|
85
|
+
Number,
|
|
86
|
+
null,
|
|
87
|
+
Object
|
|
88
|
+
],
|
|
89
|
+
required: false,
|
|
90
|
+
default: void 0
|
|
91
|
+
},
|
|
92
|
+
warningIcon: {
|
|
93
|
+
type: [
|
|
94
|
+
Function,
|
|
95
|
+
Boolean,
|
|
96
|
+
String,
|
|
97
|
+
Number,
|
|
98
|
+
null,
|
|
99
|
+
Object
|
|
100
|
+
],
|
|
101
|
+
required: false,
|
|
102
|
+
default: void 0
|
|
103
|
+
},
|
|
104
|
+
errorIcon: {
|
|
105
|
+
type: [
|
|
106
|
+
Function,
|
|
107
|
+
Boolean,
|
|
108
|
+
String,
|
|
109
|
+
Number,
|
|
110
|
+
null,
|
|
111
|
+
Object
|
|
112
|
+
],
|
|
113
|
+
required: false,
|
|
114
|
+
default: void 0
|
|
68
115
|
}
|
|
69
116
|
} });
|
|
70
|
-
const CloseIconNode = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
117
|
+
const CloseIconNode = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
71
118
|
return () => {
|
|
72
119
|
const { isClosable, prefixCls, handleClose, ariaProps } = props;
|
|
120
|
+
const { className, style } = getAttrStyleAndClass(attrs);
|
|
73
121
|
const closeIcon = getSlotPropsFnRun(slots, props, "closeIcon");
|
|
74
122
|
const mergedCloseIcon = !closeIcon ? createVNode(CloseOutlined, null, null) : closeIcon;
|
|
75
123
|
return isClosable ? createVNode("button", mergeProps({
|
|
76
124
|
"type": "button",
|
|
77
125
|
"onClick": handleClose,
|
|
78
|
-
"class": `${prefixCls}-close-icon`,
|
|
79
|
-
"tabindex": 0
|
|
126
|
+
"class": clsx(`${prefixCls}-close-icon`, className),
|
|
127
|
+
"tabindex": 0,
|
|
128
|
+
"style": style
|
|
80
129
|
}, ariaProps), [mergedCloseIcon]) : null;
|
|
81
130
|
};
|
|
82
131
|
}, { props: {
|
|
@@ -114,7 +163,14 @@ const CloseIconNode = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
114
163
|
}
|
|
115
164
|
} });
|
|
116
165
|
const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
|
|
117
|
-
const { closable: contextClosable, closeIcon: contextCloseIcon, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, direction, prefixCls } = useComponentBaseConfig("alert", props, [
|
|
166
|
+
const { closable: contextClosable, closeIcon: contextCloseIcon, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, direction, prefixCls, successIcon, errorIcon, infoIcon, warningIcon } = useComponentBaseConfig("alert", props, [
|
|
167
|
+
"closable",
|
|
168
|
+
"closeIcon",
|
|
169
|
+
"successIcon",
|
|
170
|
+
"errorIcon",
|
|
171
|
+
"infoIcon",
|
|
172
|
+
"warningIcon"
|
|
173
|
+
]);
|
|
118
174
|
const { classes, styles } = toPropsRefs(props, "classes", "styles");
|
|
119
175
|
const closed = shallowRef(false);
|
|
120
176
|
const internalRef = shallowRef();
|
|
@@ -135,8 +191,9 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
135
191
|
};
|
|
136
192
|
return () => {
|
|
137
193
|
const { closable, banner, showIcon, rootClass } = props;
|
|
194
|
+
const { className, style } = getAttrStyleAndClass(attrs);
|
|
138
195
|
const isClosableFn = () => {
|
|
139
|
-
const closeIcon =
|
|
196
|
+
const closeIcon = getSlotPropsFnRun(slots, props, "closeIcon");
|
|
140
197
|
if (typeof closable === "object" && closable.closeIcon) return true;
|
|
141
198
|
if (typeof closable === "boolean") return closable;
|
|
142
199
|
const closeIconNode = typeof closeIcon === "function" ? filterEmpty(closeIcon()) : closeIcon;
|
|
@@ -165,7 +222,7 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
165
222
|
[`${prefixCls.value}-no-icon`]: !isShowIcon,
|
|
166
223
|
[`${prefixCls.value}-banner`]: !!banner,
|
|
167
224
|
[`${prefixCls.value}-rtl`]: direction.value === "rtl"
|
|
168
|
-
}, contextClassName.value,
|
|
225
|
+
}, contextClassName.value, className, rootClass, mergedClassNames.root, cssVarCls.value, hashId.value);
|
|
169
226
|
const mergedCloseIconFn = () => {
|
|
170
227
|
if (typeof closable === "object" && closable.closeIcon) return closable.closeIcon;
|
|
171
228
|
const closeIcon = getSlotPropFn(slots, props, "closeIcon");
|
|
@@ -200,7 +257,7 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
200
257
|
"style": [
|
|
201
258
|
mergedStyles.root,
|
|
202
259
|
contextStyle.value,
|
|
203
|
-
|
|
260
|
+
style
|
|
204
261
|
]
|
|
205
262
|
}, pureAttrs(attrs)), [
|
|
206
263
|
isShowIcon ? createVNode(IconNode, {
|
|
@@ -209,7 +266,11 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
209
266
|
"description": description,
|
|
210
267
|
"icon": props.icon,
|
|
211
268
|
"prefixCls": prefixCls.value,
|
|
212
|
-
"type": type.value
|
|
269
|
+
"type": type.value,
|
|
270
|
+
"successIcon": successIcon.value,
|
|
271
|
+
"infoIcon": infoIcon.value,
|
|
272
|
+
"warningIcon": warningIcon.value,
|
|
273
|
+
"errorIcon": errorIcon.value
|
|
213
274
|
}, null) : null,
|
|
214
275
|
createVNode("div", {
|
|
215
276
|
"class": [`${prefixCls.value}-section`, mergedClassNames.section],
|
|
@@ -226,6 +287,8 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
226
287
|
"style": mergedStyles.actions
|
|
227
288
|
}, [action]) : null,
|
|
228
289
|
createVNode(CloseIconNode, {
|
|
290
|
+
"class": mergedClassNames.close,
|
|
291
|
+
"style": mergedStyles.close,
|
|
229
292
|
"isClosable": isClosable,
|
|
230
293
|
"prefixCls": prefixCls.value,
|
|
231
294
|
"ariaProps": mergedAriaProps,
|
package/dist/anchor/Anchor.d.mts
CHANGED
|
@@ -4,8 +4,8 @@ import "../_util/hooks/index.mjs";
|
|
|
4
4
|
import { AnchorLinkBaseProps } from "./AnchorLink.mjs";
|
|
5
5
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
6
6
|
import { AffixProps } from "../affix/index.mjs";
|
|
7
|
-
import * as
|
|
8
|
-
import { SlotsType, VNodeChild } from "vue";
|
|
7
|
+
import * as vue227 from "vue";
|
|
8
|
+
import { CSSProperties, SlotsType, VNodeChild } from "vue";
|
|
9
9
|
import { Key } from "@v-c/util/dist/type";
|
|
10
10
|
|
|
11
11
|
//#region src/anchor/Anchor.d.ts
|
|
@@ -15,9 +15,20 @@ interface AnchorLinkItemProps extends AnchorLinkBaseProps {
|
|
|
15
15
|
children?: AnchorLinkItemProps[];
|
|
16
16
|
}
|
|
17
17
|
type AnchorDirection = 'vertical' | 'horizontal';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
interface AnchorSemanticClassNames {
|
|
19
|
+
root?: string;
|
|
20
|
+
item?: string;
|
|
21
|
+
itemTitle?: string;
|
|
22
|
+
indicator?: string;
|
|
23
|
+
}
|
|
24
|
+
interface AnchorSemanticStyles {
|
|
25
|
+
root?: CSSProperties;
|
|
26
|
+
item?: CSSProperties;
|
|
27
|
+
itemTitle?: CSSProperties;
|
|
28
|
+
indicator?: CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
type AnchorClassNamesType = SemanticClassNamesType<AnchorProps, AnchorSemanticClassNames>;
|
|
31
|
+
type AnchorStylesType = SemanticStylesType<AnchorProps, AnchorSemanticStyles>;
|
|
21
32
|
interface AnchorProps extends ComponentBaseProps {
|
|
22
33
|
classes?: AnchorClassNamesType;
|
|
23
34
|
styles?: AnchorStylesType;
|
|
@@ -45,8 +56,8 @@ interface AnchorEmits {
|
|
|
45
56
|
type AnchorSlots = SlotsDefineType<{
|
|
46
57
|
item: (item: AnchorLinkItemProps) => any;
|
|
47
58
|
}>;
|
|
48
|
-
declare const Anchor:
|
|
59
|
+
declare const Anchor: vue227.DefineSetupFnComponent<AnchorProps, AnchorEmits, SlotsType<AnchorSlots>, AnchorProps & {
|
|
49
60
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
50
|
-
},
|
|
61
|
+
}, vue227.PublicProps>;
|
|
51
62
|
//#endregion
|
|
52
63
|
export { Anchor, AnchorEmits, AnchorProps, AnchorSlots };
|