@varlet/ui 1.26.8 → 1.27.0-alpha.1649242923701
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 +29 -27
- package/es/app-bar/AppBar.js +32 -27
- package/es/back-top/BackTop.js +9 -2
- package/es/badge/Badge.js +22 -14
- package/es/bottom-navigation/BottomNavigation.js +167 -0
- package/es/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/es/bottom-navigation/bottomNavigation.css +1 -0
- package/es/bottom-navigation/bottomNavigation.less +49 -0
- package/es/bottom-navigation/index.js +8 -0
- package/es/bottom-navigation/props.js +40 -0
- package/es/bottom-navigation/provide.js +17 -0
- package/es/bottom-navigation/style/index.js +4 -0
- package/es/bottom-navigation/style/less.js +4 -0
- package/es/bottom-navigation-item/BottomNavigationItem.js +122 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/es/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/es/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/es/bottom-navigation-item/index.js +8 -0
- package/es/bottom-navigation-item/props.js +22 -0
- package/es/bottom-navigation-item/provide.js +21 -0
- package/es/bottom-navigation-item/style/index.js +6 -0
- package/es/bottom-navigation-item/style/less.js +6 -0
- package/es/button/Button.js +12 -5
- package/es/card/Card.js +33 -28
- package/es/cell/Cell.js +26 -15
- package/es/checkbox/Checkbox.js +28 -26
- package/es/checkbox-group/CheckboxGroup.js +21 -25
- package/es/chip/Chip.js +16 -7
- package/es/chip/chip.css +1 -1
- package/es/chip/chip.less +11 -11
- package/es/col/Col.js +12 -5
- package/es/collapse/Collapse.js +15 -12
- package/es/collapse-item/CollapseItem.js +31 -30
- package/es/collapse-item/collapseItem.css +1 -1
- package/es/collapse-item/collapseItem.less +16 -16
- package/es/countdown/Countdown.js +14 -11
- package/es/counter/Counter.js +30 -27
- package/es/date-picker/DatePicker.js +28 -23
- package/es/date-picker/date-picker.css +1 -1
- package/es/date-picker/date-picker.less +22 -20
- package/es/date-picker/src/day-picker-panel.js +41 -34
- package/es/date-picker/src/month-picker-panel.js +27 -21
- package/es/date-picker/src/panel-header.js +16 -11
- package/es/date-picker/src/year-picker-panel.js +17 -9
- package/es/dialog/Dialog.js +36 -40
- package/es/divider/Divider.js +16 -12
- package/es/form/Form.js +11 -8
- package/es/form-details/FormDetails.js +27 -22
- package/es/icon/Icon.js +8 -1
- package/es/icon/icon.css +1 -1
- package/es/image/Image.js +19 -12
- package/es/image-preview/ImagePreview.js +35 -34
- package/es/index-anchor/IndexAnchor.js +8 -1
- package/es/index-bar/IndexBar.js +22 -20
- package/es/index.js +10 -0
- package/es/input/Input.js +45 -44
- package/es/lazy/index.js +2 -1
- package/es/less.js +2 -0
- package/es/list/List.js +39 -38
- package/es/loading/Loading.js +31 -23
- package/es/loading/loading.css +1 -1
- package/es/loading/loading.less +32 -32
- package/es/menu/Menu.js +12 -10
- package/es/option/Option.js +16 -11
- package/es/pagination/Pagination.js +34 -44
- package/es/pagination/pagination.css +1 -1
- package/es/pagination/pagination.less +8 -8
- package/es/picker/Picker.js +51 -47
- package/es/popup/Popup.js +9 -5
- package/es/progress/Progress.js +44 -35
- package/es/progress/progress.css +1 -1
- package/es/progress/progress.less +12 -12
- package/es/pull-refresh/PullRefresh.js +13 -10
- package/es/radio/Radio.js +25 -25
- package/es/radio-group/RadioGroup.js +19 -19
- package/es/rate/Rate.js +27 -25
- package/es/ripple/index.js +6 -2
- package/es/row/Row.js +11 -4
- package/es/select/Select.js +53 -54
- package/es/skeleton/Skeleton.js +70 -81
- package/es/slider/Slider.js +44 -40
- package/es/slider/slider.css +1 -1
- package/es/slider/slider.less +5 -5
- package/es/snackbar/Snackbar.js +9 -5
- package/es/snackbar/core.js +20 -26
- package/es/snackbar/snackbar.css +1 -1
- package/es/snackbar/snackbar.less +66 -68
- package/es/space/Space.js +8 -3
- package/es/step/Step.js +25 -23
- package/es/step/step.css +1 -1
- package/es/step/step.less +10 -10
- package/es/steps/Steps.js +12 -5
- package/es/sticky/Sticky.js +14 -7
- package/es/style-provider/StyleProvider.js +6 -2
- package/es/style.css +1 -1
- package/es/style.js +2 -0
- package/es/swipe/Swipe.js +22 -16
- package/es/swipe-item/SwipeItem.js +9 -4
- package/es/switch/Switch.js +25 -23
- package/es/switch/switch.css +1 -1
- package/es/switch/switch.less +2 -2
- package/es/tab/Tab.js +8 -1
- package/es/tab-item/TabItem.js +8 -1
- package/es/table/Table.js +27 -20
- package/es/tabs/Tabs.js +16 -11
- package/es/tabs-items/TabsItems.js +10 -5
- package/es/themes/dark/bottomNavigation.js +4 -0
- package/es/themes/dark/bottomNavigationItem.js +3 -0
- package/es/themes/dark/index.js +3 -1
- package/es/time-picker/TimePicker.js +47 -38
- package/es/time-picker/clock.js +26 -22
- package/es/time-picker/timePicker.css +1 -1
- package/es/time-picker/timePicker.less +11 -11
- package/es/umdIndex.js +10 -0
- package/es/uploader/Uploader.js +62 -57
- package/es/utils/components.js +35 -0
- package/es/varlet.esm.js +2082 -1527
- package/highlight/attributes.json +48 -0
- package/highlight/tags.json +20 -0
- package/highlight/web-types.json +155 -1
- package/lib/action-sheet/ActionSheet.js +30 -26
- package/lib/app-bar/AppBar.js +31 -24
- package/lib/back-top/BackTop.js +11 -2
- package/lib/badge/Badge.js +23 -13
- package/lib/bottom-navigation/BottomNavigation.js +183 -0
- package/lib/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/lib/bottom-navigation/bottomNavigation.css +1 -0
- package/lib/bottom-navigation/bottomNavigation.less +49 -0
- package/lib/bottom-navigation/index.js +17 -0
- package/lib/bottom-navigation/props.js +45 -0
- package/lib/bottom-navigation/provide.js +27 -0
- package/lib/bottom-navigation/style/index.js +4 -0
- package/lib/bottom-navigation/style/less.js +4 -0
- package/lib/bottom-navigation-item/BottomNavigationItem.js +140 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/lib/bottom-navigation-item/index.js +17 -0
- package/lib/bottom-navigation-item/props.js +27 -0
- package/lib/bottom-navigation-item/provide.js +28 -0
- package/lib/bottom-navigation-item/style/index.js +6 -0
- package/lib/bottom-navigation-item/style/less.js +6 -0
- package/lib/button/Button.js +13 -4
- package/lib/card/Card.js +34 -27
- package/lib/cell/Cell.js +26 -13
- package/lib/checkbox/Checkbox.js +26 -23
- package/lib/checkbox-group/CheckboxGroup.js +19 -22
- package/lib/chip/Chip.js +18 -7
- package/lib/chip/chip.css +1 -1
- package/lib/chip/chip.less +11 -11
- package/lib/col/Col.js +14 -5
- package/lib/collapse/Collapse.js +15 -10
- package/lib/collapse-item/CollapseItem.js +31 -28
- package/lib/collapse-item/collapseItem.css +1 -1
- package/lib/collapse-item/collapseItem.less +16 -16
- package/lib/countdown/Countdown.js +14 -10
- package/lib/counter/Counter.js +29 -26
- package/lib/date-picker/DatePicker.js +30 -23
- package/lib/date-picker/date-picker.css +1 -1
- package/lib/date-picker/date-picker.less +22 -20
- package/lib/date-picker/src/day-picker-panel.js +41 -32
- package/lib/date-picker/src/month-picker-panel.js +27 -19
- package/lib/date-picker/src/panel-header.js +16 -9
- package/lib/date-picker/src/year-picker-panel.js +19 -9
- package/lib/dialog/Dialog.js +36 -38
- package/lib/divider/Divider.js +16 -10
- package/lib/form/Form.js +11 -6
- package/lib/form-details/FormDetails.js +27 -20
- package/lib/icon/Icon.js +10 -1
- package/lib/icon/icon.css +1 -1
- package/lib/image/Image.js +20 -11
- package/lib/image-preview/ImagePreview.js +35 -33
- package/lib/index-anchor/IndexAnchor.js +10 -1
- package/lib/index-bar/IndexBar.js +24 -20
- package/lib/index.js +6 -0
- package/lib/input/Input.js +45 -43
- package/lib/lazy/index.js +3 -1
- package/lib/less.js +2 -0
- package/lib/list/List.js +39 -36
- package/lib/loading/Loading.js +33 -23
- package/lib/loading/loading.css +1 -1
- package/lib/loading/loading.less +32 -32
- package/lib/menu/Menu.js +12 -9
- package/lib/option/Option.js +16 -9
- package/lib/pagination/Pagination.js +36 -44
- package/lib/pagination/pagination.css +1 -1
- package/lib/pagination/pagination.less +8 -8
- package/lib/picker/Picker.js +51 -46
- package/lib/popup/Popup.js +9 -4
- package/lib/progress/Progress.js +45 -34
- package/lib/progress/progress.css +1 -1
- package/lib/progress/progress.less +12 -12
- package/lib/pull-refresh/PullRefresh.js +14 -10
- package/lib/radio/Radio.js +23 -22
- package/lib/radio-group/RadioGroup.js +17 -16
- package/lib/rate/Rate.js +27 -24
- package/lib/ripple/index.js +7 -2
- package/lib/row/Row.js +12 -3
- package/lib/select/Select.js +53 -53
- package/lib/skeleton/Skeleton.js +69 -78
- package/lib/slider/Slider.js +42 -38
- package/lib/slider/slider.css +1 -1
- package/lib/slider/slider.less +5 -5
- package/lib/snackbar/Snackbar.js +9 -4
- package/lib/snackbar/core.js +20 -25
- package/lib/snackbar/snackbar.css +1 -1
- package/lib/snackbar/snackbar.less +66 -68
- package/lib/space/Space.js +9 -3
- package/lib/step/Step.js +26 -22
- package/lib/step/step.css +1 -1
- package/lib/step/step.less +10 -10
- package/lib/steps/Steps.js +13 -4
- package/lib/sticky/Sticky.js +15 -6
- package/lib/style-provider/StyleProvider.js +8 -2
- package/lib/style.css +1 -1
- package/lib/style.js +2 -0
- package/lib/swipe/Swipe.js +23 -16
- package/lib/swipe-item/SwipeItem.js +10 -3
- package/lib/switch/Switch.js +23 -20
- package/lib/switch/switch.css +1 -1
- package/lib/switch/switch.less +2 -2
- package/lib/tab/Tab.js +10 -1
- package/lib/tab-item/TabItem.js +10 -1
- package/lib/table/Table.js +27 -18
- package/lib/tabs/Tabs.js +18 -11
- package/lib/tabs-items/TabsItems.js +11 -4
- package/lib/themes/dark/bottomNavigation.js +9 -0
- package/lib/themes/dark/bottomNavigationItem.js +8 -0
- package/lib/themes/dark/index.js +5 -1
- package/lib/time-picker/TimePicker.js +49 -38
- package/lib/time-picker/clock.js +26 -20
- package/lib/time-picker/timePicker.css +1 -1
- package/lib/time-picker/timePicker.less +11 -11
- package/lib/uploader/Uploader.js +60 -55
- package/lib/utils/components.js +39 -0
- package/package.json +4 -4
- package/types/bottomNavigation.d.ts +19 -0
- package/types/bottomNavigationItem.d.ts +16 -0
- package/types/global.d.ts +2 -0
- package/types/index.d.ts +2 -0
- package/umd/varlet.js +4 -4
package/lib/button/Button.js
CHANGED
|
@@ -12,8 +12,15 @@ var _vue = require("vue");
|
|
|
12
12
|
|
|
13
13
|
var _props = require("./props");
|
|
14
14
|
|
|
15
|
+
var _components = require("../utils/components");
|
|
16
|
+
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
18
|
|
|
19
|
+
var {
|
|
20
|
+
n,
|
|
21
|
+
classes
|
|
22
|
+
} = (0, _components.createNamespace)('button');
|
|
23
|
+
|
|
17
24
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
18
25
|
|
|
19
26
|
var _hoisted_1 = ["disabled"];
|
|
@@ -24,7 +31,7 @@ function render(_ctx, _cache) {
|
|
|
24
31
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
25
32
|
|
|
26
33
|
return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("button", {
|
|
27
|
-
class: (0, _vue.normalizeClass)(
|
|
34
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box', _ctx.n("--" + _ctx.size), [_ctx.block, "var--flex " + _ctx.n('--block'), 'var--inline-flex'], [_ctx.disabled, _ctx.n('--disabled')], [_ctx.text, _ctx.n("--text-" + _ctx.type) + " " + _ctx.n('--text'), _ctx.n("--" + _ctx.type) + " var-elevation--2"], [_ctx.text && _ctx.disabled, _ctx.n('--text-disabled')], [_ctx.round, _ctx.n('--round')], [_ctx.outline, _ctx.n('--outline')])),
|
|
28
35
|
style: (0, _vue.normalizeStyle)({
|
|
29
36
|
color: _ctx.textColor,
|
|
30
37
|
background: _ctx.color
|
|
@@ -38,15 +45,15 @@ function render(_ctx, _cache) {
|
|
|
38
45
|
})
|
|
39
46
|
}, [_ctx.loading || _ctx.pending ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_loading, {
|
|
40
47
|
key: 0,
|
|
41
|
-
class:
|
|
48
|
+
class: (0, _vue.normalizeClass)(_ctx.n('loading')),
|
|
42
49
|
"var-button-cover": "",
|
|
43
50
|
type: _ctx.loadingType,
|
|
44
51
|
size: _ctx.loadingSize,
|
|
45
52
|
radius: _ctx.loadingRadius
|
|
46
53
|
}, null, 8
|
|
47
54
|
/* PROPS */
|
|
48
|
-
, ["type", "size", "radius"])) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
|
|
49
|
-
class: (0, _vue.normalizeClass)(
|
|
55
|
+
, ["class", "type", "size", "radius"])) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
|
|
56
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('content'), [_ctx.loading || _ctx.pending, _ctx.n('--hidden')]))
|
|
50
57
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
51
58
|
/* CLASS */
|
|
52
59
|
)], 46
|
|
@@ -108,6 +115,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
108
115
|
};
|
|
109
116
|
|
|
110
117
|
return {
|
|
118
|
+
n,
|
|
119
|
+
classes,
|
|
111
120
|
pending,
|
|
112
121
|
handleClick,
|
|
113
122
|
handleTouchstart
|
package/lib/card/Card.js
CHANGED
|
@@ -12,54 +12,59 @@ var _props = require("./props");
|
|
|
12
12
|
|
|
13
13
|
var _elements = require("../utils/elements");
|
|
14
14
|
|
|
15
|
+
var _components = require("../utils/components");
|
|
16
|
+
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
18
|
|
|
19
|
+
var {
|
|
20
|
+
n,
|
|
21
|
+
classes
|
|
22
|
+
} = (0, _components.createNamespace)('card');
|
|
23
|
+
|
|
17
24
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
18
25
|
|
|
19
26
|
var _hoisted_1 = ["src", "alt"];
|
|
20
|
-
var _hoisted_2 = {
|
|
21
|
-
key: 0,
|
|
22
|
-
class: "var-card__title"
|
|
23
|
-
};
|
|
24
|
-
var _hoisted_3 = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "var-card__subtitle"
|
|
27
|
-
};
|
|
28
|
-
var _hoisted_4 = {
|
|
29
|
-
key: 0,
|
|
30
|
-
class: "var-card__description"
|
|
31
|
-
};
|
|
32
|
-
var _hoisted_5 = {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "var-card__footer"
|
|
35
|
-
};
|
|
36
27
|
|
|
37
28
|
function render(_ctx, _cache) {
|
|
38
29
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
39
30
|
|
|
40
31
|
return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
41
|
-
class: (0, _vue.normalizeClass)(
|
|
32
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.elevation, "var-elevation--" + _ctx.elevation, 'var-elevation--2'])),
|
|
42
33
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
43
34
|
return _ctx.onClick && _ctx.onClick(...arguments);
|
|
44
35
|
})
|
|
45
36
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "image", {}, () => [_ctx.src ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("img", {
|
|
46
37
|
key: 0,
|
|
47
|
-
class:
|
|
38
|
+
class: (0, _vue.normalizeClass)(_ctx.n('image')),
|
|
48
39
|
style: (0, _vue.normalizeStyle)({
|
|
49
40
|
objectFit: _ctx.fit,
|
|
50
41
|
height: _ctx.toSizeUnit(_ctx.height)
|
|
51
42
|
}),
|
|
52
43
|
src: _ctx.src,
|
|
53
44
|
alt: _ctx.alt
|
|
54
|
-
}, null,
|
|
55
|
-
/* STYLE, PROPS */
|
|
56
|
-
, _hoisted_1)) : (0, _vue.createCommentVNode)("v-if", true)]), (0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [_ctx.title ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
}, null, 14
|
|
46
|
+
/* CLASS, STYLE, PROPS */
|
|
47
|
+
, _hoisted_1)) : (0, _vue.createCommentVNode)("v-if", true)]), (0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [_ctx.title ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: (0, _vue.normalizeClass)(_ctx.n('title'))
|
|
50
|
+
}, (0, _vue.toDisplayString)(_ctx.title), 3
|
|
51
|
+
/* TEXT, CLASS */
|
|
52
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)]), (0, _vue.renderSlot)(_ctx.$slots, "subtitle", {}, () => [_ctx.subtitle ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: (0, _vue.normalizeClass)(_ctx.n('subtitle'))
|
|
55
|
+
}, (0, _vue.toDisplayString)(_ctx.subtitle), 3
|
|
56
|
+
/* TEXT, CLASS */
|
|
57
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)]), (0, _vue.renderSlot)(_ctx.$slots, "description", {}, () => [_ctx.description ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: (0, _vue.normalizeClass)(_ctx.n('description'))
|
|
60
|
+
}, (0, _vue.toDisplayString)(_ctx.description), 3
|
|
61
|
+
/* TEXT, CLASS */
|
|
62
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)]), _ctx.$slots.extra ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: (0, _vue.normalizeClass)(_ctx.n('footer'))
|
|
65
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "extra")], 2
|
|
66
|
+
/* CLASS */
|
|
67
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
63
68
|
/* CLASS */
|
|
64
69
|
)), [[_directive_ripple, {
|
|
65
70
|
disabled: !_ctx.ripple
|
|
@@ -76,6 +81,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
76
81
|
|
|
77
82
|
setup() {
|
|
78
83
|
return {
|
|
84
|
+
n,
|
|
85
|
+
classes,
|
|
79
86
|
toSizeUnit: _elements.toSizeUnit
|
|
80
87
|
};
|
|
81
88
|
}
|
package/lib/cell/Cell.js
CHANGED
|
@@ -10,22 +10,23 @@ var _props = require("./props");
|
|
|
10
10
|
|
|
11
11
|
var _icon = _interopRequireDefault(require("../icon"));
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
var _components = require("../utils/components");
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
var {
|
|
18
|
+
n,
|
|
19
|
+
classes
|
|
20
|
+
} = (0, _components.createNamespace)('cell');
|
|
20
21
|
|
|
21
22
|
function render(_ctx, _cache) {
|
|
22
23
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
23
24
|
|
|
24
25
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
25
|
-
class: (0, _vue.normalizeClass)(
|
|
26
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.border, _ctx.n('--border')]))
|
|
26
27
|
}, [_ctx.$slots.icon || _ctx.icon ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
27
28
|
key: 0,
|
|
28
|
-
class: (0, _vue.normalizeClass)(
|
|
29
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [_ctx.iconClass, _ctx.iconClass]))
|
|
29
30
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "icon", {}, () => [(0, _vue.createVNode)(_component_var_icon, {
|
|
30
31
|
class: "var--flex",
|
|
31
32
|
name: _ctx.icon
|
|
@@ -33,22 +34,26 @@ function render(_ctx, _cache) {
|
|
|
33
34
|
/* PROPS */
|
|
34
35
|
, ["name"])])], 2
|
|
35
36
|
/* CLASS */
|
|
36
|
-
)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div",
|
|
37
|
-
class: (0, _vue.normalizeClass)(
|
|
37
|
+
)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
|
|
38
|
+
class: (0, _vue.normalizeClass)(_ctx.n('content'))
|
|
39
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
40
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('title'), [_ctx.titleClass, _ctx.titleClass]))
|
|
38
41
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.title), 1
|
|
39
42
|
/* TEXT */
|
|
40
43
|
)])], 2
|
|
41
44
|
/* CLASS */
|
|
42
45
|
), _ctx.$slots.desc || _ctx.desc ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
43
46
|
key: 0,
|
|
44
|
-
class: (0, _vue.normalizeClass)(
|
|
47
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('desc'), [_ctx.descClass, _ctx.descClass]))
|
|
45
48
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "desc", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.desc), 1
|
|
46
49
|
/* TEXT */
|
|
47
50
|
)])], 2
|
|
48
51
|
/* CLASS */
|
|
49
|
-
)) : (0, _vue.createCommentVNode)("v-if", true)]
|
|
52
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
53
|
+
/* CLASS */
|
|
54
|
+
), _ctx.$slots.extra ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
50
55
|
key: 1,
|
|
51
|
-
class: (0, _vue.normalizeClass)(
|
|
56
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('extra'), [_ctx.extraClass, _ctx.extraClass]))
|
|
52
57
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "extra")], 2
|
|
53
58
|
/* CLASS */
|
|
54
59
|
)) : (0, _vue.createCommentVNode)("v-if", true)], 2
|
|
@@ -62,7 +67,15 @@ var _default = (0, _vue.defineComponent)({
|
|
|
62
67
|
components: {
|
|
63
68
|
VarIcon: _icon.default
|
|
64
69
|
},
|
|
65
|
-
props: _props.props
|
|
70
|
+
props: _props.props,
|
|
71
|
+
|
|
72
|
+
setup() {
|
|
73
|
+
return {
|
|
74
|
+
n,
|
|
75
|
+
classes
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
66
79
|
});
|
|
67
80
|
|
|
68
81
|
exports.default = _default;
|
package/lib/checkbox/Checkbox.js
CHANGED
|
@@ -22,11 +22,10 @@ var _provide2 = require("../form/provide");
|
|
|
22
22
|
|
|
23
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
24
|
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
25
|
+
var {
|
|
26
|
+
n,
|
|
27
|
+
classes
|
|
28
|
+
} = (0, _components.createNamespace)('checkbox');
|
|
30
29
|
|
|
31
30
|
function render(_ctx, _cache) {
|
|
32
31
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
@@ -36,19 +35,21 @@ function render(_ctx, _cache) {
|
|
|
36
35
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
37
36
|
|
|
38
37
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
39
|
-
class:
|
|
38
|
+
class: (0, _vue.normalizeClass)(_ctx.n('wrap')),
|
|
40
39
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
41
40
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
42
41
|
})
|
|
43
|
-
}, [(0, _vue.createElementVNode)("div",
|
|
44
|
-
class: (0, _vue.normalizeClass)(
|
|
42
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
43
|
+
class: (0, _vue.normalizeClass)(_ctx.n())
|
|
44
|
+
}, [(0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
45
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('action'), [_ctx.checked, _ctx.n('--checked'), _ctx.n('--unchecked')], [_ctx.errorMessage || _ctx.checkboxGroupErrorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
|
|
45
46
|
style: (0, _vue.normalizeStyle)({
|
|
46
47
|
color: _ctx.checked ? _ctx.checkedColor : _ctx.uncheckedColor
|
|
47
48
|
})
|
|
48
49
|
}, [_ctx.checked ? (0, _vue.renderSlot)(_ctx.$slots, "checked-icon", {
|
|
49
50
|
key: 0
|
|
50
51
|
}, () => [(0, _vue.createVNode)(_component_var_icon, {
|
|
51
|
-
class: (0, _vue.normalizeClass)(
|
|
52
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [_ctx.withAnimation, _ctx.n('--with-animation')])),
|
|
52
53
|
name: "checkbox-marked",
|
|
53
54
|
size: _ctx.iconSize,
|
|
54
55
|
"var-checkbox-cover": ""
|
|
@@ -57,7 +58,7 @@ function render(_ctx, _cache) {
|
|
|
57
58
|
, ["class", "size"])]) : (0, _vue.renderSlot)(_ctx.$slots, "unchecked-icon", {
|
|
58
59
|
key: 1
|
|
59
60
|
}, () => [(0, _vue.createVNode)(_component_var_icon, {
|
|
60
|
-
class: (0, _vue.normalizeClass)(
|
|
61
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [_ctx.withAnimation, _ctx.n('--with-animation')])),
|
|
61
62
|
name: "checkbox-blank-outline",
|
|
62
63
|
size: _ctx.iconSize,
|
|
63
64
|
"var-checkbox-cover": ""
|
|
@@ -68,14 +69,18 @@ function render(_ctx, _cache) {
|
|
|
68
69
|
)), [[_directive_ripple, {
|
|
69
70
|
disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
|
|
70
71
|
}]]), (0, _vue.createElementVNode)("div", {
|
|
71
|
-
class: (0, _vue.normalizeClass)(
|
|
72
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('text'), [_ctx.errorMessage || _ctx.checkboxGroupErrorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')]))
|
|
72
73
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
73
74
|
/* CLASS */
|
|
74
|
-
)]
|
|
75
|
+
)], 2
|
|
76
|
+
/* CLASS */
|
|
77
|
+
), (0, _vue.createVNode)(_component_var_form_details, {
|
|
75
78
|
"error-message": _ctx.errorMessage
|
|
76
79
|
}, null, 8
|
|
77
80
|
/* PROPS */
|
|
78
|
-
, ["error-message"])]
|
|
81
|
+
, ["error-message"])], 2
|
|
82
|
+
/* CLASS */
|
|
83
|
+
);
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -123,15 +128,13 @@ var _default = (0, _vue.defineComponent)({
|
|
|
123
128
|
};
|
|
124
129
|
|
|
125
130
|
var change = changedValue => {
|
|
126
|
-
var _props$onUpdateModel;
|
|
127
|
-
|
|
128
131
|
value.value = changedValue;
|
|
129
132
|
var {
|
|
130
133
|
checkedValue,
|
|
131
134
|
onChange
|
|
132
135
|
} = props;
|
|
133
|
-
(
|
|
134
|
-
|
|
136
|
+
(0, _components.call)(props['onUpdate:modelValue'], value.value);
|
|
137
|
+
(0, _components.call)(onChange, value.value);
|
|
135
138
|
validateWithTrigger('onChange');
|
|
136
139
|
changedValue === checkedValue ? checkboxGroup == null ? void 0 : checkboxGroup.onChecked(checkedValue) : checkboxGroup == null ? void 0 : checkboxGroup.onUnchecked(checkedValue);
|
|
137
140
|
};
|
|
@@ -149,7 +152,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
149
152
|
return;
|
|
150
153
|
}
|
|
151
154
|
|
|
152
|
-
|
|
155
|
+
(0, _components.call)(onClick, e);
|
|
153
156
|
|
|
154
157
|
if (form != null && form.readonly.value || readonly) {
|
|
155
158
|
return;
|
|
@@ -179,9 +182,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
179
182
|
|
|
180
183
|
|
|
181
184
|
var reset = () => {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
(_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, props.uncheckedValue);
|
|
185
|
+
(0, _components.call)(props['onUpdate:modelValue'], props.uncheckedValue);
|
|
185
186
|
resetValidation();
|
|
186
187
|
}; // expose
|
|
187
188
|
|
|
@@ -217,8 +218,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
217
218
|
reset,
|
|
218
219
|
resetWithAnimation
|
|
219
220
|
};
|
|
220
|
-
|
|
221
|
-
|
|
221
|
+
(0, _components.call)(bindCheckboxGroup, checkboxProvider);
|
|
222
|
+
(0, _components.call)(bindForm, checkboxProvider);
|
|
222
223
|
return {
|
|
223
224
|
withAnimation,
|
|
224
225
|
checked,
|
|
@@ -226,6 +227,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
226
227
|
checkboxGroupErrorMessage: checkboxGroup == null ? void 0 : checkboxGroup.errorMessage,
|
|
227
228
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
228
229
|
formReadonly: form == null ? void 0 : form.readonly,
|
|
230
|
+
n,
|
|
231
|
+
classes,
|
|
229
232
|
handleClick,
|
|
230
233
|
toggle,
|
|
231
234
|
reset,
|
|
@@ -20,24 +20,27 @@ var _shared = require("../utils/shared");
|
|
|
20
20
|
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
22
|
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
23
|
+
var {
|
|
24
|
+
n,
|
|
25
|
+
classes
|
|
26
|
+
} = (0, _components.createNamespace)('checkbox-group');
|
|
28
27
|
|
|
29
28
|
function render(_ctx, _cache) {
|
|
30
29
|
var _component_var_form_details = (0, _vue.resolveComponent)("var-form-details");
|
|
31
30
|
|
|
32
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
33
|
-
class: (0, _vue.normalizeClass)(
|
|
31
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
32
|
+
class: (0, _vue.normalizeClass)(_ctx.n('wrap'))
|
|
33
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
34
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n("--" + _ctx.direction)))
|
|
34
35
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
35
36
|
/* CLASS */
|
|
36
37
|
), (0, _vue.createVNode)(_component_var_form_details, {
|
|
37
38
|
"error-message": _ctx.errorMessage
|
|
38
39
|
}, null, 8
|
|
39
40
|
/* PROPS */
|
|
40
|
-
, ["error-message"])]
|
|
41
|
+
, ["error-message"])], 2
|
|
42
|
+
/* CLASS */
|
|
43
|
+
);
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -80,10 +83,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
80
83
|
};
|
|
81
84
|
|
|
82
85
|
var change = changedModelValue => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
(_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, changedModelValue);
|
|
86
|
-
props.onChange == null ? void 0 : props.onChange(changedModelValue);
|
|
86
|
+
(0, _components.call)(props['onUpdate:modelValue'], changedModelValue);
|
|
87
|
+
(0, _components.call)(props.onChange, changedModelValue);
|
|
87
88
|
validateWithTrigger('onChange');
|
|
88
89
|
};
|
|
89
90
|
|
|
@@ -122,8 +123,6 @@ var _default = (0, _vue.defineComponent)({
|
|
|
122
123
|
|
|
123
124
|
|
|
124
125
|
var checkAll = () => {
|
|
125
|
-
var _props$onUpdateModel2;
|
|
126
|
-
|
|
127
126
|
var checkedValues = checkboxes.map(_ref2 => {
|
|
128
127
|
var {
|
|
129
128
|
checkedValue
|
|
@@ -132,14 +131,12 @@ var _default = (0, _vue.defineComponent)({
|
|
|
132
131
|
});
|
|
133
132
|
var changedModelValue = (0, _shared.uniq)(checkedValues);
|
|
134
133
|
resetWithAnimation();
|
|
135
|
-
(
|
|
134
|
+
(0, _components.call)(props['onUpdate:modelValue'], changedModelValue);
|
|
136
135
|
return changedModelValue;
|
|
137
136
|
}; // expose
|
|
138
137
|
|
|
139
138
|
|
|
140
139
|
var inverseAll = () => {
|
|
141
|
-
var _props$onUpdateModel3;
|
|
142
|
-
|
|
143
140
|
var checkedValues = checkboxes.filter(_ref3 => {
|
|
144
141
|
var {
|
|
145
142
|
checked
|
|
@@ -153,15 +150,13 @@ var _default = (0, _vue.defineComponent)({
|
|
|
153
150
|
});
|
|
154
151
|
var changedModelValue = (0, _shared.uniq)(checkedValues);
|
|
155
152
|
resetWithAnimation();
|
|
156
|
-
(
|
|
153
|
+
(0, _components.call)(props['onUpdate:modelValue'], changedModelValue);
|
|
157
154
|
return changedModelValue;
|
|
158
155
|
}; // expose
|
|
159
156
|
|
|
160
157
|
|
|
161
158
|
var reset = () => {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
(_props$onUpdateModel4 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel4.call(props, []);
|
|
159
|
+
(0, _components.call)(props['onUpdate:modelValue'], []);
|
|
165
160
|
resetValidation();
|
|
166
161
|
}; // expose
|
|
167
162
|
|
|
@@ -183,9 +178,11 @@ var _default = (0, _vue.defineComponent)({
|
|
|
183
178
|
errorMessage: checkboxGroupErrorMessage
|
|
184
179
|
};
|
|
185
180
|
bindCheckboxes(checkboxGroupProvider);
|
|
186
|
-
|
|
181
|
+
(0, _components.call)(bindForm, checkboxGroupProvider);
|
|
187
182
|
return {
|
|
188
183
|
errorMessage,
|
|
184
|
+
n,
|
|
185
|
+
classes,
|
|
189
186
|
checkAll,
|
|
190
187
|
inverseAll,
|
|
191
188
|
reset,
|
package/lib/chip/Chip.js
CHANGED
|
@@ -10,8 +10,15 @@ var _vue = require("vue");
|
|
|
10
10
|
|
|
11
11
|
var _props = require("./props");
|
|
12
12
|
|
|
13
|
+
var _components = require("../utils/components");
|
|
14
|
+
|
|
13
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
16
|
|
|
17
|
+
var {
|
|
18
|
+
n,
|
|
19
|
+
classes
|
|
20
|
+
} = (0, _components.createNamespace)('chip');
|
|
21
|
+
|
|
15
22
|
function render(_ctx, _cache) {
|
|
16
23
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
17
24
|
|
|
@@ -19,15 +26,15 @@ function render(_ctx, _cache) {
|
|
|
19
26
|
name: "var-fade"
|
|
20
27
|
}, {
|
|
21
28
|
default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("span", (0, _vue.mergeProps)({
|
|
22
|
-
class:
|
|
29
|
+
class: _ctx.classes(_ctx.n(), 'var--box', ..._ctx.contentClass),
|
|
23
30
|
style: _ctx.chipStyles
|
|
24
31
|
}, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "left"), (0, _vue.createElementVNode)("span", {
|
|
25
|
-
class: (0, _vue.normalizeClass)(
|
|
32
|
+
class: (0, _vue.normalizeClass)(_ctx.n("text-" + _ctx.size))
|
|
26
33
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
27
34
|
/* CLASS */
|
|
28
35
|
), (0, _vue.renderSlot)(_ctx.$slots, "right"), _ctx.closable ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", {
|
|
29
36
|
key: 0,
|
|
30
|
-
class:
|
|
37
|
+
class: (0, _vue.normalizeClass)(_ctx.n('--close')),
|
|
31
38
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
32
39
|
return _ctx.onClose && _ctx.onClose(...arguments);
|
|
33
40
|
})
|
|
@@ -35,7 +42,9 @@ function render(_ctx, _cache) {
|
|
|
35
42
|
name: "" + (_ctx.iconName ? _ctx.iconName : 'close-circle')
|
|
36
43
|
}, null, 8
|
|
37
44
|
/* PROPS */
|
|
38
|
-
, ["name"])]
|
|
45
|
+
, ["name"])], 2
|
|
46
|
+
/* CLASS */
|
|
47
|
+
)) : (0, _vue.createCommentVNode)("v-if", true)], 16
|
|
39
48
|
/* FULL_PROPS */
|
|
40
49
|
)]),
|
|
41
50
|
_: 3
|
|
@@ -82,11 +91,13 @@ var _default = (0, _vue.defineComponent)({
|
|
|
82
91
|
round
|
|
83
92
|
} = props;
|
|
84
93
|
var blockClass = block ? 'var--flex' : 'var--inline-flex';
|
|
85
|
-
var plainTypeClass = plain ?
|
|
86
|
-
var roundClass = round
|
|
87
|
-
return ["
|
|
94
|
+
var plainTypeClass = plain ? n('plain') + " " + n("plain-" + type) : n("--" + type);
|
|
95
|
+
var roundClass = round ? n('--round') : null;
|
|
96
|
+
return [n("--" + size), blockClass, plainTypeClass, roundClass];
|
|
88
97
|
});
|
|
89
98
|
return {
|
|
99
|
+
n,
|
|
100
|
+
classes,
|
|
90
101
|
chipStyles,
|
|
91
102
|
contentClass
|
|
92
103
|
};
|
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: 0px 10px; --chip-large-padding: 0px 17px; --chip-small-padding: 0px 6px; --chip-mini-padding: 0px 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; line-height: 1; 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-
|
|
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: 0px 10px; --chip-large-padding: 0px 17px; --chip-small-padding: 0px 6px; --chip-mini-padding: 0px 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; line-height: 1; 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-md); padding: var(--chip-normal-padding); height: var(--chip-normal-height);}.var-chip--large { padding: var(--chip-large-padding); font-size: var(--font-size-lg); height: var(--chip-large-height);}.var-chip--small { padding: var(--chip-small-padding); font-size: var(--font-size-sm); height: var(--chip-small-height);}.var-chip--mini { padding: var(--chip-mini-padding); font-size: var(--font-size-xs); 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/chip/chip.less
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
background-color: var(--chip-danger-color);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
&__plain {
|
|
97
97
|
background-color: transparent;
|
|
98
98
|
|
|
99
99
|
&:active {
|
|
@@ -101,32 +101,32 @@
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
&__plain-default {
|
|
105
105
|
color: inherit;
|
|
106
106
|
border-color: currentColor;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
&__plain-primary {
|
|
110
110
|
color: var(--chip-primary-color);
|
|
111
111
|
border-color: currentColor;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
&__plain-info {
|
|
115
115
|
color: var(--chip-info-color);
|
|
116
116
|
border-color: currentColor;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
&__plain-success {
|
|
120
120
|
color: var(--chip-success-color);
|
|
121
121
|
border-color: currentColor;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
&__plain-warning {
|
|
125
125
|
color: var(--chip-warning-color);
|
|
126
126
|
border-color: currentColor;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
&__plain-danger {
|
|
130
130
|
color: var(--chip-danger-color);
|
|
131
131
|
border-color: currentColor;
|
|
132
132
|
}
|
|
@@ -164,19 +164,19 @@
|
|
|
164
164
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
&__text-large {
|
|
168
168
|
margin: var(--chip-text-large-margin);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
&__text-normal {
|
|
172
172
|
margin: var(--chip-text-normal-margin);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
&__text-small {
|
|
176
176
|
margin: var(--chip-text-small-margin);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
&__text-mini {
|
|
180
180
|
margin: var(--chip-text-mini-margin);
|
|
181
181
|
}
|
|
182
182
|
}
|
package/lib/col/Col.js
CHANGED
|
@@ -14,9 +14,16 @@ var _provide = require("./provide");
|
|
|
14
14
|
|
|
15
15
|
var _elements = require("../utils/elements");
|
|
16
16
|
|
|
17
|
+
var _components = require("../utils/components");
|
|
18
|
+
|
|
19
|
+
var {
|
|
20
|
+
n,
|
|
21
|
+
classes
|
|
22
|
+
} = (0, _components.createNamespace)('col');
|
|
23
|
+
|
|
17
24
|
function render(_ctx, _cache) {
|
|
18
25
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
19
|
-
class: (0, _vue.normalizeClass)(
|
|
26
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box', [_ctx.span, _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))),
|
|
20
27
|
style: (0, _vue.normalizeStyle)({
|
|
21
28
|
paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
|
|
22
29
|
paddingRight: _ctx.toSizeUnit(_ctx.padding.right)
|
|
@@ -64,10 +71,10 @@ var _default = (0, _vue.defineComponent)({
|
|
|
64
71
|
span: _span,
|
|
65
72
|
offset: _offset
|
|
66
73
|
} = size;
|
|
67
|
-
_span && classes.push("
|
|
68
|
-
_offset && classes.push("
|
|
74
|
+
_span && classes.push(n("--span-" + mode + "-" + _span));
|
|
75
|
+
_offset && classes.push(n("--offset-" + mode + "-" + _offset));
|
|
69
76
|
} else {
|
|
70
|
-
classes.push("
|
|
77
|
+
classes.push(n("--span-" + mode + "-" + size));
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
return classes;
|
|
@@ -76,8 +83,10 @@ var _default = (0, _vue.defineComponent)({
|
|
|
76
83
|
(0, _vue.watch)([() => props.span, () => props.offset], () => {
|
|
77
84
|
row == null ? void 0 : row.computePadding();
|
|
78
85
|
});
|
|
79
|
-
|
|
86
|
+
(0, _components.call)(bindRow, colProvider);
|
|
80
87
|
return {
|
|
88
|
+
n,
|
|
89
|
+
classes,
|
|
81
90
|
padding,
|
|
82
91
|
toNumber: _shared.toNumber,
|
|
83
92
|
toSizeUnit: _elements.toSizeUnit,
|