@varlet/ui 2.16.7 → 2.16.8-alpha.1695227124357
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.mjs +97 -67
- package/es/action-sheet/index.mjs +43 -28
- package/es/action-sheet/props.mjs +39 -8
- package/es/app-bar/AppBar.mjs +129 -56
- package/es/app-bar/index.mjs +10 -5
- package/es/app-bar/props.mjs +6 -3
- package/es/avatar/Avatar.mjs +97 -87
- package/es/avatar/index.mjs +10 -5
- package/es/avatar/props.mjs +8 -5
- package/es/avatar-group/AvatarGroup.mjs +26 -20
- package/es/avatar-group/index.mjs +10 -5
- package/es/avatar-group/props.mjs +5 -2
- package/es/back-top/BackTop.mjs +71 -53
- package/es/back-top/index.mjs +10 -5
- package/es/back-top/props.mjs +6 -3
- package/es/badge/Badge.mjs +74 -46
- package/es/badge/index.mjs +10 -5
- package/es/badge/props.mjs +7 -4
- package/es/bottom-navigation/BottomNavigation.mjs +100 -97
- package/es/bottom-navigation/index.mjs +10 -5
- package/es/bottom-navigation/props.mjs +7 -4
- package/es/bottom-navigation/provide.mjs +13 -9
- package/es/bottom-navigation-item/BottomNavigationItem.mjs +93 -74
- package/es/bottom-navigation-item/index.mjs +10 -5
- package/es/bottom-navigation-item/props.mjs +7 -4
- package/es/bottom-navigation-item/provide.mjs +14 -11
- package/es/breadcrumb/Breadcrumb.mjs +51 -36
- package/es/breadcrumb/index.mjs +10 -5
- package/es/breadcrumb/props.mjs +6 -3
- package/es/breadcrumb/provide.mjs +12 -11
- package/es/breadcrumbs/Breadcrumbs.mjs +26 -24
- package/es/breadcrumbs/index.mjs +10 -5
- package/es/breadcrumbs/props.mjs +6 -3
- package/es/breadcrumbs/provide.mjs +11 -9
- package/es/button/Button.mjs +88 -90
- package/es/button/index.mjs +10 -5
- package/es/button/props.mjs +31 -10
- package/es/button/provide.mjs +8 -9
- package/es/button-group/ButtonGroup.mjs +38 -26
- package/es/button-group/index.mjs +8 -4
- package/es/button-group/props.mjs +8 -5
- package/es/button-group/provide.mjs +9 -9
- package/es/card/Card.mjs +292 -189
- package/es/card/index.mjs +10 -5
- package/es/card/props.mjs +9 -6
- package/es/cell/Cell.mjs +96 -52
- package/es/cell/index.mjs +10 -5
- package/es/cell/props.mjs +6 -3
- package/es/checkbox/Checkbox.mjs +136 -130
- package/es/checkbox/index.mjs +10 -5
- package/es/checkbox/props.mjs +9 -6
- package/es/checkbox/provide.mjs +10 -9
- package/es/checkbox-group/CheckboxGroup.mjs +63 -96
- package/es/checkbox-group/index.mjs +10 -5
- package/es/checkbox-group/props.mjs +9 -6
- package/es/checkbox-group/provide.mjs +11 -9
- package/es/chip/Chip.mjs +66 -50
- package/es/chip/index.mjs +10 -5
- package/es/chip/props.mjs +10 -7
- package/es/col/Col.mjs +60 -55
- package/es/col/index.mjs +10 -5
- package/es/col/props.mjs +7 -4
- package/es/col/provide.mjs +8 -9
- package/es/collapse/Collapse.mjs +70 -73
- package/es/collapse/index.mjs +10 -5
- package/es/collapse/props.mjs +7 -4
- package/es/collapse/provide.mjs +11 -9
- package/es/collapse-item/CollapseItem.mjs +156 -93
- package/es/collapse-item/index.mjs +10 -5
- package/es/collapse-item/props.mjs +6 -3
- package/es/collapse-item/provide.mjs +12 -11
- package/es/context/index.mjs +9 -5
- package/es/context/lock.mjs +18 -22
- package/es/context/zIndex.mjs +19 -16
- package/es/countdown/Countdown.mjs +73 -70
- package/es/countdown/index.mjs +10 -5
- package/es/countdown/props.mjs +7 -4
- package/es/counter/Counter.mjs +169 -173
- package/es/counter/index.mjs +10 -5
- package/es/counter/props.mjs +8 -5
- package/es/counter/provide.ts +3 -0
- package/es/date-picker/DatePicker.mjs +411 -304
- package/es/date-picker/index.mjs +10 -5
- package/es/date-picker/props.mjs +71 -45
- package/es/date-picker/src/day-picker-panel.mjs +270 -208
- package/es/date-picker/src/month-picker-panel.mjs +205 -175
- package/es/date-picker/src/panel-header.mjs +101 -83
- package/es/date-picker/src/year-picker-panel.mjs +64 -54
- package/es/dialog/Dialog.mjs +171 -106
- package/es/dialog/index.mjs +49 -33
- package/es/dialog/props.mjs +39 -9
- package/es/divider/Divider.mjs +56 -51
- package/es/divider/index.mjs +10 -5
- package/es/divider/props.mjs +5 -2
- package/es/drag/Drag.mjs +126 -144
- package/es/drag/index.mjs +10 -5
- package/es/drag/props.mjs +8 -5
- package/es/ellipsis/Ellipsis.mjs +81 -50
- package/es/ellipsis/index.mjs +8 -4
- package/es/ellipsis/props.mjs +5 -2
- package/es/fab/Fab.mjs +73 -75
- package/es/fab/index.mjs +8 -4
- package/es/fab/props.mjs +14 -11
- package/es/field-decorator/FieldDecorator.mjs +215 -110
- package/es/field-decorator/props.mjs +9 -6
- package/es/form/Form.mjs +69 -79
- package/es/form/index.mjs +11 -6
- package/es/form/props.mjs +6 -3
- package/es/form/provide.mjs +35 -22
- package/es/form-details/FormDetails.mjs +81 -39
- package/es/form-details/index.mjs +10 -5
- package/es/form-details/props.mjs +7 -4
- package/es/hover/index.mjs +37 -40
- package/es/hover-overlay/HoverOverlay.mjs +18 -14
- package/es/hover-overlay/index.mjs +13 -8
- package/es/hover-overlay/props.mjs +5 -2
- package/es/icon/Icon.mjs +50 -33
- package/es/icon/index.mjs +10 -5
- package/es/icon/props.mjs +7 -4
- package/es/image/Image.mjs +76 -82
- package/es/image/index.mjs +10 -5
- package/es/image/props.mjs +7 -4
- package/es/image-preview/ImagePreview.mjs +176 -193
- package/es/image-preview/index.mjs +44 -30
- package/es/image-preview/props.mjs +34 -9
- package/es/index-anchor/IndexAnchor.mjs +45 -42
- package/es/index-anchor/index.mjs +10 -5
- package/es/index-anchor/props.mjs +5 -2
- package/es/index-anchor/provide.mjs +12 -11
- package/es/index-bar/IndexBar.mjs +130 -131
- package/es/index-bar/index.mjs +10 -5
- package/es/index-bar/props.mjs +6 -3
- package/es/index-bar/provide.mjs +11 -9
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/Input.mjs +231 -247
- package/es/input/index.mjs +10 -5
- package/es/input/props.mjs +38 -8
- package/es/input/provide.ts +3 -0
- package/es/lazy/index.mjs +94 -87
- package/es/link/Link.mjs +39 -45
- package/es/link/index.mjs +10 -5
- package/es/link/props.mjs +8 -5
- package/es/list/List.mjs +144 -97
- package/es/list/index.mjs +10 -5
- package/es/list/props.mjs +8 -5
- package/es/list/provide.mjs +8 -9
- package/es/loading/Loading.mjs +165 -72
- package/es/loading/index.mjs +10 -5
- package/es/loading/props.mjs +7 -4
- package/es/loading-bar/LoadingBar.mjs +19 -16
- package/es/loading-bar/index.mjs +37 -30
- package/es/loading-bar/props.mjs +5 -2
- package/es/locale/en-US.mjs +76 -73
- package/es/locale/index.mjs +52 -41
- package/es/locale/zh-CN.mjs +76 -73
- package/es/menu/Menu.mjs +76 -57
- package/es/menu/index.mjs +10 -5
- package/es/menu/props.mjs +11 -8
- package/es/menu/usePopover.mjs +214 -207
- package/es/option/Option.mjs +86 -70
- package/es/option/index.mjs +10 -5
- package/es/option/props.mjs +5 -2
- package/es/option/provide.mjs +10 -11
- package/es/overlay/Overlay.mjs +29 -31
- package/es/overlay/index.mjs +10 -5
- package/es/overlay/props.mjs +7 -4
- package/es/pagination/Pagination.mjs +334 -202
- package/es/pagination/index.mjs +10 -5
- package/es/pagination/props.mjs +8 -5
- package/es/paper/Paper.mjs +43 -31
- package/es/paper/index.mjs +10 -5
- package/es/paper/props.mjs +6 -3
- package/es/picker/Picker.mjs +288 -224
- package/es/picker/index.mjs +24 -23
- package/es/picker/props.mjs +37 -7
- package/es/popup/Popup.mjs +68 -58
- package/es/popup/index.mjs +10 -5
- package/es/popup/props.mjs +9 -6
- package/es/popup/provide.mjs +12 -15
- package/es/progress/Progress.mjs +233 -116
- package/es/progress/index.mjs +10 -5
- package/es/progress/props.mjs +8 -5
- package/es/pull-refresh/PullRefresh.mjs +136 -116
- package/es/pull-refresh/index.mjs +10 -5
- package/es/pull-refresh/props.mjs +8 -5
- package/es/radio/Radio.mjs +122 -118
- package/es/radio/index.mjs +10 -5
- package/es/radio/props.mjs +8 -5
- package/es/radio/provide.mjs +8 -9
- package/es/radio-group/RadioGroup.mjs +50 -58
- package/es/radio-group/index.mjs +10 -5
- package/es/radio-group/props.mjs +10 -7
- package/es/radio-group/provide.mjs +11 -9
- package/es/rate/Rate.mjs +103 -132
- package/es/rate/index.mjs +10 -5
- package/es/rate/props.mjs +10 -7
- package/es/rate/provide.ts +3 -0
- package/es/result/Empty.mjs +21 -12
- package/es/result/Error.mjs +18 -9
- package/es/result/Info.mjs +18 -9
- package/es/result/Question.mjs +18 -9
- package/es/result/Result.mjs +102 -55
- package/es/result/Success.mjs +84 -40
- package/es/result/Warning.mjs +18 -9
- package/es/result/index.mjs +10 -5
- package/es/result/props.mjs +6 -3
- package/es/ripple/index.mjs +89 -101
- package/es/row/Row.mjs +40 -45
- package/es/row/index.mjs +10 -5
- package/es/row/props.mjs +8 -5
- package/es/row/provide.mjs +9 -9
- package/es/select/Select.mjs +308 -298
- package/es/select/index.mjs +10 -5
- package/es/select/props.mjs +40 -10
- package/es/select/provide.mjs +9 -9
- package/es/skeleton/Skeleton.mjs +182 -71
- package/es/skeleton/index.mjs +10 -5
- package/es/skeleton/props.mjs +5 -2
- package/es/slider/Slider.mjs +310 -260
- package/es/slider/index.mjs +10 -5
- package/es/slider/props.mjs +15 -11
- package/es/slider/provide.ts +3 -0
- package/es/snackbar/Snackbar.mjs +47 -34
- package/es/snackbar/core.mjs +140 -77
- package/es/snackbar/index.mjs +111 -97
- package/es/snackbar/props.mjs +35 -14
- package/es/space/Space.mjs +30 -28
- package/es/space/index.mjs +10 -5
- package/es/space/margin.mjs +22 -23
- package/es/space/props.mjs +8 -5
- package/es/step/Step.mjs +96 -74
- package/es/step/index.mjs +10 -5
- package/es/step/props.mjs +6 -3
- package/es/step/provide.mjs +10 -11
- package/es/steps/Steps.mjs +31 -30
- package/es/steps/index.mjs +10 -5
- package/es/steps/props.mjs +7 -4
- package/es/steps/provide.mjs +9 -8
- package/es/sticky/Sticky.mjs +104 -92
- package/es/sticky/index.mjs +10 -5
- package/es/sticky/props.mjs +6 -3
- package/es/style-provider/StyleProvider.mjs +19 -18
- package/es/style-provider/index.mjs +15 -11
- package/es/style-provider/props.mjs +6 -3
- package/es/swipe/Swipe.mjs +281 -268
- package/es/swipe/index.mjs +10 -5
- package/es/swipe/props.mjs +6 -3
- package/es/swipe/provide.mjs +11 -9
- package/es/swipe-item/SwipeItem.mjs +29 -29
- package/es/swipe-item/index.mjs +8 -4
- package/es/swipe-item/provide.mjs +10 -11
- package/es/switch/Switch.mjs +143 -103
- package/es/switch/index.mjs +10 -5
- package/es/switch/props.mjs +7 -4
- package/es/switch/provide.ts +3 -0
- package/es/tab/Tab.mjs +48 -61
- package/es/tab/index.mjs +10 -5
- package/es/tab/props.mjs +6 -3
- package/es/tab/provide.mjs +10 -11
- package/es/tab-item/TabItem.mjs +27 -32
- package/es/tab-item/index.mjs +10 -5
- package/es/tab-item/props.mjs +5 -2
- package/es/tab-item/provide.mjs +17 -18
- package/es/table/Table.mjs +54 -25
- package/es/table/index.mjs +10 -5
- package/es/table/props.mjs +6 -3
- package/es/tabs/Tabs.mjs +162 -134
- package/es/tabs/index.mjs +10 -5
- package/es/tabs/props.mjs +15 -12
- package/es/tabs/provide.mjs +9 -9
- package/es/tabs-items/TabsItems.mjs +61 -65
- package/es/tabs-items/index.mjs +10 -5
- package/es/tabs-items/props.mjs +7 -4
- package/es/tabs-items/provide.mjs +11 -9
- package/es/themes/dark/actionSheet.mjs +8 -5
- package/es/themes/dark/appBar.mjs +6 -3
- package/es/themes/dark/avatar.mjs +7 -4
- package/es/themes/dark/badge.mjs +6 -3
- package/es/themes/dark/bottomNavigation.mjs +7 -4
- package/es/themes/dark/bottomNavigationItem.mjs +6 -3
- package/es/themes/dark/breadcrumb.mjs +6 -3
- package/es/themes/dark/button.mjs +7 -4
- package/es/themes/dark/card.mjs +10 -7
- package/es/themes/dark/cell.mjs +7 -4
- package/es/themes/dark/checkbox.mjs +7 -4
- package/es/themes/dark/chip.mjs +7 -4
- package/es/themes/dark/collapse.mjs +8 -5
- package/es/themes/dark/countdown.mjs +6 -3
- package/es/themes/dark/datePicker.mjs +10 -7
- package/es/themes/dark/dialog.mjs +8 -5
- package/es/themes/dark/divider.mjs +7 -4
- package/es/themes/dark/fieldDecorator.mjs +7 -4
- package/es/themes/dark/index.mjs +69 -51
- package/es/themes/dark/link.mjs +6 -3
- package/es/themes/dark/menu.mjs +6 -3
- package/es/themes/dark/option.mjs +6 -3
- package/es/themes/dark/pagination.mjs +11 -8
- package/es/themes/dark/paper.mjs +6 -3
- package/es/themes/dark/picker.mjs +11 -8
- package/es/themes/dark/popup.mjs +6 -3
- package/es/themes/dark/progress.mjs +6 -3
- package/es/themes/dark/pullRefresh.mjs +6 -3
- package/es/themes/dark/radio.mjs +7 -4
- package/es/themes/dark/result.mjs +12 -9
- package/es/themes/dark/select.mjs +6 -3
- package/es/themes/dark/skeleton.mjs +11 -6
- package/es/themes/dark/steps.mjs +8 -5
- package/es/themes/dark/switch.mjs +7 -4
- package/es/themes/dark/tab.mjs +6 -3
- package/es/themes/dark/table.mjs +12 -9
- package/es/themes/dark/tabs.mjs +6 -3
- package/es/themes/dark/timePicker.mjs +9 -6
- package/es/themes/dark/uploader.mjs +10 -7
- package/es/themes/dark/watermark.mjs +6 -3
- package/es/themes/index.mjs +7 -5
- package/es/time-picker/TimePicker.mjs +297 -232
- package/es/time-picker/clock.mjs +222 -172
- package/es/time-picker/index.mjs +10 -5
- package/es/time-picker/props.mjs +14 -8
- package/es/time-picker/utils.mjs +46 -86
- package/es/tooltip/Tooltip.mjs +82 -62
- package/es/tooltip/index.mjs +10 -5
- package/es/tooltip/props.mjs +12 -9
- package/es/uploader/Uploader.mjs +315 -308
- package/es/uploader/index.mjs +10 -5
- package/es/uploader/props.mjs +10 -7
- package/es/uploader/provide.ts +3 -0
- package/es/utils/components.mjs +155 -131
- package/es/utils/elements.mjs +106 -123
- package/es/utils/logger.mjs +9 -5
- package/es/utils/shared.mjs +25 -23
- package/es/utils/test.mjs +105 -93
- package/es/varlet.esm.js +12426 -13450
- package/es/watermark/Watermark.mjs +191 -109
- package/es/watermark/index.mjs +8 -4
- package/es/watermark/props.mjs +8 -5
- package/highlight/web-types.en-US.json +6 -6
- package/highlight/web-types.zh-CN.json +5 -5
- package/lib/varlet.cjs.js +9233 -10194
- package/package.json +7 -7
- package/types/progress.d.ts +1 -1
- package/umd/varlet.js +5 -4
- package/es/counter/provide.mjs +0 -1
- package/es/input/provide.mjs +0 -1
- package/es/rate/provide.mjs +0 -1
- package/es/slider/provide.mjs +0 -1
- package/es/switch/provide.mjs +0 -1
- package/es/uploader/provide.mjs +0 -1
package/es/tab/Tab.mjs
CHANGED
|
@@ -1,84 +1,68 @@
|
|
|
1
|
-
import Ripple from
|
|
2
|
-
import { defineComponent, ref, computed, watch } from
|
|
3
|
-
import { props } from
|
|
4
|
-
import { call, createNamespace } from
|
|
5
|
-
import { useTabs } from
|
|
6
|
-
|
|
7
|
-
name,
|
|
8
|
-
n,
|
|
9
|
-
classes
|
|
10
|
-
} = createNamespace('tab');
|
|
1
|
+
import Ripple from "../ripple/index.mjs";
|
|
2
|
+
import { defineComponent, ref, computed, watch } from "vue";
|
|
3
|
+
import { props } from "./props.mjs";
|
|
4
|
+
import { call, createNamespace } from "../utils/components.mjs";
|
|
5
|
+
import { useTabs } from "./provide.mjs";
|
|
6
|
+
const { name, n, classes } = createNamespace("tab");
|
|
11
7
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives } from "vue";
|
|
12
8
|
function __render__(_ctx, _cache) {
|
|
13
|
-
|
|
14
|
-
return _withDirectives((_openBlock(), _createElementBlock(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
const _directive_ripple = _resolveDirective("ripple");
|
|
10
|
+
return _withDirectives((_openBlock(), _createElementBlock(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box"), _ctx.computeColorClass(), _ctx.n(`--${_ctx.itemDirection}`))),
|
|
14
|
+
ref: "tabEl",
|
|
15
|
+
style: _normalizeStyle({
|
|
16
|
+
color: _ctx.computeColorStyle()
|
|
17
|
+
}),
|
|
18
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
19
|
+
},
|
|
20
|
+
[
|
|
21
|
+
_renderSlot(_ctx.$slots, "default")
|
|
22
|
+
],
|
|
23
|
+
6
|
|
24
|
+
/* CLASS, STYLE */
|
|
25
|
+
)), [
|
|
26
|
+
[_directive_ripple, { disabled: _ctx.disabled }]
|
|
27
|
+
]);
|
|
26
28
|
}
|
|
27
|
-
|
|
29
|
+
const __sfc__ = defineComponent({
|
|
28
30
|
name,
|
|
29
|
-
directives: {
|
|
30
|
-
Ripple
|
|
31
|
-
},
|
|
31
|
+
directives: { Ripple },
|
|
32
32
|
props,
|
|
33
|
-
setup(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} = useTabs();
|
|
43
|
-
var {
|
|
44
|
-
onTabClick,
|
|
45
|
-
active,
|
|
46
|
-
activeColor,
|
|
47
|
-
inactiveColor,
|
|
48
|
-
disabledColor,
|
|
49
|
-
itemDirection,
|
|
50
|
-
resize
|
|
51
|
-
} = tabs;
|
|
52
|
-
var tabProvider = {
|
|
53
|
-
name,
|
|
33
|
+
setup(props2) {
|
|
34
|
+
const tabEl = ref(null);
|
|
35
|
+
const element = computed(() => tabEl.value);
|
|
36
|
+
const name2 = computed(() => props2.name);
|
|
37
|
+
const disabled = computed(() => props2.disabled);
|
|
38
|
+
const { index, tabs, bindTabs } = useTabs();
|
|
39
|
+
const { onTabClick, active, activeColor, inactiveColor, disabledColor, itemDirection, resize } = tabs;
|
|
40
|
+
const tabProvider = {
|
|
41
|
+
name: name2,
|
|
54
42
|
index,
|
|
55
43
|
disabled,
|
|
56
44
|
element
|
|
57
45
|
};
|
|
58
46
|
bindTabs(tabProvider);
|
|
59
|
-
watch(() => [
|
|
47
|
+
watch(() => [props2.name, props2.disabled], resize);
|
|
60
48
|
function shouldActive() {
|
|
61
|
-
if (
|
|
62
|
-
return active.value ===
|
|
49
|
+
if (props2.name != null) {
|
|
50
|
+
return active.value === props2.name;
|
|
63
51
|
}
|
|
64
52
|
return active.value === (index == null ? void 0 : index.value);
|
|
65
53
|
}
|
|
66
54
|
function computeColorStyle() {
|
|
67
|
-
return
|
|
55
|
+
return props2.disabled ? disabledColor.value : shouldActive() ? activeColor.value : inactiveColor.value;
|
|
68
56
|
}
|
|
69
57
|
function computeColorClass() {
|
|
70
|
-
return
|
|
58
|
+
return props2.disabled ? n("$-tab--disabled") : shouldActive() ? n("$-tab--active") : n("$-tab--inactive");
|
|
71
59
|
}
|
|
72
60
|
function handleClick(event) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
name,
|
|
76
|
-
onClick
|
|
77
|
-
} = props;
|
|
78
|
-
if (disabled) {
|
|
61
|
+
const { disabled: disabled2, name: name3, onClick } = props2;
|
|
62
|
+
if (disabled2) {
|
|
79
63
|
return;
|
|
80
64
|
}
|
|
81
|
-
call(onClick,
|
|
65
|
+
call(onClick, name3 != null ? name3 : index.value, event);
|
|
82
66
|
onTabClick(tabProvider);
|
|
83
67
|
}
|
|
84
68
|
return {
|
|
@@ -96,4 +80,7 @@ var __sfc__ = defineComponent({
|
|
|
96
80
|
}
|
|
97
81
|
});
|
|
98
82
|
__sfc__.render = __render__;
|
|
99
|
-
|
|
83
|
+
var stdin_default = __sfc__;
|
|
84
|
+
export {
|
|
85
|
+
stdin_default as default
|
|
86
|
+
};
|
package/es/tab/index.mjs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import Tab from
|
|
2
|
-
import { withInstall } from
|
|
1
|
+
import Tab from "./Tab.mjs";
|
|
2
|
+
import { withInstall } from "../utils/components.mjs";
|
|
3
3
|
withInstall(Tab);
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { props } from "./props.mjs";
|
|
5
|
+
const _TabComponent = Tab;
|
|
6
|
+
var stdin_default = Tab;
|
|
7
|
+
export {
|
|
8
|
+
_TabComponent,
|
|
9
|
+
stdin_default as default,
|
|
10
|
+
props as tabProps
|
|
11
|
+
};
|
package/es/tab/props.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { defineListenerProp } from
|
|
2
|
-
|
|
1
|
+
import { defineListenerProp } from "../utils/components.mjs";
|
|
2
|
+
const props = {
|
|
3
3
|
name: [String, Number],
|
|
4
4
|
disabled: Boolean,
|
|
5
5
|
onClick: defineListenerProp()
|
|
6
|
-
};
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
props
|
|
9
|
+
};
|
package/es/tab/provide.mjs
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { useParent } from
|
|
2
|
-
import { error } from
|
|
3
|
-
import { TABS_BIND_TAB_KEY } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
parentProvider,
|
|
7
|
-
bindParent,
|
|
8
|
-
index
|
|
9
|
-
} = useParent(TABS_BIND_TAB_KEY);
|
|
1
|
+
import { useParent } from "@varlet/use";
|
|
2
|
+
import { error } from "../utils/logger.mjs";
|
|
3
|
+
import { TABS_BIND_TAB_KEY } from "../tabs/provide.mjs";
|
|
4
|
+
function useTabs() {
|
|
5
|
+
const { parentProvider, bindParent, index } = useParent(TABS_BIND_TAB_KEY);
|
|
10
6
|
if (!bindParent) {
|
|
11
|
-
error(
|
|
7
|
+
error("Tab", "<var-tab/> must in <var-tabs/>");
|
|
12
8
|
}
|
|
13
9
|
return {
|
|
14
10
|
index,
|
|
15
11
|
tabs: parentProvider,
|
|
16
12
|
bindTabs: bindParent
|
|
17
13
|
};
|
|
18
|
-
}
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
useTabs
|
|
17
|
+
};
|
package/es/tab-item/TabItem.mjs
CHANGED
|
@@ -1,43 +1,35 @@
|
|
|
1
|
-
import VarSwipeItem from
|
|
2
|
-
import { defineComponent, ref, computed } from
|
|
3
|
-
import { useTabsItems, useLists } from
|
|
4
|
-
import { props } from
|
|
5
|
-
import { createNamespace } from
|
|
6
|
-
|
|
7
|
-
name,
|
|
8
|
-
n,
|
|
9
|
-
classes
|
|
10
|
-
} = createNamespace('tab-item');
|
|
1
|
+
import VarSwipeItem from "../swipe-item/index.mjs";
|
|
2
|
+
import { defineComponent, ref, computed } from "vue";
|
|
3
|
+
import { useTabsItems, useLists } from "./provide.mjs";
|
|
4
|
+
import { props } from "./props.mjs";
|
|
5
|
+
import { createNamespace } from "../utils/components.mjs";
|
|
6
|
+
const { name, n, classes } = createNamespace("tab-item");
|
|
11
7
|
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
12
8
|
function __render__(_ctx, _cache) {
|
|
13
|
-
|
|
9
|
+
const _component_var_swipe_item = _resolveComponent("var-swipe-item");
|
|
14
10
|
return _openBlock(), _createBlock(_component_var_swipe_item, {
|
|
15
|
-
class: _normalizeClass(_ctx.classes(_ctx.n(), [!_ctx.current, _ctx.n(
|
|
11
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [!_ctx.current, _ctx.n("--inactive")])),
|
|
16
12
|
"var-tab-item-cover": ""
|
|
17
13
|
}, {
|
|
18
|
-
default: _withCtx(() => [
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
default: _withCtx(() => [
|
|
15
|
+
_renderSlot(_ctx.$slots, "default")
|
|
16
|
+
]),
|
|
17
|
+
_: 3
|
|
18
|
+
/* FORWARDED */
|
|
19
|
+
}, 8, ["class"]);
|
|
21
20
|
}
|
|
22
|
-
|
|
21
|
+
const __sfc__ = defineComponent({
|
|
23
22
|
name,
|
|
24
|
-
components: {
|
|
25
|
-
VarSwipeItem
|
|
26
|
-
},
|
|
23
|
+
components: { VarSwipeItem },
|
|
27
24
|
props,
|
|
28
|
-
setup(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} = useTabsItems();
|
|
35
|
-
var {
|
|
36
|
-
bindLists
|
|
37
|
-
} = useLists();
|
|
38
|
-
var tabItemProvider = {
|
|
25
|
+
setup(props2) {
|
|
26
|
+
const current = ref(false);
|
|
27
|
+
const name2 = computed(() => props2.name);
|
|
28
|
+
const { index, bindTabsItems } = useTabsItems();
|
|
29
|
+
const { bindLists } = useLists();
|
|
30
|
+
const tabItemProvider = {
|
|
39
31
|
index,
|
|
40
|
-
name,
|
|
32
|
+
name: name2,
|
|
41
33
|
current: computed(() => current.value),
|
|
42
34
|
setCurrent
|
|
43
35
|
};
|
|
@@ -54,4 +46,7 @@ var __sfc__ = defineComponent({
|
|
|
54
46
|
}
|
|
55
47
|
});
|
|
56
48
|
__sfc__.render = __render__;
|
|
57
|
-
|
|
49
|
+
var stdin_default = __sfc__;
|
|
50
|
+
export {
|
|
51
|
+
stdin_default as default
|
|
52
|
+
};
|
package/es/tab-item/index.mjs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import TabItem from
|
|
2
|
-
import { withInstall } from
|
|
1
|
+
import TabItem from "./TabItem.mjs";
|
|
2
|
+
import { withInstall } from "../utils/components.mjs";
|
|
3
3
|
withInstall(TabItem);
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { props } from "./props.mjs";
|
|
5
|
+
const _TabItemComponent = TabItem;
|
|
6
|
+
var stdin_default = TabItem;
|
|
7
|
+
export {
|
|
8
|
+
_TabItemComponent,
|
|
9
|
+
stdin_default as default,
|
|
10
|
+
props as tabItemProps
|
|
11
|
+
};
|
package/es/tab-item/props.mjs
CHANGED
package/es/tab-item/provide.mjs
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { useChildren, useParent } from
|
|
2
|
-
import { error } from
|
|
3
|
-
import { TABS_ITEMS_BIND_TAB_ITEM_KEY } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
index
|
|
10
|
-
} = useParent(TABS_ITEMS_BIND_TAB_ITEM_KEY);
|
|
1
|
+
import { useChildren, useParent } from "@varlet/use";
|
|
2
|
+
import { error } from "../utils/logger.mjs";
|
|
3
|
+
import { TABS_ITEMS_BIND_TAB_ITEM_KEY } from "../tabs-items/provide.mjs";
|
|
4
|
+
const TAB_ITEM_BIND_LIST_KEY = Symbol("TAB_ITEM_BIND_LIST_KEY");
|
|
5
|
+
function useTabsItems() {
|
|
6
|
+
const { parentProvider, bindParent, index } = useParent(
|
|
7
|
+
TABS_ITEMS_BIND_TAB_ITEM_KEY
|
|
8
|
+
);
|
|
11
9
|
if (!bindParent) {
|
|
12
|
-
error(
|
|
10
|
+
error("TabItem", "<var-tab-item/> must in <var-tabs-items/>");
|
|
13
11
|
}
|
|
14
12
|
return {
|
|
15
13
|
index,
|
|
@@ -17,15 +15,16 @@ export function useTabsItems() {
|
|
|
17
15
|
bindTabsItems: bindParent
|
|
18
16
|
};
|
|
19
17
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
childProviders,
|
|
23
|
-
bindChildren,
|
|
24
|
-
length
|
|
25
|
-
} = useChildren(TAB_ITEM_BIND_LIST_KEY);
|
|
18
|
+
function useLists() {
|
|
19
|
+
const { childProviders, bindChildren, length } = useChildren(TAB_ITEM_BIND_LIST_KEY);
|
|
26
20
|
return {
|
|
27
21
|
length,
|
|
28
22
|
lists: childProviders,
|
|
29
23
|
bindLists: bindChildren
|
|
30
24
|
};
|
|
31
|
-
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
TAB_ITEM_BIND_LIST_KEY,
|
|
28
|
+
useLists,
|
|
29
|
+
useTabsItems
|
|
30
|
+
};
|
package/es/table/Table.mjs
CHANGED
|
@@ -1,30 +1,56 @@
|
|
|
1
|
-
import { defineComponent } from
|
|
2
|
-
import { toSizeUnit } from
|
|
3
|
-
import { createNamespace, formatElevation } from
|
|
4
|
-
import { props } from
|
|
5
|
-
|
|
6
|
-
name,
|
|
7
|
-
n,
|
|
8
|
-
classes
|
|
9
|
-
} = createNamespace('table');
|
|
1
|
+
import { defineComponent } from "vue";
|
|
2
|
+
import { toSizeUnit } from "../utils/elements.mjs";
|
|
3
|
+
import { createNamespace, formatElevation } from "../utils/components.mjs";
|
|
4
|
+
import { props } from "./props.mjs";
|
|
5
|
+
const { name, n, classes } = createNamespace("table");
|
|
10
6
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from "vue";
|
|
11
7
|
function __render__(_ctx, _cache) {
|
|
12
|
-
return _openBlock(), _createElementBlock(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
return _openBlock(), _createElementBlock(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.formatElevation(_ctx.elevation, 1), _ctx.n("$--box")))
|
|
12
|
+
},
|
|
13
|
+
[
|
|
14
|
+
_createElementVNode(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
class: _normalizeClass(_ctx.n("main"))
|
|
18
|
+
},
|
|
19
|
+
[
|
|
20
|
+
_createElementVNode(
|
|
21
|
+
"table",
|
|
22
|
+
{
|
|
23
|
+
class: _normalizeClass(_ctx.n("table")),
|
|
24
|
+
style: _normalizeStyle({ width: _ctx.toSizeUnit(_ctx.fullWidth) })
|
|
25
|
+
},
|
|
26
|
+
[
|
|
27
|
+
_renderSlot(_ctx.$slots, "default")
|
|
28
|
+
],
|
|
29
|
+
6
|
|
30
|
+
/* CLASS, STYLE */
|
|
31
|
+
)
|
|
32
|
+
],
|
|
33
|
+
2
|
|
34
|
+
/* CLASS */
|
|
35
|
+
),
|
|
36
|
+
_ctx.$slots.footer ? (_openBlock(), _createElementBlock(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
key: 0,
|
|
40
|
+
class: _normalizeClass(_ctx.n("footer"))
|
|
41
|
+
},
|
|
42
|
+
[
|
|
43
|
+
_renderSlot(_ctx.$slots, "footer")
|
|
44
|
+
],
|
|
45
|
+
2
|
|
46
|
+
/* CLASS */
|
|
47
|
+
)) : _createCommentVNode("v-if", true)
|
|
48
|
+
],
|
|
49
|
+
2
|
|
50
|
+
/* CLASS */
|
|
51
|
+
);
|
|
25
52
|
}
|
|
26
|
-
|
|
27
|
-
var __sfc__ = defineComponent({
|
|
53
|
+
const __sfc__ = defineComponent({
|
|
28
54
|
name,
|
|
29
55
|
props,
|
|
30
56
|
setup: () => ({
|
|
@@ -35,4 +61,7 @@ var __sfc__ = defineComponent({
|
|
|
35
61
|
})
|
|
36
62
|
});
|
|
37
63
|
__sfc__.render = __render__;
|
|
38
|
-
|
|
64
|
+
var stdin_default = __sfc__;
|
|
65
|
+
export {
|
|
66
|
+
stdin_default as default
|
|
67
|
+
};
|
package/es/table/index.mjs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import Table from
|
|
2
|
-
import { withInstall } from
|
|
1
|
+
import Table from "./Table.mjs";
|
|
2
|
+
import { withInstall } from "../utils/components.mjs";
|
|
3
3
|
withInstall(Table);
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { props } from "./props.mjs";
|
|
5
|
+
const _TableComponent = Table;
|
|
6
|
+
var stdin_default = Table;
|
|
7
|
+
export {
|
|
8
|
+
_TableComponent,
|
|
9
|
+
stdin_default as default,
|
|
10
|
+
props as tableProps
|
|
11
|
+
};
|
package/es/table/props.mjs
CHANGED