@varlet/ui 3.20.9 → 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/snackbar/style/index.mjs +1 -1
- package/es/tabs/Tabs.mjs +6 -1
- package/es/tabs/props.mjs +4 -0
- package/es/tabs/tabs.css +1 -1
- package/es/themes/dark/tabs.mjs +4 -1
- package/es/themes/md3-dark/tabs.mjs +4 -1
- package/es/themes/md3-light/tabs.mjs +4 -1
- package/es/varlet.css +1 -1
- package/es/varlet.esm.js +3919 -3900
- package/highlight/web-types.en-US.json +12 -3
- package/highlight/web-types.zh-CN.json +12 -3
- package/lib/varlet.cjs.js +33 -13
- package/lib/varlet.css +1 -1
- package/package.json +7 -7
- package/types/styleVars.d.ts +3 -0
- package/types/tabs.d.ts +3 -0
- package/umd/varlet.js +6 -6
package/es/index.bundle.mjs
CHANGED
|
@@ -310,7 +310,7 @@ import './tree-menu/style/index.mjs'
|
|
|
310
310
|
import './uploader/style/index.mjs'
|
|
311
311
|
import './watermark/style/index.mjs'
|
|
312
312
|
|
|
313
|
-
const version = '3.20.
|
|
313
|
+
const version = '3.20.11'
|
|
314
314
|
|
|
315
315
|
function install(app) {
|
|
316
316
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -206,7 +206,7 @@ export * from './tree-menu/index.mjs'
|
|
|
206
206
|
export * from './uploader/index.mjs'
|
|
207
207
|
export * from './watermark/index.mjs'
|
|
208
208
|
|
|
209
|
-
const version = '3.20.
|
|
209
|
+
const version = '3.20.11'
|
|
210
210
|
|
|
211
211
|
function install(app) {
|
|
212
212
|
ActionSheet.install && app.use(ActionSheet)
|
|
@@ -47,11 +47,11 @@ function __render__(_ctx, _cache) {
|
|
|
47
47
|
_ctx.n("$--box"),
|
|
48
48
|
_ctx.n(`--${_ctx.size}`),
|
|
49
49
|
[_ctx.optionSelected, _ctx.n("--selected-color")],
|
|
50
|
-
[_ctx.
|
|
50
|
+
[_ctx.interactionDisabled, _ctx.n("--disabled")],
|
|
51
51
|
[_ctx.childrenTrigger, _ctx.n("--children-trigger")]
|
|
52
52
|
)
|
|
53
53
|
),
|
|
54
|
-
tabindex: _ctx.
|
|
54
|
+
tabindex: _ctx.interactionDisabled ? void 0 : "-1",
|
|
55
55
|
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
56
56
|
onFocus: _cache[4] || (_cache[4] = ($event) => _ctx.isFocusing = true),
|
|
57
57
|
onBlur: _cache[5] || (_cache[5] = ($event) => _ctx.isFocusing = false)
|
|
@@ -72,7 +72,7 @@ function __render__(_ctx, _cache) {
|
|
|
72
72
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.optionSelected = $event),
|
|
73
73
|
indeterminate: _ctx.optionIndeterminate,
|
|
74
74
|
"onUpdate:indeterminate": _cache[1] || (_cache[1] = ($event) => _ctx.optionIndeterminate = $event),
|
|
75
|
-
disabled: _ctx.
|
|
75
|
+
disabled: _ctx.interactionDisabled,
|
|
76
76
|
onClick: _cache[2] || (_cache[2] = _withModifiers(() => {
|
|
77
77
|
}, ["stop"])),
|
|
78
78
|
onChange: _ctx.handleSelect
|
|
@@ -110,11 +110,11 @@ function __render__(_ctx, _cache) {
|
|
|
110
110
|
/* CLASS */
|
|
111
111
|
)) : _createCommentVNode("v-if", true),
|
|
112
112
|
_createVNode(_component_var_hover_overlay, {
|
|
113
|
-
hovering: (_ctx.hovering || _ctx.highlight) && !_ctx.
|
|
114
|
-
focusing: _ctx.isFocusing && !_ctx.
|
|
113
|
+
hovering: (_ctx.hovering || _ctx.highlight) && !_ctx.interactionDisabled,
|
|
114
|
+
focusing: _ctx.isFocusing && !_ctx.interactionDisabled
|
|
115
115
|
}, null, 8, ["hovering", "focusing"])
|
|
116
116
|
], 42, _hoisted_1)), [
|
|
117
|
-
[_directive_ripple, { disabled: _ctx.
|
|
117
|
+
[_directive_ripple, { disabled: _ctx.interactionDisabled || !_ctx.ripple }],
|
|
118
118
|
[_directive_hover, _ctx.handleHovering, "desktop"]
|
|
119
119
|
]);
|
|
120
120
|
}
|
|
@@ -141,6 +141,7 @@ const __sfc__ = defineComponent({
|
|
|
141
141
|
const ripple = computed(() => props2.ripple);
|
|
142
142
|
const { menuSelect, bindMenuSelect } = useMenuSelect();
|
|
143
143
|
const { size, multiple, onSelect, computeLabel } = menuSelect;
|
|
144
|
+
const interactionDisabled = computed(() => menuSelect.disabled.value || disabled.value);
|
|
144
145
|
const { hovering, handleHovering } = useHoverOverlay();
|
|
145
146
|
const labelVNode = computed(
|
|
146
147
|
() => {
|
|
@@ -170,7 +171,7 @@ const __sfc__ = defineComponent({
|
|
|
170
171
|
useEventListener(() => window, "keydown", handleKeydown);
|
|
171
172
|
useEventListener(() => window, "keyup", handleKeyup);
|
|
172
173
|
function handleClick() {
|
|
173
|
-
if (
|
|
174
|
+
if (interactionDisabled.value) {
|
|
174
175
|
return;
|
|
175
176
|
}
|
|
176
177
|
if (!multiple.value && props2.childrenTrigger) {
|
|
@@ -232,6 +233,7 @@ const __sfc__ = defineComponent({
|
|
|
232
233
|
checkbox,
|
|
233
234
|
optionSelected,
|
|
234
235
|
optionIndeterminate,
|
|
236
|
+
interactionDisabled,
|
|
235
237
|
size,
|
|
236
238
|
multiple,
|
|
237
239
|
hovering,
|
|
@@ -171,6 +171,7 @@ const __sfc__ = defineComponent({
|
|
|
171
171
|
return highlightOptions2;
|
|
172
172
|
});
|
|
173
173
|
const menuSelectProvider = {
|
|
174
|
+
disabled: computed(() => props2.disabled),
|
|
174
175
|
size: computed(() => props2.size),
|
|
175
176
|
multiple: computed(() => props2.multiple),
|
|
176
177
|
computeLabel,
|
|
@@ -230,6 +231,9 @@ const __sfc__ = defineComponent({
|
|
|
230
231
|
}
|
|
231
232
|
function onSelect(optionProvider) {
|
|
232
233
|
var _a, _b;
|
|
234
|
+
if (props2.disabled) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
233
237
|
const { multiple, closeOnSelect } = props2;
|
|
234
238
|
const { value, label, selected, disabled, ripple } = optionProvider;
|
|
235
239
|
const enhancedOption = getEnhancedOption(value.value);
|
|
@@ -369,6 +369,7 @@ const __sfc__ = defineComponent({
|
|
|
369
369
|
function handlePaste(event) {
|
|
370
370
|
var _a, _b;
|
|
371
371
|
if (!props2.allowPaste || formDisabled.value || formReadonly.value || props2.disabled || props2.readonly) {
|
|
372
|
+
event.preventDefault();
|
|
372
373
|
return;
|
|
373
374
|
}
|
|
374
375
|
const text = (_b = (_a = event.clipboardData) == null ? void 0 : _a.getData("text")) != null ? _b : "";
|
package/es/tabs/Tabs.mjs
CHANGED
|
@@ -69,7 +69,12 @@ function __render__(_ctx, _cache) {
|
|
|
69
69
|
_createElementVNode(
|
|
70
70
|
"div",
|
|
71
71
|
{
|
|
72
|
-
class: _normalizeClass(
|
|
72
|
+
class: _normalizeClass(
|
|
73
|
+
_ctx.classes(_ctx.n("indicator"), _ctx.n(`--layout-${_ctx.layoutDirection}${_ctx.indicatorPosition}-indicator`), [
|
|
74
|
+
_ctx.indicatorVariant === "short",
|
|
75
|
+
_ctx.n("--indicator-short")
|
|
76
|
+
])
|
|
77
|
+
),
|
|
73
78
|
style: _normalizeStyle({
|
|
74
79
|
width: _ctx.layoutDirection === "horizontal" ? _ctx.indicatorWidth : _ctx.toSizeUnit(_ctx.indicatorSize),
|
|
75
80
|
height: _ctx.layoutDirection === "horizontal" ? _ctx.toSizeUnit(_ctx.indicatorSize) : _ctx.indicatorHeight,
|
package/es/tabs/props.mjs
CHANGED
package/es/tabs/tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --tabs-item-horizontal-height: 44px; --tabs-item-vertical-height: 66px; --tabs-radius: 2px; --tabs-padding: 12px; --tabs-indicator-size: 2px; --tabs-indicator-border-radius: 0; --tabs-indicator-background: var(--color-primary); --tabs-background: #fff; --tabs-indicator-inner-size: 100%;}.var-tabs { border-radius: var(--tabs-radius); background: var(--tabs-background); overflow: hidden; transition: background-color 0.25s;}.var-tabs__tab-wrap { position: relative; display: flex; height: 100%;}.var-tabs__indicator { display: flex; justify-content: center; align-items: center; position: absolute; z-index: 1; transition-property: width, transform; transition-duration: 0.3s;}.var-tabs__indicator-inner { background: var(--tabs-indicator-background); border-radius: var(--tabs-indicator-border-radius);}.var-tabs--layout-horizontal { flex-direction: row;}.var-tabs--layout-horizontal-scrollable { overflow-x: auto; overflow-y: hidden; scrollbar-width: none;}.var-tabs--layout-horizontal-scrollable::-webkit-scrollbar { display: none;}.var-tabs--layout-horizontal-padding { padding: 0 var(--tabs-padding);}.var-tabs--layout-horizontal-indicator { left: 0; bottom: 0; height: var(--tabs-indicator-size);}.var-tabs--layout-horizontal-reverse-indicator { left: 0; top: 0; height: var(--tabs-indicator-size);}.var-tabs--layout-horizontal-indicator-inner { width: var(--tabs-indicator-inner-size); height: 100%;}.var-tabs--layout-vertical { flex-direction: column;}.var-tabs--layout-vertical-scrollable { overflow-x: hidden; overflow-y: auto; scrollbar-width: none;}.var-tabs--layout-vertical-scrollable::-webkit-scrollbar { display: none;}.var-tabs--layout-vertical-padding { padding: 0;}.var-tabs--layout-vertical-indicator { left: 0; top: 0; width: var(--tabs-indicator-size);}.var-tabs--layout-vertical-reverse-indicator { right: 0; top: 0; width: var(--tabs-indicator-size);}.var-tabs--layout-vertical-indicator-inner { width: 100%; height: var(--tabs-indicator-inner-size);}.var-tabs--item-horizontal { height: var(--tabs-item-horizontal-height);}.var-tabs--item-vertical { height: var(--tabs-item-vertical-height);}.var-tabs--fixed-bottom { position: fixed; width: 100%; left: 0; bottom: 0; z-index: 99;}.var-tabs--safe-area { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box !important;}
|
|
1
|
+
:root { --tabs-item-horizontal-height: 44px; --tabs-item-vertical-height: 66px; --tabs-radius: 2px; --tabs-padding: 12px; --tabs-indicator-size: 2px; --tabs-indicator-border-radius: 0; --tabs-indicator-background: var(--color-primary); --tabs-background: #fff; --tabs-indicator-inner-size: 100%; --tabs-short-indicator-size: 3px; --tabs-short-indicator-inner-size: 32px; --tabs-short-indicator-border-radius: 3px;}.var-tabs { border-radius: var(--tabs-radius); background: var(--tabs-background); overflow: hidden; transition: background-color 0.25s;}.var-tabs__tab-wrap { position: relative; display: flex; height: 100%;}.var-tabs__indicator { display: flex; justify-content: center; align-items: center; position: absolute; z-index: 1; transition-property: width, transform; transition-duration: 0.3s;}.var-tabs__indicator-inner { background: var(--tabs-indicator-background); border-radius: var(--tabs-indicator-border-radius);}.var-tabs--layout-horizontal { flex-direction: row;}.var-tabs--layout-horizontal-scrollable { overflow-x: auto; overflow-y: hidden; scrollbar-width: none;}.var-tabs--layout-horizontal-scrollable::-webkit-scrollbar { display: none;}.var-tabs--layout-horizontal-padding { padding: 0 var(--tabs-padding);}.var-tabs--layout-horizontal-indicator { left: 0; bottom: 0; height: var(--tabs-indicator-size);}.var-tabs--layout-horizontal-reverse-indicator { left: 0; top: 0; height: var(--tabs-indicator-size);}.var-tabs--layout-horizontal-indicator-inner { width: var(--tabs-indicator-inner-size); height: 100%;}.var-tabs--layout-vertical { flex-direction: column;}.var-tabs--layout-vertical-scrollable { overflow-x: hidden; overflow-y: auto; scrollbar-width: none;}.var-tabs--layout-vertical-scrollable::-webkit-scrollbar { display: none;}.var-tabs--layout-vertical-padding { padding: 0;}.var-tabs--layout-vertical-indicator { left: 0; top: 0; width: var(--tabs-indicator-size);}.var-tabs--layout-vertical-reverse-indicator { right: 0; top: 0; width: var(--tabs-indicator-size);}.var-tabs--layout-vertical-indicator-inner { width: 100%; height: var(--tabs-indicator-inner-size);}.var-tabs--item-horizontal { height: var(--tabs-item-horizontal-height);}.var-tabs--item-vertical { height: var(--tabs-item-vertical-height);}.var-tabs--indicator-short.var-tabs--layout-horizontal-indicator,.var-tabs--indicator-short.var-tabs--layout-horizontal-reverse-indicator { height: var(--tabs-short-indicator-size);}.var-tabs--indicator-short.var-tabs--layout-horizontal-indicator .var-tabs__indicator-inner,.var-tabs--indicator-short.var-tabs--layout-horizontal-reverse-indicator .var-tabs__indicator-inner { width: var(--tabs-short-indicator-inner-size); max-width: 100%;}.var-tabs--indicator-short.var-tabs--layout-vertical-indicator,.var-tabs--indicator-short.var-tabs--layout-vertical-reverse-indicator { width: var(--tabs-short-indicator-size);}.var-tabs--indicator-short.var-tabs--layout-vertical-indicator .var-tabs__indicator-inner,.var-tabs--indicator-short.var-tabs--layout-vertical-reverse-indicator .var-tabs__indicator-inner { height: var(--tabs-short-indicator-inner-size); max-height: 100%;}.var-tabs--indicator-short.var-tabs--layout-horizontal-indicator .var-tabs__indicator-inner { border-radius: var(--tabs-short-indicator-border-radius) var(--tabs-short-indicator-border-radius) 0 0;}.var-tabs--indicator-short.var-tabs--layout-horizontal-reverse-indicator .var-tabs__indicator-inner { border-radius: 0 0 var(--tabs-short-indicator-border-radius) var(--tabs-short-indicator-border-radius);}.var-tabs--indicator-short.var-tabs--layout-vertical-indicator .var-tabs__indicator-inner { border-radius: 0 var(--tabs-short-indicator-border-radius) var(--tabs-short-indicator-border-radius) 0;}.var-tabs--indicator-short.var-tabs--layout-vertical-reverse-indicator .var-tabs__indicator-inner { border-radius: var(--tabs-short-indicator-border-radius) 0 0 var(--tabs-short-indicator-border-radius);}.var-tabs--fixed-bottom { position: fixed; width: 100%; left: 0; bottom: 0; z-index: 99;}.var-tabs--safe-area { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box !important;}
|
package/es/themes/dark/tabs.mjs
CHANGED
|
@@ -7,7 +7,10 @@ var stdin_default = {
|
|
|
7
7
|
"--tabs-indicator-size": "2px",
|
|
8
8
|
"--tabs-indicator-border-radius": "0",
|
|
9
9
|
"--tabs-indicator-background": "var(--color-primary)",
|
|
10
|
-
"--tabs-indicator-inner-size": "100%"
|
|
10
|
+
"--tabs-indicator-inner-size": "100%",
|
|
11
|
+
"--tabs-short-indicator-size": "3px",
|
|
12
|
+
"--tabs-short-indicator-inner-size": "32px",
|
|
13
|
+
"--tabs-short-indicator-border-radius": "3px"
|
|
11
14
|
};
|
|
12
15
|
export {
|
|
13
16
|
stdin_default as default
|
|
@@ -7,7 +7,10 @@ var stdin_default = {
|
|
|
7
7
|
"--tabs-indicator-size": "2px",
|
|
8
8
|
"--tabs-indicator-border-radius": "0",
|
|
9
9
|
"--tabs-indicator-background": "var(--color-primary)",
|
|
10
|
-
"--tabs-indicator-inner-size": "100%"
|
|
10
|
+
"--tabs-indicator-inner-size": "100%",
|
|
11
|
+
"--tabs-short-indicator-size": "3px",
|
|
12
|
+
"--tabs-short-indicator-inner-size": "32px",
|
|
13
|
+
"--tabs-short-indicator-border-radius": "3px"
|
|
11
14
|
};
|
|
12
15
|
export {
|
|
13
16
|
stdin_default as default
|
|
@@ -7,7 +7,10 @@ var stdin_default = {
|
|
|
7
7
|
"--tabs-indicator-size": "2px",
|
|
8
8
|
"--tabs-indicator-border-radius": "0",
|
|
9
9
|
"--tabs-indicator-background": "var(--color-primary)",
|
|
10
|
-
"--tabs-indicator-inner-size": "100%"
|
|
10
|
+
"--tabs-indicator-inner-size": "100%",
|
|
11
|
+
"--tabs-short-indicator-size": "3px",
|
|
12
|
+
"--tabs-short-indicator-inner-size": "32px",
|
|
13
|
+
"--tabs-short-indicator-border-radius": "3px"
|
|
11
14
|
};
|
|
12
15
|
export {
|
|
13
16
|
stdin_default as default
|