@uzum-tech/ui 1.5.4 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +106 -39
- package/dist/index.prod.js +3 -3
- package/es/_internal/radio/src/use-radio.d.ts +1 -0
- package/es/_internal/radio/src/use-radio.js +2 -1
- 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/checkbox/src/styles/index.cssr.js +22 -0
- package/es/data-table/src/TableParts/Body.js +6 -3
- package/es/data-table/src/TableParts/BodyRadio.d.ts +6 -0
- package/es/data-table/src/TableParts/BodyRadio.js +4 -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/list/src/List.d.ts +1 -1
- package/es/list/src/ListItem.js +9 -2
- package/es/pagination/src/Pagination.js +11 -5
- package/es/pagination/src/styles/index.cssr.js +10 -5
- package/es/pagination/styles/light.js +5 -5
- package/es/radio/src/Radio.d.ts +3 -0
- package/es/radio/src/Radio.js +1 -1
- package/es/radio/src/RadioButton.d.ts +3 -0
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/radio/src/use-radio.d.ts +1 -0
- package/lib/_internal/radio/src/use-radio.js +2 -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/checkbox/src/styles/index.cssr.js +22 -0
- package/lib/data-table/src/TableParts/Body.js +6 -3
- package/lib/data-table/src/TableParts/BodyRadio.d.ts +6 -0
- package/lib/data-table/src/TableParts/BodyRadio.js +4 -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/list/src/List.d.ts +1 -1
- package/lib/list/src/ListItem.js +7 -0
- package/lib/pagination/src/Pagination.js +11 -5
- package/lib/pagination/src/styles/index.cssr.js +9 -4
- package/lib/pagination/styles/light.js +5 -5
- package/lib/radio/src/Radio.d.ts +3 -0
- package/lib/radio/src/Radio.js +1 -1
- package/lib/radio/src/RadioButton.d.ts +3 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +21 -3
|
@@ -6,13 +6,13 @@ import { createTheme } from '../../_mixins';
|
|
|
6
6
|
export const self = (vars) => {
|
|
7
7
|
const { brandPrimary100, transparencySecondary, elementsPrimary, brandPrimary500, textSecondary, borderRadius, fontBodyMedium, fontBodyLarge, textPrimary, textTertiary, elementsTertiary, elementsQuaternary } = vars;
|
|
8
8
|
return {
|
|
9
|
-
itemPaddingSmall: '0
|
|
9
|
+
itemPaddingSmall: '0 10px',
|
|
10
10
|
itemMarginSmall: '0 0 0 2px',
|
|
11
11
|
itemMarginSmallRtl: '0 2px 0 0',
|
|
12
|
-
itemPaddingMedium: '0
|
|
12
|
+
itemPaddingMedium: '0 12px',
|
|
13
13
|
itemMarginMedium: '0 0 0 2px',
|
|
14
14
|
itemMarginMediumRtl: '0 2px 0 0',
|
|
15
|
-
itemPaddingLarge: '0
|
|
15
|
+
itemPaddingLarge: '0 14px',
|
|
16
16
|
itemMarginLarge: '0 0 0 2px',
|
|
17
17
|
itemMarginLargeRtl: '0 2px 0 0',
|
|
18
18
|
buttonIconSizeSmall: '14px',
|
|
@@ -65,8 +65,8 @@ export const self = (vars) => {
|
|
|
65
65
|
itemBorderActive: '0px',
|
|
66
66
|
itemBorderDisabled: '0px',
|
|
67
67
|
itemBorderRadius: borderRadius,
|
|
68
|
-
itemSizeSmall: '
|
|
69
|
-
itemSizeMedium: '
|
|
68
|
+
itemSizeSmall: '32px',
|
|
69
|
+
itemSizeMedium: '36px',
|
|
70
70
|
itemSizeLarge: '40px',
|
|
71
71
|
itemFontSizeSmall: fontBodyMedium,
|
|
72
72
|
itemFontSizeMedium: fontBodyMedium,
|
package/es/radio/src/Radio.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const radioProps: {
|
|
|
29
29
|
readonly default: undefined;
|
|
30
30
|
};
|
|
31
31
|
readonly onChange: PropType<import("../../_internal/radio").OnChangeImpl>;
|
|
32
|
+
readonly onClick: PropType<(event: MouseEvent) => void>;
|
|
32
33
|
readonly theme: PropType<import("../../_mixins").Theme<"Radio", {
|
|
33
34
|
radioSizeSmall: string;
|
|
34
35
|
radioSizeMedium: string;
|
|
@@ -216,6 +217,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
216
217
|
readonly default: undefined;
|
|
217
218
|
};
|
|
218
219
|
readonly onChange: PropType<import("../../_internal/radio").OnChangeImpl>;
|
|
220
|
+
readonly onClick: PropType<(event: MouseEvent) => void>;
|
|
219
221
|
readonly theme: PropType<import("../../_mixins").Theme<"Radio", {
|
|
220
222
|
radioSizeSmall: string;
|
|
221
223
|
radioSizeMedium: string;
|
|
@@ -438,6 +440,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
438
440
|
readonly default: undefined;
|
|
439
441
|
};
|
|
440
442
|
readonly onChange: PropType<import("../../_internal/radio").OnChangeImpl>;
|
|
443
|
+
readonly onClick: PropType<(event: MouseEvent) => void>;
|
|
441
444
|
readonly theme: PropType<import("../../_mixins").Theme<"Radio", {
|
|
442
445
|
radioSizeSmall: string;
|
|
443
446
|
radioSizeMedium: string;
|
package/es/radio/src/Radio.js
CHANGED
|
@@ -85,7 +85,7 @@ export default defineComponent({
|
|
|
85
85
|
[`${mergedClsPrefix}-radio--focus`]: this.focus
|
|
86
86
|
}
|
|
87
87
|
], style: this.cssVars },
|
|
88
|
-
h("input", { ref: "inputRef", type: "radio", class: `${mergedClsPrefix}-radio-input`, value: this.value, name: this.mergedName, checked: this.renderSafeChecked, disabled: this.mergedDisabled, onChange: this.handleRadioInputChange, onFocus: this.handleRadioInputFocus, onBlur: this.handleRadioInputBlur }),
|
|
88
|
+
h("input", { ref: "inputRef", type: "radio", class: `${mergedClsPrefix}-radio-input`, value: this.value, name: this.mergedName, checked: this.renderSafeChecked, disabled: this.mergedDisabled, onChange: this.handleRadioInputChange, onFocus: this.handleRadioInputFocus, onBlur: this.handleRadioInputBlur, onClick: this.onClick }),
|
|
89
89
|
h("div", { class: `${mergedClsPrefix}-radio__dot-wrapper` },
|
|
90
90
|
"\u00A0",
|
|
91
91
|
h("div", { class: [
|
|
@@ -24,6 +24,7 @@ export declare const radioButtonProps: {
|
|
|
24
24
|
readonly default: undefined;
|
|
25
25
|
};
|
|
26
26
|
readonly onChange: import("vue").PropType<import("../../_internal/radio").OnChangeImpl>;
|
|
27
|
+
readonly onClick: import("vue").PropType<(event: MouseEvent) => void>;
|
|
27
28
|
};
|
|
28
29
|
export type RadioButtonProps = ExtractPublicPropTypes<typeof radioBaseProps>;
|
|
29
30
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -50,6 +51,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
51
|
readonly default: undefined;
|
|
51
52
|
};
|
|
52
53
|
readonly onChange: import("vue").PropType<import("../../_internal/radio").OnChangeImpl>;
|
|
54
|
+
readonly onClick: import("vue").PropType<(event: MouseEvent) => void>;
|
|
53
55
|
}, import("../../_internal").UseRadio, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
54
56
|
readonly name: StringConstructor;
|
|
55
57
|
readonly value: {
|
|
@@ -74,6 +76,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
76
|
readonly default: undefined;
|
|
75
77
|
};
|
|
76
78
|
readonly onChange: import("vue").PropType<import("../../_internal/radio").OnChangeImpl>;
|
|
79
|
+
readonly onClick: import("vue").PropType<(event: MouseEvent) => void>;
|
|
77
80
|
}>>, {
|
|
78
81
|
readonly value: string | number | boolean;
|
|
79
82
|
readonly disabled: boolean | undefined;
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.6.0";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.
|
|
1
|
+
export default '1.6.0';
|
|
@@ -25,6 +25,7 @@ export declare const radioBaseProps: {
|
|
|
25
25
|
readonly default: undefined;
|
|
26
26
|
};
|
|
27
27
|
readonly onChange: PropType<OnChangeImpl>;
|
|
28
|
+
readonly onClick: PropType<(event: MouseEvent) => void>;
|
|
28
29
|
};
|
|
29
30
|
export declare const radioGroupInjectionKey: import("vue").InjectionKey<RadioGroupInjection>;
|
|
30
31
|
export interface UseRadio {
|
|
@@ -30,7 +30,8 @@ exports.radioBaseProps = {
|
|
|
30
30
|
type: Boolean,
|
|
31
31
|
default: undefined
|
|
32
32
|
},
|
|
33
|
-
onChange: [Function, Array]
|
|
33
|
+
onChange: [Function, Array],
|
|
34
|
+
onClick: [Function, Array]
|
|
34
35
|
};
|
|
35
36
|
exports.radioGroupInjectionKey = (0, _utils_1.createInjectionKey)('u-radio-group');
|
|
36
37
|
function useRadio(props) {
|
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
|
package/lib/badge/src/Badge.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare const badgeProps: {
|
|
|
16
16
|
readonly processing: BooleanConstructor;
|
|
17
17
|
readonly color: StringConstructor;
|
|
18
18
|
readonly textColor: StringConstructor;
|
|
19
|
+
readonly dotSize: PropType<string | number>;
|
|
19
20
|
readonly offset: PropType<readonly [number | string, number | string]>;
|
|
20
21
|
readonly theme: PropType<import("../../_mixins").Theme<"Badge", {
|
|
21
22
|
color: string;
|
|
@@ -32,6 +33,7 @@ export declare const badgeProps: {
|
|
|
32
33
|
textColorError: string;
|
|
33
34
|
textColorWarning: string;
|
|
34
35
|
borderColor: string;
|
|
36
|
+
dotSize: string;
|
|
35
37
|
}, any>>;
|
|
36
38
|
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
|
|
37
39
|
color: string;
|
|
@@ -48,6 +50,7 @@ export declare const badgeProps: {
|
|
|
48
50
|
textColorError: string;
|
|
49
51
|
textColorWarning: string;
|
|
50
52
|
borderColor: string;
|
|
53
|
+
dotSize: string;
|
|
51
54
|
}, any>>>;
|
|
52
55
|
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
|
|
53
56
|
color: string;
|
|
@@ -64,6 +67,7 @@ export declare const badgeProps: {
|
|
|
64
67
|
textColorError: string;
|
|
65
68
|
textColorWarning: string;
|
|
66
69
|
borderColor: string;
|
|
70
|
+
dotSize: string;
|
|
67
71
|
}, any>>>;
|
|
68
72
|
};
|
|
69
73
|
export type BadgeProps = ExtractPublicPropTypes<typeof badgeProps>;
|
|
@@ -83,6 +87,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
87
|
readonly processing: BooleanConstructor;
|
|
84
88
|
readonly color: StringConstructor;
|
|
85
89
|
readonly textColor: StringConstructor;
|
|
90
|
+
readonly dotSize: PropType<string | number>;
|
|
86
91
|
readonly offset: PropType<readonly [number | string, number | string]>;
|
|
87
92
|
readonly theme: PropType<import("../../_mixins").Theme<"Badge", {
|
|
88
93
|
color: string;
|
|
@@ -99,6 +104,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
99
104
|
textColorError: string;
|
|
100
105
|
textColorWarning: string;
|
|
101
106
|
borderColor: string;
|
|
107
|
+
dotSize: string;
|
|
102
108
|
}, any>>;
|
|
103
109
|
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
|
|
104
110
|
color: string;
|
|
@@ -115,6 +121,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
115
121
|
textColorError: string;
|
|
116
122
|
textColorWarning: string;
|
|
117
123
|
borderColor: string;
|
|
124
|
+
dotSize: string;
|
|
118
125
|
}, any>>>;
|
|
119
126
|
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
|
|
120
127
|
color: string;
|
|
@@ -131,6 +138,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
131
138
|
textColorError: string;
|
|
132
139
|
textColorWarning: string;
|
|
133
140
|
borderColor: string;
|
|
141
|
+
dotSize: string;
|
|
134
142
|
}, any>>>;
|
|
135
143
|
}, {
|
|
136
144
|
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
@@ -147,6 +155,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
147
155
|
'--u-ripple-bezier': string;
|
|
148
156
|
'--u-text-color': string;
|
|
149
157
|
'--u-border-color': string;
|
|
158
|
+
'--u-dot-size': string;
|
|
150
159
|
}> | undefined;
|
|
151
160
|
themeClass: import("vue").Ref<string> | undefined;
|
|
152
161
|
onRender: (() => void) | undefined;
|
|
@@ -169,6 +178,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
169
178
|
readonly processing: BooleanConstructor;
|
|
170
179
|
readonly color: StringConstructor;
|
|
171
180
|
readonly textColor: StringConstructor;
|
|
181
|
+
readonly dotSize: PropType<string | number>;
|
|
172
182
|
readonly offset: PropType<readonly [number | string, number | string]>;
|
|
173
183
|
readonly theme: PropType<import("../../_mixins").Theme<"Badge", {
|
|
174
184
|
color: string;
|
|
@@ -185,6 +195,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
185
195
|
textColorError: string;
|
|
186
196
|
textColorWarning: string;
|
|
187
197
|
borderColor: string;
|
|
198
|
+
dotSize: string;
|
|
188
199
|
}, any>>;
|
|
189
200
|
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
|
|
190
201
|
color: string;
|
|
@@ -201,6 +212,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
201
212
|
textColorError: string;
|
|
202
213
|
textColorWarning: string;
|
|
203
214
|
borderColor: string;
|
|
215
|
+
dotSize: string;
|
|
204
216
|
}, any>>>;
|
|
205
217
|
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Badge", {
|
|
206
218
|
color: string;
|
|
@@ -217,6 +229,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
217
229
|
textColorError: string;
|
|
218
230
|
textColorWarning: string;
|
|
219
231
|
borderColor: string;
|
|
232
|
+
dotSize: string;
|
|
220
233
|
}, any>>>;
|
|
221
234
|
}>>, {
|
|
222
235
|
readonly type: "default" | "info" | "success" | "warning" | "error" | "prime";
|
package/lib/badge/src/Badge.js
CHANGED
|
@@ -17,7 +17,7 @@ exports.badgeProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props),
|
|
|
17
17
|
}, show: {
|
|
18
18
|
type: Boolean,
|
|
19
19
|
default: true
|
|
20
|
-
}, showZero: Boolean, processing: Boolean, color: String, textColor: String, offset: Array });
|
|
20
|
+
}, showZero: Boolean, processing: Boolean, color: String, textColor: String, dotSize: [String, Number], offset: Array });
|
|
21
21
|
exports.default = (0, vue_1.defineComponent)({
|
|
22
22
|
name: 'Badge',
|
|
23
23
|
props: exports.badgeProps,
|
|
@@ -45,7 +45,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
45
45
|
const rtlEnabledRef = (0, use_rtl_1.useRtl)('Badge', mergedRtlRef, mergedClsPrefixRef);
|
|
46
46
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
47
47
|
const { type, color: propColor, textColor: propTextColor } = props;
|
|
48
|
-
const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self: { [(0, _utils_1.createKey)('color', type)]: color, [(0, _utils_1.createKey)('textColor', type)]: textColor, fontSize, borderColor } } = themeRef.value;
|
|
48
|
+
const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self: { [(0, _utils_1.createKey)('color', type)]: color, [(0, _utils_1.createKey)('textColor', type)]: textColor, fontSize, borderColor, dotSize } } = themeRef.value;
|
|
49
49
|
return {
|
|
50
50
|
'--u-font-size': fontSize,
|
|
51
51
|
'--u-color': propColor || color,
|
|
@@ -53,7 +53,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
53
53
|
'--u-bezier': cubicBezierEaseInOut,
|
|
54
54
|
'--u-ripple-bezier': cubicBezierEaseOut,
|
|
55
55
|
'--u-text-color': propTextColor || textColor,
|
|
56
|
-
'--u-border-color': borderColor
|
|
56
|
+
'--u-border-color': borderColor,
|
|
57
|
+
'--u-dot-size': (0, _utils_1.resolveSize)(props.dotSize, dotSize)
|
|
57
58
|
};
|
|
58
59
|
});
|
|
59
60
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -34,13 +34,14 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.c)('@keyframes badge-wave-spread', {
|
|
|
34
34
|
transformOrigin: 'left bottom',
|
|
35
35
|
originalTransform: 'translateX(0)'
|
|
36
36
|
})])]), (0, cssr_1.cM)('dot', [(0, cssr_1.cB)('badge-sup', `
|
|
37
|
-
height:
|
|
38
|
-
width:
|
|
37
|
+
height: var(--u-dot-size);
|
|
38
|
+
width: var(--u-dot-size);
|
|
39
|
+
justify-content: center;
|
|
40
|
+
overflow: hidden;
|
|
39
41
|
padding: 0;
|
|
40
|
-
min-width: 8px;
|
|
41
42
|
left: 100%;
|
|
42
43
|
bottom: calc(100% - 4px);
|
|
43
|
-
`, [(0, cssr_1.c)('::before', 'border-radius: 4px;')])]), (0, cssr_1.cB)('badge-sup', `
|
|
44
|
+
`, [(0, cssr_1.c)('::before', 'border-radius: 4px;'), (0, cssr_1.c)('img', 'width: 100%')])]), (0, cssr_1.cB)('badge-sup', `
|
|
44
45
|
background: var(--u-color);
|
|
45
46
|
transition:
|
|
46
47
|
background-color .3s var(--u-bezier),
|
|
@@ -91,8 +92,6 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.c)('@keyframes badge-wave-spread', {
|
|
|
91
92
|
border-radius: 100px;
|
|
92
93
|
`), (0, cssr_1.cM)('dot', [(0, cssr_1.cB)('badge-sup', `
|
|
93
94
|
transform: none;
|
|
94
|
-
width: 12px;
|
|
95
|
-
height: 12px;
|
|
96
95
|
transform: none;
|
|
97
96
|
left: auto;
|
|
98
97
|
right: 0;
|
|
@@ -15,6 +15,7 @@ export declare const self: (vars: ThemeCommonVars) => {
|
|
|
15
15
|
textColorError: string;
|
|
16
16
|
textColorWarning: string;
|
|
17
17
|
borderColor: string;
|
|
18
|
+
dotSize: string;
|
|
18
19
|
};
|
|
19
20
|
export type BadgeThemeVars = ReturnType<typeof self>;
|
|
20
21
|
declare const badgeLight: Theme<'Badge', BadgeThemeVars>;
|
|
@@ -112,6 +112,28 @@ exports.default = (0, cssr_1.c)([(0, icon_switch_cssr_1.iconSwitchTransition)(),
|
|
|
112
112
|
--u-merged-border: var(--u-border-disabled-checked);
|
|
113
113
|
--u-merged-shadow: transparent;
|
|
114
114
|
--u-merged-icon: var(--u-check-mark-color-disabled-checked);
|
|
115
|
+
`)]), (0, cssr_1.cM)('indeterminate', `
|
|
116
|
+
--u-merged-color: var(--u-color-checked);
|
|
117
|
+
--u-merged-border: var(--u-border-checked);
|
|
118
|
+
--u-merged-shadow: var(--u-box-shadow-hover-checked);
|
|
119
|
+
--u-merged-icon: var(--u-check-mark-color);
|
|
120
|
+
`, [(0, cssr_1.c)('&:hover', `
|
|
121
|
+
--u-merged-color: var(--u-color-hover-checked);
|
|
122
|
+
--u-merged-border: var(--u-border-hover-checked);
|
|
123
|
+
--u-merged-shadow: var(--u-box-shadow-hover-checked);
|
|
124
|
+
`), (0, cssr_1.c)('&:focus', `
|
|
125
|
+
--u-merged-color: var(--u-color-focus-checked);
|
|
126
|
+
--u-merged-border: var(--u-border-focus-checked);
|
|
127
|
+
--u-merged-shadow: var(--u-box-shadow-focus-checked);
|
|
128
|
+
`), (0, cssr_1.c)('&:active', `
|
|
129
|
+
--u-merged-color: var(--u-color-active-checked);
|
|
130
|
+
--u-merged-border: var(--u-border-active-checked);
|
|
131
|
+
--u-merged-shadow: var(--u-box-shadow-active-checked);
|
|
132
|
+
`), (0, cssr_1.cM)('disabled', `
|
|
133
|
+
--u-merged-color: var(--u-color-disabled-checked);
|
|
134
|
+
--u-merged-border: var(--u-border-disabled-checked);
|
|
135
|
+
--u-merged-shadow: transparent;
|
|
136
|
+
--u-merged-icon: var(--u-check-mark-color-disabled-checked);
|
|
115
137
|
`)])]), (0, cssr_1.cB)('checkbox-box', `
|
|
116
138
|
position: relative;
|
|
117
139
|
flex-shrink: 0;
|
|
@@ -579,10 +579,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
579
579
|
} }))
|
|
580
580
|
]
|
|
581
581
|
: null,
|
|
582
|
-
column.type === 'selection' ? (!isSummary ? (column.multiple === false ? ((0, vue_1.h)(BodyRadio_1.default, { key: currentPage, rowKey: rowKey, disabled: rowInfo.tmNode.disabled,
|
|
582
|
+
column.type === 'selection' ? (!isSummary ? (column.multiple === false ? ((0, vue_1.h)(BodyRadio_1.default, { key: currentPage, rowKey: rowKey, disabled: rowInfo.tmNode.disabled, onClick: (event) => {
|
|
583
|
+
event.stopPropagation();
|
|
584
|
+
}, onUpdateChecked: () => {
|
|
583
585
|
handleRadioUpdateChecked(rowInfo.tmNode);
|
|
584
|
-
} })) : ((0, vue_1.h)(BodyCheckbox_1.default, { key: currentPage, rowKey: rowKey, disabled: rowInfo.tmNode.disabled, onUpdateChecked: (checked,
|
|
585
|
-
|
|
586
|
+
} })) : ((0, vue_1.h)(BodyCheckbox_1.default, { key: currentPage, rowKey: rowKey, disabled: rowInfo.tmNode.disabled, onUpdateChecked: (checked, event) => {
|
|
587
|
+
event.stopPropagation();
|
|
588
|
+
handleCheckboxUpdateChecked(rowInfo.tmNode, checked, event.shiftKey);
|
|
586
589
|
} }))) : null) : column.type === 'expand' ? (!isSummary ? (!column.expandable ||
|
|
587
590
|
((_e = column.expandable) === null || _e === void 0 ? void 0 : _e.call(column, rowData)) ? ((0, vue_1.h)(ExpandTrigger_1.default, { clsPrefix: mergedClsPrefix, expanded: expanded, renderExpandIcon: this.renderExpandIcon, onClick: () => {
|
|
588
591
|
handleUpdateExpanded(rowKey, null);
|
|
@@ -13,6 +13,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
type: PropType<(checked: boolean) => void>;
|
|
14
14
|
required: true;
|
|
15
15
|
};
|
|
16
|
+
onClick: {
|
|
17
|
+
type: PropType<(event: MouseEvent) => void>;
|
|
18
|
+
};
|
|
16
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
20
|
rowKey: {
|
|
18
21
|
type: PropType<RowKey>;
|
|
@@ -26,5 +29,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
29
|
type: PropType<(checked: boolean) => void>;
|
|
27
30
|
required: true;
|
|
28
31
|
};
|
|
32
|
+
onClick: {
|
|
33
|
+
type: PropType<(event: MouseEvent) => void>;
|
|
34
|
+
};
|
|
29
35
|
}>>, {}, {}>;
|
|
30
36
|
export default _default;
|
|
@@ -18,6 +18,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
18
18
|
onUpdateChecked: {
|
|
19
19
|
type: Function,
|
|
20
20
|
required: true
|
|
21
|
+
},
|
|
22
|
+
onClick: {
|
|
23
|
+
type: Function
|
|
21
24
|
}
|
|
22
25
|
},
|
|
23
26
|
setup(props) {
|
|
@@ -26,7 +29,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
26
29
|
} = (0, vue_1.inject)(interface_1.dataTableInjectionKey);
|
|
27
30
|
return () => {
|
|
28
31
|
const { rowKey } = props;
|
|
29
|
-
return ((0, vue_1.h)(radio_1.URadio, { name: componentId, disabled: props.disabled, checked: mergedCheckedRowKeySetRef.value.has(rowKey), onUpdateChecked: props.onUpdateChecked, size: sizeRef.value }));
|
|
32
|
+
return ((0, vue_1.h)(radio_1.URadio, { name: componentId, disabled: props.disabled, checked: mergedCheckedRowKeySetRef.value.has(rowKey), onUpdateChecked: props.onUpdateChecked, onClick: props.onClick, size: sizeRef.value }));
|
|
30
33
|
};
|
|
31
34
|
}
|
|
32
35
|
});
|
|
@@ -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>;
|
|
@@ -36,7 +36,7 @@ exports.datePickerProps = Object.assign(Object.assign({}, _mixins_1.useTheme.pro
|
|
|
36
36
|
}, value: [Number, Array], formattedValue: [String, Array], size: String, type: {
|
|
37
37
|
type: String,
|
|
38
38
|
default: 'date'
|
|
39
|
-
}, 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: {
|
|
39
|
+
}, 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: {
|
|
40
40
|
type: Boolean,
|
|
41
41
|
default: undefined
|
|
42
42
|
}, 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],
|
|
@@ -570,7 +570,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
570
570
|
const dualValidation = (0, validation_utils_1.dualCalendarValidation)(props, pendingValueRef);
|
|
571
571
|
(0, vue_1.provide)(interface_1.datePickerInjectionKey, Object.assign(Object.assign(Object.assign({ mergedClsPrefixRef, mergedThemeRef: themeRef, timePickerSizeRef,
|
|
572
572
|
localeRef,
|
|
573
|
-
dateLocaleRef, firstDayOfWeekRef: (0, vue_1.toRef)(props, 'firstDayOfWeek'), isDateDisabledRef: (0, vue_1.toRef)(props, 'isDateDisabled'), rangesRef: (0, vue_1.toRef)(props, 'ranges'), timePickerPropsRef: (0, vue_1.toRef)(props, 'timePickerProps'), closeOnSelectRef: (0, vue_1.toRef)(props, 'closeOnSelect'), updateValueOnCloseRef: (0, vue_1.toRef)(props, 'updateValueOnClose') }, uniVaidation), dualValidation), { datePickerSlots: slots }));
|
|
573
|
+
dateLocaleRef, firstDayOfWeekRef: (0, vue_1.toRef)(props, 'firstDayOfWeek'), isDateDisabledRef: (0, vue_1.toRef)(props, 'isDateDisabled'), maxDateRef: (0, vue_1.toRef)(props, 'maxDate'), rangesRef: (0, vue_1.toRef)(props, 'ranges'), timePickerPropsRef: (0, vue_1.toRef)(props, 'timePickerProps'), closeOnSelectRef: (0, vue_1.toRef)(props, 'closeOnSelect'), updateValueOnCloseRef: (0, vue_1.toRef)(props, 'updateValueOnClose') }, uniVaidation), dualValidation), { datePickerSlots: slots }));
|
|
574
574
|
const exposedMethods = {
|
|
575
575
|
focus: () => {
|
|
576
576
|
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>;
|
|
@@ -16,7 +16,7 @@ exports.useCalendarProps = useCalendarProps;
|
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
17
17
|
function useCalendar(props, type) {
|
|
18
18
|
const panelCommon = (0, use_panel_common_1.usePanelCommon)(props);
|
|
19
|
-
const { isValueInvalidRef, isDateDisabledRef, isDateInvalidRef, isTimeInvalidRef, isDateTimeInvalidRef, isHourDisabledRef, isMinuteDisabledRef, isSecondDisabledRef, localeRef, firstDayOfWeekRef, datePickerSlots
|
|
19
|
+
const { isValueInvalidRef, isDateDisabledRef, maxDateRef, isDateInvalidRef, isTimeInvalidRef, isDateTimeInvalidRef, isHourDisabledRef, isMinuteDisabledRef, isSecondDisabledRef, localeRef, firstDayOfWeekRef, datePickerSlots
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
21
21
|
} = (0, vue_1.inject)(interface_1.datePickerInjectionKey);
|
|
22
22
|
const validation = {
|
|
@@ -49,7 +49,7 @@ function useCalendar(props, type) {
|
|
|
49
49
|
});
|
|
50
50
|
const yearArrayRef = (0, vue_1.computed)(() => {
|
|
51
51
|
const { value } = props;
|
|
52
|
-
return (0, utils_1.yearArray)(Array.isArray(value) ? null : value, nowRef.value);
|
|
52
|
+
return (0, utils_1.yearArray)(Array.isArray(value) ? null : value, nowRef.value, maxDateRef.value);
|
|
53
53
|
});
|
|
54
54
|
const quarterArrayRef = (0, vue_1.computed)(() => {
|
|
55
55
|
const { value } = props;
|
|
@@ -95,6 +95,9 @@ function useCalendar(props, type) {
|
|
|
95
95
|
return (0, date_fns_1.getTime)((0, date_fns_1.startOfDay)(value));
|
|
96
96
|
}
|
|
97
97
|
function mergedIsDateDisabled(ts) {
|
|
98
|
+
if (maxDateRef.value && ts > maxDateRef.value) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
98
101
|
const { isDateDisabled: { value: isDateDisabled } } = validation;
|
|
99
102
|
if (!isDateDisabled)
|
|
100
103
|
return false;
|
|
@@ -16,7 +16,7 @@ exports.useDualCalendarProps = useDualCalendarProps;
|
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
17
17
|
function useDualCalendar(props, type) {
|
|
18
18
|
var _a, _b;
|
|
19
|
-
const { isDateDisabledRef, isStartHourDisabledRef, isEndHourDisabledRef, isStartMinuteDisabledRef, isEndMinuteDisabledRef, isStartSecondDisabledRef, isEndSecondDisabledRef, isStartDateInvalidRef, isEndDateInvalidRef, isStartTimeInvalidRef, isEndTimeInvalidRef, isStartValueInvalidRef, isEndValueInvalidRef, isRangeInvalidRef, localeRef, rangesRef, closeOnSelectRef, updateValueOnCloseRef, firstDayOfWeekRef, datePickerSlots
|
|
19
|
+
const { isDateDisabledRef, maxDateRef, isStartHourDisabledRef, isEndHourDisabledRef, isStartMinuteDisabledRef, isEndMinuteDisabledRef, isStartSecondDisabledRef, isEndSecondDisabledRef, isStartDateInvalidRef, isEndDateInvalidRef, isStartTimeInvalidRef, isEndTimeInvalidRef, isStartValueInvalidRef, isEndValueInvalidRef, isRangeInvalidRef, localeRef, rangesRef, closeOnSelectRef, updateValueOnCloseRef, firstDayOfWeekRef, datePickerSlots
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
21
21
|
} = (0, vue_1.inject)(interface_1.datePickerInjectionKey);
|
|
22
22
|
const validation = {
|
|
@@ -113,10 +113,10 @@ function useDualCalendar(props, type) {
|
|
|
113
113
|
return shortcuts || rangesRef.value;
|
|
114
114
|
});
|
|
115
115
|
const startYearArrayRef = (0, vue_1.computed)(() => {
|
|
116
|
-
return (0, utils_1.yearArray)((0, utils_1.pluckValueFromRange)(props.value, 'start'), nowRef.value);
|
|
116
|
+
return (0, utils_1.yearArray)((0, utils_1.pluckValueFromRange)(props.value, 'start'), nowRef.value, maxDateRef.value);
|
|
117
117
|
});
|
|
118
118
|
const endYearArrayRef = (0, vue_1.computed)(() => {
|
|
119
|
-
return (0, utils_1.yearArray)((0, utils_1.pluckValueFromRange)(props.value, 'end'), nowRef.value);
|
|
119
|
+
return (0, utils_1.yearArray)((0, utils_1.pluckValueFromRange)(props.value, 'end'), nowRef.value, maxDateRef.value);
|
|
120
120
|
});
|
|
121
121
|
const startQuarterArrayRef = (0, vue_1.computed)(() => {
|
|
122
122
|
const startValue = (0, utils_1.pluckValueFromRange)(props.value, 'start');
|
|
@@ -213,6 +213,9 @@ function useDualCalendar(props, type) {
|
|
|
213
213
|
}
|
|
214
214
|
// The function is used on date panel, not the date-picker value validation
|
|
215
215
|
function mergedIsDateDisabled(ts) {
|
|
216
|
+
if (maxDateRef.value && ts > maxDateRef.value) {
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
216
219
|
const isDateDisabled = isDateDisabledRef.value;
|
|
217
220
|
if (!isDateDisabled)
|
|
218
221
|
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;
|
|
@@ -164,10 +164,11 @@ function quarterArray(yearAnchorTs, valueTs, currentTs) {
|
|
|
164
164
|
}
|
|
165
165
|
return calendarQuarters;
|
|
166
166
|
}
|
|
167
|
-
function yearArray(valueTs, currentTs) {
|
|
167
|
+
function yearArray(valueTs, currentTs, maxDate) {
|
|
168
168
|
const calendarYears = [];
|
|
169
169
|
const time1900 = new Date(config_1.START_YEAR, 0, 1);
|
|
170
|
-
|
|
170
|
+
const endYear = maxDate ? new Date(maxDate).getFullYear() : config_1.END_YEAR;
|
|
171
|
+
let count = endYear - config_1.START_YEAR + 1;
|
|
171
172
|
while (count--) {
|
|
172
173
|
calendarYears.push(yearItem((0, date_fns_1.getTime)((0, date_fns_1.addYears)(time1900, count)), valueTs, currentTs));
|
|
173
174
|
}
|
package/lib/list/src/List.d.ts
CHANGED
|
@@ -306,8 +306,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
306
306
|
size: import("./interface").Size;
|
|
307
307
|
header: import("./interface").RenderableType;
|
|
308
308
|
loadingSkeleton: boolean;
|
|
309
|
-
rounded: boolean;
|
|
310
309
|
clickable: boolean;
|
|
310
|
+
rounded: boolean;
|
|
311
311
|
hoverable: boolean;
|
|
312
312
|
showDivider: boolean;
|
|
313
313
|
descriptionFirst: boolean;
|