@varlet/ui 3.15.2 → 3.16.0-alpha.1778498431663
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/README.md +0 -1
- package/README.zh-CN.md +0 -1
- package/es/action-sheet/style/index.mjs +1 -1
- package/es/card/Card.mjs +26 -4
- package/es/card/card.css +1 -1
- package/es/card/props.mjs +2 -0
- package/es/card/style/index.mjs +1 -0
- package/es/index.bundle.mjs +7 -1
- package/es/index.mjs +6 -1
- package/es/otp-input/OtpInput.mjs +424 -0
- package/es/otp-input/OtpInputSfc.css +0 -0
- package/es/otp-input/index.mjs +12 -0
- package/es/otp-input/otpInput.css +1 -0
- package/es/otp-input/props.mjs +78 -0
- package/es/otp-input/style/index.mjs +7 -0
- package/es/paper/Paper.mjs +23 -6
- package/es/paper/paper.css +1 -1
- package/es/paper/props.mjs +2 -0
- package/es/paper/style/index.mjs +1 -0
- package/es/style.mjs +1 -0
- package/es/themes/dark/index.mjs +3 -2
- package/es/themes/dark/otpInput.mjs +10 -0
- package/es/themes/md3-dark/card.mjs +1 -0
- package/es/themes/md3-dark/index.mjs +3 -2
- package/es/themes/md3-dark/otpInput.mjs +10 -0
- package/es/themes/md3-dark/paper.mjs +1 -0
- package/es/themes/md3-light/card.mjs +1 -0
- package/es/themes/md3-light/index.mjs +3 -2
- package/es/themes/md3-light/otpInput.mjs +10 -0
- package/es/themes/md3-light/paper.mjs +1 -0
- package/es/varlet.css +1 -1
- package/es/varlet.esm.js +6994 -6583
- package/highlight/web-types.en-US.json +237 -1
- package/highlight/web-types.zh-CN.json +237 -1
- package/lib/varlet.cjs.js +2280 -1775
- package/lib/varlet.css +1 -1
- package/package.json +7 -7
- package/types/card.d.ts +4 -0
- package/types/index.d.ts +2 -0
- package/types/otpInput.d.ts +68 -0
- package/types/paper.d.ts +4 -0
- package/types/styleVars.d.ts +7 -0
- package/umd/varlet.js +7 -7
package/README.md
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
<img src="https://img.shields.io/badge/vue-v3.2.0%2B-%23407fbc" alt="vue">
|
|
15
15
|
<img src="https://img.shields.io/npm/l/@varlet/ui.svg" alt="licence">
|
|
16
16
|
<img src="https://img.shields.io/codecov/c/github/varletjs/varlet" alt="coverage">
|
|
17
|
-
<img src="https://github.com/varletjs/varlet/workflows/CI/badge.svg" alt="ci">
|
|
18
17
|
</p>
|
|
19
18
|
</div>
|
|
20
19
|
|
package/README.zh-CN.md
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
<img src="https://img.shields.io/badge/vue-v3.2.0%2B-%23407fbc" alt="vue">
|
|
16
16
|
<img src="https://img.shields.io/npm/l/@varlet/ui.svg" alt="licence">
|
|
17
17
|
<img src="https://img.shields.io/codecov/c/github/varletjs/varlet" alt="coverage">
|
|
18
|
-
<img src="https://github.com/varletjs/varlet/workflows/CI/badge.svg" alt="ci">
|
|
19
18
|
</p>
|
|
20
19
|
</div>
|
|
21
20
|
|
package/es/card/Card.mjs
CHANGED
|
@@ -23,6 +23,8 @@ import { computed, defineComponent, nextTick, ref, watch } from "vue";
|
|
|
23
23
|
import VarButton from "../button/index.mjs";
|
|
24
24
|
import { useLock } from "../context/lock.mjs";
|
|
25
25
|
import { useZIndex } from "../context/zIndex.mjs";
|
|
26
|
+
import Hover from "../hover/index.mjs";
|
|
27
|
+
import VarHoverOverlay, { useHoverOverlay } from "../hover-overlay/index.mjs";
|
|
26
28
|
import VarIcon from "../icon/index.mjs";
|
|
27
29
|
import Ripple from "../ripple/index.mjs";
|
|
28
30
|
import { createNamespace, formatElevation } from "../utils/components.mjs";
|
|
@@ -33,9 +35,11 @@ const RIPPLE_DELAY = 500;
|
|
|
33
35
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, withModifiers as _withModifiers, withCtx as _withCtx, resolveDirective as _resolveDirective, withDirectives as _withDirectives } from "vue";
|
|
34
36
|
const _hoisted_1 = ["src", "alt"];
|
|
35
37
|
function __render__(_ctx, _cache) {
|
|
38
|
+
const _component_var_hover_overlay = _resolveComponent("var-hover-overlay");
|
|
36
39
|
const _component_var_icon = _resolveComponent("var-icon");
|
|
37
40
|
const _component_var_button = _resolveComponent("var-button");
|
|
38
41
|
const _directive_ripple = _resolveDirective("ripple");
|
|
42
|
+
const _directive_hover = _resolveDirective("hover");
|
|
39
43
|
return _withDirectives((_openBlock(), _createElementBlock(
|
|
40
44
|
"div",
|
|
41
45
|
{
|
|
@@ -46,6 +50,8 @@ function __render__(_ctx, _cache) {
|
|
|
46
50
|
[_ctx.isRow, _ctx.n("--layout-row")],
|
|
47
51
|
[_ctx.variant === "outlined" || _ctx.outline, _ctx.n("--outline")],
|
|
48
52
|
[_ctx.variant === "filled", _ctx.n("--filled")],
|
|
53
|
+
[_ctx.surfaceLow, _ctx.n("--surface-low")],
|
|
54
|
+
[_ctx.hoverable, _ctx.n("--cursor")],
|
|
49
55
|
[_ctx.variant === "standard" || _ctx.outline, _ctx.formatElevation(_ctx.elevation, 1)]
|
|
50
56
|
)
|
|
51
57
|
),
|
|
@@ -179,6 +185,9 @@ function __render__(_ctx, _cache) {
|
|
|
179
185
|
2
|
|
180
186
|
/* CLASS */
|
|
181
187
|
),
|
|
188
|
+
_createVNode(_component_var_hover_overlay, {
|
|
189
|
+
hovering: _ctx.hoverable && !_ctx.floated ? _ctx.hovering : false
|
|
190
|
+
}, null, 8, ["hovering"]),
|
|
182
191
|
_ctx.showFloatingButtons ? (_openBlock(), _createElementBlock(
|
|
183
192
|
"div",
|
|
184
193
|
{
|
|
@@ -233,15 +242,17 @@ function __render__(_ctx, _cache) {
|
|
|
233
242
|
6
|
|
234
243
|
/* CLASS, STYLE */
|
|
235
244
|
)), [
|
|
236
|
-
[_directive_ripple, { disabled: !_ctx.ripple || _ctx.floater }]
|
|
245
|
+
[_directive_ripple, { disabled: !_ctx.ripple || _ctx.floater }],
|
|
246
|
+
[_directive_hover, _ctx.handleHovering, "desktop"]
|
|
237
247
|
]);
|
|
238
248
|
}
|
|
239
249
|
const __sfc__ = defineComponent({
|
|
240
250
|
name,
|
|
241
|
-
directives: { Ripple },
|
|
251
|
+
directives: { Ripple, Hover },
|
|
242
252
|
components: {
|
|
243
253
|
VarIcon,
|
|
244
|
-
VarButton
|
|
254
|
+
VarButton,
|
|
255
|
+
VarHoverOverlay
|
|
245
256
|
},
|
|
246
257
|
props,
|
|
247
258
|
setup(props2) {
|
|
@@ -258,6 +269,8 @@ const __sfc__ = defineComponent({
|
|
|
258
269
|
const contentHeight = ref("0px");
|
|
259
270
|
const opacity = ref("0");
|
|
260
271
|
const isRow = computed(() => props2.layout === "row");
|
|
272
|
+
const surfaceLow = computed(() => props2.surface === "low" && props2.variant !== "filled");
|
|
273
|
+
const { hovering, handleHovering } = useHoverOverlay();
|
|
261
274
|
const showFloatingButtons = ref(false);
|
|
262
275
|
const floated = ref(false);
|
|
263
276
|
const { zIndex } = useZIndex(() => props2.floating, 1);
|
|
@@ -265,6 +278,7 @@ const __sfc__ = defineComponent({
|
|
|
265
278
|
let dropdownFloaterLeft = "auto";
|
|
266
279
|
let dropper = null;
|
|
267
280
|
const floater = ref(null);
|
|
281
|
+
let hasEnteredFloating = false;
|
|
268
282
|
useLock(
|
|
269
283
|
() => props2.floating,
|
|
270
284
|
() => !isRow.value
|
|
@@ -276,7 +290,12 @@ const __sfc__ = defineComponent({
|
|
|
276
290
|
return;
|
|
277
291
|
}
|
|
278
292
|
nextTick(() => {
|
|
279
|
-
|
|
293
|
+
if (value) {
|
|
294
|
+
hasEnteredFloating = true;
|
|
295
|
+
floating();
|
|
296
|
+
} else if (hasEnteredFloating) {
|
|
297
|
+
dropdown();
|
|
298
|
+
}
|
|
280
299
|
});
|
|
281
300
|
},
|
|
282
301
|
{ immediate: true }
|
|
@@ -358,6 +377,9 @@ const __sfc__ = defineComponent({
|
|
|
358
377
|
opacity,
|
|
359
378
|
zIndex,
|
|
360
379
|
isRow,
|
|
380
|
+
surfaceLow,
|
|
381
|
+
hovering,
|
|
382
|
+
handleHovering,
|
|
361
383
|
showFloatingButtons,
|
|
362
384
|
floated,
|
|
363
385
|
n,
|
package/es/card/card.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --card-padding: 0 0 15px 0; --card-background: var(--color-surface-container-highest); --card-filled-background: hsl(0, 0%, 93%); --card-outline-color: var(--color-outline); --card-border-radius: 4px; --card-image-width: 100%; --card-row-image-width: 140px; --card-image-height: 200px; --card-row-height: 140px; --card-title-color: #333; --card-title-font-size: 20px; --card-title-padding: 0 12px; --card-title-margin: 15px 0 0 0; --card-title-row-margin: 12px 0; --card-content-padding: 0 16px; --card-content-margin: 16px 0 0 0; --card-content-color: var(--color-on-surface-variant); --card-content-font-size: 14px; --card-content-row-margin: 16px 0 0 0; --card-subtitle-color: rgba(0, 0, 0, 0.6); --card-subtitle-font-size: 14px; --card-subtitle-padding: 0 12px; --card-subtitle-margin: 10px 0 0 0; --card-subtitle-row-margin: -8px 0 0 0; --card-description-color: rgba(0, 0, 0, 0.6); --card-description-font-size: 14px; --card-description-margin: 20px 0 0 0; --card-description-padding: 0 13px; --card-footer-padding: 0 12px; --card-footer-right: 13px; --card-footer-bottom: 9px; --card-footer-margin: 30px 0 0 0; --card-line-height: 22px; --card-row-line-height: 1.5; --card-floating-buttons-bottom: 16px; --card-floating-buttons-right: 16px; --card-floating-buttons-color: #fff; --card-close-button-icon-size: 24px; --card-close-button-size: 56px; --card-close-button-primary-color: #212121; --card-close-button-text-color: #fff; --card-close-button-border-radius: 50%;}.var-card { border-radius: var(--card-border-radius); overflow: hidden; width: 100%;}.var-card__floater { display: flex; flex-direction: column; position:
|
|
1
|
+
:root { --card-padding: 0 0 15px 0; --card-background: var(--color-surface-container-highest); --card-surface-low-background: var(--color-surface-container-highest); --card-filled-background: hsl(0, 0%, 93%); --card-outline-color: var(--color-outline); --card-border-radius: 4px; --card-image-width: 100%; --card-row-image-width: 140px; --card-image-height: 200px; --card-row-height: 140px; --card-title-color: #333; --card-title-font-size: 20px; --card-title-padding: 0 12px; --card-title-margin: 15px 0 0 0; --card-title-row-margin: 12px 0; --card-content-padding: 0 16px; --card-content-margin: 16px 0 0 0; --card-content-color: var(--color-on-surface-variant); --card-content-font-size: 14px; --card-content-row-margin: 16px 0 0 0; --card-subtitle-color: rgba(0, 0, 0, 0.6); --card-subtitle-font-size: 14px; --card-subtitle-padding: 0 12px; --card-subtitle-margin: 10px 0 0 0; --card-subtitle-row-margin: -8px 0 0 0; --card-description-color: rgba(0, 0, 0, 0.6); --card-description-font-size: 14px; --card-description-margin: 20px 0 0 0; --card-description-padding: 0 13px; --card-footer-padding: 0 12px; --card-footer-right: 13px; --card-footer-bottom: 9px; --card-footer-margin: 30px 0 0 0; --card-line-height: 22px; --card-row-line-height: 1.5; --card-floating-buttons-bottom: 16px; --card-floating-buttons-right: 16px; --card-floating-buttons-color: #fff; --card-close-button-icon-size: 24px; --card-close-button-size: 56px; --card-close-button-primary-color: #212121; --card-close-button-text-color: #fff; --card-close-button-border-radius: 50%;}.var-card { border-radius: var(--card-border-radius); overflow: hidden; width: 100%;}.var-card__floater { display: flex; flex-direction: column; position: relative; line-height: var(--card-line-height); background: var(--card-background); transition: background-color 0.25s, color 0.25s; transition-timing-function: cubic-bezier(0.45, 0.19, 0.06, 0.89);}.var-card__container { padding: var(--card-padding); flex-grow: 1; min-width: 0;}.var-card--layout-row .var-card__floater { min-height: var(--card-row-height); height: 100%; flex-direction: row; position: relative; line-height: var(--card-row-line-height);}.var-card__content { padding: var(--card-content-padding); margin: var(--card-content-margin); font-size: var(--card-content-font-size); color: var(--card-content-color); transition: padding 0.25s, margin 0.25s, font-size 0.25s;}.var-card--layout-row .var-card__content { max-width: 100%; margin: var(--card-title-row-margin);}.var-card__image { width: var(--card-image-width); height: var(--card-image-height); display: block; transition: all 0.25s;}.var-card--layout-row .var-card__image { width: var(--card-row-image-width); height: auto; display: block; flex-shrink: 0;}.var-card__title { font-size: var(--card-title-font-size); padding: var(--card-title-padding); margin: var(--card-title-margin); color: var(--card-title-color); word-break: break-word; transition: padding 0.25s, margin 0.25s, font-size 0.25s;}.var-card--layout-row .var-card__title { max-width: 100%; overflow: hidden; margin: var(--card-title-row-margin); text-overflow: ellipsis; white-space: nowrap;}.var-card__subtitle { font-size: var(--card-subtitle-font-size); color: var(--card-subtitle-color); padding: var(--card-subtitle-padding); margin: var(--card-subtitle-margin); word-break: break-word; transition: padding 0.25s, margin 0.25s, font-size 0.25s;}.var-card--layout-row .var-card__subtitle { margin: var(--card-subtitle-row-margin); text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;}.var-card__description { font-size: var(--card-description-font-size); color: var(--card-description-color); margin: var(--card-description-margin); padding: var(--card-description-padding); word-break: break-all; transition: padding 0.25s, margin 0.25s, font-size 0.25s;}.var-card__footer { display: flex; justify-content: flex-end; padding: var(--card-footer-padding); margin: var(--card-footer-margin); transition: all 0.25s;}.var-card--layout-row .var-card__footer { position: absolute; padding: 0; right: var(--card-footer-right); bottom: var(--card-footer-bottom);}.var-card__floating-content { overflow: hidden; transition-timing-function: cubic-bezier(0.45, 0.19, 0.06, 0.89);}.var-card__floating-buttons { position: fixed; bottom: var(--card-floating-buttons-bottom); right: var(--card-floating-buttons-right); color: var(--card-floating-buttons-color);}.var-card__close-button[var-card-cover] { width: var(--card-close-button-size); height: var(--card-close-button-size); background-color: var(--card-close-button-primary-color); color: var(--card-close-button-text-color); border-radius: var(--card-close-button-border-radius);}.var-card__close-button-icon[var-card-cover] { font-size: var(--card-close-button-icon-size);}.var-card--outline { border: thin solid var(--card-outline-color);}.var-card--cursor { cursor: pointer;}.var-card--surface-low .var-card__floater { background-color: var(--card-surface-low-background);}.var-card--filled .var-card__floater { background-color: var(--card-filled-background);}
|
package/es/card/props.mjs
CHANGED
package/es/card/style/index.mjs
CHANGED
package/es/index.bundle.mjs
CHANGED
|
@@ -56,6 +56,7 @@ import Menu from './menu/index.mjs'
|
|
|
56
56
|
import MenuOption from './menu-option/index.mjs'
|
|
57
57
|
import MenuSelect from './menu-select/index.mjs'
|
|
58
58
|
import Option from './option/index.mjs'
|
|
59
|
+
import OtpInput from './otp-input/index.mjs'
|
|
59
60
|
import Overlay from './overlay/index.mjs'
|
|
60
61
|
import Pagination from './pagination/index.mjs'
|
|
61
62
|
import Paper from './paper/index.mjs'
|
|
@@ -151,6 +152,7 @@ export * from './menu/index.mjs'
|
|
|
151
152
|
export * from './menu-option/index.mjs'
|
|
152
153
|
export * from './menu-select/index.mjs'
|
|
153
154
|
export * from './option/index.mjs'
|
|
155
|
+
export * from './otp-input/index.mjs'
|
|
154
156
|
export * from './overlay/index.mjs'
|
|
155
157
|
export * from './pagination/index.mjs'
|
|
156
158
|
export * from './paper/index.mjs'
|
|
@@ -246,6 +248,7 @@ import './menu/style/index.mjs'
|
|
|
246
248
|
import './menu-option/style/index.mjs'
|
|
247
249
|
import './menu-select/style/index.mjs'
|
|
248
250
|
import './option/style/index.mjs'
|
|
251
|
+
import './otp-input/style/index.mjs'
|
|
249
252
|
import './overlay/style/index.mjs'
|
|
250
253
|
import './pagination/style/index.mjs'
|
|
251
254
|
import './paper/style/index.mjs'
|
|
@@ -283,7 +286,7 @@ import './tooltip/style/index.mjs'
|
|
|
283
286
|
import './uploader/style/index.mjs'
|
|
284
287
|
import './watermark/style/index.mjs'
|
|
285
288
|
|
|
286
|
-
const version = '3.
|
|
289
|
+
const version = '3.16.0-alpha.1778498431663'
|
|
287
290
|
|
|
288
291
|
function install(app) {
|
|
289
292
|
ActionSheet.install && app.use(ActionSheet)
|
|
@@ -344,6 +347,7 @@ function install(app) {
|
|
|
344
347
|
MenuOption.install && app.use(MenuOption)
|
|
345
348
|
MenuSelect.install && app.use(MenuSelect)
|
|
346
349
|
Option.install && app.use(Option)
|
|
350
|
+
OtpInput.install && app.use(OtpInput)
|
|
347
351
|
Overlay.install && app.use(Overlay)
|
|
348
352
|
Pagination.install && app.use(Pagination)
|
|
349
353
|
Paper.install && app.use(Paper)
|
|
@@ -443,6 +447,7 @@ export {
|
|
|
443
447
|
MenuOption,
|
|
444
448
|
MenuSelect,
|
|
445
449
|
Option,
|
|
450
|
+
OtpInput,
|
|
446
451
|
Overlay,
|
|
447
452
|
Pagination,
|
|
448
453
|
Paper,
|
|
@@ -542,6 +547,7 @@ export default {
|
|
|
542
547
|
MenuOption,
|
|
543
548
|
MenuSelect,
|
|
544
549
|
Option,
|
|
550
|
+
OtpInput,
|
|
545
551
|
Overlay,
|
|
546
552
|
Pagination,
|
|
547
553
|
Paper,
|
package/es/index.mjs
CHANGED
|
@@ -56,6 +56,7 @@ import Menu from './menu/index.mjs'
|
|
|
56
56
|
import MenuOption from './menu-option/index.mjs'
|
|
57
57
|
import MenuSelect from './menu-select/index.mjs'
|
|
58
58
|
import Option from './option/index.mjs'
|
|
59
|
+
import OtpInput from './otp-input/index.mjs'
|
|
59
60
|
import Overlay from './overlay/index.mjs'
|
|
60
61
|
import Pagination from './pagination/index.mjs'
|
|
61
62
|
import Paper from './paper/index.mjs'
|
|
@@ -151,6 +152,7 @@ export * from './menu/index.mjs'
|
|
|
151
152
|
export * from './menu-option/index.mjs'
|
|
152
153
|
export * from './menu-select/index.mjs'
|
|
153
154
|
export * from './option/index.mjs'
|
|
155
|
+
export * from './otp-input/index.mjs'
|
|
154
156
|
export * from './overlay/index.mjs'
|
|
155
157
|
export * from './pagination/index.mjs'
|
|
156
158
|
export * from './paper/index.mjs'
|
|
@@ -188,7 +190,7 @@ export * from './tooltip/index.mjs'
|
|
|
188
190
|
export * from './uploader/index.mjs'
|
|
189
191
|
export * from './watermark/index.mjs'
|
|
190
192
|
|
|
191
|
-
const version = '3.
|
|
193
|
+
const version = '3.16.0-alpha.1778498431663'
|
|
192
194
|
|
|
193
195
|
function install(app) {
|
|
194
196
|
ActionSheet.install && app.use(ActionSheet)
|
|
@@ -249,6 +251,7 @@ function install(app) {
|
|
|
249
251
|
MenuOption.install && app.use(MenuOption)
|
|
250
252
|
MenuSelect.install && app.use(MenuSelect)
|
|
251
253
|
Option.install && app.use(Option)
|
|
254
|
+
OtpInput.install && app.use(OtpInput)
|
|
252
255
|
Overlay.install && app.use(Overlay)
|
|
253
256
|
Pagination.install && app.use(Pagination)
|
|
254
257
|
Paper.install && app.use(Paper)
|
|
@@ -348,6 +351,7 @@ export {
|
|
|
348
351
|
MenuOption,
|
|
349
352
|
MenuSelect,
|
|
350
353
|
Option,
|
|
354
|
+
OtpInput,
|
|
351
355
|
Overlay,
|
|
352
356
|
Pagination,
|
|
353
357
|
Paper,
|
|
@@ -447,6 +451,7 @@ export default {
|
|
|
447
451
|
MenuOption,
|
|
448
452
|
MenuSelect,
|
|
449
453
|
Option,
|
|
454
|
+
OtpInput,
|
|
450
455
|
Overlay,
|
|
451
456
|
Pagination,
|
|
452
457
|
Paper,
|