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
|
@@ -38,6 +38,7 @@ import { AlertProps } from "../alert/Alert.js";
|
|
|
38
38
|
import "../alert/index.js";
|
|
39
39
|
import { AnchorProps } from "../anchor/Anchor.js";
|
|
40
40
|
import "../anchor/index.js";
|
|
41
|
+
import { AutoCompleteProps } from "../auto-complete/index.js";
|
|
41
42
|
import { RibbonProps } from "../badge/Ribbon.js";
|
|
42
43
|
import { BadgeProps } from "../badge/index.js";
|
|
43
44
|
import { BreadcrumbProps } from "../breadcrumb/Breadcrumb.js";
|
|
@@ -90,7 +91,7 @@ import { TreeSelectProps } from "../tree-select/index.js";
|
|
|
90
91
|
import { BlockProps } from "../typography/interface.js";
|
|
91
92
|
import { ButtonProps } from "../button/Button.js";
|
|
92
93
|
import "../button/index.js";
|
|
93
|
-
import { CSSProperties, Ref } from "vue";
|
|
94
|
+
import { AriaAttributes, CSSProperties, Ref } from "vue";
|
|
94
95
|
import { DerivativeFunc } from "@antdv-next/cssinjs";
|
|
95
96
|
import { MoreProps } from "@v-c/tabs";
|
|
96
97
|
//#region src/config-provider/context.d.ts
|
|
@@ -232,7 +233,8 @@ type ButtonConfig = ComponentStyleConfig & Pick<ButtonProps, 'classes' | 'styles
|
|
|
232
233
|
loadingIcon?: VueNode;
|
|
233
234
|
};
|
|
234
235
|
type FlexConfig = ComponentStyleConfig & Pick<FlexProps, 'vertical'>;
|
|
235
|
-
type AlertConfig = ComponentStyleConfig & Pick<AlertProps, 'variant' | 'closeIcon' | '
|
|
236
|
+
type AlertConfig = ComponentStyleConfig & Pick<AlertProps, 'variant' | 'closeIcon' | 'classes' | 'styles'> & {
|
|
237
|
+
closable?: boolean | (Pick<Exclude<NonNullable<AlertProps['closable']>, boolean>, 'closeIcon'> & AriaAttributes);
|
|
236
238
|
successIcon?: VueNode;
|
|
237
239
|
infoIcon?: VueNode;
|
|
238
240
|
warningIcon?: VueNode;
|
|
@@ -248,7 +250,7 @@ type QRcodeConfig = ComponentStyleConfig & Pick<QRCodeProps, 'classes' | 'styles
|
|
|
248
250
|
type ResultConfig = ComponentStyleConfig & Pick<ResultProps, 'classes' | 'styles'>;
|
|
249
251
|
type AnchorStyleConfig = ComponentStyleConfig & Pick<AnchorProps, 'classes' | 'styles'>;
|
|
250
252
|
type PaginationConfig = ComponentStyleConfig & Pick<PaginationProps, 'showSizeChanger'>;
|
|
251
|
-
type DividerConfig = ComponentStyleConfig & Pick<DividerProps, 'classes' | 'styles'>;
|
|
253
|
+
type DividerConfig = ComponentStyleConfig & Pick<DividerProps, 'classes' | 'styles' | 'variant'>;
|
|
252
254
|
type SkeletonConfig = ComponentStyleConfig & Pick<SkeletonProps, 'styles' | 'classes'>;
|
|
253
255
|
type StatisticConfig = ComponentStyleConfig & Pick<StatisticProps, 'classes' | 'styles'>;
|
|
254
256
|
type TypographyConfig = ComponentStyleConfig & Pick<BlockProps, 'classes' | 'styles'>;
|
|
@@ -284,6 +286,7 @@ type ListyConfig = ComponentStyleConfig & Pick<ListyProps, 'classes' | 'styles'>
|
|
|
284
286
|
type SwitchStyleConfig = ComponentStyleConfig & Pick<SwitchProps, 'classes' | 'styles'>;
|
|
285
287
|
type TransferConfig = ComponentStyleConfig & Pick<TransferProps, 'selectionsIcon' | 'classes' | 'styles'>;
|
|
286
288
|
type InputConfig = ComponentStyleConfig & Pick<InputProps, 'autoComplete' | 'autocomplete' | 'classes' | 'styles' | 'allowClear' | 'variant' | 'changeOnComposing'>;
|
|
289
|
+
type AutoCompleteConfig = Pick<AutoCompleteProps, 'allowClear'>;
|
|
287
290
|
type InputNumberConfig = ComponentStyleConfig & Pick<InputNumberProps, 'classes' | 'styles' | 'variant' | 'allowClear'>;
|
|
288
291
|
type TextAreaConfig = ComponentStyleConfig & Pick<TextAreaProps, 'classes' | 'styles' | 'allowClear' | 'variant' | 'changeOnComposing'>;
|
|
289
292
|
type MentionsConfig = ComponentStyleConfig & Pick<TextAreaProps, 'classes' | 'styles' | 'allowClear' | 'variant'>;
|
|
@@ -303,15 +306,16 @@ interface TabsMoreConfig {
|
|
|
303
306
|
more?: Omit<MoreProps, 'popupRender'>;
|
|
304
307
|
}
|
|
305
308
|
type TabsConfig = ComponentStyleConfig & Pick<TabsProps$1, 'indicator' | 'indicatorSize' | 'moreIcon' | 'addIcon' | 'removeIcon' | 'classes' | 'styles' | 'scrollPosition'> & TabsMoreConfig;
|
|
306
|
-
type SelectConfig = ComponentStyleConfig & Pick<SelectProps, 'showSearch' | 'variant' | 'classes' | 'styles' | 'allowClear' | 'suffixIcon' | 'removeIcon'> & {
|
|
309
|
+
type SelectConfig = ComponentStyleConfig & Pick<SelectProps, 'showSearch' | 'variant' | 'classes' | 'styles' | 'allowClear' | 'autoComplete' | 'suffix' | 'suffixIcon' | 'removeIcon'> & {
|
|
307
310
|
clearIcon?: any;
|
|
308
311
|
loadingIcon?: any;
|
|
309
312
|
menuItemSelectedIcon?: any;
|
|
310
313
|
};
|
|
311
|
-
type CascaderConfig = ComponentStyleConfig & Pick<CascaderProps, 'variant' | 'classes' | 'styles' | 'expandIcon' | 'loadingIcon'> & {
|
|
314
|
+
type CascaderConfig = ComponentStyleConfig & Pick<CascaderProps, 'allowClear' | 'variant' | 'classes' | 'styles' | 'expandIcon' | 'loadingIcon'> & {
|
|
312
315
|
searchIcon?: any;
|
|
313
316
|
clearIcon?: any;
|
|
314
317
|
removeIcon?: any;
|
|
318
|
+
suffix?: CascaderProps['suffix'];
|
|
315
319
|
suffixIcon?: any;
|
|
316
320
|
};
|
|
317
321
|
type CardMetaConfig = ComponentStyleConfig & Pick<CardMetaProps, 'classes' | 'styles'>;
|
|
@@ -326,8 +330,8 @@ type ModalConfig = ComponentStyleConfig & Pick<ModalProps, 'classes' | 'styles'
|
|
|
326
330
|
warningIcon?: any;
|
|
327
331
|
errorIcon?: any;
|
|
328
332
|
};
|
|
329
|
-
type StepsConfig = ComponentStyleConfig & Pick<StepsProps, 'classes' | 'styles'>;
|
|
330
|
-
type TimelineConfig = ComponentStyleConfig & Pick<TimelineProps, 'classes' | 'styles'>;
|
|
333
|
+
type StepsConfig = ComponentStyleConfig & Pick<StepsProps, 'classes' | 'styles' | 'variant'>;
|
|
334
|
+
type TimelineConfig = ComponentStyleConfig & Pick<TimelineProps, 'classes' | 'styles' | 'variant'>;
|
|
331
335
|
type ImageConfig = ComponentStyleConfig & Pick<ImageProps, 'classes' | 'styles'> & {
|
|
332
336
|
preview?: Partial<Record<'closeIcon', any>> & Pick<ImageProps, 'classes' | 'styles'> & {
|
|
333
337
|
mask?: MaskType;
|
|
@@ -335,13 +339,13 @@ type ImageConfig = ComponentStyleConfig & Pick<ImageProps, 'classes' | 'styles'>
|
|
|
335
339
|
fallback?: string;
|
|
336
340
|
};
|
|
337
341
|
type TreeConfig = ComponentStyleConfig & Pick<TreeProps, 'classes' | 'styles'>;
|
|
338
|
-
type TreeSelectConfig = ComponentStyleConfig & Pick<TreeSelectProps, 'variant' | 'classes' | 'styles' | 'switcherIcon'>;
|
|
342
|
+
type TreeSelectConfig = ComponentStyleConfig & Pick<TreeSelectProps, 'allowClear' | 'variant' | 'classes' | 'styles' | 'switcherIcon'>;
|
|
339
343
|
type UploadConfig = ComponentStyleConfig & Pick<UploadProps, 'classes' | 'styles' | 'customRequest' | 'progress' | 'accept'>;
|
|
340
|
-
type DatePickerConfig = ComponentStyleConfig & Pick<DatePickerProps, 'classes' | 'styles' | 'variant' | 'suffixIcon' | 'allowClear'> & {
|
|
344
|
+
type DatePickerConfig = ComponentStyleConfig & Pick<DatePickerProps, 'classes' | 'styles' | 'variant' | 'suffix' | 'suffixIcon' | 'allowClear'> & {
|
|
341
345
|
clearIcon?: any;
|
|
342
346
|
};
|
|
343
347
|
type RangePickerConfig = ComponentStyleConfig & Pick<RangePickerProps, 'variant' | 'separator'>;
|
|
344
|
-
type TimePickerConfig = ComponentStyleConfig & Pick<TimePickerProps, 'classes' | 'styles' | 'variant' | 'suffixIcon' | 'allowClear'> & {
|
|
348
|
+
type TimePickerConfig = ComponentStyleConfig & Pick<TimePickerProps, 'classes' | 'styles' | 'variant' | 'suffix' | 'suffixIcon' | 'allowClear'> & {
|
|
345
349
|
clearIcon?: any;
|
|
346
350
|
};
|
|
347
351
|
interface TableConfig<RecordType extends AnyObject = AnyObject> extends ComponentStyleConfig {
|
|
@@ -373,6 +377,7 @@ interface ConfigComponentProps {
|
|
|
373
377
|
space?: SpaceConfig;
|
|
374
378
|
splitter?: SplitterConfig;
|
|
375
379
|
form?: FormConfig;
|
|
380
|
+
autoComplete?: AutoCompleteConfig;
|
|
376
381
|
select?: SelectConfig;
|
|
377
382
|
app?: ComponentStyleConfig;
|
|
378
383
|
alert?: AlertConfig;
|
|
@@ -510,4 +515,4 @@ declare function useComponentBaseConfig<T extends keyof ConfigComponentProps, K
|
|
|
510
515
|
popupOverflow: Readonly<Ref<PopupOverflow | undefined, PopupOverflow | undefined>>;
|
|
511
516
|
};
|
|
512
517
|
//#endregion
|
|
513
|
-
export { AlertConfig, AnchorStyleConfig, BadgeConfig, BreadcrumbConfig, ButtonConfig, CSPConfig, CalendarConfig, CardConfig, CardMetaConfig, CascaderConfig, CheckboxConfig, CollapseConfig, ColorPickerConfig, ComponentBaseProps, ComponentStyleConfig, ConfigComponentProps, ConfigConsumerProps, ConfigRefs, DatePickerConfig, DescriptionsConfig, DirectionType, DividerConfig, DrawerConfig, DropdownConfig, EmptyConfig, FlexConfig, FloatButtonConfig, FloatButtonGroupConfig, FormConfig, ImageConfig, InputConfig, InputNumberConfig, InputPasswordConfig, InputSearchConfig, ListyConfig, MappingAlgorithm, MasonryConfig, MentionsConfig, MenuConfig, ModalConfig, NotificationConfig, OTPConfig, PaginationConfig, PopconfirmConfig, PopoverConfig, PopupOverflow, ProgressConfig, QRcodeConfig, RadioConfig, RangePickerConfig, ResultConfig, RibbonConfig, SegmentedConfig, SelectConfig, SkeletonConfig, SliderConfig, SpaceConfig, SpinConfig, SplitterConfig, StatisticConfig, StepsConfig, SwitchStyleConfig, TableConfig, TabsConfig, TabsMoreConfig, TagConfig, TextAreaConfig, Theme, ThemeConfig, TimePickerConfig, TimelineConfig, TooltipConfig, TooltipUniqueConfig, TourConfig, TransferConfig, TreeConfig, TreeSelectConfig, TriggerType, TypographyConfig, UploadConfig, Variant, Variants, WaveConfig, defaultIconPrefixCls, defaultPrefixCls, useBaseConfig, useComponentBaseConfig, useComponentConfig, useConfig, useConfigProvider };
|
|
518
|
+
export { AlertConfig, AnchorStyleConfig, AutoCompleteConfig, BadgeConfig, BreadcrumbConfig, ButtonConfig, CSPConfig, CalendarConfig, CardConfig, CardMetaConfig, CascaderConfig, CheckboxConfig, CollapseConfig, ColorPickerConfig, ComponentBaseProps, ComponentStyleConfig, ConfigComponentProps, ConfigConsumerProps, ConfigRefs, DatePickerConfig, DescriptionsConfig, DirectionType, DividerConfig, DrawerConfig, DropdownConfig, EmptyConfig, FlexConfig, FloatButtonConfig, FloatButtonGroupConfig, FormConfig, ImageConfig, InputConfig, InputNumberConfig, InputPasswordConfig, InputSearchConfig, ListyConfig, MappingAlgorithm, MasonryConfig, MentionsConfig, MenuConfig, ModalConfig, NotificationConfig, OTPConfig, PaginationConfig, PopconfirmConfig, PopoverConfig, PopupOverflow, ProgressConfig, QRcodeConfig, RadioConfig, RangePickerConfig, ResultConfig, RibbonConfig, SegmentedConfig, SelectConfig, SkeletonConfig, SliderConfig, SpaceConfig, SpinConfig, SplitterConfig, StatisticConfig, StepsConfig, SwitchStyleConfig, TableConfig, TabsConfig, TabsMoreConfig, TagConfig, TextAreaConfig, Theme, ThemeConfig, TimePickerConfig, TimelineConfig, TooltipConfig, TooltipUniqueConfig, TourConfig, TransferConfig, TreeConfig, TreeSelectConfig, TriggerType, TypographyConfig, UploadConfig, Variant, Variants, WaveConfig, defaultIconPrefixCls, defaultPrefixCls, useBaseConfig, useComponentBaseConfig, useComponentConfig, useConfig, useConfigProvider };
|
|
@@ -4,7 +4,7 @@ import { ColumnType } from "../table/interface.js";
|
|
|
4
4
|
import "../table/index.js";
|
|
5
5
|
import { Locale } from "../locale/index.js";
|
|
6
6
|
import { RenderEmptyHandler } from "./defaultRenderEmpty.js";
|
|
7
|
-
import { AlertConfig, AnchorStyleConfig, BadgeConfig, BreadcrumbConfig, ButtonConfig, CSPConfig, CalendarConfig, CardConfig, CardMetaConfig, CascaderConfig, CheckboxConfig, CollapseConfig, ColorPickerConfig, ComponentStyleConfig, DatePickerConfig, DescriptionsConfig, DirectionType, DividerConfig, DrawerConfig, DropdownConfig, EmptyConfig, FlexConfig, FloatButtonConfig, FloatButtonGroupConfig, FormConfig, ImageConfig, InputConfig, InputNumberConfig, InputPasswordConfig, InputSearchConfig, ListyConfig, MasonryConfig, MentionsConfig, MenuConfig, ModalConfig, NotificationConfig, OTPConfig, PaginationConfig, PopconfirmConfig, PopoverConfig, PopupOverflow, ProgressConfig, RadioConfig, RangePickerConfig, ResultConfig, RibbonConfig, SegmentedConfig, SelectConfig, SkeletonConfig, SliderConfig, SpaceConfig, SpinConfig, SplitterConfig, StatisticConfig, StepsConfig, SwitchStyleConfig, TableConfig, TabsConfig, TagConfig, TextAreaConfig, ThemeConfig, TimePickerConfig, TimelineConfig, TooltipConfig, TourConfig, TransferConfig, TreeConfig, TreeSelectConfig, TypographyConfig, UploadConfig, Variant, WaveConfig } from "./context.js";
|
|
7
|
+
import { AlertConfig, AnchorStyleConfig, AutoCompleteConfig, BadgeConfig, BreadcrumbConfig, ButtonConfig, CSPConfig, CalendarConfig, CardConfig, CardMetaConfig, CascaderConfig, CheckboxConfig, CollapseConfig, ColorPickerConfig, ComponentStyleConfig, DatePickerConfig, DescriptionsConfig, DirectionType, DividerConfig, DrawerConfig, DropdownConfig, EmptyConfig, FlexConfig, FloatButtonConfig, FloatButtonGroupConfig, FormConfig, ImageConfig, InputConfig, InputNumberConfig, InputPasswordConfig, InputSearchConfig, ListyConfig, MasonryConfig, MentionsConfig, MenuConfig, ModalConfig, NotificationConfig, OTPConfig, PaginationConfig, PopconfirmConfig, PopoverConfig, PopupOverflow, ProgressConfig, RadioConfig, RangePickerConfig, ResultConfig, RibbonConfig, SegmentedConfig, SelectConfig, SkeletonConfig, SliderConfig, SpaceConfig, SpinConfig, SplitterConfig, StatisticConfig, StepsConfig, SwitchStyleConfig, TableConfig, TabsConfig, TagConfig, TextAreaConfig, ThemeConfig, TimePickerConfig, TimelineConfig, TooltipConfig, TourConfig, TransferConfig, TreeConfig, TreeSelectConfig, TypographyConfig, UploadConfig, Variant, WaveConfig } from "./context.js";
|
|
8
8
|
//#region src/config-provider/define.d.ts
|
|
9
9
|
interface ConfigProviderProps {
|
|
10
10
|
getTargetContainer?: () => HTMLElement | Window;
|
|
@@ -27,6 +27,7 @@ interface ConfigProviderProps {
|
|
|
27
27
|
inputSearch?: InputSearchConfig;
|
|
28
28
|
inputPassword?: InputPasswordConfig;
|
|
29
29
|
otp?: OTPConfig;
|
|
30
|
+
autoComplete?: AutoCompleteConfig;
|
|
30
31
|
select?: SelectConfig;
|
|
31
32
|
form?: FormConfig;
|
|
32
33
|
pagination?: PaginationConfig;
|
|
@@ -28,6 +28,7 @@ const PASSED_PROPS = [
|
|
|
28
28
|
"splitter",
|
|
29
29
|
"mentions",
|
|
30
30
|
"form",
|
|
31
|
+
"autoComplete",
|
|
31
32
|
"select",
|
|
32
33
|
"treeSelect",
|
|
33
34
|
"button",
|
|
@@ -327,6 +328,10 @@ const ProviderChildren = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
327
328
|
type: Object,
|
|
328
329
|
required: false
|
|
329
330
|
},
|
|
331
|
+
autoComplete: {
|
|
332
|
+
type: Object,
|
|
333
|
+
required: false
|
|
334
|
+
},
|
|
330
335
|
select: {
|
|
331
336
|
type: Object,
|
|
332
337
|
required: false
|
|
@@ -703,6 +708,10 @@ const ConfigProvider = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
703
708
|
type: Object,
|
|
704
709
|
required: false
|
|
705
710
|
},
|
|
711
|
+
autoComplete: {
|
|
712
|
+
type: Object,
|
|
713
|
+
required: false
|
|
714
|
+
},
|
|
706
715
|
select: {
|
|
707
716
|
type: Object,
|
|
708
717
|
required: false
|
|
@@ -17,6 +17,8 @@ interface RangePickerEmits<DateType = AnyObject> {
|
|
|
17
17
|
'keydown': (e: KeyboardEvent, preventDefault: VoidFunction) => void;
|
|
18
18
|
}
|
|
19
19
|
interface RangePickerSlots<CurrentType = AnyObject> {
|
|
20
|
+
suffix?: () => any;
|
|
21
|
+
/** @deprecated Please use `suffix` instead */
|
|
20
22
|
suffixIcon?: () => any;
|
|
21
23
|
prefix?: () => any;
|
|
22
24
|
renderExtraFooter?: (mode: PickerMode) => any;
|
|
@@ -6,20 +6,21 @@ import { useCompactItemContext } from "../../space/Compact.js";
|
|
|
6
6
|
import { ContextIsolator } from "../../_util/ContextIsolator.js";
|
|
7
7
|
import { getAttrStyleAndClass } from "../../_util/hooks/useMergeSemantic.js";
|
|
8
8
|
import { useZIndex } from "../../_util/hooks/useZIndex.js";
|
|
9
|
+
import fallbackProp from "../../_util/fallbackProp.js";
|
|
9
10
|
import { getSlotPropsFnRun, toPropsRefs } from "../../_util/tools.js";
|
|
10
11
|
import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
11
12
|
import { useDisabledContext } from "../../config-provider/DisabledContext.js";
|
|
12
13
|
import { isNonNullable } from "../../_util/is.js";
|
|
14
|
+
import { useVariants } from "../../form/hooks/useVariant.js";
|
|
13
15
|
import locale from "../locale/en_US.js";
|
|
14
16
|
import useLocale from "../../locale/useLocale.js";
|
|
15
17
|
import { getMergedStatus, getStatusClassNames } from "../../_util/statusUtils.js";
|
|
16
|
-
import { useVariants } from "../../form/hooks/useVariant.js";
|
|
17
18
|
import style_default from "../style/index.js";
|
|
18
19
|
import useMergedPickerSemantic from "../hooks/useMergedPickerSemantic.js";
|
|
19
20
|
import { getRangePlaceholder, useIcons } from "../util.js";
|
|
20
21
|
import { TIME } from "./constant.js";
|
|
21
|
-
import SuffixIcon from "./SuffixIcon.js";
|
|
22
22
|
import useComponents from "./useComponents.js";
|
|
23
|
+
import useSuffix from "./useSuffix.js";
|
|
23
24
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
24
25
|
import { clsx } from "@v-c/util";
|
|
25
26
|
import { SwapRightOutlined } from "@antdv-next/icons";
|
|
@@ -31,7 +32,12 @@ function generateRangePicker(generateConfig) {
|
|
|
31
32
|
const { size: customizeSize, disabled: customDisabled, status: customStatus, variant: customVariant, classes, styles, rootClass, bordered } = toPropsRefs(props, "size", "disabled", "status", "variant", "classes", "styles", "rootClass", "bordered", "separator");
|
|
32
33
|
const pickerType = computed(() => props.picker === TIME ? "timePicker" : "datePicker");
|
|
33
34
|
const { prefixCls, direction, getPopupContainer, rootPrefixCls, class: contextClassName, style: contextStyle, separator: contextSeparator } = useComponentBaseConfig("rangePicker", props, ["separator"], "picker");
|
|
34
|
-
const { allowClear: contextAllowClear, clearIcon: contextClearIcon } = useComponentBaseConfig(pickerType.value, props, [
|
|
35
|
+
const { suffix: contextSuffix, suffixIcon: contextSuffixIcon, allowClear: contextAllowClear, clearIcon: contextClearIcon } = useComponentBaseConfig(pickerType.value, props, [
|
|
36
|
+
"suffix",
|
|
37
|
+
"suffixIcon",
|
|
38
|
+
"allowClear",
|
|
39
|
+
"clearIcon"
|
|
40
|
+
], "picker");
|
|
35
41
|
const { compactSize, compactItemClassnames } = useCompactItemContext(prefixCls, direction);
|
|
36
42
|
const mergedSize = useSize((ctx) => customizeSize.value ?? compactSize.value ?? ctx);
|
|
37
43
|
const disabled = useDisabledContext();
|
|
@@ -93,7 +99,7 @@ function generateRangePicker(generateConfig) {
|
|
|
93
99
|
return propValue;
|
|
94
100
|
};
|
|
95
101
|
if (isDev) {
|
|
96
|
-
const warning = devUseWarning("DatePicker.RangePicker");
|
|
102
|
+
const warning = devUseWarning(props.picker === TIME ? "TimePicker.RangePicker" : "DatePicker.RangePicker");
|
|
97
103
|
Object.entries({
|
|
98
104
|
dropdownClassName: "classes.popup.root",
|
|
99
105
|
popupClassName: "classes.popup.root",
|
|
@@ -102,6 +108,7 @@ function generateRangePicker(generateConfig) {
|
|
|
102
108
|
}).forEach(([oldProp, newProp]) => {
|
|
103
109
|
warning.deprecated(!props[oldProp], oldProp, newProp);
|
|
104
110
|
});
|
|
111
|
+
warning.deprecated(props.suffixIcon === void 0 && !slots.suffixIcon, "suffixIcon", "suffix");
|
|
105
112
|
}
|
|
106
113
|
expose({
|
|
107
114
|
focus: (options) => innerRef.value?.focus?.(options),
|
|
@@ -109,9 +116,10 @@ function generateRangePicker(generateConfig) {
|
|
|
109
116
|
nativeElement: computed(() => innerRef.value?.nativeElement)
|
|
110
117
|
});
|
|
111
118
|
return () => {
|
|
112
|
-
const { placeholder, components, placement, suffixIcon, prefix, allowClear, clearIcon, popupClassName: _popupClassName, dropdownClassName: _dropdownClassName, popupStyle: _popupStyle, rootClass: _rootClass, classes: _classes, styles: _styles, status: _status, variant: _variant, bordered: _bordered, size: _size, disabled: _disabled, locale: _locale, getPopupContainer: _getPopupContainer, autoComplete, autocomplete, ...restProps } = props;
|
|
119
|
+
const { placeholder, components, placement, suffix, suffixIcon, prefix, allowClear, clearIcon, popupClassName: _popupClassName, dropdownClassName: _dropdownClassName, popupStyle: _popupStyle, rootClass: _rootClass, classes: _classes, styles: _styles, status: _status, variant: _variant, bordered: _bordered, size: _size, disabled: _disabled, locale: _locale, getPopupContainer: _getPopupContainer, autoComplete, autocomplete, ...restProps } = props;
|
|
113
120
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs, void 0, props);
|
|
114
|
-
const
|
|
121
|
+
const customSuffix = getSlotPropsFnRun(slots, { suffix }, "suffix", false);
|
|
122
|
+
const customSuffixIcon = getSlotPropsFnRun(slots, { suffixIcon }, "suffixIcon", false);
|
|
115
123
|
const mergedPrefix = getSlotPropsFnRun(slots, { prefix }, "prefix", false);
|
|
116
124
|
const [mergedAllowClear] = useIcons({
|
|
117
125
|
allowClear,
|
|
@@ -119,16 +127,16 @@ function generateRangePicker(generateConfig) {
|
|
|
119
127
|
}, prefixCls.value, {
|
|
120
128
|
allowClear: contextAllowClear?.value,
|
|
121
129
|
clearIcon: contextClearIcon?.value
|
|
122
|
-
});
|
|
130
|
+
}, locale$1.value?.lang?.clear);
|
|
123
131
|
const mergedComponents = useComponents(components);
|
|
124
132
|
const { hasFeedback, status: contextStatus, feedbackIcon } = useFormItemInputContext().value;
|
|
125
133
|
const mergedStatus = getMergedStatus(contextStatus, customStatus.value);
|
|
126
|
-
const
|
|
134
|
+
const mergedSuffix = useSuffix({
|
|
127
135
|
picker: props.picker,
|
|
128
136
|
hasFeedback,
|
|
129
137
|
feedbackIcon,
|
|
130
|
-
|
|
131
|
-
}
|
|
138
|
+
suffix: fallbackProp(customSuffix, customSuffixIcon, contextSuffix?.value, contextSuffixIcon?.value)
|
|
139
|
+
});
|
|
132
140
|
const mergedClassName = clsx({
|
|
133
141
|
[`${prefixCls.value}-${mergedSize.value}`]: mergedSize.value,
|
|
134
142
|
[`${prefixCls.value}-${variant.value}`]: enableVariantCls.value
|
|
@@ -162,7 +170,7 @@ function generateRangePicker(generateConfig) {
|
|
|
162
170
|
"disabled": mergedDisabled.value,
|
|
163
171
|
"placement": placement,
|
|
164
172
|
"placeholder": getRangePlaceholder(locale$1.value, props.picker, placeholder),
|
|
165
|
-
"suffix":
|
|
173
|
+
"suffix": mergedSuffix,
|
|
166
174
|
"prefix": mergedPrefix,
|
|
167
175
|
"prevIcon": createVNode("span", { "class": `${prefixCls.value}-prev-icon` }, null),
|
|
168
176
|
"nextIcon": createVNode("span", { "class": `${prefixCls.value}-next-icon` }, null),
|
|
@@ -210,6 +218,10 @@ function generateRangePicker(generateConfig) {
|
|
|
210
218
|
};
|
|
211
219
|
}, {
|
|
212
220
|
props: {
|
|
221
|
+
components: {
|
|
222
|
+
type: Object,
|
|
223
|
+
required: false
|
|
224
|
+
},
|
|
213
225
|
locale: {
|
|
214
226
|
type: Object,
|
|
215
227
|
required: false
|
|
@@ -488,10 +500,6 @@ function generateRangePicker(generateConfig) {
|
|
|
488
500
|
type: String,
|
|
489
501
|
required: false
|
|
490
502
|
},
|
|
491
|
-
components: {
|
|
492
|
-
type: Object,
|
|
493
|
-
required: false
|
|
494
|
-
},
|
|
495
503
|
inputRender: {
|
|
496
504
|
type: Function,
|
|
497
505
|
required: false
|
|
@@ -18,6 +18,8 @@ interface DatePickerEmits<DateType = AnyObject> {
|
|
|
18
18
|
'keydown': (e: KeyboardEvent, preventDefault: VoidFunction) => void;
|
|
19
19
|
}
|
|
20
20
|
interface DatePickerSlots {
|
|
21
|
+
suffix?: () => any;
|
|
22
|
+
/** @deprecated Please use `suffix` instead */
|
|
21
23
|
suffixIcon?: () => any;
|
|
22
24
|
prefix?: () => any;
|
|
23
25
|
renderExtraFooter?: (mode: PickerMode) => any;
|
|
@@ -6,20 +6,21 @@ import { useCompactItemContext } from "../../space/Compact.js";
|
|
|
6
6
|
import { ContextIsolator } from "../../_util/ContextIsolator.js";
|
|
7
7
|
import { getAttrStyleAndClass } from "../../_util/hooks/useMergeSemantic.js";
|
|
8
8
|
import { useZIndex } from "../../_util/hooks/useZIndex.js";
|
|
9
|
+
import fallbackProp from "../../_util/fallbackProp.js";
|
|
9
10
|
import { getSlotPropsFnRun, toPropsRefs } from "../../_util/tools.js";
|
|
10
11
|
import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
11
12
|
import { useDisabledContext } from "../../config-provider/DisabledContext.js";
|
|
13
|
+
import { useVariants } from "../../form/hooks/useVariant.js";
|
|
12
14
|
import locale from "../locale/en_US.js";
|
|
13
15
|
import useLocale from "../../locale/useLocale.js";
|
|
14
16
|
import { omitUndefined } from "../../_util/omitUndefined.js";
|
|
15
17
|
import { getMergedStatus, getStatusClassNames } from "../../_util/statusUtils.js";
|
|
16
|
-
import { useVariants } from "../../form/hooks/useVariant.js";
|
|
17
18
|
import style_default from "../style/index.js";
|
|
18
19
|
import useMergedPickerSemantic from "../hooks/useMergedPickerSemantic.js";
|
|
19
20
|
import { getPlaceholder, useIcons } from "../util.js";
|
|
20
21
|
import { MONTH, MONTHPICKER, QUARTER, QUARTERPICKER, TIME, TIMEPICKER, WEEK, WEEKPICKER, YEAR, YEARPICKER } from "./constant.js";
|
|
21
|
-
import SuffixIcon from "./SuffixIcon.js";
|
|
22
22
|
import useComponents from "./useComponents.js";
|
|
23
|
+
import useSuffix from "./useSuffix.js";
|
|
23
24
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
24
25
|
import { clsx } from "@v-c/util";
|
|
25
26
|
import { getTransitionName } from "@v-c/util/dist/utils/transition";
|
|
@@ -31,7 +32,8 @@ function generatePicker(generateConfig) {
|
|
|
31
32
|
const name = displayName ? `A${displayName}` : "ADatePicker";
|
|
32
33
|
return /* @__PURE__ */ defineComponent((props, { slots, attrs, emit, expose }) => {
|
|
33
34
|
const { getPopupContainer: customGetPopupContainer, size: customizeSize, disabled: customDisabled, status: customStatus, variant: customVariant, classes, styles, rootClass, bordered } = toPropsRefs(props, "prefixCls", "getPopupContainer", "size", "disabled", "status", "variant", "classes", "styles", "rootClass", "bordered");
|
|
34
|
-
const { prefixCls, direction, getPopupContainer, rootPrefixCls, class: contextClassName, style: contextStyle, suffixIcon: contextSuffixIcon, allowClear: contextAllowClear, clearIcon: contextClearIcon } = useComponentBaseConfig(pickerType, props, [
|
|
35
|
+
const { prefixCls, direction, getPopupContainer, rootPrefixCls, class: contextClassName, style: contextStyle, suffix: contextSuffix, suffixIcon: contextSuffixIcon, allowClear: contextAllowClear, clearIcon: contextClearIcon } = useComponentBaseConfig(pickerType, props, [
|
|
36
|
+
"suffix",
|
|
35
37
|
"suffixIcon",
|
|
36
38
|
"allowClear",
|
|
37
39
|
"clearIcon"
|
|
@@ -114,6 +116,7 @@ function generatePicker(generateConfig) {
|
|
|
114
116
|
}).forEach(([oldProp, newProp]) => {
|
|
115
117
|
warning.deprecated(!props[oldProp], oldProp, newProp);
|
|
116
118
|
});
|
|
119
|
+
warning.deprecated(props.suffixIcon === void 0 && !slots.suffixIcon, "suffixIcon", "suffix");
|
|
117
120
|
}
|
|
118
121
|
expose({
|
|
119
122
|
focus: (options) => innerRef.value?.focus?.(options),
|
|
@@ -121,9 +124,10 @@ function generatePicker(generateConfig) {
|
|
|
121
124
|
nativeElement: computed(() => innerRef.value?.nativeElement)
|
|
122
125
|
});
|
|
123
126
|
return () => {
|
|
124
|
-
const { placeholder, components, placement, suffixIcon, prefix, allowClear, clearIcon, popupClassName: _popupClassName, dropdownClassName: _dropdownClassName, popupStyle: _popupStyle, rootClass: _rootClass, classes: _classes, styles: _styles, status: _status, variant: _variant, bordered: _bordered, size: _size, disabled: _disabled, locale: _locale, getPopupContainer: _getPopupContainer, autoComplete, autocomplete, ...restProps } = props;
|
|
127
|
+
const { placeholder, components, placement, suffix, suffixIcon, prefix, allowClear, clearIcon, popupClassName: _popupClassName, dropdownClassName: _dropdownClassName, popupStyle: _popupStyle, rootClass: _rootClass, classes: _classes, styles: _styles, status: _status, variant: _variant, bordered: _bordered, size: _size, disabled: _disabled, locale: _locale, getPopupContainer: _getPopupContainer, autoComplete, autocomplete, ...restProps } = props;
|
|
125
128
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs, void 0, props);
|
|
126
|
-
const
|
|
129
|
+
const customSuffix = getSlotPropsFnRun(slots, { suffix }, "suffix", false);
|
|
130
|
+
const customSuffixIcon = getSlotPropsFnRun(slots, { suffixIcon }, "suffixIcon", false);
|
|
127
131
|
const mergedPrefix = getSlotPropsFnRun(slots, { prefix }, "prefix", false);
|
|
128
132
|
const [mergedAllowClear, removeIcon] = useIcons({
|
|
129
133
|
allowClear,
|
|
@@ -132,16 +136,16 @@ function generatePicker(generateConfig) {
|
|
|
132
136
|
}, prefixCls.value, {
|
|
133
137
|
allowClear: contextAllowClear?.value,
|
|
134
138
|
clearIcon: contextClearIcon?.value
|
|
135
|
-
});
|
|
139
|
+
}, locale$1.value?.lang?.clear);
|
|
136
140
|
const mergedComponents = useComponents(components);
|
|
137
141
|
const { hasFeedback, status: contextStatus, feedbackIcon } = useFormItemInputContext().value;
|
|
138
142
|
const mergedStatus = getMergedStatus(contextStatus, customStatus.value);
|
|
139
|
-
const
|
|
143
|
+
const mergedSuffix = useSuffix({
|
|
140
144
|
picker: mergedPicker.value,
|
|
141
145
|
hasFeedback,
|
|
142
146
|
feedbackIcon,
|
|
143
|
-
|
|
144
|
-
}
|
|
147
|
+
suffix: fallbackProp(customSuffix, customSuffixIcon, contextSuffix?.value, contextSuffixIcon?.value)
|
|
148
|
+
});
|
|
145
149
|
const mergedClassName = clsx({
|
|
146
150
|
[`${prefixCls.value}-${mergedSize.value}`]: mergedSize.value,
|
|
147
151
|
[`${prefixCls.value}-${variant.value}`]: enableVariantCls.value
|
|
@@ -166,7 +170,7 @@ function generatePicker(generateConfig) {
|
|
|
166
170
|
"ref": innerRef,
|
|
167
171
|
"autoComplete": autoComplete ?? autocomplete,
|
|
168
172
|
"placeholder": getPlaceholder(locale$1.value, mergedPicker.value, placeholder),
|
|
169
|
-
"suffix":
|
|
173
|
+
"suffix": mergedSuffix,
|
|
170
174
|
"prefix": mergedPrefix,
|
|
171
175
|
"placement": placement,
|
|
172
176
|
"prevIcon": createVNode("span", { "class": `${prefixCls.value}-prev-icon` }, null),
|
|
@@ -217,6 +221,10 @@ function generatePicker(generateConfig) {
|
|
|
217
221
|
};
|
|
218
222
|
}, {
|
|
219
223
|
props: {
|
|
224
|
+
components: {
|
|
225
|
+
type: Object,
|
|
226
|
+
required: false
|
|
227
|
+
},
|
|
220
228
|
locale: {
|
|
221
229
|
type: Object,
|
|
222
230
|
required: false
|
|
@@ -486,10 +494,6 @@ function generatePicker(generateConfig) {
|
|
|
486
494
|
type: String,
|
|
487
495
|
required: false
|
|
488
496
|
},
|
|
489
|
-
components: {
|
|
490
|
-
type: Object,
|
|
491
|
-
required: false
|
|
492
|
-
},
|
|
493
497
|
inputRender: {
|
|
494
498
|
type: Function,
|
|
495
499
|
required: false
|
|
@@ -5,8 +5,8 @@ import { SizeType } from "../../config-provider/SizeContext.js";
|
|
|
5
5
|
import { InputStatus } from "../../_util/statusUtils.js";
|
|
6
6
|
import { TimePickerLocale } from "../../time-picker/index.js";
|
|
7
7
|
import { Variant } from "../../config-provider/context.js";
|
|
8
|
-
import { CSSProperties, Ref } from "vue";
|
|
9
|
-
import { Locale, PickerProps as PickerProps$1, PickerRef, RangePickerProps as RangePickerProps$1 } from "@v-c/picker";
|
|
8
|
+
import { CSSProperties, Component, Ref } from "vue";
|
|
9
|
+
import { Components, Locale, PickerProps as PickerProps$1, PickerRef, RangePickerProps as RangePickerProps$1 } from "@v-c/picker";
|
|
10
10
|
//#region src/date-picker/generatePicker/interface.d.ts
|
|
11
11
|
declare const _DataPickerPlacements: readonly ["bottomLeft", "bottomRight", "topLeft", "topRight"];
|
|
12
12
|
type DataPickerPlacement = (typeof _DataPickerPlacements)[number];
|
|
@@ -154,9 +154,21 @@ interface BaseDefaultProps<Props> {
|
|
|
154
154
|
autocomplete?: string;
|
|
155
155
|
}
|
|
156
156
|
/** Base Single Picker props */
|
|
157
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Custom panel / button / input components. Like React's `ComponentType<SharedPanelProps>`,
|
|
159
|
+
* a component that only declares the panel props it uses is accepted.
|
|
160
|
+
*/
|
|
161
|
+
type PickerComponents = Partial<Record<Exclude<keyof Components, 'button' | 'input'>, Component>> & {
|
|
162
|
+
button?: Component | string;
|
|
163
|
+
input?: Component | string;
|
|
164
|
+
};
|
|
165
|
+
interface PickerProps<DateType extends AnyObject = any> extends BaseDefaultProps<DateType>, Omit<PickerProps$1, 'placement' | 'locale' | 'generateConfig' | 'hideHeader' | 'classNames' | 'styles' | 'components' | RcEventKeys | 'className' | 'style' | 'rootClassName'> {
|
|
166
|
+
components?: PickerComponents;
|
|
167
|
+
}
|
|
158
168
|
/** Base Range Picker props */
|
|
159
|
-
interface RangePickerProps<DateType extends AnyObject = any> extends BaseDefaultProps<DateType>, Omit<RangePickerProps$1<DateType>, 'placement' | 'locale' | 'generateConfig' | 'hideHeader' | 'classNames' | 'styles' | RcEventKeys | 'className' | 'style' | 'rootClassName'> {
|
|
169
|
+
interface RangePickerProps<DateType extends AnyObject = any> extends BaseDefaultProps<DateType>, Omit<RangePickerProps$1<DateType>, 'placement' | 'locale' | 'generateConfig' | 'hideHeader' | 'classNames' | 'styles' | 'components' | RcEventKeys | 'className' | 'style' | 'rootClassName'> {
|
|
170
|
+
components?: PickerComponents;
|
|
171
|
+
}
|
|
160
172
|
type GenericTimePickerProps<DateType extends AnyObject = any> = Omit<PickerProps<DateType>, 'picker' | 'showTime'>;
|
|
161
173
|
type MultiValueType<ValueType, IsMultiple extends boolean = false> = IsMultiple extends true ? ValueType[] : ValueType;
|
|
162
174
|
/**
|
|
@@ -170,4 +182,4 @@ type PickerPropsWithMultiple<DateType extends AnyObject = any, InnerPickerProps
|
|
|
170
182
|
value?: MultiValueType<ValueType, IsMultiple> | null;
|
|
171
183
|
};
|
|
172
184
|
//#endregion
|
|
173
|
-
export { AdditionalPickerLocaleLangProps, AdditionalPickerLocaleProps, BaseDefaultProps, DatePickerClassNamesType, DatePickerPanelSemanticClassNames, DatePickerPanelSemanticName, DatePickerPanelSemanticStyles, DatePickerSemanticClassNames, DatePickerSemanticName, DatePickerSemanticStyles, DatePickerStylesType, GenericTimePickerProps, InjectDefaultProps, PickerLocale, PickerProps, PickerPropsWithMultiple, type PickerRef, RangePickerProps, RequiredSemanticPicker };
|
|
185
|
+
export { AdditionalPickerLocaleLangProps, AdditionalPickerLocaleProps, BaseDefaultProps, DatePickerClassNamesType, DatePickerPanelSemanticClassNames, DatePickerPanelSemanticName, DatePickerPanelSemanticStyles, DatePickerSemanticClassNames, DatePickerSemanticName, DatePickerSemanticStyles, DatePickerStylesType, GenericTimePickerProps, InjectDefaultProps, PickerComponents, PickerLocale, PickerProps, PickerPropsWithMultiple, type PickerRef, RangePickerProps, RequiredSemanticPicker };
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import { ButtonProps } from "../../button/Button.js";
|
|
2
|
-
import "../../index.js";
|
|
3
1
|
import { Components } from "@v-c/picker";
|
|
4
2
|
//#region src/date-picker/generatePicker/useComponents.d.ts
|
|
5
|
-
declare function useComponents(components?: Components):
|
|
6
|
-
time?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
7
|
-
year?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
8
|
-
month?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
9
|
-
date?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
10
|
-
week?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
11
|
-
quarter?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
12
|
-
decade?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
13
|
-
datetime?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
14
|
-
button: string | import("vue").DefineSetupFnComponent<ButtonProps, {}, {}, ButtonProps & {}, import("vue").PublicProps> | import("vue").DefineComponent;
|
|
15
|
-
input?: (import("vue").DefineComponent | string) | undefined;
|
|
16
|
-
};
|
|
3
|
+
declare function useComponents(components?: Components): Components;
|
|
17
4
|
//#endregion
|
|
18
5
|
export { useComponents as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VueNode } from "../../_util/type.js";
|
|
2
|
+
import { PickerMode } from "@v-c/picker";
|
|
3
|
+
//#region src/date-picker/generatePicker/useSuffix.d.ts
|
|
4
|
+
interface UseSuffixProps {
|
|
5
|
+
picker?: PickerMode;
|
|
6
|
+
hasFeedback?: boolean;
|
|
7
|
+
feedbackIcon?: VueNode;
|
|
8
|
+
suffix?: VueNode;
|
|
9
|
+
}
|
|
10
|
+
declare function useSuffix({ picker, hasFeedback, feedbackIcon, suffix }: UseSuffixProps): VueNode;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { UseSuffixProps, useSuffix as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TIME } from "./constant.js";
|
|
2
|
+
import { Fragment, createVNode } from "vue";
|
|
3
|
+
import { CalendarOutlined, ClockCircleOutlined } from "@antdv-next/icons";
|
|
4
|
+
//#region src/date-picker/generatePicker/useSuffix.tsx
|
|
5
|
+
function useSuffix({ picker, hasFeedback, feedbackIcon, suffix }) {
|
|
6
|
+
if (suffix === null || suffix === false) return null;
|
|
7
|
+
if (suffix === true || suffix === void 0) return createVNode(Fragment, null, [picker === TIME ? createVNode(ClockCircleOutlined, { "aria-hidden": "true" }, null) : createVNode(CalendarOutlined, { "aria-hidden": "true" }, null), hasFeedback ? feedbackIcon : null]);
|
|
8
|
+
return suffix;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { useSuffix as default };
|
|
@@ -4,6 +4,7 @@ import { ComponentToken, PanelComponentToken, PickerPanelToken, initPanelCompone
|
|
|
4
4
|
import { genPanelStyle } from "./panel.js";
|
|
5
5
|
import { ComponentTokenMap } from "../../theme/interface/components.js";
|
|
6
6
|
import "../../theme/interface/index.js";
|
|
7
|
+
import "../../theme/internal.js";
|
|
7
8
|
//#region src/date-picker/style/index.d.ts
|
|
8
9
|
declare const _default: (prefixCls: import("vue").Ref<string>, rootCls?: import("vue").Ref<string | undefined>, tokenResult?: import("@antdv-next/cssinjs").UseTokenReturn<ComponentTokenMap, AliasToken, SeedToken> | undefined) => readonly [import("vue").Ref<string, string>, import("vue").ComputedRef<string | undefined>];
|
|
9
10
|
//#endregion
|
|
@@ -9,7 +9,7 @@ declare function getRangePlaceholder(locale: PickerLocale, picker?: PickerMode,
|
|
|
9
9
|
declare function useIcons(props: Pick<PickerProps$1, 'allowClear' | 'clearIcon' | 'removeIcon'>, prefixCls: string, context?: {
|
|
10
10
|
allowClear?: AllowClear;
|
|
11
11
|
clearIcon?: VueNode;
|
|
12
|
-
}): readonly [false, string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null] | readonly [{
|
|
12
|
+
}, defaultLabel?: string): readonly [false, string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null] | readonly [{
|
|
13
13
|
readonly disabled?: boolean;
|
|
14
14
|
readonly tabIndex?: number;
|
|
15
15
|
readonly label?: string;
|
package/dist/date-picker/util.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import useIcons$1 from "../select/useIcons.js";
|
|
2
1
|
import useAllowClear from "../_util/hooks/useAllowClear.js";
|
|
2
|
+
import useIcons$1 from "../select/useIcons.js";
|
|
3
3
|
import { cloneVNode, isVNode } from "vue";
|
|
4
4
|
//#region src/date-picker/util.ts
|
|
5
5
|
function getPlaceholder(locale, picker, customizePlaceholder) {
|
|
@@ -20,7 +20,7 @@ function getRangePlaceholder(locale, picker, customizePlaceholder) {
|
|
|
20
20
|
if (picker === "time" && locale.timePickerLocale.rangePlaceholder) return locale.timePickerLocale.rangePlaceholder;
|
|
21
21
|
return locale.lang.rangePlaceholder;
|
|
22
22
|
}
|
|
23
|
-
function useIcons(props, prefixCls, context) {
|
|
23
|
+
function useIcons(props, prefixCls, context, defaultLabel) {
|
|
24
24
|
const { removeIcon } = useIcons$1({
|
|
25
25
|
...props,
|
|
26
26
|
prefixCls,
|
|
@@ -31,7 +31,8 @@ function useIcons(props, prefixCls, context) {
|
|
|
31
31
|
clearIcon: props.clearIcon,
|
|
32
32
|
contextAllowClear: context?.allowClear,
|
|
33
33
|
contextClearIcon: context?.clearIcon,
|
|
34
|
-
defaultAllowClear: true
|
|
34
|
+
defaultAllowClear: true,
|
|
35
|
+
defaultLabel
|
|
35
36
|
});
|
|
36
37
|
if (!mergedAllowClear) return [false, removeIcon];
|
|
37
38
|
const { clearIcon: mergedClearIcon, ...rest } = mergedAllowClear;
|
|
@@ -8,22 +8,22 @@ declare function useItems(screens: Ref<ScreenMap>, items: Ref<DescriptionsItemTy
|
|
|
8
8
|
filled: boolean;
|
|
9
9
|
_$index: number;
|
|
10
10
|
key?: import("@v-c/util/dist/type").Key;
|
|
11
|
-
class?: string | undefined;
|
|
12
|
-
style?: import("vue").CSSProperties | undefined;
|
|
13
|
-
label?: VueNode;
|
|
14
11
|
classes?: CellSemanticClassNames | undefined;
|
|
15
12
|
styles?: CellSemanticStyles | undefined;
|
|
13
|
+
style?: import("vue").CSSProperties | undefined;
|
|
16
14
|
rootClass?: string | undefined;
|
|
15
|
+
label?: VueNode;
|
|
16
|
+
class?: string | undefined;
|
|
17
17
|
content?: VueNode;
|
|
18
18
|
} | {
|
|
19
19
|
span: number | undefined;
|
|
20
20
|
key?: import("@v-c/util/dist/type").Key;
|
|
21
|
-
class?: string | undefined;
|
|
22
|
-
style?: import("vue").CSSProperties | undefined;
|
|
23
|
-
label?: VueNode;
|
|
24
21
|
classes?: CellSemanticClassNames | undefined;
|
|
25
22
|
styles?: CellSemanticStyles | undefined;
|
|
23
|
+
style?: import("vue").CSSProperties | undefined;
|
|
26
24
|
rootClass?: string | undefined;
|
|
25
|
+
label?: VueNode;
|
|
26
|
+
class?: string | undefined;
|
|
27
27
|
content?: VueNode;
|
|
28
28
|
_$index: number;
|
|
29
29
|
})[]>;
|
|
@@ -16,7 +16,7 @@ import Row from "./Row.js";
|
|
|
16
16
|
import style_default from "./style/index.js";
|
|
17
17
|
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
|
|
18
18
|
import { classNames } from "@v-c/util";
|
|
19
|
-
import { omit } from "es-toolkit";
|
|
19
|
+
import { omit as omit$1 } from "es-toolkit";
|
|
20
20
|
//#region src/descriptions/index.tsx
|
|
21
21
|
const Descriptions = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
|
|
22
22
|
const { class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, prefixCls, direction } = useComponentBaseConfig("descriptions", props);
|
|
@@ -83,7 +83,7 @@ const Descriptions = /* @__PURE__ */ defineComponent((props, { slots, attrs, exp
|
|
|
83
83
|
}, attrs.class, rootClass, hashId.value, cssVarCls.value),
|
|
84
84
|
"id": props.id,
|
|
85
85
|
"style": [mergedStyles.value.root, attrs.style]
|
|
86
|
-
}, omit(attrs, ["class", "style"])), [(hasTitle || hasExtra) && createVNode("div", {
|
|
86
|
+
}, omit$1(attrs, ["class", "style"])), [(hasTitle || hasExtra) && createVNode("div", {
|
|
87
87
|
"class": classNames(`${prefixCls.value}-header`, mergedClassNames.value?.header),
|
|
88
88
|
"style": mergedStyles.value.header
|
|
89
89
|
}, [hasTitle && createVNode("div", {
|