antdv-next 1.5.0 → 1.5.2
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/useClosable.d.ts +4 -2
- package/dist/_util/hooks/useClosable.js +9 -3
- package/dist/_util/hooks/useMergeSemantic.d.ts +7 -4
- package/dist/_util/hooks/useMergeSemantic.js +8 -3
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/vueNode.d.ts +2 -6
- package/dist/alert/style/index.d.ts +5 -0
- package/dist/alert/style/index.js +2 -1
- package/dist/anchor/Anchor.js +12 -6
- package/dist/antd-with-locales.esm.js +12799 -12587
- package/dist/antd-with-locales.js +82 -82
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +10540 -10546
- package/dist/antd.js +57 -57
- package/dist/avatar/AvatarGroup.d.ts +4 -1
- package/dist/avatar/AvatarGroup.js +6 -4
- package/dist/avatar/index.d.ts +2 -2
- package/dist/badge/Ribbon.d.ts +4 -1
- package/dist/badge/Ribbon.js +11 -11
- package/dist/badge/index.d.ts +3 -2
- package/dist/badge/index.js +26 -24
- package/dist/border-beam/BorderBeam.d.ts +1 -0
- package/dist/border-beam/BorderBeam.js +30 -11
- package/dist/border-beam/hooks/useBorderSize.d.ts +3 -7
- package/dist/border-beam/hooks/useBorderSize.js +25 -26
- package/dist/border-beam/style/index.js +9 -8
- package/dist/border-beam/util.d.ts +3 -1
- package/dist/border-beam/util.js +4 -1
- package/dist/breadcrumb/Breadcrumb.d.ts +4 -1
- package/dist/breadcrumb/Breadcrumb.js +12 -7
- package/dist/breadcrumb/index.d.ts +2 -2
- package/dist/button/Button.js +5 -14
- package/dist/button/buttonHelper.d.ts +1 -1
- package/dist/button/style/index.js +0 -1
- package/dist/calendar/generateCalendar.d.ts +4 -1
- package/dist/calendar/generateCalendar.js +8 -5
- package/dist/calendar/index.d.ts +2 -2
- package/dist/calendar/locale/sq_AL.d.ts +2 -0
- package/dist/calendar/locale/sq_AL.js +5 -0
- package/dist/card/CardGrid.d.ts +4 -1
- package/dist/card/CardGrid.js +7 -4
- package/dist/card/CardMeta.d.ts +4 -1
- package/dist/card/CardMeta.js +5 -3
- package/dist/card/index.d.ts +3 -3
- package/dist/carousel/index.d.ts +1 -0
- package/dist/carousel/index.js +13 -10
- package/dist/collapse/Collapse.js +2 -4
- package/dist/color-picker/ColorPicker.js +4 -7
- package/dist/color-picker/components/ColorTrigger.js +1 -1
- package/dist/color-picker/style/index.js +1 -0
- package/dist/components.d.ts +25 -21
- package/dist/components.js +4 -3
- package/dist/config-provider/context.d.ts +24 -8
- package/dist/config-provider/define.d.ts +2 -1
- package/dist/config-provider/index.js +10 -0
- package/dist/date-picker/generatePicker/generateRangePicker.js +6 -7
- package/dist/date-picker/generatePicker/generateSinglePicker.js +2 -5
- package/dist/date-picker/generatePicker/useComponents.d.ts +2 -2
- package/dist/date-picker/hooks/useMergedPickerSemantic.d.ts +1 -1
- package/dist/date-picker/hooks/useMergedPickerSemantic.js +7 -3
- package/dist/date-picker/locale/sq_AL.d.ts +6 -0
- package/dist/date-picker/locale/sq_AL.js +72 -0
- package/dist/date-picker/locale/zh_TW.js +2 -2
- package/dist/date-picker/util.d.ts +2 -6
- package/dist/descriptions/hooks/useItems.d.ts +4 -4
- package/dist/descriptions/index.d.ts +4 -1
- package/dist/descriptions/index.js +5 -2
- package/dist/divider/index.d.ts +4 -1
- package/dist/divider/index.js +9 -6
- package/dist/drawer/DrawerPanel.js +5 -3
- package/dist/drawer/index.js +9 -13
- package/dist/drawer/style/index.js +1 -0
- package/dist/dropdown/dropdown.js +4 -6
- package/dist/empty/index.d.ts +4 -1
- package/dist/empty/index.js +5 -2
- package/dist/float-button/BackTop.d.ts +2 -0
- package/dist/float-button/BackTop.js +25 -43
- package/dist/float-button/FloatButtonGroup.d.ts +4 -1
- package/dist/float-button/FloatButtonGroup.js +5 -4
- package/dist/float-button/hooks/useScroll.d.ts +16 -0
- package/dist/float-button/hooks/useScroll.js +80 -0
- package/dist/float-button/index.d.ts +2 -2
- package/dist/float-button/style/button.js +23 -0
- package/dist/form/ErrorList.js +2 -2
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.js +26 -28
- package/dist/form/context.d.ts +1 -1
- package/dist/form/hooks/useVariant.d.ts +2 -2
- package/dist/form/hooks/useVariant.js +15 -5
- package/dist/form/style/index.js +25 -12
- package/dist/form/types.d.ts +11 -3
- package/dist/form/utils/validateUtil.js +4 -0
- package/dist/image/hooks/usePreviewConfig.d.ts +5 -4
- package/dist/image/index.js +8 -9
- package/dist/index.d.ts +25 -21
- package/dist/index.js +2 -2
- package/dist/input/OTP/index.js +6 -3
- package/dist/input/Password.js +4 -1
- package/dist/input/Search.js +11 -6
- package/dist/input/index.d.ts +1 -1
- package/dist/input/style/token.js +2 -1
- package/dist/input/style/variants.js +1 -1
- package/dist/listy/interface.d.ts +3 -2
- package/dist/listy/style/index.js +5 -1
- package/dist/locale/en_US.js +4 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/is_IS.js +1 -1
- package/dist/locale/mn_MN.js +1 -1
- package/dist/locale/sq_AL.d.ts +5 -0
- package/dist/locale/sq_AL.js +151 -0
- package/dist/locale/zh_CN.js +4 -0
- package/dist/locale/zh_TW.js +41 -41
- package/dist/masonry/Masonry.js +4 -4
- package/dist/mentions/index.d.ts +1 -0
- package/dist/mentions/index.js +4 -0
- package/dist/menu/MenuItem.js +12 -2
- package/dist/menu/SubMenu.d.ts +1 -1
- package/dist/menu/style/vertical.js +2 -6
- package/dist/message/useMessage.js +4 -4
- package/dist/modal/PurePanel.js +4 -7
- package/dist/notification/index.js +2 -1
- package/dist/notification/useNotification.js +12 -9
- package/dist/package.js +1 -1
- package/dist/package.json.d.ts +4 -0
- package/dist/pagination/Pagination.js +14 -6
- package/dist/pagination/index.d.ts +2 -2
- package/dist/pagination/interface.d.ts +20 -3
- package/dist/popconfirm/index.js +17 -8
- package/dist/popover/PurePanel.js +10 -0
- package/dist/popover/index.js +24 -16
- package/dist/qrcode/index.d.ts +4 -1
- package/dist/qrcode/index.js +16 -13
- package/dist/radio/group.js +2 -2
- package/dist/rate/style/index.js +12 -9
- package/dist/result/index.d.ts +4 -1
- package/dist/result/index.js +7 -4
- package/dist/select/index.js +1 -1
- package/dist/select/style/dropdown.js +4 -0
- package/dist/select/style/index.js +1 -1
- package/dist/select/style/select-input.js +1 -1
- package/dist/select/style/token.js +4 -2
- package/dist/select/useIcons.d.ts +2 -6
- package/dist/skeleton/Skeleton.d.ts +4 -1
- package/dist/skeleton/Skeleton.js +10 -4
- package/dist/skeleton/index.d.ts +2 -2
- package/dist/slider/SliderTooltip.js +5 -0
- package/dist/slider/index.d.ts +5 -1
- package/dist/slider/index.js +9 -9
- package/dist/space/Compact.d.ts +5 -2
- package/dist/space/Compact.js +8 -3
- package/dist/space/index.d.ts +2 -2
- package/dist/space/index.js +3 -3
- package/dist/spin/index.d.ts +4 -1
- package/dist/spin/index.js +7 -5
- package/dist/splitter/Splitter.d.ts +4 -1
- package/dist/splitter/Splitter.js +4 -2
- package/dist/splitter/index.d.ts +2 -2
- package/dist/splitter/style/index.js +2 -1
- package/dist/statistic/Statistic.d.ts +4 -1
- package/dist/statistic/index.d.ts +2 -2
- package/dist/steps/index.js +6 -8
- package/dist/steps/style/index.js +2 -1
- package/dist/table/InternalTable.js +5 -4
- package/dist/table/hooks/useFilter/FilterDropdown.js +2 -2
- package/dist/table/style/radius.js +4 -0
- package/dist/table/style/virtual.js +4 -0
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tag/index.js +3 -3
- package/dist/theme/interface/seeds.d.ts +8 -0
- package/dist/theme/themes/seed.js +1 -0
- package/dist/theme/util/alias.js +1 -1
- package/dist/time-picker/locale/sq_AL.d.ts +5 -0
- package/dist/time-picker/locale/sq_AL.js +7 -0
- package/dist/timeline/Timeline.js +5 -7
- package/dist/tooltip/PurePanel.js +5 -0
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +27 -13
- package/dist/tour/index.js +10 -13
- package/dist/tour/panelRender.js +2 -8
- package/dist/transfer/ListBody.js +2 -1
- package/dist/transfer/ListItem.d.ts +1 -0
- package/dist/transfer/ListItem.js +6 -2
- package/dist/transfer/Transfer.d.ts +4 -1
- package/dist/transfer/Transfer.js +5 -2
- package/dist/transfer/index.d.ts +2 -2
- package/dist/transfer/search.js +2 -2
- package/dist/tree/index.d.ts +3 -2
- package/dist/tree/index.js +3 -2
- package/dist/tree/style/index.js +4 -0
- package/dist/tree/utils/dictUtil.js +3 -2
- package/dist/typography/Base/EllipsisTooltip.d.ts +6 -1
- package/dist/typography/Base/EllipsisTooltip.js +2 -2
- package/dist/typography/Base/index.js +9 -26
- package/dist/typography/hooks/useCopyClick.d.ts +1 -1
- package/dist/typography/hooks/useCopyClick.js +5 -15
- package/dist/upload/Upload.js +7 -9
- package/dist/upload/UploadList/ListItem.js +6 -13
- package/dist/upload/UploadList/index.js +8 -2
- package/dist/upload/index.d.ts +2 -2
- package/dist/version/token-meta.json +1 -0
- package/dist/version/token.json +1 -0
- package/dist/watermark/index.d.ts +4 -1
- package/dist/watermark/index.js +2 -1
- package/package.json +13 -9
- package/web-tags.json +1980 -1947
- package/web-types.json +5808 -5730
- package/dist/slider/useRafLock.d.ts +0 -5
- package/dist/slider/useRafLock.js +0 -23
|
@@ -43,7 +43,7 @@ import { BadgeProps } from "../badge/index.js";
|
|
|
43
43
|
import { BreadcrumbProps } from "../breadcrumb/Breadcrumb.js";
|
|
44
44
|
import { CalendarProps } from "../calendar/generateCalendar.js";
|
|
45
45
|
import "../calendar/index.js";
|
|
46
|
-
import { TabsProps } from "../tabs/index.js";
|
|
46
|
+
import { TabsProps as TabsProps$1 } from "../tabs/index.js";
|
|
47
47
|
import { CardProps } from "../card/Card.js";
|
|
48
48
|
import { CardMetaProps } from "../card/CardMeta.js";
|
|
49
49
|
import { CascaderProps } from "../cascader/index.js";
|
|
@@ -62,6 +62,7 @@ import { ImageProps } from "../image/index.js";
|
|
|
62
62
|
import { InputNumberProps } from "../input-number/index.js";
|
|
63
63
|
import { InputProps } from "../input/Input.js";
|
|
64
64
|
import { OTPProps } from "../input/OTP/index.js";
|
|
65
|
+
import { PasswordProps } from "../input/Password.js";
|
|
65
66
|
import { SearchProps } from "../input/Search.js";
|
|
66
67
|
import { TextAreaProps } from "../input/TextArea.js";
|
|
67
68
|
import { ListyProps } from "../listy/interface.js";
|
|
@@ -91,6 +92,7 @@ import { ButtonProps } from "../button/Button.js";
|
|
|
91
92
|
import "../button/index.js";
|
|
92
93
|
import { CSSProperties, Ref } from "vue";
|
|
93
94
|
import { DerivativeFunc } from "@antdv-next/cssinjs";
|
|
95
|
+
import { MoreProps } from "@v-c/tabs";
|
|
94
96
|
//#region src/config-provider/context.d.ts
|
|
95
97
|
declare const defaultPrefixCls = "ant";
|
|
96
98
|
declare const defaultIconPrefixCls = "anticon";
|
|
@@ -261,16 +263,17 @@ type FloatButtonConfig = ComponentStyleConfig & Pick<FloatButtonProps, 'classes'
|
|
|
261
263
|
type FloatButtonGroupConfig = ComponentStyleConfig & Pick<FloatButtonGroupProps, 'classes' | 'styles'> & {
|
|
262
264
|
closeIcon?: VueNode;
|
|
263
265
|
};
|
|
264
|
-
|
|
266
|
+
interface TooltipUniqueConfig {
|
|
265
267
|
/**
|
|
266
268
|
* @descCN 是否开启 Tooltip 流畅过渡动画
|
|
267
269
|
* @descEN Whether to enable smooth transition for tooltips
|
|
268
270
|
* @default false
|
|
269
271
|
*/
|
|
270
272
|
unique?: boolean;
|
|
271
|
-
}
|
|
272
|
-
type
|
|
273
|
-
type
|
|
273
|
+
}
|
|
274
|
+
type TooltipConfig = ComponentStyleConfig & Pick<TooltipProps, 'styles' | 'classes' | 'arrow' | 'trigger' | 'mouseEnterDelay' | 'mouseLeaveDelay'> & TooltipUniqueConfig;
|
|
275
|
+
type PopoverConfig = ComponentStyleConfig & Pick<PopoverProps, 'classes' | 'styles' | 'arrow' | 'trigger' | 'mouseEnterDelay' | 'mouseLeaveDelay'>;
|
|
276
|
+
type PopconfirmConfig = ComponentStyleConfig & Pick<PopconfirmProps, 'classes' | 'styles' | 'arrow' | 'trigger' | 'mouseEnterDelay' | 'mouseLeaveDelay'>;
|
|
274
277
|
type SegmentedConfig = ComponentStyleConfig & Pick<SegmentedProps, 'classes' | 'styles'>;
|
|
275
278
|
type MenuConfig = ComponentStyleConfig & Pick<MenuProps, 'expandIcon' | 'classes' | 'styles'>;
|
|
276
279
|
type TourConfig = ComponentStyleConfig & Pick<TourProps, 'closeIcon' | 'classes' | 'styles'>;
|
|
@@ -287,10 +290,22 @@ type InputConfig = ComponentStyleConfig & Pick<InputProps, 'autoComplete' | 'aut
|
|
|
287
290
|
type InputNumberConfig = ComponentStyleConfig & Pick<InputNumberProps, 'classes' | 'styles' | 'variant'>;
|
|
288
291
|
type TextAreaConfig = ComponentStyleConfig & Pick<TextAreaProps, 'classes' | 'styles' | 'allowClear' | 'variant' | 'changeOnComposing'>;
|
|
289
292
|
type MentionsConfig = ComponentStyleConfig & Pick<TextAreaProps, 'classes' | 'styles' | 'allowClear' | 'variant'>;
|
|
290
|
-
type InputSearchConfig = ComponentStyleConfig & Pick<SearchProps, 'classes' | 'styles' | 'searchIcon'>;
|
|
293
|
+
type InputSearchConfig = ComponentStyleConfig & Pick<SearchProps, 'classes' | 'styles' | 'searchIcon' | 'variant'>;
|
|
294
|
+
/**
|
|
295
|
+
* Only `variant` is consumed for now: Input.Password does not read semantic
|
|
296
|
+
* class/style context yet, so exposing them here would be misleading.
|
|
297
|
+
*/
|
|
298
|
+
type InputPasswordConfig = Pick<PasswordProps, 'variant'>;
|
|
291
299
|
type OTPConfig = ComponentStyleConfig & Pick<OTPProps, 'classes' | 'styles' | 'variant'>;
|
|
292
300
|
type SliderConfig = ComponentStyleConfig & Pick<SliderProps, 'styles' | 'classes'>;
|
|
293
|
-
|
|
301
|
+
interface TabsMoreConfig {
|
|
302
|
+
/**
|
|
303
|
+
* `popupRender` is intentionally excluded: it is a per-instance render
|
|
304
|
+
* function and makes no sense as a global configuration.
|
|
305
|
+
*/
|
|
306
|
+
more?: Omit<MoreProps, 'popupRender'>;
|
|
307
|
+
}
|
|
308
|
+
type TabsConfig = ComponentStyleConfig & Pick<TabsProps$1, 'indicator' | 'indicatorSize' | 'moreIcon' | 'addIcon' | 'removeIcon' | 'classes' | 'styles'> & TabsMoreConfig;
|
|
294
309
|
type SelectConfig = ComponentStyleConfig & Pick<SelectProps, 'showSearch' | 'variant' | 'classes' | 'styles' | 'allowClear' | 'suffixIcon' | 'removeIcon'> & {
|
|
295
310
|
clearIcon?: any;
|
|
296
311
|
loadingIcon?: any;
|
|
@@ -358,6 +373,7 @@ interface ConfigComponentProps {
|
|
|
358
373
|
mentions?: MentionsConfig;
|
|
359
374
|
pagination?: PaginationConfig;
|
|
360
375
|
inputSearch?: InputSearchConfig;
|
|
376
|
+
inputPassword?: InputPasswordConfig;
|
|
361
377
|
otp?: OTPConfig;
|
|
362
378
|
space?: SpaceConfig;
|
|
363
379
|
splitter?: SplitterConfig;
|
|
@@ -499,4 +515,4 @@ declare function useComponentBaseConfig<T extends keyof ConfigComponentProps, K
|
|
|
499
515
|
popupOverflow: import("vue").ComputedRef<PopupOverflow | undefined>;
|
|
500
516
|
};
|
|
501
517
|
//#endregion
|
|
502
|
-
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, 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, TagConfig, TextAreaConfig, Theme, ThemeConfig, TimePickerConfig, TimelineConfig, TooltipConfig, TourConfig, TransferConfig, TreeConfig, TreeSelectConfig, TriggerType, TypographyConfig, UploadConfig, Variant, Variants, WaveConfig, defaultIconPrefixCls, defaultPrefixCls, useBaseConfig, useComponentBaseConfig, useComponentConfig, useConfig, useConfigProvider };
|
|
518
|
+
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 };
|
|
@@ -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, CascaderConfig, CheckboxConfig, CollapseConfig, ColorPickerConfig, ComponentStyleConfig, DatePickerConfig, DescriptionsConfig, DirectionType, DividerConfig, DrawerConfig, DropdownConfig, EmptyConfig, FlexConfig, FloatButtonConfig, FloatButtonGroupConfig, FormConfig, ImageConfig, InputConfig, InputNumberConfig, InputSearchConfig, ListyConfig, MasonryConfig, MentionsConfig, MenuConfig, ModalConfig, NotificationConfig, OTPConfig, PaginationConfig, PopconfirmConfig, PopoverConfig, PopupOverflow, ProgressConfig, RadioConfig, RangePickerConfig, ResultConfig, 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, BadgeConfig, BreadcrumbConfig, ButtonConfig, CSPConfig, CalendarConfig, CardConfig, 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, 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;
|
|
@@ -25,6 +25,7 @@ interface ConfigProviderProps {
|
|
|
25
25
|
textArea?: TextAreaConfig;
|
|
26
26
|
mentions?: MentionsConfig;
|
|
27
27
|
inputSearch?: InputSearchConfig;
|
|
28
|
+
inputPassword?: InputPasswordConfig;
|
|
28
29
|
otp?: OTPConfig;
|
|
29
30
|
select?: SelectConfig;
|
|
30
31
|
form?: FormConfig;
|
|
@@ -87,6 +87,8 @@ const PASSED_PROPS = [
|
|
|
87
87
|
"flex",
|
|
88
88
|
"typography",
|
|
89
89
|
"collapse",
|
|
90
|
+
"inputSearch",
|
|
91
|
+
"inputPassword",
|
|
90
92
|
"otp",
|
|
91
93
|
"anchor"
|
|
92
94
|
];
|
|
@@ -310,6 +312,10 @@ const ProviderChildren = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
310
312
|
type: Object,
|
|
311
313
|
required: false
|
|
312
314
|
},
|
|
315
|
+
inputPassword: {
|
|
316
|
+
type: Object,
|
|
317
|
+
required: false
|
|
318
|
+
},
|
|
313
319
|
otp: {
|
|
314
320
|
type: Object,
|
|
315
321
|
required: false
|
|
@@ -674,6 +680,10 @@ const ConfigProvider = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
674
680
|
type: Object,
|
|
675
681
|
required: false
|
|
676
682
|
},
|
|
683
|
+
inputPassword: {
|
|
684
|
+
type: Object,
|
|
685
|
+
required: false
|
|
686
|
+
},
|
|
677
687
|
otp: {
|
|
678
688
|
type: Object,
|
|
679
689
|
required: false
|
|
@@ -10,6 +10,7 @@ import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
|
10
10
|
import { useDisabledContext } from "../../config-provider/DisabledContext.js";
|
|
11
11
|
import locale from "../locale/en_US.js";
|
|
12
12
|
import useLocale from "../../locale/useLocale.js";
|
|
13
|
+
import { isNonNullable } from "../../_util/is.js";
|
|
13
14
|
import { getMergedStatus, getStatusClassNames } from "../../_util/statusUtils.js";
|
|
14
15
|
import { useFormItemInputContext } from "../../form/context.js";
|
|
15
16
|
import { useVariants } from "../../form/hooks/useVariant.js";
|
|
@@ -43,7 +44,7 @@ function generateRangePicker(generateConfig) {
|
|
|
43
44
|
}));
|
|
44
45
|
const popupClassName = computed(() => props.popupClassName || props.dropdownClassName);
|
|
45
46
|
const popupStyle = computed(() => props.popupStyle);
|
|
46
|
-
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic(pickerType.value, classes, styles, popupClassName, popupStyle, mergedProps);
|
|
47
|
+
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic(pickerType.value, classes, styles, popupClassName, popupStyle, mergedProps, computed(() => contextStyle?.value ?? null));
|
|
47
48
|
const innerRef = shallowRef();
|
|
48
49
|
const [variant, enableVariantCls] = useVariants("rangePicker", customVariant, bordered);
|
|
49
50
|
const rootCls = useCSSVarCls(prefixCls);
|
|
@@ -124,10 +125,7 @@ function generateRangePicker(generateConfig) {
|
|
|
124
125
|
[`${prefixCls.value}-${mergedSize.value}`]: mergedSize.value,
|
|
125
126
|
[`${prefixCls.value}-${variant.value}`]: enableVariantCls.value
|
|
126
127
|
}, getStatusClassNames(prefixCls.value, mergedStatus, hasFeedback), compactItemClassnames.value, contextClassName?.value, className);
|
|
127
|
-
const mergedStyle = {
|
|
128
|
-
...contextStyle?.value,
|
|
129
|
-
...style
|
|
130
|
-
};
|
|
128
|
+
const mergedStyle = { ...style };
|
|
131
129
|
const cellRender = slots.cellRender || props.cellRender ? (current, info) => resolveRender("cellRender", [current, info], {
|
|
132
130
|
current,
|
|
133
131
|
info
|
|
@@ -145,12 +143,13 @@ function generateRangePicker(generateConfig) {
|
|
|
145
143
|
const inputRender = slots.inputRender || props.inputRender ? (inputProps) => resolveRender("inputRender", [inputProps], inputProps) : void 0;
|
|
146
144
|
const _contextSeparator = getSlotPropsFnRun({}, { separator: contextSeparator?.value }, "separator", false);
|
|
147
145
|
const mergedSeparator = (getSlotPropsFnRun(slots, props, "separator", false) || _contextSeparator) ?? _contextSeparator;
|
|
146
|
+
const hasCustomSeparator = isNonNullable(mergedSeparator);
|
|
148
147
|
return createVNode(ContextIsolator, { "space": true }, { default: () => [createVNode(RangePicker, mergeProps(restAttrs, restProps, {
|
|
149
148
|
"ref": innerRef,
|
|
150
149
|
"separator": createVNode("span", {
|
|
151
|
-
"aria-
|
|
150
|
+
"aria-hidden": hasCustomSeparator ? void 0 : true,
|
|
152
151
|
"class": `${prefixCls.value}-separator`
|
|
153
|
-
}, [mergedSeparator
|
|
152
|
+
}, [hasCustomSeparator ? mergedSeparator : createVNode(SwapRightOutlined, null, null)]),
|
|
154
153
|
"disabled": mergedDisabled.value,
|
|
155
154
|
"placement": placement,
|
|
156
155
|
"placeholder": getRangePlaceholder(locale$1.value, props.picker, placeholder),
|
|
@@ -45,7 +45,7 @@ function generatePicker(generateConfig) {
|
|
|
45
45
|
}));
|
|
46
46
|
const popupClassName = computed(() => props.popupClassName || props.dropdownClassName);
|
|
47
47
|
const popupStyle = computed(() => props.popupStyle);
|
|
48
|
-
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic(pickerType, classes, styles, popupClassName, popupStyle, mergedProps);
|
|
48
|
+
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic(pickerType, classes, styles, popupClassName, popupStyle, mergedProps, contextStyle);
|
|
49
49
|
const innerRef = shallowRef();
|
|
50
50
|
const [variant, enableVariantCls] = useVariants("datePicker", customVariant, bordered);
|
|
51
51
|
const rootCls = useCSSVarCls(prefixCls);
|
|
@@ -137,10 +137,7 @@ function generatePicker(generateConfig) {
|
|
|
137
137
|
[`${prefixCls.value}-${mergedSize.value}`]: mergedSize.value,
|
|
138
138
|
[`${prefixCls.value}-${variant.value}`]: enableVariantCls.value
|
|
139
139
|
}, getStatusClassNames(prefixCls.value, mergedStatus, hasFeedback), compactItemClassnames.value, contextClassName?.value, className);
|
|
140
|
-
const mergedStyle = {
|
|
141
|
-
...contextStyle?.value,
|
|
142
|
-
...style
|
|
143
|
-
};
|
|
140
|
+
const mergedStyle = { ...style };
|
|
144
141
|
const cellRender = slots.cellRender || props.cellRender ? (current, info) => resolveRender("cellRender", [current, info], {
|
|
145
142
|
current,
|
|
146
143
|
info
|
|
@@ -4,11 +4,11 @@ import { Components } from "@v-c/picker";
|
|
|
4
4
|
//#region src/date-picker/generatePicker/useComponents.d.ts
|
|
5
5
|
declare function useComponents(components?: Components): {
|
|
6
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
7
|
date?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
10
8
|
week?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
9
|
+
month?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
11
10
|
quarter?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
11
|
+
year?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
12
12
|
decade?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
13
13
|
datetime?: import("vue").DefineComponent<import("@v-c/picker/dist/interface").SharedPanelProps<any>> | undefined;
|
|
14
14
|
button: string | import("vue").DefineSetupFnComponent<ButtonProps, {}, {}, ButtonProps & {}, import("vue").PublicProps> | import("vue").DefineComponent;
|
|
@@ -2,6 +2,6 @@ import { AnyObject } from "../../_util/type.js";
|
|
|
2
2
|
import { RequiredSemanticPicker } from "../generatePicker/interface.js";
|
|
3
3
|
import { CSSProperties, Ref } from "vue";
|
|
4
4
|
//#region src/date-picker/hooks/useMergedPickerSemantic.d.ts
|
|
5
|
-
declare function useMergedPickerSemantic<P extends AnyObject = AnyObject>(pickerType: 'timePicker' | 'datePicker' | 'rangePicker', classNames: Ref<P['classes'] | undefined>, styles: Ref<P['styles'] | undefined>, popupClassName: Ref<string | undefined>, popupStyle: Ref<CSSProperties | undefined>, mergedProps: Ref<P>): RequiredSemanticPicker;
|
|
5
|
+
declare function useMergedPickerSemantic<P extends AnyObject = AnyObject>(pickerType: 'timePicker' | 'datePicker' | 'rangePicker', classNames: Ref<P['classes'] | undefined>, styles: Ref<P['styles'] | undefined>, popupClassName: Ref<string | undefined>, popupStyle: Ref<CSSProperties | undefined>, mergedProps: Ref<P>, contextStyle?: Ref<CSSProperties | null | undefined>): RequiredSemanticPicker;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { useMergedPickerSemantic as default };
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { useComponentConfig } from "../../config-provider/context.js";
|
|
2
|
-
import { useMergeSemantic, useToArr, useToProps } from "../../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { computed, unref } from "vue";
|
|
4
4
|
import { clsx } from "@v-c/util";
|
|
5
5
|
//#region src/date-picker/hooks/useMergedPickerSemantic.ts
|
|
6
|
-
function useMergedPickerSemantic(pickerType, classNames, styles, popupClassName, popupStyle, mergedProps) {
|
|
6
|
+
function useMergedPickerSemantic(pickerType, classNames, styles, popupClassName, popupStyle, mergedProps, contextStyle) {
|
|
7
7
|
const contextConfig = useComponentConfig(pickerType);
|
|
8
8
|
const contextClassNames = computed(() => contextConfig.value?.classes);
|
|
9
9
|
const contextStyles = computed(() => contextConfig.value?.styles);
|
|
10
|
-
const
|
|
10
|
+
const contextStyleRoot = useSemanticRootStyle(computed(() => {
|
|
11
|
+
const style = unref(contextStyle);
|
|
12
|
+
return style === null ? void 0 : style ?? contextConfig.value?.style;
|
|
13
|
+
}));
|
|
14
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classNames), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps), computed(() => ({ popup: { _default: "root" } })));
|
|
11
15
|
return [computed(() => {
|
|
12
16
|
const className = unref(popupClassName);
|
|
13
17
|
return {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import locale$1 from "../../time-picker/locale/sq_AL.js";
|
|
2
|
+
//#region src/date-picker/locale/sq_AL.ts
|
|
3
|
+
const locale = {
|
|
4
|
+
lang: {
|
|
5
|
+
locale: "sq",
|
|
6
|
+
placeholder: "Zgjidh datën",
|
|
7
|
+
yearPlaceholder: "Zgjidh vitin",
|
|
8
|
+
quarterPlaceholder: "Zgjidh tremujorin",
|
|
9
|
+
monthPlaceholder: "Zgjidh muajin",
|
|
10
|
+
weekPlaceholder: "Zgjidh javën",
|
|
11
|
+
rangePlaceholder: ["Data e fillimit", "Data e mbarimit"],
|
|
12
|
+
rangeYearPlaceholder: ["Viti i fillimit", "Viti i mbarimit"],
|
|
13
|
+
rangeQuarterPlaceholder: ["Tremujori i fillimit", "Tremujori i mbarimit"],
|
|
14
|
+
rangeMonthPlaceholder: ["Muaji i fillimit", "Muaji i mbarimit"],
|
|
15
|
+
rangeWeekPlaceholder: ["Java e fillimit", "Java e mbarimit"],
|
|
16
|
+
today: "Sot",
|
|
17
|
+
now: "Tani",
|
|
18
|
+
backToToday: "Kthehu te sot",
|
|
19
|
+
ok: "OK",
|
|
20
|
+
clear: "Pastro",
|
|
21
|
+
week: "Javë",
|
|
22
|
+
month: "Muaj",
|
|
23
|
+
year: "Vit",
|
|
24
|
+
timeSelect: "Zgjidh kohën",
|
|
25
|
+
dateSelect: "Zgjidh datën",
|
|
26
|
+
weekSelect: "Zgjidh javën",
|
|
27
|
+
monthSelect: "Zgjidh muajin",
|
|
28
|
+
yearSelect: "Zgjidh vitin",
|
|
29
|
+
decadeSelect: "Zgjidh dekadën",
|
|
30
|
+
yearFormat: "YYYY",
|
|
31
|
+
fieldDateFormat: "DD/MM/YYYY",
|
|
32
|
+
cellDateFormat: "D",
|
|
33
|
+
fieldDateTimeFormat: "DD/MM/YYYY HH:mm:ss",
|
|
34
|
+
monthFormat: "MMMM",
|
|
35
|
+
fieldWeekFormat: "YYYY-wo",
|
|
36
|
+
monthBeforeYear: true,
|
|
37
|
+
previousMonth: "Muaji i mëparshëm (PageUp)",
|
|
38
|
+
nextMonth: "Muaji tjetër (PageDown)",
|
|
39
|
+
previousYear: "Viti i mëparshëm (Control + left)",
|
|
40
|
+
nextYear: "Viti tjetër (Control + right)",
|
|
41
|
+
previousDecade: "Dekada e mëparshme",
|
|
42
|
+
nextDecade: "Dekada tjetër",
|
|
43
|
+
previousCentury: "Shekulli i mëparshëm",
|
|
44
|
+
nextCentury: "Shekulli tjetër",
|
|
45
|
+
shortWeekDays: [
|
|
46
|
+
"Die",
|
|
47
|
+
"Hën",
|
|
48
|
+
"Mar",
|
|
49
|
+
"Mër",
|
|
50
|
+
"Enj",
|
|
51
|
+
"Pre",
|
|
52
|
+
"Sht"
|
|
53
|
+
],
|
|
54
|
+
shortMonths: [
|
|
55
|
+
"Jan",
|
|
56
|
+
"Shk",
|
|
57
|
+
"Mar",
|
|
58
|
+
"Pri",
|
|
59
|
+
"Maj",
|
|
60
|
+
"Qer",
|
|
61
|
+
"Kor",
|
|
62
|
+
"Gus",
|
|
63
|
+
"Sht",
|
|
64
|
+
"Tet",
|
|
65
|
+
"Nën",
|
|
66
|
+
"Dhj"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
timePickerLocale: { ...locale$1 }
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { locale as default };
|
|
@@ -7,12 +7,12 @@ const locale = {
|
|
|
7
7
|
yearPlaceholder: "請選擇年份",
|
|
8
8
|
quarterPlaceholder: "請選擇季度",
|
|
9
9
|
monthPlaceholder: "請選擇月份",
|
|
10
|
-
weekPlaceholder: "
|
|
10
|
+
weekPlaceholder: "請選擇週",
|
|
11
11
|
rangePlaceholder: ["開始日期", "結束日期"],
|
|
12
12
|
rangeYearPlaceholder: ["開始年份", "結束年份"],
|
|
13
13
|
rangeMonthPlaceholder: ["開始月份", "結束月份"],
|
|
14
14
|
rangeQuarterPlaceholder: ["開始季度", "結束季度"],
|
|
15
|
-
rangeWeekPlaceholder: ["
|
|
15
|
+
rangeWeekPlaceholder: ["開始週", "結束週"],
|
|
16
16
|
...CalendarLocale
|
|
17
17
|
},
|
|
18
18
|
timePickerLocale: { ...locale$1 }
|
|
@@ -5,9 +5,7 @@ import { PickerMode } from "@v-c/picker";
|
|
|
5
5
|
//#region src/date-picker/util.d.ts
|
|
6
6
|
declare function getPlaceholder(locale: PickerLocale, picker?: PickerMode, customizePlaceholder?: string): string;
|
|
7
7
|
declare function getRangePlaceholder(locale: PickerLocale, picker?: PickerMode, customizePlaceholder?: [string, string]): [string, string] | undefined;
|
|
8
|
-
declare function useIcons(props: Pick<PickerProps$1, 'allowClear' | 'removeIcon'>, prefixCls: string): readonly [false, string | number | boolean | import("vue").
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}> | RenderNodeFn<any[]> | null] | readonly [{
|
|
8
|
+
declare function useIcons(props: Pick<PickerProps$1, 'allowClear' | 'removeIcon'>, prefixCls: string): readonly [false, string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null] | readonly [{
|
|
11
9
|
clearIcon: string | number | boolean | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
12
10
|
[key: string]: any;
|
|
13
11
|
}> | import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions> | import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
@@ -18,8 +16,6 @@ declare function useIcons(props: Pick<PickerProps$1, 'allowClear' | 'removeIcon'
|
|
|
18
16
|
} | RenderNodeFn<any[]> | (string | number | boolean | void | import("vue").Component | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
19
17
|
[key: string]: any;
|
|
20
18
|
}> | null | undefined)[] | null | undefined;
|
|
21
|
-
}, string | number | boolean | import("vue").
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
}> | RenderNodeFn<any[]> | null];
|
|
19
|
+
}, string | number | boolean | import("vue/jsx-runtime").JSX.Element | RenderNodeFn<any[]> | null];
|
|
24
20
|
//#endregion
|
|
25
21
|
export { getPlaceholder, getRangePlaceholder, useIcons };
|
|
@@ -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
|
-
|
|
11
|
+
styles?: CellSemanticStyles | undefined;
|
|
12
12
|
style?: import("vue").CSSProperties | undefined;
|
|
13
13
|
class?: string | undefined;
|
|
14
|
-
styles?: CellSemanticStyles | undefined;
|
|
15
14
|
rootClass?: string | undefined;
|
|
16
15
|
classes?: CellSemanticClassNames | undefined;
|
|
16
|
+
label?: VueNode;
|
|
17
17
|
content?: VueNode;
|
|
18
18
|
} | {
|
|
19
19
|
span: number | undefined;
|
|
20
20
|
key?: import("@v-c/util/dist/type").Key;
|
|
21
|
-
|
|
21
|
+
styles?: CellSemanticStyles | undefined;
|
|
22
22
|
style?: import("vue").CSSProperties | undefined;
|
|
23
23
|
class?: string | undefined;
|
|
24
|
-
styles?: CellSemanticStyles | undefined;
|
|
25
24
|
rootClass?: string | undefined;
|
|
26
25
|
classes?: CellSemanticClassNames | undefined;
|
|
26
|
+
label?: VueNode;
|
|
27
27
|
content?: VueNode;
|
|
28
28
|
_$index: number;
|
|
29
29
|
})[]>;
|
|
@@ -59,6 +59,9 @@ interface DescriptionsProps extends ComponentBaseProps {
|
|
|
59
59
|
items?: DescriptionsItemType[];
|
|
60
60
|
id?: string;
|
|
61
61
|
}
|
|
62
|
+
interface DescriptionsRef {
|
|
63
|
+
nativeElement: HTMLDivElement;
|
|
64
|
+
}
|
|
62
65
|
interface DescriptionsSlots {
|
|
63
66
|
default?: () => any;
|
|
64
67
|
title?: () => any;
|
|
@@ -68,4 +71,4 @@ interface DescriptionsSlots {
|
|
|
68
71
|
}
|
|
69
72
|
declare const Descriptions: import("vue").DefineSetupFnComponent<DescriptionsProps, EmptyEmit, SlotsType<DescriptionsSlots>, DescriptionsProps, import("vue").PublicProps>;
|
|
70
73
|
//#endregion
|
|
71
|
-
export { DescriptionsClassNamesType, DescriptionsItem, type DescriptionsItemProps, type DescriptionsItemSlots, DescriptionsItemType, DescriptionsProps, DescriptionsSemanticClassNames, DescriptionsSemanticName, DescriptionsSemanticStyles, DescriptionsSlots, DescriptionsStylesType, InternalDescriptionsItemType, RenderDescriptionsItem, Descriptions as default };
|
|
74
|
+
export { DescriptionsClassNamesType, DescriptionsItem, type DescriptionsItemProps, type DescriptionsItemSlots, DescriptionsItemType, DescriptionsProps, DescriptionsRef, DescriptionsSemanticClassNames, DescriptionsSemanticName, DescriptionsSemanticStyles, DescriptionsSlots, DescriptionsStylesType, InternalDescriptionsItemType, RenderDescriptionsItem, Descriptions as default };
|
|
@@ -13,11 +13,11 @@ import useRow from "./hooks/useRow.js";
|
|
|
13
13
|
import DescriptionsItem, { DESCRIPTIONS_ITEM_MARK } from "./Item.js";
|
|
14
14
|
import Row from "./Row.js";
|
|
15
15
|
import style_default from "./style/index.js";
|
|
16
|
-
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
|
|
16
|
+
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
|
|
17
17
|
import { classNames } from "@v-c/util";
|
|
18
18
|
import { omit } from "es-toolkit";
|
|
19
19
|
//#region src/descriptions/index.tsx
|
|
20
|
-
const Descriptions = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
20
|
+
const Descriptions = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
|
|
21
21
|
const { class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, prefixCls, direction } = useComponentBaseConfig("descriptions", props);
|
|
22
22
|
const { classes, styles } = toPropsRefs(props, "classes", "styles");
|
|
23
23
|
const screens = useBreakpoint();
|
|
@@ -62,6 +62,8 @@ const Descriptions = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
}));
|
|
65
|
+
const nativeElementRef = shallowRef();
|
|
66
|
+
expose({ nativeElement: nativeElementRef });
|
|
65
67
|
return () => {
|
|
66
68
|
const { bordered, rootClass, colon, layout } = props;
|
|
67
69
|
const title = getSlotPropsFnRun(slots, props, "title");
|
|
@@ -69,6 +71,7 @@ const Descriptions = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
|
|
|
69
71
|
const labelRender = slots?.labelRender ?? props?.labelRender;
|
|
70
72
|
const contentRender = slots?.contentRender ?? props?.contentRender;
|
|
71
73
|
return createVNode("div", mergeProps({
|
|
74
|
+
"ref": nativeElementRef,
|
|
72
75
|
"class": classNames(prefixCls.value, contextClassName.value, mergedClassNames.value.root, {
|
|
73
76
|
[`${prefixCls.value}-medium`]: mergedSize.value === "medium" || mergedSize.value === "middle",
|
|
74
77
|
[`${prefixCls.value}-small`]: mergedSize.value === "small",
|
package/dist/divider/index.d.ts
CHANGED
|
@@ -41,6 +41,9 @@ interface DividerProps extends ComponentBaseProps {
|
|
|
41
41
|
classes?: DividerClassNamesType;
|
|
42
42
|
styles?: DividerStylesType;
|
|
43
43
|
}
|
|
44
|
+
interface DividerRef {
|
|
45
|
+
nativeElement: HTMLDivElement;
|
|
46
|
+
}
|
|
44
47
|
declare const Divider: import("vue").DefineSetupFnComponent<DividerProps, {}, {}, DividerProps & {}, import("vue").PublicProps>;
|
|
45
48
|
//#endregion
|
|
46
|
-
export { DividerClassNamesType, DividerProps, DividerSemanticClassNames, DividerSemanticName, DividerSemanticStyles, DividerStylesType, TitlePlacement, Divider as default };
|
|
49
|
+
export { DividerClassNamesType, DividerProps, DividerRef, DividerSemanticClassNames, DividerSemanticName, DividerSemanticStyles, DividerStylesType, TitlePlacement, Divider as default };
|
package/dist/divider/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useOrientation } from "../_util/hooks/useOrientation.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
4
|
-
import { pureAttrs, useMergeSemantic, useToArr } from "../_util/hooks/useMergeSemantic.js";
|
|
4
|
+
import { pureAttrs, useMergeSemantic, useSemanticRootStyle, useToArr } from "../_util/hooks/useMergeSemantic.js";
|
|
5
5
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
6
6
|
import style_default from "./style/index.js";
|
|
7
|
-
import { Fragment, computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
|
|
7
|
+
import { Fragment, computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
|
|
8
8
|
import { classNames } from "@v-c/util";
|
|
9
9
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
10
10
|
//#region src/divider/index.tsx
|
|
@@ -15,8 +15,8 @@ const titlePlacementList = [
|
|
|
15
15
|
"start",
|
|
16
16
|
"end"
|
|
17
17
|
];
|
|
18
|
-
const Divider = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
19
|
-
const { class: contextClassName, classes: contextClassNames, styles: contextStyles, direction, prefixCls } = useComponentBaseConfig("divider", props);
|
|
18
|
+
const Divider = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
|
|
19
|
+
const { class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, direction, prefixCls } = useComponentBaseConfig("divider", props);
|
|
20
20
|
const { type, vertical, orientation, classes, styles, size } = toPropsRefs$1(props, "orientation", "vertical", "type", "classes", "styles", "size");
|
|
21
21
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
22
22
|
const sizeFullName = useSize(size);
|
|
@@ -38,7 +38,8 @@ const Divider = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
38
38
|
size: sizeFullName.value
|
|
39
39
|
};
|
|
40
40
|
});
|
|
41
|
-
const
|
|
41
|
+
const contextStyleRoot = useSemanticRootStyle(contextStyle);
|
|
42
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), computed(() => {
|
|
42
43
|
return { props: mergedProps.value };
|
|
43
44
|
}));
|
|
44
45
|
const memoizedOrientationMargin = computed(() => {
|
|
@@ -47,6 +48,8 @@ const Divider = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
47
48
|
if (/^\d+$/.test(orientationMargin)) return `${Number(orientationMargin)}px`;
|
|
48
49
|
return orientationMargin;
|
|
49
50
|
});
|
|
51
|
+
const nativeElementRef = shallowRef();
|
|
52
|
+
expose({ nativeElement: nativeElementRef });
|
|
50
53
|
return () => {
|
|
51
54
|
const { variant, dashed, plain, rootClass } = props;
|
|
52
55
|
const children = filterEmpty(slots?.default?.());
|
|
@@ -71,9 +74,9 @@ const Divider = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
71
74
|
marginInlineEnd: hasMarginEnd.value ? memoizedOrientationMargin.value : void 0
|
|
72
75
|
};
|
|
73
76
|
return createVNode("div", mergeProps({
|
|
77
|
+
"ref": nativeElementRef,
|
|
74
78
|
"class": classString,
|
|
75
79
|
"style": [
|
|
76
|
-
contextStyles.value,
|
|
77
80
|
mergedStyles.value.root,
|
|
78
81
|
hasChildren ? {} : mergedStyles.value.rail,
|
|
79
82
|
attrs.style
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
2
|
import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
3
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
4
|
+
import { cloneElement } from "../_util/vueNode.js";
|
|
4
5
|
import useClosable, { pickClosable } from "../_util/hooks/useClosable.js";
|
|
5
6
|
import skeleton_default from "../skeleton/index.js";
|
|
6
7
|
import { Fragment, computed, createVNode, defineComponent } from "vue";
|
|
@@ -53,7 +54,8 @@ const DrawerPanel = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
53
54
|
const title = getSlotPropsFnRun(slots, props, "title");
|
|
54
55
|
const footer = getSlotPropsFnRun(slots, props, "footer");
|
|
55
56
|
const extra = getSlotPropsFnRun(slots, props, "extra");
|
|
56
|
-
const [mergedClosable, mergedCloseIcon] = closableInfo.value;
|
|
57
|
+
const [mergedClosable, mergedCloseIcon, closeBtnIsDisabled] = closableInfo.value;
|
|
58
|
+
const mergedCloseButton = cloneElement(mergedCloseIcon, { disabled: closeBtnIsDisabled });
|
|
57
59
|
const renderHeader = () => {
|
|
58
60
|
if (!title && !mergedClosable) return null;
|
|
59
61
|
return createVNode("div", {
|
|
@@ -63,7 +65,7 @@ const DrawerPanel = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
63
65
|
},
|
|
64
66
|
"class": clsx(`${prefixCls}-header`, mergedClassNames.value.header, { [`${prefixCls}-header-close-only`]: mergedClosable && !title && !extra })
|
|
65
67
|
}, [createVNode("div", { "class": `${prefixCls}-header-title` }, [
|
|
66
|
-
closablePlacement.value === "start" &&
|
|
68
|
+
closablePlacement.value === "start" && mergedCloseButton,
|
|
67
69
|
!!title && createVNode("div", {
|
|
68
70
|
"class": clsx(`${prefixCls}-title`, mergedClassNames.value.title),
|
|
69
71
|
"style": mergedStyles.value.title,
|
|
@@ -73,7 +75,7 @@ const DrawerPanel = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
73
75
|
"class": clsx(`${prefixCls}-extra`, mergedClassNames.value.extra),
|
|
74
76
|
"style": mergedStyles.value.extra
|
|
75
77
|
}, [extra])
|
|
76
|
-
]), closablePlacement.value === "end" &&
|
|
78
|
+
]), closablePlacement.value === "end" && mergedCloseButton]);
|
|
77
79
|
};
|
|
78
80
|
const renderFooter = () => {
|
|
79
81
|
if (!footer) return null;
|
package/dist/drawer/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { devUseWarning, isDev } from "../_util/warning.js";
|
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { ContextIsolator } from "../_util/ContextIsolator.js";
|
|
4
4
|
import { useMergedMask } from "../_util/hooks/useMergedMask.js";
|
|
5
|
-
import { getAttrStyleAndClass, useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
6
6
|
import { ZIndexProvider } from "../_util/zindexContext.js";
|
|
7
7
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
8
8
|
import { toPropsRefs } from "../_util/tools.js";
|
|
@@ -69,10 +69,13 @@ const Drawer = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
69
69
|
maskClosable: mergedMaskClosable.value
|
|
70
70
|
};
|
|
71
71
|
});
|
|
72
|
-
const
|
|
72
|
+
const contextSectionStyle = useSemanticRootStyle(contextStyle, "section");
|
|
73
|
+
const drawerSectionStyle = useSemanticRootStyle(computed(() => props.drawerStyle), "section");
|
|
74
|
+
const sectionStyle = useSemanticRootStyle(computed(() => attrs.style), "section");
|
|
75
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextSectionStyle, styles, drawerSectionStyle, sectionStyle), useToProps(mergedProps));
|
|
73
76
|
return () => {
|
|
74
77
|
const { rootClass, maskStyle, drawerStyle, contentWrapperStyle, open, push, defaultSize, rootStyle, getContainer: customizeGetContainer, resizable, afterOpenChange, destroyOnClose, destroyOnHidden, size, ...rest } = props;
|
|
75
|
-
const { className, restAttrs
|
|
78
|
+
const { className, restAttrs } = getAttrStyleAndClass(attrs);
|
|
76
79
|
const maskMotion = {
|
|
77
80
|
name: getTransitionName(prefixCls.value, "mask-motion"),
|
|
78
81
|
appear: true
|
|
@@ -128,10 +131,7 @@ const Drawer = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
128
131
|
...mergedStyles.value.mask,
|
|
129
132
|
...maskStyle
|
|
130
133
|
},
|
|
131
|
-
section:
|
|
132
|
-
...mergedStyles.value.section,
|
|
133
|
-
...drawerStyle
|
|
134
|
-
},
|
|
134
|
+
section: mergedStyles.value.section,
|
|
135
135
|
wrapper: {
|
|
136
136
|
...mergedStyles.value.wrapper,
|
|
137
137
|
...contentWrapperStyle
|
|
@@ -149,13 +149,9 @@ const Drawer = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
149
149
|
panelRef.value = panel;
|
|
150
150
|
innerPanelRef(panel);
|
|
151
151
|
},
|
|
152
|
-
"style": {
|
|
153
|
-
...contextStyle.value,
|
|
154
|
-
...style
|
|
155
|
-
},
|
|
156
152
|
"rootStyle": {
|
|
157
|
-
...
|
|
158
|
-
...
|
|
153
|
+
...mergedStyles.value.root,
|
|
154
|
+
...rootStyle
|
|
159
155
|
},
|
|
160
156
|
"class": clsx(contextClassName.value, className),
|
|
161
157
|
"rootClassName": drawerClassName,
|
|
@@ -117,6 +117,7 @@ const genDrawerStyle = (token) => {
|
|
|
117
117
|
textRendering: "auto",
|
|
118
118
|
[`&${componentCls}-close-end`]: { marginInlineStart: marginXS },
|
|
119
119
|
[`&:not(${componentCls}-close-end)`]: { marginInlineEnd: marginXS },
|
|
120
|
+
"&:disabled": { pointerEvents: "none" },
|
|
120
121
|
"&:hover": {
|
|
121
122
|
color: colorIconHover,
|
|
122
123
|
backgroundColor: colorBgTextHover,
|