@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.
Files changed (92) hide show
  1. package/es/action-sheet/index.mjs +3 -7
  2. package/es/app-bar/index.mjs +2 -3
  3. package/es/avatar/index.mjs +2 -3
  4. package/es/avatar-group/index.mjs +2 -3
  5. package/es/back-top/index.mjs +2 -3
  6. package/es/badge/index.mjs +2 -3
  7. package/es/bottom-navigation/index.mjs +2 -3
  8. package/es/bottom-navigation-item/index.mjs +2 -3
  9. package/es/breadcrumb/index.mjs +2 -3
  10. package/es/breadcrumbs/index.mjs +2 -3
  11. package/es/button/index.mjs +2 -3
  12. package/es/button-group/index.mjs +2 -4
  13. package/es/card/index.mjs +2 -3
  14. package/es/cell/index.mjs +2 -3
  15. package/es/checkbox/index.mjs +2 -3
  16. package/es/checkbox-group/index.mjs +2 -3
  17. package/es/chip/index.mjs +2 -3
  18. package/es/col/index.mjs +2 -3
  19. package/es/collapse/index.mjs +2 -3
  20. package/es/collapse-item/index.mjs +2 -3
  21. package/es/countdown/index.mjs +2 -3
  22. package/es/counter/index.mjs +2 -3
  23. package/es/date-picker/index.mjs +2 -3
  24. package/es/dialog/index.mjs +3 -7
  25. package/es/divider/index.mjs +2 -3
  26. package/es/drag/index.mjs +2 -3
  27. package/es/ellipsis/index.mjs +2 -3
  28. package/es/fab/index.mjs +2 -4
  29. package/es/form/index.mjs +2 -4
  30. package/es/form-details/index.mjs +2 -3
  31. package/es/hover-overlay/index.mjs +2 -3
  32. package/es/icon/index.mjs +2 -3
  33. package/es/image/index.mjs +2 -3
  34. package/es/image-preview/index.mjs +3 -7
  35. package/es/index-anchor/index.mjs +2 -3
  36. package/es/index-bar/index.mjs +2 -3
  37. package/es/index.bundle.mjs +1 -1
  38. package/es/index.mjs +1 -1
  39. package/es/input/index.mjs +2 -3
  40. package/es/link/index.mjs +2 -3
  41. package/es/list/index.mjs +2 -3
  42. package/es/loading/index.mjs +2 -3
  43. package/es/menu/Menu.mjs +3 -1
  44. package/es/menu/index.mjs +2 -3
  45. package/es/menu/menu.css +1 -1
  46. package/es/menu/usePopover.mjs +52 -1
  47. package/es/option/index.mjs +2 -3
  48. package/es/overlay/index.mjs +2 -3
  49. package/es/pagination/index.mjs +2 -3
  50. package/es/paper/index.mjs +2 -3
  51. package/es/picker/index.mjs +4 -8
  52. package/es/popup/index.mjs +2 -3
  53. package/es/progress/index.mjs +2 -3
  54. package/es/pull-refresh/index.mjs +2 -3
  55. package/es/radio/index.mjs +2 -3
  56. package/es/radio-group/index.mjs +2 -3
  57. package/es/rate/index.mjs +2 -3
  58. package/es/result/index.mjs +2 -3
  59. package/es/row/index.mjs +2 -3
  60. package/es/select/Select.mjs +1 -1
  61. package/es/select/index.mjs +2 -3
  62. package/es/skeleton/index.mjs +2 -3
  63. package/es/slider/index.mjs +2 -3
  64. package/es/snackbar/index.mjs +4 -8
  65. package/es/space/index.mjs +2 -3
  66. package/es/step/index.mjs +2 -3
  67. package/es/steps/index.mjs +2 -3
  68. package/es/sticky/index.mjs +2 -3
  69. package/es/style-provider/index.mjs +3 -6
  70. package/es/style.css +1 -1
  71. package/es/swipe/index.mjs +2 -3
  72. package/es/swipe-item/index.mjs +2 -3
  73. package/es/switch/index.mjs +2 -3
  74. package/es/tab/index.mjs +2 -3
  75. package/es/tab-item/index.mjs +2 -3
  76. package/es/table/index.mjs +2 -3
  77. package/es/tabs/index.mjs +2 -3
  78. package/es/tabs-items/index.mjs +2 -3
  79. package/es/time-picker/index.mjs +2 -3
  80. package/es/tooltip/Tooltip.mjs +3 -1
  81. package/es/tooltip/index.mjs +2 -3
  82. package/es/tooltip/tooltip.css +1 -1
  83. package/es/uploader/index.mjs +2 -3
  84. package/es/utils/components.mjs +12 -0
  85. package/es/varlet.esm.js +7052 -7151
  86. package/highlight/web-types.en-US.json +2 -2
  87. package/highlight/web-types.zh-CN.json +3 -3
  88. package/lib/style.css +1 -1
  89. package/lib/varlet.cjs.js +154 -247
  90. package/package.json +6 -6
  91. package/types/snackbar.d.ts +9 -10
  92. package/umd/varlet.js +5 -5
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
  import VarActionSheet from './ActionSheet.mjs';
