@varlet/ui 2.8.6 → 2.9.0-alpha.1678371604765
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/breadcrumb/provide.mjs +4 -6
- package/es/breadcrumbs/provide.mjs +3 -6
- package/es/button/Button.mjs +17 -2
- package/es/button/button.css +1 -1
- package/es/button/props.mjs +3 -7
- package/es/fab/Fab.mjs +182 -0
- package/es/fab/fab.css +1 -0
- package/es/fab/index.mjs +9 -0
- package/es/fab/props.mjs +91 -0
- package/es/fab/style/index.mjs +2 -0
- package/es/hover/index.mjs +5 -2
- package/es/icon/Icon.mjs +10 -7
- package/es/icon/icon.css +1 -1
- package/es/icon/props.mjs +3 -0
- package/es/index.bundle.mjs +7 -1
- package/es/index.mjs +6 -1
- package/es/menu/props.mjs +3 -0
- package/es/menu/usePopover.mjs +4 -1
- package/es/option/Option.mjs +3 -8
- package/es/select/Select.mjs +1 -0
- package/es/snackbar/style/index.mjs +1 -1
- package/es/space/Space.mjs +3 -21
- package/es/style.css +1 -1
- package/es/style.mjs +1 -0
- package/es/tab/provide.mjs +4 -6
- package/es/tab-item/provide.mjs +4 -6
- package/es/tabs/provide.mjs +3 -6
- package/es/tabs-items/provide.mjs +3 -6
- package/es/tooltip/props.mjs +3 -0
- package/es/utils/components.mjs +19 -1
- package/es/varlet.esm.js +5659 -5367
- package/highlight/web-types.en-US.json +238 -3
- package/highlight/web-types.zh-CN.json +238 -3
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +845 -488
- package/package.json +6 -6
- package/types/fab.d.ts +55 -0
- package/types/icon.d.ts +1 -0
- package/types/index.d.ts +2 -0
- package/types/menu.d.ts +1 -0
- package/types/tooltip.d.ts +1 -0
- package/umd/varlet.js +5 -6
package/es/style.mjs
CHANGED
|
@@ -25,6 +25,7 @@ import './date-picker/style/index.mjs'
|
|
|
25
25
|
import './dialog/style/index.mjs'
|
|
26
26
|
import './divider/style/index.mjs'
|
|
27
27
|
import './ellipsis/style/index.mjs'
|
|
28
|
+
import './fab/style/index.mjs'
|
|
28
29
|
import './form/style/index.mjs'
|
|
29
30
|
import './form-details/style/index.mjs'
|
|
30
31
|
import './hover/style/index.mjs'
|
package/es/tab/provide.mjs
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TABS_BIND_TAB_KEY
|
|
1
|
+
import { useParent } from '@varlet/use';
|
|
2
|
+
import { TABS_BIND_TAB_KEY } from '../tabs/provide.mjs';
|
|
3
3
|
export function useTabs() {
|
|
4
4
|
var {
|
|
5
5
|
parentProvider,
|
|
6
|
-
bindParent
|
|
7
|
-
} = useParent(TABS_BIND_TAB_KEY);
|
|
8
|
-
var {
|
|
6
|
+
bindParent,
|
|
9
7
|
index
|
|
10
|
-
} =
|
|
8
|
+
} = useParent(TABS_BIND_TAB_KEY);
|
|
11
9
|
|
|
12
10
|
if (!parentProvider || !bindParent || !index) {
|
|
13
11
|
throw Error('<var-tab/> must in <var-tabs/>');
|
package/es/tab-item/provide.mjs
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TABS_ITEMS_BIND_TAB_ITEM_KEY
|
|
1
|
+
import { useParent } from '@varlet/use';
|
|
2
|
+
import { TABS_ITEMS_BIND_TAB_ITEM_KEY } from '../tabs-items/provide.mjs';
|
|
3
3
|
export function useTabsItems() {
|
|
4
4
|
var {
|
|
5
5
|
parentProvider,
|
|
6
|
-
bindParent
|
|
7
|
-
} = useParent(TABS_ITEMS_BIND_TAB_ITEM_KEY);
|
|
8
|
-
var {
|
|
6
|
+
bindParent,
|
|
9
7
|
index
|
|
10
|
-
} =
|
|
8
|
+
} = useParent(TABS_ITEMS_BIND_TAB_ITEM_KEY);
|
|
11
9
|
|
|
12
10
|
if (!parentProvider || !bindParent || !index) {
|
|
13
11
|
throw Error('<var-tab-item/> must in <var-tabs-items/>');
|
package/es/tabs/provide.mjs
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useChildren } from '@varlet/use';
|
|
2
2
|
export var TABS_BIND_TAB_KEY = Symbol('TABS_BIND_TAB_KEY');
|
|
3
|
-
export var TABS_COUNT_TAB_KEY = Symbol('TABS_COUNT_TAB_KEY');
|
|
4
3
|
export function useTabList() {
|
|
5
4
|
var {
|
|
6
5
|
childProviders,
|
|
7
|
-
bindChildren
|
|
8
|
-
} = useChildren(TABS_BIND_TAB_KEY);
|
|
9
|
-
var {
|
|
6
|
+
bindChildren,
|
|
10
7
|
length
|
|
11
|
-
} =
|
|
8
|
+
} = useChildren(TABS_BIND_TAB_KEY);
|
|
12
9
|
return {
|
|
13
10
|
length,
|
|
14
11
|
tabList: childProviders,
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useChildren } from '@varlet/use';
|
|
2
2
|
export var TABS_ITEMS_BIND_TAB_ITEM_KEY = Symbol('TABS_ITEMS_BIND_TAB_ITEM_KEY');
|
|
3
|
-
export var TABS_ITEMS_COUNT_TAB_ITEM_KEY = Symbol('TABS_ITEMS_COUNT_TAB_ITEM_KEY');
|
|
4
3
|
export function useTabItem() {
|
|
5
4
|
var {
|
|
6
5
|
bindChildren,
|
|
7
|
-
childProviders
|
|
8
|
-
} = useChildren(TABS_ITEMS_BIND_TAB_ITEM_KEY);
|
|
9
|
-
var {
|
|
6
|
+
childProviders,
|
|
10
7
|
length
|
|
11
|
-
} =
|
|
8
|
+
} = useChildren(TABS_ITEMS_BIND_TAB_ITEM_KEY);
|
|
12
9
|
return {
|
|
13
10
|
length,
|
|
14
11
|
tabItemList: childProviders,
|
package/es/tooltip/props.mjs
CHANGED
package/es/utils/components.mjs
CHANGED
|
@@ -9,7 +9,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
9
9
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
10
10
|
|
|
11
11
|
import { useEventListener } from '@varlet/use';
|
|
12
|
-
import { createApp, h, getCurrentInstance, inject, onUnmounted, computed, provide, reactive, isVNode, onMounted, onBeforeUnmount, nextTick, ref, onActivated, onDeactivated } from 'vue';
|
|
12
|
+
import { createApp, h, getCurrentInstance, inject, onUnmounted, computed, provide, reactive, isVNode, onMounted, onBeforeUnmount, nextTick, ref, onActivated, onDeactivated, Comment, Fragment } from 'vue';
|
|
13
13
|
import { isArray, removeItem } from '@varlet/shared';
|
|
14
14
|
export function pickProps(props, propsKey) {
|
|
15
15
|
return Array.isArray(propsKey) ? propsKey.reduce((pickedProps, key) => {
|
|
@@ -53,6 +53,24 @@ export function mountInstance(component, props, eventListener) {
|
|
|
53
53
|
unmountInstance: unmount
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
+
export function flatFragment(vNodes) {
|
|
57
|
+
var result = [];
|
|
58
|
+
vNodes.forEach(vNode => {
|
|
59
|
+
if (vNode.type === Comment) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (vNode.type === Fragment && isArray(vNode.children)) {
|
|
64
|
+
vNode.children.forEach(item => {
|
|
65
|
+
result.push(item);
|
|
66
|
+
});
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
result.push(vNode);
|
|
71
|
+
});
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
56
74
|
export function flatVNodes(subTree) {
|
|
57
75
|
var vNodes = [];
|
|
58
76
|
|