@varlet/ui 1.27.20 → 2.0.0-alpha.1663499244572
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/CHANGELOG.md +1885 -1885
- package/LICENCE +21 -21
- package/README.en-US.md +86 -93
- package/README.md +93 -93
- 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.d.ts +1 -1
- package/es/index.js +5 -0
- package/es/input/Input.js +1 -1
- package/es/lazy/index.js +1 -1
- package/es/loading/loading.css +1 -1
- package/es/loading/props.js +1 -2
- package/es/locale/en-US.d.ts +5 -5
- package/es/locale/index.js +7 -2
- package/es/locale/zh-CN.d.ts +5 -5
- 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/style-provider/StyleProvider.js +5 -1
- 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.d.ts +5 -5
- 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 → test.js} +0 -19
- package/es/varlet.esm.js +12805 -13960
- package/highlight/attributes.json +1 -1850
- package/highlight/tags.json +58 -578
- package/highlight/web-types.json +152 -5241
- package/json/area.json +10706 -10706
- 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 +14 -14
- package/lib/date-picker/props.js +1 -1
- package/lib/date-picker/src/day-picker-panel.js +14 -14
- package/lib/date-picker/src/month-picker-panel.js +12 -12
- package/lib/date-picker/src/year-picker-panel.js +3 -3
- 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.d.ts +1 -1
- package/lib/index.js +3 -0
- package/lib/input/Input.js +1 -1
- package/lib/lazy/index.js +1 -1
- package/lib/loading/loading.css +1 -1
- package/lib/loading/props.js +1 -2
- package/lib/locale/en-US.d.ts +5 -5
- package/lib/locale/index.js +11 -1
- package/lib/locale/zh-CN.d.ts +5 -5
- 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/style-provider/StyleProvider.js +5 -1
- 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.d.ts +5 -5
- 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 +9 -9
- package/lib/time-picker/clock.js +3 -3
- package/lib/time-picker/props.js +1 -1
- package/lib/utils/components.js +3 -3
- package/lib/utils/{jest.js → test.js} +0 -21
- package/package.json +14 -10
- package/types/actionSheet.d.ts +68 -69
- package/types/appBar.d.ts +17 -16
- package/types/backTop.d.ts +16 -17
- package/types/badge.d.ts +20 -19
- package/types/bottomNavigation.d.ts +23 -24
- package/types/bottomNavigationItem.d.ts +17 -18
- package/types/button.d.ts +29 -28
- package/types/card.d.ts +29 -30
- package/types/cell.d.ts +18 -19
- package/types/checkbox.d.ts +34 -35
- package/types/checkboxGroup.d.ts +29 -30
- package/types/chip.d.ts +20 -21
- package/types/col.d.ts +23 -24
- package/types/collapse.d.ts +17 -18
- package/types/collapseItem.d.ts +14 -15
- package/types/countdown.d.ts +29 -30
- package/types/counter.d.ts +44 -45
- package/types/datePicker.d.ts +29 -28
- package/types/dialog.d.ts +84 -83
- package/types/divider.d.ts +15 -16
- package/types/form.d.ts +18 -19
- package/types/icon.d.ts +16 -17
- package/types/image.d.ts +26 -25
- package/types/imagePreview.d.ts +51 -52
- package/types/index.d.ts +67 -0
- package/types/indexAnchor.d.ts +11 -12
- package/types/indexBar.d.ts +21 -22
- package/types/input.d.ts +48 -47
- package/types/lazy.d.ts +5 -5
- package/types/list.d.ts +21 -22
- package/types/loading.d.ts +18 -17
- package/types/locale.d.ts +52 -49
- package/types/menu.d.ts +46 -22
- package/types/option.d.ts +12 -13
- package/types/pagination.d.ts +25 -26
- package/types/picker.d.ts +85 -86
- package/types/popup.d.ts +27 -26
- package/types/progress.d.ts +22 -21
- package/types/pullRefresh.d.ts +20 -21
- package/types/radio.d.ts +34 -35
- package/types/radioGroup.d.ts +24 -25
- package/types/rate.d.ts +28 -29
- package/types/ripple.d.ts +5 -5
- package/types/row.d.ts +18 -15
- package/types/select.d.ts +48 -47
- package/types/skeleton.d.ts +21 -22
- package/types/slider.d.ts +30 -29
- package/types/snackbar.d.ts +82 -82
- package/types/space.d.ts +26 -27
- package/types/step.d.ts +13 -14
- package/types/steps.d.ts +15 -16
- package/types/sticky.d.ts +15 -16
- package/types/styleProvider.d.ts +24 -24
- package/types/swipe.d.ts +27 -28
- package/types/swipeItem.d.ts +9 -10
- package/types/switch.d.ts +25 -26
- package/types/tab.d.ts +13 -14
- package/types/tabItem.d.ts +11 -12
- package/types/table.d.ts +11 -12
- package/types/tabs.d.ts +29 -30
- package/types/tabsItems.d.ts +15 -13
- package/types/timePicker.d.ts +30 -29
- package/types/uploader.d.ts +65 -60
- package/types/varComponent.d.ts +18 -12
- package/types/varDirective.d.ts +12 -12
- package/umd/varlet.js +16 -4
- 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
package/es/menu/Menu.js
CHANGED
|
@@ -1,52 +1,162 @@
|
|
|
1
|
-
|
|
1
|
+
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); }
|
|
2
2
|
|
|
3
3
|
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); } }
|
|
4
4
|
|
|
5
5
|
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); }); }; }
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import flip from '@popperjs/core/lib/modifiers/flip';
|
|
8
|
+
import offset from '@popperjs/core/lib/modifiers/offset';
|
|
9
|
+
import { createPopper } from '@popperjs/core/lib/popper-lite';
|
|
10
|
+
import { call, createNamespace } from '../utils/components';
|
|
11
|
+
import { defineComponent, onMounted, onUnmounted, ref, watch } from 'vue';
|
|
8
12
|
import { props } from './props';
|
|
9
|
-
import {
|
|
13
|
+
import { doubleRaf, toPxNum } from '../utils/elements';
|
|
10
14
|
import { useZIndex } from '../context/zIndex';
|
|
11
|
-
import { call, createNamespace, exposeApis, useTeleport } from '../utils/components';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function _isSlot(s) {
|
|
17
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
15
|
var {
|
|
21
16
|
n,
|
|
22
17
|
classes
|
|
23
18
|
} = createNamespace('menu');
|
|
19
|
+
import { renderSlot as _renderSlot, vShow as _vShow, withModifiers as _withModifiers, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock } from "vue";
|
|
20
|
+
export function render(_ctx, _cache) {
|
|
21
|
+
return _openBlock(), _createElementBlock("div", {
|
|
22
|
+
ref: "host",
|
|
23
|
+
class: _normalizeClass(_ctx.n()),
|
|
24
|
+
onClick: _cache[3] || (_cache[3] = function () {
|
|
25
|
+
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
26
|
+
}),
|
|
27
|
+
onMouseenter: _cache[4] || (_cache[4] = function () {
|
|
28
|
+
return _ctx.handleMouseenter && _ctx.handleMouseenter(...arguments);
|
|
29
|
+
}),
|
|
30
|
+
onMouseleave: _cache[5] || (_cache[5] = function () {
|
|
31
|
+
return _ctx.handleMouseleave && _ctx.handleMouseleave(...arguments);
|
|
32
|
+
})
|
|
33
|
+
}, [_renderSlot(_ctx.$slots, "default"), (_openBlock(), _createBlock(_Teleport, {
|
|
34
|
+
to: _ctx.teleport
|
|
35
|
+
}, [_createVNode(_Transition, {
|
|
36
|
+
name: _ctx.n(),
|
|
37
|
+
onAfterEnter: _ctx.onOpened,
|
|
38
|
+
onAfterLeave: _ctx.onClosed
|
|
39
|
+
}, {
|
|
40
|
+
default: _withCtx(() => [_withDirectives(_createElementVNode("div", {
|
|
41
|
+
ref: "menu",
|
|
42
|
+
style: _normalizeStyle({
|
|
43
|
+
zIndex: _ctx.zIndex
|
|
44
|
+
}),
|
|
45
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('menu'), [_ctx.defaultStyle, _ctx.n('--menu-background-color') + " var-elevation--3"])),
|
|
46
|
+
onClick: _cache[0] || (_cache[0] = _withModifiers(() => {}, ["stop"])),
|
|
47
|
+
onMouseenter: _cache[1] || (_cache[1] = function () {
|
|
48
|
+
return _ctx.handleMenuMouseenter && _ctx.handleMenuMouseenter(...arguments);
|
|
49
|
+
}),
|
|
50
|
+
onMouseleave: _cache[2] || (_cache[2] = function () {
|
|
51
|
+
return _ctx.handleMenuMouseleave && _ctx.handleMenuMouseleave(...arguments);
|
|
52
|
+
})
|
|
53
|
+
}, [_renderSlot(_ctx.$slots, "menu")], 38
|
|
54
|
+
/* CLASS, STYLE, HYDRATE_EVENTS */
|
|
55
|
+
), [[_vShow, _ctx.show]])]),
|
|
56
|
+
_: 3
|
|
57
|
+
/* FORWARDED */
|
|
58
|
+
|
|
59
|
+
}, 8
|
|
60
|
+
/* PROPS */
|
|
61
|
+
, ["name", "onAfterEnter", "onAfterLeave"])], 8
|
|
62
|
+
/* PROPS */
|
|
63
|
+
, ["to"]))], 34
|
|
64
|
+
/* CLASS, HYDRATE_EVENTS */
|
|
65
|
+
);
|
|
66
|
+
}
|
|
24
67
|
export default defineComponent({
|
|
68
|
+
render,
|
|
25
69
|
name: 'VarMenu',
|
|
26
70
|
props,
|
|
27
71
|
|
|
28
|
-
setup(props
|
|
29
|
-
var {
|
|
30
|
-
slots
|
|
31
|
-
} = _ref;
|
|
72
|
+
setup(props) {
|
|
32
73
|
var host = ref(null);
|
|
33
74
|
var menu = ref(null);
|
|
34
|
-
var
|
|
35
|
-
var top = ref(0);
|
|
36
|
-
var left = ref(0);
|
|
75
|
+
var show = ref(false);
|
|
37
76
|
var {
|
|
38
77
|
zIndex
|
|
39
|
-
} = useZIndex(() =>
|
|
40
|
-
var
|
|
41
|
-
disabled
|
|
42
|
-
} = useTeleport();
|
|
78
|
+
} = useZIndex(() => show.value, 1);
|
|
79
|
+
var popover = null;
|
|
43
80
|
var clickSelf = false;
|
|
81
|
+
var enterMenu = false;
|
|
82
|
+
var enterHost = false;
|
|
83
|
+
var hostSize = {
|
|
84
|
+
width: 0,
|
|
85
|
+
height: 0
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var computeHostSize = () => {
|
|
89
|
+
var {
|
|
90
|
+
width,
|
|
91
|
+
height
|
|
92
|
+
} = getComputedStyle(host.value);
|
|
93
|
+
hostSize = {
|
|
94
|
+
width: toPxNum(width),
|
|
95
|
+
height: toPxNum(height)
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
var handleMouseenter = () => {
|
|
100
|
+
if (props.trigger !== 'hover') {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
enterHost = true;
|
|
105
|
+
open();
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
var handleMouseleave = /*#__PURE__*/function () {
|
|
109
|
+
var _ref = _asyncToGenerator(function* () {
|
|
110
|
+
if (props.trigger !== 'hover') {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
enterHost = false;
|
|
115
|
+
yield doubleRaf();
|
|
44
116
|
|
|
45
|
-
|
|
46
|
-
|
|
117
|
+
if (enterMenu) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
close();
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
return function handleMouseleave() {
|
|
125
|
+
return _ref.apply(this, arguments);
|
|
126
|
+
};
|
|
127
|
+
}();
|
|
128
|
+
|
|
129
|
+
var handleMenuMouseenter = () => {
|
|
130
|
+
if (props.trigger !== 'hover') {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
enterMenu = true;
|
|
47
135
|
};
|
|
48
136
|
|
|
137
|
+
var handleMenuMouseleave = /*#__PURE__*/function () {
|
|
138
|
+
var _ref2 = _asyncToGenerator(function* () {
|
|
139
|
+
if (props.trigger !== 'hover') {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
enterMenu = false;
|
|
144
|
+
yield doubleRaf();
|
|
145
|
+
|
|
146
|
+
if (enterHost) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
close();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
return function handleMenuMouseleave() {
|
|
154
|
+
return _ref2.apply(this, arguments);
|
|
155
|
+
};
|
|
156
|
+
}();
|
|
157
|
+
|
|
49
158
|
var handleClick = () => {
|
|
159
|
+
open();
|
|
50
160
|
clickSelf = true;
|
|
51
161
|
};
|
|
52
162
|
|
|
@@ -56,93 +166,207 @@ export default defineComponent({
|
|
|
56
166
|
return;
|
|
57
167
|
}
|
|
58
168
|
|
|
59
|
-
|
|
60
|
-
|
|
169
|
+
show.value = false;
|
|
170
|
+
call(props['onUpdate:show'], false);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
var getPosition = () => {
|
|
174
|
+
computeHostSize();
|
|
175
|
+
var offset = {
|
|
176
|
+
x: toPxNum(props.offsetX),
|
|
177
|
+
y: toPxNum(props.offsetY)
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
switch (props.placement) {
|
|
181
|
+
case 'cover-top':
|
|
182
|
+
return {
|
|
183
|
+
placement: 'bottom',
|
|
184
|
+
skidding: offset.x,
|
|
185
|
+
distance: offset.y - hostSize.height
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
case 'cover-top-start':
|
|
189
|
+
return {
|
|
190
|
+
placement: 'bottom-start',
|
|
191
|
+
skidding: offset.x,
|
|
192
|
+
distance: offset.y - hostSize.height
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
case 'cover-top-end':
|
|
196
|
+
return {
|
|
197
|
+
placement: 'bottom-end',
|
|
198
|
+
skidding: offset.x,
|
|
199
|
+
distance: offset.y - hostSize.height
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
case 'cover-bottom':
|
|
203
|
+
return {
|
|
204
|
+
placement: 'top',
|
|
205
|
+
skidding: offset.x,
|
|
206
|
+
distance: -offset.y - hostSize.height
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
case 'cover-bottom-start':
|
|
210
|
+
return {
|
|
211
|
+
placement: 'top-start',
|
|
212
|
+
skidding: offset.x,
|
|
213
|
+
distance: -offset.y - hostSize.height
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
case 'cover-bottom-end':
|
|
217
|
+
return {
|
|
218
|
+
placement: 'top-end',
|
|
219
|
+
skidding: offset.x,
|
|
220
|
+
distance: -offset.y - hostSize.height
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
case 'cover-left':
|
|
224
|
+
return {
|
|
225
|
+
placement: 'right',
|
|
226
|
+
skidding: offset.y,
|
|
227
|
+
distance: offset.x - hostSize.width
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
case 'cover-right':
|
|
231
|
+
return {
|
|
232
|
+
placement: 'left',
|
|
233
|
+
skidding: offset.y,
|
|
234
|
+
distance: -offset.x - hostSize.width
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
case 'left':
|
|
238
|
+
case 'left-start':
|
|
239
|
+
case 'left-end':
|
|
240
|
+
return {
|
|
241
|
+
placement: props.placement,
|
|
242
|
+
skidding: offset.y,
|
|
243
|
+
distance: -offset.x
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
case 'top':
|
|
247
|
+
case 'top-start':
|
|
248
|
+
case 'top-end':
|
|
249
|
+
return {
|
|
250
|
+
placement: props.placement,
|
|
251
|
+
skidding: offset.x,
|
|
252
|
+
distance: -offset.y
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
case 'bottom':
|
|
256
|
+
case 'bottom-start':
|
|
257
|
+
case 'bottom-end':
|
|
258
|
+
return {
|
|
259
|
+
placement: props.placement,
|
|
260
|
+
skidding: offset.x,
|
|
261
|
+
distance: offset.y
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
case 'right':
|
|
265
|
+
case 'right-start':
|
|
266
|
+
case 'right-end':
|
|
267
|
+
return {
|
|
268
|
+
placement: props.placement,
|
|
269
|
+
skidding: offset.y,
|
|
270
|
+
distance: offset.x
|
|
271
|
+
};
|
|
61
272
|
}
|
|
273
|
+
};
|
|
62
274
|
|
|
63
|
-
|
|
275
|
+
var getPopperOptions = () => {
|
|
276
|
+
var {
|
|
277
|
+
placement,
|
|
278
|
+
skidding,
|
|
279
|
+
distance
|
|
280
|
+
} = getPosition();
|
|
281
|
+
return {
|
|
282
|
+
placement,
|
|
283
|
+
modifiers: [_extends({}, flip, {
|
|
284
|
+
enabled: show.value
|
|
285
|
+
}), _extends({}, offset, {
|
|
286
|
+
options: {
|
|
287
|
+
offset: [skidding, distance]
|
|
288
|
+
}
|
|
289
|
+
})]
|
|
290
|
+
};
|
|
64
291
|
}; // expose
|
|
65
292
|
|
|
66
293
|
|
|
67
294
|
var resize = () => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}; // Transition style use computed place here
|
|
295
|
+
popover.setOptions(getPopperOptions());
|
|
296
|
+
}; // expose
|
|
71
297
|
|
|
72
298
|
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
zIndex: zIndex.value
|
|
78
|
-
};
|
|
79
|
-
});
|
|
299
|
+
var open = () => {
|
|
300
|
+
var {
|
|
301
|
+
disabled
|
|
302
|
+
} = props;
|
|
80
303
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"onAfterLeave": props.onClosed
|
|
85
|
-
}, {
|
|
86
|
-
default: () => [_withDirectives(_createVNode("div", {
|
|
87
|
-
"class": classes(n('menu'), 'var-elevation--3'),
|
|
88
|
-
"ref": menu,
|
|
89
|
-
"style": transitionStyle.value,
|
|
90
|
-
"onClick": event => {
|
|
91
|
-
event.stopPropagation();
|
|
92
|
-
}
|
|
93
|
-
}, [call(slots.menu)]), [[_vShow, props.show]])]
|
|
94
|
-
});
|
|
304
|
+
if (disabled) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
95
307
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
var {
|
|
100
|
-
onOpen,
|
|
101
|
-
onClose
|
|
102
|
-
} = props;
|
|
103
|
-
|
|
104
|
-
if (newValue) {
|
|
105
|
-
yield nextTick();
|
|
106
|
-
resize();
|
|
107
|
-
}
|
|
308
|
+
show.value = true;
|
|
309
|
+
call(props['onUpdate:show'], true);
|
|
310
|
+
}; // expose
|
|
108
311
|
|
|
109
|
-
newValue ? call(onOpen) : call(onClose);
|
|
110
|
-
});
|
|
111
312
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
313
|
+
var close = () => {
|
|
314
|
+
show.value = false;
|
|
315
|
+
call(props['onUpdate:show'], false);
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
watch(() => props.show, newValue => {
|
|
319
|
+
show.value = newValue != null ? newValue : false;
|
|
320
|
+
}, {
|
|
321
|
+
immediate: true
|
|
322
|
+
});
|
|
323
|
+
watch(() => props.offsetX, resize);
|
|
324
|
+
watch(() => props.offsetY, resize);
|
|
325
|
+
watch(() => props.placement, resize);
|
|
326
|
+
watch(() => show.value, newValue => {
|
|
327
|
+
if (newValue) {
|
|
328
|
+
resize();
|
|
329
|
+
call(props.onOpen);
|
|
330
|
+
} else {
|
|
331
|
+
call(props.onClose);
|
|
332
|
+
}
|
|
118
333
|
});
|
|
334
|
+
watch(() => props.trigger, newValue => {
|
|
335
|
+
if (newValue === 'click') {
|
|
336
|
+
document.addEventListener('click', handleMenuClose);
|
|
337
|
+
} else {
|
|
338
|
+
document.removeEventListener('click', handleMenuClose);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
watch(() => props.disabled, close);
|
|
119
342
|
onMounted(() => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
343
|
+
popover = createPopper(host.value, menu.value, getPopperOptions());
|
|
344
|
+
|
|
345
|
+
if (props.trigger === 'click') {
|
|
346
|
+
document.addEventListener('click', handleMenuClose);
|
|
347
|
+
}
|
|
125
348
|
});
|
|
126
349
|
onUnmounted(() => {
|
|
127
350
|
document.removeEventListener('click', handleMenuClose);
|
|
128
|
-
|
|
129
|
-
});
|
|
130
|
-
exposeApis({
|
|
131
|
-
resize
|
|
351
|
+
popover.destroy();
|
|
132
352
|
});
|
|
133
|
-
return
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
353
|
+
return {
|
|
354
|
+
menu,
|
|
355
|
+
host,
|
|
356
|
+
hostSize,
|
|
357
|
+
show,
|
|
358
|
+
zIndex,
|
|
359
|
+
n,
|
|
360
|
+
classes,
|
|
361
|
+
handleClick,
|
|
362
|
+
handleMenuClose,
|
|
363
|
+
handleMouseenter,
|
|
364
|
+
handleMouseleave,
|
|
365
|
+
handleMenuMouseenter,
|
|
366
|
+
handleMenuMouseleave,
|
|
367
|
+
resize,
|
|
368
|
+
open,
|
|
369
|
+
close
|
|
146
370
|
};
|
|
147
371
|
}
|
|
148
372
|
|
|
File without changes
|
package/es/menu/index.js
CHANGED
package/es/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;}
|
package/es/menu/props.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
return ['
|
|
1
|
+
function triggerValidator(trigger) {
|
|
2
|
+
return ['click', 'hover'].includes(trigger);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
function placementValidator(alignment) {
|
|
6
|
+
return ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', 'cover-top', 'cover-top-start', 'cover-top-end', 'cover-bottom', 'cover-bottom-start', 'cover-bottom-end', 'cover-left', 'cover-right'].includes(alignment);
|
|
3
7
|
}
|
|
4
8
|
|
|
5
9
|
export var props = {
|
|
@@ -7,10 +11,19 @@ export var props = {
|
|
|
7
11
|
type: Boolean,
|
|
8
12
|
default: false
|
|
9
13
|
},
|
|
10
|
-
|
|
14
|
+
disabled: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
trigger: {
|
|
11
19
|
type: String,
|
|
12
|
-
default: '
|
|
13
|
-
validator:
|
|
20
|
+
default: 'click',
|
|
21
|
+
validator: triggerValidator
|
|
22
|
+
},
|
|
23
|
+
placement: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'cover-top-start',
|
|
26
|
+
validator: placementValidator
|
|
14
27
|
},
|
|
15
28
|
offsetX: {
|
|
16
29
|
type: [Number, String],
|
|
@@ -21,9 +34,13 @@ export var props = {
|
|
|
21
34
|
default: 0
|
|
22
35
|
},
|
|
23
36
|
teleport: {
|
|
24
|
-
type: String,
|
|
37
|
+
type: [String, Object],
|
|
25
38
|
default: 'body'
|
|
26
39
|
},
|
|
40
|
+
defaultStyle: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
43
|
+
},
|
|
27
44
|
onOpen: {
|
|
28
45
|
type: Function
|
|
29
46
|
},
|
package/es/menu/style/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var {
|
|
|
12
12
|
n,
|
|
13
13
|
classes
|
|
14
14
|
} = createNamespace('pagination');
|
|
15
|
-
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, withKeys as _withKeys, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment,
|
|
15
|
+
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, withKeys as _withKeys, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
16
16
|
|
|
17
17
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
18
18
|
|
|
@@ -51,9 +51,13 @@ export function render(_ctx, _cache) {
|
|
|
51
51
|
onKeydown: _cache[3] || (_cache[3] = _withKeys($event => _ctx.setPage('simple', _ctx.simpleValue, $event), ["enter"]))
|
|
52
52
|
}, null, 8
|
|
53
53
|
/* PROPS */
|
|
54
|
-
, ["modelValue", "disabled"]), _createElementVNode("span", null, "/ " + _toDisplayString(_ctx.pageCount), 1
|
|
54
|
+
, ["modelValue", "disabled"]), _createElementVNode("span", null, [_createTextVNode(" / " + _toDisplayString(_ctx.pageCount) + " ", 1
|
|
55
55
|
/* TEXT */
|
|
56
|
-
)
|
|
56
|
+
), _createElementVNode("div", {
|
|
57
|
+
class: _normalizeClass(_ctx.n('simple-line'))
|
|
58
|
+
}, null, 2
|
|
59
|
+
/* CLASS */
|
|
60
|
+
)])], 2
|
|
57
61
|
/* CLASS */
|
|
58
62
|
)) : (_openBlock(true), _createElementBlock(_Fragment, {
|
|
59
63
|
key: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --pagination-font-size: var(--font-size-md); --pagination-active-color: #fff; --pagination-active-bg-color: var(--color-primary); --pagination-hover-bg-color: #edf5ff; --pagination-total-margin: 0 12px; --pagination-total-line-height: 24px; --pagination-item-width: 32px; --pagination-item-height: 32px; --pagination-item-margin: 0 6px; --pagination-item-background: #fff; --pagination-item-border-radius: 4px; --pagination-list-bg-color: #fff; --pagination-list-active-bg-color: #edf5ff; --pagination-list-active-color: var(--color-primary); --pagination-input-width: 32px; --pagination-simple-padding: 0 0 2px 0; --pagination-disabled-color: var(--color-text-disabled); --pagination-bg-disabled-color: var(--color-disabled); --pagination-size-line-height: 24px;}.pagination-flex-nowrap { display: flex; white-space: nowrap; align-items: center;}.var-pagination { display: flex; align-items: center; list-style: none; width: 100%; margin: 0; font-size: var(--pagination-font-size); padding: 0;}.var-pagination__item { display: inline-flex; min-width: var(--pagination-item-width); align-items: center; justify-content: center; margin: var(--pagination-item-margin); height: var(--pagination-item-height); cursor: pointer; border-radius: var(--pagination-item-border-radius); outline: none; transition: all 0.25s; user-select: none; background-color: var(--pagination-item-background);}.var-pagination__item:hover { background-color: var(--pagination-hover-bg-color);}.var-pagination__item--active { color: var(--pagination-active-color); background-color: var(--pagination-active-bg-color) !important;}.var-pagination__item--hide { display: none;}.var-pagination__item--disabled { cursor: default; color: var(--pagination-disabled-color); background-color: unset;}.var-pagination__item--disabled:hover { background-color: unset;}.var-pagination__item--disabled--hover:hover { background-color: inherit;}.var-pagination__item--disabled--active { background-color: var(--pagination-bg-disabled-color);}.var-pagination__item--disabled--active:hover { background-color: var(--pagination-bg-disabled-color);}.var-pagination__prev { margin-left: 0;}.var-pagination__total { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-total-line-height); margin: var(--pagination-total-margin);}.var-pagination__size { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-size-line-height); margin: var(--pagination-item-margin);}.var-pagination__size--open { display: flex; align-items: center; cursor: pointer;}.var-pagination__size--open--disabled { cursor: default;}.var-pagination__list { background-color: var(--pagination-list-bg-color); cursor: pointer; transition: all 0.25s;}.var-pagination__list:hover { color: var(--pagination-list-active-color); background-color: var(--pagination-hover-bg-color);}.var-pagination__list--active { background-color: var(--pagination-list-active-bg-color) !important; color: var(--pagination-list-active-color);}.var-pagination__quickly,.var-pagination__simple { display: flex; white-space: nowrap; align-items: center;}.var-pagination__quickly [var-pagination-cover],.var-pagination__simple [var-pagination-cover] { width: var(--pagination-input-width);}.var-pagination__quickly [var-pagination-cover] .var-input__wrap,.var-pagination__simple [var-pagination-cover] .var-input__wrap { padding: 0;}.var-pagination__quickly [var-pagination-cover] .var-input__input,.var-pagination__simple [var-pagination-cover] .var-input__input { height: auto; text-align: center;}.var-pagination__quickly { margin: var(--pagination-item-margin);}.var-pagination__quickly [var-pagination-cover] { margin-left: 6px;}.var-pagination__size--open-icon[var-pagination-cover] { font-size: inherit;}.var-pagination--simple-padding { padding: var(--pagination-simple-padding);}
|
|
1
|
+
:root { --pagination-font-size: var(--font-size-md); --pagination-active-color: #fff; --pagination-active-bg-color: var(--color-primary); --pagination-hover-bg-color: #edf5ff; --pagination-total-margin: 0 12px; --pagination-total-line-height: 24px; --pagination-item-width: 32px; --pagination-item-height: 32px; --pagination-item-margin: 0 6px; --pagination-item-background: #fff; --pagination-item-border-radius: 4px; --pagination-list-bg-color: #fff; --pagination-list-active-bg-color: #edf5ff; --pagination-list-active-color: var(--color-primary); --pagination-input-width: 32px; --pagination-simple-padding: 0 0 2px 0; --pagination-disabled-color: var(--color-text-disabled); --pagination-bg-disabled-color: var(--color-disabled); --pagination-size-line-height: 24px;}.pagination-flex-nowrap { display: flex; white-space: nowrap; align-items: center;}.var-pagination { display: flex; align-items: center; list-style: none; width: 100%; margin: 0; font-size: var(--pagination-font-size); padding: 0;}.var-pagination__item { display: inline-flex; min-width: var(--pagination-item-width); align-items: center; justify-content: center; margin: var(--pagination-item-margin); height: var(--pagination-item-height); cursor: pointer; border-radius: var(--pagination-item-border-radius); outline: none; transition: all 0.25s; user-select: none; background-color: var(--pagination-item-background);}.var-pagination__item:hover { background-color: var(--pagination-hover-bg-color);}.var-pagination__item--active { color: var(--pagination-active-color); background-color: var(--pagination-active-bg-color) !important;}.var-pagination__item--hide { display: none;}.var-pagination__item--disabled { cursor: default; color: var(--pagination-disabled-color); background-color: unset;}.var-pagination__item--disabled:hover { background-color: unset;}.var-pagination__item--disabled--hover:hover { background-color: inherit;}.var-pagination__item--disabled--active { background-color: var(--pagination-bg-disabled-color);}.var-pagination__item--disabled--active:hover { background-color: var(--pagination-bg-disabled-color);}.var-pagination__prev { margin-left: 0;}.var-pagination__total { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-total-line-height); margin: var(--pagination-total-margin);}.var-pagination__size { display: flex; white-space: nowrap; align-items: center; line-height: var(--pagination-size-line-height); margin: var(--pagination-item-margin);}.var-pagination__size--open { display: flex; align-items: center; cursor: pointer;}.var-pagination__size--open--disabled { cursor: default;}.var-pagination__list { background-color: var(--pagination-list-bg-color); cursor: pointer; transition: all 0.25s;}.var-pagination__list:hover { color: var(--pagination-list-active-color); background-color: var(--pagination-hover-bg-color);}.var-pagination__list--active { background-color: var(--pagination-list-active-bg-color) !important; color: var(--pagination-list-active-color);}.var-pagination__quickly,.var-pagination__simple { display: flex; white-space: nowrap; align-items: center;}.var-pagination__quickly [var-pagination-cover],.var-pagination__simple [var-pagination-cover] { width: var(--pagination-input-width);}.var-pagination__quickly [var-pagination-cover] .var-input__wrap,.var-pagination__simple [var-pagination-cover] .var-input__wrap { padding: 0;}.var-pagination__quickly [var-pagination-cover] .var-input__input,.var-pagination__simple [var-pagination-cover] .var-input__input { height: auto; text-align: center;}.var-pagination__quickly-line,.var-pagination__simple-line { height: 1px; background: transparent;}.var-pagination__quickly { margin: var(--pagination-item-margin);}.var-pagination__quickly [var-pagination-cover] { margin-left: 6px;}.var-pagination__size--open-icon[var-pagination-cover] { font-size: inherit;}.var-pagination--simple-padding { padding: var(--pagination-simple-padding);}
|
package/es/picker/props.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
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); }
|
|
2
2
|
|
|
3
3
|
import { pickProps } from '../utils/components';
|
|
4
4
|
import { props as popupProps } from '../popup/props';
|
package/es/popup/Popup.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { isVNode as _isVNode, withDirectives as _withDirectives, vShow as _vShow, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
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); }
|
|
4
4
|
|
|
5
5
|
import { defineComponent, watch, Transition, Teleport } from 'vue';
|
|
6
6
|
import { props } from './props';
|
|
7
7
|
import { useLock } from '../context/lock';
|
|
8
8
|
import { useZIndex } from '../context/zIndex';
|
|
9
|
-
import {
|
|
9
|
+
import { useRouteListener, useTeleport, createNamespace } from '../utils/components';
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -60,7 +60,7 @@ export default defineComponent({
|
|
|
60
60
|
newValue ? onOpen == null ? void 0 : onOpen() : onClose == null ? void 0 : onClose();
|
|
61
61
|
}); // internal for Dialog
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
useRouteListener(() => props.onRouteChange == null ? void 0 : props.onRouteChange());
|
|
64
64
|
|
|
65
65
|
var renderOverlay = () => {
|
|
66
66
|
var {
|