@varlet/ui 3.20.10 → 3.20.11
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/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu-option/MenuOption.mjs +9 -7
- package/es/menu-select/MenuSelect.mjs +4 -0
- package/es/otp-input/OtpInput.mjs +1 -0
- package/es/varlet.esm.js +3902 -3896
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +16 -9
- package/package.json +7 -7
- package/umd/varlet.js +4 -4
package/lib/varlet.cjs.js
CHANGED
|
@@ -4263,8 +4263,8 @@ function __render__$97(_ctx, _cache) {
|
|
|
4263
4263
|
const _directive_hover = (0, vue.resolveDirective)("hover");
|
|
4264
4264
|
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
4265
4265
|
ref: "root",
|
|
4266
|
-
class: (0, vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n("$--box"), _ctx.n(`--${_ctx.size}`), [_ctx.optionSelected, _ctx.n("--selected-color")], [_ctx.
|
|
4267
|
-
tabindex: _ctx.
|
|
4266
|
+
class: (0, vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n("$--box"), _ctx.n(`--${_ctx.size}`), [_ctx.optionSelected, _ctx.n("--selected-color")], [_ctx.interactionDisabled, _ctx.n("--disabled")], [_ctx.childrenTrigger, _ctx.n("--children-trigger")])),
|
|
4267
|
+
tabindex: _ctx.interactionDisabled ? void 0 : "-1",
|
|
4268
4268
|
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
4269
4269
|
onFocus: _cache[4] || (_cache[4] = ($event) => _ctx.isFocusing = true),
|
|
4270
4270
|
onBlur: _cache[5] || (_cache[5] = ($event) => _ctx.isFocusing = false)
|
|
@@ -4277,7 +4277,7 @@ function __render__$97(_ctx, _cache) {
|
|
|
4277
4277
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.optionSelected = $event),
|
|
4278
4278
|
indeterminate: _ctx.optionIndeterminate,
|
|
4279
4279
|
"onUpdate:indeterminate": _cache[1] || (_cache[1] = ($event) => _ctx.optionIndeterminate = $event),
|
|
4280
|
-
disabled: _ctx.
|
|
4280
|
+
disabled: _ctx.interactionDisabled,
|
|
4281
4281
|
onClick: _cache[2] || (_cache[2] = (0, vue.withModifiers)(() => {}, ["stop"])),
|
|
4282
4282
|
onChange: _ctx.handleSelect
|
|
4283
4283
|
}, null, 8, [
|
|
@@ -4299,10 +4299,10 @@ function __render__$97(_ctx, _cache) {
|
|
|
4299
4299
|
name: "chevron-right"
|
|
4300
4300
|
}, null, 8, ["class"])], 2)) : (0, vue.createCommentVNode)("v-if", true),
|
|
4301
4301
|
(0, vue.createVNode)(_component_var_hover_overlay, {
|
|
4302
|
-
hovering: (_ctx.hovering || _ctx.highlight) && !_ctx.
|
|
4303
|
-
focusing: _ctx.isFocusing && !_ctx.
|
|
4302
|
+
hovering: (_ctx.hovering || _ctx.highlight) && !_ctx.interactionDisabled,
|
|
4303
|
+
focusing: _ctx.isFocusing && !_ctx.interactionDisabled
|
|
4304
4304
|
}, null, 8, ["hovering", "focusing"])
|
|
4305
|
-
], 42, _hoisted_1$41)), [[_directive_ripple, { disabled: _ctx.
|
|
4305
|
+
], 42, _hoisted_1$41)), [[_directive_ripple, { disabled: _ctx.interactionDisabled || !_ctx.ripple }], [
|
|
4306
4306
|
_directive_hover,
|
|
4307
4307
|
_ctx.handleHovering,
|
|
4308
4308
|
"desktop"
|
|
@@ -4334,6 +4334,7 @@ var __sfc__$97 = (0, vue.defineComponent)({
|
|
|
4334
4334
|
const ripple = (0, vue.computed)(() => props2.ripple);
|
|
4335
4335
|
const { menuSelect, bindMenuSelect } = useMenuSelect();
|
|
4336
4336
|
const { size, multiple, onSelect, computeLabel } = menuSelect;
|
|
4337
|
+
const interactionDisabled = (0, vue.computed)(() => menuSelect.disabled.value || disabled.value);
|
|
4337
4338
|
const { hovering, handleHovering } = useHoverOverlay();
|
|
4338
4339
|
const labelVNode = (0, vue.computed)(() => {
|
|
4339
4340
|
var _a;
|
|
@@ -4358,7 +4359,7 @@ var __sfc__$97 = (0, vue.defineComponent)({
|
|
|
4358
4359
|
useEventListener(() => window, "keydown", handleKeydown);
|
|
4359
4360
|
useEventListener(() => window, "keyup", handleKeyup);
|
|
4360
4361
|
function handleClick() {
|
|
4361
|
-
if (
|
|
4362
|
+
if (interactionDisabled.value) return;
|
|
4362
4363
|
if (!multiple.value && props2.childrenTrigger) return;
|
|
4363
4364
|
if (multiple.value && optionIndeterminate.value) {
|
|
4364
4365
|
optionIndeterminate.value = false;
|
|
@@ -4402,6 +4403,7 @@ var __sfc__$97 = (0, vue.defineComponent)({
|
|
|
4402
4403
|
checkbox,
|
|
4403
4404
|
optionSelected,
|
|
4404
4405
|
optionIndeterminate,
|
|
4406
|
+
interactionDisabled,
|
|
4405
4407
|
size,
|
|
4406
4408
|
multiple,
|
|
4407
4409
|
hovering,
|
|
@@ -6493,6 +6495,7 @@ var __sfc__$94 = (0, vue.defineComponent)({
|
|
|
6493
6495
|
return highlightOptions2;
|
|
6494
6496
|
});
|
|
6495
6497
|
bindMenuOptions({
|
|
6498
|
+
disabled: (0, vue.computed)(() => props2.disabled),
|
|
6496
6499
|
size: (0, vue.computed)(() => props2.size),
|
|
6497
6500
|
multiple: (0, vue.computed)(() => props2.multiple),
|
|
6498
6501
|
computeLabel,
|
|
@@ -6545,6 +6548,7 @@ var __sfc__$94 = (0, vue.defineComponent)({
|
|
|
6545
6548
|
}
|
|
6546
6549
|
function onSelect(optionProvider) {
|
|
6547
6550
|
var _a, _b;
|
|
6551
|
+
if (props2.disabled) return;
|
|
6548
6552
|
const { multiple, closeOnSelect } = props2;
|
|
6549
6553
|
const { value, label, selected, disabled, ripple } = optionProvider;
|
|
6550
6554
|
const enhancedOption = getEnhancedOption(value.value);
|
|
@@ -21613,7 +21617,10 @@ var __sfc__$40 = (0, vue.defineComponent)({
|
|
|
21613
21617
|
}
|
|
21614
21618
|
function handlePaste(event) {
|
|
21615
21619
|
var _a, _b;
|
|
21616
|
-
if (!props2.allowPaste || formDisabled.value || formReadonly.value || props2.disabled || props2.readonly)
|
|
21620
|
+
if (!props2.allowPaste || formDisabled.value || formReadonly.value || props2.disabled || props2.readonly) {
|
|
21621
|
+
event.preventDefault();
|
|
21622
|
+
return;
|
|
21623
|
+
}
|
|
21617
21624
|
const text = (_b = (_a = event.clipboardData) == null ? void 0 : _a.getData("text")) != null ? _b : "";
|
|
21618
21625
|
if (!text) return;
|
|
21619
21626
|
event.preventDefault();
|
|
@@ -33002,7 +33009,7 @@ var _WatermarkComponent = stdin_default$108;
|
|
|
33002
33009
|
var stdin_default$102 = stdin_default$108;
|
|
33003
33010
|
//#endregion
|
|
33004
33011
|
//#region es/index.bundle.mjs
|
|
33005
|
-
var version = "3.20.
|
|
33012
|
+
var version = "3.20.11";
|
|
33006
33013
|
function install(app) {
|
|
33007
33014
|
stdin_default.install && app.use(stdin_default);
|
|
33008
33015
|
stdin_default$1.install && app.use(stdin_default$1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.11",
|
|
4
4
|
"description": "A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Vue3",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@popperjs/core": "^2.11.6",
|
|
45
45
|
"dayjs": "^1.10.4",
|
|
46
46
|
"decimal.js": "^10.2.1",
|
|
47
|
-
"@varlet/icons": "3.20.
|
|
48
|
-
"@varlet/
|
|
49
|
-
"@varlet/
|
|
47
|
+
"@varlet/icons": "3.20.11",
|
|
48
|
+
"@varlet/use": "3.20.11",
|
|
49
|
+
"@varlet/shared": "3.20.11"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^22.18.0",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"vue": "3.5.21",
|
|
63
63
|
"vue-router": "4.5.1",
|
|
64
64
|
"zod": "^3.23.8",
|
|
65
|
-
"@varlet/ui": "3.20.
|
|
66
|
-
"@varlet/cli": "3.20.
|
|
67
|
-
"@varlet/touch-emulator": "3.20.
|
|
65
|
+
"@varlet/ui": "3.20.11",
|
|
66
|
+
"@varlet/cli": "3.20.11",
|
|
67
|
+
"@varlet/touch-emulator": "3.20.11"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"vue": "^3.2.0"
|