antdv-next 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_util/hooks/useMergeSemantic.d.ts +7 -4
- package/dist/_util/hooks/useMergeSemantic.js +8 -3
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/alert/style/index.d.ts +5 -0
- package/dist/alert/style/index.js +2 -1
- package/dist/antd-with-locales.esm.js +12237 -12330
- package/dist/antd-with-locales.js +80 -80
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +9917 -10224
- package/dist/antd.js +55 -55
- 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 +8 -8
- package/dist/color-picker/ColorPicker.js +4 -7
- 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 +2 -5
- package/dist/date-picker/generatePicker/generateSinglePicker.js +2 -5
- 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 +8 -8
- 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 +17 -0
- package/dist/form/ErrorList.js +2 -2
- package/dist/form/FormItem/index.js +23 -24
- package/dist/form/hooks/useVariant.d.ts +2 -2
- package/dist/form/hooks/useVariant.js +15 -5
- package/dist/form/types.d.ts +11 -3
- package/dist/form/utils/validateUtil.js +4 -0
- package/dist/image/hooks/usePreviewConfig.d.ts +1 -0
- 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/locale/sq_AL.d.ts +5 -0
- package/dist/locale/sq_AL.js +151 -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/message/useMessage.js +4 -4
- package/dist/modal/PurePanel.js +4 -7
- package/dist/notification/useNotification.js +4 -5
- package/dist/package.js +1 -1
- 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/rate/style/index.js +12 -9
- package/dist/result/index.d.ts +4 -1
- package/dist/result/index.js +7 -4
- package/dist/select/style/dropdown.js +4 -0
- 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 +4 -1
- 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/style/virtual.js +4 -0
- package/dist/table/util.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/transfer/Transfer.d.ts +4 -1
- package/dist/transfer/Transfer.js +5 -2
- package/dist/transfer/index.d.ts +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/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 +4 -12
- package/dist/upload/index.d.ts +2 -2
- package/dist/watermark/index.d.ts +4 -1
- package/dist/watermark/index.js +2 -1
- package/package.json +7 -7
- package/web-tags.json +837 -808
- package/web-types.json +2950 -2885
- package/dist/slider/useRafLock.d.ts +0 -5
- package/dist/slider/useRafLock.js +0 -23
|
@@ -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
|
|
@@ -43,7 +43,7 @@ function generateRangePicker(generateConfig) {
|
|
|
43
43
|
}));
|
|
44
44
|
const popupClassName = computed(() => props.popupClassName || props.dropdownClassName);
|
|
45
45
|
const popupStyle = computed(() => props.popupStyle);
|
|
46
|
-
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic(pickerType.value, classes, styles, popupClassName, popupStyle, mergedProps);
|
|
46
|
+
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic(pickerType.value, classes, styles, popupClassName, popupStyle, mergedProps, computed(() => contextStyle?.value ?? null));
|
|
47
47
|
const innerRef = shallowRef();
|
|
48
48
|
const [variant, enableVariantCls] = useVariants("rangePicker", customVariant, bordered);
|
|
49
49
|
const rootCls = useCSSVarCls(prefixCls);
|
|
@@ -124,10 +124,7 @@ function generateRangePicker(generateConfig) {
|
|
|
124
124
|
[`${prefixCls.value}-${mergedSize.value}`]: mergedSize.value,
|
|
125
125
|
[`${prefixCls.value}-${variant.value}`]: enableVariantCls.value
|
|
126
126
|
}, getStatusClassNames(prefixCls.value, mergedStatus, hasFeedback), compactItemClassnames.value, contextClassName?.value, className);
|
|
127
|
-
const mergedStyle = {
|
|
128
|
-
...contextStyle?.value,
|
|
129
|
-
...style
|
|
130
|
-
};
|
|
127
|
+
const mergedStyle = { ...style };
|
|
131
128
|
const cellRender = slots.cellRender || props.cellRender ? (current, info) => resolveRender("cellRender", [current, info], {
|
|
132
129
|
current,
|
|
133
130
|
info
|
|
@@ -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
|
|
@@ -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
|
-
|
|
12
|
-
style?: import("vue").CSSProperties | undefined;
|
|
13
|
-
class?: string | undefined;
|
|
11
|
+
classes?: CellSemanticClassNames | undefined;
|
|
14
12
|
styles?: CellSemanticStyles | undefined;
|
|
13
|
+
style?: import("vue").CSSProperties | undefined;
|
|
15
14
|
rootClass?: string | undefined;
|
|
16
|
-
|
|
15
|
+
class?: string | 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
|
-
|
|
22
|
-
style?: import("vue").CSSProperties | undefined;
|
|
23
|
-
class?: string | undefined;
|
|
21
|
+
classes?: CellSemanticClassNames | undefined;
|
|
24
22
|
styles?: CellSemanticStyles | undefined;
|
|
23
|
+
style?: import("vue").CSSProperties | undefined;
|
|
25
24
|
rootClass?: string | undefined;
|
|
26
|
-
|
|
25
|
+
class?: string | 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,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { devUseWarning } from "../_util/warning.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import useToken from "../theme/useToken.js";
|
|
4
|
-
import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
|
+
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
5
|
import { ZIndexProvider } from "../_util/zindexContext.js";
|
|
6
6
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
7
7
|
import getPlacements from "../_util/placements.js";
|
|
@@ -27,7 +27,8 @@ const Dropdown = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs })
|
|
|
27
27
|
const mergedProps = computed(() => {
|
|
28
28
|
return props;
|
|
29
29
|
});
|
|
30
|
-
const
|
|
30
|
+
const contextStyleRoot = useSemanticRootStyle(contextStyle);
|
|
31
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(mergedProps));
|
|
31
32
|
const memoPlacement = computed(() => {
|
|
32
33
|
const { placement } = props;
|
|
33
34
|
if (!placement) return direction.value === "rtl" ? "bottomRight" : "bottomLeft";
|
|
@@ -71,10 +72,7 @@ const Dropdown = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs })
|
|
|
71
72
|
emit("openChange", false, { source: "menu" });
|
|
72
73
|
};
|
|
73
74
|
const mergedRootStyles = computed(() => {
|
|
74
|
-
return {
|
|
75
|
-
...contextStyle.value,
|
|
76
|
-
...mergedStyles.value.root
|
|
77
|
-
};
|
|
75
|
+
return { ...mergedStyles.value.root };
|
|
78
76
|
});
|
|
79
77
|
const [zIndex, contextZIndex] = useZIndex("Dropdown", computed(() => mergedRootStyles.value.zIndex));
|
|
80
78
|
const memoTransitionName = computed(() => {
|
package/dist/empty/index.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ interface EmptyProps extends ComponentBaseProps {
|
|
|
31
31
|
image?: VueNode;
|
|
32
32
|
description?: VueNode;
|
|
33
33
|
}
|
|
34
|
+
interface EmptyRef {
|
|
35
|
+
nativeElement: HTMLDivElement;
|
|
36
|
+
}
|
|
34
37
|
interface EmptySlots {
|
|
35
38
|
image: () => any;
|
|
36
39
|
description: () => any;
|
|
@@ -42,4 +45,4 @@ declare const _default: typeof Empty & {
|
|
|
42
45
|
PRESENTED_IMAGE_SIMPLE: typeof simpleEmptyImg;
|
|
43
46
|
};
|
|
44
47
|
//#endregion
|
|
45
|
-
export { EmptyClassNamesType, EmptyProps, EmptySemanticClassNames, EmptySemanticName, EmptySemanticStyles, EmptySlots, EmptyStylesType, SemanticName, TransferLocale, _default as default };
|
|
48
|
+
export { EmptyClassNamesType, EmptyProps, EmptyRef, EmptySemanticClassNames, EmptySemanticName, EmptySemanticStyles, EmptySlots, EmptyStylesType, SemanticName, TransferLocale, _default as default };
|
package/dist/empty/index.js
CHANGED
|
@@ -5,13 +5,13 @@ import useLocale from "../locale/useLocale.js";
|
|
|
5
5
|
import Empty$1 from "./empty.js";
|
|
6
6
|
import Simple from "./simple.js";
|
|
7
7
|
import style_default from "./style/index.js";
|
|
8
|
-
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps } from "vue";
|
|
8
|
+
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
|
|
9
9
|
import { classNames } from "@v-c/util";
|
|
10
10
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
11
11
|
//#region src/empty/index.tsx
|
|
12
12
|
const defaultEmptyImg = createVNode(Empty$1, null, null);
|
|
13
13
|
const simpleEmptyImg = createVNode(Simple, null, null);
|
|
14
|
-
const Empty = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
14
|
+
const Empty = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
|
|
15
15
|
const componentConfig = useComponentConfig("empty");
|
|
16
16
|
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("empty", props);
|
|
17
17
|
const { classes, styles } = toPropsRefs$1(props, "classes", "styles");
|
|
@@ -19,6 +19,8 @@ const Empty = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
19
19
|
const contextStyleRoot = useSemanticRootStyle(contextStyle);
|
|
20
20
|
const [mergedClassNames, mergedStyles] = useMergeSemantic(useToArr(contextClassNames, classes), useToArr(contextStyles, contextStyleRoot, styles), useToProps(computed(() => props)));
|
|
21
21
|
const [locale] = useLocale("Empty");
|
|
22
|
+
const nativeElementRef = shallowRef();
|
|
23
|
+
expose({ nativeElement: nativeElementRef });
|
|
22
24
|
return () => {
|
|
23
25
|
const des = getSlotPropsFnRun(slots, props, "description") ?? locale?.value?.description;
|
|
24
26
|
const alt = typeof des === "string" ? des : "empty";
|
|
@@ -32,6 +34,7 @@ const Empty = /* @__PURE__ */ defineComponent((props, { slots, attrs }) => {
|
|
|
32
34
|
else imageNode = mergedImage;
|
|
33
35
|
const children = filterEmpty(slots?.default?.() ?? []);
|
|
34
36
|
return createVNode("div", mergeProps({
|
|
37
|
+
"ref": nativeElementRef,
|
|
35
38
|
"class": classNames(hashId.value, cssVarCls.value, prefixCls.value, contextClassName.value, {
|
|
36
39
|
[`${prefixCls.value}-normal`]: mergedImage === simpleEmptyImg,
|
|
37
40
|
[`${prefixCls.value}-rtl`]: direction.value === "rtl"
|
|
@@ -6,6 +6,8 @@ interface BackTopProps extends Omit<FloatButtonProps, 'target'>, ComponentBasePr
|
|
|
6
6
|
visibilityHeight?: number;
|
|
7
7
|
target?: () => HTMLElement | Window | Document;
|
|
8
8
|
duration?: number;
|
|
9
|
+
/** @default false */
|
|
10
|
+
showProgress?: boolean;
|
|
9
11
|
}
|
|
10
12
|
interface BackTopEmits {
|
|
11
13
|
click: (e: MouseEvent) => void;
|