@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
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, watch } from 'vue';
|
|
2
|
+
import { props } from './props';
|
|
3
|
+
import Ripple from '../ripple';
|
|
4
|
+
import VarBadge from '../badge';
|
|
5
|
+
import VarIcon from '../icon';
|
|
6
|
+
import { useBottomNavigation } from './provide';
|
|
7
|
+
import { createNamespace, call } from '../utils/components';
|
|
8
|
+
var {
|
|
9
|
+
n,
|
|
10
|
+
classes
|
|
11
|
+
} = createNamespace('bottom-navigation-item');
|
|
12
|
+
var defaultBadgeProps = {
|
|
13
|
+
type: 'danger',
|
|
14
|
+
dot: true
|
|
15
|
+
};
|
|
16
|
+
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, mergeProps as _mergeProps, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, Fragment as _Fragment, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives } from "vue";
|
|
17
|
+
export function render(_ctx, _cache) {
|
|
18
|
+
var _component_var_icon = _resolveComponent("var-icon");
|
|
19
|
+
|
|
20
|
+
var _component_var_badge = _resolveComponent("var-badge");
|
|
21
|
+
|
|
22
|
+
var _directive_ripple = _resolveDirective("ripple");
|
|
23
|
+
|
|
24
|
+
return _withDirectives((_openBlock(), _createElementBlock("button", {
|
|
25
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.active === _ctx.index || _ctx.active === _ctx.name, _ctx.n('--active')])),
|
|
26
|
+
style: _normalizeStyle({
|
|
27
|
+
color: _ctx.computeColorStyle()
|
|
28
|
+
}),
|
|
29
|
+
onClick: _cache[0] || (_cache[0] = function () {
|
|
30
|
+
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
31
|
+
})
|
|
32
|
+
}, [_ctx.icon && !_ctx.$slots.icon ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
33
|
+
key: 0,
|
|
34
|
+
name: _ctx.icon,
|
|
35
|
+
namespace: _ctx.namespace,
|
|
36
|
+
class: _normalizeClass(_ctx.n('icon')),
|
|
37
|
+
"var-bottom-navigation-item-cover": ""
|
|
38
|
+
}, null, 8
|
|
39
|
+
/* PROPS */
|
|
40
|
+
, ["name", "namespace", "class"])) : _createCommentVNode("v-if", true), _renderSlot(_ctx.$slots, "icon", {
|
|
41
|
+
active: _ctx.active === _ctx.index || _ctx.active === _ctx.name
|
|
42
|
+
}), _ctx.badge ? (_openBlock(), _createBlock(_component_var_badge, _mergeProps({
|
|
43
|
+
key: 1
|
|
44
|
+
}, _ctx.badgeProps, {
|
|
45
|
+
class: _ctx.n('badge'),
|
|
46
|
+
"var-bottom-navigation-item-cover": ""
|
|
47
|
+
}), null, 16
|
|
48
|
+
/* FULL_PROPS */
|
|
49
|
+
, ["class"])) : _createCommentVNode("v-if", true), _createElementVNode("span", {
|
|
50
|
+
class: _normalizeClass(_ctx.n('label'))
|
|
51
|
+
}, [!_ctx.$slots.default ? (_openBlock(), _createElementBlock(_Fragment, {
|
|
52
|
+
key: 0
|
|
53
|
+
}, [_createTextVNode(_toDisplayString(_ctx.label), 1
|
|
54
|
+
/* TEXT */
|
|
55
|
+
)], 2112
|
|
56
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
57
|
+
)) : _createCommentVNode("v-if", true), _renderSlot(_ctx.$slots, "default")], 2
|
|
58
|
+
/* CLASS */
|
|
59
|
+
)], 6
|
|
60
|
+
/* CLASS, STYLE */
|
|
61
|
+
)), [[_directive_ripple]]);
|
|
62
|
+
}
|
|
63
|
+
export default defineComponent({
|
|
64
|
+
render,
|
|
65
|
+
name: 'VarBottomNavigationItem',
|
|
66
|
+
components: {
|
|
67
|
+
VarBadge,
|
|
68
|
+
VarIcon
|
|
69
|
+
},
|
|
70
|
+
directives: {
|
|
71
|
+
Ripple
|
|
72
|
+
},
|
|
73
|
+
props,
|
|
74
|
+
|
|
75
|
+
setup(props) {
|
|
76
|
+
var name = computed(() => props.name);
|
|
77
|
+
var badge = computed(() => props.badge);
|
|
78
|
+
var badgeProps = ref({});
|
|
79
|
+
var {
|
|
80
|
+
index,
|
|
81
|
+
bottomNavigation,
|
|
82
|
+
bindBottomNavigation
|
|
83
|
+
} = useBottomNavigation();
|
|
84
|
+
var {
|
|
85
|
+
active,
|
|
86
|
+
activeColor,
|
|
87
|
+
inactiveColor
|
|
88
|
+
} = bottomNavigation;
|
|
89
|
+
var bottomNavigationItemProvider = {
|
|
90
|
+
name,
|
|
91
|
+
index
|
|
92
|
+
};
|
|
93
|
+
bindBottomNavigation(bottomNavigationItemProvider);
|
|
94
|
+
|
|
95
|
+
var computeColorStyle = () => {
|
|
96
|
+
return active.value === name.value || active.value === index.value ? activeColor.value : inactiveColor.value;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
var handleClick = () => {
|
|
100
|
+
var active = name.value || index.value;
|
|
101
|
+
call(props.onClick, active);
|
|
102
|
+
call(bottomNavigation.onToggle, active);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
watch(() => badge.value, newValue => {
|
|
106
|
+
badgeProps.value = newValue === true ? defaultBadgeProps : badge.value;
|
|
107
|
+
}, {
|
|
108
|
+
immediate: true
|
|
109
|
+
});
|
|
110
|
+
return {
|
|
111
|
+
n,
|
|
112
|
+
classes,
|
|
113
|
+
index,
|
|
114
|
+
active,
|
|
115
|
+
badge,
|
|
116
|
+
badgeProps,
|
|
117
|
+
computeColorStyle,
|
|
118
|
+
handleClick
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
});
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root { --bottom-navigation-item-font-size: var(--font-size-sm); --bottom-navigation-item-inactive-color: #646566; --bottom-navigation-item-active-color: var(--color-primary); --bottom-navigation-item-active-background-color: #fff; --bottom-navigation-item-line-height: 1; --bottom-navigation-item-icon-size: 22px; --bottom-navigation-item-icon-margin-bottom: 5px;}.var-bottom-navigation-item { height: 100%; padding: 6px 12px 8px; position: relative; display: inline-flex; flex: 1 1 0%; flex-direction: column; align-items: center; justify-content: center; line-height: var(--bottom-navigation-item-line-height); color: var(--bottom-navigation-item-inactive-color); cursor: pointer; user-select: none; vertical-align: middle; appearance: none; text-decoration: none; background-color: transparent; outline: 0; border: 0; transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, margin 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.var-bottom-navigation-item--active { color: var(--bottom-navigation-item-active-color); background-color: var(--bottom-navigation-item-active-background-color); transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.var-bottom-navigation-item--active .var-bottom-navigation-item__label { font-size: calc(var(--bottom-navigation-item-font-size) * 1.16);}.var-bottom-navigation-item--right-half-space { margin-right: calc(var(--bottom-navigation-height) / 2);}.var-bottom-navigation-item--left-half-space { margin-left: calc(var(--bottom-navigation-height) / 2);}.var-bottom-navigation-item--right-space { margin-right: var(--bottom-navigation-height);}.var-bottom-navigation-item__icon[var-bottom-navigation-item-cover] { font-size: var(--bottom-navigation-item-icon-size);}.var-bottom-navigation-item__badge[var-bottom-navigation-item-cover] { position: absolute; left: 4px; transform: translateY(-22px);}.var-bottom-navigation-item__label { margin-top: var(--bottom-navigation-item-icon-margin-bottom); font-size: var(--bottom-navigation-item-font-size); transition: font-size 0.2s ease 0.1s; white-space: nowrap;}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@bottom-navigation-item-font-size: var(--font-size-sm);
|
|
2
|
+
@bottom-navigation-item-inactive-color: #646566;
|
|
3
|
+
@bottom-navigation-item-active-color: var(--color-primary);
|
|
4
|
+
@bottom-navigation-item-active-background-color: #fff;
|
|
5
|
+
@bottom-navigation-item-line-height: 1;
|
|
6
|
+
@bottom-navigation-item-icon-size: 22px;
|
|
7
|
+
@bottom-navigation-item-icon-margin-bottom: 5px;
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
--bottom-navigation-item-font-size: @bottom-navigation-item-font-size;
|
|
11
|
+
--bottom-navigation-item-inactive-color: @bottom-navigation-item-inactive-color;
|
|
12
|
+
--bottom-navigation-item-active-color: @bottom-navigation-item-active-color;
|
|
13
|
+
--bottom-navigation-item-active-background-color: @bottom-navigation-item-active-background-color;
|
|
14
|
+
--bottom-navigation-item-line-height: @bottom-navigation-item-line-height;
|
|
15
|
+
--bottom-navigation-item-icon-size: @bottom-navigation-item-icon-size;
|
|
16
|
+
--bottom-navigation-item-icon-margin-bottom: @bottom-navigation-item-icon-margin-bottom;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.var-bottom-navigation-item {
|
|
20
|
+
height: 100%;
|
|
21
|
+
padding: 6px 12px 8px;
|
|
22
|
+
position: relative;
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
flex: 1 1 0%;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
line-height: var(--bottom-navigation-item-line-height);
|
|
29
|
+
color: var(--bottom-navigation-item-inactive-color);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
user-select: none;
|
|
32
|
+
vertical-align: middle;
|
|
33
|
+
appearance: none;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
outline: 0;
|
|
37
|
+
border: 0;
|
|
38
|
+
transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, margin 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
39
|
+
|
|
40
|
+
&--active {
|
|
41
|
+
color: var(--bottom-navigation-item-active-color);
|
|
42
|
+
background-color: var(--bottom-navigation-item-active-background-color);
|
|
43
|
+
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
44
|
+
|
|
45
|
+
.var-bottom-navigation-item__label {
|
|
46
|
+
font-size: calc(var(--bottom-navigation-item-font-size) * 1.16);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&--right-half-space {
|
|
51
|
+
margin-right: calc(var(--bottom-navigation-height) / 2);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--left-half-space {
|
|
55
|
+
margin-left: calc(var(--bottom-navigation-height) / 2);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--right-space {
|
|
59
|
+
margin-right: var(--bottom-navigation-height);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__icon[var-bottom-navigation-item-cover] {
|
|
63
|
+
font-size: var(--bottom-navigation-item-icon-size);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__badge[var-bottom-navigation-item-cover] {
|
|
67
|
+
position: absolute;
|
|
68
|
+
left: 4px;
|
|
69
|
+
transform: translateY(-22px);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__label {
|
|
73
|
+
margin-top: var(--bottom-navigation-item-icon-margin-bottom);
|
|
74
|
+
font-size: var(--bottom-navigation-item-font-size);
|
|
75
|
+
transition: font-size 0.2s ease 0.1s;
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import BottomNavigationItem from './BottomNavigationItem.js'
|
|
2
|
+
|
|
3
|
+
BottomNavigationItem.install = function (app) {
|
|
4
|
+
app.component(BottomNavigationItem.name, BottomNavigationItem);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export var _BottomNavigationItemComponent = BottomNavigationItem;
|
|
8
|
+
export default BottomNavigationItem;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export var props = {
|
|
2
|
+
name: {
|
|
3
|
+
type: String
|
|
4
|
+
},
|
|
5
|
+
icon: {
|
|
6
|
+
type: String
|
|
7
|
+
},
|
|
8
|
+
label: {
|
|
9
|
+
type: String
|
|
10
|
+
},
|
|
11
|
+
namespace: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: 'var-icon'
|
|
14
|
+
},
|
|
15
|
+
badge: {
|
|
16
|
+
type: [Boolean, Object],
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
onClick: {
|
|
20
|
+
type: Function
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useAtParentIndex, useParent } from '../utils/components';
|
|
2
|
+
import { BOTTOM_NAVIGATION_BIND_BOTTOM_NAVIGATION_ITEM_KEY, BOTTOM_NAVIGATION_COUNT_BOTTOM_NAVIGATION_ITEM_KEY } from '../bottom-navigation/provide';
|
|
3
|
+
export function useBottomNavigation() {
|
|
4
|
+
var {
|
|
5
|
+
parentProvider,
|
|
6
|
+
bindParent
|
|
7
|
+
} = useParent(BOTTOM_NAVIGATION_BIND_BOTTOM_NAVIGATION_ITEM_KEY);
|
|
8
|
+
var {
|
|
9
|
+
index
|
|
10
|
+
} = useAtParentIndex(BOTTOM_NAVIGATION_COUNT_BOTTOM_NAVIGATION_ITEM_KEY);
|
|
11
|
+
|
|
12
|
+
if (!parentProvider || !bindParent || !index) {
|
|
13
|
+
throw Error('<var-bottom-navigation-item/> must in <var-bottom-navigation/>');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
index,
|
|
18
|
+
bottomNavigation: parentProvider,
|
|
19
|
+
bindBottomNavigation: bindParent
|
|
20
|
+
};
|
|
21
|
+
}
|
package/es/button/Button.js
CHANGED
|
@@ -2,7 +2,12 @@ import Ripple from '../ripple';
|
|
|
2
2
|
import VarLoading from '../loading';
|
|
3
3
|
import { defineComponent, ref } from 'vue';
|
|
4
4
|
import { props } from './props';
|
|
5
|
-
import {
|
|
5
|
+
import { createNamespace } from '../utils/components';
|
|
6
|
+
var {
|
|
7
|
+
n,
|
|
8
|
+
classes
|
|
9
|
+
} = createNamespace('button');
|
|
10
|
+
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
6
11
|
|
|
7
12
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
8
13
|
|
|
@@ -13,7 +18,7 @@ export function render(_ctx, _cache) {
|
|
|
13
18
|
var _directive_ripple = _resolveDirective("ripple");
|
|
14
19
|
|
|
15
20
|
return _withDirectives((_openBlock(), _createElementBlock("button", {
|
|
16
|
-
class: _normalizeClass(
|
|
21
|
+
class: _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')])),
|
|
17
22
|
style: _normalizeStyle({
|
|
18
23
|
color: _ctx.textColor,
|
|
19
24
|
background: _ctx.color
|
|
@@ -27,15 +32,15 @@ export function render(_ctx, _cache) {
|
|
|
27
32
|
})
|
|
28
33
|
}, [_ctx.loading || _ctx.pending ? (_openBlock(), _createBlock(_component_var_loading, {
|
|
29
34
|
key: 0,
|
|
30
|
-
class:
|
|
35
|
+
class: _normalizeClass(_ctx.n('loading')),
|
|
31
36
|
"var-button-cover": "",
|
|
32
37
|
type: _ctx.loadingType,
|
|
33
38
|
size: _ctx.loadingSize,
|
|
34
39
|
radius: _ctx.loadingRadius
|
|
35
40
|
}, null, 8
|
|
36
41
|
/* PROPS */
|
|
37
|
-
, ["type", "size", "radius"])) : _createCommentVNode("v-if", true), _createElementVNode("div", {
|
|
38
|
-
class: _normalizeClass(
|
|
42
|
+
, ["class", "type", "size", "radius"])) : _createCommentVNode("v-if", true), _createElementVNode("div", {
|
|
43
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('content'), [_ctx.loading || _ctx.pending, _ctx.n('--hidden')]))
|
|
39
44
|
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
40
45
|
/* CLASS */
|
|
41
46
|
)], 46
|
|
@@ -96,6 +101,8 @@ export default defineComponent({
|
|
|
96
101
|
};
|
|
97
102
|
|
|
98
103
|
return {
|
|
104
|
+
n,
|
|
105
|
+
classes,
|
|
99
106
|
pending,
|
|
100
107
|
handleClick,
|
|
101
108
|
handleTouchstart
|
package/es/card/Card.js
CHANGED
|
@@ -2,53 +2,56 @@ import Ripple from '../ripple';
|
|
|
2
2
|
import { defineComponent } from 'vue';
|
|
3
3
|
import { props } from './props';
|
|
4
4
|
import { toSizeUnit } from '../utils/elements';
|
|
5
|
-
import {
|
|
5
|
+
import { createNamespace } from '../utils/components';
|
|
6
|
+
var {
|
|
7
|
+
n,
|
|
8
|
+
classes
|
|
9
|
+
} = createNamespace('card');
|
|
10
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, resolveDirective as _resolveDirective, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
6
11
|
|
|
7
12
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
8
13
|
|
|
9
14
|
var _hoisted_1 = ["src", "alt"];
|
|
10
|
-
var _hoisted_2 = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "var-card__title"
|
|
13
|
-
};
|
|
14
|
-
var _hoisted_3 = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "var-card__subtitle"
|
|
17
|
-
};
|
|
18
|
-
var _hoisted_4 = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "var-card__description"
|
|
21
|
-
};
|
|
22
|
-
var _hoisted_5 = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "var-card__footer"
|
|
25
|
-
};
|
|
26
15
|
export function render(_ctx, _cache) {
|
|
27
16
|
var _directive_ripple = _resolveDirective("ripple");
|
|
28
17
|
|
|
29
18
|
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
30
|
-
class: _normalizeClass(
|
|
19
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.elevation, "var-elevation--" + _ctx.elevation, 'var-elevation--2'])),
|
|
31
20
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
32
21
|
return _ctx.onClick && _ctx.onClick(...arguments);
|
|
33
22
|
})
|
|
34
23
|
}, [_renderSlot(_ctx.$slots, "image", {}, () => [_ctx.src ? (_openBlock(), _createElementBlock("img", {
|
|
35
24
|
key: 0,
|
|
36
|
-
class:
|
|
25
|
+
class: _normalizeClass(_ctx.n('image')),
|
|
37
26
|
style: _normalizeStyle({
|
|
38
27
|
objectFit: _ctx.fit,
|
|
39
28
|
height: _ctx.toSizeUnit(_ctx.height)
|
|
40
29
|
}),
|
|
41
30
|
src: _ctx.src,
|
|
42
31
|
alt: _ctx.alt
|
|
43
|
-
}, null,
|
|
44
|
-
/* STYLE, PROPS */
|
|
45
|
-
, _hoisted_1)) : _createCommentVNode("v-if", true)]), _renderSlot(_ctx.$slots, "title", {}, () => [_ctx.title ? (_openBlock(), _createElementBlock("div",
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
}, null, 14
|
|
33
|
+
/* CLASS, STYLE, PROPS */
|
|
34
|
+
, _hoisted_1)) : _createCommentVNode("v-if", true)]), _renderSlot(_ctx.$slots, "title", {}, () => [_ctx.title ? (_openBlock(), _createElementBlock("div", {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: _normalizeClass(_ctx.n('title'))
|
|
37
|
+
}, _toDisplayString(_ctx.title), 3
|
|
38
|
+
/* TEXT, CLASS */
|
|
39
|
+
)) : _createCommentVNode("v-if", true)]), _renderSlot(_ctx.$slots, "subtitle", {}, () => [_ctx.subtitle ? (_openBlock(), _createElementBlock("div", {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: _normalizeClass(_ctx.n('subtitle'))
|
|
42
|
+
}, _toDisplayString(_ctx.subtitle), 3
|
|
43
|
+
/* TEXT, CLASS */
|
|
44
|
+
)) : _createCommentVNode("v-if", true)]), _renderSlot(_ctx.$slots, "description", {}, () => [_ctx.description ? (_openBlock(), _createElementBlock("div", {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: _normalizeClass(_ctx.n('description'))
|
|
47
|
+
}, _toDisplayString(_ctx.description), 3
|
|
48
|
+
/* TEXT, CLASS */
|
|
49
|
+
)) : _createCommentVNode("v-if", true)]), _ctx.$slots.extra ? (_openBlock(), _createElementBlock("div", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: _normalizeClass(_ctx.n('footer'))
|
|
52
|
+
}, [_renderSlot(_ctx.$slots, "extra")], 2
|
|
53
|
+
/* CLASS */
|
|
54
|
+
)) : _createCommentVNode("v-if", true)], 2
|
|
52
55
|
/* CLASS */
|
|
53
56
|
)), [[_directive_ripple, {
|
|
54
57
|
disabled: !_ctx.ripple
|
|
@@ -64,6 +67,8 @@ export default defineComponent({
|
|
|
64
67
|
|
|
65
68
|
setup() {
|
|
66
69
|
return {
|
|
70
|
+
n,
|
|
71
|
+
classes,
|
|
67
72
|
toSizeUnit
|
|
68
73
|
};
|
|
69
74
|
}
|
package/es/cell/Cell.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import { props } from './props';
|
|
3
3
|
import VarIcon from '../icon';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
4
|
+
import { createNamespace } from '../utils/components';
|
|
5
|
+
var {
|
|
6
|
+
n,
|
|
7
|
+
classes
|
|
8
|
+
} = createNamespace('cell');
|
|
9
|
+
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode } from "vue";
|
|
11
10
|
export function render(_ctx, _cache) {
|
|
12
11
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
13
12
|
|
|
14
13
|
return _openBlock(), _createElementBlock("div", {
|
|
15
|
-
class: _normalizeClass(
|
|
14
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.border, _ctx.n('--border')]))
|
|
16
15
|
}, [_ctx.$slots.icon || _ctx.icon ? (_openBlock(), _createElementBlock("div", {
|
|
17
16
|
key: 0,
|
|
18
|
-
class: _normalizeClass(
|
|
17
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('icon'), [_ctx.iconClass, _ctx.iconClass]))
|
|
19
18
|
}, [_renderSlot(_ctx.$slots, "icon", {}, () => [_createVNode(_component_var_icon, {
|
|
20
19
|
class: "var--flex",
|
|
21
20
|
name: _ctx.icon
|
|
@@ -23,22 +22,26 @@ export function render(_ctx, _cache) {
|
|
|
23
22
|
/* PROPS */
|
|
24
23
|
, ["name"])])], 2
|
|
25
24
|
/* CLASS */
|
|
26
|
-
)) : _createCommentVNode("v-if", true), _createElementVNode("div",
|
|
27
|
-
class: _normalizeClass(
|
|
25
|
+
)) : _createCommentVNode("v-if", true), _createElementVNode("div", {
|
|
26
|
+
class: _normalizeClass(_ctx.n('content'))
|
|
27
|
+
}, [_createElementVNode("div", {
|
|
28
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('title'), [_ctx.titleClass, _ctx.titleClass]))
|
|
28
29
|
}, [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.title), 1
|
|
29
30
|
/* TEXT */
|
|
30
31
|
)])], 2
|
|
31
32
|
/* CLASS */
|
|
32
33
|
), _ctx.$slots.desc || _ctx.desc ? (_openBlock(), _createElementBlock("div", {
|
|
33
34
|
key: 0,
|
|
34
|
-
class: _normalizeClass(
|
|
35
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('desc'), [_ctx.descClass, _ctx.descClass]))
|
|
35
36
|
}, [_renderSlot(_ctx.$slots, "desc", {}, () => [_createTextVNode(_toDisplayString(_ctx.desc), 1
|
|
36
37
|
/* TEXT */
|
|
37
38
|
)])], 2
|
|
38
39
|
/* CLASS */
|
|
39
|
-
)) : _createCommentVNode("v-if", true)]
|
|
40
|
+
)) : _createCommentVNode("v-if", true)], 2
|
|
41
|
+
/* CLASS */
|
|
42
|
+
), _ctx.$slots.extra ? (_openBlock(), _createElementBlock("div", {
|
|
40
43
|
key: 1,
|
|
41
|
-
class: _normalizeClass(
|
|
44
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('extra'), [_ctx.extraClass, _ctx.extraClass]))
|
|
42
45
|
}, [_renderSlot(_ctx.$slots, "extra")], 2
|
|
43
46
|
/* CLASS */
|
|
44
47
|
)) : _createCommentVNode("v-if", true)], 2
|
|
@@ -51,5 +54,13 @@ export default defineComponent({
|
|
|
51
54
|
components: {
|
|
52
55
|
VarIcon
|
|
53
56
|
},
|
|
54
|
-
props
|
|
57
|
+
props,
|
|
58
|
+
|
|
59
|
+
setup() {
|
|
60
|
+
return {
|
|
61
|
+
n,
|
|
62
|
+
classes
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
55
66
|
});
|
package/es/checkbox/Checkbox.js
CHANGED
|
@@ -3,16 +3,14 @@ import VarFormDetails from '../form-details';
|
|
|
3
3
|
import Ripple from '../ripple';
|
|
4
4
|
import { defineComponent, ref, computed, watch, nextTick } from 'vue';
|
|
5
5
|
import { props } from './props';
|
|
6
|
-
import { useValidation } from '../utils/components';
|
|
6
|
+
import { useValidation, createNamespace, call } from '../utils/components';
|
|
7
7
|
import { useCheckboxGroup } from './provide';
|
|
8
8
|
import { useForm } from '../form/provide';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class: "var-checkbox"
|
|
15
|
-
};
|
|
9
|
+
var {
|
|
10
|
+
n,
|
|
11
|
+
classes
|
|
12
|
+
} = createNamespace('checkbox');
|
|
13
|
+
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode } from "vue";
|
|
16
14
|
export function render(_ctx, _cache) {
|
|
17
15
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
18
16
|
|
|
@@ -21,19 +19,21 @@ export function render(_ctx, _cache) {
|
|
|
21
19
|
var _directive_ripple = _resolveDirective("ripple");
|
|
22
20
|
|
|
23
21
|
return _openBlock(), _createElementBlock("div", {
|
|
24
|
-
class:
|
|
22
|
+
class: _normalizeClass(_ctx.n('wrap')),
|
|
25
23
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
26
24
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
27
25
|
})
|
|
28
|
-
}, [_createElementVNode("div",
|
|
29
|
-
class: _normalizeClass(
|
|
26
|
+
}, [_createElementVNode("div", {
|
|
27
|
+
class: _normalizeClass(_ctx.n())
|
|
28
|
+
}, [_withDirectives((_openBlock(), _createElementBlock("div", {
|
|
29
|
+
class: _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')])),
|
|
30
30
|
style: _normalizeStyle({
|
|
31
31
|
color: _ctx.checked ? _ctx.checkedColor : _ctx.uncheckedColor
|
|
32
32
|
})
|
|
33
33
|
}, [_ctx.checked ? _renderSlot(_ctx.$slots, "checked-icon", {
|
|
34
34
|
key: 0
|
|
35
35
|
}, () => [_createVNode(_component_var_icon, {
|
|
36
|
-
class: _normalizeClass(
|
|
36
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('icon'), [_ctx.withAnimation, _ctx.n('--with-animation')])),
|
|
37
37
|
name: "checkbox-marked",
|
|
38
38
|
size: _ctx.iconSize,
|
|
39
39
|
"var-checkbox-cover": ""
|
|
@@ -42,7 +42,7 @@ export function render(_ctx, _cache) {
|
|
|
42
42
|
, ["class", "size"])]) : _renderSlot(_ctx.$slots, "unchecked-icon", {
|
|
43
43
|
key: 1
|
|
44
44
|
}, () => [_createVNode(_component_var_icon, {
|
|
45
|
-
class: _normalizeClass(
|
|
45
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('icon'), [_ctx.withAnimation, _ctx.n('--with-animation')])),
|
|
46
46
|
name: "checkbox-blank-outline",
|
|
47
47
|
size: _ctx.iconSize,
|
|
48
48
|
"var-checkbox-cover": ""
|
|
@@ -53,14 +53,18 @@ export function render(_ctx, _cache) {
|
|
|
53
53
|
)), [[_directive_ripple, {
|
|
54
54
|
disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
|
|
55
55
|
}]]), _createElementVNode("div", {
|
|
56
|
-
class: _normalizeClass(
|
|
56
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('text'), [_ctx.errorMessage || _ctx.checkboxGroupErrorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')]))
|
|
57
57
|
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
58
58
|
/* CLASS */
|
|
59
|
-
)]
|
|
59
|
+
)], 2
|
|
60
|
+
/* CLASS */
|
|
61
|
+
), _createVNode(_component_var_form_details, {
|
|
60
62
|
"error-message": _ctx.errorMessage
|
|
61
63
|
}, null, 8
|
|
62
64
|
/* PROPS */
|
|
63
|
-
, ["error-message"])]
|
|
65
|
+
, ["error-message"])], 2
|
|
66
|
+
/* CLASS */
|
|
67
|
+
);
|
|
64
68
|
}
|
|
65
69
|
export default defineComponent({
|
|
66
70
|
render,
|
|
@@ -107,15 +111,13 @@ export default defineComponent({
|
|
|
107
111
|
};
|
|
108
112
|
|
|
109
113
|
var change = changedValue => {
|
|
110
|
-
var _props$onUpdateModel;
|
|
111
|
-
|
|
112
114
|
value.value = changedValue;
|
|
113
115
|
var {
|
|
114
116
|
checkedValue,
|
|
115
117
|
onChange
|
|
116
118
|
} = props;
|
|
117
|
-
(
|
|
118
|
-
onChange
|
|
119
|
+
call(props['onUpdate:modelValue'], value.value);
|
|
120
|
+
call(onChange, value.value);
|
|
119
121
|
validateWithTrigger('onChange');
|
|
120
122
|
changedValue === checkedValue ? checkboxGroup == null ? void 0 : checkboxGroup.onChecked(checkedValue) : checkboxGroup == null ? void 0 : checkboxGroup.onUnchecked(checkedValue);
|
|
121
123
|
};
|
|
@@ -133,7 +135,7 @@ export default defineComponent({
|
|
|
133
135
|
return;
|
|
134
136
|
}
|
|
135
137
|
|
|
136
|
-
onClick
|
|
138
|
+
call(onClick, e);
|
|
137
139
|
|
|
138
140
|
if (form != null && form.readonly.value || readonly) {
|
|
139
141
|
return;
|
|
@@ -163,9 +165,7 @@ export default defineComponent({
|
|
|
163
165
|
|
|
164
166
|
|
|
165
167
|
var reset = () => {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
(_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, props.uncheckedValue);
|
|
168
|
+
call(props['onUpdate:modelValue'], props.uncheckedValue);
|
|
169
169
|
resetValidation();
|
|
170
170
|
}; // expose
|
|
171
171
|
|
|
@@ -201,8 +201,8 @@ export default defineComponent({
|
|
|
201
201
|
reset,
|
|
202
202
|
resetWithAnimation
|
|
203
203
|
};
|
|
204
|
-
bindCheckboxGroup
|
|
205
|
-
bindForm
|
|
204
|
+
call(bindCheckboxGroup, checkboxProvider);
|
|
205
|
+
call(bindForm, checkboxProvider);
|
|
206
206
|
return {
|
|
207
207
|
withAnimation,
|
|
208
208
|
checked,
|
|
@@ -210,6 +210,8 @@ export default defineComponent({
|
|
|
210
210
|
checkboxGroupErrorMessage: checkboxGroup == null ? void 0 : checkboxGroup.errorMessage,
|
|
211
211
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
212
212
|
formReadonly: form == null ? void 0 : form.readonly,
|
|
213
|
+
n,
|
|
214
|
+
classes,
|
|
213
215
|
handleClick,
|
|
214
216
|
toggle,
|
|
215
217
|
reset,
|