@varlet/ui 3.2.15-alpha.1718198392925 → 3.3.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/es/chip/Chip.mjs +3 -2
- package/es/chip/props.mjs +4 -0
- package/es/chip/style/index.mjs +1 -0
- package/es/date-picker/src/day-picker-panel.mjs +3 -1
- package/es/date-picker/src/month-picker-panel.mjs +3 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu-option/MenuOption.mjs +1 -1
- package/es/menu-option/props.mjs +5 -1
- package/es/option/Option.mjs +1 -1
- package/es/option/style/index.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/varlet.esm.js +2059 -2050
- package/highlight/web-types.en-US.json +19 -1
- package/highlight/web-types.zh-CN.json +19 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +18 -7
- package/package.json +7 -7
- package/types/chip.d.ts +1 -0
- package/types/menuOption.d.ts +1 -0
- package/types/option.d.ts +5 -1
- package/umd/varlet.js +6 -6
package/es/chip/Chip.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import VarIcon from "../icon/index.mjs";
|
|
2
2
|
import { defineComponent, computed } from "vue";
|
|
3
3
|
import { props } from "./props.mjs";
|
|
4
|
-
import { createNamespace } from "../utils/components.mjs";
|
|
4
|
+
import { createNamespace, formatElevation } from "../utils/components.mjs";
|
|
5
5
|
import { call } from "@varlet/shared";
|
|
6
6
|
const { name, n, classes } = createNamespace("chip");
|
|
7
7
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, Transition as _Transition, withCtx as _withCtx, createBlock as _createBlock } from "vue";
|
|
@@ -14,7 +14,7 @@ function __render__(_ctx, _cache) {
|
|
|
14
14
|
_createElementVNode(
|
|
15
15
|
"span",
|
|
16
16
|
_mergeProps({
|
|
17
|
-
class: _ctx.classes(_ctx.n(), _ctx.n("$--box"), ..._ctx.contentClass),
|
|
17
|
+
class: _ctx.classes(_ctx.n(), _ctx.n("$--box"), _ctx.formatElevation(_ctx.elevation, 1), ..._ctx.contentClass),
|
|
18
18
|
style: _ctx.chipStyle
|
|
19
19
|
}, _ctx.$attrs),
|
|
20
20
|
[
|
|
@@ -92,6 +92,7 @@ const __sfc__ = defineComponent({
|
|
|
92
92
|
contentClass,
|
|
93
93
|
n,
|
|
94
94
|
classes,
|
|
95
|
+
formatElevation,
|
|
95
96
|
handleClose
|
|
96
97
|
};
|
|
97
98
|
}
|
package/es/chip/props.mjs
CHANGED
package/es/chip/style/index.mjs
CHANGED
|
@@ -31,6 +31,7 @@ import { toNumber } from "@varlet/shared";
|
|
|
31
31
|
import { createNamespace } from "../../utils/components.mjs";
|
|
32
32
|
import { t } from "../../locale/index.mjs";
|
|
33
33
|
import { onSmartMounted } from "@varlet/use";
|
|
34
|
+
import { injectLocaleProvider } from "../../locale-provider/provide.mjs";
|
|
34
35
|
dayjs.extend(isSameOrBefore);
|
|
35
36
|
dayjs.extend(isSameOrAfter);
|
|
36
37
|
const { n, classes } = createNamespace("day-picker");
|
|
@@ -181,6 +182,7 @@ const __sfc__ = defineComponent({
|
|
|
181
182
|
left: false,
|
|
182
183
|
right: false
|
|
183
184
|
});
|
|
185
|
+
const { t: pt } = injectLocaleProvider();
|
|
184
186
|
const isCurrent = computed(
|
|
185
187
|
() => props.preview.previewYear === currentYear && props.preview.previewMonth === currentMonth
|
|
186
188
|
);
|
|
@@ -196,7 +198,7 @@ const __sfc__ = defineComponent({
|
|
|
196
198
|
});
|
|
197
199
|
const getDayAbbr = (key) => {
|
|
198
200
|
var _a, _b;
|
|
199
|
-
return (_b = (_a = t("datePickerWeekDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
|
|
201
|
+
return (_b = (_a = (pt || t)("datePickerWeekDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
|
|
200
202
|
};
|
|
201
203
|
const filterDay = (day) => day > 0 ? day : "";
|
|
202
204
|
const initDate = () => {
|
|
@@ -24,6 +24,7 @@ import VarButton from "../../button/index.mjs";
|
|
|
24
24
|
import { toNumber } from "@varlet/shared";
|
|
25
25
|
import { createNamespace } from "../../utils/components.mjs";
|
|
26
26
|
import { t } from "../../locale/index.mjs";
|
|
27
|
+
import { injectLocaleProvider } from "../../locale-provider/provide.mjs";
|
|
27
28
|
dayjs.extend(isSameOrBefore);
|
|
28
29
|
dayjs.extend(isSameOrAfter);
|
|
29
30
|
const { n, classes } = createNamespace("month-picker");
|
|
@@ -137,11 +138,12 @@ const __sfc__ = defineComponent({
|
|
|
137
138
|
left: false,
|
|
138
139
|
right: false
|
|
139
140
|
});
|
|
141
|
+
const { t: pt } = injectLocaleProvider();
|
|
140
142
|
const isSameYear = computed(() => props.choose.chooseYear === props.preview.previewYear);
|
|
141
143
|
const isCurrentYear = computed(() => props.preview.previewYear === currentYear);
|
|
142
144
|
const getMonthAbbr = (key) => {
|
|
143
145
|
var _a, _b;
|
|
144
|
-
return (_b = (_a = t("datePickerMonthDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
|
|
146
|
+
return (_b = (_a = (pt || t)("datePickerMonthDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
|
|
145
147
|
};
|
|
146
148
|
const inRange = (key) => {
|
|
147
149
|
const {
|
package/es/index.bundle.mjs
CHANGED
|
@@ -265,7 +265,7 @@ import './tooltip/style/index.mjs'
|
|
|
265
265
|
import './uploader/style/index.mjs'
|
|
266
266
|
import './watermark/style/index.mjs'
|
|
267
267
|
|
|
268
|
-
const version = '3.
|
|
268
|
+
const version = '3.3.0'
|
|
269
269
|
|
|
270
270
|
function install(app) {
|
|
271
271
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -176,7 +176,7 @@ export * from './tooltip/index.mjs'
|
|
|
176
176
|
export * from './uploader/index.mjs'
|
|
177
177
|
export * from './watermark/index.mjs'
|
|
178
178
|
|
|
179
|
-
const version = '3.
|
|
179
|
+
const version = '3.3.0'
|
|
180
180
|
|
|
181
181
|
function install(app) {
|
|
182
182
|
ActionSheet.install && app.use(ActionSheet)
|
|
@@ -62,7 +62,7 @@ function __render__(_ctx, _cache) {
|
|
|
62
62
|
focusing: _ctx.isFocusing && !_ctx.disabled
|
|
63
63
|
}, null, 8, ["hovering", "focusing"])
|
|
64
64
|
], 42, _hoisted_1)), [
|
|
65
|
-
[_directive_ripple, { disabled: _ctx.disabled }],
|
|
65
|
+
[_directive_ripple, { disabled: _ctx.disabled || !_ctx.ripple }],
|
|
66
66
|
[_directive_hover, _ctx.handleHovering, "desktop"]
|
|
67
67
|
]);
|
|
68
68
|
}
|
package/es/menu-option/props.mjs
CHANGED
package/es/option/Option.mjs
CHANGED
|
@@ -51,7 +51,7 @@ function __render__(_ctx, _cache) {
|
|
|
51
51
|
}, ["stop"])),
|
|
52
52
|
onChange: _ctx.handleSelect
|
|
53
53
|
}, null, 8, ["modelValue", "checked-color", "disabled", "onChange"])) : _createCommentVNode("v-if", true),
|
|
54
|
-
_renderSlot(_ctx.$slots, "default", {}, () => [
|
|
54
|
+
_renderSlot(_ctx.$slots, "default", { selected: _ctx.optionSelected }, () => [
|
|
55
55
|
_createElementVNode(
|
|
56
56
|
"div",
|
|
57
57
|
{
|