@varlet/ui 1.27.20 → 2.0.0-alpha.1663742071515
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/LICENCE +1 -1
- package/README.md +27 -33
- package/README.zh-CN.md +92 -0
- package/es/action-sheet/actionSheet.css +1 -1
- package/es/action-sheet/props.js +1 -1
- package/es/bottom-navigation/BottomNavigation.js +1 -1
- package/es/button/Button.js +2 -1
- package/es/button/button.css +1 -1
- package/es/button/props.js +5 -0
- package/es/card/Card.js +18 -22
- package/es/card/card.css +1 -1
- package/es/card/props.js +0 -7
- package/es/cell/Cell.js +3 -3
- package/es/cell/cell.css +1 -1
- package/es/cell/props.js +2 -2
- package/es/chip/chip.css +1 -1
- package/es/date-picker/DatePicker.js +1 -1
- package/es/date-picker/props.js +1 -1
- package/es/date-picker/src/day-picker-panel.js +1 -1
- package/es/date-picker/src/month-picker-panel.js +1 -1
- package/es/dialog/props.js +1 -1
- package/es/divider/Divider.js +1 -1
- package/es/image-preview/props.js +1 -1
- package/es/index.js +5 -0
- package/es/lazy/index.js +1 -1
- package/es/loading/loading.css +1 -1
- package/es/loading/props.js +1 -2
- package/es/locale/index.js +7 -2
- package/es/menu/Menu.js +318 -94
- package/es/{action-sheet/ActionSheetSfc.less → menu/MenuSfc.css} +0 -0
- package/es/menu/index.js +1 -1
- package/es/menu/menu.css +1 -1
- package/es/menu/props.js +23 -6
- package/es/menu/style/index.js +3 -2
- package/es/pagination/Pagination.js +7 -3
- package/es/pagination/pagination.css +1 -1
- package/es/picker/props.js +1 -1
- package/es/popup/Popup.js +3 -3
- package/es/rate/Rate.js +20 -36
- package/es/rate/rate.css +1 -1
- package/es/ripple/index.js +2 -2
- package/es/select/Select.js +18 -46
- package/es/select/select.css +1 -1
- package/es/slider/Slider.js +1 -1
- package/es/snackbar/core.js +4 -2
- package/es/snackbar/index.js +1 -1
- package/es/snackbar/props.js +6 -2
- package/es/snackbar/style/index.js +1 -1
- package/es/space/Space.js +6 -2
- package/es/style-provider/StyleProvider.js +5 -1
- package/es/style-provider/index.js +1 -5
- package/es/style.css +1 -1
- package/es/style.js +1 -0
- package/es/switch/Switch.js +6 -5
- package/es/tabs/tabs.css +1 -1
- package/es/tabs-items/TabsItems.js +8 -2
- package/es/themes/dark/cell.js +1 -1
- package/es/themes/dark/index.js +3 -2
- package/es/themes/dark/menu.js +3 -0
- package/es/themes/index.js +4 -0
- package/es/time-picker/TimePicker.js +1 -1
- package/es/time-picker/props.js +1 -1
- package/es/umdIndex.js +5 -0
- package/es/utils/components.js +2 -2
- package/es/utils/jest.js +0 -19
- package/es/varlet.esm.js +12805 -13960
- package/highlight/attributes.json +41 -9
- package/highlight/tags.json +14 -6
- package/highlight/web-types.json +83 -11
- package/lib/action-sheet/actionSheet.css +1 -1
- package/lib/action-sheet/props.js +1 -1
- package/lib/bottom-navigation/BottomNavigation.js +1 -1
- package/lib/button/Button.js +2 -1
- package/lib/button/button.css +1 -1
- package/lib/button/props.js +5 -0
- package/lib/card/Card.js +18 -22
- package/lib/card/card.css +1 -1
- package/lib/card/props.js +0 -7
- package/lib/cell/Cell.js +3 -3
- package/lib/cell/cell.css +1 -1
- package/lib/cell/props.js +2 -2
- package/lib/chip/chip.css +1 -1
- package/lib/date-picker/DatePicker.js +1 -1
- package/lib/date-picker/props.js +1 -1
- package/lib/date-picker/src/day-picker-panel.js +1 -1
- package/lib/date-picker/src/month-picker-panel.js +1 -1
- package/lib/dialog/props.js +1 -1
- package/lib/divider/Divider.js +1 -1
- package/lib/image-preview/props.js +1 -1
- package/lib/index.js +3 -0
- package/lib/lazy/index.js +1 -1
- package/lib/loading/loading.css +1 -1
- package/lib/loading/props.js +1 -2
- package/lib/locale/index.js +11 -1
- package/lib/menu/Menu.js +321 -91
- package/{es/app-bar/AppBarSfc.less → lib/menu/MenuSfc.css} +0 -0
- package/lib/menu/index.js +1 -1
- package/lib/menu/menu.css +1 -1
- package/lib/menu/props.js +23 -6
- package/lib/menu/style/index.js +3 -2
- package/lib/pagination/Pagination.js +6 -2
- package/lib/pagination/pagination.css +1 -1
- package/lib/picker/props.js +1 -1
- package/lib/popup/Popup.js +2 -2
- package/lib/rate/Rate.js +20 -36
- package/lib/rate/rate.css +1 -1
- package/lib/ripple/index.js +2 -2
- package/lib/select/Select.js +17 -45
- package/lib/select/select.css +1 -1
- package/lib/slider/Slider.js +1 -1
- package/lib/snackbar/core.js +4 -2
- package/lib/snackbar/index.js +1 -1
- package/lib/snackbar/props.js +6 -2
- package/lib/space/Space.js +6 -2
- package/lib/style-provider/StyleProvider.js +5 -1
- package/lib/style-provider/index.js +1 -5
- package/lib/style.css +1 -1
- package/lib/style.js +1 -0
- package/lib/switch/Switch.js +6 -5
- package/lib/tabs/tabs.css +1 -1
- package/lib/tabs-items/TabsItems.js +9 -3
- package/lib/themes/dark/cell.js +1 -1
- package/lib/themes/dark/index.js +4 -2
- package/lib/themes/dark/menu.js +8 -0
- package/lib/themes/index.js +13 -0
- package/lib/time-picker/TimePicker.js +1 -1
- package/lib/time-picker/props.js +1 -1
- package/lib/utils/components.js +3 -3
- package/lib/utils/jest.js +0 -21
- package/package.json +10 -7
- package/types/actionSheet.d.ts +1 -2
- package/types/appBar.d.ts +4 -3
- package/types/backTop.d.ts +1 -2
- package/types/badge.d.ts +5 -4
- package/types/bottomNavigation.d.ts +1 -2
- package/types/bottomNavigationItem.d.ts +1 -2
- package/types/button.d.ts +7 -6
- package/types/card.d.ts +7 -8
- package/types/cell.d.ts +3 -4
- package/types/checkbox.d.ts +1 -2
- package/types/checkboxGroup.d.ts +4 -5
- package/types/chip.d.ts +3 -4
- package/types/col.d.ts +1 -2
- package/types/collapse.d.ts +1 -2
- package/types/collapseItem.d.ts +1 -2
- package/types/countdown.d.ts +1 -2
- package/types/counter.d.ts +3 -4
- package/types/datePicker.d.ts +5 -4
- package/types/dialog.d.ts +4 -3
- package/types/divider.d.ts +1 -2
- package/types/form.d.ts +1 -2
- package/types/icon.d.ts +1 -2
- package/types/image.d.ts +4 -3
- package/types/imagePreview.d.ts +2 -3
- package/types/index.d.ts +67 -0
- package/types/indexAnchor.d.ts +1 -2
- package/types/indexBar.d.ts +1 -2
- package/types/input.d.ts +6 -5
- package/types/list.d.ts +1 -2
- package/types/loading.d.ts +5 -4
- package/types/locale.d.ts +3 -0
- package/types/menu.d.ts +27 -3
- package/types/option.d.ts +1 -2
- package/types/pagination.d.ts +1 -2
- package/types/picker.d.ts +1 -2
- package/types/popup.d.ts +4 -3
- package/types/progress.d.ts +4 -3
- package/types/pullRefresh.d.ts +1 -2
- package/types/radio.d.ts +3 -4
- package/types/radioGroup.d.ts +4 -5
- package/types/rate.d.ts +1 -2
- package/types/row.d.ts +7 -4
- package/types/select.d.ts +6 -5
- package/types/skeleton.d.ts +1 -2
- package/types/slider.d.ts +4 -3
- package/types/snackbar.d.ts +9 -9
- package/types/space.d.ts +1 -2
- package/types/step.d.ts +1 -2
- package/types/steps.d.ts +2 -3
- package/types/sticky.d.ts +1 -2
- package/types/styleProvider.d.ts +2 -2
- package/types/swipe.d.ts +1 -2
- package/types/swipeItem.d.ts +1 -2
- package/types/switch.d.ts +1 -2
- package/types/tab.d.ts +1 -2
- package/types/tabItem.d.ts +1 -2
- package/types/table.d.ts +1 -2
- package/types/tabs.d.ts +3 -4
- package/types/tabsItems.d.ts +4 -2
- package/types/timePicker.d.ts +5 -4
- package/types/uploader.d.ts +12 -7
- package/types/varComponent.d.ts +6 -0
- package/umd/varlet.js +16 -4
- package/README.en-US.md +0 -93
- package/es/action-sheet/actionSheet.less +0 -68
- package/es/action-sheet/style/less.js +0 -6
- package/es/app-bar/appBar.less +0 -57
- package/es/app-bar/style/less.js +0 -4
- package/es/back-top/BackTopSfc.less +0 -0
- package/es/back-top/backTop.less +0 -27
- package/es/back-top/style/less.js +0 -5
- package/es/badge/BadgeSfc.less +0 -0
- package/es/badge/badge.less +0 -119
- package/es/badge/style/less.js +0 -4
- package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/es/bottom-navigation/bottomNavigation.less +0 -56
- package/es/bottom-navigation/style/less.js +0 -4
- package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/es/bottom-navigation-item/bottomNavigationItem.less +0 -78
- package/es/bottom-navigation-item/style/less.js +0 -6
- package/es/button/ButtonSfc.less +0 -0
- package/es/button/button.less +0 -183
- package/es/button/style/less.js +0 -6
- package/es/card/CardSfc.less +0 -0
- package/es/card/card.less +0 -189
- package/es/card/style/less.js +0 -5
- package/es/cell/CellSfc.less +0 -0
- package/es/cell/cell.less +0 -78
- package/es/cell/style/less.js +0 -4
- package/es/checkbox/CheckboxSfc.less +0 -0
- package/es/checkbox/checkbox.less +0 -78
- package/es/checkbox/style/less.js +0 -6
- package/es/checkbox-group/CheckboxGroupSfc.less +0 -0
- package/es/checkbox-group/checkboxGroup.less +0 -12
- package/es/checkbox-group/style/less.js +0 -4
- package/es/chip/ChipSfc.less +0 -0
- package/es/chip/chip.less +0 -182
- package/es/chip/style/less.js +0 -4
- package/es/col/ColSfc.less +0 -0
- package/es/col/col.less +0 -74
- package/es/col/style/less.js +0 -3
- package/es/collapse/CollapseSfc.less +0 -1
- package/es/collapse/style/less.js +0 -3
- package/es/collapse-item/CollapseItemSfc.less +0 -0
- package/es/collapse-item/collapseItem.less +0 -105
- package/es/collapse-item/style/less.js +0 -4
- package/es/context/style/less.js +0 -0
- package/es/countdown/CountdownSfc.less +0 -0
- package/es/countdown/style/less.js +0 -2
- package/es/counter/CounterSfc.less +0 -0
- package/es/counter/counter.less +0 -89
- package/es/counter/style/less.js +0 -7
- package/es/date-picker/DatePickerSfc.less +0 -0
- package/es/date-picker/date-picker.less +0 -354
- package/es/date-picker/style/less.js +0 -7
- package/es/dialog/DialogSfc.less +0 -0
- package/es/dialog/dialog.less +0 -77
- package/es/dialog/style/less.js +0 -5
- package/es/divider/DividerSfc.less +0 -0
- package/es/divider/divider.less +0 -78
- package/es/divider/style/less.js +0 -3
- package/es/form/FormSfc.less +0 -0
- package/es/form/style/less.js +0 -2
- package/es/form-details/FormDetailsSfc.less +0 -0
- package/es/form-details/formDetails.less +0 -48
- package/es/form-details/style/less.js +0 -3
- package/es/icon/IconSfc.less +0 -0
- package/es/icon/icon.less +0 -26
- package/es/icon/style/less.js +0 -3
- package/es/image/ImageSfc.less +0 -0
- package/es/image/image.less +0 -9
- package/es/image/style/less.js +0 -4
- package/es/image-preview/ImagePreviewSfc.less +0 -0
- package/es/image-preview/imagePreview.less +0 -76
- package/es/image-preview/style/less.js +0 -7
- package/es/index-anchor/IndexAnchorSfc.less +0 -1
- package/es/index-anchor/style/less.js +0 -3
- package/es/index-bar/IndexBarSfc.less +0 -0
- package/es/index-bar/indexBar.less +0 -43
- package/es/index-bar/style/less.js +0 -3
- package/es/input/InputSfc.less +0 -0
- package/es/input/input.less +0 -187
- package/es/input/style/less.js +0 -5
- package/es/lazy/style/less.js +0 -0
- package/es/less.js +0 -64
- package/es/list/ListSfc.less +0 -0
- package/es/list/list.less +0 -63
- package/es/list/style/less.js +0 -5
- package/es/loading/LoadingSfc.less +0 -0
- package/es/loading/loading.less +0 -500
- package/es/loading/style/less.js +0 -3
- package/es/locale/style/less.js +0 -0
- package/es/menu/menu.less +0 -21
- package/es/menu/style/less.js +0 -3
- package/es/option/OptionSfc.less +0 -0
- package/es/option/option.less +0 -37
- package/es/option/style/less.js +0 -6
- package/es/pagination/PaginationSfc.less +0 -0
- package/es/pagination/pagination.less +0 -188
- package/es/pagination/style/less.js +0 -8
- package/es/picker/PickerSfc.less +0 -0
- package/es/picker/picker.less +0 -106
- package/es/picker/style/less.js +0 -5
- package/es/popup/popup.less +0 -125
- package/es/popup/style/less.js +0 -2
- package/es/progress/ProgressSfc.less +0 -0
- package/es/progress/progress.less +0 -101
- package/es/progress/style/less.js +0 -3
- package/es/pull-refresh/PullRefreshSfc.less +0 -0
- package/es/pull-refresh/pullRefresh.less +0 -56
- package/es/pull-refresh/style/less.js +0 -5
- package/es/radio/RadioSfc.less +0 -0
- package/es/radio/radio.less +0 -78
- package/es/radio/style/less.js +0 -6
- package/es/radio-group/RadioGroupSfc.less +0 -0
- package/es/radio-group/radioGroup.less +0 -12
- package/es/radio-group/style/less.js +0 -4
- package/es/rate/RateSfc.less +0 -0
- package/es/rate/rate.less +0 -48
- package/es/rate/style/less.js +0 -6
- package/es/ripple/ripple.less +0 -20
- package/es/ripple/style/less.js +0 -2
- package/es/row/RowSfc.less +0 -0
- package/es/row/row.less +0 -4
- package/es/row/style/less.js +0 -3
- package/es/select/SelectSfc.less +0 -0
- package/es/select/select.less +0 -184
- package/es/select/style/less.js +0 -7
- package/es/skeleton/SkeletonSfc.less +0 -0
- package/es/skeleton/skeleton.less +0 -138
- package/es/skeleton/style/less.js +0 -3
- package/es/slider/SliderSfc.less +0 -0
- package/es/slider/slider.less +0 -147
- package/es/slider/style/less.js +0 -4
- package/es/snackbar/SnackbarSfc.less +0 -0
- package/es/snackbar/coreSfc.less +0 -0
- package/es/snackbar/snackbar.less +0 -129
- package/es/snackbar/style/less.js +0 -8
- package/es/space/space.less +0 -6
- package/es/space/style/less.js +0 -2
- package/es/step/StepSfc.less +0 -0
- package/es/step/step.less +0 -145
- package/es/step/style/less.js +0 -4
- package/es/steps/StepsSfc.less +0 -1
- package/es/steps/style/less.js +0 -2
- package/es/sticky/StickySfc.less +0 -0
- package/es/sticky/sticky.less +0 -8
- package/es/sticky/style/less.js +0 -3
- package/es/style-provider/StyleProviderSfc.less +0 -0
- package/es/style-provider/style/less.js +0 -2
- package/es/styles/common.less +0 -73
- package/es/styles/elevation.less +0 -128
- package/es/styles/style/less.js +0 -0
- package/es/styles/var.css +0 -0
- package/es/styles/var.less +0 -30
- package/es/swipe/SwipeSfc.less +0 -0
- package/es/swipe/style/less.js +0 -3
- package/es/swipe/swipe.less +0 -60
- package/es/swipe-item/SwipeItemSfc.less +0 -0
- package/es/swipe-item/style/less.js +0 -3
- package/es/swipe-item/swipeItem.less +0 -5
- package/es/switch/SwitchSfc.less +0 -0
- package/es/switch/style/less.js +0 -7
- package/es/switch/switch.less +0 -94
- package/es/tab/TabSfc.less +0 -0
- package/es/tab/style/less.js +0 -4
- package/es/tab/tab.less +0 -46
- package/es/tab-item/TabItemSfc.less +0 -0
- package/es/tab-item/style/less.js +0 -4
- package/es/tab-item/tabItem.less +0 -6
- package/es/table/TableSfc.less +0 -0
- package/es/table/style/less.js +0 -4
- package/es/table/table.less +0 -110
- package/es/tabs/TabsSfc.less +0 -0
- package/es/tabs/style/less.js +0 -5
- package/es/tabs/tabs.less +0 -99
- package/es/tabs-items/TabsItemsSfc.less +0 -0
- package/es/tabs-items/style/less.js +0 -3
- package/es/themes/style/less.js +0 -0
- package/es/time-picker/TimePickerSfc.less +0 -0
- package/es/time-picker/style/less.js +0 -4
- package/es/time-picker/timePicker.less +0 -237
- package/es/uploader/UploaderSfc.less +0 -0
- package/es/uploader/style/less.js +0 -8
- package/es/uploader/uploader.less +0 -216
- package/es/utils/style/less.js +0 -0
- package/lib/action-sheet/ActionSheetSfc.less +0 -0
- package/lib/action-sheet/actionSheet.less +0 -68
- package/lib/action-sheet/style/less.js +0 -6
- package/lib/app-bar/AppBarSfc.less +0 -0
- package/lib/app-bar/appBar.less +0 -57
- package/lib/app-bar/style/less.js +0 -4
- package/lib/back-top/BackTopSfc.less +0 -0
- package/lib/back-top/backTop.less +0 -27
- package/lib/back-top/style/less.js +0 -5
- package/lib/badge/BadgeSfc.less +0 -0
- package/lib/badge/badge.less +0 -119
- package/lib/badge/style/less.js +0 -4
- package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/lib/bottom-navigation/bottomNavigation.less +0 -56
- package/lib/bottom-navigation/style/less.js +0 -4
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.less +0 -78
- package/lib/bottom-navigation-item/style/less.js +0 -6
- package/lib/button/ButtonSfc.less +0 -0
- package/lib/button/button.less +0 -183
- package/lib/button/style/less.js +0 -6
- package/lib/card/CardSfc.less +0 -0
- package/lib/card/card.less +0 -189
- package/lib/card/style/less.js +0 -5
- package/lib/cell/CellSfc.less +0 -0
- package/lib/cell/cell.less +0 -78
- package/lib/cell/style/less.js +0 -4
- package/lib/checkbox/CheckboxSfc.less +0 -0
- package/lib/checkbox/checkbox.less +0 -78
- package/lib/checkbox/style/less.js +0 -6
- package/lib/checkbox-group/CheckboxGroupSfc.less +0 -0
- package/lib/checkbox-group/checkboxGroup.less +0 -12
- package/lib/checkbox-group/style/less.js +0 -4
- package/lib/chip/ChipSfc.less +0 -0
- package/lib/chip/chip.less +0 -182
- package/lib/chip/style/less.js +0 -4
- package/lib/col/ColSfc.less +0 -0
- package/lib/col/col.less +0 -74
- package/lib/col/style/less.js +0 -3
- package/lib/collapse/CollapseSfc.less +0 -1
- package/lib/collapse/style/less.js +0 -3
- package/lib/collapse-item/CollapseItemSfc.less +0 -0
- package/lib/collapse-item/collapseItem.less +0 -105
- package/lib/collapse-item/style/less.js +0 -4
- package/lib/context/style/less.js +0 -0
- package/lib/countdown/CountdownSfc.less +0 -0
- package/lib/countdown/style/less.js +0 -2
- package/lib/counter/CounterSfc.less +0 -0
- package/lib/counter/counter.less +0 -89
- package/lib/counter/style/less.js +0 -7
- package/lib/date-picker/DatePickerSfc.less +0 -0
- package/lib/date-picker/date-picker.less +0 -354
- package/lib/date-picker/style/less.js +0 -7
- package/lib/dialog/DialogSfc.less +0 -0
- package/lib/dialog/dialog.less +0 -77
- package/lib/dialog/style/less.js +0 -5
- package/lib/divider/DividerSfc.less +0 -0
- package/lib/divider/divider.less +0 -78
- package/lib/divider/style/less.js +0 -3
- package/lib/form/FormSfc.less +0 -0
- package/lib/form/style/less.js +0 -2
- package/lib/form-details/FormDetailsSfc.less +0 -0
- package/lib/form-details/formDetails.less +0 -48
- package/lib/form-details/style/less.js +0 -3
- package/lib/icon/IconSfc.less +0 -0
- package/lib/icon/icon.less +0 -26
- package/lib/icon/style/less.js +0 -3
- package/lib/image/ImageSfc.less +0 -0
- package/lib/image/image.less +0 -9
- package/lib/image/style/less.js +0 -4
- package/lib/image-preview/ImagePreviewSfc.less +0 -0
- package/lib/image-preview/imagePreview.less +0 -76
- package/lib/image-preview/style/less.js +0 -7
- package/lib/index-anchor/IndexAnchorSfc.less +0 -1
- package/lib/index-anchor/style/less.js +0 -3
- package/lib/index-bar/IndexBarSfc.less +0 -0
- package/lib/index-bar/indexBar.less +0 -43
- package/lib/index-bar/style/less.js +0 -3
- package/lib/input/InputSfc.less +0 -0
- package/lib/input/input.less +0 -187
- package/lib/input/style/less.js +0 -5
- package/lib/lazy/style/less.js +0 -0
- package/lib/less.js +0 -64
- package/lib/list/ListSfc.less +0 -0
- package/lib/list/list.less +0 -63
- package/lib/list/style/less.js +0 -5
- package/lib/loading/LoadingSfc.less +0 -0
- package/lib/loading/loading.less +0 -500
- package/lib/loading/style/less.js +0 -3
- package/lib/locale/style/less.js +0 -0
- package/lib/menu/menu.less +0 -21
- package/lib/menu/style/less.js +0 -3
- package/lib/option/OptionSfc.less +0 -0
- package/lib/option/option.less +0 -37
- package/lib/option/style/less.js +0 -6
- package/lib/pagination/PaginationSfc.less +0 -0
- package/lib/pagination/pagination.less +0 -188
- package/lib/pagination/style/less.js +0 -8
- package/lib/picker/PickerSfc.less +0 -0
- package/lib/picker/picker.less +0 -106
- package/lib/picker/style/less.js +0 -5
- package/lib/popup/popup.less +0 -125
- package/lib/popup/style/less.js +0 -2
- package/lib/progress/ProgressSfc.less +0 -0
- package/lib/progress/progress.less +0 -101
- package/lib/progress/style/less.js +0 -3
- package/lib/pull-refresh/PullRefreshSfc.less +0 -0
- package/lib/pull-refresh/pullRefresh.less +0 -56
- package/lib/pull-refresh/style/less.js +0 -5
- package/lib/radio/RadioSfc.less +0 -0
- package/lib/radio/radio.less +0 -78
- package/lib/radio/style/less.js +0 -6
- package/lib/radio-group/RadioGroupSfc.less +0 -0
- package/lib/radio-group/radioGroup.less +0 -12
- package/lib/radio-group/style/less.js +0 -4
- package/lib/rate/RateSfc.less +0 -0
- package/lib/rate/rate.less +0 -48
- package/lib/rate/style/less.js +0 -6
- package/lib/ripple/ripple.less +0 -20
- package/lib/ripple/style/less.js +0 -2
- package/lib/row/RowSfc.less +0 -0
- package/lib/row/row.less +0 -4
- package/lib/row/style/less.js +0 -3
- package/lib/select/SelectSfc.less +0 -0
- package/lib/select/select.less +0 -184
- package/lib/select/style/less.js +0 -7
- package/lib/skeleton/SkeletonSfc.less +0 -0
- package/lib/skeleton/skeleton.less +0 -138
- package/lib/skeleton/style/less.js +0 -3
- package/lib/slider/SliderSfc.less +0 -0
- package/lib/slider/slider.less +0 -147
- package/lib/slider/style/less.js +0 -4
- package/lib/snackbar/SnackbarSfc.less +0 -0
- package/lib/snackbar/coreSfc.less +0 -0
- package/lib/snackbar/snackbar.less +0 -129
- package/lib/snackbar/style/less.js +0 -8
- package/lib/space/space.less +0 -6
- package/lib/space/style/less.js +0 -2
- package/lib/step/StepSfc.less +0 -0
- package/lib/step/step.less +0 -145
- package/lib/step/style/less.js +0 -4
- package/lib/steps/StepsSfc.less +0 -1
- package/lib/steps/style/less.js +0 -2
- package/lib/sticky/StickySfc.less +0 -0
- package/lib/sticky/sticky.less +0 -8
- package/lib/sticky/style/less.js +0 -3
- package/lib/style-provider/StyleProviderSfc.less +0 -0
- package/lib/style-provider/style/less.js +0 -2
- package/lib/styles/common.less +0 -73
- package/lib/styles/elevation.less +0 -128
- package/lib/styles/style/less.js +0 -0
- package/lib/styles/var.css +0 -0
- package/lib/styles/var.less +0 -30
- package/lib/swipe/SwipeSfc.less +0 -0
- package/lib/swipe/style/less.js +0 -3
- package/lib/swipe/swipe.less +0 -60
- package/lib/swipe-item/SwipeItemSfc.less +0 -0
- package/lib/swipe-item/style/less.js +0 -3
- package/lib/swipe-item/swipeItem.less +0 -5
- package/lib/switch/SwitchSfc.less +0 -0
- package/lib/switch/style/less.js +0 -7
- package/lib/switch/switch.less +0 -94
- package/lib/tab/TabSfc.less +0 -0
- package/lib/tab/style/less.js +0 -4
- package/lib/tab/tab.less +0 -46
- package/lib/tab-item/TabItemSfc.less +0 -0
- package/lib/tab-item/style/less.js +0 -4
- package/lib/tab-item/tabItem.less +0 -6
- package/lib/table/TableSfc.less +0 -0
- package/lib/table/style/less.js +0 -4
- package/lib/table/table.less +0 -110
- package/lib/tabs/TabsSfc.less +0 -0
- package/lib/tabs/style/less.js +0 -5
- package/lib/tabs/tabs.less +0 -99
- package/lib/tabs-items/TabsItemsSfc.less +0 -0
- package/lib/tabs-items/style/less.js +0 -3
- package/lib/themes/style/less.js +0 -0
- package/lib/time-picker/TimePickerSfc.less +0 -0
- package/lib/time-picker/style/less.js +0 -4
- package/lib/time-picker/timePicker.less +0 -237
- package/lib/uploader/UploaderSfc.less +0 -0
- package/lib/uploader/style/less.js +0 -8
- package/lib/uploader/uploader.less +0 -216
- package/lib/utils/style/less.js +0 -0
- package/types/global.d.ts +0 -68
|
@@ -26,7 +26,7 @@ var _locale = require("../../locale");
|
|
|
26
26
|
|
|
27
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
28
28
|
|
|
29
|
-
function _extends() { _extends = Object.assign
|
|
29
|
+
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); }
|
|
30
30
|
|
|
31
31
|
_dayjs.default.extend(_isSameOrBefore.default);
|
|
32
32
|
|
package/lib/dialog/props.js
CHANGED
|
@@ -7,7 +7,7 @@ var _components = require("../utils/components");
|
|
|
7
7
|
|
|
8
8
|
var _props = require("../popup/props");
|
|
9
9
|
|
|
10
|
-
function _extends() { _extends = Object.assign
|
|
10
|
+
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); }
|
|
11
11
|
|
|
12
12
|
function messageAlignValidator(messageAlign) {
|
|
13
13
|
return ['left', 'center', 'right'].includes(messageAlign);
|
package/lib/divider/Divider.js
CHANGED
|
@@ -14,7 +14,7 @@ var _props = require("./props");
|
|
|
14
14
|
|
|
15
15
|
var _components = require("../utils/components");
|
|
16
16
|
|
|
17
|
-
function _extends() { _extends = Object.assign
|
|
17
|
+
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); }
|
|
18
18
|
|
|
19
19
|
var {
|
|
20
20
|
n,
|
|
@@ -9,7 +9,7 @@ var _props = require("../swipe/props");
|
|
|
9
9
|
|
|
10
10
|
var _props2 = require("../popup/props");
|
|
11
11
|
|
|
12
|
-
function _extends() { _extends = Object.assign
|
|
12
|
+
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); }
|
|
13
13
|
|
|
14
14
|
var props = _extends({
|
|
15
15
|
show: {
|
package/lib/index.js
CHANGED
|
@@ -60,6 +60,7 @@ var TabItem = require('./tab-item')['default']
|
|
|
60
60
|
var Table = require('./table')['default']
|
|
61
61
|
var Tabs = require('./tabs')['default']
|
|
62
62
|
var TabsItems = require('./tabs-items')['default']
|
|
63
|
+
var Themes = require('./themes')['default']
|
|
63
64
|
var TimePicker = require('./time-picker')['default']
|
|
64
65
|
var Uploader = require('./uploader')['default']
|
|
65
66
|
|
|
@@ -127,6 +128,7 @@ function install(app) {
|
|
|
127
128
|
Table.install && app.use(Table)
|
|
128
129
|
Tabs.install && app.use(Tabs)
|
|
129
130
|
TabsItems.install && app.use(TabsItems)
|
|
131
|
+
Themes.install && app.use(Themes)
|
|
130
132
|
TimePicker.install && app.use(TimePicker)
|
|
131
133
|
Uploader.install && app.use(Uploader)
|
|
132
134
|
}
|
|
@@ -196,6 +198,7 @@ module.exports = {
|
|
|
196
198
|
Table,
|
|
197
199
|
Tabs,
|
|
198
200
|
TabsItems,
|
|
201
|
+
Themes,
|
|
199
202
|
TimePicker,
|
|
200
203
|
Uploader
|
|
201
204
|
}
|
package/lib/lazy/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
15
15
|
|
|
16
16
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
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); }
|
|
19
19
|
|
|
20
20
|
var BACKGROUND_IMAGE_ARG_NAME = 'background-image';
|
|
21
21
|
var LAZY_LOADING = 'lazy-loading';
|
package/lib/loading/loading.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --loading-opacity: 0.38; --loading-desc-margin: 8px 0 0;}.var-loading { position: relative;}.var-loading__content { position: relative; transition: opacity 0.3s; opacity: 1;}.var-loading__content--active { opacity: var(--loading-opacity);}.var-loading__content-mask { position: absolute; left: 0; right: 0; top: 0; bottom: 0;}.var-loading__body { display: flex; justify-content: center; align-items: center; height: 100%; flex-direction: column;}.var-loading__inside { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;}.var-loading__description { color:
|
|
1
|
+
:root { --loading-opacity: 0.38; --loading-desc-margin: 8px 0 0;}.var-loading { --loading-normal-width: 50px; --loading-normal-height: calc(var(--font-size-md) + 2px); --loading-large-width: 64px; --loading-large-height: calc(var(--font-size-lg) + 2px); --loading-small-width: 36px; --loading-small-height: calc(var(--font-size-sm) + 2px); --loading-mini-width: 22px; --loading-mini-height: calc(var(--font-size-xs) + 2px); position: relative;}.var-loading__content { position: relative; transition: opacity 0.3s; opacity: 1;}.var-loading__content--active { opacity: var(--loading-opacity);}.var-loading__content-mask { position: absolute; left: 0; right: 0; top: 0; bottom: 0;}.var-loading__body { display: flex; justify-content: center; align-items: center; height: 100%; flex-direction: column;}.var-loading__inside { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;}.var-loading__description { color: var(--color-primary); margin: var(--loading-desc-margin);}.var-loading__description--large { font-size: var(--font-size-lg);}.var-loading__description--normal { font-size: var(--font-size-md);}.var-loading__description--small { font-size: var(--font-size-sm);}.var-loading__description--mini { font-size: var(--font-size-xs);}.var-loading__circle { display: flex;}.var-loading__circle-block { display: inline-block; color: var(--color-primary); animation: circle 1.8s linear infinite;}.var-loading__circle-block--large { width: 36px; height: 36px;}.var-loading__circle-block--normal { width: 30px; height: 30px;}.var-loading__circle-block--small { width: 24px; height: 24px;}.var-loading__circle-block--mini { width: 18px; height: 18px;}.var-loading__circle-block svg { display: block; width: 100%; height: 100%;}.var-loading__circle-block svg circle { animation: circular 1.5s ease-in-out infinite; stroke: currentColor; stroke-width: 3; stroke-linecap: round;}@keyframes circle { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}@keyframes circular { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -40; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -120; }}.var-loading__wave { --loading-wave-size-item-width: 5px; --loading-wave-size-item-margin: 5px; display: flex; align-items: center; justify-content: center;}.var-loading__wave--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__wave--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__wave--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__wave--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__wave-item { height: 100%; display: inline-block; animation: 1.2s ease-in-out infinite wave; background-color: var(--color-primary);}.var-loading__wave-item:nth-child(1) { animation-delay: -1.2s; margin-left: 0;}.var-loading__wave-item:nth-child(2) { animation-delay: -1.1s;}.var-loading__wave-item:nth-child(3) { animation-delay: -1s;}.var-loading__wave-item:nth-child(4) { animation-delay: -0.9s;}.var-loading__wave-item:nth-child(5) { animation-delay: -0.8s;}.var-loading__wave-item--large { width: var(--loading-wave-size-item-width); margin-left: var(--loading-wave-size-item-margin);}.var-loading__wave-item--normal { width: calc(var(--loading-wave-size-item-width) - 1px); margin-left: calc(var(--loading-wave-size-item-margin) - 1px);}.var-loading__wave-item--small { width: calc(var(--loading-wave-size-item-width) - 2px); margin-left: calc(var(--loading-wave-size-item-margin) - 2px);}.var-loading__wave-item--mini { width: calc(var(--loading-wave-size-item-width) - 3px); margin-left: calc(var(--loading-wave-size-item-margin) - 3px);}@keyframes wave { 0%, 40%, 100% { transform: scaleY(0.4); } 20% { transform: scaleY(1); }}.var-loading__cube { --loading-cube-size-item-width: 10px; --loading-cube-size-item-height: 10px; --loading-cube-size-item-margin: 5px; display: flex; align-items: center;}.var-loading__cube--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__cube--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__cube--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__cube--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__cube-item { display: inline-block; transform-origin: right bottom; animation: 1.5s ease infinite cube; background-color: var(--color-primary);}.var-loading__cube-item:nth-child(1) { animation-delay: 0.2s; margin-left: 0;}.var-loading__cube-item:nth-child(2) { animation-delay: 0.4s;}.var-loading__cube-item:nth-child(3) { animation-delay: 0.6s;}.var-loading__cube-item:nth-child(4) { animation-delay: 0.8s;}.var-loading__cube-item--large { height: var(--loading-cube-size-item-height); width: var(--loading-cube-size-item-width); margin-left: var(--loading-cube-size-item-margin);}.var-loading__cube-item--normal { height: calc(var(--loading-cube-size-item-height) - 2px); width: calc(var(--loading-cube-size-item-width) - 2px); margin-left: calc(var(--loading-cube-size-item-margin) - 1px);}.var-loading__cube-item--small { height: calc(var(--loading-cube-size-item-height) - 4px); width: calc(var(--loading-cube-size-item-width) - 4px); margin-left: calc(var(--loading-cube-size-item-margin) - 2px);}.var-loading__cube-item--mini { height: calc(var(--loading-cube-size-item-height) - 6px); width: calc(var(--loading-cube-size-item-width) - 6px); margin-left: calc(var(--loading-cube-size-item-margin) - 3px);}@keyframes cube { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: rotate(90deg) scale(0.3); }}.var-loading__rect { --loading-rect-size-item-width: 8px; --loading-rect-size-item-height: 100%; display: flex; flex-wrap: nowrap; justify-content: center; align-items: center;}.var-loading__rect--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__rect--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__rect--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__rect--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__rect-item { animation: 2s ease-in-out infinite rect; background-color: var(--color-primary);}.var-loading__rect-item:nth-child(1) { animation-delay: 1.75s;}.var-loading__rect-item:nth-child(2) { animation-delay: 1.5s;}.var-loading__rect-item:nth-child(3) { animation-delay: 1.25s;}.var-loading__rect-item:nth-child(4) { animation-delay: 1s;}.var-loading__rect-item:nth-child(5) { animation-delay: 0.75s;}.var-loading__rect-item:nth-child(6) { animation-delay: 0.5s;}.var-loading__rect-item:nth-child(7) { animation-delay: 0.25s;}.var-loading__rect-item:nth-child(8) { animation-delay: 0s;}.var-loading__rect-item--large { height: var(--loading-rect-size-item-height); width: var(--loading-rect-size-item-width);}.var-loading__rect-item--normal { height: calc(var(--loading-rect-size-item-height) * 0.9); width: calc(var(--loading-rect-size-item-width) * 0.8);}.var-loading__rect-item--small { height: calc(var(--loading-rect-size-item-height) * 0.8); width: calc(var(--loading-rect-size-item-width) * 0.6);}.var-loading__rect-item--mini { height: calc(var(--loading-rect-size-item-height) * 0.7); width: calc(var(--loading-rect-size-item-width) * 0.4);}@keyframes rect { 0% { opacity: 0.3; } 25% { opacity: 1; } 50% { opacity: 0.3; } 65% { opacity: 1; } 100% { opacity: 0.3; }}.var-loading__disappear { --loading-disappear-size-item-width: 15px; --loading-disappear-size-item-height: 15px; display: flex; justify-content: space-around; align-items: center; flex-flow: nowrap;}.var-loading__disappear--large { width: var(--loading-large-width); height: var(--loading-large-height);}.var-loading__disappear--normal { width: var(--loading-normal-width); height: var(--loading-normal-height);}.var-loading__disappear--small { width: var(--loading-small-width); height: var(--loading-small-height);}.var-loading__disappear--mini { width: var(--loading-mini-width); height: var(--loading-mini-height);}.var-loading__disappear-item { border-radius: 50%; animation: 0.5s ease-in-out infinite alternate disappear; background-color: var(--color-primary);}.var-loading__disappear-item:nth-child(1) { animation-delay: -0.4s;}.var-loading__disappear-item:nth-child(2) { animation-delay: -0.2s;}.var-loading__disappear-item:nth-child(3) { animation-delay: 0s;}.var-loading__disappear-item--large { height: var(--loading-disappear-size-item-height); width: var(--loading-disappear-size-item-width);}.var-loading__disappear-item--normal { height: calc(var(--loading-disappear-size-item-height) * 0.8); width: calc(var(--loading-disappear-size-item-width) * 0.8);}.var-loading__disappear-item--small { height: calc(var(--loading-disappear-size-item-height) * 0.6); width: calc(var(--loading-disappear-size-item-width) * 0.6);}.var-loading__disappear-item--mini { height: calc(var(--loading-disappear-size-item-height) * 0.4); width: calc(var(--loading-disappear-size-item-width) * 0.4);}@keyframes disappear { 0% { opacity: 1; } 100% { opacity: 0; }}
|
package/lib/loading/props.js
CHANGED
package/lib/locale/index.js
CHANGED
|
@@ -8,9 +8,15 @@ var _vue = require("vue");
|
|
|
8
8
|
|
|
9
9
|
var _zhCN = _interopRequireDefault(require("./zh-CN"));
|
|
10
10
|
|
|
11
|
+
exports.zhCN = _zhCN.default;
|
|
12
|
+
|
|
13
|
+
var _enUS = _interopRequireDefault(require("./en-US"));
|
|
14
|
+
|
|
15
|
+
exports.enUS = _enUS.default;
|
|
16
|
+
|
|
11
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
18
|
|
|
13
|
-
function _extends() { _extends = Object.assign
|
|
19
|
+
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); }
|
|
14
20
|
|
|
15
21
|
function useLocale() {
|
|
16
22
|
var packs = {};
|
|
@@ -64,6 +70,8 @@ exports.packs = packs;
|
|
|
64
70
|
add('zh-CN', _zhCN.default);
|
|
65
71
|
use('zh-CN');
|
|
66
72
|
var _LocaleComponent = {
|
|
73
|
+
zhCN: _zhCN.default,
|
|
74
|
+
enUS: _enUS.default,
|
|
67
75
|
packs,
|
|
68
76
|
pack,
|
|
69
77
|
add,
|
|
@@ -73,6 +81,8 @@ var _LocaleComponent = {
|
|
|
73
81
|
};
|
|
74
82
|
exports._LocaleComponent = _LocaleComponent;
|
|
75
83
|
var _default = {
|
|
84
|
+
zhCN: _zhCN.default,
|
|
85
|
+
enUS: _enUS.default,
|
|
76
86
|
packs,
|
|
77
87
|
pack,
|
|
78
88
|
add,
|
package/lib/menu/Menu.js
CHANGED
|
@@ -2,62 +2,178 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
+
exports.render = render;
|
|
5
6
|
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var _props = require("./props");
|
|
7
|
+
var _flip = _interopRequireDefault(require("@popperjs/core/lib/modifiers/flip"));
|
|
9
8
|
|
|
10
|
-
var
|
|
9
|
+
var _offset = _interopRequireDefault(require("@popperjs/core/lib/modifiers/offset"));
|
|
11
10
|
|
|
12
|
-
var
|
|
11
|
+
var _popperLite = require("@popperjs/core/lib/popper-lite");
|
|
13
12
|
|
|
14
13
|
var _components = require("../utils/components");
|
|
15
14
|
|
|
15
|
+
var _vue = require("vue");
|
|
16
16
|
|
|
17
|
+
var _props = require("./props");
|
|
17
18
|
|
|
19
|
+
var _elements = require("../utils/elements");
|
|
18
20
|
|
|
21
|
+
var _zIndex = require("../context/zIndex");
|
|
19
22
|
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
24
|
|
|
25
|
+
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); }
|
|
21
26
|
|
|
22
27
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
23
28
|
|
|
24
29
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
25
30
|
|
|
26
|
-
function _isSlot(s) {
|
|
27
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
31
|
var {
|
|
31
32
|
n,
|
|
32
33
|
classes
|
|
33
34
|
} = (0, _components.createNamespace)('menu');
|
|
34
35
|
|
|
36
|
+
function render(_ctx, _cache) {
|
|
37
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
38
|
+
ref: "host",
|
|
39
|
+
class: (0, _vue.normalizeClass)(_ctx.n()),
|
|
40
|
+
onClick: _cache[3] || (_cache[3] = function () {
|
|
41
|
+
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
42
|
+
}),
|
|
43
|
+
onMouseenter: _cache[4] || (_cache[4] = function () {
|
|
44
|
+
return _ctx.handleMouseenter && _ctx.handleMouseenter(...arguments);
|
|
45
|
+
}),
|
|
46
|
+
onMouseleave: _cache[5] || (_cache[5] = function () {
|
|
47
|
+
return _ctx.handleMouseleave && _ctx.handleMouseleave(...arguments);
|
|
48
|
+
})
|
|
49
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default"), ((0, _vue.openBlock)(), (0, _vue.createBlock)(_vue.Teleport, {
|
|
50
|
+
to: _ctx.teleport
|
|
51
|
+
}, [(0, _vue.createVNode)(_vue.Transition, {
|
|
52
|
+
name: _ctx.n(),
|
|
53
|
+
onAfterEnter: _ctx.onOpened,
|
|
54
|
+
onAfterLeave: _ctx.onClosed
|
|
55
|
+
}, {
|
|
56
|
+
default: (0, _vue.withCtx)(() => [(0, _vue.withDirectives)((0, _vue.createElementVNode)("div", {
|
|
57
|
+
ref: "menu",
|
|
58
|
+
style: (0, _vue.normalizeStyle)({
|
|
59
|
+
zIndex: _ctx.zIndex
|
|
60
|
+
}),
|
|
61
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('menu'), [_ctx.defaultStyle, _ctx.n('--menu-background-color') + " var-elevation--3"])),
|
|
62
|
+
onClick: _cache[0] || (_cache[0] = (0, _vue.withModifiers)(() => {}, ["stop"])),
|
|
63
|
+
onMouseenter: _cache[1] || (_cache[1] = function () {
|
|
64
|
+
return _ctx.handleMenuMouseenter && _ctx.handleMenuMouseenter(...arguments);
|
|
65
|
+
}),
|
|
66
|
+
onMouseleave: _cache[2] || (_cache[2] = function () {
|
|
67
|
+
return _ctx.handleMenuMouseleave && _ctx.handleMenuMouseleave(...arguments);
|
|
68
|
+
})
|
|
69
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "menu")], 38
|
|
70
|
+
/* CLASS, STYLE, HYDRATE_EVENTS */
|
|
71
|
+
), [[_vue.vShow, _ctx.show]])]),
|
|
72
|
+
_: 3
|
|
73
|
+
/* FORWARDED */
|
|
74
|
+
|
|
75
|
+
}, 8
|
|
76
|
+
/* PROPS */
|
|
77
|
+
, ["name", "onAfterEnter", "onAfterLeave"])], 8
|
|
78
|
+
/* PROPS */
|
|
79
|
+
, ["to"]))], 34
|
|
80
|
+
/* CLASS, HYDRATE_EVENTS */
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
35
84
|
var _default = (0, _vue.defineComponent)({
|
|
85
|
+
render,
|
|
36
86
|
name: 'VarMenu',
|
|
37
87
|
props: _props.props,
|
|
38
88
|
|
|
39
|
-
setup(props
|
|
40
|
-
var {
|
|
41
|
-
slots
|
|
42
|
-
} = _ref;
|
|
89
|
+
setup(props) {
|
|
43
90
|
var host = (0, _vue.ref)(null);
|
|
44
91
|
var menu = (0, _vue.ref)(null);
|
|
45
|
-
var
|
|
46
|
-
var top = (0, _vue.ref)(0);
|
|
47
|
-
var left = (0, _vue.ref)(0);
|
|
92
|
+
var show = (0, _vue.ref)(false);
|
|
48
93
|
var {
|
|
49
94
|
zIndex
|
|
50
|
-
} = (0, _zIndex.useZIndex)(() =>
|
|
51
|
-
var
|
|
52
|
-
disabled
|
|
53
|
-
} = (0, _components.useTeleport)();
|
|
95
|
+
} = (0, _zIndex.useZIndex)(() => show.value, 1);
|
|
96
|
+
var popover = null;
|
|
54
97
|
var clickSelf = false;
|
|
98
|
+
var enterMenu = false;
|
|
99
|
+
var enterHost = false;
|
|
100
|
+
var hostSize = {
|
|
101
|
+
width: 0,
|
|
102
|
+
height: 0
|
|
103
|
+
};
|
|
55
104
|
|
|
56
|
-
var
|
|
57
|
-
|
|
105
|
+
var computeHostSize = () => {
|
|
106
|
+
var {
|
|
107
|
+
width,
|
|
108
|
+
height
|
|
109
|
+
} = getComputedStyle(host.value);
|
|
110
|
+
hostSize = {
|
|
111
|
+
width: (0, _elements.toPxNum)(width),
|
|
112
|
+
height: (0, _elements.toPxNum)(height)
|
|
113
|
+
};
|
|
58
114
|
};
|
|
59
115
|
|
|
116
|
+
var handleMouseenter = () => {
|
|
117
|
+
if (props.trigger !== 'hover') {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
enterHost = true;
|
|
122
|
+
open();
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
var handleMouseleave = /*#__PURE__*/function () {
|
|
126
|
+
var _ref = _asyncToGenerator(function* () {
|
|
127
|
+
if (props.trigger !== 'hover') {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
enterHost = false;
|
|
132
|
+
yield (0, _elements.doubleRaf)();
|
|
133
|
+
|
|
134
|
+
if (enterMenu) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
close();
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
return function handleMouseleave() {
|
|
142
|
+
return _ref.apply(this, arguments);
|
|
143
|
+
};
|
|
144
|
+
}();
|
|
145
|
+
|
|
146
|
+
var handleMenuMouseenter = () => {
|
|
147
|
+
if (props.trigger !== 'hover') {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
enterMenu = true;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
var handleMenuMouseleave = /*#__PURE__*/function () {
|
|
155
|
+
var _ref2 = _asyncToGenerator(function* () {
|
|
156
|
+
if (props.trigger !== 'hover') {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
enterMenu = false;
|
|
161
|
+
yield (0, _elements.doubleRaf)();
|
|
162
|
+
|
|
163
|
+
if (enterHost) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
close();
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
return function handleMenuMouseleave() {
|
|
171
|
+
return _ref2.apply(this, arguments);
|
|
172
|
+
};
|
|
173
|
+
}();
|
|
174
|
+
|
|
60
175
|
var handleClick = () => {
|
|
176
|
+
open();
|
|
61
177
|
clickSelf = true;
|
|
62
178
|
};
|
|
63
179
|
|
|
@@ -67,93 +183,207 @@ var _default = (0, _vue.defineComponent)({
|
|
|
67
183
|
return;
|
|
68
184
|
}
|
|
69
185
|
|
|
70
|
-
|
|
71
|
-
|
|
186
|
+
show.value = false;
|
|
187
|
+
(0, _components.call)(props['onUpdate:show'], false);
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
var getPosition = () => {
|
|
191
|
+
computeHostSize();
|
|
192
|
+
var offset = {
|
|
193
|
+
x: (0, _elements.toPxNum)(props.offsetX),
|
|
194
|
+
y: (0, _elements.toPxNum)(props.offsetY)
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
switch (props.placement) {
|
|
198
|
+
case 'cover-top':
|
|
199
|
+
return {
|
|
200
|
+
placement: 'bottom',
|
|
201
|
+
skidding: offset.x,
|
|
202
|
+
distance: offset.y - hostSize.height
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
case 'cover-top-start':
|
|
206
|
+
return {
|
|
207
|
+
placement: 'bottom-start',
|
|
208
|
+
skidding: offset.x,
|
|
209
|
+
distance: offset.y - hostSize.height
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
case 'cover-top-end':
|
|
213
|
+
return {
|
|
214
|
+
placement: 'bottom-end',
|
|
215
|
+
skidding: offset.x,
|
|
216
|
+
distance: offset.y - hostSize.height
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
case 'cover-bottom':
|
|
220
|
+
return {
|
|
221
|
+
placement: 'top',
|
|
222
|
+
skidding: offset.x,
|
|
223
|
+
distance: -offset.y - hostSize.height
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
case 'cover-bottom-start':
|
|
227
|
+
return {
|
|
228
|
+
placement: 'top-start',
|
|
229
|
+
skidding: offset.x,
|
|
230
|
+
distance: -offset.y - hostSize.height
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
case 'cover-bottom-end':
|
|
234
|
+
return {
|
|
235
|
+
placement: 'top-end',
|
|
236
|
+
skidding: offset.x,
|
|
237
|
+
distance: -offset.y - hostSize.height
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
case 'cover-left':
|
|
241
|
+
return {
|
|
242
|
+
placement: 'right',
|
|
243
|
+
skidding: offset.y,
|
|
244
|
+
distance: offset.x - hostSize.width
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
case 'cover-right':
|
|
248
|
+
return {
|
|
249
|
+
placement: 'left',
|
|
250
|
+
skidding: offset.y,
|
|
251
|
+
distance: -offset.x - hostSize.width
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
case 'left':
|
|
255
|
+
case 'left-start':
|
|
256
|
+
case 'left-end':
|
|
257
|
+
return {
|
|
258
|
+
placement: props.placement,
|
|
259
|
+
skidding: offset.y,
|
|
260
|
+
distance: -offset.x
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
case 'top':
|
|
264
|
+
case 'top-start':
|
|
265
|
+
case 'top-end':
|
|
266
|
+
return {
|
|
267
|
+
placement: props.placement,
|
|
268
|
+
skidding: offset.x,
|
|
269
|
+
distance: -offset.y
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
case 'bottom':
|
|
273
|
+
case 'bottom-start':
|
|
274
|
+
case 'bottom-end':
|
|
275
|
+
return {
|
|
276
|
+
placement: props.placement,
|
|
277
|
+
skidding: offset.x,
|
|
278
|
+
distance: offset.y
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
case 'right':
|
|
282
|
+
case 'right-start':
|
|
283
|
+
case 'right-end':
|
|
284
|
+
return {
|
|
285
|
+
placement: props.placement,
|
|
286
|
+
skidding: offset.y,
|
|
287
|
+
distance: offset.x
|
|
288
|
+
};
|
|
72
289
|
}
|
|
290
|
+
};
|
|
73
291
|
|
|
74
|
-
|
|
292
|
+
var getPopperOptions = () => {
|
|
293
|
+
var {
|
|
294
|
+
placement,
|
|
295
|
+
skidding,
|
|
296
|
+
distance
|
|
297
|
+
} = getPosition();
|
|
298
|
+
return {
|
|
299
|
+
placement,
|
|
300
|
+
modifiers: [_extends({}, _flip.default, {
|
|
301
|
+
enabled: show.value
|
|
302
|
+
}), _extends({}, _offset.default, {
|
|
303
|
+
options: {
|
|
304
|
+
offset: [skidding, distance]
|
|
305
|
+
}
|
|
306
|
+
})]
|
|
307
|
+
};
|
|
75
308
|
}; // expose
|
|
76
309
|
|
|
77
310
|
|
|
78
311
|
var resize = () => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}; // Transition style use computed place here
|
|
312
|
+
popover.setOptions(getPopperOptions());
|
|
313
|
+
}; // expose
|
|
82
314
|
|
|
83
315
|
|
|
84
|
-
var
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
zIndex: zIndex.value
|
|
89
|
-
};
|
|
90
|
-
});
|
|
316
|
+
var open = () => {
|
|
317
|
+
var {
|
|
318
|
+
disabled
|
|
319
|
+
} = props;
|
|
91
320
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"onAfterLeave": props.onClosed
|
|
96
|
-
}, {
|
|
97
|
-
default: () => [(0, _vue.withDirectives)((0, _vue.createVNode)("div", {
|
|
98
|
-
"class": classes(n('menu'), 'var-elevation--3'),
|
|
99
|
-
"ref": menu,
|
|
100
|
-
"style": transitionStyle.value,
|
|
101
|
-
"onClick": event => {
|
|
102
|
-
event.stopPropagation();
|
|
103
|
-
}
|
|
104
|
-
}, [(0, _components.call)(slots.menu)]), [[_vue.vShow, props.show]])]
|
|
105
|
-
});
|
|
321
|
+
if (disabled) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
106
324
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
var {
|
|
111
|
-
onOpen,
|
|
112
|
-
onClose
|
|
113
|
-
} = props;
|
|
114
|
-
|
|
115
|
-
if (newValue) {
|
|
116
|
-
yield (0, _vue.nextTick)();
|
|
117
|
-
resize();
|
|
118
|
-
}
|
|
325
|
+
show.value = true;
|
|
326
|
+
(0, _components.call)(props['onUpdate:show'], true);
|
|
327
|
+
}; // expose
|
|
119
328
|
|
|
120
|
-
newValue ? (0, _components.call)(onOpen) : (0, _components.call)(onClose);
|
|
121
|
-
});
|
|
122
329
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
330
|
+
var close = () => {
|
|
331
|
+
show.value = false;
|
|
332
|
+
(0, _components.call)(props['onUpdate:show'], false);
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
(0, _vue.watch)(() => props.show, newValue => {
|
|
336
|
+
show.value = newValue != null ? newValue : false;
|
|
337
|
+
}, {
|
|
338
|
+
immediate: true
|
|
339
|
+
});
|
|
340
|
+
(0, _vue.watch)(() => props.offsetX, resize);
|
|
341
|
+
(0, _vue.watch)(() => props.offsetY, resize);
|
|
342
|
+
(0, _vue.watch)(() => props.placement, resize);
|
|
343
|
+
(0, _vue.watch)(() => show.value, newValue => {
|
|
344
|
+
if (newValue) {
|
|
345
|
+
resize();
|
|
346
|
+
(0, _components.call)(props.onOpen);
|
|
347
|
+
} else {
|
|
348
|
+
(0, _components.call)(props.onClose);
|
|
349
|
+
}
|
|
129
350
|
});
|
|
351
|
+
(0, _vue.watch)(() => props.trigger, newValue => {
|
|
352
|
+
if (newValue === 'click') {
|
|
353
|
+
document.addEventListener('click', handleMenuClose);
|
|
354
|
+
} else {
|
|
355
|
+
document.removeEventListener('click', handleMenuClose);
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
(0, _vue.watch)(() => props.disabled, close);
|
|
130
359
|
(0, _vue.onMounted)(() => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
360
|
+
popover = (0, _popperLite.createPopper)(host.value, menu.value, getPopperOptions());
|
|
361
|
+
|
|
362
|
+
if (props.trigger === 'click') {
|
|
363
|
+
document.addEventListener('click', handleMenuClose);
|
|
364
|
+
}
|
|
136
365
|
});
|
|
137
366
|
(0, _vue.onUnmounted)(() => {
|
|
138
367
|
document.removeEventListener('click', handleMenuClose);
|
|
139
|
-
|
|
140
|
-
});
|
|
141
|
-
(0, _components.exposeApis)({
|
|
142
|
-
resize
|
|
368
|
+
popover.destroy();
|
|
143
369
|
});
|
|
144
|
-
return
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
370
|
+
return {
|
|
371
|
+
menu,
|
|
372
|
+
host,
|
|
373
|
+
hostSize,
|
|
374
|
+
show,
|
|
375
|
+
zIndex,
|
|
376
|
+
n,
|
|
377
|
+
classes,
|
|
378
|
+
handleClick,
|
|
379
|
+
handleMenuClose,
|
|
380
|
+
handleMouseenter,
|
|
381
|
+
handleMouseleave,
|
|
382
|
+
handleMenuMouseenter,
|
|
383
|
+
handleMenuMouseleave,
|
|
384
|
+
resize,
|
|
385
|
+
open,
|
|
386
|
+
close
|
|
157
387
|
};
|
|
158
388
|
}
|
|
159
389
|
|
|
File without changes
|
package/lib/menu/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = exports._MenuComponent = void 0;
|
|
5
5
|
|
|
6
|
-
var _Menu = _interopRequireDefault(require("./Menu"));
|
|
6
|
+
var _Menu = _interopRequireDefault(require("./Menu.js"));
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
9
|
|
package/lib/menu/menu.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.var-menu-enter-from,.var-menu-leave-to {
|
|
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;}
|