@uzum-tech/ui 1.5.3 → 1.5.5
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/index.js +153 -85
- package/dist/index.prod.js +3 -3
- package/es/_utils/css/index.d.ts +1 -0
- package/es/_utils/css/index.js +1 -0
- package/es/_utils/css/normalize-size.d.ts +1 -0
- package/es/_utils/css/normalize-size.js +6 -0
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/avatar/src/Avatar.js +1 -7
- package/es/badge/src/Badge.d.ts +13 -0
- package/es/badge/src/Badge.js +5 -4
- package/es/badge/src/styles/index.cssr.js +5 -6
- package/es/badge/styles/light.d.ts +1 -0
- package/es/badge/styles/light.js +2 -1
- package/es/collapse/src/Collapse.d.ts +47 -14
- package/es/collapse/src/Collapse.js +6 -3
- package/es/collapse/src/CollapseItem.js +3 -2
- package/es/collapse/src/styles/index.cssr.js +27 -7
- package/es/collapse/styles/light.d.ts +4 -1
- package/es/collapse/styles/light.js +6 -3
- package/es/data-table/src/DataTable.d.ts +2 -0
- package/es/data-table/src/DataTable.js +1 -0
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.js +5 -4
- package/es/data-table/src/interface.d.ts +3 -0
- package/es/data-table/src/interface.js +1 -1
- package/es/date-picker/src/DatePicker.d.ts +3 -0
- package/es/date-picker/src/DatePicker.js +2 -2
- package/es/date-picker/src/interface.d.ts +1 -0
- package/es/date-picker/src/panel/use-calendar.js +5 -2
- package/es/date-picker/src/panel/use-dual-calendar.js +6 -3
- package/es/date-picker/src/utils.d.ts +1 -1
- package/es/date-picker/src/utils.js +3 -2
- package/es/dynamic-tags/src/DynamicTags.d.ts +10 -0
- package/es/dynamic-tags/styles/light.d.ts +1 -0
- package/es/tag/src/Tag.d.ts +27 -13
- package/es/tag/src/Tag.js +7 -2
- package/es/tag/src/styles/index.cssr.js +13 -3
- package/es/tag/styles/light.d.ts +1 -0
- package/es/tag/styles/light.js +7 -6
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_utils/css/index.d.ts +1 -0
- package/lib/_utils/css/index.js +3 -1
- package/lib/_utils/css/normalize-size.d.ts +1 -0
- package/lib/_utils/css/normalize-size.js +10 -0
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/avatar/src/Avatar.js +1 -7
- package/lib/badge/src/Badge.d.ts +13 -0
- package/lib/badge/src/Badge.js +4 -3
- package/lib/badge/src/styles/index.cssr.js +5 -6
- package/lib/badge/styles/light.d.ts +1 -0
- package/lib/badge/styles/light.js +2 -1
- package/lib/collapse/src/Collapse.d.ts +47 -14
- package/lib/collapse/src/Collapse.js +6 -3
- package/lib/collapse/src/CollapseItem.js +3 -2
- package/lib/collapse/src/styles/index.cssr.js +27 -7
- package/lib/collapse/styles/light.d.ts +4 -1
- package/lib/collapse/styles/light.js +6 -3
- package/lib/data-table/src/DataTable.d.ts +2 -0
- package/lib/data-table/src/DataTable.js +1 -0
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.js +5 -4
- package/lib/data-table/src/interface.d.ts +3 -0
- package/lib/data-table/src/interface.js +1 -1
- package/lib/date-picker/src/DatePicker.d.ts +3 -0
- package/lib/date-picker/src/DatePicker.js +2 -2
- package/lib/date-picker/src/interface.d.ts +1 -0
- package/lib/date-picker/src/panel/use-calendar.js +5 -2
- package/lib/date-picker/src/panel/use-dual-calendar.js +6 -3
- package/lib/date-picker/src/utils.d.ts +1 -1
- package/lib/date-picker/src/utils.js +3 -2
- package/lib/dynamic-tags/src/DynamicTags.d.ts +10 -0
- package/lib/dynamic-tags/styles/light.d.ts +1 -0
- package/lib/tag/src/Tag.d.ts +27 -13
- package/lib/tag/src/Tag.js +7 -2
- package/lib/tag/src/styles/index.cssr.js +13 -3
- package/lib/tag/styles/light.d.ts +1 -0
- package/lib/tag/styles/light.js +7 -6
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +23 -1
|
@@ -9,6 +9,7 @@ import type { PaginationProps } from '../../pagination';
|
|
|
9
9
|
import type { DataTableTheme } from '../styles';
|
|
10
10
|
import type { RowItem, ColItem } from './use-group-header';
|
|
11
11
|
import type { BaseLoadingExposedProps } from '../../_internal';
|
|
12
|
+
import type { EmptyProps } from '../../empty';
|
|
12
13
|
export declare const dataTableProps: {
|
|
13
14
|
readonly onUnstableColumnResize: PropType<(resizedWidth: number, limitedWidth: number, column: TableBaseColumn, getColumnWidth: (key: ColumnKey) => number | undefined) => void>;
|
|
14
15
|
readonly pagination: {
|
|
@@ -101,6 +102,7 @@ export declare const dataTableProps: {
|
|
|
101
102
|
readonly type: PropType<BaseLoadingExposedProps>;
|
|
102
103
|
readonly default: {};
|
|
103
104
|
};
|
|
105
|
+
readonly emptyProps: PropType<Partial<EmptyProps>>;
|
|
104
106
|
readonly onLoad: PropType<DataTableOnLoad>;
|
|
105
107
|
readonly 'onUpdate:page': PropType<PaginationProps["onUpdate:page"]>;
|
|
106
108
|
readonly onUpdatePage: PropType<PaginationProps["onUpdate:page"]>;
|
|
@@ -3083,6 +3085,7 @@ export interface DataTableInjection {
|
|
|
3083
3085
|
syncScrollState: (deltaX?: number, deltaY?: number) => void;
|
|
3084
3086
|
setHeaderScrollLeft: (scrollLeft: number) => void;
|
|
3085
3087
|
renderCell: Ref<undefined | ((value: any, rowData: object, column: TableBaseColumn) => VNodeChild)>;
|
|
3088
|
+
emptyPropsRef: Ref<Partial<EmptyProps> | undefined>;
|
|
3086
3089
|
handleEdit: (value: any, row: any, key: string) => void;
|
|
3087
3090
|
}
|
|
3088
3091
|
export declare const dataTableInjectionKey: import("vue").InjectionKey<DataTableInjection>;
|
|
@@ -50,7 +50,7 @@ export const dataTableProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
|
50
50
|
}, paginationBehaviorOnFilter: {
|
|
51
51
|
type: String,
|
|
52
52
|
default: 'current'
|
|
53
|
-
}, scrollbarProps: Object, renderCell: Function, renderExpandIcon: Function, spinProps: { type: Object, default: {} }, onLoad: Function, 'onUpdate:page': [Function, Array], onUpdatePage: [Function, Array], 'onUpdate:pageSize': [Function, Array], onUpdatePageSize: [Function, Array], 'onUpdate:sorter': [Function, Array], onUpdateSorter: [Function, Array], 'onUpdate:filters': [Function, Array], onUpdateFilters: [Function, Array], 'onUpdate:checkedRowKeys': [Function, Array], onUpdateCheckedRowKeys: [Function, Array], 'onUpdate:expandedRowKeys': [Function, Array], onUpdateExpandedRowKeys: [Function, Array], onScroll: Function,
|
|
53
|
+
}, scrollbarProps: Object, renderCell: Function, renderExpandIcon: Function, spinProps: { type: Object, default: {} }, emptyProps: Object, onLoad: Function, 'onUpdate:page': [Function, Array], onUpdatePage: [Function, Array], 'onUpdate:pageSize': [Function, Array], onUpdatePageSize: [Function, Array], 'onUpdate:sorter': [Function, Array], onUpdateSorter: [Function, Array], 'onUpdate:filters': [Function, Array], onUpdateFilters: [Function, Array], 'onUpdate:checkedRowKeys': [Function, Array], onUpdateCheckedRowKeys: [Function, Array], 'onUpdate:expandedRowKeys': [Function, Array], onUpdateExpandedRowKeys: [Function, Array], onScroll: Function,
|
|
54
54
|
// deprecated
|
|
55
55
|
onPageChange: [Function, Array], onPageSizeChange: [Function, Array], onSorterChange: [Function, Array], onFiltersChange: [Function, Array], onCheckedRowKeysChange: [Function, Array] });
|
|
56
56
|
export const dataTableInjectionKey = createInjectionKey('u-data-table');
|
|
@@ -47,6 +47,7 @@ export declare const datePickerProps: {
|
|
|
47
47
|
readonly shortcuts: PropType<Shortcuts>;
|
|
48
48
|
readonly defaultShortcuts: BooleanConstructor;
|
|
49
49
|
readonly isDateDisabled: PropType<IsDateDisabled>;
|
|
50
|
+
readonly maxDate: PropType<number | undefined>;
|
|
50
51
|
readonly isTimeDisabled: PropType<IsTimeDisabled>;
|
|
51
52
|
readonly show: {
|
|
52
53
|
readonly type: PropType<boolean | undefined>;
|
|
@@ -2148,6 +2149,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2148
2149
|
readonly shortcuts: PropType<Shortcuts>;
|
|
2149
2150
|
readonly defaultShortcuts: BooleanConstructor;
|
|
2150
2151
|
readonly isDateDisabled: PropType<IsDateDisabled>;
|
|
2152
|
+
readonly maxDate: PropType<number | undefined>;
|
|
2151
2153
|
readonly isTimeDisabled: PropType<IsTimeDisabled>;
|
|
2152
2154
|
readonly show: {
|
|
2153
2155
|
readonly type: PropType<boolean | undefined>;
|
|
@@ -5448,6 +5450,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5448
5450
|
readonly shortcuts: PropType<Shortcuts>;
|
|
5449
5451
|
readonly defaultShortcuts: BooleanConstructor;
|
|
5450
5452
|
readonly isDateDisabled: PropType<IsDateDisabled>;
|
|
5453
|
+
readonly maxDate: PropType<number | undefined>;
|
|
5451
5454
|
readonly isTimeDisabled: PropType<IsTimeDisabled>;
|
|
5452
5455
|
readonly show: {
|
|
5453
5456
|
readonly type: PropType<boolean | undefined>;
|
|
@@ -30,7 +30,7 @@ export const datePickerProps = Object.assign(Object.assign({}, useTheme.props),
|
|
|
30
30
|
}, value: [Number, Array], formattedValue: [String, Array], size: String, type: {
|
|
31
31
|
type: String,
|
|
32
32
|
default: 'date'
|
|
33
|
-
}, valueFormat: String, separator: String, placeholder: String, startPlaceholder: String, endPlaceholder: String, format: String, dateFormat: String, timeFormat: String, actions: Array, shortcuts: Object, defaultShortcuts: Boolean, isDateDisabled: Function, isTimeDisabled: Function, show: {
|
|
33
|
+
}, valueFormat: String, separator: String, placeholder: String, startPlaceholder: String, endPlaceholder: String, format: String, dateFormat: String, timeFormat: String, actions: Array, shortcuts: Object, defaultShortcuts: Boolean, isDateDisabled: Function, maxDate: Number, isTimeDisabled: Function, show: {
|
|
34
34
|
type: Boolean,
|
|
35
35
|
default: undefined
|
|
36
36
|
}, panel: Boolean, ranges: Object, firstDayOfWeek: Number, inputReadonly: Boolean, closeOnSelect: Boolean, status: String, timePickerProps: [Object, Array], onClear: Function, onConfirm: Function, defaultCalendarStartTime: Number, defaultCalendarEndTime: Number, bindCalendarMonths: Boolean, 'onUpdate:show': [Function, Array], onUpdateShow: [Function, Array], 'onUpdate:formattedValue': [Function, Array], onUpdateFormattedValue: [Function, Array], 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array],
|
|
@@ -564,7 +564,7 @@ export default defineComponent({
|
|
|
564
564
|
const dualValidation = dualCalendarValidation(props, pendingValueRef);
|
|
565
565
|
provide(datePickerInjectionKey, Object.assign(Object.assign(Object.assign({ mergedClsPrefixRef, mergedThemeRef: themeRef, timePickerSizeRef,
|
|
566
566
|
localeRef,
|
|
567
|
-
dateLocaleRef, firstDayOfWeekRef: toRef(props, 'firstDayOfWeek'), isDateDisabledRef: toRef(props, 'isDateDisabled'), rangesRef: toRef(props, 'ranges'), timePickerPropsRef: toRef(props, 'timePickerProps'), closeOnSelectRef: toRef(props, 'closeOnSelect'), updateValueOnCloseRef: toRef(props, 'updateValueOnClose') }, uniVaidation), dualValidation), { datePickerSlots: slots }));
|
|
567
|
+
dateLocaleRef, firstDayOfWeekRef: toRef(props, 'firstDayOfWeek'), isDateDisabledRef: toRef(props, 'isDateDisabled'), maxDateRef: toRef(props, 'maxDate'), rangesRef: toRef(props, 'ranges'), timePickerPropsRef: toRef(props, 'timePickerProps'), closeOnSelectRef: toRef(props, 'closeOnSelect'), updateValueOnCloseRef: toRef(props, 'updateValueOnClose') }, uniVaidation), dualValidation), { datePickerSlots: slots }));
|
|
568
568
|
const exposedMethods = {
|
|
569
569
|
focus: () => {
|
|
570
570
|
var _a;
|
|
@@ -61,6 +61,7 @@ export type DatePickerInjection = {
|
|
|
61
61
|
localeRef: Ref<ULocale['DatePicker']>;
|
|
62
62
|
dateLocaleRef: Ref<UDateLocale>;
|
|
63
63
|
isDateDisabledRef: Ref<IsDateDisabled | undefined>;
|
|
64
|
+
maxDateRef: Ref<number | undefined>;
|
|
64
65
|
rangesRef: Ref<Record<string, [number, number]> | undefined>;
|
|
65
66
|
closeOnSelectRef: Ref<boolean>;
|
|
66
67
|
updateValueOnCloseRef: Ref<boolean>;
|
|
@@ -11,7 +11,7 @@ const useCalendarProps = Object.assign(Object.assign({}, usePanelCommonProps), {
|
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
12
12
|
function useCalendar(props, type) {
|
|
13
13
|
const panelCommon = usePanelCommon(props);
|
|
14
|
-
const { isValueInvalidRef, isDateDisabledRef, isDateInvalidRef, isTimeInvalidRef, isDateTimeInvalidRef, isHourDisabledRef, isMinuteDisabledRef, isSecondDisabledRef, localeRef, firstDayOfWeekRef, datePickerSlots
|
|
14
|
+
const { isValueInvalidRef, isDateDisabledRef, maxDateRef, isDateInvalidRef, isTimeInvalidRef, isDateTimeInvalidRef, isHourDisabledRef, isMinuteDisabledRef, isSecondDisabledRef, localeRef, firstDayOfWeekRef, datePickerSlots
|
|
15
15
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
16
16
|
} = inject(datePickerInjectionKey);
|
|
17
17
|
const validation = {
|
|
@@ -44,7 +44,7 @@ function useCalendar(props, type) {
|
|
|
44
44
|
});
|
|
45
45
|
const yearArrayRef = computed(() => {
|
|
46
46
|
const { value } = props;
|
|
47
|
-
return yearArray(Array.isArray(value) ? null : value, nowRef.value);
|
|
47
|
+
return yearArray(Array.isArray(value) ? null : value, nowRef.value, maxDateRef.value);
|
|
48
48
|
});
|
|
49
49
|
const quarterArrayRef = computed(() => {
|
|
50
50
|
const { value } = props;
|
|
@@ -90,6 +90,9 @@ function useCalendar(props, type) {
|
|
|
90
90
|
return getTime(startOfDay(value));
|
|
91
91
|
}
|
|
92
92
|
function mergedIsDateDisabled(ts) {
|
|
93
|
+
if (maxDateRef.value && ts > maxDateRef.value) {
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
93
96
|
const { isDateDisabled: { value: isDateDisabled } } = validation;
|
|
94
97
|
if (!isDateDisabled)
|
|
95
98
|
return false;
|
|
@@ -11,7 +11,7 @@ const useDualCalendarProps = Object.assign(Object.assign({}, usePanelCommonProps
|
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
12
12
|
function useDualCalendar(props, type) {
|
|
13
13
|
var _a, _b;
|
|
14
|
-
const { isDateDisabledRef, isStartHourDisabledRef, isEndHourDisabledRef, isStartMinuteDisabledRef, isEndMinuteDisabledRef, isStartSecondDisabledRef, isEndSecondDisabledRef, isStartDateInvalidRef, isEndDateInvalidRef, isStartTimeInvalidRef, isEndTimeInvalidRef, isStartValueInvalidRef, isEndValueInvalidRef, isRangeInvalidRef, localeRef, rangesRef, closeOnSelectRef, updateValueOnCloseRef, firstDayOfWeekRef, datePickerSlots
|
|
14
|
+
const { isDateDisabledRef, maxDateRef, isStartHourDisabledRef, isEndHourDisabledRef, isStartMinuteDisabledRef, isEndMinuteDisabledRef, isStartSecondDisabledRef, isEndSecondDisabledRef, isStartDateInvalidRef, isEndDateInvalidRef, isStartTimeInvalidRef, isEndTimeInvalidRef, isStartValueInvalidRef, isEndValueInvalidRef, isRangeInvalidRef, localeRef, rangesRef, closeOnSelectRef, updateValueOnCloseRef, firstDayOfWeekRef, datePickerSlots
|
|
15
15
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
16
16
|
} = inject(datePickerInjectionKey);
|
|
17
17
|
const validation = {
|
|
@@ -108,10 +108,10 @@ function useDualCalendar(props, type) {
|
|
|
108
108
|
return shortcuts || rangesRef.value;
|
|
109
109
|
});
|
|
110
110
|
const startYearArrayRef = computed(() => {
|
|
111
|
-
return yearArray(pluckValueFromRange(props.value, 'start'), nowRef.value);
|
|
111
|
+
return yearArray(pluckValueFromRange(props.value, 'start'), nowRef.value, maxDateRef.value);
|
|
112
112
|
});
|
|
113
113
|
const endYearArrayRef = computed(() => {
|
|
114
|
-
return yearArray(pluckValueFromRange(props.value, 'end'), nowRef.value);
|
|
114
|
+
return yearArray(pluckValueFromRange(props.value, 'end'), nowRef.value, maxDateRef.value);
|
|
115
115
|
});
|
|
116
116
|
const startQuarterArrayRef = computed(() => {
|
|
117
117
|
const startValue = pluckValueFromRange(props.value, 'start');
|
|
@@ -208,6 +208,9 @@ function useDualCalendar(props, type) {
|
|
|
208
208
|
}
|
|
209
209
|
// The function is used on date panel, not the date-picker value validation
|
|
210
210
|
function mergedIsDateDisabled(ts) {
|
|
211
|
+
if (maxDateRef.value && ts > maxDateRef.value) {
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
211
214
|
const isDateDisabled = isDateDisabledRef.value;
|
|
212
215
|
if (!isDateDisabled)
|
|
213
216
|
return false;
|
|
@@ -53,7 +53,7 @@ export type DateCommonItem = DateItem | MonthItem | YearItem | QuarterItem;
|
|
|
53
53
|
declare function dateArray(monthTs: number, valueTs: number | [number, number] | null, currentTs: number, startDay: 0 | 1 | 2 | 3 | 4 | 5 | 6, strip?: boolean): DateItem[];
|
|
54
54
|
declare function monthArray(yearAnchorTs: number, valueTs: number | null, currentTs: number): MonthItem[];
|
|
55
55
|
declare function quarterArray(yearAnchorTs: number, valueTs: number | null, currentTs: number): QuarterItem[];
|
|
56
|
-
declare function yearArray(valueTs: number | null, currentTs: number): YearItem[];
|
|
56
|
+
declare function yearArray(valueTs: number | null, currentTs: number, maxDate?: number): YearItem[];
|
|
57
57
|
declare function strictParse(string: string, pattern: string, backup: Date, option: {
|
|
58
58
|
locale: UDateLocale['locale'];
|
|
59
59
|
}): Date;
|
|
@@ -153,10 +153,11 @@ function quarterArray(yearAnchorTs, valueTs, currentTs) {
|
|
|
153
153
|
}
|
|
154
154
|
return calendarQuarters;
|
|
155
155
|
}
|
|
156
|
-
function yearArray(valueTs, currentTs) {
|
|
156
|
+
function yearArray(valueTs, currentTs, maxDate) {
|
|
157
157
|
const calendarYears = [];
|
|
158
158
|
const time1900 = new Date(START_YEAR, 0, 1);
|
|
159
|
-
|
|
159
|
+
const endYear = maxDate ? new Date(maxDate).getFullYear() : END_YEAR;
|
|
160
|
+
let count = endYear - START_YEAR + 1;
|
|
160
161
|
while (count--) {
|
|
161
162
|
calendarYears.push(yearItem(getTime(addYears(time1900, count)), valueTs, currentTs));
|
|
162
163
|
}
|
|
@@ -349,6 +349,7 @@ export declare const dynamicTagsProps: {
|
|
|
349
349
|
textColorPressedCheckable: string;
|
|
350
350
|
textColorChecked: string;
|
|
351
351
|
colorCheckable: string;
|
|
352
|
+
colorCheckableOutline: string;
|
|
352
353
|
colorHoverCheckable: string;
|
|
353
354
|
colorPressedCheckable: string;
|
|
354
355
|
colorChecked: string;
|
|
@@ -736,6 +737,7 @@ export declare const dynamicTagsProps: {
|
|
|
736
737
|
textColorPressedCheckable: string;
|
|
737
738
|
textColorChecked: string;
|
|
738
739
|
colorCheckable: string;
|
|
740
|
+
colorCheckableOutline: string;
|
|
739
741
|
colorHoverCheckable: string;
|
|
740
742
|
colorPressedCheckable: string;
|
|
741
743
|
colorChecked: string;
|
|
@@ -1123,6 +1125,7 @@ export declare const dynamicTagsProps: {
|
|
|
1123
1125
|
textColorPressedCheckable: string;
|
|
1124
1126
|
textColorChecked: string;
|
|
1125
1127
|
colorCheckable: string;
|
|
1128
|
+
colorCheckableOutline: string;
|
|
1126
1129
|
colorHoverCheckable: string;
|
|
1127
1130
|
colorPressedCheckable: string;
|
|
1128
1131
|
colorChecked: string;
|
|
@@ -1548,6 +1551,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1548
1551
|
textColorPressedCheckable: string;
|
|
1549
1552
|
textColorChecked: string;
|
|
1550
1553
|
colorCheckable: string;
|
|
1554
|
+
colorCheckableOutline: string;
|
|
1551
1555
|
colorHoverCheckable: string;
|
|
1552
1556
|
colorPressedCheckable: string;
|
|
1553
1557
|
colorChecked: string;
|
|
@@ -1935,6 +1939,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1935
1939
|
textColorPressedCheckable: string;
|
|
1936
1940
|
textColorChecked: string;
|
|
1937
1941
|
colorCheckable: string;
|
|
1942
|
+
colorCheckableOutline: string;
|
|
1938
1943
|
colorHoverCheckable: string;
|
|
1939
1944
|
colorPressedCheckable: string;
|
|
1940
1945
|
colorChecked: string;
|
|
@@ -2322,6 +2327,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2322
2327
|
textColorPressedCheckable: string;
|
|
2323
2328
|
textColorChecked: string;
|
|
2324
2329
|
colorCheckable: string;
|
|
2330
|
+
colorCheckableOutline: string;
|
|
2325
2331
|
colorHoverCheckable: string;
|
|
2326
2332
|
colorPressedCheckable: string;
|
|
2327
2333
|
colorChecked: string;
|
|
@@ -2742,6 +2748,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2742
2748
|
textColorPressedCheckable: string;
|
|
2743
2749
|
textColorChecked: string;
|
|
2744
2750
|
colorCheckable: string;
|
|
2751
|
+
colorCheckableOutline: string;
|
|
2745
2752
|
colorHoverCheckable: string;
|
|
2746
2753
|
colorPressedCheckable: string;
|
|
2747
2754
|
colorChecked: string;
|
|
@@ -3194,6 +3201,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3194
3201
|
textColorPressedCheckable: string;
|
|
3195
3202
|
textColorChecked: string;
|
|
3196
3203
|
colorCheckable: string;
|
|
3204
|
+
colorCheckableOutline: string;
|
|
3197
3205
|
colorHoverCheckable: string;
|
|
3198
3206
|
colorPressedCheckable: string;
|
|
3199
3207
|
colorChecked: string;
|
|
@@ -3581,6 +3589,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3581
3589
|
textColorPressedCheckable: string;
|
|
3582
3590
|
textColorChecked: string;
|
|
3583
3591
|
colorCheckable: string;
|
|
3592
|
+
colorCheckableOutline: string;
|
|
3584
3593
|
colorHoverCheckable: string;
|
|
3585
3594
|
colorPressedCheckable: string;
|
|
3586
3595
|
colorChecked: string;
|
|
@@ -3968,6 +3977,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3968
3977
|
textColorPressedCheckable: string;
|
|
3969
3978
|
textColorChecked: string;
|
|
3970
3979
|
colorCheckable: string;
|
|
3980
|
+
colorCheckableOutline: string;
|
|
3971
3981
|
colorHoverCheckable: string;
|
|
3972
3982
|
colorPressedCheckable: string;
|
|
3973
3983
|
colorChecked: string;
|
|
@@ -309,6 +309,7 @@ declare const dynamicTagsLight: import("../../_mixins").Theme<"DynamicTags", {
|
|
|
309
309
|
textColorPressedCheckable: string;
|
|
310
310
|
textColorChecked: string;
|
|
311
311
|
colorCheckable: string;
|
|
312
|
+
colorCheckableOutline: string;
|
|
312
313
|
colorHoverCheckable: string;
|
|
313
314
|
colorPressedCheckable: string;
|
|
314
315
|
colorChecked: string;
|
package/es/tag/src/Tag.d.ts
CHANGED
|
@@ -11,8 +11,13 @@ export declare const tagProps: {
|
|
|
11
11
|
type: PropType<boolean | undefined>;
|
|
12
12
|
default: undefined;
|
|
13
13
|
};
|
|
14
|
+
size: {
|
|
15
|
+
type: PropType<"small" | "medium" | "large">;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
14
18
|
checked: BooleanConstructor;
|
|
15
19
|
checkable: BooleanConstructor;
|
|
20
|
+
outline: BooleanConstructor;
|
|
16
21
|
strong: BooleanConstructor;
|
|
17
22
|
triggerClickOnClose: BooleanConstructor;
|
|
18
23
|
onClose: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
@@ -35,10 +40,6 @@ export declare const tagProps: {
|
|
|
35
40
|
readonly default: "default";
|
|
36
41
|
};
|
|
37
42
|
round: BooleanConstructor;
|
|
38
|
-
size: {
|
|
39
|
-
readonly type: PropType<"tiny" | "small" | "medium" | "large">;
|
|
40
|
-
readonly default: "medium";
|
|
41
|
-
};
|
|
42
43
|
closable: {
|
|
43
44
|
readonly type: PropType<boolean | undefined>;
|
|
44
45
|
readonly default: undefined;
|
|
@@ -80,6 +81,7 @@ export declare const tagProps: {
|
|
|
80
81
|
textColorPressedCheckable: string;
|
|
81
82
|
textColorChecked: string;
|
|
82
83
|
colorCheckable: string;
|
|
84
|
+
colorCheckableOutline: string;
|
|
83
85
|
colorHoverCheckable: string;
|
|
84
86
|
colorPressedCheckable: string;
|
|
85
87
|
colorChecked: string;
|
|
@@ -183,6 +185,7 @@ export declare const tagProps: {
|
|
|
183
185
|
textColorPressedCheckable: string;
|
|
184
186
|
textColorChecked: string;
|
|
185
187
|
colorCheckable: string;
|
|
188
|
+
colorCheckableOutline: string;
|
|
186
189
|
colorHoverCheckable: string;
|
|
187
190
|
colorPressedCheckable: string;
|
|
188
191
|
colorChecked: string;
|
|
@@ -286,6 +289,7 @@ export declare const tagProps: {
|
|
|
286
289
|
textColorPressedCheckable: string;
|
|
287
290
|
textColorChecked: string;
|
|
288
291
|
colorCheckable: string;
|
|
292
|
+
colorCheckableOutline: string;
|
|
289
293
|
colorHoverCheckable: string;
|
|
290
294
|
colorPressedCheckable: string;
|
|
291
295
|
colorChecked: string;
|
|
@@ -367,8 +371,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
367
371
|
type: PropType<boolean | undefined>;
|
|
368
372
|
default: undefined;
|
|
369
373
|
};
|
|
374
|
+
size: {
|
|
375
|
+
type: PropType<"small" | "medium" | "large">;
|
|
376
|
+
default: string;
|
|
377
|
+
};
|
|
370
378
|
checked: BooleanConstructor;
|
|
371
379
|
checkable: BooleanConstructor;
|
|
380
|
+
outline: BooleanConstructor;
|
|
372
381
|
strong: BooleanConstructor;
|
|
373
382
|
triggerClickOnClose: BooleanConstructor;
|
|
374
383
|
onClose: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
@@ -391,10 +400,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
391
400
|
readonly default: "default";
|
|
392
401
|
};
|
|
393
402
|
round: BooleanConstructor;
|
|
394
|
-
size: {
|
|
395
|
-
readonly type: PropType<"tiny" | "small" | "medium" | "large">;
|
|
396
|
-
readonly default: "medium";
|
|
397
|
-
};
|
|
398
403
|
closable: {
|
|
399
404
|
readonly type: PropType<boolean | undefined>;
|
|
400
405
|
readonly default: undefined;
|
|
@@ -436,6 +441,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
436
441
|
textColorPressedCheckable: string;
|
|
437
442
|
textColorChecked: string;
|
|
438
443
|
colorCheckable: string;
|
|
444
|
+
colorCheckableOutline: string;
|
|
439
445
|
colorHoverCheckable: string;
|
|
440
446
|
colorPressedCheckable: string;
|
|
441
447
|
colorChecked: string;
|
|
@@ -539,6 +545,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
539
545
|
textColorPressedCheckable: string;
|
|
540
546
|
textColorChecked: string;
|
|
541
547
|
colorCheckable: string;
|
|
548
|
+
colorCheckableOutline: string;
|
|
542
549
|
colorHoverCheckable: string;
|
|
543
550
|
colorPressedCheckable: string;
|
|
544
551
|
colorChecked: string;
|
|
@@ -642,6 +649,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
642
649
|
textColorPressedCheckable: string;
|
|
643
650
|
textColorChecked: string;
|
|
644
651
|
colorCheckable: string;
|
|
652
|
+
colorCheckableOutline: string;
|
|
645
653
|
colorHoverCheckable: string;
|
|
646
654
|
colorPressedCheckable: string;
|
|
647
655
|
colorChecked: string;
|
|
@@ -739,6 +747,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
739
747
|
'--u-close-size': string;
|
|
740
748
|
'--u-color': string;
|
|
741
749
|
'--u-color-checkable': string;
|
|
750
|
+
'--u-color-checkable-outline': string;
|
|
742
751
|
'--u-color-checked': string;
|
|
743
752
|
'--u-color-checked-hover': string;
|
|
744
753
|
'--u-color-checked-pressed': string;
|
|
@@ -762,8 +771,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
762
771
|
type: PropType<boolean | undefined>;
|
|
763
772
|
default: undefined;
|
|
764
773
|
};
|
|
774
|
+
size: {
|
|
775
|
+
type: PropType<"small" | "medium" | "large">;
|
|
776
|
+
default: string;
|
|
777
|
+
};
|
|
765
778
|
checked: BooleanConstructor;
|
|
766
779
|
checkable: BooleanConstructor;
|
|
780
|
+
outline: BooleanConstructor;
|
|
767
781
|
strong: BooleanConstructor;
|
|
768
782
|
triggerClickOnClose: BooleanConstructor;
|
|
769
783
|
onClose: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
@@ -786,10 +800,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
786
800
|
readonly default: "default";
|
|
787
801
|
};
|
|
788
802
|
round: BooleanConstructor;
|
|
789
|
-
size: {
|
|
790
|
-
readonly type: PropType<"tiny" | "small" | "medium" | "large">;
|
|
791
|
-
readonly default: "medium";
|
|
792
|
-
};
|
|
793
803
|
closable: {
|
|
794
804
|
readonly type: PropType<boolean | undefined>;
|
|
795
805
|
readonly default: undefined;
|
|
@@ -831,6 +841,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
831
841
|
textColorPressedCheckable: string;
|
|
832
842
|
textColorChecked: string;
|
|
833
843
|
colorCheckable: string;
|
|
844
|
+
colorCheckableOutline: string;
|
|
834
845
|
colorHoverCheckable: string;
|
|
835
846
|
colorPressedCheckable: string;
|
|
836
847
|
colorChecked: string;
|
|
@@ -934,6 +945,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
934
945
|
textColorPressedCheckable: string;
|
|
935
946
|
textColorChecked: string;
|
|
936
947
|
colorCheckable: string;
|
|
948
|
+
colorCheckableOutline: string;
|
|
937
949
|
colorHoverCheckable: string;
|
|
938
950
|
colorPressedCheckable: string;
|
|
939
951
|
colorChecked: string;
|
|
@@ -1037,6 +1049,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1037
1049
|
textColorPressedCheckable: string;
|
|
1038
1050
|
textColorChecked: string;
|
|
1039
1051
|
colorCheckable: string;
|
|
1052
|
+
colorCheckableOutline: string;
|
|
1040
1053
|
colorHoverCheckable: string;
|
|
1041
1054
|
colorPressedCheckable: string;
|
|
1042
1055
|
colorChecked: string;
|
|
@@ -1111,11 +1124,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1111
1124
|
type: "default" | "tertiary" | "primary" | "info" | "success" | "warning" | "error";
|
|
1112
1125
|
disabled: boolean | undefined;
|
|
1113
1126
|
bordered: boolean | undefined;
|
|
1114
|
-
size: "small" | "
|
|
1127
|
+
size: "small" | "medium" | "large";
|
|
1115
1128
|
checked: boolean;
|
|
1116
1129
|
round: boolean;
|
|
1117
1130
|
closable: boolean | undefined;
|
|
1118
1131
|
strong: boolean;
|
|
1132
|
+
outline: boolean;
|
|
1119
1133
|
checkable: boolean;
|
|
1120
1134
|
triggerClickOnClose: boolean;
|
|
1121
1135
|
internalCloseFocusable: boolean;
|
package/es/tag/src/Tag.js
CHANGED
|
@@ -9,7 +9,10 @@ import style from './styles/index.cssr';
|
|
|
9
9
|
export const tagProps = Object.assign(Object.assign(Object.assign({}, useTheme.props), commonProps), { bordered: {
|
|
10
10
|
type: Boolean,
|
|
11
11
|
default: undefined
|
|
12
|
-
},
|
|
12
|
+
}, size: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: 'large'
|
|
15
|
+
}, checked: Boolean, checkable: Boolean, outline: Boolean, strong: Boolean, triggerClickOnClose: Boolean, onClose: [Array, Function], onMouseenter: Function, onMouseleave: Function, 'onUpdate:checked': Function, onUpdateChecked: Function,
|
|
13
16
|
// private
|
|
14
17
|
internalCloseFocusable: {
|
|
15
18
|
type: Boolean,
|
|
@@ -72,7 +75,7 @@ export default defineComponent({
|
|
|
72
75
|
const rtlEnabledRef = useRtl('Tag', mergedRtlRef, mergedClsPrefixRef);
|
|
73
76
|
const cssVarsRef = computed(() => {
|
|
74
77
|
const { type, size, color: { color, textColor } = {} } = props;
|
|
75
|
-
const { common: { cubicBezierEaseInOut }, self: { closeMargin, closeMarginRtl, borderRadius, opacityDisabled, textColorCheckable, textColorHoverCheckable, textColorPressedCheckable, textColorChecked, colorCheckable, colorHoverCheckable, colorPressedCheckable, colorChecked, colorCheckedHover, colorCheckedPressed, closeBorderRadius, fontWeightStrong, fontWeight, [createKey('padding', size)]: padding, [createKey('colorBordered', type)]: colorBordered, [createKey('closeSize', size)]: closeSize, [createKey('closeIconSize', size)]: closeIconSize, [createKey('fontSize', size)]: fontSize, [createKey('height', size)]: height, [createKey('color', type)]: typedColor, [createKey('textColor', type)]: typeTextColor, [createKey('border', type)]: border, [createKey('closeIconColor', type)]: closeIconColor, [createKey('closeIconColorHover', type)]: closeIconColorHover, [createKey('closeIconColorPressed', type)]: closeIconColorPressed, [createKey('closeColorHover', type)]: closeColorHover, [createKey('closeColorPressed', type)]: closeColorPressed } } = themeRef.value;
|
|
78
|
+
const { common: { cubicBezierEaseInOut }, self: { closeMargin, closeMarginRtl, borderRadius, opacityDisabled, textColorCheckable, textColorHoverCheckable, textColorPressedCheckable, textColorChecked, colorCheckable, colorCheckableOutline, colorHoverCheckable, colorPressedCheckable, colorChecked, colorCheckedHover, colorCheckedPressed, closeBorderRadius, fontWeightStrong, fontWeight, [createKey('padding', size)]: padding, [createKey('colorBordered', type)]: colorBordered, [createKey('closeSize', size)]: closeSize, [createKey('closeIconSize', size)]: closeIconSize, [createKey('fontSize', size)]: fontSize, [createKey('height', size)]: height, [createKey('color', type)]: typedColor, [createKey('textColor', type)]: typeTextColor, [createKey('border', type)]: border, [createKey('closeIconColor', type)]: closeIconColor, [createKey('closeIconColorHover', type)]: closeIconColorHover, [createKey('closeIconColorPressed', type)]: closeIconColorPressed, [createKey('closeColorHover', type)]: closeColorHover, [createKey('closeColorPressed', type)]: closeColorPressed } } = themeRef.value;
|
|
76
79
|
return {
|
|
77
80
|
'--u-font-weight-strong': fontWeightStrong,
|
|
78
81
|
'--u-font-weight': fontWeight,
|
|
@@ -93,6 +96,7 @@ export default defineComponent({
|
|
|
93
96
|
'--u-close-size': closeSize,
|
|
94
97
|
'--u-color': color || (mergedBorderedRef.value ? colorBordered : typedColor),
|
|
95
98
|
'--u-color-checkable': colorCheckable,
|
|
99
|
+
'--u-color-checkable-outline': colorCheckableOutline,
|
|
96
100
|
'--u-color-checked': colorChecked,
|
|
97
101
|
'--u-color-checked-hover': colorCheckedHover,
|
|
98
102
|
'--u-color-checked-pressed': colorCheckedPressed,
|
|
@@ -144,6 +148,7 @@ export default defineComponent({
|
|
|
144
148
|
[`${mergedClsPrefix}-tag--strong`]: this.strong,
|
|
145
149
|
[`${mergedClsPrefix}-tag--disabled`]: this.disabled,
|
|
146
150
|
[`${mergedClsPrefix}-tag--checkable`]: this.checkable,
|
|
151
|
+
[`${mergedClsPrefix}-tag--outline`]: this.checkable && this.outline,
|
|
147
152
|
[`${mergedClsPrefix}-tag--checked`]: this.checkable && this.checked,
|
|
148
153
|
[`${mergedClsPrefix}-tag--round`]: round,
|
|
149
154
|
[`${mergedClsPrefix}-tag--avatar`]: avatarNode,
|
|
@@ -50,7 +50,9 @@ export default cB('tag', `
|
|
|
50
50
|
font-weight: var(--u-font-weight);
|
|
51
51
|
`, [cM('strong', `
|
|
52
52
|
font-weight: var(--u-font-weight-strong);
|
|
53
|
-
`), cE('
|
|
53
|
+
`), cM('closable', [cE('content', `
|
|
54
|
+
padding-left: 4px;
|
|
55
|
+
`)]), cE('border', `
|
|
54
56
|
pointer-events: none;
|
|
55
57
|
position: absolute;
|
|
56
58
|
left: 0;
|
|
@@ -95,7 +97,11 @@ export default cB('tag', `
|
|
|
95
97
|
padding: 0px 8px;
|
|
96
98
|
background-color: var(--u-color-checkable);
|
|
97
99
|
transition: border-color .3s var(--u-bezier);
|
|
98
|
-
`, [
|
|
100
|
+
`, [cE('border', `
|
|
101
|
+
border: unset;
|
|
102
|
+
`), cE('content', `
|
|
103
|
+
padding-left: 0px;
|
|
104
|
+
`), cNotM('disabled', [c('&:hover', 'background-color: var(--u-color-hover-checkable);', [cNotM('checked', 'color: var(--u-text-color-hover-checkable);')]), c('&:focus', `
|
|
99
105
|
background-color: var(--u-color-pressed-checkable);
|
|
100
106
|
transition: border-color .3s var(--u-bezier);`, [cNotM('checked', 'color: var(--u-text-color-pressed-checkable);')]), c('&:active', `
|
|
101
107
|
background-color: var(--u-color-pressed-checkable);
|
|
@@ -105,4 +111,8 @@ export default cB('tag', `
|
|
|
105
111
|
`, [cE('border', `
|
|
106
112
|
border-color: var(--u-color-checked);
|
|
107
113
|
transition: none;
|
|
108
|
-
`), cNotM('disabled', [c('&:hover', 'background-color: var(--u-color-checked-hover);'), c('&:focus', 'background-color: var(--u-color-checked-hover);'), c('&:active', 'background-color: var(--u-color-checked-pressed);')])])])
|
|
114
|
+
`), cNotM('disabled', [c('&:hover', 'background-color: var(--u-color-checked-hover);'), c('&:focus', 'background-color: var(--u-color-checked-hover);'), c('&:active', 'background-color: var(--u-color-checked-pressed);')])])]), cM('outline', `
|
|
115
|
+
background-color: var(--u-color-checkable-outline);
|
|
116
|
+
`, [cE('border', `
|
|
117
|
+
border: var(--u-border);
|
|
118
|
+
`)])]);
|
package/es/tag/styles/light.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export declare const self: (vars: ThemeCommonVars) => {
|
|
|
33
33
|
textColorPressedCheckable: string;
|
|
34
34
|
textColorChecked: string;
|
|
35
35
|
colorCheckable: string;
|
|
36
|
+
colorCheckableOutline: string;
|
|
36
37
|
colorHoverCheckable: string;
|
|
37
38
|
colorPressedCheckable: string;
|
|
38
39
|
colorChecked: string;
|
package/es/tag/styles/light.js
CHANGED
|
@@ -12,14 +12,14 @@ export const self = (vars) => {
|
|
|
12
12
|
closeSizeSmall: '14px',
|
|
13
13
|
closeSizeMedium: '16px',
|
|
14
14
|
closeSizeLarge: '18px',
|
|
15
|
-
paddingTiny: '2px 6px
|
|
16
|
-
paddingSmall: '2px 6px
|
|
17
|
-
paddingMedium: '2px 6px
|
|
18
|
-
paddingLarge: '
|
|
15
|
+
paddingTiny: '2px 6px',
|
|
16
|
+
paddingSmall: '2px 6px',
|
|
17
|
+
paddingMedium: '2px 6px',
|
|
18
|
+
paddingLarge: '6px 8px',
|
|
19
19
|
closeMargin: '0 0 0 4px',
|
|
20
20
|
closeMarginRtl: '0 4px 0 0',
|
|
21
21
|
closeBorderRadius: borderRadius,
|
|
22
|
-
heightTiny: '
|
|
22
|
+
heightTiny: '20px',
|
|
23
23
|
heightSmall: '20px',
|
|
24
24
|
heightMedium: '24px',
|
|
25
25
|
heightLarge: '32px',
|
|
@@ -36,7 +36,8 @@ export const self = (vars) => {
|
|
|
36
36
|
textColorHoverCheckable: textPrimary,
|
|
37
37
|
textColorPressedCheckable: textPrimary,
|
|
38
38
|
textColorChecked: textQuaternary,
|
|
39
|
-
colorCheckable:
|
|
39
|
+
colorCheckable: elementsQuaternary,
|
|
40
|
+
colorCheckableOutline: elementsSecondary,
|
|
40
41
|
colorHoverCheckable: elementsQuaternary,
|
|
41
42
|
colorPressedCheckable: elementsQuaternary,
|
|
42
43
|
colorChecked: elementsPrimary,
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.5.
|
|
1
|
+
declare const _default: "1.5.5";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.5.
|
|
1
|
+
export default '1.5.5';
|
package/lib/_utils/css/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.color2Class = exports.formatLength = void 0;
|
|
3
|
+
exports.resolveSize = exports.color2Class = exports.formatLength = void 0;
|
|
4
4
|
var format_length_1 = require("./format-length");
|
|
5
5
|
Object.defineProperty(exports, "formatLength", { enumerable: true, get: function () { return format_length_1.formatLength; } });
|
|
6
6
|
var color_to_class_1 = require("./color-to-class");
|
|
7
7
|
Object.defineProperty(exports, "color2Class", { enumerable: true, get: function () { return color_to_class_1.color2Class; } });
|
|
8
|
+
var normalize_size_1 = require("./normalize-size");
|
|
9
|
+
Object.defineProperty(exports, "resolveSize", { enumerable: true, get: function () { return normalize_size_1.resolveSize; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const resolveSize: (value: string | number | undefined, fallback: string) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveSize = void 0;
|
|
4
|
+
const resolveSize = (value, fallback) => {
|
|
5
|
+
if (value === undefined)
|
|
6
|
+
return fallback;
|
|
7
|
+
value = String(value);
|
|
8
|
+
return /^\d+$/.test(value) ? `${value}px` : value;
|
|
9
|
+
};
|
|
10
|
+
exports.resolveSize = resolveSize;
|
package/lib/_utils/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { call, keep, omit, flatten, getSlot, getVNodeChildren, keysOf, render, g
|
|
|
2
2
|
export type { MaybeArray } from './vue';
|
|
3
3
|
export { warn, warnOnce, throwError, smallerSize, largerSize, getTitleAttribute, isArrayShallowEqual } from './uzum';
|
|
4
4
|
export type { ExtractPublicPropTypes, ExtractInternalPropTypes, Mutable } from './uzum';
|
|
5
|
-
export { formatLength, color2Class } from './css';
|
|
5
|
+
export { formatLength, color2Class, resolveSize } from './css';
|
|
6
6
|
export { createKey } from './cssr';
|
|
7
7
|
export { isJsdom } from './env/is-jsdom';
|
|
8
8
|
export { isBrowser } from './env/is-browser';
|
package/lib/_utils/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createStylesWithSingleColor = exports.markEventEffectPerformed = exports.eventEffectNotPerformed = exports.isBrowser = exports.isJsdom = exports.createKey = exports.color2Class = exports.formatLength = exports.isArrayShallowEqual = exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = exports.Wrapper = exports.resolveWrappedSlotWithProps = exports.isNodeVShowFalse = exports.mergeEventHandlers = exports.isSlotEmpty = exports.resolveWrappedSlot = exports.resolveSlotWithProps = exports.resolveSlot = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.getVNodeChildren = exports.getSlot = exports.flatten = exports.omit = exports.keep = exports.call = void 0;
|
|
17
|
+
exports.createStylesWithSingleColor = exports.markEventEffectPerformed = exports.eventEffectNotPerformed = exports.isBrowser = exports.isJsdom = exports.createKey = exports.resolveSize = exports.color2Class = exports.formatLength = exports.isArrayShallowEqual = exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = exports.Wrapper = exports.resolveWrappedSlotWithProps = exports.isNodeVShowFalse = exports.mergeEventHandlers = exports.isSlotEmpty = exports.resolveWrappedSlot = exports.resolveSlotWithProps = exports.resolveSlot = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.getVNodeChildren = exports.getSlot = exports.flatten = exports.omit = exports.keep = exports.call = void 0;
|
|
18
18
|
var vue_1 = require("./vue");
|
|
19
19
|
Object.defineProperty(exports, "call", { enumerable: true, get: function () { return vue_1.call; } });
|
|
20
20
|
Object.defineProperty(exports, "keep", { enumerable: true, get: function () { return vue_1.keep; } });
|
|
@@ -47,6 +47,7 @@ Object.defineProperty(exports, "isArrayShallowEqual", { enumerable: true, get: f
|
|
|
47
47
|
var css_1 = require("./css");
|
|
48
48
|
Object.defineProperty(exports, "formatLength", { enumerable: true, get: function () { return css_1.formatLength; } });
|
|
49
49
|
Object.defineProperty(exports, "color2Class", { enumerable: true, get: function () { return css_1.color2Class; } });
|
|
50
|
+
Object.defineProperty(exports, "resolveSize", { enumerable: true, get: function () { return css_1.resolveSize; } });
|
|
50
51
|
var cssr_1 = require("./cssr");
|
|
51
52
|
Object.defineProperty(exports, "createKey", { enumerable: true, get: function () { return cssr_1.createKey; } });
|
|
52
53
|
var is_jsdom_1 = require("./env/is-jsdom");
|
package/lib/avatar/src/Avatar.js
CHANGED
|
@@ -109,12 +109,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
109
109
|
const getBackgroundColor = (color) => {
|
|
110
110
|
return props.disabled || size === 'small' ? 'rgba(0,0,0,0)' : color;
|
|
111
111
|
};
|
|
112
|
-
const resolveSize = (value, fallback) => {
|
|
113
|
-
if (value === undefined)
|
|
114
|
-
return fallback;
|
|
115
|
-
value = String(value);
|
|
116
|
-
return /^\d+$/.test(value) ? `${value}px` : value;
|
|
117
|
-
};
|
|
118
112
|
return {
|
|
119
113
|
'--u-font-size': fontSize,
|
|
120
114
|
'--u-font-weight': fontWeight,
|
|
@@ -125,7 +119,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
125
119
|
'--u-icon-color': props.iconColor || iconColor,
|
|
126
120
|
'--u-bezier': cubicBezierEaseInOut,
|
|
127
121
|
'--u-merged-size': `var(--u-avatar-size-override, ${height})`,
|
|
128
|
-
'--u-icon-size': resolveSize(props.iconSize, iconSize)
|
|
122
|
+
'--u-icon-size': (0, _utils_1.resolveSize)(props.iconSize, iconSize)
|
|
129
123
|
};
|
|
130
124
|
});
|
|
131
125
|
const themeClassHandle = inlineThemeDisabled
|