@varlet/ui 2.13.1-alpha.1689619056304 → 2.13.1
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/index.mjs +3 -7
- package/es/app-bar/index.mjs +2 -3
- package/es/avatar/index.mjs +2 -3
- package/es/avatar-group/index.mjs +2 -3
- package/es/back-top/index.mjs +2 -3
- package/es/badge/index.mjs +2 -3
- package/es/bottom-navigation/index.mjs +2 -3
- package/es/bottom-navigation-item/index.mjs +2 -3
- package/es/breadcrumb/index.mjs +2 -3
- package/es/breadcrumbs/index.mjs +2 -3
- package/es/button/index.mjs +2 -3
- package/es/button-group/index.mjs +2 -4
- package/es/card/index.mjs +2 -3
- package/es/cell/index.mjs +2 -3
- package/es/checkbox/index.mjs +2 -3
- package/es/checkbox-group/index.mjs +2 -3
- package/es/chip/index.mjs +2 -3
- package/es/col/index.mjs +2 -3
- package/es/collapse/index.mjs +2 -3
- package/es/collapse-item/index.mjs +2 -3
- package/es/countdown/index.mjs +2 -3
- package/es/counter/index.mjs +2 -3
- package/es/date-picker/index.mjs +2 -3
- package/es/dialog/index.mjs +3 -7
- package/es/divider/index.mjs +2 -3
- package/es/drag/index.mjs +2 -3
- package/es/ellipsis/index.mjs +2 -3
- package/es/fab/index.mjs +2 -4
- package/es/form/index.mjs +2 -4
- package/es/form-details/index.mjs +2 -3
- package/es/hover-overlay/index.mjs +2 -3
- package/es/icon/index.mjs +2 -3
- package/es/image/index.mjs +2 -3
- package/es/image-preview/index.mjs +3 -7
- package/es/index-anchor/index.mjs +2 -3
- package/es/index-bar/index.mjs +2 -3
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/index.mjs +2 -3
- package/es/link/index.mjs +2 -3
- package/es/list/index.mjs +2 -3
- package/es/loading/index.mjs +2 -3
- package/es/menu/Menu.mjs +3 -1
- package/es/menu/index.mjs +2 -3
- package/es/menu/menu.css +1 -1
- package/es/menu/usePopover.mjs +52 -1
- package/es/option/index.mjs +2 -3
- package/es/overlay/index.mjs +2 -3
- package/es/pagination/index.mjs +2 -3
- package/es/paper/index.mjs +2 -3
- package/es/picker/index.mjs +4 -8
- package/es/popup/index.mjs +2 -3
- package/es/progress/index.mjs +2 -3
- package/es/pull-refresh/index.mjs +2 -3
- package/es/radio/index.mjs +2 -3
- package/es/radio-group/index.mjs +2 -3
- package/es/rate/index.mjs +2 -3
- package/es/result/index.mjs +2 -3
- package/es/row/index.mjs +2 -3
- package/es/select/Select.mjs +1 -1
- package/es/select/index.mjs +2 -3
- package/es/skeleton/index.mjs +2 -3
- package/es/slider/index.mjs +2 -3
- package/es/snackbar/index.mjs +4 -8
- package/es/space/index.mjs +2 -3
- package/es/step/index.mjs +2 -3
- package/es/steps/index.mjs +2 -3
- package/es/sticky/index.mjs +2 -3
- package/es/style-provider/index.mjs +3 -6
- package/es/style.css +1 -1
- package/es/swipe/index.mjs +2 -3
- package/es/swipe-item/index.mjs +2 -3
- package/es/switch/index.mjs +2 -3
- package/es/tab/index.mjs +2 -3
- package/es/tab-item/index.mjs +2 -3
- package/es/table/index.mjs +2 -3
- package/es/tabs/index.mjs +2 -3
- package/es/tabs-items/index.mjs +2 -3
- package/es/time-picker/index.mjs +2 -3
- package/es/tooltip/Tooltip.mjs +3 -1
- package/es/tooltip/index.mjs +2 -3
- package/es/tooltip/tooltip.css +1 -1
- package/es/uploader/index.mjs +2 -3
- package/es/utils/components.mjs +12 -0
- package/es/varlet.esm.js +7052 -7151
- package/highlight/web-types.en-US.json +2 -2
- package/highlight/web-types.zh-CN.json +3 -3
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +154 -247
- package/package.json +6 -6
- package/types/snackbar.d.ts +9 -10
- package/umd/varlet.js +5 -5
package/es/swipe/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Swipe from './Swipe.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(Swipe);
|
|
5
4
|
export { props as swipeProps } from './props.mjs';
|
|
6
5
|
export var _SwipeComponent = Swipe;
|
|
7
6
|
export default Swipe;
|
package/es/swipe-item/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import SwipeItem from './SwipeItem.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(SwipeItem);
|
|
5
4
|
export var _SwipeItemComponent = SwipeItem;
|
|
6
5
|
export default SwipeItem;
|
package/es/switch/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Switch from './Switch.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(Switch);
|
|
5
4
|
export { props as switchProps } from './props.mjs';
|
|
6
5
|
export var _SwitchComponent = Switch;
|
|
7
6
|
export default Switch;
|
package/es/tab/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Tab from './Tab.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(Tab);
|
|
5
4
|
export { props as tabProps } from './props.mjs';
|
|
6
5
|
export var _TabComponent = Tab;
|
|
7
6
|
export default Tab;
|
package/es/tab-item/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import TabItem from './TabItem.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(TabItem);
|
|
5
4
|
export { props as tabItemProps } from './props.mjs';
|
|
6
5
|
export var _TabItemComponent = TabItem;
|
|
7
6
|
export default TabItem;
|
package/es/table/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Table from './Table.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(Table);
|
|
5
4
|
export { props as tableProps } from './props.mjs';
|
|
6
5
|
export var _TableComponent = Table;
|
|
7
6
|
export default Table;
|
package/es/tabs/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Tabs from './Tabs.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(Tabs);
|
|
5
4
|
export { props as tabsProps } from './props.mjs';
|
|
6
5
|
export var _TabsComponent = Tabs;
|
|
7
6
|
export default Tabs;
|
package/es/tabs-items/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import TabsItems from './TabsItems.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(TabsItems);
|
|
5
4
|
export { props as tabsItemsProps } from './props.mjs';
|
|
6
5
|
export var _TabsItemsComponent = TabsItems;
|
|
7
6
|
export default TabsItems;
|
package/es/time-picker/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import TimePicker from './TimePicker.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(TimePicker);
|
|
5
4
|
export { props as timePickerProps } from './props.mjs';
|
|
6
5
|
export var _TimePickerComponent = TimePicker;
|
|
7
6
|
export default TimePicker;
|
package/es/tooltip/Tooltip.mjs
CHANGED
|
@@ -26,7 +26,7 @@ function __render__(_ctx, _cache) {
|
|
|
26
26
|
}, [_createVNode(_Transition, {
|
|
27
27
|
name: _ctx.n(),
|
|
28
28
|
onAfterEnter: _ctx.onOpened,
|
|
29
|
-
onAfterLeave: _ctx.
|
|
29
|
+
onAfterLeave: _ctx.handleClosed,
|
|
30
30
|
persisted: ""
|
|
31
31
|
}, {
|
|
32
32
|
default: _withCtx(() => [_withDirectives(_createElementVNode("div", {
|
|
@@ -69,6 +69,7 @@ var __sfc__ = defineComponent({
|
|
|
69
69
|
handlePopoverMouseenter,
|
|
70
70
|
handlePopoverMouseleave,
|
|
71
71
|
handlePopoverClose,
|
|
72
|
+
handleClosed,
|
|
72
73
|
// expose
|
|
73
74
|
open,
|
|
74
75
|
// expose
|
|
@@ -91,6 +92,7 @@ var __sfc__ = defineComponent({
|
|
|
91
92
|
handleHostMouseleave,
|
|
92
93
|
handlePopoverMouseenter,
|
|
93
94
|
handlePopoverMouseleave,
|
|
95
|
+
handleClosed,
|
|
94
96
|
resize,
|
|
95
97
|
open,
|
|
96
98
|
close
|
package/es/tooltip/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Tooltip from './Tooltip.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(Tooltip);
|
|
5
4
|
export { props as tooltipProps } from './props.mjs';
|
|
6
5
|
export var _TooltipComponent = Tooltip;
|
|
7
6
|
export default Tooltip;
|
package/es/tooltip/tooltip.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --tooltip-opacity: 0.9; --tooltip-border-radius: 4px; --tooltip-font-size: 14px; --tooltip-padding: 8px 16px; --tooltip-default-color: #616161; --tooltip-offset: 10px; --tooltip-primary-color: var(--color-primary); --tooltip-info-color: var(--color-info); --tooltip-success-color: var(--color-success); --tooltip-warning-color: var(--color-warning); --tooltip-danger-color: var(--color-danger);}.var-tooltip-enter-from,.var-tooltip-leave-to { opacity: 0;}.var-tooltip-enter-active,.var-tooltip-leave-active { transition-property: opacity; transition-duration: 0.
|
|
1
|
+
:root { --tooltip-opacity: 0.9; --tooltip-border-radius: 4px; --tooltip-font-size: 14px; --tooltip-padding: 8px 16px; --tooltip-default-color: #616161; --tooltip-offset: 10px; --tooltip-primary-color: var(--color-primary); --tooltip-info-color: var(--color-info); --tooltip-success-color: var(--color-success); --tooltip-warning-color: var(--color-warning); --tooltip-danger-color: var(--color-danger);}.var-tooltip { display: inline-block;}.var-tooltip-enter-from,.var-tooltip-leave-to { opacity: 0; transform: scale(0.8);}.var-tooltip-enter-active,.var-tooltip-leave-active { transition-property: opacity, transform; transition-duration: 0.2s;}.var-tooltip__content-container { display: inline-block; text-align: center; border-radius: var(--tooltip-border-radius); font-size: var(--tooltip-font-size); padding: var(--tooltip-padding); opacity: var(--tooltip-opacity); transition: opacity 0.25s, background-color 0.25s;}.var-tooltip--default { color: #fff; background: var(--tooltip-default-color);}.var-tooltip--primary { color: #fff; background-color: var(--tooltip-primary-color);}.var-tooltip--info { color: #fff; background-color: var(--tooltip-info-color);}.var-tooltip--success { color: #fff; background-color: var(--tooltip-success-color);}.var-tooltip--warning { color: #fff; background-color: var(--tooltip-warning-color);}.var-tooltip--danger { color: #fff; background-color: var(--tooltip-danger-color);}.var-tooltip__tooltip[data-popper-placement='top'] .var-tooltip__content-container,.var-tooltip__tooltip[data-popper-placement='top-start'] .var-tooltip__content-container,.var-tooltip__tooltip[data-popper-placement='top-end'] .var-tooltip__content-container { transform: translateY(calc(-1 * var(--tooltip-offset)));}.var-tooltip__tooltip[data-popper-placement='bottom'] .var-tooltip__content-container,.var-tooltip__tooltip[data-popper-placement='bottom-start'] .var-tooltip__content-container,.var-tooltip__tooltip[data-popper-placement='bottom-end'] .var-tooltip__content-container { transform: translateY(var(--tooltip-offset));}.var-tooltip__tooltip[data-popper-placement='right'] .var-tooltip__content-container,.var-tooltip__tooltip[data-popper-placement='right-start'] .var-tooltip__content-container,.var-tooltip__tooltip[data-popper-placement='right-end'] .var-tooltip__content-container { transform: translateX(var(--tooltip-offset));}.var-tooltip__tooltip[data-popper-placement='left'] .var-tooltip__content-container,.var-tooltip__tooltip[data-popper-placement='left-start'] .var-tooltip__content-container,.var-tooltip__tooltip[data-popper-placement='left-end'] .var-tooltip__content-container { transform: translateX(calc(-1 * var(--tooltip-offset)));}
|
package/es/uploader/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Uploader from './Uploader.mjs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
2
|
+
import { withInstall } from '../utils/components.mjs';
|
|
3
|
+
withInstall(Uploader);
|
|
5
4
|
export { props as uploaderProps } from './props.mjs';
|
|
6
5
|
export var _UploaderComponent = Uploader;
|
|
7
6
|
export default Uploader;
|
package/es/utils/components.mjs
CHANGED
|
@@ -10,6 +10,18 @@ export function pickProps(props, propsKey) {
|
|
|
10
10
|
return pickedProps;
|
|
11
11
|
}, {}) : props[propsKey];
|
|
12
12
|
}
|
|
13
|
+
export function withInstall(component, target) {
|
|
14
|
+
var componentWithInstall = target != null ? target : component;
|
|
15
|
+
componentWithInstall.install = function (app) {
|
|
16
|
+
var {
|
|
17
|
+
name
|
|
18
|
+
} = component;
|
|
19
|
+
if (name) {
|
|
20
|
+
app.component(name, component);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return componentWithInstall;
|
|
24
|
+
}
|
|
13
25
|
export function mount(component) {
|
|
14
26
|
var app = createApp(component);
|
|
15
27
|
var host = document.createElement('div');
|