@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
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
},
|
|
178
178
|
"var-button/loading-radius": {
|
|
179
179
|
"type": "string | number",
|
|
180
|
-
"description": "loading 的半径,只作用于 `loading-type=\"circle\"` 时
|
|
180
|
+
"description": "loading 的半径,只作用于 `loading-type=\"circle\"` 时 默认值:-"
|
|
181
181
|
},
|
|
182
182
|
"var-button/loading-type": {
|
|
183
183
|
"type": "string",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
},
|
|
186
186
|
"var-button/loading-size": {
|
|
187
187
|
"type": "string",
|
|
188
|
-
"description": "loading 的尺寸,可选值为 `large` `normal` `small` `mini`
|
|
188
|
+
"description": "loading 的尺寸,可选值为 `large` `normal` `small` `mini` 默认值:normal"
|
|
189
189
|
},
|
|
190
190
|
"var-button/loading-color": {
|
|
191
191
|
"type": "string",
|
|
@@ -931,6 +931,42 @@
|
|
|
931
931
|
"type": "Array<(v: string) => any>",
|
|
932
932
|
"description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示 默认值:-"
|
|
933
933
|
},
|
|
934
|
+
"var-link/type": {
|
|
935
|
+
"type": "string",
|
|
936
|
+
"description": "类型,可选值为 `default` `primary` `info` `success` `warning` `danger` 默认值:default"
|
|
937
|
+
},
|
|
938
|
+
"var-link/underline": {
|
|
939
|
+
"type": "string",
|
|
940
|
+
"description": "下划线状态,可选值为 `always` `hover` `none` 默认值:always"
|
|
941
|
+
},
|
|
942
|
+
"var-link/disabled": {
|
|
943
|
+
"type": "boolean",
|
|
944
|
+
"description": "禁用状态 默认值:false"
|
|
945
|
+
},
|
|
946
|
+
"var-link/text-color": {
|
|
947
|
+
"type": "string",
|
|
948
|
+
"description": "文字颜色 默认值:-"
|
|
949
|
+
},
|
|
950
|
+
"var-link/text-size": {
|
|
951
|
+
"type": "string | number",
|
|
952
|
+
"description": "文字尺寸 默认值:-"
|
|
953
|
+
},
|
|
954
|
+
"var-link/href": {
|
|
955
|
+
"type": "string",
|
|
956
|
+
"description": "原生 `href` 属性,优先级高于 `to` 默认值:-"
|
|
957
|
+
},
|
|
958
|
+
"var-link/target": {
|
|
959
|
+
"type": "string",
|
|
960
|
+
"description": "原生 `target` 属性 默认值:-"
|
|
961
|
+
},
|
|
962
|
+
"var-link/to": {
|
|
963
|
+
"type": "string | object",
|
|
964
|
+
"description": "`router-link` `to` 属性,将会渲染为 `<router-link />` 默认值:-"
|
|
965
|
+
},
|
|
966
|
+
"var-link/replace": {
|
|
967
|
+
"type": "boolean",
|
|
968
|
+
"description": "`router-link` `replace` 属性 默认值:false"
|
|
969
|
+
},
|
|
934
970
|
"var-list/v-model:loading": {
|
|
935
971
|
"type": "boolean",
|
|
936
972
|
"description": "加载状态 默认值:false"
|
package/highlight/tags.json
CHANGED
|
@@ -346,6 +346,19 @@
|
|
|
346
346
|
"var-lazy": {
|
|
347
347
|
"attributes": []
|
|
348
348
|
},
|
|
349
|
+
"var-link": {
|
|
350
|
+
"attributes": [
|
|
351
|
+
"type",
|
|
352
|
+
"underline",
|
|
353
|
+
"disabled",
|
|
354
|
+
"text-color",
|
|
355
|
+
"text-size",
|
|
356
|
+
"href",
|
|
357
|
+
"target",
|
|
358
|
+
"to",
|
|
359
|
+
"replace"
|
|
360
|
+
]
|
|
361
|
+
},
|
|
349
362
|
"var-list": {
|
|
350
363
|
"attributes": [
|
|
351
364
|
"v-model:loading",
|
package/highlight/web-types.json
CHANGED
|
@@ -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": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
{
|
|
549
549
|
"name": "loading-radius",
|
|
550
550
|
"description": "loading 的半径,只作用于 `loading-type=\"circle\"` 时",
|
|
551
|
-
"default": "
|
|
551
|
+
"default": "-",
|
|
552
552
|
"value": {
|
|
553
553
|
"type": "string | number",
|
|
554
554
|
"kind": "expression"
|
|
@@ -565,7 +565,7 @@
|
|
|
565
565
|
},
|
|
566
566
|
{
|
|
567
567
|
"name": "loading-size",
|
|
568
|
-
"description": "loading 的尺寸,可选值为 `large` `normal` `small` `mini`
|
|
568
|
+
"description": "loading 的尺寸,可选值为 `large` `normal` `small` `mini`",
|
|
569
569
|
"default": "normal",
|
|
570
570
|
"value": {
|
|
571
571
|
"type": "string",
|
|
@@ -2768,6 +2768,104 @@
|
|
|
2768
2768
|
"events": [],
|
|
2769
2769
|
"slots": []
|
|
2770
2770
|
},
|
|
2771
|
+
{
|
|
2772
|
+
"name": "var-link",
|
|
2773
|
+
"attributes": [
|
|
2774
|
+
{
|
|
2775
|
+
"name": "type",
|
|
2776
|
+
"description": "类型,可选值为 `default` `primary` `info` `success` `warning` `danger`",
|
|
2777
|
+
"default": "default",
|
|
2778
|
+
"value": {
|
|
2779
|
+
"type": "string",
|
|
2780
|
+
"kind": "expression"
|
|
2781
|
+
}
|
|
2782
|
+
},
|
|
2783
|
+
{
|
|
2784
|
+
"name": "underline",
|
|
2785
|
+
"description": "下划线状态,可选值为 `always` `hover` `none`",
|
|
2786
|
+
"default": "always",
|
|
2787
|
+
"value": {
|
|
2788
|
+
"type": "string",
|
|
2789
|
+
"kind": "expression"
|
|
2790
|
+
}
|
|
2791
|
+
},
|
|
2792
|
+
{
|
|
2793
|
+
"name": "disabled",
|
|
2794
|
+
"description": "禁用状态",
|
|
2795
|
+
"default": "false",
|
|
2796
|
+
"value": {
|
|
2797
|
+
"type": "boolean",
|
|
2798
|
+
"kind": "expression"
|
|
2799
|
+
}
|
|
2800
|
+
},
|
|
2801
|
+
{
|
|
2802
|
+
"name": "text-color",
|
|
2803
|
+
"description": "文字颜色",
|
|
2804
|
+
"default": "-",
|
|
2805
|
+
"value": {
|
|
2806
|
+
"type": "string",
|
|
2807
|
+
"kind": "expression"
|
|
2808
|
+
}
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
"name": "text-size",
|
|
2812
|
+
"description": "文字尺寸",
|
|
2813
|
+
"default": "-",
|
|
2814
|
+
"value": {
|
|
2815
|
+
"type": "string | number",
|
|
2816
|
+
"kind": "expression"
|
|
2817
|
+
}
|
|
2818
|
+
},
|
|
2819
|
+
{
|
|
2820
|
+
"name": "href",
|
|
2821
|
+
"description": "原生 `href` 属性,优先级高于 `to`",
|
|
2822
|
+
"default": "-",
|
|
2823
|
+
"value": {
|
|
2824
|
+
"type": "string",
|
|
2825
|
+
"kind": "expression"
|
|
2826
|
+
}
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
"name": "target",
|
|
2830
|
+
"description": "原生 `target` 属性",
|
|
2831
|
+
"default": "-",
|
|
2832
|
+
"value": {
|
|
2833
|
+
"type": "string",
|
|
2834
|
+
"kind": "expression"
|
|
2835
|
+
}
|
|
2836
|
+
},
|
|
2837
|
+
{
|
|
2838
|
+
"name": "to",
|
|
2839
|
+
"description": "`router-link` `to` 属性,将会渲染为 `<router-link />`",
|
|
2840
|
+
"default": "-",
|
|
2841
|
+
"value": {
|
|
2842
|
+
"type": "string | object",
|
|
2843
|
+
"kind": "expression"
|
|
2844
|
+
}
|
|
2845
|
+
},
|
|
2846
|
+
{
|
|
2847
|
+
"name": "replace",
|
|
2848
|
+
"description": "`router-link` `replace` 属性",
|
|
2849
|
+
"default": "false",
|
|
2850
|
+
"value": {
|
|
2851
|
+
"type": "boolean",
|
|
2852
|
+
"kind": "expression"
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
],
|
|
2856
|
+
"events": [
|
|
2857
|
+
{
|
|
2858
|
+
"name": "click",
|
|
2859
|
+
"description": "点击链接时触发"
|
|
2860
|
+
}
|
|
2861
|
+
],
|
|
2862
|
+
"slots": [
|
|
2863
|
+
{
|
|
2864
|
+
"name": "default",
|
|
2865
|
+
"description": "链接内容"
|
|
2866
|
+
}
|
|
2867
|
+
]
|
|
2868
|
+
},
|
|
2771
2869
|
{
|
|
2772
2870
|
"name": "var-list",
|
|
2773
2871
|
"attributes": [
|
|
@@ -58,7 +58,7 @@ function render(_ctx, _cache) {
|
|
|
58
58
|
onRouteChange: _ctx.onRouteChange
|
|
59
59
|
}), {
|
|
60
60
|
default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
|
|
61
|
-
class: _ctx.classes(_ctx.n(), '
|
|
61
|
+
class: _ctx.classes(_ctx.n(), _ctx.n('$--box'))
|
|
62
62
|
}, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createElementVNode)("div", {
|
|
63
63
|
class: (0, _vue.normalizeClass)(_ctx.n('title'))
|
|
64
64
|
}, (0, _vue.toDisplayString)(_ctx.dt(_ctx.title, _ctx.pack.actionSheetTitle)), 3
|
package/lib/app-bar/AppBar.js
CHANGED
|
@@ -17,7 +17,7 @@ var {
|
|
|
17
17
|
|
|
18
18
|
function render(_ctx, _cache) {
|
|
19
19
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
20
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.elevation, '
|
|
20
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.elevation, _ctx.n('$-elevation--3')])),
|
|
21
21
|
style: (0, _vue.normalizeStyle)({
|
|
22
22
|
background: _ctx.color,
|
|
23
23
|
color: _ctx.textColor
|
package/lib/badge/Badge.js
CHANGED
|
@@ -31,9 +31,9 @@ function render(_ctx, _cache) {
|
|
|
31
31
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
32
32
|
|
|
33
33
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
34
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), '
|
|
34
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n('$--box')))
|
|
35
35
|
}, [(0, _vue.createVNode)(_vue.Transition, {
|
|
36
|
-
name:
|
|
36
|
+
name: _ctx.n('$-badge-fade')
|
|
37
37
|
}, {
|
|
38
38
|
default: (0, _vue.withCtx)(() => [(0, _vue.withDirectives)((0, _vue.createElementVNode)("span", (0, _vue.mergeProps)(_ctx.$attrs, {
|
|
39
39
|
class: _ctx.classes(_ctx.n('content'), ..._ctx.contentClass),
|
|
@@ -54,7 +54,9 @@ function render(_ctx, _cache) {
|
|
|
54
54
|
_: 1
|
|
55
55
|
/* STABLE */
|
|
56
56
|
|
|
57
|
-
}
|
|
57
|
+
}, 8
|
|
58
|
+
/* PROPS */
|
|
59
|
+
, ["name"]), (0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
58
60
|
/* CLASS */
|
|
59
61
|
);
|
|
60
62
|
}
|
package/lib/button/Button.js
CHANGED
|
@@ -31,7 +31,7 @@ function render(_ctx, _cache) {
|
|
|
31
31
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
32
32
|
|
|
33
33
|
return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("button", {
|
|
34
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), '
|
|
34
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n('$--box'), _ctx.n("--" + _ctx.size), [_ctx.block, _ctx.n('$--flex') + " " + _ctx.n('--block'), _ctx.n('$--inline-flex')], [_ctx.disabled, _ctx.n('--disabled')], [_ctx.text, _ctx.n("--text-" + _ctx.type) + " " + _ctx.n('--text'), _ctx.n("--" + _ctx.type) + " " + _ctx.n('$-elevation--2')], [_ctx.text && _ctx.disabled, _ctx.n('--text-disabled')], [_ctx.round, _ctx.n('--round')], [_ctx.outline, _ctx.n('--outline')])),
|
|
35
35
|
style: (0, _vue.normalizeStyle)({
|
|
36
36
|
color: _ctx.textColor,
|
|
37
37
|
background: _ctx.color
|
package/lib/button/button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --button-default-color: #f5f5f5; --button-primary-color: var(--color-primary); --button-danger-color: var(--color-danger); --button-success-color: var(--color-success); --button-warning-color: var(--color-warning); --button-info-color: var(--color-info); --button-disabled-color: var(--color-disabled); --button-disabled-text-color: var(--color-text-disabled); --button-border-radius: 4px; --button-mini-padding: 0 9px; --button-small-padding: 0 11px; --button-normal-padding: 0 15px; --button-large-padding: 0 22px; --button-round-padding: 6px; --button-mini-height: 20px; --button-small-height: 28px; --button-normal-height: 36px; --button-large-height: 44px;}.var-button { position: relative; justify-content: center; align-items: center; outline: none; border: none; border-radius: var(--button-border-radius); user-select: none; cursor: pointer; font-family: inherit; transition: box-shadow 0.2s, background-color 0.25s; will-change: box-shadow; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space: nowrap;}.var-button:active { box-shadow: 0 3px 5px -1px var(--shadow-key-umbra-opacity), 0 5px 8px 0 var(--shadow-key-penumbra-opacity), 0 1px 14px 0 var(--shadow-key-ambient-opacity);}.var-button__content { display: flex; align-items: center; flex-wrap: wrap;}.var-button__loading[var-button-cover] { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);}.var-button--default { color: inherit; background-color: var(--button-default-color);}.var-button--primary { color: #fff; background-color: var(--button-primary-color);}.var-button--info { color: #fff; background-color: var(--button-info-color);}.var-button--success { color: #fff; background-color: var(--button-success-color);}.var-button--warning { color: #fff; background-color: var(--button-warning-color);}.var-button--danger { color: #fff; background-color: var(--button-danger-color);}.var-button--disabled { background-color: var(--button-disabled-color); color: var(--button-disabled-text-color); cursor: not-allowed; box-shadow: none !important;}.var-button--block { width: 100%;}.var-button--text { background-color: transparent;}.var-button--text:active { box-shadow: none;}.var-button--text-default { color: inherit;}.var-button--text-primary { color: var(--button-primary-color);}.var-button--text-info { color: var(--button-info-color);}.var-button--text-success { color: var(--button-success-color);}.var-button--text-warning { color: var(--button-warning-color);}.var-button--text-danger { color: var(--button-danger-color);}.var-button--text-disabled { color: var(--button-disabled-text-color);}.var-button--normal { height: var(--button-normal-height); padding: var(--button-normal-padding); font-size: var(--font-size
|
|
1
|
+
:root { --button-default-color: #f5f5f5; --button-primary-color: var(--color-primary); --button-danger-color: var(--color-danger); --button-success-color: var(--color-success); --button-warning-color: var(--color-warning); --button-info-color: var(--color-info); --button-disabled-color: var(--color-disabled); --button-disabled-text-color: var(--color-text-disabled); --button-border-radius: 4px; --button-mini-padding: 0 9px; --button-small-padding: 0 11px; --button-normal-padding: 0 15px; --button-large-padding: 0 22px; --button-round-padding: 6px; --button-mini-height: 20px; --button-small-height: 28px; --button-normal-height: 36px; --button-large-height: 44px; --button-mini-font-size: var(--font-size-xs); --button-small-font-size: var(--font-size-sm); --button-normal-font-size: var(--font-size-md); --button-large-font-size: var(--font-size-lg);}.var-button { position: relative; justify-content: center; align-items: center; outline: none; border: none; border-radius: var(--button-border-radius); user-select: none; cursor: pointer; font-family: inherit; transition: box-shadow 0.2s, background-color 0.25s; will-change: box-shadow; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space: nowrap;}.var-button:active { box-shadow: 0 3px 5px -1px var(--shadow-key-umbra-opacity), 0 5px 8px 0 var(--shadow-key-penumbra-opacity), 0 1px 14px 0 var(--shadow-key-ambient-opacity);}.var-button__content { display: flex; align-items: center; flex-wrap: wrap;}.var-button__loading[var-button-cover] { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);}.var-button--default { color: inherit; background-color: var(--button-default-color);}.var-button--primary { color: #fff; background-color: var(--button-primary-color);}.var-button--info { color: #fff; background-color: var(--button-info-color);}.var-button--success { color: #fff; background-color: var(--button-success-color);}.var-button--warning { color: #fff; background-color: var(--button-warning-color);}.var-button--danger { color: #fff; background-color: var(--button-danger-color);}.var-button--disabled { background-color: var(--button-disabled-color); color: var(--button-disabled-text-color); cursor: not-allowed; box-shadow: none !important;}.var-button--block { width: 100%;}.var-button--text { background-color: transparent;}.var-button--text:active { box-shadow: none;}.var-button--text-default { color: inherit;}.var-button--text-primary { color: var(--button-primary-color);}.var-button--text-info { color: var(--button-info-color);}.var-button--text-success { color: var(--button-success-color);}.var-button--text-warning { color: var(--button-warning-color);}.var-button--text-danger { color: var(--button-danger-color);}.var-button--text-disabled { color: var(--button-disabled-text-color);}.var-button--normal { height: var(--button-normal-height); padding: var(--button-normal-padding); font-size: var(--button-normal-font-size);}.var-button--large { height: var(--button-large-height); padding: var(--button-large-padding); font-size: var(--button-large-font-size);}.var-button--small { height: var(--button-small-height); padding: var(--button-small-padding); font-size: var(--button-small-font-size);}.var-button--mini { height: var(--button-mini-height); padding: var(--button-mini-padding); font-size: var(--button-mini-font-size);}.var-button--round { padding: var(--button-round-padding); border-radius: 50%; height: auto;}.var-button--outline { border: thin solid currentColor;}.var-button--hidden { opacity: 0;}
|
package/lib/button/props.js
CHANGED
|
@@ -67,8 +67,7 @@ var props = {
|
|
|
67
67
|
default: false
|
|
68
68
|
},
|
|
69
69
|
loadingRadius: {
|
|
70
|
-
type: [Number, String]
|
|
71
|
-
default: 12
|
|
70
|
+
type: [Number, String]
|
|
72
71
|
},
|
|
73
72
|
loadingType: (0, _components.pickProps)(_props.props, 'type'),
|
|
74
73
|
loadingSize: (0, _components.pickProps)(_props.props, 'size'),
|
package/lib/card/Card.js
CHANGED
|
@@ -47,7 +47,7 @@ function render(_ctx, _cache) {
|
|
|
47
47
|
|
|
48
48
|
return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
49
49
|
ref: "card",
|
|
50
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.isRow, _ctx.n('--layout-row')], [_ctx.elevation, "
|
|
50
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.isRow, _ctx.n('--layout-row')], [_ctx.elevation, _ctx.n("$-elevation--" + _ctx.elevation), _ctx.n('$-elevation--1')])),
|
|
51
51
|
style: (0, _vue.normalizeStyle)({
|
|
52
52
|
zIndex: _ctx.floated ? _ctx.zIndex : undefined
|
|
53
53
|
}),
|
|
@@ -114,7 +114,7 @@ function render(_ctx, _cache) {
|
|
|
114
114
|
/* CLASS */
|
|
115
115
|
), _ctx.showFloatingButtons ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
116
116
|
key: 0,
|
|
117
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('floating-buttons'), '
|
|
117
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('floating-buttons'), _ctx.n('$--box'))),
|
|
118
118
|
style: (0, _vue.normalizeStyle)({
|
|
119
119
|
zIndex: _ctx.zIndex,
|
|
120
120
|
opacity: _ctx.opacity,
|
|
@@ -123,7 +123,7 @@ function render(_ctx, _cache) {
|
|
|
123
123
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "close-button", {}, () => [(0, _vue.createVNode)(_component_var_button, {
|
|
124
124
|
"var-card-cover": "",
|
|
125
125
|
round: "",
|
|
126
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('close-button'), '
|
|
126
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('close-button'), _ctx.n('$-elevation--6'))),
|
|
127
127
|
onClick: (0, _vue.withModifiers)(_ctx.close, ["stop"])
|
|
128
128
|
}, {
|
|
129
129
|
default: (0, _vue.withCtx)(() => [(0, _vue.createVNode)(_component_var_icon, {
|
package/lib/cell/Cell.js
CHANGED
|
@@ -28,7 +28,6 @@ function render(_ctx, _cache) {
|
|
|
28
28
|
key: 0,
|
|
29
29
|
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [_ctx.iconClass, _ctx.iconClass]))
|
|
30
30
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "icon", {}, () => [(0, _vue.createVNode)(_component_var_icon, {
|
|
31
|
-
class: "var--flex",
|
|
32
31
|
name: _ctx.icon
|
|
33
32
|
}, null, 8
|
|
34
33
|
/* PROPS */
|
package/lib/chip/Chip.js
CHANGED
|
@@ -23,10 +23,10 @@ function render(_ctx, _cache) {
|
|
|
23
23
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
24
24
|
|
|
25
25
|
return (0, _vue.openBlock)(), (0, _vue.createBlock)(_vue.Transition, {
|
|
26
|
-
name:
|
|
26
|
+
name: _ctx.n('$-fade')
|
|
27
27
|
}, {
|
|
28
28
|
default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("span", (0, _vue.mergeProps)({
|
|
29
|
-
class: _ctx.classes(_ctx.n(), '
|
|
29
|
+
class: _ctx.classes(_ctx.n(), _ctx.n('$--box'), ..._ctx.contentClass),
|
|
30
30
|
style: _ctx.chipStyles
|
|
31
31
|
}, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "left"), (0, _vue.createElementVNode)("span", {
|
|
32
32
|
class: (0, _vue.normalizeClass)(_ctx.n("text-" + _ctx.size))
|
|
@@ -50,7 +50,9 @@ function render(_ctx, _cache) {
|
|
|
50
50
|
_: 3
|
|
51
51
|
/* FORWARDED */
|
|
52
52
|
|
|
53
|
-
}
|
|
53
|
+
}, 8
|
|
54
|
+
/* PROPS */
|
|
55
|
+
, ["name"]);
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -90,7 +92,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
90
92
|
plain,
|
|
91
93
|
round
|
|
92
94
|
} = props;
|
|
93
|
-
var blockClass = block ? '
|
|
95
|
+
var blockClass = block ? n('$--flex') : n('$--inline-flex');
|
|
94
96
|
var plainTypeClass = plain ? n('plain') + " " + n("plain-" + type) : n("--" + type);
|
|
95
97
|
var roundClass = round ? n('--round') : null;
|
|
96
98
|
return [n("--" + size), blockClass, plainTypeClass, roundClass];
|
package/lib/chip/chip.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --chip-default-color: #e0e0e0; --chip-primary-color: var(--color-primary); --chip-danger-color: var(--color-danger); --chip-success-color: var(--color-success); --chip-warning-color: var(--color-warning); --chip-info-color: var(--color-info); --chip-border-radius: 2px; --chip-normal-height: 32px; --chip-large-height: 40px; --chip-small-height: 24px; --chip-mini-height: 16px; --chip-round-radius: 100px; --chip-normal-padding: 0 10px; --chip-large-padding: 0 17px; --chip-small-padding: 0 6px; --chip-mini-padding: 0 4px; --chip-text-normal-margin: 0 5px; --chip-text-large-margin: 0 5px; --chip-text-small-margin: 0 3px; --chip-text-mini-margin: 0 2px;}.var-fade-leave-to { opacity: 0;}.var-fade-leave-active { transition: opacity 0.3s;}.var-chip { justify-content: center; align-items: center; font-family: Roboto, sans-serif; border-radius: var(--chip-border-radius); cursor: default; border: thin solid transparent; vertical-align: middle; transition: background-color 0.25s;}.var-chip--default { color: inherit; background: var(--chip-default-color);}.var-chip--primary { color: #fff; background-color: var(--chip-primary-color);}.var-chip--info { color: #fff; background-color: var(--chip-info-color);}.var-chip--success { color: #fff; background-color: var(--chip-success-color);}.var-chip--warning { color: #fff; background-color: var(--chip-warning-color);}.var-chip--danger { color: #fff; background-color: var(--chip-danger-color);}.var-chip__plain { background-color: transparent;}.var-chip__plain:active { box-shadow: none;}.var-chip__plain-default { color: inherit; border-color: currentColor;}.var-chip__plain-primary { color: var(--chip-primary-color); border-color: currentColor;}.var-chip__plain-info { color: var(--chip-info-color); border-color: currentColor;}.var-chip__plain-success { color: var(--chip-success-color); border-color: currentColor;}.var-chip__plain-warning { color: var(--chip-warning-color); border-color: currentColor;}.var-chip__plain-danger { color: var(--chip-danger-color); border-color: currentColor;}.var-chip--round { border-radius: var(--chip-round-radius);}.var-chip--normal { font-size: var(--font-size
|
|
1
|
+
:root { --chip-default-color: #e0e0e0; --chip-primary-color: var(--color-primary); --chip-danger-color: var(--color-danger); --chip-success-color: var(--color-success); --chip-warning-color: var(--color-warning); --chip-info-color: var(--color-info); --chip-border-radius: 2px; --chip-normal-height: 32px; --chip-large-height: 40px; --chip-small-height: 24px; --chip-mini-height: 16px; --chip-round-radius: 100px; --chip-normal-padding: 0 10px; --chip-large-padding: 0 17px; --chip-small-padding: 0 6px; --chip-mini-padding: 0 4px; --chip-text-normal-margin: 0 5px; --chip-text-large-margin: 0 5px; --chip-text-small-margin: 0 3px; --chip-text-mini-margin: 0 2px; --chip-mini-font-size: var(--font-size-xs); --chip-small-font-size: var(--font-size-sm); --chip-normal-font-size: var(--font-size-md); --chip-large-font-size: var(--font-size-lg);}.var-fade-leave-to { opacity: 0;}.var-fade-leave-active { transition: opacity 0.3s;}.var-chip { justify-content: center; align-items: center; font-family: Roboto, sans-serif; border-radius: var(--chip-border-radius); cursor: default; border: thin solid transparent; vertical-align: middle; transition: background-color 0.25s;}.var-chip--default { color: inherit; background: var(--chip-default-color);}.var-chip--primary { color: #fff; background-color: var(--chip-primary-color);}.var-chip--info { color: #fff; background-color: var(--chip-info-color);}.var-chip--success { color: #fff; background-color: var(--chip-success-color);}.var-chip--warning { color: #fff; background-color: var(--chip-warning-color);}.var-chip--danger { color: #fff; background-color: var(--chip-danger-color);}.var-chip__plain { background-color: transparent;}.var-chip__plain:active { box-shadow: none;}.var-chip__plain-default { color: inherit; border-color: currentColor;}.var-chip__plain-primary { color: var(--chip-primary-color); border-color: currentColor;}.var-chip__plain-info { color: var(--chip-info-color); border-color: currentColor;}.var-chip__plain-success { color: var(--chip-success-color); border-color: currentColor;}.var-chip__plain-warning { color: var(--chip-warning-color); border-color: currentColor;}.var-chip__plain-danger { color: var(--chip-danger-color); border-color: currentColor;}.var-chip--round { border-radius: var(--chip-round-radius);}.var-chip--normal { font-size: var(--chip-normal-font-size); padding: var(--chip-normal-padding); height: var(--chip-normal-height);}.var-chip--large { padding: var(--chip-large-padding); font-size: var(--chip-large-font-size); height: var(--chip-large-height);}.var-chip--small { padding: var(--chip-small-padding); font-size: var(--chip-small-font-size); height: var(--chip-small-height);}.var-chip--mini { padding: var(--chip-mini-padding); font-size: var(--chip-mini-font-size); height: var(--chip-mini-height);}.var-chip--close { cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-chip__text-large { margin: var(--chip-text-large-margin);}.var-chip__text-normal { margin: var(--chip-text-normal-margin);}.var-chip__text-small { margin: var(--chip-text-small-margin);}.var-chip__text-mini { margin: var(--chip-text-mini-margin);}
|
package/lib/col/Col.js
CHANGED
|
@@ -23,7 +23,7 @@ var {
|
|
|
23
23
|
|
|
24
24
|
function render(_ctx, _cache) {
|
|
25
25
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
26
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), '
|
|
26
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n('$--box'), [_ctx.span >= 0, _ctx.n("--span-" + _ctx.span)], [_ctx.offset, _ctx.n("--offset-" + _ctx.offset)], ..._ctx.getSize('xs', _ctx.xs), ..._ctx.getSize('sm', _ctx.sm), ..._ctx.getSize('md', _ctx.md), ..._ctx.getSize('lg', _ctx.lg), ..._ctx.getSize('xl', _ctx.xl))),
|
|
27
27
|
style: (0, _vue.normalizeStyle)({
|
|
28
28
|
flexDirection: _ctx.direction,
|
|
29
29
|
paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
|
package/lib/counter/Counter.js
CHANGED
|
@@ -45,9 +45,9 @@ function render(_ctx, _cache) {
|
|
|
45
45
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
46
46
|
|
|
47
47
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
48
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), '
|
|
48
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n('$--box')))
|
|
49
49
|
}, [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
|
|
50
|
-
class: _ctx.classes(_ctx.n('controller'), '
|
|
50
|
+
class: _ctx.classes(_ctx.n('controller'), _ctx.n('$-elevation--2'), [_ctx.disabled || _ctx.formDisabled, _ctx.n('--disabled')], [_ctx.errorMessage, _ctx.n('--error')]),
|
|
51
51
|
style: {
|
|
52
52
|
background: _ctx.color ? _ctx.color : undefined
|
|
53
53
|
}
|
|
@@ -41,7 +41,7 @@ function render(_ctx, _cache) {
|
|
|
41
41
|
var _component_day_picker_panel = (0, _vue.resolveComponent)("day-picker-panel");
|
|
42
42
|
|
|
43
43
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
44
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.elevation, '
|
|
44
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.elevation, _ctx.n('$-elevation--2')]))
|
|
45
45
|
}, [(0, _vue.createElementVNode)("div", {
|
|
46
46
|
class: (0, _vue.normalizeClass)(_ctx.n('title')),
|
|
47
47
|
style: (0, _vue.normalizeStyle)({
|
package/lib/dialog/Dialog.js
CHANGED
|
@@ -52,7 +52,7 @@ function render(_ctx, _cache) {
|
|
|
52
52
|
onClickOverlay: _ctx.handleClickOverlay
|
|
53
53
|
}, {
|
|
54
54
|
default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
|
|
55
|
-
class: _ctx.classes('
|
|
55
|
+
class: _ctx.classes(_ctx.n('$--box'), _ctx.n(), _ctx.dialogClass),
|
|
56
56
|
style: _extends({
|
|
57
57
|
width: _ctx.toSizeUnit(_ctx.width)
|
|
58
58
|
}, _ctx.dialogStyle)
|
package/lib/divider/Divider.js
CHANGED
|
@@ -23,7 +23,7 @@ var {
|
|
|
23
23
|
|
|
24
24
|
function render(_ctx, _cache) {
|
|
25
25
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
26
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), '
|
|
26
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n('$--box'), [_ctx.vertical, _ctx.n('--vertical')], [_ctx.withText, _ctx.n('--with-text')], [_ctx.isInset, _ctx.n('--inset')], [_ctx.dashed, _ctx.n('--dashed')], [_ctx.hairline, _ctx.n('--hairline')])),
|
|
27
27
|
style: (0, _vue.normalizeStyle)(_ctx.style)
|
|
28
28
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [_ctx.description ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", {
|
|
29
29
|
key: 0,
|
package/lib/image/Image.js
CHANGED
|
@@ -34,7 +34,7 @@ function render(_ctx, _cache) {
|
|
|
34
34
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
35
35
|
|
|
36
36
|
return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
37
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), '
|
|
37
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n('$--box'), [!_ctx.block, _ctx.n('$--inline-block')])),
|
|
38
38
|
style: (0, _vue.normalizeStyle)({
|
|
39
39
|
width: _ctx.toSizeUnit(_ctx.width),
|
|
40
40
|
height: _ctx.toSizeUnit(_ctx.height),
|
|
@@ -47,7 +47,7 @@ function render(_ctx, _cache) {
|
|
|
47
47
|
return (0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_popup, {
|
|
48
48
|
class: (0, _vue.normalizeClass)(_ctx.n('popup')),
|
|
49
49
|
"var-image-preview-cover": "",
|
|
50
|
-
transition:
|
|
50
|
+
transition: _ctx.n('$-fade'),
|
|
51
51
|
show: _ctx.popupShow,
|
|
52
52
|
overlay: false,
|
|
53
53
|
"close-on-click-overlay": false,
|
|
@@ -146,7 +146,7 @@ function render(_ctx, _cache) {
|
|
|
146
146
|
|
|
147
147
|
}, 8
|
|
148
148
|
/* PROPS */
|
|
149
|
-
, ["class", "show", "lock-scroll", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange"]);
|
|
149
|
+
, ["class", "transition", "show", "lock-scroll", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange"]);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -267,7 +267,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
267
267
|
var {
|
|
268
268
|
naturalWidth,
|
|
269
269
|
naturalHeight
|
|
270
|
-
} = target.querySelector('
|
|
270
|
+
} = target.querySelector("." + n('image'));
|
|
271
271
|
return {
|
|
272
272
|
width: offsetWidth,
|
|
273
273
|
height: offsetHeight,
|
|
@@ -22,7 +22,7 @@ var {
|
|
|
22
22
|
} = (0, _components.createNamespace)('index-anchor');
|
|
23
23
|
|
|
24
24
|
function render(_ctx, _cache) {
|
|
25
|
-
return (0, _vue.openBlock)(), (0, _vue.createBlock)((0, _vue.resolveDynamicComponent)(_ctx.sticky ? '
|
|
25
|
+
return (0, _vue.openBlock)(), (0, _vue.createBlock)((0, _vue.resolveDynamicComponent)(_ctx.sticky ? _ctx.n('$-sticky') : _ctx.Transition), {
|
|
26
26
|
"offset-top": _ctx.sticky ? _ctx.stickyOffsetTop : null,
|
|
27
27
|
"z-index": _ctx.sticky ? _ctx.zIndex : null,
|
|
28
28
|
disabled: _ctx.disabled && !_ctx.cssMode,
|
package/lib/index.js
CHANGED
|
@@ -28,6 +28,7 @@ var IndexAnchor = require('./index-anchor')['default']
|
|
|
28
28
|
var IndexBar = require('./index-bar')['default']
|
|
29
29
|
var Input = require('./input')['default']
|
|
30
30
|
var Lazy = require('./lazy')['default']
|
|
31
|
+
var Link = require('./link')['default']
|
|
31
32
|
var List = require('./list')['default']
|
|
32
33
|
var Loading = require('./loading')['default']
|
|
33
34
|
var Locale = require('./locale')['default']
|
|
@@ -96,6 +97,7 @@ function install(app) {
|
|
|
96
97
|
IndexBar.install && app.use(IndexBar)
|
|
97
98
|
Input.install && app.use(Input)
|
|
98
99
|
Lazy.install && app.use(Lazy)
|
|
100
|
+
Link.install && app.use(Link)
|
|
99
101
|
List.install && app.use(List)
|
|
100
102
|
Loading.install && app.use(Loading)
|
|
101
103
|
Locale.install && app.use(Locale)
|
|
@@ -166,6 +168,7 @@ module.exports = {
|
|
|
166
168
|
IndexBar,
|
|
167
169
|
Input,
|
|
168
170
|
Lazy,
|
|
171
|
+
Link,
|
|
169
172
|
List,
|
|
170
173
|
Loading,
|
|
171
174
|
Locale,
|
package/lib/input/Input.js
CHANGED
|
@@ -37,7 +37,7 @@ function render(_ctx, _cache) {
|
|
|
37
37
|
var _component_var_form_details = (0, _vue.resolveComponent)("var-form-details");
|
|
38
38
|
|
|
39
39
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
40
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), '
|
|
40
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n('$--box'), [_ctx.disabled, _ctx.n('--disabled')])),
|
|
41
41
|
onClick: _cache[10] || (_cache[10] = function () {
|
|
42
42
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
43
43
|
})
|
|
@@ -122,7 +122,7 @@ function render(_ctx, _cache) {
|
|
|
122
122
|
}, null, 46
|
|
123
123
|
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
124
124
|
, _hoisted_2)), (0, _vue.createElementVNode)("label", {
|
|
125
|
-
class: (0, _vue.normalizeClass)(_ctx.classes('
|
|
125
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('$--ellipsis'), [_ctx.isFocus, _ctx.n('--focus')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')], [_ctx.errorMessage, _ctx.n('--error')], [_ctx.textarea, _ctx.n('textarea-placeholder'), _ctx.n('placeholder')], _ctx.computePlaceholderState(), [!_ctx.hint, _ctx.n('--placeholder-non-hint')])),
|
|
126
126
|
style: (0, _vue.normalizeStyle)({
|
|
127
127
|
color: !_ctx.errorMessage ? _ctx.isFocus ? _ctx.focusColor : _ctx.blurColor : undefined
|
|
128
128
|
}),
|
package/lib/link/Link.js
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
exports.render = render;
|
|
6
|
+
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
|
|
9
|
+
var _props = require("./props");
|
|
10
|
+
|
|
11
|
+
var _components = require("../utils/components");
|
|
12
|
+
|
|
13
|
+
var _elements = require("../utils/elements");
|
|
14
|
+
|
|
15
|
+
var {
|
|
16
|
+
n,
|
|
17
|
+
classes
|
|
18
|
+
} = (0, _components.createNamespace)('link');
|
|
19
|
+
|
|
20
|
+
function render(_ctx, _cache) {
|
|
21
|
+
return (0, _vue.openBlock)(), (0, _vue.createBlock)((0, _vue.resolveDynamicComponent)(_ctx.tag), (0, _vue.mergeProps)(_ctx.linkProps, {
|
|
22
|
+
class: _ctx.classes(_ctx.n(), _ctx.n('$--box'), _ctx.n('$--inline-flex'), _ctx.n("--" + _ctx.type), [_ctx.underline !== 'none', _ctx.n("--underline-" + _ctx.underline)], [_ctx.disabled, _ctx.n('--disabled')]),
|
|
23
|
+
style: {
|
|
24
|
+
color: _ctx.textColor,
|
|
25
|
+
fontSize: _ctx.toSizeUnit(_ctx.textSize)
|
|
26
|
+
},
|
|
27
|
+
onClick: _ctx.handleClick
|
|
28
|
+
}), {
|
|
29
|
+
default: (0, _vue.withCtx)(() => [(0, _vue.renderSlot)(_ctx.$slots, "default")]),
|
|
30
|
+
_: 3
|
|
31
|
+
/* FORWARDED */
|
|
32
|
+
|
|
33
|
+
}, 16
|
|
34
|
+
/* FULL_PROPS */
|
|
35
|
+
, ["class", "style", "onClick"]);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
var _default = (0, _vue.defineComponent)({
|
|
39
|
+
render,
|
|
40
|
+
name: 'VarLink',
|
|
41
|
+
props: _props.props,
|
|
42
|
+
|
|
43
|
+
setup(props) {
|
|
44
|
+
var tag = (0, _vue.computed)(() => {
|
|
45
|
+
if (props.disabled) {
|
|
46
|
+
return 'span';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (props.href) {
|
|
50
|
+
return 'a';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (props.to) {
|
|
54
|
+
return 'router-link';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return 'a';
|
|
58
|
+
});
|
|
59
|
+
var linkProps = (0, _vue.computed)(() => {
|
|
60
|
+
var {
|
|
61
|
+
disabled,
|
|
62
|
+
href,
|
|
63
|
+
target,
|
|
64
|
+
to,
|
|
65
|
+
replace
|
|
66
|
+
} = props;
|
|
67
|
+
|
|
68
|
+
if (disabled) {
|
|
69
|
+
return {};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (href) {
|
|
73
|
+
return {
|
|
74
|
+
href,
|
|
75
|
+
target
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (to) {
|
|
80
|
+
return {
|
|
81
|
+
to,
|
|
82
|
+
target,
|
|
83
|
+
replace
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {};
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
var handleClick = e => {
|
|
91
|
+
var {
|
|
92
|
+
disabled,
|
|
93
|
+
onClick
|
|
94
|
+
} = props;
|
|
95
|
+
|
|
96
|
+
if (disabled) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
(0, _components.call)(onClick, e);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
n,
|
|
105
|
+
classes,
|
|
106
|
+
tag,
|
|
107
|
+
linkProps,
|
|
108
|
+
handleClick,
|
|
109
|
+
toSizeUnit: _elements.toSizeUnit
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
exports.default = _default;
|
|
File without changes
|