antdv-next 1.6.0 → 1.7.0
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/ContextIsolator.js +12 -3
- package/dist/_util/hooks/useAllowClear.d.ts +22 -6
- package/dist/_util/hooks/useAllowClear.js +24 -6
- package/dist/_util/hooks/useClosable.js +1 -1
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/tools.d.ts +3 -1
- package/dist/_util/tools.js +6 -1
- package/dist/_util/vueNode.d.ts +6 -2
- package/dist/alert/Alert.js +4 -1
- package/dist/alert/style/index.d.ts +3 -3
- package/dist/alert/style/index.js +3 -3
- package/dist/antd-with-locales.esm.js +16773 -15780
- package/dist/antd-with-locales.js +78 -78
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +14353 -14003
- package/dist/antd.js +80 -80
- package/dist/auto-complete/index.js +1 -0
- package/dist/avatar/Avatar.js +2 -4
- package/dist/avatar/AvatarContext.d.ts +2 -2
- package/dist/border-beam/BorderBeam.d.ts +8 -1
- package/dist/border-beam/BorderBeam.js +28 -14
- package/dist/border-beam/index.d.ts +2 -2
- package/dist/breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/card/style/index.js +2 -2
- package/dist/cascader/Panel.js +3 -3
- package/dist/cascader/index.js +12 -5
- package/dist/checkbox/Checkbox.js +6 -4
- package/dist/checkbox/Group.d.ts +19 -1
- package/dist/checkbox/Group.js +34 -5
- package/dist/checkbox/GroupContext.d.ts +3 -0
- package/dist/checkbox/index.d.ts +2 -2
- package/dist/color-picker/ColorPicker.js +1 -1
- package/dist/color-picker/style/input.js +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/date-picker/generatePicker/generateRangePicker.js +20 -2
- package/dist/date-picker/generatePicker/generateSinglePicker.js +20 -2
- package/dist/date-picker/generatePicker/interface.d.ts +4 -0
- package/dist/date-picker/style/panel.js +1 -1
- package/dist/date-picker/style/util.js +1 -1
- package/dist/date-picker/util.d.ts +2 -0
- package/dist/descriptions/hooks/useItems.d.ts +6 -6
- package/dist/descriptions/style/index.js +11 -13
- package/dist/divider/style/index.js +1 -1
- package/dist/drawer/DrawerPanel.js +1 -1
- package/dist/dropdown/dropdown.d.ts +2 -0
- package/dist/dropdown/dropdown.js +9 -2
- package/dist/dropdown/style/index.js +1 -1
- package/dist/form/ErrorList.js +1 -1
- package/dist/form/Form.js +1 -1
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.js +2 -2
- package/dist/form/FormItemInput.js +1 -1
- package/dist/form/FormItemLabel.js +1 -1
- package/dist/form/hooks/useVariant.js +1 -1
- package/dist/image/hooks/useMergedPreviewConfig.d.ts +1 -0
- package/dist/image/hooks/useMergedPreviewConfig.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/input/Group.js +1 -1
- package/dist/input/Input.d.ts +2 -1
- package/dist/input/Input.js +8 -5
- package/dist/input/OTP/OTPInput.d.ts +2 -1
- package/dist/input/OTP/OTPInput.js +12 -3
- package/dist/input/OTP/index.d.ts +3 -1
- package/dist/input/OTP/index.js +15 -6
- package/dist/input/Password.js +7 -5
- package/dist/input/Search.js +4 -2
- package/dist/input/TextArea.d.ts +3 -1
- package/dist/input/TextArea.js +13 -8
- package/dist/input/style/index.js +1 -1
- package/dist/input-number/index.d.ts +3 -6
- package/dist/input-number/index.js +8 -3
- package/dist/input-number/style/index.js +1 -5
- package/dist/listy/index.d.ts +1 -1
- package/dist/listy/index.js +9 -7
- package/dist/listy/interface.d.ts +6 -1
- package/dist/listy/style/index.js +4 -2
- package/dist/locale/ar_EG.js +9 -0
- package/dist/locale/az_AZ.js +9 -0
- package/dist/locale/bg_BG.js +9 -0
- package/dist/locale/bn_BD.js +9 -0
- package/dist/locale/by_BY.js +9 -0
- package/dist/locale/ca_ES.js +9 -0
- package/dist/locale/cs_CZ.js +9 -0
- package/dist/locale/da_DK.js +9 -0
- package/dist/locale/de_DE.js +9 -0
- package/dist/locale/el_GR.js +9 -0
- package/dist/locale/en_GB.js +11 -1
- package/dist/locale/en_US.js +11 -1
- package/dist/locale/es_ES.js +9 -0
- package/dist/locale/et_EE.js +9 -0
- package/dist/locale/eu_ES.js +9 -0
- package/dist/locale/fa_IR.js +9 -0
- package/dist/locale/fi_FI.js +10 -1
- package/dist/locale/fr_BE.js +9 -0
- package/dist/locale/fr_CA.js +9 -0
- package/dist/locale/fr_FR.js +9 -0
- package/dist/locale/ga_IE.js +9 -0
- package/dist/locale/gl_ES.js +9 -0
- package/dist/locale/he_IL.js +9 -0
- package/dist/locale/hi_IN.js +9 -0
- package/dist/locale/hr_HR.js +9 -0
- package/dist/locale/hu_HU.js +9 -0
- package/dist/locale/hy_AM.js +9 -0
- package/dist/locale/id_ID.js +9 -0
- package/dist/locale/index.d.ts +3 -0
- package/dist/locale/is_IS.js +9 -0
- package/dist/locale/it_IT.js +9 -0
- package/dist/locale/ja_JP.js +9 -0
- package/dist/locale/ka_GE.js +9 -0
- package/dist/locale/kk_KZ.js +9 -0
- package/dist/locale/km_KH.js +9 -0
- package/dist/locale/kmr_IQ.js +9 -0
- package/dist/locale/kn_IN.js +9 -0
- package/dist/locale/ko_KR.js +9 -0
- package/dist/locale/ku_IQ.js +9 -0
- package/dist/locale/lt_LT.js +9 -0
- package/dist/locale/lv_LV.js +9 -0
- package/dist/locale/mk_MK.js +9 -0
- package/dist/locale/ml_IN.js +9 -0
- package/dist/locale/mn_MN.js +9 -0
- package/dist/locale/mr_IN.js +9 -0
- package/dist/locale/ms_MY.js +9 -0
- package/dist/locale/my_MM.js +9 -0
- package/dist/locale/nb_NO.js +9 -0
- package/dist/locale/ne_NP.js +9 -0
- package/dist/locale/nl_BE.js +9 -0
- package/dist/locale/nl_NL.js +9 -0
- package/dist/locale/pl_PL.js +9 -0
- package/dist/locale/pt_BR.js +9 -0
- package/dist/locale/pt_PT.js +9 -0
- package/dist/locale/ro_RO.js +19 -10
- package/dist/locale/ru_RU.js +9 -0
- package/dist/locale/si_LK.js +9 -0
- package/dist/locale/sk_SK.js +9 -0
- package/dist/locale/sl_SI.js +9 -0
- package/dist/locale/sq_AL.js +9 -0
- package/dist/locale/sr_RS.js +9 -0
- package/dist/locale/sv_SE.js +9 -0
- package/dist/locale/ta_IN.js +10 -1
- package/dist/locale/th_TH.js +9 -0
- package/dist/locale/tk_TK.js +9 -0
- package/dist/locale/tr_TR.js +9 -0
- package/dist/locale/uk_UA.js +9 -0
- package/dist/locale/ur_PK.js +9 -0
- package/dist/locale/useLocale.d.ts +6 -1
- package/dist/locale/useLocale.js +12 -1
- package/dist/locale/uz_UZ.js +9 -0
- package/dist/locale/vi_VN.js +9 -0
- package/dist/locale/zh_CN.js +13 -3
- package/dist/locale/zh_HK.js +11 -1
- package/dist/locale/zh_TW.js +11 -1
- package/dist/masonry/Masonry.js +1 -1
- package/dist/mentions/index.d.ts +2 -3
- package/dist/mentions/index.js +9 -4
- package/dist/mentions/style/index.js +1 -1
- package/dist/menu/MenuContext.d.ts +2 -0
- package/dist/menu/MenuItem.js +23 -6
- package/dist/menu/index.js +5 -0
- package/dist/menu/menu.d.ts +3 -0
- package/dist/menu/menu.js +7 -0
- package/dist/modal/ConfirmDialog.js +14 -7
- package/dist/notification/PurePanel.js +7 -12
- package/dist/notification/interface.d.ts +8 -0
- package/dist/notification/style/index.js +1 -1
- package/dist/notification/style/placement.js +10 -7
- package/dist/notification/useNotification.js +5 -15
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +2 -2
- package/dist/pagination/useShowSizeChanger.d.ts +3 -0
- package/dist/pagination/useShowSizeChanger.js +1 -1
- package/dist/popconfirm/index.js +5 -5
- package/dist/popconfirm/style/index.js +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/popover/style/index.js +2 -2
- package/dist/progress/Circle.js +0 -8
- package/dist/progress/Line.js +1 -9
- package/dist/progress/Steps.js +0 -8
- package/dist/progress/progress.js +2 -14
- package/dist/qrcode/index.js +4 -4
- package/dist/radio/group.js +40 -7
- package/dist/radio/index.d.ts +2 -2
- package/dist/radio/interface.d.ts +19 -1
- package/dist/radio/radio.js +5 -3
- package/dist/result/index.js +3 -3
- package/dist/result/noFound.js +120 -140
- package/dist/result/serverError.js +132 -147
- package/dist/result/unauthorized.js +115 -129
- package/dist/segmented/index.js +1 -1
- package/dist/select/index.js +10 -3
- package/dist/select/style/dropdown.js +1 -1
- package/dist/select/style/index.js +2 -2
- package/dist/select/style/select-input-multiple.js +1 -1
- package/dist/select/usePopupRender.js +4 -1
- package/dist/slider/index.d.ts +0 -3
- package/dist/slider/index.js +2 -2
- package/dist/splitter/SplitBar.js +9 -3
- package/dist/splitter/interface.d.ts +5 -1
- package/dist/steps/style/index.js +1 -1
- package/dist/steps/style/inline.js +1 -1
- package/dist/style/motion/collapse.js +4 -10
- package/dist/table/ExpandIcon.d.ts +9 -4
- package/dist/table/ExpandIcon.js +42 -20
- package/dist/table/InternalTable.js +21 -15
- package/dist/table/hooks/useLazyKVMap.js +1 -1
- package/dist/table/hooks/useSelection.js +54 -9
- package/dist/table/interface.d.ts +8 -0
- package/dist/table/style/index.js +1 -1
- package/dist/table/style/sorter.js +2 -2
- package/dist/tabs/index.js +9 -2
- package/dist/tabs/style/index.js +1 -1
- package/dist/time-picker/index.js +34 -0
- package/dist/timeline/Timeline.js +1 -1
- package/dist/tooltip/style/index.js +1 -1
- package/dist/tour/panelRender.js +3 -2
- package/dist/transfer/Section.js +2 -1
- package/dist/transfer/Transfer.js +1 -1
- package/dist/tree/style/index.js +1 -1
- package/dist/tree-select/index.js +14 -8
- package/dist/typography/Base/index.js +23 -2
- package/dist/typography/Link.js +5 -0
- package/dist/typography/Paragraph.js +5 -0
- package/dist/typography/Text.js +5 -0
- package/dist/typography/Title.js +5 -0
- package/dist/typography/hooks/useMergedConfig.js +1 -1
- package/dist/typography/interface.d.ts +8 -1
- package/dist/typography/style/index.js +2 -1
- package/dist/typography/style/mixins.d.ts +2 -1
- package/dist/typography/style/mixins.js +26 -3
- package/dist/upload/Upload.d.ts +1 -0
- package/dist/upload/Upload.js +10 -3
- package/dist/upload/UploadList/ListItem.js +8 -3
- package/dist/upload/interface.d.ts +1 -0
- package/dist/version/token-meta.json +1 -1
- package/dist/version/token.json +1 -1
- package/dist/watermark/index.js +1 -1
- package/package.json +9 -9
- package/web-tags.json +74 -14
- package/web-types.json +186 -22
- package/dist/_util/getAllowClear.d.ts +0 -6
- package/dist/_util/getAllowClear.js +0 -11
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NoFormStyle } from "../form/context.js";
|
|
1
2
|
import { NoCompactStyle } from "../space/Compact.js";
|
|
2
3
|
import { createVNode, defineComponent, isVNode } from "vue";
|
|
3
4
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
@@ -11,12 +12,20 @@ const ContextIsolator = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
11
12
|
const children = filterEmpty(slots?.default?.());
|
|
12
13
|
if (children.length === 0) return null;
|
|
13
14
|
let result = children;
|
|
14
|
-
if (form) {
|
|
15
|
-
if (space) {
|
|
15
|
+
if (form) {
|
|
16
16
|
const _result = function() {
|
|
17
17
|
return result;
|
|
18
18
|
}();
|
|
19
|
-
result = createVNode(
|
|
19
|
+
result = createVNode(NoFormStyle, {
|
|
20
|
+
"override": true,
|
|
21
|
+
"status": true
|
|
22
|
+
}, _isSlot(result) ? result : { default: () => [_result] });
|
|
23
|
+
}
|
|
24
|
+
if (space) {
|
|
25
|
+
const _result2 = function() {
|
|
26
|
+
return result;
|
|
27
|
+
}();
|
|
28
|
+
result = createVNode(NoCompactStyle, null, _isSlot(result) ? result : { default: () => [_result2] });
|
|
20
29
|
}
|
|
21
30
|
return result;
|
|
22
31
|
};
|
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
//#region src/_util/hooks/useAllowClear.d.ts
|
|
2
|
-
interface
|
|
2
|
+
interface AllowClearConfig {
|
|
3
|
+
/** Custom clear icon */
|
|
3
4
|
clearIcon?: any;
|
|
5
|
+
/** Disable the clear button */
|
|
4
6
|
disabled?: boolean;
|
|
7
|
+
/** Tab order of the clear button. `-1` excludes it from Tab navigation */
|
|
8
|
+
tabIndex?: number;
|
|
9
|
+
/** Accessible name of the clear button */
|
|
10
|
+
label?: string;
|
|
5
11
|
}
|
|
6
|
-
type AllowClear = boolean |
|
|
12
|
+
type AllowClear = boolean | AllowClearConfig;
|
|
7
13
|
/** The hook never returns plain `true`: a truthy allowClear is normalized to the object form. */
|
|
8
|
-
type MergedAllowClear =
|
|
14
|
+
type MergedAllowClear = AllowClearConfig | false;
|
|
9
15
|
interface UseAllowClearOptions {
|
|
10
16
|
allowClear?: AllowClear;
|
|
11
17
|
clearIcon?: any;
|
|
12
18
|
contextAllowClear?: AllowClear;
|
|
13
19
|
contextClearIcon?: any;
|
|
14
20
|
defaultAllowClear?: boolean;
|
|
21
|
+
defaultLabel?: string;
|
|
15
22
|
}
|
|
16
|
-
/**
|
|
17
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Getter for the localized clear button label (`locale.global.clear`).
|
|
25
|
+
* Reads the locale context lazily so callers can use it inside their own `computed` without extra reactive objects.
|
|
26
|
+
*/
|
|
27
|
+
declare function useAllowClearLabel(): () => string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Merge component- and ConfigProvider-level `allowClear` / `clearIcon`.
|
|
30
|
+
* Each field is resolved on its own (priority: props → context → default), so `allowClear: true`
|
|
31
|
+
* inherits the global config while `disabled: false` / `tabIndex: 0` / `label: ''` still override it.
|
|
32
|
+
*/
|
|
33
|
+
declare function useAllowClear({ allowClear, clearIcon, contextAllowClear, contextClearIcon, defaultAllowClear, defaultLabel }: UseAllowClearOptions): MergedAllowClear;
|
|
18
34
|
//#endregion
|
|
19
|
-
export { AllowClear,
|
|
35
|
+
export { AllowClear, AllowClearConfig, MergedAllowClear, UseAllowClearOptions, useAllowClear as default, useAllowClearLabel };
|
|
@@ -1,16 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useLocaleContext } from "../../locale/index.js";
|
|
2
2
|
import fallbackProp from "../fallbackProp.js";
|
|
3
|
+
import { isPlainObject } from "../is.js";
|
|
4
|
+
import localeValues from "../../locale/en_US.js";
|
|
3
5
|
import { createVNode } from "vue";
|
|
4
6
|
import { CloseCircleFilled } from "@antdv-next/icons";
|
|
5
7
|
//#region src/_util/hooks/useAllowClear.tsx
|
|
6
8
|
/** The hook never returns plain `true`: a truthy allowClear is normalized to the object form. */
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Getter for the localized clear button label (`locale.global.clear`).
|
|
11
|
+
* Reads the locale context lazily so callers can use it inside their own `computed` without extra reactive objects.
|
|
12
|
+
*/
|
|
13
|
+
function useAllowClearLabel() {
|
|
14
|
+
const { locale } = useLocaleContext();
|
|
15
|
+
return () => locale.value?.global?.clear ?? localeValues.global?.clear;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Merge component- and ConfigProvider-level `allowClear` / `clearIcon`.
|
|
19
|
+
* Each field is resolved on its own (priority: props → context → default), so `allowClear: true`
|
|
20
|
+
* inherits the global config while `disabled: false` / `tabIndex: 0` / `label: ''` still override it.
|
|
21
|
+
*/
|
|
22
|
+
function useAllowClear({ allowClear, clearIcon, contextAllowClear, contextClearIcon, defaultAllowClear, defaultLabel }) {
|
|
9
23
|
if (!(allowClear ?? contextAllowClear ?? defaultAllowClear)) return false;
|
|
24
|
+
const config = isPlainObject(allowClear) ? allowClear : void 0;
|
|
25
|
+
const contextConfig = isPlainObject(contextAllowClear) ? contextAllowClear : void 0;
|
|
10
26
|
return {
|
|
11
|
-
clearIcon: fallbackProp(
|
|
12
|
-
disabled:
|
|
27
|
+
clearIcon: fallbackProp(config?.clearIcon, clearIcon, contextConfig?.clearIcon, contextClearIcon, createVNode(CloseCircleFilled, null, null)),
|
|
28
|
+
disabled: config?.disabled ?? contextConfig?.disabled,
|
|
29
|
+
tabIndex: config?.tabIndex ?? contextConfig?.tabIndex,
|
|
30
|
+
label: config?.label ?? contextConfig?.label ?? defaultLabel
|
|
13
31
|
};
|
|
14
32
|
}
|
|
15
33
|
//#endregion
|
|
16
|
-
export { useAllowClear as default };
|
|
34
|
+
export { useAllowClear as default, useAllowClearLabel };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getSlotPropsFnRun } from "../tools.js";
|
|
2
|
-
import isNonNullable from "../isNonNullable.js";
|
|
3
2
|
import localeValues from "../../locale/en_US.js";
|
|
4
3
|
import useLocale from "../../locale/useLocale.js";
|
|
5
4
|
import { getVNode } from "../vueNode.js";
|
|
6
5
|
import mergeProps$1 from "../extendsObject.js";
|
|
6
|
+
import isNonNullable from "../isNonNullable.js";
|
|
7
7
|
import { computed, createVNode, isVNode, mergeProps, ref, unref } from "vue";
|
|
8
8
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
9
9
|
import { CloseOutlined } from "@antdv-next/icons";
|
|
@@ -3,6 +3,6 @@ import { ValidateStatus } from "../form/FormItem/index.js";
|
|
|
3
3
|
declare const _InputStatuses: readonly ["warning", "error", "", "success", "validating"];
|
|
4
4
|
type InputStatus = (typeof _InputStatuses)[number];
|
|
5
5
|
declare function getStatusClassNames(prefixCls: string, status?: ValidateStatus, hasFeedback?: boolean): string;
|
|
6
|
-
declare function getMergedStatus(contextStatus?: ValidateStatus, customStatus?: InputStatus): "" | "
|
|
6
|
+
declare function getMergedStatus(contextStatus?: ValidateStatus, customStatus?: InputStatus): "" | "error" | "success" | "warning" | "validating" | undefined;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { InputStatus, getMergedStatus, getStatusClassNames };
|
package/dist/_util/tools.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { classNames } from "@v-c/util";
|
|
|
3
3
|
//#region src/_util/tools.d.ts
|
|
4
4
|
declare function getSlotPropFn(slots: any, props: any, key: string): any;
|
|
5
5
|
declare function getSlotPropsFnRun(slots: any, props: any, key: string, isNull?: boolean, params?: any): any;
|
|
6
|
+
/** Resolve a slot/prop render prop: slot first, empty slot (undefined / []) falls back to prop; explicit null is kept; function props are invoked, never leaked. */
|
|
7
|
+
declare function getSlotPropsFnRunWithFallback(slots: any, props: any, key: string, params?: any): any;
|
|
6
8
|
declare function toPropsRefs<T extends Record<string, any>, K extends keyof T>(obj: T, ...args: K[]): { [key in K]-?: Ref<T[key]>; };
|
|
7
9
|
/**
|
|
8
10
|
* 返回一个「稳定引用」的事件转发器,调用时实时读取组件当前 vnode 上的监听器。
|
|
@@ -19,4 +21,4 @@ declare function toPropsRefs<T extends Record<string, any>, K extends keyof T>(o
|
|
|
19
21
|
declare function useLiveListener<Args extends any[] = any[], R = any>(name: string): (...args: Args) => R | undefined;
|
|
20
22
|
declare const clsx: typeof classNames;
|
|
21
23
|
//#endregion
|
|
22
|
-
export { clsx, getSlotPropFn, getSlotPropsFnRun, toPropsRefs, useLiveListener };
|
|
24
|
+
export { clsx, getSlotPropFn, getSlotPropsFnRun, getSlotPropsFnRunWithFallback, toPropsRefs, useLiveListener };
|
package/dist/_util/tools.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import fallbackProp from "./fallbackProp.js";
|
|
1
2
|
import { getCurrentInstance, toHandlerKey, toRef } from "vue";
|
|
2
3
|
import { classNames } from "@v-c/util";
|
|
3
4
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
@@ -22,6 +23,10 @@ function getSlotPropsFnRun(slots, props, key, isNull = true, params) {
|
|
|
22
23
|
}
|
|
23
24
|
return fn;
|
|
24
25
|
}
|
|
26
|
+
/** Resolve a slot/prop render prop: slot first, empty slot (undefined / []) falls back to prop; explicit null is kept; function props are invoked, never leaked. */
|
|
27
|
+
function getSlotPropsFnRunWithFallback(slots, props, key, params) {
|
|
28
|
+
return fallbackProp(getSlotPropsFnRun(slots, {}, key, false, params), getSlotPropsFnRun({}, props, key, false, params));
|
|
29
|
+
}
|
|
25
30
|
function toPropsRefs(obj, ...args) {
|
|
26
31
|
const _res = {};
|
|
27
32
|
args.forEach((key) => {
|
|
@@ -58,4 +63,4 @@ function useLiveListener(name) {
|
|
|
58
63
|
}
|
|
59
64
|
const clsx = classNames;
|
|
60
65
|
//#endregion
|
|
61
|
-
export { clsx, getSlotPropFn, getSlotPropsFnRun, toPropsRefs, useLiveListener };
|
|
66
|
+
export { clsx, getSlotPropFn, getSlotPropsFnRun, getSlotPropsFnRunWithFallback, toPropsRefs, useLiveListener };
|
package/dist/_util/vueNode.d.ts
CHANGED
|
@@ -3,8 +3,12 @@ import { VNodeChild } from "vue";
|
|
|
3
3
|
import { isFragment } from "@v-c/util/dist/Children/isFragment";
|
|
4
4
|
//#region src/_util/vueNode.d.ts
|
|
5
5
|
type RenderProps = AnyObject | ((originProps: AnyObject) => AnyObject | undefined);
|
|
6
|
-
declare function replaceElement(element: VNodeChild, replacement: VNodeChild, props?: RenderProps):
|
|
7
|
-
|
|
6
|
+
declare function replaceElement(element: VNodeChild, replacement: VNodeChild, props?: RenderProps): string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}> | import("vue").VNodeArrayChildren | null;
|
|
9
|
+
declare function cloneElement(element: VNodeChild, props?: RenderProps): string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}> | import("vue").VNodeArrayChildren | null;
|
|
8
12
|
declare function getVNode(node: VueNode): VNodeChild;
|
|
9
13
|
declare function checkRenderNode(node: any): any;
|
|
10
14
|
declare function getTextByNode(node: any): any;
|
package/dist/alert/Alert.js
CHANGED
|
@@ -256,7 +256,10 @@ const Alert = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expo
|
|
|
256
256
|
"data-show": !closed.value,
|
|
257
257
|
"role": props.role || "alert",
|
|
258
258
|
"class": alertCls,
|
|
259
|
-
"style": [mergedStyles.root, style]
|
|
259
|
+
"style": [mergedStyles.root, style],
|
|
260
|
+
"onMouseenter": (e) => emit("mouseenter", e),
|
|
261
|
+
"onMouseleave": (e) => emit("mouseleave", e),
|
|
262
|
+
"onClick": (e) => emit("click", e)
|
|
260
263
|
}, pureAttrs(attrs)), [
|
|
261
264
|
isShowIcon ? createVNode(IconNode, {
|
|
262
265
|
"class": clsx(`${prefixCls.value}-icon`, mergedClassNames.icon),
|
|
@@ -9,10 +9,10 @@ import { CSSObject } from "@antdv-next/cssinjs";
|
|
|
9
9
|
//#region src/alert/style/index.d.ts
|
|
10
10
|
interface ComponentToken {
|
|
11
11
|
/**
|
|
12
|
-
* @desc
|
|
13
|
-
* @descEN Border radius of
|
|
12
|
+
* @desc 容器圆角
|
|
13
|
+
* @descEN Border radius of the container
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
containerBorderRadius: CSSProperties['borderRadius'];
|
|
16
16
|
/**
|
|
17
17
|
* @desc 默认内间距
|
|
18
18
|
* @descEN Default padding
|
|
@@ -10,7 +10,7 @@ function genAlertTypeStyle(bgColor, borderColor, iconColor, token, alertCls) {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
const genBaseStyle = (token) => {
|
|
13
|
-
const { componentCls, motionDurationSlow: duration, marginXS, marginSM, fontSize, fontSizeLG, lineHeight, motionEaseInOutCirc,
|
|
13
|
+
const { componentCls, motionDurationSlow: duration, marginXS, marginSM, fontSize, fontSizeLG, lineHeight, motionEaseInOutCirc, containerBorderRadius, withDescriptionIconSize, colorText, colorTextHeading, withDescriptionPadding, defaultPadding } = token;
|
|
14
14
|
return { [componentCls]: {
|
|
15
15
|
...resetComponent(token),
|
|
16
16
|
position: "relative",
|
|
@@ -18,7 +18,7 @@ const genBaseStyle = (token) => {
|
|
|
18
18
|
alignItems: "center",
|
|
19
19
|
padding: defaultPadding,
|
|
20
20
|
wordWrap: "break-word",
|
|
21
|
-
borderRadius,
|
|
21
|
+
borderRadius: containerBorderRadius,
|
|
22
22
|
[`&${componentCls}-rtl`]: { direction: "rtl" },
|
|
23
23
|
[`${componentCls}-section`]: {
|
|
24
24
|
flex: 1,
|
|
@@ -125,7 +125,7 @@ const genActionStyle = (token) => {
|
|
|
125
125
|
};
|
|
126
126
|
const prepareComponentToken = (token) => {
|
|
127
127
|
return {
|
|
128
|
-
|
|
128
|
+
containerBorderRadius: token.borderRadiusLG,
|
|
129
129
|
withDescriptionIconSize: token.fontSizeHeading3,
|
|
130
130
|
defaultPadding: `${token.paddingContentVerticalSM}px 12px`,
|
|
131
131
|
withDescriptionPadding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`
|