@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "3.20.
|
|
4
|
+
"version": "3.20.11",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -9646,6 +9646,15 @@
|
|
|
9646
9646
|
"kind": "expression"
|
|
9647
9647
|
}
|
|
9648
9648
|
},
|
|
9649
|
+
{
|
|
9650
|
+
"name": "indicator-variant",
|
|
9651
|
+
"description": "Indicator appearance, can be `full` (full length) or `short` (fixed short length)",
|
|
9652
|
+
"default": "full",
|
|
9653
|
+
"value": {
|
|
9654
|
+
"type": "string",
|
|
9655
|
+
"kind": "expression"
|
|
9656
|
+
}
|
|
9657
|
+
},
|
|
9649
9658
|
{
|
|
9650
9659
|
"name": "indicator-color",
|
|
9651
9660
|
"description": "The tab activates the color of the indicator",
|
|
@@ -9657,8 +9666,8 @@
|
|
|
9657
9666
|
},
|
|
9658
9667
|
{
|
|
9659
9668
|
"name": "indicator-size",
|
|
9660
|
-
"description": "
|
|
9661
|
-
"default": "2px",
|
|
9669
|
+
"description": "Indicator thickness",
|
|
9670
|
+
"default": "full: 2px, short: 3px",
|
|
9662
9671
|
"value": {
|
|
9663
9672
|
"type": "string | number",
|
|
9664
9673
|
"kind": "expression"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "3.20.
|
|
4
|
+
"version": "3.20.11",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -9564,6 +9564,15 @@
|
|
|
9564
9564
|
"kind": "expression"
|
|
9565
9565
|
}
|
|
9566
9566
|
},
|
|
9567
|
+
{
|
|
9568
|
+
"name": "indicator-variant",
|
|
9569
|
+
"description": "指示器外观,可选值为 `full`(完整长度)和 `short`(固定长度的短指示器)",
|
|
9570
|
+
"default": "full",
|
|
9571
|
+
"value": {
|
|
9572
|
+
"type": "string",
|
|
9573
|
+
"kind": "expression"
|
|
9574
|
+
}
|
|
9575
|
+
},
|
|
9567
9576
|
{
|
|
9568
9577
|
"name": "indicator-color",
|
|
9569
9578
|
"description": "选项卡激活指示器的颜色",
|
|
@@ -9575,8 +9584,8 @@
|
|
|
9575
9584
|
},
|
|
9576
9585
|
{
|
|
9577
9586
|
"name": "indicator-size",
|
|
9578
|
-
"description": "
|
|
9579
|
-
"default": "2px",
|
|
9587
|
+
"description": "指示器的厚度",
|
|
9588
|
+
"default": "full: 2px,short: 3px",
|
|
9580
9589
|
"value": {
|
|
9581
9590
|
"type": "string | number",
|
|
9582
9591
|
"kind": "expression"
|
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();
|
|
@@ -26754,6 +26761,10 @@ var props$86 = {
|
|
|
26754
26761
|
inactiveColor: String,
|
|
26755
26762
|
disabledColor: String,
|
|
26756
26763
|
color: String,
|
|
26764
|
+
indicatorVariant: {
|
|
26765
|
+
type: String,
|
|
26766
|
+
default: "full"
|
|
26767
|
+
},
|
|
26757
26768
|
indicatorColor: String,
|
|
26758
26769
|
indicatorSize: [String, Number],
|
|
26759
26770
|
elevation: {
|
|
@@ -26818,7 +26829,7 @@ function __render__$7(_ctx, _cache) {
|
|
|
26818
26829
|
ref: "scrollerEl",
|
|
26819
26830
|
class: (0, vue.normalizeClass)(_ctx.classes(_ctx.n("tab-wrap"), [_ctx.localScrollable, _ctx.n(`--layout-${_ctx.layoutDirection}-scrollable`)], _ctx.n(`--layout-${_ctx.layoutDirection}`)))
|
|
26820
26831
|
}, [(0, vue.renderSlot)(_ctx.$slots, "default"), (0, vue.createElementVNode)("div", {
|
|
26821
|
-
class: (0, vue.normalizeClass)(_ctx.classes(_ctx.n("indicator"), _ctx.n(`--layout-${_ctx.layoutDirection}${_ctx.indicatorPosition}-indicator`))),
|
|
26832
|
+
class: (0, vue.normalizeClass)(_ctx.classes(_ctx.n("indicator"), _ctx.n(`--layout-${_ctx.layoutDirection}${_ctx.indicatorPosition}-indicator`), [_ctx.indicatorVariant === "short", _ctx.n("--indicator-short")])),
|
|
26822
26833
|
style: (0, vue.normalizeStyle)({
|
|
26823
26834
|
width: _ctx.layoutDirection === "horizontal" ? _ctx.indicatorWidth : _ctx.toSizeUnit(_ctx.indicatorSize),
|
|
26824
26835
|
height: _ctx.layoutDirection === "horizontal" ? _ctx.toSizeUnit(_ctx.indicatorSize) : _ctx.indicatorHeight,
|
|
@@ -28217,7 +28228,10 @@ var stdin_default$272 = {
|
|
|
28217
28228
|
"--tabs-indicator-size": "2px",
|
|
28218
28229
|
"--tabs-indicator-border-radius": "0",
|
|
28219
28230
|
"--tabs-indicator-background": "var(--color-primary)",
|
|
28220
|
-
"--tabs-indicator-inner-size": "100%"
|
|
28231
|
+
"--tabs-indicator-inner-size": "100%",
|
|
28232
|
+
"--tabs-short-indicator-size": "3px",
|
|
28233
|
+
"--tabs-short-indicator-inner-size": "32px",
|
|
28234
|
+
"--tabs-short-indicator-border-radius": "3px"
|
|
28221
28235
|
};
|
|
28222
28236
|
//#endregion
|
|
28223
28237
|
//#region es/themes/dark/timePicker.mjs
|
|
@@ -29602,7 +29616,10 @@ var stdin_default$196 = {
|
|
|
29602
29616
|
"--tabs-indicator-size": "2px",
|
|
29603
29617
|
"--tabs-indicator-border-radius": "0",
|
|
29604
29618
|
"--tabs-indicator-background": "var(--color-primary)",
|
|
29605
|
-
"--tabs-indicator-inner-size": "100%"
|
|
29619
|
+
"--tabs-indicator-inner-size": "100%",
|
|
29620
|
+
"--tabs-short-indicator-size": "3px",
|
|
29621
|
+
"--tabs-short-indicator-inner-size": "32px",
|
|
29622
|
+
"--tabs-short-indicator-border-radius": "3px"
|
|
29606
29623
|
};
|
|
29607
29624
|
//#endregion
|
|
29608
29625
|
//#region es/themes/md3-dark/timePicker.mjs
|
|
@@ -30970,7 +30987,10 @@ var stdin_default$120 = {
|
|
|
30970
30987
|
"--tabs-indicator-size": "2px",
|
|
30971
30988
|
"--tabs-indicator-border-radius": "0",
|
|
30972
30989
|
"--tabs-indicator-background": "var(--color-primary)",
|
|
30973
|
-
"--tabs-indicator-inner-size": "100%"
|
|
30990
|
+
"--tabs-indicator-inner-size": "100%",
|
|
30991
|
+
"--tabs-short-indicator-size": "3px",
|
|
30992
|
+
"--tabs-short-indicator-inner-size": "32px",
|
|
30993
|
+
"--tabs-short-indicator-border-radius": "3px"
|
|
30974
30994
|
};
|
|
30975
30995
|
//#endregion
|
|
30976
30996
|
//#region es/themes/md3-light/timePicker.mjs
|
|
@@ -32989,7 +33009,7 @@ var _WatermarkComponent = stdin_default$108;
|
|
|
32989
33009
|
var stdin_default$102 = stdin_default$108;
|
|
32990
33010
|
//#endregion
|
|
32991
33011
|
//#region es/index.bundle.mjs
|
|
32992
|
-
var version = "3.20.
|
|
33012
|
+
var version = "3.20.11";
|
|
32993
33013
|
function install(app) {
|
|
32994
33014
|
stdin_default.install && app.use(stdin_default);
|
|
32995
33015
|
stdin_default$1.install && app.use(stdin_default$1);
|