antdv-next 1.7.0 → 1.8.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/hooks/useMergeSemantic.js +2 -2
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/vueNode.d.ts +11 -1
- package/dist/_util/vueNode.js +17 -1
- package/dist/affix/index.js +12 -9
- package/dist/alert/Alert.js +10 -5
- package/dist/anchor/Anchor.js +11 -6
- package/dist/anchor/style/index.js +2 -3
- package/dist/antd-with-locales.esm.js +16938 -18716
- package/dist/antd-with-locales.js +79 -86
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +15197 -17143
- package/dist/antd.js +80 -87
- package/dist/auto-complete/index.d.ts +2 -0
- package/dist/auto-complete/index.js +28 -23
- package/dist/avatar/Avatar.js +1 -1
- package/dist/avatar/AvatarContext.d.ts +2 -2
- package/dist/avatar/AvatarGroup.js +3 -5
- package/dist/badge/style/ribbon.d.ts +1 -0
- package/dist/border-beam/style/index.d.ts +1 -0
- package/dist/breadcrumb/index.d.ts +8 -1
- package/dist/button/Button.js +31 -18
- package/dist/button/style/index.d.ts +1 -0
- package/dist/calendar/Header.js +4 -4
- package/dist/calendar/generateCalendar.d.ts +10 -10
- package/dist/calendar/index.d.ts +1 -1
- package/dist/card/Card.js +1 -1
- package/dist/card/index.d.ts +8 -1
- package/dist/card/style/index.js +3 -7
- package/dist/carousel/index.js +3 -3
- package/dist/cascader/hooks/useIcons.js +3 -2
- package/dist/cascader/index.d.ts +9 -1
- package/dist/cascader/index.js +42 -34
- package/dist/cascader/style/panel.d.ts +1 -0
- package/dist/checkbox/Checkbox.js +5 -2
- package/dist/checkbox/Group.js +6 -6
- package/dist/collapse/Collapse.js +2 -2
- package/dist/color-picker/ColorPicker.js +15 -2
- package/dist/color-picker/components/ColorSlider.js +2 -2
- package/dist/color-picker/interface.d.ts +3 -0
- package/dist/color-picker/style/input.js +6 -11
- package/dist/components.d.ts +24 -24
- package/dist/components.js +1 -2
- package/dist/config-provider/context.d.ts +16 -11
- package/dist/config-provider/define.d.ts +2 -1
- package/dist/config-provider/index.js +9 -0
- package/dist/date-picker/generatePicker/generateRangePicker.d.ts +2 -0
- package/dist/date-picker/generatePicker/generateRangePicker.js +23 -15
- package/dist/date-picker/generatePicker/generateSinglePicker.d.ts +2 -0
- package/dist/date-picker/generatePicker/generateSinglePicker.js +18 -14
- package/dist/date-picker/generatePicker/interface.d.ts +17 -5
- package/dist/date-picker/generatePicker/useComponents.d.ts +1 -14
- package/dist/date-picker/generatePicker/useSuffix.d.ts +12 -0
- package/dist/date-picker/generatePicker/useSuffix.js +11 -0
- package/dist/date-picker/style/index.d.ts +1 -0
- package/dist/date-picker/util.d.ts +1 -1
- package/dist/date-picker/util.js +4 -3
- package/dist/descriptions/hooks/useItems.d.ts +6 -6
- package/dist/descriptions/index.js +2 -2
- package/dist/divider/index.js +14 -4
- package/dist/drawer/index.js +2 -2
- package/dist/dropdown/dropdown.js +6 -6
- package/dist/dropdown/style/index.js +0 -6
- package/dist/empty/index.js +2 -1
- package/dist/empty/style/index.d.ts +1 -0
- package/dist/flex/index.js +2 -2
- package/dist/float-button/BackTop.js +2 -1
- package/dist/float-button/FloatButton.js +2 -2
- package/dist/float-button/FloatButtonGroup.js +2 -2
- package/dist/float-button/PurePanel.js +5 -5
- package/dist/form/Form.js +47 -16
- package/dist/form/FormItem/ItemHolder.d.ts +3 -18
- package/dist/form/FormItem/StatusProvider.js +2 -1
- package/dist/form/FormItem/index.d.ts +1 -0
- package/dist/form/FormItem/index.js +22 -9
- package/dist/form/FormItemInput.js +3 -4
- package/dist/form/FormItemLabel.js +8 -4
- package/dist/form/context.d.ts +3 -3
- package/dist/form/hooks/useVariant.d.ts +14 -4
- package/dist/form/hooks/useVariant.js +24 -13
- package/dist/form/interface.d.ts +4 -1
- package/dist/form/style/index.js +1 -1
- package/dist/grid/hooks/useBreakpoint.js +12 -6
- package/dist/image/PreviewGroup.d.ts +9 -2
- package/dist/image/PreviewGroup.js +2 -2
- package/dist/image/hooks/usePreviewConfig.d.ts +2 -2
- package/dist/image/index.d.ts +3 -3
- package/dist/image/index.js +3 -3
- package/dist/index.d.ts +26 -24
- package/dist/index.js +1 -2
- package/dist/input/Input.js +4 -4
- package/dist/input/OTP/OTPInput.js +31 -30
- package/dist/input/OTP/index.js +10 -2
- package/dist/input/Password.js +7 -3
- package/dist/input/Search.js +5 -5
- package/dist/input/TextArea.js +4 -4
- package/dist/input/style/index.js +2 -15
- package/dist/input/style/otp.d.ts +1 -0
- package/dist/input/style/search.d.ts +1 -0
- package/dist/input/style/textarea.d.ts +1 -0
- package/dist/input-number/index.js +3 -3
- package/dist/input-number/style/index.d.ts +1 -0
- package/dist/layout/Sider.js +2 -2
- package/dist/layout/style/sider.d.ts +1 -0
- package/dist/listy/interface.d.ts +23 -4
- package/dist/listy/style/index.js +1 -0
- package/dist/locale/ar_EG.js +3 -1
- package/dist/locale/az_AZ.js +3 -1
- package/dist/locale/bg_BG.js +3 -1
- package/dist/locale/bn_BD.js +3 -1
- package/dist/locale/by_BY.js +3 -1
- package/dist/locale/ca_ES.js +3 -1
- package/dist/locale/cs_CZ.js +13 -9
- package/dist/locale/da_DK.js +3 -1
- package/dist/locale/de_DE.js +6 -2
- package/dist/locale/el_GR.js +3 -1
- package/dist/locale/en_GB.js +3 -1
- package/dist/locale/en_US.js +5 -2
- package/dist/locale/es_ES.js +3 -1
- package/dist/locale/et_EE.js +3 -1
- package/dist/locale/eu_ES.js +3 -1
- package/dist/locale/fa_IR.js +3 -1
- package/dist/locale/fi_FI.js +3 -1
- package/dist/locale/fr_BE.js +3 -1
- package/dist/locale/fr_CA.js +3 -1
- package/dist/locale/fr_FR.js +6 -2
- package/dist/locale/ga_IE.js +3 -1
- package/dist/locale/gl_ES.js +3 -1
- package/dist/locale/he_IL.js +3 -1
- package/dist/locale/hi_IN.js +3 -1
- package/dist/locale/hr_HR.js +3 -1
- package/dist/locale/hu_HU.js +3 -1
- package/dist/locale/hy_AM.js +5 -13
- package/dist/locale/id_ID.js +3 -1
- package/dist/locale/index.d.ts +6 -0
- package/dist/locale/is_IS.js +3 -1
- package/dist/locale/it_IT.js +6 -2
- package/dist/locale/ja_JP.js +3 -1
- package/dist/locale/ka_GE.js +3 -1
- package/dist/locale/kk_KZ.js +3 -1
- package/dist/locale/km_KH.js +3 -1
- package/dist/locale/kmr_IQ.js +3 -1
- package/dist/locale/kn_IN.js +3 -1
- package/dist/locale/ko_KR.js +3 -1
- package/dist/locale/ku_IQ.js +3 -1
- package/dist/locale/lt_LT.js +3 -1
- package/dist/locale/lv_LV.js +3 -1
- package/dist/locale/mk_MK.js +3 -1
- package/dist/locale/ml_IN.js +3 -1
- package/dist/locale/mn_MN.js +3 -1
- package/dist/locale/mr_IN.js +3 -1
- package/dist/locale/ms_MY.js +3 -1
- package/dist/locale/my_MM.js +3 -1
- package/dist/locale/nb_NO.js +3 -1
- package/dist/locale/ne_NP.js +4 -2
- package/dist/locale/nl_BE.js +3 -1
- package/dist/locale/nl_NL.js +3 -1
- package/dist/locale/pl_PL.js +3 -1
- package/dist/locale/pt_BR.js +3 -1
- package/dist/locale/pt_PT.js +3 -1
- package/dist/locale/ro_RO.js +3 -1
- package/dist/locale/ru_RU.js +3 -1
- package/dist/locale/si_LK.js +3 -1
- package/dist/locale/sk_SK.js +3 -1
- package/dist/locale/sl_SI.js +3 -1
- package/dist/locale/sq_AL.js +5 -13
- package/dist/locale/sr_RS.js +3 -1
- package/dist/locale/sv_SE.js +3 -1
- package/dist/locale/ta_IN.js +3 -1
- package/dist/locale/th_TH.js +3 -1
- package/dist/locale/tk_TK.js +3 -1
- package/dist/locale/tr_TR.js +3 -1
- package/dist/locale/uk_UA.js +3 -1
- package/dist/locale/ur_PK.js +3 -1
- package/dist/locale/uz_UZ.js +3 -1
- package/dist/locale/vi_VN.js +3 -1
- package/dist/locale/zh_CN.js +5 -2
- package/dist/locale/zh_HK.js +3 -1
- package/dist/locale/zh_TW.js +3 -1
- package/dist/mentions/index.js +4 -4
- package/dist/menu/MenuItem.js +7 -7
- package/dist/menu/SubMenu.js +5 -4
- package/dist/menu/menu.js +2 -2
- package/dist/message/PurePanel.js +2 -2
- package/dist/message/style/index.d.ts +1 -0
- package/dist/message/style/index.js +2 -1
- package/dist/modal/Modal.js +5 -5
- package/dist/modal/PurePanel.js +2 -2
- package/dist/modal/style/confirm.js +1 -1
- package/dist/notification/PurePanel.js +2 -2
- package/dist/notification/style/index.d.ts +3 -0
- package/dist/notification/style/index.js +4 -5
- package/dist/notification/style/placement.js +3 -6
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +6 -5
- package/dist/pagination/index.d.ts +2 -1
- package/dist/pagination/interface.d.ts +2 -2
- package/dist/pagination/style/index.js +15 -7
- package/dist/popconfirm/index.js +4 -3
- package/dist/popover/PurePanel.js +2 -2
- package/dist/popover/style/index.js +1 -0
- package/dist/progress/Circle.js +3 -3
- package/dist/progress/Line.js +2 -1
- package/dist/progress/progress.js +1 -1
- package/dist/qrcode/QrcodeStatus.js +2 -1
- package/dist/qrcode/index.js +2 -2
- package/dist/qrcode/style/index.js +0 -4
- package/dist/radio/radio.js +2 -2
- package/dist/rate/index.js +2 -2
- package/dist/select/index.d.ts +11 -3
- package/dist/select/index.js +55 -38
- package/dist/select/style/index.d.ts +1 -0
- package/dist/select/useIcons.d.ts +23 -8
- package/dist/select/useIcons.js +34 -13
- package/dist/select/useShowArrow.d.ts +2 -3
- package/dist/select/useShowArrow.js +3 -5
- package/dist/skeleton/Paragraph.js +2 -2
- package/dist/skeleton/Skeleton.js +2 -2
- package/dist/skeleton/Title.js +2 -2
- package/dist/slider/index.d.ts +6 -1
- package/dist/slider/index.js +7 -5
- package/dist/space/Item.d.ts +1 -0
- package/dist/space/Item.js +6 -2
- package/dist/space/index.d.ts +1 -1
- package/dist/space/index.js +1 -0
- package/dist/space/style/addon.d.ts +1 -0
- package/dist/space/style/compact.d.ts +1 -0
- package/dist/space/style/index.js +8 -2
- package/dist/spin/Indicator/index.js +5 -1
- package/dist/splitter/SplitBar.js +2 -1
- package/dist/splitter/Splitter.js +10 -4
- package/dist/splitter/interface.d.ts +1 -0
- package/dist/statistic/Number.js +7 -1
- package/dist/statistic/Statistic.d.ts +3 -0
- package/dist/statistic/Statistic.js +2 -1
- package/dist/steps/index.js +16 -8
- package/dist/switch/index.js +10 -4
- package/dist/table/InternalTable.js +22 -7
- package/dist/table/hooks/useFilter/index.js +5 -2
- package/dist/table/hooks/usePagination.d.ts +2 -1
- package/dist/table/hooks/usePagination.js +6 -3
- package/dist/table/index.d.ts +2 -2
- package/dist/table/util.d.ts +1 -1
- package/dist/tabs/index.js +19 -11
- package/dist/tabs/style/index.js +2 -6
- package/dist/tag/index.d.ts +1 -1
- package/dist/tag/index.js +13 -5
- package/dist/theme/getDesignToken.js +2 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/time-picker/index.d.ts +16 -9
- package/dist/time-picker/index.js +31 -84
- package/dist/timeline/Timeline.js +16 -10
- package/dist/tooltip/PurePanel.js +2 -2
- package/dist/tooltip/index.js +3 -6
- package/dist/tooltip/style/index.js +1 -1
- package/dist/tour/index.js +2 -3
- package/dist/tour/panelRender.js +4 -4
- package/dist/transfer/Section.js +2 -2
- package/dist/tree/DirectoryTree.d.ts +19 -7
- package/dist/tree/DirectoryTree.js +2 -2
- package/dist/tree/Tree.d.ts +73 -58
- package/dist/tree/Tree.js +2 -2
- package/dist/tree/index.d.ts +8 -5
- package/dist/tree/index.js +4 -3
- package/dist/tree/style/index.js +6 -1
- package/dist/tree/utils/iconUtil.js +1 -1
- package/dist/tree-select/index.d.ts +32 -2
- package/dist/tree-select/index.js +75 -75
- package/dist/upload/Upload.js +2 -2
- package/dist/upload/utils.js +8 -3
- package/dist/version/token.json +1 -1
- package/dist/watermark/useWatermark.d.ts +1 -7
- package/dist/watermark/useWatermark.js +1 -7
- package/package.json +20 -20
- package/web-tags.json +85 -29
- package/web-types.json +242 -157
- package/dist/date-picker/generatePicker/SuffixIcon.d.ts +0 -12
- package/dist/date-picker/generatePicker/SuffixIcon.js +0 -51
- package/dist/form/style/fallbackCmp.d.ts +0 -14
- package/dist/form/style/fallbackCmp.js +0 -13
package/dist/tag/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ type TagClassNamesType = SemanticClassNamesType<TagProps, TagSemanticClassNames>
|
|
|
26
26
|
type TagStylesType = SemanticStylesType<TagProps, TagSemanticStyles>;
|
|
27
27
|
interface TagProps extends ComponentBaseProps, TagEmitsProps {
|
|
28
28
|
color?: LiteralUnion<PresetColorType | PresetStatusColorType>;
|
|
29
|
-
/**
|
|
29
|
+
/** Configure the close button and its accessibility attributes. */
|
|
30
30
|
closable?: ClosableType;
|
|
31
31
|
closeIcon?: VueNode;
|
|
32
32
|
icon?: VueNode;
|
package/dist/tag/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
|
3
3
|
import { pureAttrs, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
6
|
-
import
|
|
6
|
+
import useVariant from "../form/hooks/useVariant.js";
|
|
7
7
|
import wave_default from "../_util/wave/index.js";
|
|
8
8
|
import { replaceElement } from "../_util/vueNode.js";
|
|
9
9
|
import useClosable, { pickClosable } from "../_util/hooks/useClosable.js";
|
|
@@ -22,9 +22,17 @@ function _isSlot(s) {
|
|
|
22
22
|
}
|
|
23
23
|
const InternalTag = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expose }) => {
|
|
24
24
|
const configContext = useConfig();
|
|
25
|
-
const { prefixCls, direction, class: contextClassName,
|
|
25
|
+
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("tag", props);
|
|
26
26
|
const { variant, href, target, disabled: customDisabled, color, bordered, classes, styles } = toPropsRefs$1(props, "classes", "styles", "variant", "href", "target", "disabled", "color", "bordered");
|
|
27
27
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
28
|
+
const [contextVariant] = useVariant("tag", void 0, {
|
|
29
|
+
variants: [
|
|
30
|
+
"filled",
|
|
31
|
+
"solid",
|
|
32
|
+
"outlined"
|
|
33
|
+
],
|
|
34
|
+
defaultVariant: "filled"
|
|
35
|
+
});
|
|
28
36
|
const [mergedVariant, mergedColor, isPreset, isStatus, customTagStyle] = useColor({
|
|
29
37
|
bordered,
|
|
30
38
|
variant,
|
|
@@ -116,15 +124,15 @@ const InternalTag = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit
|
|
|
116
124
|
[`${prefixCls.value}-rtl`]: direction.value === "rtl",
|
|
117
125
|
[`${prefixCls.value}-disabled`]: mergedDisabled.value
|
|
118
126
|
}, attrs.class, props.rootClass, hashId.value, cssVarCls.value);
|
|
119
|
-
const children = filterEmpty(slots?.default?.())
|
|
120
|
-
const isNeedWave = children && children.type === "a" || typeof props.onClick === "function";
|
|
127
|
+
const children = filterEmpty(slots?.default?.());
|
|
128
|
+
const isNeedWave = children.length === 1 && children[0].type === "a" || typeof props.onClick === "function";
|
|
121
129
|
const iconNode = getSlotPropsFnRun(slots, props, "icon");
|
|
122
130
|
let iconNodes = iconNode;
|
|
123
131
|
if (iconNode) iconNodes = createVNode(iconNode, {
|
|
124
132
|
class: mergedClassNames.value?.icon,
|
|
125
133
|
style: mergedStyles.value?.icon
|
|
126
134
|
});
|
|
127
|
-
const kids = iconNodes ? createVNode(Fragment, null, [iconNodes,
|
|
135
|
+
const kids = iconNodes ? createVNode(Fragment, null, [iconNodes, children.length > 0 && createVNode("span", {
|
|
128
136
|
"class": mergedClassNames.value.content,
|
|
129
137
|
"style": mergedStyles.value.content
|
|
130
138
|
}, [children])]) : children;
|
|
@@ -4,7 +4,8 @@ import formatToken from "./util/alias.js";
|
|
|
4
4
|
import { createTheme, getComputedToken } from "@antdv-next/cssinjs";
|
|
5
5
|
//#region src/theme/getDesignToken.ts
|
|
6
6
|
function getDesignToken(config) {
|
|
7
|
-
const
|
|
7
|
+
const algorithm = config?.algorithm;
|
|
8
|
+
const theme = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
|
8
9
|
return getComputedToken({
|
|
9
10
|
...seedToken,
|
|
10
11
|
...config?.token
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { MapToken } from "./interface/maps/index.js";
|
|
|
3
3
|
import { AliasToken } from "./interface/alias.js";
|
|
4
4
|
import { GlobalToken } from "./interface/cssinjs-utils.js";
|
|
5
5
|
import { MappingAlgorithm } from "./interface/index.js";
|
|
6
|
+
import "./internal.js";
|
|
6
7
|
import getDesignToken from "./getDesignToken.js";
|
|
7
8
|
import derivative from "./themes/default/index.js";
|
|
8
9
|
//#region src/theme/index.d.ts
|
|
@@ -7,6 +7,7 @@ import { PickerProps as PickerProps$1, RangePickerProps as RangePickerProps$1 }
|
|
|
7
7
|
import { RangePickerSlots } from "../date-picker/generatePicker/generateRangePicker.js";
|
|
8
8
|
import { CSSProperties, SlotsType } from "vue";
|
|
9
9
|
import { PickerMode } from "@v-c/picker";
|
|
10
|
+
import { Dayjs } from "dayjs";
|
|
10
11
|
//#region src/time-picker/index.d.ts
|
|
11
12
|
type TimePickerSemanticName = keyof TimePickerSemanticClassNames & keyof TimePickerSemanticStyles;
|
|
12
13
|
interface TimePickerSemanticClassNames {
|
|
@@ -53,27 +54,28 @@ interface TimePickerLocale {
|
|
|
53
54
|
placeholder?: string;
|
|
54
55
|
rangePlaceholder?: [string, string];
|
|
55
56
|
}
|
|
56
|
-
type BaseTimeRangePickerProps = Omit<RangePickerTimeProps<
|
|
57
|
+
type BaseTimeRangePickerProps = Omit<RangePickerTimeProps<Dayjs>, 'picker' | 'onKeydown'>;
|
|
57
58
|
interface TimeRangePickerProps extends BaseTimeRangePickerProps, Omit<TimeRangePickerEmitsProps, keyof BaseTimeRangePickerProps> {
|
|
58
59
|
/** @deprecated Please use `classes.popup` instead */
|
|
59
60
|
popupClassName?: string;
|
|
60
61
|
/** @deprecated Please use `styles.popup` instead */
|
|
61
62
|
popupStyle?: CSSProperties;
|
|
62
63
|
}
|
|
63
|
-
interface TimeRangePickerEmits<DateType =
|
|
64
|
+
interface TimeRangePickerEmits<DateType = Dayjs> {
|
|
64
65
|
'change': (dates: DateType[] | null, dateStrings: [string, string]) => void;
|
|
65
66
|
'update:value': (dates: DateType[] | null) => void;
|
|
66
67
|
'calendarChange': (dates: DateType[], dateStrings: [string, string], info: any) => void;
|
|
67
68
|
'panelChange': (dates: DateType[], modes: [PickerMode, PickerMode]) => void;
|
|
68
69
|
'openChange': (open: boolean) => void;
|
|
69
70
|
'ok': (dates: DateType[]) => void;
|
|
71
|
+
'clear': () => void;
|
|
70
72
|
'focus': (e: FocusEvent, info: any) => void;
|
|
71
73
|
'blur': (e: FocusEvent, info: any) => void;
|
|
72
74
|
'keydown': (e: KeyboardEvent, preventDefault: VoidFunction) => void;
|
|
73
75
|
}
|
|
74
76
|
interface TimeRangePickerSlots extends RangePickerSlots<number> {}
|
|
75
|
-
declare const RangePicker$1: import("vue").DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<
|
|
76
|
-
type BaseTimePickerProps = Omit<PickerTimeProps<
|
|
77
|
+
declare const RangePicker$1: import("vue").DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<Dayjs>, SlotsType<TimeRangePickerSlots>, TimeRangePickerProps, import("vue").PublicProps>;
|
|
78
|
+
type BaseTimePickerProps = Omit<PickerTimeProps<Dayjs>, 'picker' | 'classes' | 'styles' | 'onKeydown'>;
|
|
77
79
|
interface TimePickerProps extends BaseTimePickerProps, Omit<TimePickerEmitsProps, keyof BaseTimePickerProps> {
|
|
78
80
|
/** @deprecated Please use `renderExtraFooter` instead */
|
|
79
81
|
addon?: () => VueNode;
|
|
@@ -90,51 +92,56 @@ interface TimePickerSlots {
|
|
|
90
92
|
/** @deprecated Please use `renderExtraFooter` instead */
|
|
91
93
|
addon?: () => any;
|
|
92
94
|
renderExtraFooter?: (mode: PickerMode) => any;
|
|
95
|
+
suffix?: () => any;
|
|
96
|
+
/** @deprecated Please use `suffix` instead */
|
|
93
97
|
suffixIcon?: () => any;
|
|
94
98
|
prefix?: () => any;
|
|
95
99
|
[key: string]: any;
|
|
96
100
|
}
|
|
97
|
-
interface TimePickerEmits<DateType =
|
|
101
|
+
interface TimePickerEmits<DateType = Dayjs> {
|
|
98
102
|
'change': (date: DateType | DateType[] | null, dateString: string | string[]) => void;
|
|
99
103
|
'update:value': (date: DateType | DateType[] | null) => void;
|
|
100
104
|
'calendarChange': (date: DateType | DateType[], dateString: string | string[], info: any) => void;
|
|
101
105
|
'panelChange': (date: DateType, mode: PickerMode) => void;
|
|
102
106
|
'openChange': (open: boolean) => void;
|
|
103
107
|
'ok': (date: DateType | DateType[]) => void;
|
|
108
|
+
'clear': () => void;
|
|
104
109
|
'select': (date: DateType) => void;
|
|
105
110
|
'focus': (e: FocusEvent, info: any) => void;
|
|
106
111
|
'blur': (e: FocusEvent, info: any) => void;
|
|
107
112
|
'keydown': (e: KeyboardEvent, preventDefault: VoidFunction) => void;
|
|
108
113
|
}
|
|
109
|
-
interface TimeRangePickerEmitsProps<DateType =
|
|
114
|
+
interface TimeRangePickerEmitsProps<DateType = Dayjs> {
|
|
110
115
|
onChange?: TimeRangePickerEmits<DateType>['change'];
|
|
111
116
|
'onUpdate:value'?: TimeRangePickerEmits<DateType>['update:value'];
|
|
112
117
|
onCalendarChange?: TimeRangePickerEmits<DateType>['calendarChange'];
|
|
113
118
|
onPanelChange?: TimeRangePickerEmits<DateType>['panelChange'];
|
|
114
119
|
onOpenChange?: TimeRangePickerEmits<DateType>['openChange'];
|
|
115
120
|
onOk?: TimeRangePickerEmits<DateType>['ok'];
|
|
121
|
+
onClear?: TimeRangePickerEmits<DateType>['clear'];
|
|
116
122
|
onFocus?: TimeRangePickerEmits<DateType>['focus'];
|
|
117
123
|
onBlur?: TimeRangePickerEmits<DateType>['blur'];
|
|
118
124
|
onKeydown?: TimeRangePickerEmits<DateType>['keydown'];
|
|
119
125
|
}
|
|
120
|
-
interface TimePickerEmitsProps<DateType =
|
|
126
|
+
interface TimePickerEmitsProps<DateType = Dayjs> {
|
|
121
127
|
onChange?: TimePickerEmits<DateType>['change'];
|
|
122
128
|
'onUpdate:value'?: TimePickerEmits<DateType>['update:value'];
|
|
123
129
|
onCalendarChange?: TimePickerEmits<DateType>['calendarChange'];
|
|
124
130
|
onPanelChange?: TimePickerEmits<DateType>['panelChange'];
|
|
125
131
|
onOpenChange?: TimePickerEmits<DateType>['openChange'];
|
|
126
132
|
onOk?: TimePickerEmits<DateType>['ok'];
|
|
133
|
+
onClear?: TimePickerEmits<DateType>['clear'];
|
|
127
134
|
onSelect?: TimePickerEmits<DateType>['select'];
|
|
128
135
|
onFocus?: TimePickerEmits<DateType>['focus'];
|
|
129
136
|
onBlur?: TimePickerEmits<DateType>['blur'];
|
|
130
137
|
onKeydown?: TimePickerEmits<DateType>['keydown'];
|
|
131
138
|
}
|
|
132
|
-
declare const TimePicker: import("vue").DefineSetupFnComponent<TimePickerProps, TimePickerEmits<
|
|
139
|
+
declare const TimePicker: import("vue").DefineSetupFnComponent<TimePickerProps, TimePickerEmits<Dayjs>, SlotsType<TimePickerSlots>, TimePickerProps, import("vue").PublicProps>;
|
|
133
140
|
type MergedTimePicker = typeof TimePicker & {
|
|
134
141
|
RangePicker: typeof RangePicker$1;
|
|
135
142
|
_InternalPanelDoNotUseOrYouWillBeFired: any;
|
|
136
143
|
};
|
|
137
144
|
declare const _default: MergedTimePicker;
|
|
138
|
-
declare const TimeRangePicker: import("vue").DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<
|
|
145
|
+
declare const TimeRangePicker: import("vue").DefineSetupFnComponent<TimeRangePickerProps, TimeRangePickerEmits<Dayjs>, SlotsType<TimeRangePickerSlots>, TimeRangePickerProps, import("vue").PublicProps>;
|
|
139
146
|
//#endregion
|
|
140
147
|
export { MergedTimePicker, PickerTimeProps, RangePickerTimeProps, TimePickerClassNames, TimePickerEmits, TimePickerEmitsProps, TimePickerLocale, TimePickerPanelSemanticClassNames, TimePickerPanelSemanticName, TimePickerPanelSemanticStyles, TimePickerProps, TimePickerSemanticClassNames, TimePickerSemanticName, TimePickerSemanticStyles, TimePickerSlots, TimePickerStyles, TimeRangePicker, TimeRangePickerEmits, TimeRangePickerEmitsProps, TimeRangePickerProps, TimeRangePickerSlots, _default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
2
|
import { toPropsRefs } from "../_util/tools.js";
|
|
3
|
-
import genPurePanel from "../_util/PurePanel.js";
|
|
4
3
|
import { useVariants } from "../form/hooks/useVariant.js";
|
|
4
|
+
import genPurePanel from "../_util/PurePanel.js";
|
|
5
5
|
import useMergedPickerSemantic from "../date-picker/hooks/useMergedPickerSemantic.js";
|
|
6
6
|
import DatePicker from "../date-picker/index.js";
|
|
7
7
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
@@ -25,6 +25,9 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
25
25
|
const onOk = (dates) => {
|
|
26
26
|
emit("ok", dates);
|
|
27
27
|
};
|
|
28
|
+
const onClear = () => {
|
|
29
|
+
emit("clear");
|
|
30
|
+
};
|
|
28
31
|
const onFocus = (e, info) => {
|
|
29
32
|
emit("focus", e, info);
|
|
30
33
|
};
|
|
@@ -49,6 +52,7 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
49
52
|
"onPanelChange": onPanelChange,
|
|
50
53
|
"onOpenChange": onOpenChange,
|
|
51
54
|
"onOk": onOk,
|
|
55
|
+
"onClear": onClear,
|
|
52
56
|
"onFocus": onFocus,
|
|
53
57
|
"onBlur": onBlur,
|
|
54
58
|
"onKeydown": onKeyDown
|
|
@@ -64,6 +68,10 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
64
68
|
type: Object,
|
|
65
69
|
required: false
|
|
66
70
|
},
|
|
71
|
+
components: {
|
|
72
|
+
type: Object,
|
|
73
|
+
required: false
|
|
74
|
+
},
|
|
67
75
|
locale: {
|
|
68
76
|
type: Object,
|
|
69
77
|
required: false
|
|
@@ -138,24 +146,8 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
138
146
|
type: Array,
|
|
139
147
|
required: false
|
|
140
148
|
},
|
|
141
|
-
defaultPickerValue: {
|
|
142
|
-
|
|
143
|
-
Array,
|
|
144
|
-
Object,
|
|
145
|
-
String,
|
|
146
|
-
null
|
|
147
|
-
],
|
|
148
|
-
required: false
|
|
149
|
-
},
|
|
150
|
-
pickerValue: {
|
|
151
|
-
type: [
|
|
152
|
-
Array,
|
|
153
|
-
Object,
|
|
154
|
-
String,
|
|
155
|
-
null
|
|
156
|
-
],
|
|
157
|
-
required: false
|
|
158
|
-
},
|
|
149
|
+
defaultPickerValue: { required: false },
|
|
150
|
+
pickerValue: { required: false },
|
|
159
151
|
onPickerValueChange: {
|
|
160
152
|
type: Function,
|
|
161
153
|
required: false
|
|
@@ -292,18 +284,9 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
292
284
|
type: Function,
|
|
293
285
|
required: false
|
|
294
286
|
},
|
|
295
|
-
minDate: {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
maxDate: {
|
|
300
|
-
type: Object,
|
|
301
|
-
required: false
|
|
302
|
-
},
|
|
303
|
-
defaultOpenValue: {
|
|
304
|
-
type: Object,
|
|
305
|
-
required: false
|
|
306
|
-
},
|
|
287
|
+
minDate: { required: false },
|
|
288
|
+
maxDate: { required: false },
|
|
289
|
+
defaultOpenValue: { required: false },
|
|
307
290
|
defaultOpen: {
|
|
308
291
|
type: Boolean,
|
|
309
292
|
required: false,
|
|
@@ -350,10 +333,6 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
350
333
|
type: String,
|
|
351
334
|
required: false
|
|
352
335
|
},
|
|
353
|
-
components: {
|
|
354
|
-
type: Object,
|
|
355
|
-
required: false
|
|
356
|
-
},
|
|
357
336
|
inputRender: {
|
|
358
337
|
type: Function,
|
|
359
338
|
required: false
|
|
@@ -1382,6 +1361,7 @@ const RangePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expos
|
|
|
1382
1361
|
"panelChange",
|
|
1383
1362
|
"openChange",
|
|
1384
1363
|
"ok",
|
|
1364
|
+
"clear",
|
|
1385
1365
|
"focus",
|
|
1386
1366
|
"blur",
|
|
1387
1367
|
"keydown"
|
|
@@ -1414,6 +1394,9 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1414
1394
|
const onOk = (date) => {
|
|
1415
1395
|
emit("ok", date);
|
|
1416
1396
|
};
|
|
1397
|
+
const onClear = () => {
|
|
1398
|
+
emit("clear");
|
|
1399
|
+
};
|
|
1417
1400
|
const onSelect = (date) => {
|
|
1418
1401
|
emit("select", date);
|
|
1419
1402
|
};
|
|
@@ -1456,6 +1439,7 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1456
1439
|
onPanelChange,
|
|
1457
1440
|
onOpenChange,
|
|
1458
1441
|
onOk,
|
|
1442
|
+
onClear,
|
|
1459
1443
|
onSelect,
|
|
1460
1444
|
onFocus,
|
|
1461
1445
|
onBlur,
|
|
@@ -1492,6 +1476,10 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1492
1476
|
type: [Object, Function],
|
|
1493
1477
|
required: false
|
|
1494
1478
|
},
|
|
1479
|
+
components: {
|
|
1480
|
+
type: Object,
|
|
1481
|
+
required: false
|
|
1482
|
+
},
|
|
1495
1483
|
locale: {
|
|
1496
1484
|
type: Object,
|
|
1497
1485
|
required: false
|
|
@@ -1544,43 +1532,14 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1544
1532
|
type: Function,
|
|
1545
1533
|
required: false
|
|
1546
1534
|
},
|
|
1547
|
-
value: {
|
|
1548
|
-
|
|
1549
|
-
Object,
|
|
1550
|
-
Array,
|
|
1551
|
-
String,
|
|
1552
|
-
null
|
|
1553
|
-
],
|
|
1554
|
-
required: false
|
|
1555
|
-
},
|
|
1556
|
-
defaultValue: {
|
|
1557
|
-
type: [
|
|
1558
|
-
Object,
|
|
1559
|
-
Array,
|
|
1560
|
-
String
|
|
1561
|
-
],
|
|
1562
|
-
required: false
|
|
1563
|
-
},
|
|
1535
|
+
value: { required: false },
|
|
1536
|
+
defaultValue: { required: false },
|
|
1564
1537
|
placeholder: {
|
|
1565
1538
|
type: String,
|
|
1566
1539
|
required: false
|
|
1567
1540
|
},
|
|
1568
|
-
defaultPickerValue: {
|
|
1569
|
-
|
|
1570
|
-
Object,
|
|
1571
|
-
String,
|
|
1572
|
-
null
|
|
1573
|
-
],
|
|
1574
|
-
required: false
|
|
1575
|
-
},
|
|
1576
|
-
pickerValue: {
|
|
1577
|
-
type: [
|
|
1578
|
-
Object,
|
|
1579
|
-
String,
|
|
1580
|
-
null
|
|
1581
|
-
],
|
|
1582
|
-
required: false
|
|
1583
|
-
},
|
|
1541
|
+
defaultPickerValue: { required: false },
|
|
1542
|
+
pickerValue: { required: false },
|
|
1584
1543
|
onPickerValueChange: {
|
|
1585
1544
|
type: Function,
|
|
1586
1545
|
required: false
|
|
@@ -1708,18 +1667,9 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1708
1667
|
type: Function,
|
|
1709
1668
|
required: false
|
|
1710
1669
|
},
|
|
1711
|
-
minDate: {
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
},
|
|
1715
|
-
maxDate: {
|
|
1716
|
-
type: Object,
|
|
1717
|
-
required: false
|
|
1718
|
-
},
|
|
1719
|
-
defaultOpenValue: {
|
|
1720
|
-
type: Object,
|
|
1721
|
-
required: false
|
|
1722
|
-
},
|
|
1670
|
+
minDate: { required: false },
|
|
1671
|
+
maxDate: { required: false },
|
|
1672
|
+
defaultOpenValue: { required: false },
|
|
1723
1673
|
defaultOpen: {
|
|
1724
1674
|
type: Boolean,
|
|
1725
1675
|
required: false,
|
|
@@ -1766,10 +1716,6 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
1766
1716
|
type: String,
|
|
1767
1717
|
required: false
|
|
1768
1718
|
},
|
|
1769
|
-
components: {
|
|
1770
|
-
type: Object,
|
|
1771
|
-
required: false
|
|
1772
|
-
},
|
|
1773
1719
|
inputRender: {
|
|
1774
1720
|
type: Function,
|
|
1775
1721
|
required: false
|
|
@@ -2793,6 +2739,7 @@ const TimePicker = /* @__PURE__ */ defineComponent((props, { slots, emit, expose
|
|
|
2793
2739
|
"panelChange",
|
|
2794
2740
|
"openChange",
|
|
2795
2741
|
"ok",
|
|
2742
|
+
"clear",
|
|
2796
2743
|
"select",
|
|
2797
2744
|
"focus",
|
|
2798
2745
|
"blur",
|
|
@@ -3,6 +3,7 @@ import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
|
3
3
|
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
|
+
import useVariant from "../form/hooks/useVariant.js";
|
|
6
7
|
import { resolveSlotsNode } from "../_util/vnode/index.js";
|
|
7
8
|
import isNonNullable from "../_util/isNonNullable.js";
|
|
8
9
|
import { provideInternalContext } from "../steps/context.js";
|
|
@@ -10,10 +11,10 @@ import Steps from "../steps/index.js";
|
|
|
10
11
|
import style_default from "./style/index.js";
|
|
11
12
|
import { TimelineItem } from "./TimelineItem.js";
|
|
12
13
|
import useItems from "./useItems.js";
|
|
13
|
-
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, ref, toRefs } from "vue";
|
|
14
|
+
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, ref, toRef, toRefs } from "vue";
|
|
14
15
|
import { classNames } from "@v-c/util";
|
|
15
16
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
16
|
-
import { omit } from "es-toolkit";
|
|
17
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
17
18
|
import { useUnstableProvider } from "@v-c/steps/dist/UnstableContext.js";
|
|
18
19
|
//#region src/timeline/Timeline.tsx
|
|
19
20
|
const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
@@ -27,6 +28,10 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
27
28
|
const { classes: contextClassNames, styles: contextStyles, style: contextStyle, class: contextClassName } = useComponentBaseConfig("timeline", props);
|
|
28
29
|
const { prefixCls, timeline, direction, getPrefixCls } = useBaseConfig("timeline", props);
|
|
29
30
|
const rootPrefixCls = computed(() => getPrefixCls());
|
|
31
|
+
const [mergedVariant] = useVariant("timeline", toRef(() => props.variant), {
|
|
32
|
+
variants: ["filled", "outlined"],
|
|
33
|
+
defaultVariant: "outlined"
|
|
34
|
+
});
|
|
30
35
|
const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
|
|
31
36
|
const items = computed(() => props.items || resolveSlotsNode(slots, "default", void 0, "_ANTDV_NEXT_TIMELINE_ITEM"));
|
|
32
37
|
const pending = computed(() => props.pending);
|
|
@@ -73,7 +78,7 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
73
78
|
const mergedProps = computed(() => {
|
|
74
79
|
return {
|
|
75
80
|
...props,
|
|
76
|
-
variant:
|
|
81
|
+
variant: mergedVariant.value,
|
|
77
82
|
mode: mergedMode.value,
|
|
78
83
|
orientation: orientation.value,
|
|
79
84
|
items: mergedItems.value
|
|
@@ -86,14 +91,18 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
86
91
|
return mergedMode.value === "alternate" || orientation.value === "vertical" && mergedItems.value.some((item) => item.title);
|
|
87
92
|
});
|
|
88
93
|
return () => {
|
|
89
|
-
const {
|
|
94
|
+
const { titleSpan } = props;
|
|
90
95
|
const stepStyle = {};
|
|
91
96
|
if (isNonNullable(titleSpan) && mergedMode.value !== "alternate") if (typeof titleSpan === "number" && !Number.isNaN(titleSpan)) stepStyle[varName("head-span")] = titleSpan;
|
|
92
97
|
else stepStyle[varName("head-span-ptg")] = titleSpan;
|
|
93
|
-
return createVNode(Steps, mergeProps(omit(attrs, ["class", "style"]), omit(props, [
|
|
98
|
+
return createVNode(Steps, mergeProps(omit$1(attrs, ["class", "style"]), omit$1(props, [
|
|
94
99
|
"items",
|
|
95
100
|
"prefixCls",
|
|
96
101
|
"titleSpan",
|
|
102
|
+
"mode",
|
|
103
|
+
"reverse",
|
|
104
|
+
"pending",
|
|
105
|
+
"pendingDot",
|
|
97
106
|
"dotRender",
|
|
98
107
|
"labelRender",
|
|
99
108
|
"contentRender"
|
|
@@ -106,7 +115,7 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
106
115
|
"classes": mergedClassNames.value,
|
|
107
116
|
"styles": mergedStyles.value,
|
|
108
117
|
"style": stepStyle,
|
|
109
|
-
"variant":
|
|
118
|
+
"variant": mergedVariant.value,
|
|
110
119
|
"orientation": orientation.value,
|
|
111
120
|
"type": "dot",
|
|
112
121
|
"items": mergedItems.value,
|
|
@@ -192,10 +201,7 @@ const Timeline = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
192
201
|
type: String,
|
|
193
202
|
required: false
|
|
194
203
|
}
|
|
195
|
-
}, {
|
|
196
|
-
variant: "outlined",
|
|
197
|
-
orientation: "vertical"
|
|
198
|
-
}),
|
|
204
|
+
}, { orientation: "vertical" }),
|
|
199
205
|
name: "ATimeline",
|
|
200
206
|
inheritAttrs: false
|
|
201
207
|
});
|
|
@@ -7,7 +7,7 @@ import { parseColor } from "./util.js";
|
|
|
7
7
|
import { computed, createVNode, defineComponent, isVNode, mergeDefaults, mergeProps } from "vue";
|
|
8
8
|
import { clsx } from "@v-c/util";
|
|
9
9
|
import { Popup } from "@v-c/tooltip";
|
|
10
|
-
import { omit } from "es-toolkit/compat";
|
|
10
|
+
import { omit as omit$1 } from "es-toolkit/compat";
|
|
11
11
|
//#region src/tooltip/PurePanel.tsx
|
|
12
12
|
function _isSlot(s) {
|
|
13
13
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
@@ -33,7 +33,7 @@ const PurePanel = /* @__PURE__ */ defineComponent((props, { attrs, slots }) => {
|
|
|
33
33
|
return createVNode("div", {
|
|
34
34
|
"class": clsx(rootCls.value, hashId.value, cssVarCls.value, prefixCls.value, `${prefixCls.value}-pure`, `${prefixCls.value}-placement-${placement.value}`, attrs.class, colorInfo.value.className),
|
|
35
35
|
"style": arrowContentStyle
|
|
36
|
-
}, [createVNode("div", { "class": `${prefixCls.value}-arrow` }, null), createVNode(Popup, mergeProps(omit(props, ["class"]), {
|
|
36
|
+
}, [createVNode("div", { "class": `${prefixCls.value}-arrow` }, null), createVNode(Popup, mergeProps(omit$1(props, ["class"]), {
|
|
37
37
|
"className": hashId.value,
|
|
38
38
|
"prefixCls": prefixCls.value,
|
|
39
39
|
"classNames": mergedClassNames.value,
|
package/dist/tooltip/index.js
CHANGED
|
@@ -105,8 +105,8 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
105
105
|
"space": true,
|
|
106
106
|
"form": true
|
|
107
107
|
}, _isSlot(memoOverlay) ? memoOverlay : { default: () => [memoOverlay] });
|
|
108
|
-
|
|
109
|
-
child = isVNode(
|
|
108
|
+
const children = filterEmpty(slots.default?.());
|
|
109
|
+
const child = children.length === 1 && isVNode(children[0]) && typeof children[0].type !== "symbol" ? children[0] : createVNode("span", null, [children]);
|
|
110
110
|
const childProps = child?.props ?? {};
|
|
111
111
|
const childCls = !childProps?.class || typeof childProps?.class === "string" ? clsx(childProps.class, openClass || `${prefixCls.value}-open`) : childProps.class;
|
|
112
112
|
const colorInfo = parseColor(rootPrefixCls.value, prefixCls.value, color);
|
|
@@ -150,10 +150,7 @@ const InternalTooltip = /* @__PURE__ */ defineComponent((props, { slots, attrs,
|
|
|
150
150
|
"onVisibleChange": onInternalOpenChange,
|
|
151
151
|
"afterVisibleChange": afterOpenChange,
|
|
152
152
|
"arrowContent": createVNode("span", { "class": `${prefixCls.value}-arrow-content` }, null),
|
|
153
|
-
"motion": {
|
|
154
|
-
name: getTransitionName(rootPrefixCls.value, "zoom-big-fast", typeof motion?.name === "string" ? motion?.name : void 0),
|
|
155
|
-
duration: 1e3
|
|
156
|
-
},
|
|
153
|
+
"motion": { name: getTransitionName(rootPrefixCls.value, "zoom-big-fast", typeof motion?.name === "string" ? motion?.name : void 0) },
|
|
157
154
|
"destroyOnHidden": destroyOnHidden
|
|
158
155
|
}), { default: () => [tempOpen && !props.disabled ? createVNode(child, { class: childCls }) : child] });
|
|
159
156
|
return createVNode(ZIndexProvider, { "value": contextZIndex.value }, _isSlot(content) ? content : { default: () => [content] });
|
|
@@ -39,6 +39,7 @@ const genTooltipStyle = (token) => {
|
|
|
39
39
|
maxWidth: tooltipMaxWidth,
|
|
40
40
|
visibility: "visible",
|
|
41
41
|
filter: dropShadowPopover,
|
|
42
|
+
willChange: "transform",
|
|
42
43
|
...sharedTransformOrigin,
|
|
43
44
|
"&-hidden": { display: "none" },
|
|
44
45
|
[varName("arrow-background-color")]: tooltipBg,
|
|
@@ -61,7 +62,6 @@ const genTooltipStyle = (token) => {
|
|
|
61
62
|
`&-placement-rightTop`,
|
|
62
63
|
`&-placement-rightBottom`
|
|
63
64
|
].join(",")]: { [`${componentCls}-container`]: { borderRadius: token.min(tooltipBorderRadius, 8) } },
|
|
64
|
-
[`${componentCls}-content`]: { position: "relative" },
|
|
65
65
|
...genPresetColor(token, (colorKey, { darkColor }) => ({ [`&${componentCls}-${colorKey}`]: {
|
|
66
66
|
[`${componentCls}-container`]: { backgroundColor: darkColor },
|
|
67
67
|
[`${componentCls}-arrow`]: { [varName("arrow-background-color")]: darkColor }
|
package/dist/tour/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import PurePanel from "./PurePanel.js";
|
|
|
12
12
|
import { computed, createVNode, defineComponent, mergeProps } from "vue";
|
|
13
13
|
import { clsx } from "@v-c/util";
|
|
14
14
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
15
|
-
import { omit } from "es-toolkit";
|
|
15
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
16
16
|
import VcTour from "@v-c/tour";
|
|
17
17
|
//#region src/tour/index.tsx
|
|
18
18
|
const Tour = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) => {
|
|
@@ -94,7 +94,7 @@ const Tour = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
94
94
|
"nextButtonProps": slots?.nextButton
|
|
95
95
|
}, null);
|
|
96
96
|
};
|
|
97
|
-
const restProps = omit(props, [
|
|
97
|
+
const restProps = omit$1(props, [
|
|
98
98
|
"prefixCls",
|
|
99
99
|
"type",
|
|
100
100
|
"indicatorsRender",
|
|
@@ -124,7 +124,6 @@ const Tour = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
124
124
|
},
|
|
125
125
|
"onFinish": () => {
|
|
126
126
|
emit("finish");
|
|
127
|
-
emit("update:open", false);
|
|
128
127
|
},
|
|
129
128
|
"onPopupAlign": (el, info) => {
|
|
130
129
|
emit("popupAlign", el, info);
|
package/dist/tour/panelRender.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getSlotPropsFnRun } from "../_util/tools.js";
|
|
2
|
+
import { isRenderable } from "../_util/is.js";
|
|
2
3
|
import localeValues from "../locale/en_US.js";
|
|
3
4
|
import useLocale from "../locale/useLocale.js";
|
|
4
5
|
import button_default from "../button/index.js";
|
|
5
|
-
import isNonNullable from "../_util/isNonNullable.js";
|
|
6
6
|
import { Fragment, createVNode, defineComponent, mergeProps } from "vue";
|
|
7
7
|
import { clsx } from "@v-c/util";
|
|
8
8
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
@@ -36,7 +36,7 @@ const TourPanel = /* @__PURE__ */ defineComponent((props) => {
|
|
|
36
36
|
nextButtonProps?.onClick?.(e);
|
|
37
37
|
};
|
|
38
38
|
const _title = getSlotPropsFnRun({}, { title }, "title");
|
|
39
|
-
const headerNode =
|
|
39
|
+
const headerNode = isRenderable(_title) ? createVNode("div", {
|
|
40
40
|
"class": clsx(`${prefixCls}-header`, classes.header),
|
|
41
41
|
"style": styles.header
|
|
42
42
|
}, [createVNode("div", {
|
|
@@ -44,12 +44,12 @@ const TourPanel = /* @__PURE__ */ defineComponent((props) => {
|
|
|
44
44
|
"style": styles.title
|
|
45
45
|
}, [_title])]) : null;
|
|
46
46
|
const _description = getSlotPropsFnRun({}, { description }, "description");
|
|
47
|
-
const descriptionNode =
|
|
47
|
+
const descriptionNode = isRenderable(_description) ? createVNode("div", {
|
|
48
48
|
"class": clsx(`${prefixCls}-description`, classes.description),
|
|
49
49
|
"style": styles.description
|
|
50
50
|
}, [_description]) : null;
|
|
51
51
|
const _cover = getSlotPropsFnRun({}, { cover }, "cover");
|
|
52
|
-
const coverNode =
|
|
52
|
+
const coverNode = isRenderable(_cover) ? createVNode("div", {
|
|
53
53
|
"class": clsx(`${prefixCls}-cover`, classes.cover),
|
|
54
54
|
"style": styles.cover
|
|
55
55
|
}, [_cover]) : null;
|
package/dist/transfer/Section.js
CHANGED
|
@@ -10,7 +10,7 @@ import { Fragment, computed, createVNode, defineComponent, isVNode, mergeProps,
|
|
|
10
10
|
import { clsx } from "@v-c/util";
|
|
11
11
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
12
12
|
import { DownOutlined } from "@antdv-next/icons";
|
|
13
|
-
import { omit } from "es-toolkit";
|
|
13
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
14
14
|
//#region src/transfer/Section.tsx
|
|
15
15
|
const defaultRender = () => null;
|
|
16
16
|
function isRenderResultPlainObject(result) {
|
|
@@ -108,7 +108,7 @@ const TransferSection = /* @__PURE__ */ defineComponent((props) => {
|
|
|
108
108
|
"disabled": props.disabled
|
|
109
109
|
}, null)]) : null;
|
|
110
110
|
const listProps = {
|
|
111
|
-
...omit(props, [...OmitProps]),
|
|
111
|
+
...omit$1(props, [...OmitProps]),
|
|
112
112
|
filteredItems: filteredItems.value.filterItems,
|
|
113
113
|
filteredRenderItems: filteredItems.value.filterRenderItems,
|
|
114
114
|
selectedKeys: props.checkedKeys,
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import { TreeEmits, TreeProps as TreeProps$1, TreeSlots } from "./Tree.js";
|
|
2
|
-
import { SlotsType } from "vue";
|
|
2
|
+
import { EmitFn, PublicProps, SlotsType } from "vue";
|
|
3
3
|
import { BasicDataNode, DataNode } from "@v-c/tree";
|
|
4
4
|
//#region src/tree/DirectoryTree.d.ts
|
|
5
5
|
type ExpandAction = false | 'click' | 'doubleClick';
|
|
6
|
-
interface DirectoryTreeProps<T extends BasicDataNode = DataNode> extends TreeProps$1<T>, DirectoryTreeEmitsProps {
|
|
6
|
+
interface DirectoryTreeProps<T extends BasicDataNode = DataNode> extends TreeProps$1<T>, DirectoryTreeEmitsProps<T> {
|
|
7
7
|
expandAction?: ExpandAction;
|
|
8
8
|
}
|
|
9
|
-
interface DirectoryTreeEmits extends TreeEmits {}
|
|
10
|
-
type DirectoryTreeEmitsProps = { [K in keyof DirectoryTreeEmits as `on${Capitalize<string & K>}`]?: DirectoryTreeEmits[K]; };
|
|
9
|
+
interface DirectoryTreeEmits<T extends BasicDataNode = DataNode> extends TreeEmits<T> {}
|
|
10
|
+
type DirectoryTreeEmitsProps<T extends BasicDataNode = DataNode> = { [K in keyof DirectoryTreeEmits<T> as `on${Capitalize<string & K>}`]?: DirectoryTreeEmits<T>[K]; };
|
|
11
11
|
type DirectoryTreeEmitsType = DirectoryTreeEmitsProps;
|
|
12
|
-
interface DirectoryTreeSlots extends TreeSlots {}
|
|
13
|
-
|
|
12
|
+
interface DirectoryTreeSlots<T extends BasicDataNode = DataNode> extends TreeSlots<T> {}
|
|
13
|
+
interface DirectoryTreeInstance<T extends BasicDataNode = DataNode> {
|
|
14
|
+
$props: DirectoryTreeProps<T> & PublicProps;
|
|
15
|
+
$emit: EmitFn<DirectoryTreeEmits<T>>;
|
|
16
|
+
$slots: DirectoryTreeSlots<T>;
|
|
17
|
+
}
|
|
18
|
+
interface DirectoryTreeConstructor {
|
|
19
|
+
new <T extends BasicDataNode = DataNode>(props: DirectoryTreeProps<T>): DirectoryTreeInstance<T>;
|
|
20
|
+
/**
|
|
21
|
+
* Non-generic fallback signature, see `TreeConstructor` in `./Tree.tsx`.
|
|
22
|
+
*/
|
|
23
|
+
new (props: DirectoryTreeProps<any>): DirectoryTreeInstance<any>;
|
|
24
|
+
}
|
|
25
|
+
declare const DirectoryTree: import("vue").DefineSetupFnComponent<DirectoryTreeProps<BasicDataNode>, DirectoryTreeEmits<DataNode>, SlotsType<DirectoryTreeSlots<DataNode>>, DirectoryTreeProps<BasicDataNode>, PublicProps>;
|
|
14
26
|
//#endregion
|
|
15
|
-
export { DirectoryTreeEmits, DirectoryTreeEmitsProps, DirectoryTreeEmitsType, DirectoryTreeProps, DirectoryTreeSlots, ExpandAction, DirectoryTree as default };
|
|
27
|
+
export { DirectoryTreeConstructor, DirectoryTreeEmits, DirectoryTreeEmitsProps, DirectoryTreeEmitsType, DirectoryTreeProps, DirectoryTreeSlots, ExpandAction, DirectoryTree as default };
|