3
3
  import { nextTick, reactive } from 'vue';
4
4
  import { inBrowser } from '@varlet/shared';
5
- import { call, mountInstance } from '../utils/components.mjs';
5
+ import { call, mountInstance, withInstall } from '../utils/components.mjs';
6
6
  var singletonOptions;
7
7
  var defaultOptions = {};
8
8
  function normalizeOptions(options) {
@@ -63,12 +63,8 @@ ActionSheet.close = function () {
63
63
  }
64
64
  };
65
65
  ActionSheet.Component = VarActionSheet;
66
- VarActionSheet.install = function (app) {
67
- app.component(VarActionSheet.name, VarActionSheet);
68
- };
69
- ActionSheet.install = function (app) {
70
- app.component(VarActionSheet.name, VarActionSheet);
71
- };
66
+ withInstall(VarActionSheet);
67
+ withInstall(VarActionSheet, ActionSheet);
72
68
  export { props as actionSheetProps } from './props.mjs';
73
69
  export var _ActionSheetComponent = VarActionSheet;
74
70
  export default ActionSheet;
@@ -1,7 +1,6 @@
1
1
  import AppBar from './AppBar.mjs';
2
- AppBar.install = function (app) {
3
- app.component(AppBar.name, AppBar);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(AppBar);
5
4
  export { props as appBarProps } from './props.mjs';
6
5
  export var _AppBarComponent = AppBar;
7
6
  export default AppBar;
@@ -1,7 +1,6 @@
1
1
  import Avatar from './Avatar.mjs';
2
- Avatar.install = function (app) {
3
- app.component(Avatar.name, Avatar);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Avatar);
5
4
  export { props as avatarProps } from './props.mjs';
6
5
  export var _AvatarComponent = Avatar;
7
6
  export default Avatar;
@@ -1,7 +1,6 @@
1
1
  import AvatarGroup from './AvatarGroup.mjs';
2
- AvatarGroup.install = function (app) {
3
- app.component(AvatarGroup.name, AvatarGroup);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(AvatarGroup);
5
4
  export { props as avatarGroupProps } from './props.mjs';
6
5
  export var _AvatarGroupComponent = AvatarGroup;
7
6
  export default AvatarGroup;
@@ -1,7 +1,6 @@
1
1
  import BackTop from './BackTop.mjs';
2
- BackTop.install = function (app) {
3
- app.component(BackTop.name, BackTop);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(BackTop);
5
4
  export { props as backTopProps } from './props.mjs';
6
5
  export var _BackTopComponent = BackTop;
7
6
  export default BackTop;
@@ -1,7 +1,6 @@
1
1
  import Badge from './Badge.mjs';
2
- Badge.install = function (app) {
3
- app.component(Badge.name, Badge);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Badge);
5
4
  export { props as badgeProps } from './props.mjs';
6
5
  export var _BadgeComponent = Badge;
7
6
  export default Badge;
@@ -1,7 +1,6 @@
1
1
  import BottomNavigation from './BottomNavigation.mjs';
2
- BottomNavigation.install = function (app) {
3
- app.component(BottomNavigation.name, BottomNavigation);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(BottomNavigation);
5
4
  export { props as bottomNavigationProps } from './props.mjs';
6
5
  export var _BottomNavigationComponent = BottomNavigation;
7
6
  export default BottomNavigation;
@@ -1,7 +1,6 @@
1
1
  import BottomNavigationItem from './BottomNavigationItem.mjs';
2
- BottomNavigationItem.install = function (app) {
3
- app.component(BottomNavigationItem.name, BottomNavigationItem);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(BottomNavigationItem);
5
4
  export { props as bottomNavigationItemProps } from './props.mjs';
6
5
  export var _BottomNavigationItemComponent = BottomNavigationItem;
7
6
  export default BottomNavigationItem;
@@ -1,7 +1,6 @@
1
1
  import Breadcrumb from './Breadcrumb.mjs';
2
- Breadcrumb.install = function (app) {
3
- app.component(Breadcrumb.name, Breadcrumb);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Breadcrumb);
5
4
  export { props as breadcrumbProps } from './props.mjs';
6
5
  export var _BreadcrumbComponent = Breadcrumb;
7
6
  export default Breadcrumb;
@@ -1,7 +1,6 @@
1
1
  import Breadcrumbs from './Breadcrumbs.mjs';
2
- Breadcrumbs.install = function (app) {
3
- app.component(Breadcrumbs.name, Breadcrumbs);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Breadcrumbs);
5
4
  export { props as breadcrumbsProps } from './props.mjs';
6
5
  export var _BreadcrumbsComponent = Breadcrumbs;
7
6
  export default Breadcrumbs;
@@ -1,7 +1,6 @@
1
1
  import Button from './Button.mjs';
2
- Button.install = function (app) {
3
- app.component(Button.name, Button);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Button);
5
4
  export { props as buttonProps } from './props.mjs';
6
5
  export var _ButtonComponent = Button;
7
6
  export default Button;
@@ -1,7 +1,5 @@
1
- // Component entry, the folder where the file exists will be exposed to the user
2
1
  import ButtonGroup from './ButtonGroup.mjs';
3
- ButtonGroup.install = function (app) {
4
- app.component(ButtonGroup.name, ButtonGroup);
5
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(ButtonGroup);
6
4
  export var _ButtonGroupComponent = ButtonGroup;
7
5
  export default ButtonGroup;
package/es/card/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import Card from './Card.mjs';
2
- Card.install = function (app) {
3
- app.component(Card.name, Card);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Card);
5
4
  export { props as cardProps } from './props.mjs';
6
5
  export var _CardComponent = Card;
7
6
  export default Card;
package/es/cell/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import Cell from './Cell.mjs';
2
- Cell.install = function (app) {
3
- app.component(Cell.name, Cell);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Cell);
5
4
  export { props as cellProps } from './props.mjs';
6
5
  export var _CellComponent = Cell;
7
6
  export default Cell;
@@ -1,7 +1,6 @@
1
1
  import Checkbox from './Checkbox.mjs';
2
- Checkbox.install = function (app) {
3
- app.component(Checkbox.name, Checkbox);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Checkbox);
5
4
  export { props as checkboxProps } from './props.mjs';
6
5
  export var _CheckboxComponent = Checkbox;
7
6
  export default Checkbox;
@@ -1,7 +1,6 @@
1
1
  import CheckboxGroup from './CheckboxGroup.mjs';
2
- CheckboxGroup.install = function (app) {
3
- app.component(CheckboxGroup.name, CheckboxGroup);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(CheckboxGroup);
5
4
  export { props as checkboxGroupProps } from './props.mjs';
6
5
  export var _CheckboxGroupComponent = CheckboxGroup;
7
6
  export default CheckboxGroup;
package/es/chip/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import Chip from './Chip.mjs';
2
- Chip.install = function (app) {
3
- app.component(Chip.name, Chip);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Chip);
5
4
  export { props as chipProps } from './props.mjs';
6
5
  export var _ChipComponent = Chip;
7
6
  export default Chip;
package/es/col/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import Col from './Col.mjs';
2
- Col.install = function (app) {
3
- app.component(Col.name, Col);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Col);
5
4
  export { props as colProps } from './props.mjs';
6
5
  export var _ColComponent = Col;
7
6
  export default Col;
@@ -1,7 +1,6 @@
1
1
  import Collapse from './Collapse.mjs';
2
- Collapse.install = function (app) {
3
- app.component(Collapse.name, Collapse);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Collapse);
5
4
  export { props as collapseProps } from './props.mjs';
6
5
  export var _CollapseComponent = Collapse;
7
6
  export default Collapse;
@@ -1,7 +1,6 @@
1
1
  import CollapseItem from './CollapseItem.mjs';
2
- CollapseItem.install = function (app) {
3
- app.component(CollapseItem.name, CollapseItem);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(CollapseItem);
5
4
  export { props as collapseItemProps } from './props.mjs';
6
5
  export var _CollapseItemComponent = CollapseItem;
7
6
  export default CollapseItem;
@@ -1,7 +1,6 @@
1
1
  import Countdown from './Countdown.mjs';
2
- Countdown.install = function (app) {
3
- app.component(Countdown.name, Countdown);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Countdown);
5
4
  export { props as countdownProps } from './props.mjs';
6
5
  export var _CountdownComponent = Countdown;
7
6
  export default Countdown;
@@ -1,7 +1,6 @@
1
1
  import Counter from './Counter.mjs';
2
- Counter.install = function (app) {
3
- app.component(Counter.name, Counter);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Counter);
5
4
  export { props as counterProps } from './props.mjs';
6
5
  export var _CounterComponent = Counter;
7
6
  export default Counter;
@@ -1,7 +1,6 @@
1
1
  import DatePicker from './DatePicker.mjs';
2
- DatePicker.install = function (app) {
3
- app.component(DatePicker.name, DatePicker);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(DatePicker);
5
4
  export { props as datePickerProps } from './props.mjs';
6
5
  export var _DatePickerComponent = DatePicker;
7
6
  export default DatePicker;
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
  import VarDialog from './Dialog.mjs';
3
3
  import { reactive, nextTick } from 'vue';
4
4
  import { inBrowser, isString } from '@varlet/shared';
5
- import { call, mountInstance } from '../utils/components.mjs';
5
+ import { call, mountInstance, withInstall } from '../utils/components.mjs';
6
6
  var singletonOptions;
7
7
  var defaultOptions = {};
8
8
  function normalizeOptions(options) {
@@ -72,13 +72,9 @@ Dialog.close = function () {
72
72
  });
73
73
  }
74
74
  };
75
- VarDialog.install = function (app) {
76
- app.component(VarDialog.name, VarDialog);
77
- };
78
- Dialog.install = function (app) {
79
- app.component(VarDialog.name, VarDialog);
80
- };
81
75
  Dialog.Component = VarDialog;
76
+ withInstall(VarDialog);
77
+ withInstall(VarDialog, Dialog);
82
78
  export { props as dialogProps } from './props.mjs';
83
79
  export var _DialogComponent = VarDialog;
84
80
  export default Dialog;
@@ -1,7 +1,6 @@
1
1
  import Divider from './Divider.mjs';
2
- Divider.install = function (app) {
3
- app.component(Divider.name, Divider);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Divider);
5
4
  export { props as dividerProps } from './props.mjs';
6
5
  export var _DividerComponent = Divider;
7
6
  export default Divider;
package/es/drag/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import Drag from './Drag.mjs';
2
- Drag.install = function (app) {
3
- app.component(Drag.name, Drag);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Drag);
5
4
  export { props as dragProps } from './props.mjs';
6
5
  export var _DragComponent = Drag;
7
6
  export default Drag;
@@ -1,6 +1,5 @@
1
1
  import Ellipsis from './Ellipsis.mjs';
2
- Ellipsis.install = function (app) {
3
- app.component(Ellipsis.name, Ellipsis);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Ellipsis);
5
4
  export var _EllipsisComponent = Ellipsis;
6
5
  export default Ellipsis;
package/es/fab/index.mjs CHANGED
@@ -1,7 +1,5 @@
1
- // Component entry, the folder where the file exists will be exposed to the user
2
1
  import Fab from './Fab.mjs';
3
- Fab.install = function (app) {
4
- app.component(Fab.name, Fab);
5
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Fab);
6
4
  export var _FabComponent = Fab;
7
5
  export default Fab;
package/es/form/index.mjs CHANGED
@@ -1,11 +1,9 @@
1
1
  import Form from './Form.mjs';
2
- import { useValidation } from '../utils/components.mjs';
2
+ import { useValidation, withInstall } from '../utils/components.mjs';
3
3
  import { useForm } from './provide.mjs';
4
- Form.install = function (app) {
5
- app.component(Form.name, Form);
6
- };
7
4
  Form.useValidation = useValidation;
8
5
  Form.useForm = useForm;
6
+ withInstall(Form);
9
7
  export { props as formProps } from './props.mjs';
10
8
  export var _FormComponent = Form;
11
9
  export default Form;
@@ -1,7 +1,6 @@
1
1
  import FormDetails from './FormDetails.mjs';
2
- FormDetails.install = function (app) {
3
- app.component(FormDetails.name, FormDetails);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(FormDetails);
5
4
  export { props as formDetailsProps } from './props.mjs';
6
5
  export var _FormDetailsComponent = FormDetails;
7
6
  export default FormDetails;
@@ -1,8 +1,7 @@
1
1
  import HoverOverlay from './HoverOverlay.mjs';
2
+ import { withInstall } from '../utils/components.mjs';
2
3
  import { ref } from 'vue';
3
- HoverOverlay.install = function (app) {
4
- app.component(HoverOverlay.name, HoverOverlay);
5
- };
4
+ withInstall(HoverOverlay);
6
5
  export function useHoverOverlay() {
7
6
  var hovering = ref(false);
8
7
  var handleHovering = value => {
package/es/icon/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import Icon from './Icon.mjs';
2
- Icon.install = function (app) {
3
- app.component(Icon.name, Icon);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Icon);
5
4
  export { props as iconProps } from './props.mjs';
6
5
  export var _IconComponent = Icon;
7
6
  export default Icon;
@@ -1,7 +1,6 @@
1
1
  import Image from './Image.mjs';
2
- Image.install = function (app) {
3
- app.component(Image.name, Image);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Image);
5
4
  export { props as imageProps } from './props.mjs';
6
5
  export var _ImageComponent = Image;
7
6
  export default Image;
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
  import VarImagePreview from './ImagePreview.mjs';
3
3
  import { nextTick, reactive } from 'vue';
4
4
  import { inBrowser, isArray, isString } from '@varlet/shared';
5
- import { call, mountInstance } from '../utils/components.mjs';
5
+ import { call, mountInstance, withInstall } from '../utils/components.mjs';
6
6
  var singletonOptions;
7
7
  var defaultOptions = {};
8
8
  function normalizeOptions(options) {
@@ -64,13 +64,9 @@ ImagePreview.setDefaultOptions = options => {
64
64
  ImagePreview.resetDefaultOptions = () => {
65
65
  defaultOptions = {};
66
66
  };
67
- VarImagePreview.install = function (app) {
68
- app.component(VarImagePreview.name, VarImagePreview);
69
- };
70
- ImagePreview.install = function (app) {
71
- app.component(VarImagePreview.name, VarImagePreview);
72
- };
73
67
  ImagePreview.Component = VarImagePreview;
68
+ withInstall(VarImagePreview);
69
+ withInstall(VarImagePreview, ImagePreview);
74
70
  export { props as imagePreviewProps } from './props.mjs';
75
71
  export var _ImagePreviewComponent = VarImagePreview;
76
72
  export default ImagePreview;
@@ -1,7 +1,6 @@
1
1
  import IndexAnchor from './IndexAnchor.mjs';
2
- IndexAnchor.install = function (app) {
3
- app.component(IndexAnchor.name, IndexAnchor);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(IndexAnchor);
5
4
  export { props as indexAnchorProps } from './props.mjs';
6
5
  export var _IndexAnchorComponent = IndexAnchor;
7
6
  export default IndexAnchor;
@@ -1,7 +1,6 @@
1
1
  import IndexBar from './IndexBar.mjs';
2
- IndexBar.install = function (app) {
3
- app.component(IndexBar.name, IndexBar);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(IndexBar);
5
4
  export { props as indexBarProps } from './props.mjs';
6
5
  export var _IndexBarComponent = IndexBar;
7
6
  export default IndexBar;
@@ -244,7 +244,7 @@ import './time-picker/style/index.mjs'
244
244
  import './tooltip/style/index.mjs'
245
245
  import './uploader/style/index.mjs'
246
246
 
247
- const version = '2.13.1-alpha.1689619056304'
247
+ const version = '2.13.1'
248
248
 
249
249
  function install(app) {
250
250
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -162,7 +162,7 @@ export * from './time-picker/index.mjs'
162
162
  export * from './tooltip/index.mjs'
163
163
  export * from './uploader/index.mjs'
164
164
 
165
- const version = '2.13.1-alpha.1689619056304'
165
+ const version = '2.13.1'
166
166
 
167
167
  function install(app) {
168
168
  ActionSheet.install && app.use(ActionSheet)
@@ -1,7 +1,6 @@
1
1
  import Input from './Input.mjs';
2
- Input.install = function (app) {
3
- app.component(Input.name, Input);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Input);
5
4
  export { props as inputProps } from './props.mjs';
6
5
  export var _InputComponent = Input;
7
6
  export default Input;
package/es/link/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import Link from './Link.mjs';
2
- Link.install = function (app) {
3
- app.component(Link.name, Link);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Link);
5
4
  export { props as linkProps } from './props.mjs';
6
5
  export var _LinkComponent = Link;
7
6
  export default Link;
package/es/list/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import List from './List.mjs';
2
- List.install = function (app) {
3
- app.component(List.name, List);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(List);
5
4
  export { props as listProps } from './props.mjs';
6
5
  export var _ListComponent = List;
7
6
  export default List;
@@ -1,7 +1,6 @@
1
1
  import Loading from './Loading.mjs';
2
- Loading.install = function (app) {
3
- app.component(Loading.name, Loading);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Loading);
5
4
  export { props as loadingProps } from './props.mjs';
6
5
  export var _LoadingComponent = Loading;
7
6
  export default Loading;
package/es/menu/Menu.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.onClosed,
29
+ onAfterLeave: _ctx.handleClosed,
30
30
  persisted: ""
31
31
  }, {
32
32
  default: _withCtx(() => [_withDirectives(_createElementVNode("div", {
@@ -64,6 +64,7 @@ var __sfc__ = defineComponent({
64
64
  handlePopoverMouseenter,
65
65
  handlePopoverMouseleave,
66
66
  handlePopoverClose,
67
+ handleClosed,
67
68
  // expose
68
69
  open,
69
70
  // expose
@@ -87,6 +88,7 @@ var __sfc__ = defineComponent({
87
88
  handlePopoverMouseenter,
88
89
  handlePopoverMouseleave,
89
90
  handlePopoverClose,
91
+ handleClosed,
90
92
  resize,
91
93
  open,
92
94
  close
package/es/menu/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import Menu from './Menu.mjs';
2
- Menu.install = function (app) {
3
- app.component(Menu.name, Menu);
4
- };
2
+ import { withInstall } from '../utils/components.mjs';
3
+ withInstall(Menu);
5
4
  export { props as menuProps } from './props.mjs';
6
5
  export var _MenuComponent = Menu;
7
6
  export default Menu;
package/es/menu/menu.css CHANGED
@@ -1 +1 @@
1
- :root { --menu-background-color: #fff;}.var-menu-enter-from,.var-menu-leave-to { opacity: 0;}.var-menu-enter-active,.var-menu-leave-active { transition-property: opacity; transition-duration: 0.25s;}.var-menu { display: inline-block;}.var-menu--menu-background-color { background: var(--menu-background-color); transition: opacity 0.25s, background-color 0.25s;}
1
+ :root { --menu-background-color: #fff;}.var-menu { display: inline-block;}.var-menu-enter-from,.var-menu-leave-to { opacity: 0; transform: scale(0.8);}.var-menu-enter-active,.var-menu-leave-active { transition-property: opacity, transform; transition-duration: 0.2s;}.var-menu--menu-background-color { background: var(--menu-background-color);}
@@ -45,6 +45,38 @@ export function usePopover(options) {
45
45
  height: toPxNum(height)
46
46
  };
47
47
  };
48
+ var getTransformOrigin = () => {
49
+ switch (options.placement) {
50
+ case 'top':
51
+ case 'cover-bottom':
52
+ return 'bottom';
53
+ case 'top-start':
54
+ case 'right-end':
55
+ case 'cover-bottom-start':
56
+ return 'bottom left';
57
+ case 'top-end':
58
+ case 'left-end':
59
+ case 'cover-bottom-end':
60
+ return 'bottom right';
61
+ case 'bottom':
62
+ case 'cover-top':
63
+ return 'top';
64
+ case 'bottom-start':
65
+ case 'right-start':
66
+ case 'cover-top-start':
67
+ return 'top left';
68
+ case 'bottom-end':
69
+ case 'left-start':
70
+ case 'cover-top-end':
71
+ return 'top right';
72
+ case 'left':
73
+ case 'cover-right':
74
+ return 'right';
75
+ case 'right':
76
+ case 'cover-left':
77
+ return 'left';
78
+ }
79
+ };
48
80
  var handleHostMouseenter = () => {
49
81
  if (options.trigger !== 'hover') {
50
82
  return;
@@ -107,6 +139,10 @@ export function usePopover(options) {
107
139
  handlePopoverClose();
108
140
  call(options.onClickOutside, e);
109
141
  };
142
+ var handleClosed = () => {
143
+ resize();
144
+ call(options.onClosed);
145
+ };
110
146
  var getPosition = () => {
111
147
  computeHostSize();
112
148
  var offset = {
@@ -209,8 +245,22 @@ export function usePopover(options) {
209
245
  offset: [skidding, distance]
210
246
  }
211
247
  }), _extends({}, computeStyles, {
248
+ options: {
249
+ adaptive: false,
250
+ gpuAcceleration: false
251
+ },
212
252
  enabled: show.value
213
- })];
253
+ }), {
254
+ name: 'applyTransformOrigin',
255
+ enabled: show.value,
256
+ phase: 'beforeWrite',
257
+ fn(_ref3) {
258
+ var {
259
+ state
260
+ } = _ref3;
261
+ state.styles.popper.transformOrigin = getTransformOrigin();
262
+ }
263
+ }];
214
264
  return {
215
265
  placement,
216
266
  modifiers
@@ -264,6 +314,7 @@ export function usePopover(options) {
264
314
  handlePopoverClose,
265
315
  handlePopoverMouseenter,
266
316
  handlePopoverMouseleave,
317
+ handleClosed,
267
318
  resize,
268
319
  open,
269
320
  close