@varlet/ui 2.2.1 → 2.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/action-sheet/ActionSheet.js +1 -1
- package/es/app-bar/AppBar.js +1 -1
- package/es/badge/Badge.js +5 -3
- package/es/button/Button.js +1 -1
- package/es/button/button.css +1 -1
- package/es/button/props.js +1 -2
- package/es/card/Card.js +3 -3
- package/es/cell/Cell.js +0 -1
- package/es/chip/Chip.js +6 -4
- package/es/chip/chip.css +1 -1
- package/es/col/Col.js +1 -1
- package/es/counter/Counter.js +2 -2
- package/es/date-picker/DatePicker.js +1 -1
- package/es/dialog/Dialog.js +1 -1
- package/es/divider/Divider.js +1 -1
- package/es/image/Image.js +1 -1
- package/es/image-preview/ImagePreview.js +3 -3
- package/es/index-anchor/IndexAnchor.js +1 -1
- package/es/index.js +5 -0
- package/es/input/Input.js +2 -2
- package/es/link/Link.js +102 -0
- package/es/link/LinkSfc.css +0 -0
- package/es/link/index.js +8 -0
- package/es/link/link.css +1 -0
- package/es/link/props.js +50 -0
- package/es/link/style/index.js +3 -0
- package/es/list/List.js +1 -1
- package/es/loading/Loading.js +1 -1
- package/es/menu/Menu.js +1 -1
- package/es/option/Option.js +2 -2
- package/es/pagination/Pagination.js +3 -3
- package/es/picker/Picker.js +1 -1
- package/es/popup/Popup.js +4 -4
- package/es/pull-refresh/PullRefresh.js +1 -1
- package/es/row/Row.js +1 -1
- package/es/select/Select.js +3 -3
- package/es/skeleton/Skeleton.js +1 -1
- package/es/slider/Slider.js +1 -1
- package/es/snackbar/core.js +1 -1
- package/es/snackbar/style/index.js +1 -1
- package/es/space/Space.js +2 -4
- package/es/style.css +1 -1
- package/es/style.js +1 -0
- package/es/switch/Switch.js +1 -1
- package/es/tab/Tab.js +2 -2
- package/es/table/Table.js +1 -1
- package/es/tabs/Tabs.js +2 -2
- package/es/time-picker/TimePicker.js +1 -1
- package/es/umdIndex.js +5 -0
- package/es/uploader/Uploader.js +3 -3
- package/es/utils/components.js +9 -3
- package/es/varlet.esm.js +3772 -3650
- package/highlight/attributes.json +38 -2
- package/highlight/tags.json +13 -0
- package/highlight/web-types.json +101 -3
- package/lib/action-sheet/ActionSheet.js +1 -1
- package/lib/app-bar/AppBar.js +1 -1
- package/lib/badge/Badge.js +5 -3
- package/lib/button/Button.js +1 -1
- package/lib/button/button.css +1 -1
- package/lib/button/props.js +1 -2
- package/lib/card/Card.js +3 -3
- package/lib/cell/Cell.js +0 -1
- package/lib/chip/Chip.js +6 -4
- package/lib/chip/chip.css +1 -1
- package/lib/col/Col.js +1 -1
- package/lib/counter/Counter.js +2 -2
- package/lib/date-picker/DatePicker.js +1 -1
- package/lib/dialog/Dialog.js +1 -1
- package/lib/divider/Divider.js +1 -1
- package/lib/image/Image.js +1 -1
- package/lib/image-preview/ImagePreview.js +3 -3
- package/lib/index-anchor/IndexAnchor.js +1 -1
- package/lib/index.js +3 -0
- package/lib/input/Input.js +2 -2
- package/lib/link/Link.js +115 -0
- package/lib/link/LinkSfc.css +0 -0
- package/lib/link/index.js +17 -0
- package/lib/link/link.css +1 -0
- package/lib/link/props.js +56 -0
- package/lib/link/style/index.js +3 -0
- package/lib/list/List.js +1 -1
- package/lib/loading/Loading.js +1 -1
- package/lib/menu/Menu.js +1 -1
- package/lib/option/Option.js +2 -2
- package/lib/pagination/Pagination.js +3 -3
- package/lib/picker/Picker.js +1 -1
- package/lib/popup/Popup.js +4 -4
- package/lib/pull-refresh/PullRefresh.js +1 -1
- package/lib/row/Row.js +1 -1
- package/lib/select/Select.js +3 -3
- package/lib/skeleton/Skeleton.js +1 -1
- package/lib/slider/Slider.js +1 -1
- package/lib/snackbar/core.js +1 -1
- package/lib/snackbar/style/index.js +1 -1
- package/lib/space/Space.js +2 -4
- package/lib/style.css +1 -1
- package/lib/style.js +1 -0
- package/lib/switch/Switch.js +1 -1
- package/lib/tab/Tab.js +2 -2
- package/lib/table/Table.js +1 -1
- package/lib/tabs/Tabs.js +2 -2
- package/lib/time-picker/TimePicker.js +1 -1
- package/lib/uploader/Uploader.js +3 -3
- package/lib/utils/components.js +9 -3
- package/package.json +7 -7
- package/types/index.d.ts +2 -0
- package/types/link.d.ts +30 -0
- package/umd/varlet.js +7 -7
package/es/style.js
CHANGED
package/es/switch/Switch.js
CHANGED
|
@@ -36,7 +36,7 @@ export function render(_ctx, _cache) {
|
|
|
36
36
|
style: _normalizeStyle(_ctx.styleComputed.ripple)
|
|
37
37
|
}, [_createElementVNode("div", {
|
|
38
38
|
style: _normalizeStyle(_ctx.styleComputed.handle),
|
|
39
|
-
class: _normalizeClass(_ctx.classes(_ctx.n('handle'), '
|
|
39
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('handle'), _ctx.n('$-elevation--2'), [_ctx.modelValue === _ctx.activeValue, _ctx.n('handle--active')], [_ctx.errorMessage, _ctx.n('handle--error')]))
|
|
40
40
|
}, [_ctx.loading ? (_openBlock(), _createBlock(_component_var_loading, {
|
|
41
41
|
key: 0,
|
|
42
42
|
radius: _ctx.radius,
|
package/es/tab/Tab.js
CHANGED
|
@@ -12,7 +12,7 @@ export function render(_ctx, _cache) {
|
|
|
12
12
|
var _directive_ripple = _resolveDirective("ripple");
|
|
13
13
|
|
|
14
14
|
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
15
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), '
|
|
15
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), _ctx.computeColorClass(), _ctx.n("--" + _ctx.itemDirection))),
|
|
16
16
|
ref: "tabEl",
|
|
17
17
|
style: _normalizeStyle({
|
|
18
18
|
color: _ctx.computeColorStyle()
|
|
@@ -74,7 +74,7 @@ export default defineComponent({
|
|
|
74
74
|
disabled,
|
|
75
75
|
name
|
|
76
76
|
} = props;
|
|
77
|
-
return disabled ? '
|
|
77
|
+
return disabled ? n('$-tab--disabled') : active.value === name || active.value === (index == null ? void 0 : index.value) ? n('$-tab--active') : n('$-tab--inactive');
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
var handleClick = event => {
|
package/es/table/Table.js
CHANGED
|
@@ -8,7 +8,7 @@ var {
|
|
|
8
8
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from "vue";
|
|
9
9
|
export function render(_ctx, _cache) {
|
|
10
10
|
return _openBlock(), _createElementBlock("div", {
|
|
11
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), '
|
|
11
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$-elevation--1'), _ctx.n('$--box')))
|
|
12
12
|
}, [_createElementVNode("div", {
|
|
13
13
|
class: _normalizeClass(_ctx.n('main'))
|
|
14
14
|
}, [_createElementVNode("table", {
|
package/es/tabs/Tabs.js
CHANGED
|
@@ -16,11 +16,11 @@ var {
|
|
|
16
16
|
} = createNamespace('tabs');
|
|
17
17
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
18
18
|
export function render(_ctx, _cache) {
|
|
19
|
-
return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.sticky ? '
|
|
19
|
+
return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.sticky ? _ctx.n('$-sticky') : _ctx.Transition), {
|
|
20
20
|
"offset-top": _ctx.sticky ? _ctx.offsetTop : null
|
|
21
21
|
}, {
|
|
22
22
|
default: _withCtx(() => [_createElementVNode("div", _mergeProps({
|
|
23
|
-
class: _ctx.classes(_ctx.n(), '
|
|
23
|
+
class: _ctx.classes(_ctx.n(), _ctx.n('$--box'), _ctx.n("--item-" + _ctx.itemDirection), _ctx.n("--layout-" + _ctx.layoutDirection + "-padding"), [_ctx.elevation, _ctx.n('$-elevation--4')], [_ctx.fixedBottom, _ctx.n('--fixed-bottom')], [_ctx.safeArea, _ctx.n('--safe-area')]),
|
|
24
24
|
style: {
|
|
25
25
|
background: _ctx.color
|
|
26
26
|
}
|
|
@@ -25,7 +25,7 @@ export function render(_ctx, _cache) {
|
|
|
25
25
|
var _component_clock = _resolveComponent("clock");
|
|
26
26
|
|
|
27
27
|
return _openBlock(), _createElementBlock("div", {
|
|
28
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.elevation, '
|
|
28
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.elevation, _ctx.n('$-elevation--2')])),
|
|
29
29
|
ref: "picker"
|
|
30
30
|
}, [_createElementVNode("div", {
|
|
31
31
|
class: _normalizeClass(_ctx.n('title')),
|
package/es/umdIndex.js
CHANGED
|
@@ -28,6 +28,7 @@ import IndexAnchor, * as IndexAnchorModule from './index-anchor'
|
|
|
28
28
|
import IndexBar, * as IndexBarModule from './index-bar'
|
|
29
29
|
import Input, * as InputModule from './input'
|
|
30
30
|
import Lazy, * as LazyModule from './lazy'
|
|
31
|
+
import Link, * as LinkModule from './link'
|
|
31
32
|
import List, * as ListModule from './list'
|
|
32
33
|
import Loading, * as LoadingModule from './loading'
|
|
33
34
|
import Locale, * as LocaleModule from './locale'
|
|
@@ -94,6 +95,7 @@ import './index-anchor/style'
|
|
|
94
95
|
import './index-bar/style'
|
|
95
96
|
import './input/style'
|
|
96
97
|
import './lazy/style'
|
|
98
|
+
import './link/style'
|
|
97
99
|
import './list/style'
|
|
98
100
|
import './loading/style'
|
|
99
101
|
import './locale/style'
|
|
@@ -162,6 +164,7 @@ function install(app) {
|
|
|
162
164
|
IndexBar.install && app.use(IndexBar)
|
|
163
165
|
Input.install && app.use(Input)
|
|
164
166
|
Lazy.install && app.use(Lazy)
|
|
167
|
+
Link.install && app.use(Link)
|
|
165
168
|
List.install && app.use(List)
|
|
166
169
|
Loading.install && app.use(Loading)
|
|
167
170
|
Locale.install && app.use(Locale)
|
|
@@ -231,6 +234,7 @@ export {
|
|
|
231
234
|
IndexBar,
|
|
232
235
|
Input,
|
|
233
236
|
Lazy,
|
|
237
|
+
Link,
|
|
234
238
|
List,
|
|
235
239
|
Loading,
|
|
236
240
|
Locale,
|
|
@@ -300,6 +304,7 @@ export default {
|
|
|
300
304
|
IndexBar,
|
|
301
305
|
Input,
|
|
302
306
|
Lazy,
|
|
307
|
+
Link,
|
|
303
308
|
List,
|
|
304
309
|
Loading,
|
|
305
310
|
Locale,
|
package/es/uploader/Uploader.js
CHANGED
|
@@ -37,12 +37,12 @@ export function render(_ctx, _cache) {
|
|
|
37
37
|
var _directive_ripple = _resolveDirective("ripple");
|
|
38
38
|
|
|
39
39
|
return _openBlock(), _createElementBlock("div", {
|
|
40
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), '
|
|
40
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box')))
|
|
41
41
|
}, [_createElementVNode("div", {
|
|
42
42
|
class: _normalizeClass(_ctx.n('file-list'))
|
|
43
43
|
}, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.files, f => {
|
|
44
44
|
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
45
|
-
class: _normalizeClass(_ctx.classes(_ctx.n('file'), '
|
|
45
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('file'), _ctx.n('$-elevation--2'), [f.state === 'loading', _ctx.n('--loading')])),
|
|
46
46
|
key: f.id,
|
|
47
47
|
onClick: $event => _ctx.preview(f)
|
|
48
48
|
}, [_createElementVNode("div", {
|
|
@@ -84,7 +84,7 @@ export function render(_ctx, _cache) {
|
|
|
84
84
|
/* KEYED_FRAGMENT */
|
|
85
85
|
)), !_ctx.maxlength || _ctx.modelValue.length < _ctx.maxlength ? _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
86
86
|
key: 0,
|
|
87
|
-
class: _normalizeClass(_ctx.classes([!_ctx.$slots.default, _ctx.n('action') + "
|
|
87
|
+
class: _normalizeClass(_ctx.classes([!_ctx.$slots.default, _ctx.n('action') + " " + _ctx.n('$-elevation--2')], [_ctx.disabled || _ctx.formDisabled, _ctx.n('--disabled')])),
|
|
88
88
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
89
89
|
return _ctx.triggerAction && _ctx.triggerAction(...arguments);
|
|
90
90
|
})
|
package/es/utils/components.js
CHANGED
|
@@ -261,11 +261,17 @@ export function exposeApis(apis) {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
export function createNamespace(name) {
|
|
264
|
-
var namespace = "var
|
|
264
|
+
var namespace = "var";
|
|
265
|
+
var componentName = namespace + "-" + name;
|
|
265
266
|
|
|
266
267
|
var createBEM = suffix => {
|
|
267
|
-
if (!suffix) return
|
|
268
|
-
|
|
268
|
+
if (!suffix) return componentName;
|
|
269
|
+
|
|
270
|
+
if (suffix[0] === '$') {
|
|
271
|
+
return suffix.replace('$', namespace);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return suffix.startsWith('--') ? "" + componentName + suffix : componentName + "__" + suffix;
|
|
269
275
|
};
|
|
270
276
|
|
|
271
277
|
var classes = function () {
|