@varlet/ui 1.23.3-alpha.1 → 1.23.4-alpha.16
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 +22 -0
- package/es/action-sheet/index.js +1 -1
- package/es/back-top/BackTop.js +2 -2
- package/es/dialog/index.js +1 -1
- package/es/image-preview/index.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/input/Input.js +36 -13
- package/es/list/List.js +1 -1
- package/es/popup/Popup.js +81 -59
- package/es/popup/index.js +1 -1
- package/es/popup/style/index.js +0 -1
- package/es/popup/style/less.js +0 -1
- package/es/pull-refresh/PullRefresh.js +1 -1
- package/es/sticky/Sticky.js +1 -1
- package/es/utils/components.js +7 -0
- package/es/utils/elements.js +2 -2
- package/es/utils/shared.js +1 -1
- package/highlight/web-types.json +1 -1
- package/lib/action-sheet/ActionSheet.js +149 -0
- package/{es/popup/PopupSfc.css → lib/action-sheet/ActionSheetSfc.css} +0 -0
- package/{es/popup/PopupSfc.less → lib/action-sheet/ActionSheetSfc.less} +0 -0
- package/lib/action-sheet/actionSheet.css +1 -0
- package/lib/action-sheet/actionSheet.less +68 -0
- package/lib/action-sheet/index.js +79 -0
- package/lib/action-sheet/props.js +37 -0
- package/lib/action-sheet/style/index.js +6 -0
- package/lib/action-sheet/style/less.js +6 -0
- package/lib/app-bar/AppBar.js +66 -0
- package/lib/app-bar/AppBarSfc.css +0 -0
- package/lib/app-bar/AppBarSfc.less +0 -0
- package/lib/app-bar/appBar.css +1 -0
- package/lib/app-bar/appBar.less +56 -0
- package/lib/app-bar/index.js +17 -0
- package/lib/app-bar/props.js +32 -0
- package/lib/app-bar/style/index.js +4 -0
- package/lib/app-bar/style/less.js +4 -0
- package/lib/back-top/BackTop.js +96 -0
- package/lib/back-top/BackTopSfc.css +0 -0
- package/lib/back-top/BackTopSfc.less +0 -0
- package/lib/back-top/backTop.css +1 -0
- package/lib/back-top/backTop.less +27 -0
- package/lib/back-top/index.js +17 -0
- package/lib/back-top/props.js +21 -0
- package/lib/back-top/style/index.js +5 -0
- package/lib/back-top/style/less.js +5 -0
- package/lib/badge/Badge.js +107 -0
- package/lib/badge/BadgeSfc.css +0 -0
- package/lib/badge/BadgeSfc.less +0 -0
- package/lib/badge/badge.css +1 -0
- package/lib/badge/badge.less +119 -0
- package/lib/badge/index.js +17 -0
- package/lib/badge/props.js +55 -0
- package/lib/badge/style/index.js +4 -0
- package/lib/badge/style/less.js +4 -0
- package/lib/button/Button.js +102 -0
- package/lib/button/ButtonSfc.css +0 -0
- package/lib/button/ButtonSfc.less +0 -0
- package/lib/button/button.css +1 -0
- package/lib/button/button.less +183 -0
- package/lib/button/index.js +17 -0
- package/lib/button/props.js +76 -0
- package/lib/button/style/index.js +6 -0
- package/lib/button/style/less.js +6 -0
- package/lib/card/Card.js +83 -0
- package/lib/card/CardSfc.css +0 -0
- package/lib/card/CardSfc.less +0 -0
- package/lib/card/card.css +1 -0
- package/lib/card/card.less +84 -0
- package/lib/card/index.js +17 -0
- package/lib/card/props.js +45 -0
- package/lib/card/style/index.js +5 -0
- package/lib/card/style/less.js +5 -0
- package/lib/cell/Cell.js +68 -0
- package/lib/cell/CellSfc.css +0 -0
- package/lib/cell/CellSfc.less +0 -0
- package/lib/cell/cell.css +1 -0
- package/lib/cell/cell.less +74 -0
- package/lib/cell/index.js +17 -0
- package/lib/cell/props.js +32 -0
- package/lib/cell/style/index.js +4 -0
- package/lib/cell/style/less.js +4 -0
- package/lib/checkbox/Checkbox.js +232 -0
- package/lib/checkbox/CheckboxSfc.css +0 -0
- package/lib/checkbox/CheckboxSfc.less +0 -0
- package/lib/checkbox/checkbox.css +1 -0
- package/lib/checkbox/checkbox.less +78 -0
- package/lib/checkbox/index.js +17 -0
- package/lib/checkbox/props.js +56 -0
- package/lib/checkbox/provide.js +23 -0
- package/lib/checkbox/style/index.js +5 -0
- package/lib/checkbox/style/less.js +5 -0
- package/lib/checkbox-group/CheckboxGroup.js +181 -0
- package/lib/checkbox-group/CheckboxGroupSfc.css +0 -0
- package/lib/checkbox-group/CheckboxGroupSfc.less +0 -0
- package/lib/checkbox-group/checkboxGroup.css +1 -0
- package/lib/checkbox-group/checkboxGroup.less +12 -0
- package/lib/checkbox-group/index.js +17 -0
- package/lib/checkbox-group/props.js +38 -0
- package/lib/checkbox-group/provide.js +27 -0
- package/lib/checkbox-group/style/index.js +4 -0
- package/lib/checkbox-group/style/less.js +4 -0
- package/lib/chip/Chip.js +95 -0
- package/lib/chip/ChipSfc.css +0 -0
- package/lib/chip/ChipSfc.less +0 -0
- package/lib/chip/chip.css +1 -0
- package/lib/chip/chip.less +182 -0
- package/lib/chip/index.js +17 -0
- package/lib/chip/props.js +56 -0
- package/lib/chip/style/index.js +4 -0
- package/lib/chip/style/less.js +4 -0
- package/lib/col/Col.js +68 -0
- package/lib/col/ColSfc.css +0 -0
- package/lib/col/ColSfc.less +0 -0
- package/lib/col/col.css +1 -0
- package/lib/col/col.less +17 -0
- package/lib/col/index.js +17 -0
- package/lib/col/props.js +18 -0
- package/lib/col/provide.js +28 -0
- package/lib/col/style/index.js +3 -0
- package/lib/col/style/less.js +3 -0
- package/lib/collapse/Collapse.js +126 -0
- package/lib/collapse/CollapseSfc.css +1 -0
- package/lib/collapse/CollapseSfc.less +1 -0
- package/lib/collapse/index.js +17 -0
- package/lib/collapse/props.js +24 -0
- package/lib/collapse/provide.js +27 -0
- package/lib/collapse/style/index.js +3 -0
- package/lib/collapse/style/less.js +3 -0
- package/lib/collapse-item/CollapseItem.js +155 -0
- package/lib/collapse-item/CollapseItemSfc.css +0 -0
- package/lib/collapse-item/CollapseItemSfc.less +0 -0
- package/lib/collapse-item/collapseItem.css +1 -0
- package/lib/collapse-item/collapseItem.less +105 -0
- package/lib/collapse-item/index.js +17 -0
- package/lib/collapse-item/props.js +21 -0
- package/lib/collapse-item/provide.js +28 -0
- package/lib/collapse-item/style/index.js +4 -0
- package/lib/collapse-item/style/less.js +4 -0
- package/lib/context/index.js +20 -0
- package/lib/context/lock.js +107 -0
- package/lib/context/style/index.js +0 -0
- package/lib/context/style/less.js +0 -0
- package/lib/context/zIndex.js +25 -0
- package/lib/countdown/Countdown.js +119 -0
- package/lib/countdown/CountdownSfc.css +0 -0
- package/lib/countdown/CountdownSfc.less +0 -0
- package/lib/countdown/index.js +17 -0
- package/lib/countdown/props.js +25 -0
- package/lib/countdown/style/index.js +2 -0
- package/lib/countdown/style/less.js +2 -0
- package/lib/counter/Counter.js +387 -0
- package/lib/counter/CounterSfc.css +0 -0
- package/lib/counter/CounterSfc.less +0 -0
- package/lib/counter/counter.css +1 -0
- package/lib/counter/counter.less +85 -0
- package/lib/counter/index.js +17 -0
- package/lib/counter/props.js +98 -0
- package/lib/counter/provide.js +3 -0
- package/lib/counter/style/index.js +7 -0
- package/lib/counter/style/less.js +7 -0
- package/lib/date-picker/DatePicker.js +469 -0
- package/lib/date-picker/DatePickerSfc.css +0 -0
- package/lib/date-picker/DatePickerSfc.less +0 -0
- package/lib/date-picker/date-picker.css +1 -0
- package/lib/date-picker/date-picker.less +330 -0
- package/lib/date-picker/index.js +17 -0
- package/lib/date-picker/props.js +107 -0
- package/lib/date-picker/src/day-picker-panel.js +355 -0
- package/lib/date-picker/src/month-picker-panel.js +289 -0
- package/lib/date-picker/src/panel-header.js +152 -0
- package/lib/date-picker/src/year-picker-panel.js +112 -0
- package/lib/date-picker/style/index.js +5 -0
- package/lib/date-picker/style/less.js +5 -0
- package/lib/dialog/Dialog.js +214 -0
- package/lib/dialog/DialogSfc.css +0 -0
- package/lib/dialog/DialogSfc.less +0 -0
- package/lib/dialog/dialog.css +1 -0
- package/lib/dialog/dialog.less +77 -0
- package/lib/dialog/index.js +85 -0
- package/lib/dialog/props.js +73 -0
- package/lib/dialog/style/index.js +5 -0
- package/lib/dialog/style/less.js +5 -0
- package/lib/divider/Divider.js +88 -0
- package/lib/divider/DividerSfc.css +0 -0
- package/lib/divider/DividerSfc.less +0 -0
- package/lib/divider/divider.css +1 -0
- package/lib/divider/divider.less +79 -0
- package/lib/divider/index.js +17 -0
- package/lib/divider/props.js +25 -0
- package/lib/divider/style/index.js +3 -0
- package/lib/divider/style/less.js +3 -0
- package/lib/form/Form.js +77 -0
- package/lib/form/FormSfc.css +0 -0
- package/lib/form/FormSfc.less +0 -0
- package/lib/form/index.js +17 -0
- package/lib/form/props.js +15 -0
- package/lib/form/provide.js +33 -0
- package/lib/form/style/index.js +2 -0
- package/lib/form/style/less.js +2 -0
- package/lib/form-details/FormDetails.js +45 -0
- package/lib/form-details/FormDetailsSfc.css +0 -0
- package/lib/form-details/FormDetailsSfc.less +0 -0
- package/lib/form-details/formDetails.css +1 -0
- package/lib/form-details/formDetails.less +48 -0
- package/lib/form-details/index.js +17 -0
- package/lib/form-details/props.js +15 -0
- package/lib/form-details/style/index.js +3 -0
- package/lib/form-details/style/less.js +3 -0
- package/lib/icon/Icon.js +83 -0
- package/lib/icon/IconSfc.css +0 -0
- package/lib/icon/IconSfc.less +0 -0
- package/lib/icon/icon.css +1 -0
- package/lib/icon/icon.less +25 -0
- package/lib/icon/index.js +17 -0
- package/lib/icon/props.js +27 -0
- package/lib/icon/style/index.js +3 -0
- package/lib/icon/style/less.js +3 -0
- package/lib/image/Image.js +113 -0
- package/lib/image/ImageSfc.css +0 -0
- package/lib/image/ImageSfc.less +0 -0
- package/lib/image/image.css +1 -0
- package/lib/image/image.less +9 -0
- package/lib/image/index.js +17 -0
- package/lib/image/props.js +60 -0
- package/lib/image/style/index.js +4 -0
- package/lib/image/style/less.js +4 -0
- package/lib/image-preview/ImagePreview.js +369 -0
- package/lib/image-preview/ImagePreviewSfc.css +0 -0
- package/lib/image-preview/ImagePreviewSfc.less +0 -0
- package/lib/image-preview/imagePreview.css +1 -0
- package/lib/image-preview/imagePreview.less +66 -0
- package/lib/image-preview/index.js +74 -0
- package/lib/image-preview/props.js +40 -0
- package/lib/image-preview/style/index.js +7 -0
- package/lib/image-preview/style/less.js +7 -0
- package/lib/index-anchor/IndexAnchor.js +99 -0
- package/lib/index-anchor/IndexAnchorSfc.css +1 -0
- package/lib/index-anchor/IndexAnchorSfc.less +1 -0
- package/lib/index-anchor/index.js +17 -0
- package/lib/index-anchor/props.js +10 -0
- package/lib/index-anchor/provide.js +28 -0
- package/lib/index-anchor/style/index.js +3 -0
- package/lib/index-anchor/style/less.js +3 -0
- package/lib/index-bar/IndexBar.js +186 -0
- package/lib/index-bar/IndexBarSfc.css +0 -0
- package/lib/index-bar/IndexBarSfc.less +0 -0
- package/lib/index-bar/index.js +17 -0
- package/lib/index-bar/indexBar.css +1 -0
- package/lib/index-bar/indexBar.less +43 -0
- package/lib/index-bar/props.js +40 -0
- package/lib/index-bar/provide.js +27 -0
- package/lib/index-bar/style/index.js +3 -0
- package/lib/index-bar/style/less.js +3 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +195 -0
- package/lib/input/Input.js +327 -0
- package/lib/input/InputSfc.css +0 -0
- package/lib/input/InputSfc.less +0 -0
- package/lib/input/index.js +17 -0
- package/lib/input/input.css +1 -0
- package/lib/input/input.less +183 -0
- package/lib/input/props.js +96 -0
- package/lib/input/provide.js +3 -0
- package/lib/input/style/index.js +5 -0
- package/lib/input/style/less.js +5 -0
- package/lib/lazy/index.js +247 -0
- package/lib/lazy/style/index.js +0 -0
- package/lib/lazy/style/less.js +0 -0
- package/lib/less.js +62 -0
- package/lib/list/List.js +157 -0
- package/lib/list/ListSfc.css +0 -0
- package/lib/list/ListSfc.less +0 -0
- package/lib/list/index.js +17 -0
- package/lib/list/list.css +1 -0
- package/lib/list/list.less +63 -0
- package/lib/list/props.js +45 -0
- package/lib/list/style/index.js +5 -0
- package/lib/list/style/less.js +5 -0
- package/lib/loading/Loading.js +93 -0
- package/lib/loading/LoadingSfc.css +0 -0
- package/lib/loading/LoadingSfc.less +0 -0
- package/lib/loading/index.js +17 -0
- package/lib/loading/loading.css +1 -0
- package/lib/loading/loading.less +420 -0
- package/lib/loading/props.js +39 -0
- package/lib/loading/style/index.js +3 -0
- package/lib/loading/style/less.js +3 -0
- package/lib/locale/en-US.js +107 -0
- package/lib/locale/index.js +83 -0
- package/lib/locale/style/index.js +0 -0
- package/lib/locale/style/less.js +0 -0
- package/lib/locale/zh-CN.js +107 -0
- package/lib/menu/Menu.js +144 -0
- package/lib/menu/MenuSfc.css +0 -0
- package/lib/menu/MenuSfc.less +0 -0
- package/lib/menu/index.js +17 -0
- package/lib/menu/menu.css +1 -0
- package/lib/menu/menu.less +21 -0
- package/lib/menu/props.js +48 -0
- package/lib/menu/style/index.js +4 -0
- package/lib/menu/style/less.js +4 -0
- package/lib/option/Option.js +125 -0
- package/lib/option/OptionSfc.css +0 -0
- package/lib/option/OptionSfc.less +0 -0
- package/lib/option/index.js +17 -0
- package/lib/option/option.css +1 -0
- package/lib/option/option.less +37 -0
- package/lib/option/props.js +9 -0
- package/lib/option/provide.js +28 -0
- package/lib/option/style/index.js +6 -0
- package/lib/option/style/less.js +6 -0
- package/lib/pagination/Pagination.js +373 -0
- package/lib/pagination/PaginationSfc.css +0 -0
- package/lib/pagination/PaginationSfc.less +0 -0
- package/lib/pagination/index.js +17 -0
- package/lib/pagination/pagination.css +1 -0
- package/lib/pagination/pagination.less +178 -0
- package/lib/pagination/porps.js +48 -0
- package/lib/pagination/style/index.js +8 -0
- package/lib/pagination/style/less.js +8 -0
- package/lib/picker/Picker.js +446 -0
- package/lib/picker/PickerSfc.css +0 -0
- package/lib/picker/PickerSfc.less +0 -0
- package/lib/picker/index.js +98 -0
- package/lib/picker/picker.css +1 -0
- package/lib/picker/picker.less +103 -0
- package/lib/picker/props.js +68 -0
- package/lib/picker/style/index.js +5 -0
- package/lib/picker/style/less.js +5 -0
- package/lib/popup/Popup.js +141 -0
- package/lib/popup/index.js +17 -0
- package/lib/popup/popup.css +1 -0
- package/lib/popup/popup.less +125 -0
- package/lib/popup/props.js +67 -0
- package/lib/popup/style/index.js +2 -0
- package/lib/popup/style/less.js +2 -0
- package/lib/progress/Progress.js +154 -0
- package/lib/progress/ProgressSfc.css +0 -0
- package/lib/progress/ProgressSfc.less +0 -0
- package/lib/progress/index.js +17 -0
- package/lib/progress/progress.css +1 -0
- package/lib/progress/progress.less +98 -0
- package/lib/progress/props.js +61 -0
- package/lib/progress/style/index.js +3 -0
- package/lib/progress/style/less.js +3 -0
- package/lib/pull-refresh/PullRefresh.js +150 -0
- package/lib/pull-refresh/PullRefreshSfc.css +0 -0
- package/lib/pull-refresh/PullRefreshSfc.less +0 -0
- package/lib/pull-refresh/index.js +17 -0
- package/lib/pull-refresh/props.js +47 -0
- package/lib/pull-refresh/pullRefresh.css +1 -0
- package/lib/pull-refresh/pullRefresh.less +55 -0
- package/lib/pull-refresh/style/index.js +5 -0
- package/lib/pull-refresh/style/less.js +5 -0
- package/lib/radio/Radio.js +231 -0
- package/lib/radio/RadioSfc.css +0 -0
- package/lib/radio/RadioSfc.less +0 -0
- package/lib/radio/index.js +17 -0
- package/lib/radio/props.js +56 -0
- package/lib/radio/provide.js +23 -0
- package/lib/radio/radio.css +1 -0
- package/lib/radio/radio.less +78 -0
- package/lib/radio/style/index.js +6 -0
- package/lib/radio/style/less.js +6 -0
- package/lib/radio-group/RadioGroup.js +122 -0
- package/lib/radio-group/RadioGroupSfc.css +0 -0
- package/lib/radio-group/RadioGroupSfc.less +0 -0
- package/lib/radio-group/index.js +17 -0
- package/lib/radio-group/props.js +35 -0
- package/lib/radio-group/provide.js +27 -0
- package/lib/radio-group/radioGroup.css +1 -0
- package/lib/radio-group/radioGroup.less +12 -0
- package/lib/radio-group/style/index.js +4 -0
- package/lib/radio-group/style/less.js +4 -0
- package/lib/rate/Rate.js +235 -0
- package/lib/rate/RateSfc.css +0 -0
- package/lib/rate/RateSfc.less +0 -0
- package/lib/rate/index.js +17 -0
- package/lib/rate/props.js +69 -0
- package/lib/rate/provide.js +3 -0
- package/lib/rate/rate.css +1 -0
- package/lib/rate/rate.less +35 -0
- package/lib/rate/style/index.js +6 -0
- package/lib/rate/style/less.js +6 -0
- package/lib/ripple/index.js +187 -0
- package/lib/ripple/ripple.css +1 -0
- package/lib/ripple/ripple.less +17 -0
- package/lib/ripple/style/index.js +2 -0
- package/lib/ripple/style/less.js +2 -0
- package/lib/row/Row.js +102 -0
- package/lib/row/RowSfc.css +0 -0
- package/lib/row/RowSfc.less +0 -0
- package/lib/row/index.js +17 -0
- package/lib/row/props.js +33 -0
- package/lib/row/provide.js +27 -0
- package/lib/row/row.css +1 -0
- package/lib/row/row.less +4 -0
- package/lib/row/style/index.js +3 -0
- package/lib/row/style/less.js +3 -0
- package/lib/select/Select.js +492 -0
- package/lib/select/SelectSfc.css +0 -0
- package/lib/select/SelectSfc.less +0 -0
- package/lib/select/index.js +17 -0
- package/lib/select/props.js +93 -0
- package/lib/select/provide.js +27 -0
- package/lib/select/select.css +1 -0
- package/lib/select/select.less +181 -0
- package/lib/select/style/index.js +7 -0
- package/lib/select/style/less.js +7 -0
- package/lib/skeleton/Skeleton.js +134 -0
- package/lib/skeleton/SkeletonSfc.css +0 -0
- package/lib/skeleton/SkeletonSfc.less +0 -0
- package/lib/skeleton/index.js +17 -0
- package/lib/skeleton/props.js +44 -0
- package/lib/skeleton/skeleton.css +1 -0
- package/lib/skeleton/skeleton.less +138 -0
- package/lib/skeleton/style/index.js +3 -0
- package/lib/skeleton/style/less.js +3 -0
- package/lib/slider/Slider.js +386 -0
- package/lib/slider/SliderSfc.css +0 -0
- package/lib/slider/SliderSfc.less +0 -0
- package/lib/slider/index.js +17 -0
- package/lib/slider/props.js +77 -0
- package/lib/slider/provide.js +3 -0
- package/lib/slider/slider.css +1 -0
- package/lib/slider/slider.less +146 -0
- package/lib/slider/style/index.js +4 -0
- package/lib/slider/style/less.js +4 -0
- package/lib/snackbar/Snackbar.js +70 -0
- package/lib/snackbar/SnackbarSfc.css +0 -0
- package/lib/snackbar/SnackbarSfc.less +0 -0
- package/lib/snackbar/core.js +146 -0
- package/lib/snackbar/coreSfc.css +0 -0
- package/lib/snackbar/coreSfc.less +0 -0
- package/lib/snackbar/index.js +232 -0
- package/lib/snackbar/props.js +103 -0
- package/lib/snackbar/snackbar.css +1 -0
- package/lib/snackbar/snackbar.less +135 -0
- package/lib/snackbar/style/index.js +8 -0
- package/lib/snackbar/style/less.js +8 -0
- package/lib/space/Space.js +99 -0
- package/lib/space/index.js +17 -0
- package/lib/space/props.js +49 -0
- package/lib/space/space.css +1 -0
- package/lib/space/space.less +6 -0
- package/lib/space/style/index.js +2 -0
- package/lib/space/style/less.js +2 -0
- package/lib/step/Step.js +156 -0
- package/lib/step/StepSfc.css +0 -0
- package/lib/step/StepSfc.less +0 -0
- package/lib/step/index.js +17 -0
- package/lib/step/props.js +17 -0
- package/lib/step/provide.js +28 -0
- package/lib/step/step.css +1 -0
- package/lib/step/step.less +145 -0
- package/lib/step/style/index.js +4 -0
- package/lib/step/style/less.js +4 -0
- package/lib/steps/Steps.js +56 -0
- package/lib/steps/StepsSfc.css +1 -0
- package/lib/steps/StepsSfc.less +1 -0
- package/lib/steps/index.js +17 -0
- package/lib/steps/props.js +30 -0
- package/lib/steps/provide.js +27 -0
- package/lib/steps/style/index.js +2 -0
- package/lib/steps/style/less.js +2 -0
- package/lib/sticky/Sticky.js +145 -0
- package/lib/sticky/StickySfc.css +0 -0
- package/lib/sticky/StickySfc.less +0 -0
- package/lib/sticky/index.js +17 -0
- package/lib/sticky/props.js +26 -0
- package/lib/sticky/sticky.css +1 -0
- package/lib/sticky/sticky.less +8 -0
- package/lib/sticky/style/index.js +3 -0
- package/lib/sticky/style/less.js +3 -0
- package/lib/style-provider/StyleProvider.js +30 -0
- package/lib/style-provider/StyleProviderSfc.css +0 -0
- package/lib/style-provider/StyleProviderSfc.less +0 -0
- package/lib/style-provider/index.js +37 -0
- package/lib/style-provider/style/index.js +2 -0
- package/lib/style-provider/style/less.js +2 -0
- package/lib/style.css +1 -0
- package/lib/style.js +62 -0
- package/lib/styles/common.css +1 -0
- package/lib/styles/common.less +67 -0
- package/lib/styles/elevation.css +1 -0
- package/lib/styles/elevation.less +126 -0
- package/lib/styles/style/index.js +0 -0
- package/lib/styles/style/less.js +0 -0
- package/lib/styles/var.css +0 -0
- package/lib/styles/var.less +30 -0
- package/lib/swipe/Swipe.js +408 -0
- package/lib/swipe/SwipeSfc.css +0 -0
- package/lib/swipe/SwipeSfc.less +0 -0
- package/lib/swipe/index.js +17 -0
- package/lib/swipe/props.js +40 -0
- package/lib/swipe/provide.js +27 -0
- package/lib/swipe/style/index.js +3 -0
- package/lib/swipe/style/less.js +3 -0
- package/lib/swipe/swipe.css +1 -0
- package/lib/swipe/swipe.less +59 -0
- package/lib/swipe-item/SwipeItem.js +58 -0
- package/lib/swipe-item/SwipeItemSfc.css +0 -0
- package/lib/swipe-item/SwipeItemSfc.less +0 -0
- package/lib/swipe-item/index.js +17 -0
- package/lib/swipe-item/provide.js +28 -0
- package/lib/swipe-item/style/index.js +3 -0
- package/lib/swipe-item/style/less.js +3 -0
- package/lib/swipe-item/swipeItem.css +1 -0
- package/lib/swipe-item/swipeItem.less +5 -0
- package/lib/switch/Switch.js +185 -0
- package/lib/switch/SwitchSfc.css +0 -0
- package/lib/switch/SwitchSfc.less +0 -0
- package/lib/switch/index.js +17 -0
- package/lib/switch/props.js +57 -0
- package/lib/switch/provide.js +3 -0
- package/lib/switch/style/index.js +7 -0
- package/lib/switch/style/less.js +7 -0
- package/lib/switch/switch.css +1 -0
- package/lib/switch/switch.less +80 -0
- package/lib/tab/Tab.js +116 -0
- package/lib/tab/TabSfc.css +0 -0
- package/lib/tab/TabSfc.less +0 -0
- package/lib/tab/index.js +17 -0
- package/lib/tab/props.js +17 -0
- package/lib/tab/provide.js +28 -0
- package/lib/tab/style/index.js +4 -0
- package/lib/tab/style/less.js +4 -0
- package/lib/tab/tab.css +1 -0
- package/lib/tab/tab.less +46 -0
- package/lib/tab-item/TabItem.js +74 -0
- package/lib/tab-item/TabItemSfc.css +0 -0
- package/lib/tab-item/TabItemSfc.less +0 -0
- package/lib/tab-item/index.js +17 -0
- package/lib/tab-item/props.js +10 -0
- package/lib/tab-item/provide.js +28 -0
- package/lib/tab-item/style/index.js +4 -0
- package/lib/tab-item/style/less.js +4 -0
- package/lib/tab-item/tabItem.css +1 -0
- package/lib/tab-item/tabItem.less +6 -0
- package/lib/table/Table.js +53 -0
- package/lib/table/TableSfc.css +0 -0
- package/lib/table/TableSfc.less +0 -0
- package/lib/table/index.js +17 -0
- package/lib/table/style/index.js +4 -0
- package/lib/table/style/less.js +4 -0
- package/lib/table/table.css +1 -0
- package/lib/table/table.less +110 -0
- package/lib/tabs/Tabs.js +208 -0
- package/lib/tabs/TabsSfc.css +0 -0
- package/lib/tabs/TabsSfc.less +0 -0
- package/lib/tabs/index.js +17 -0
- package/lib/tabs/props.js +70 -0
- package/lib/tabs/provide.js +27 -0
- package/lib/tabs/style/index.js +5 -0
- package/lib/tabs/style/less.js +5 -0
- package/lib/tabs/tabs.css +1 -0
- package/lib/tabs/tabs.less +93 -0
- package/lib/tabs-items/TabsItems.js +107 -0
- package/lib/tabs-items/TabsItemsSfc.css +0 -0
- package/lib/tabs-items/TabsItemsSfc.less +0 -0
- package/lib/tabs-items/index.js +17 -0
- package/lib/tabs-items/props.js +22 -0
- package/lib/tabs-items/provide.js +27 -0
- package/lib/tabs-items/style/index.js +3 -0
- package/lib/tabs-items/style/less.js +3 -0
- package/lib/themes/dark/actionSheet.js +10 -0
- package/lib/themes/dark/badge.js +8 -0
- package/lib/themes/dark/button.js +8 -0
- package/lib/themes/dark/card.js +11 -0
- package/lib/themes/dark/cell.js +9 -0
- package/lib/themes/dark/checkbox.js +8 -0
- package/lib/themes/dark/chip.js +8 -0
- package/lib/themes/dark/collapse.js +10 -0
- package/lib/themes/dark/datePicker.js +10 -0
- package/lib/themes/dark/dialog.js +9 -0
- package/lib/themes/dark/divider.js +9 -0
- package/lib/themes/dark/index.js +75 -0
- package/lib/themes/dark/input.js +9 -0
- package/lib/themes/dark/pagination.js +12 -0
- package/lib/themes/dark/picker.js +10 -0
- package/lib/themes/dark/popup.js +8 -0
- package/lib/themes/dark/pullRefresh.js +8 -0
- package/lib/themes/dark/radio.js +8 -0
- package/lib/themes/dark/select.js +10 -0
- package/lib/themes/dark/skeleton.js +11 -0
- package/lib/themes/dark/steps.js +10 -0
- package/lib/themes/dark/switch.js +9 -0
- package/lib/themes/dark/tab-item.js +8 -0
- package/lib/themes/dark/tab.js +8 -0
- package/lib/themes/dark/table.js +12 -0
- package/lib/themes/dark/tabs.js +8 -0
- package/lib/themes/dark/timePicker.js +10 -0
- package/lib/themes/dark/uploader.js +12 -0
- package/lib/themes/style/index.js +0 -0
- package/lib/themes/style/less.js +0 -0
- package/lib/time-picker/TimePicker.js +413 -0
- package/lib/time-picker/TimePickerSfc.css +0 -0
- package/lib/time-picker/TimePickerSfc.less +0 -0
- package/lib/time-picker/clock.js +347 -0
- package/lib/time-picker/index.js +17 -0
- package/lib/time-picker/props.js +59 -0
- package/lib/time-picker/style/index.js +4 -0
- package/lib/time-picker/style/less.js +4 -0
- package/lib/time-picker/timePicker.css +1 -0
- package/lib/time-picker/timePicker.less +236 -0
- package/lib/time-picker/utils.js +148 -0
- package/lib/uploader/Uploader.js +433 -0
- package/lib/uploader/UploaderSfc.css +0 -0
- package/lib/uploader/UploaderSfc.less +0 -0
- package/lib/uploader/index.js +17 -0
- package/lib/uploader/props.js +74 -0
- package/lib/uploader/provide.js +3 -0
- package/lib/uploader/style/index.js +8 -0
- package/lib/uploader/style/less.js +8 -0
- package/lib/uploader/uploader.css +1 -0
- package/lib/uploader/uploader.less +219 -0
- package/lib/utils/components.js +285 -0
- package/lib/utils/elements.js +261 -0
- package/lib/utils/jest.js +252 -0
- package/lib/utils/shared.js +214 -0
- package/lib/utils/style/index.js +0 -0
- package/lib/utils/style/less.js +0 -0
- package/package.json +5 -3
- package/types/global.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/list.d.ts +21 -0
- package/umd/varlet.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.23.4](https://github.com/haoziqaq/varlet/compare/v1.23.3...v1.23.4) (2021-11-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui/types:** add list.d.ts ([ab06a8f](https://github.com/haoziqaq/varlet/commit/ab06a8f219fcf5f4f929938f048a142a6c4b1715))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.23.3](https://github.com/haoziqaq/varlet/compare/v1.23.2...v1.23.3) (2021-11-20)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **cli/jest:** add watchAll mode ([84ebb4e](https://github.com/haoziqaq/varlet/commit/84ebb4efe823cb9d7f22995d429b82d8fc3e05c8))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [1.23.2](https://github.com/haoziqaq/varlet/compare/v1.23.0...v1.23.2) (2021-11-20)
|
|
7
29
|
|
|
8
30
|
|
package/es/action-sheet/index.js
CHANGED
package/es/back-top/BackTop.js
CHANGED
|
@@ -38,7 +38,7 @@ export default defineComponent({
|
|
|
38
38
|
props,
|
|
39
39
|
|
|
40
40
|
setup(props) {
|
|
41
|
-
var element
|
|
41
|
+
var element;
|
|
42
42
|
var show = ref(false);
|
|
43
43
|
|
|
44
44
|
var click = () => {
|
|
@@ -65,7 +65,7 @@ export default defineComponent({
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
onMounted(() => {
|
|
68
|
-
|
|
68
|
+
element = props.target ? getHTMLElement() : window;
|
|
69
69
|
element.addEventListener('scroll', throttleScroll);
|
|
70
70
|
});
|
|
71
71
|
onBeforeUnmount(() => {
|
package/es/dialog/index.js
CHANGED
package/es/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../types'
|
package/es/input/Input.js
CHANGED
|
@@ -5,7 +5,7 @@ import { props } from './props';
|
|
|
5
5
|
import { isEmpty } from '../utils/shared';
|
|
6
6
|
import { useValidation } from '../utils/components';
|
|
7
7
|
import { useForm } from '../form/provide';
|
|
8
|
-
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode,
|
|
8
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, createBlock as _createBlock, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
9
9
|
|
|
10
10
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
11
11
|
|
|
@@ -13,7 +13,9 @@ var _hoisted_1 = {
|
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "var-input__autocomplete"
|
|
15
15
|
};
|
|
16
|
-
var _hoisted_2 = ["
|
|
16
|
+
var _hoisted_2 = ["id", "disabled", "type", "value", "maxlength", "rows"];
|
|
17
|
+
var _hoisted_3 = ["id", "disabled", "type", "value", "maxlength"];
|
|
18
|
+
var _hoisted_4 = ["for"];
|
|
17
19
|
export function render(_ctx, _cache) {
|
|
18
20
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
19
21
|
|
|
@@ -21,7 +23,7 @@ export function render(_ctx, _cache) {
|
|
|
21
23
|
|
|
22
24
|
return _openBlock(), _createElementBlock("div", {
|
|
23
25
|
class: _normalizeClass(["var-input var--box", [_ctx.disabled ? 'var-input--disabled' : null]]),
|
|
24
|
-
onClick: _cache[
|
|
26
|
+
onClick: _cache[8] || (_cache[8] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
25
27
|
}, [_createElementVNode("div", {
|
|
26
28
|
class: _normalizeClass(["var-input__controller", [_ctx.isFocus ? 'var-input--focus' : null, _ctx.errorMessage ? 'var-input--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null]]),
|
|
27
29
|
style: _normalizeStyle({
|
|
@@ -33,8 +35,9 @@ export function render(_ctx, _cache) {
|
|
|
33
35
|
/* CLASS */
|
|
34
36
|
), _createElementVNode("div", {
|
|
35
37
|
class: _normalizeClass(["var-input__wrap", [!_ctx.hint ? 'var-input--non-hint' : null]])
|
|
36
|
-
}, [_ctx.type === 'password' ? (_openBlock(), _createElementBlock("input", _hoisted_1)) : _createCommentVNode("v-if", true), (_openBlock(),
|
|
37
|
-
|
|
38
|
+
}, [_ctx.type === 'password' ? (_openBlock(), _createElementBlock("input", _hoisted_1)) : _createCommentVNode("v-if", true), _ctx.textarea ? (_openBlock(), _createElementBlock("textarea", {
|
|
39
|
+
key: 1,
|
|
40
|
+
class: _normalizeClass(["var-input__input var-input--textarea", [_ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null, _ctx.errorMessage ? 'var-input--caret-error' : null]]),
|
|
38
41
|
ref: "el",
|
|
39
42
|
autocomplete: "new-password",
|
|
40
43
|
id: _ctx.id,
|
|
@@ -48,18 +51,38 @@ export function render(_ctx, _cache) {
|
|
|
48
51
|
caretColor: !_ctx.errorMessage ? _ctx.focusColor : null,
|
|
49
52
|
resize: _ctx.resize ? 'vertical' : 'none'
|
|
50
53
|
}),
|
|
51
|
-
onFocus: _ctx.handleFocus,
|
|
52
|
-
onBlur: _ctx.handleBlur,
|
|
53
|
-
onInput: _ctx.handleInput,
|
|
54
|
-
onChange: _ctx.handleChange
|
|
55
|
-
},
|
|
56
|
-
/* PROPS */
|
|
57
|
-
,
|
|
54
|
+
onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
|
|
55
|
+
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
56
|
+
onInput: _cache[2] || (_cache[2] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
|
|
57
|
+
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.handleChange && _ctx.handleChange(...args))
|
|
58
|
+
}, "\n ", 46
|
|
59
|
+
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
60
|
+
, _hoisted_2)) : (_openBlock(), _createElementBlock("input", {
|
|
61
|
+
key: 2,
|
|
62
|
+
class: _normalizeClass(["var-input__input", [_ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null, _ctx.errorMessage ? 'var-input--caret-error' : null]]),
|
|
63
|
+
ref: "el",
|
|
64
|
+
autocomplete: "new-password",
|
|
65
|
+
id: _ctx.id,
|
|
66
|
+
disabled: _ctx.formDisabled || _ctx.disabled || _ctx.formReadonly || _ctx.readonly,
|
|
67
|
+
type: _ctx.type,
|
|
68
|
+
value: _ctx.modelValue,
|
|
69
|
+
maxlength: _ctx.maxlength,
|
|
70
|
+
style: _normalizeStyle({
|
|
71
|
+
color: _ctx.textColor,
|
|
72
|
+
caretColor: !_ctx.errorMessage ? _ctx.focusColor : null
|
|
73
|
+
}),
|
|
74
|
+
onFocus: _cache[4] || (_cache[4] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
|
|
75
|
+
onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
76
|
+
onInput: _cache[6] || (_cache[6] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
|
|
77
|
+
onChange: _cache[7] || (_cache[7] = (...args) => _ctx.handleChange && _ctx.handleChange(...args))
|
|
78
|
+
}, null, 46
|
|
79
|
+
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
80
|
+
, _hoisted_3)), _createElementVNode("label", {
|
|
58
81
|
class: _normalizeClass([_ctx.textarea ? 'var-input__textarea-placeholder' : 'var-input__placeholder', _ctx.computePlaceholderState(), !_ctx.hint ? 'var-input--placeholder-non-hint' : null]),
|
|
59
82
|
for: _ctx.id
|
|
60
83
|
}, _toDisplayString(_ctx.placeholder), 11
|
|
61
84
|
/* TEXT, CLASS, PROPS */
|
|
62
|
-
,
|
|
85
|
+
, _hoisted_4)], 2
|
|
63
86
|
/* CLASS */
|
|
64
87
|
), _createElementVNode("div", {
|
|
65
88
|
class: _normalizeClass(["var-input__icon", [!_ctx.hint ? 'var-input--non-hint' : null]])
|
package/es/list/List.js
CHANGED
package/es/popup/Popup.js
CHANGED
|
@@ -1,70 +1,28 @@
|
|
|
1
|
+
import { isVNode as _isVNode, withDirectives as _withDirectives, vShow as _vShow, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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
4
|
|
|
3
|
-
import { defineComponent, watch } from 'vue';
|
|
5
|
+
import { defineComponent, watch, Transition, Teleport } from 'vue';
|
|
4
6
|
import { props } from './props';
|
|
5
7
|
import { useLock } from '../context/lock';
|
|
6
8
|
import { useZIndex } from '../context/zIndex';
|
|
7
9
|
import { addRouteListener, useTeleport } from '../utils/components';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, [_createVNode(_Transition, {
|
|
14
|
-
name: "var-fade",
|
|
15
|
-
onAfterEnter: _ctx.onOpened,
|
|
16
|
-
onAfterLeave: _ctx.onClosed
|
|
17
|
-
}, {
|
|
18
|
-
default: _withCtx(() => [_withDirectives(_createElementVNode("div", {
|
|
19
|
-
class: "var--box var-popup",
|
|
20
|
-
style: _normalizeStyle({
|
|
21
|
-
zIndex: _ctx.zIndex - 2
|
|
22
|
-
})
|
|
23
|
-
}, [_ctx.overlay ? (_openBlock(), _createElementBlock("div", {
|
|
24
|
-
key: 0,
|
|
25
|
-
class: _normalizeClass(["var-popup__overlay", [_ctx.overlayClass]]),
|
|
26
|
-
style: _normalizeStyle(_extends({
|
|
27
|
-
zIndex: _ctx.zIndex - 1
|
|
28
|
-
}, _ctx.overlayStyle)),
|
|
29
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.hidePopup && _ctx.hidePopup(...args))
|
|
30
|
-
}, null, 6
|
|
31
|
-
/* CLASS, STYLE */
|
|
32
|
-
)) : _createCommentVNode("v-if", true), _createVNode(_Transition, {
|
|
33
|
-
name: _ctx.transition ? _ctx.transition : "var-pop-" + _ctx.position
|
|
34
|
-
}, {
|
|
35
|
-
default: _withCtx(() => [_ctx.show ? (_openBlock(), _createElementBlock("div", _mergeProps({
|
|
36
|
-
key: 0,
|
|
37
|
-
class: ["var-popup__content var-elevation--3", ["var-popup--" + _ctx.position]],
|
|
38
|
-
style: {
|
|
39
|
-
zIndex: _ctx.zIndex
|
|
40
|
-
}
|
|
41
|
-
}, _ctx.$attrs), [_renderSlot(_ctx.$slots, "default")], 16
|
|
42
|
-
/* FULL_PROPS */
|
|
43
|
-
)) : _createCommentVNode("v-if", true)]),
|
|
44
|
-
_: 3
|
|
45
|
-
/* FORWARDED */
|
|
46
|
-
|
|
47
|
-
}, 8
|
|
48
|
-
/* PROPS */
|
|
49
|
-
, ["name"])], 4
|
|
50
|
-
/* STYLE */
|
|
51
|
-
), [[_vShow, _ctx.show]])]),
|
|
52
|
-
_: 3
|
|
53
|
-
/* FORWARDED */
|
|
54
|
-
|
|
55
|
-
}, 8
|
|
56
|
-
/* PROPS */
|
|
57
|
-
, ["onAfterEnter", "onAfterLeave"])], 8
|
|
58
|
-
/* PROPS */
|
|
59
|
-
, ["to", "disabled"]);
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
function _isSlot(s) {
|
|
14
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
60
15
|
}
|
|
16
|
+
|
|
61
17
|
export default defineComponent({
|
|
62
|
-
render,
|
|
63
18
|
name: 'VarPopup',
|
|
64
19
|
inheritAttrs: false,
|
|
65
20
|
props,
|
|
66
21
|
|
|
67
|
-
setup(props
|
|
22
|
+
setup(props, {
|
|
23
|
+
slots,
|
|
24
|
+
attrs
|
|
25
|
+
}) {
|
|
68
26
|
var {
|
|
69
27
|
zIndex
|
|
70
28
|
} = useZIndex(() => props.show, 3);
|
|
@@ -98,10 +56,74 @@ export default defineComponent({
|
|
|
98
56
|
}); // internal for Dialog
|
|
99
57
|
|
|
100
58
|
addRouteListener(() => props.onRouteChange == null ? void 0 : props.onRouteChange());
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
59
|
+
|
|
60
|
+
var renderOverlay = () => {
|
|
61
|
+
var {
|
|
62
|
+
overlayClass,
|
|
63
|
+
overlayStyle
|
|
64
|
+
} = props;
|
|
65
|
+
return _createVNode("div", {
|
|
66
|
+
"class": ['var-popup__overlay', overlayClass],
|
|
67
|
+
"style": _extends({
|
|
68
|
+
zIndex: zIndex.value - 1
|
|
69
|
+
}, overlayStyle),
|
|
70
|
+
"onClick": hidePopup
|
|
71
|
+
}, null);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var renderContent = () => {
|
|
75
|
+
return _createVNode("div", _mergeProps({
|
|
76
|
+
"class": ['var-popup__content', 'var-elevation--3', "var-popup--" + props.position],
|
|
77
|
+
"style": {
|
|
78
|
+
zIndex: zIndex.value
|
|
79
|
+
}
|
|
80
|
+
}, attrs), [slots.default == null ? void 0 : slots.default()]);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
var renderPopup = () => {
|
|
84
|
+
var {
|
|
85
|
+
onOpened,
|
|
86
|
+
onClosed,
|
|
87
|
+
show,
|
|
88
|
+
overlay,
|
|
89
|
+
transition,
|
|
90
|
+
position
|
|
91
|
+
} = props;
|
|
92
|
+
return _createVNode(Transition, {
|
|
93
|
+
"name": "var-fade",
|
|
94
|
+
"onAfterEnter": onOpened,
|
|
95
|
+
"onAfterLeave": onClosed
|
|
96
|
+
}, {
|
|
97
|
+
default: () => [_withDirectives(_createVNode("div", {
|
|
98
|
+
"class": "var--box var-popup",
|
|
99
|
+
"style": {
|
|
100
|
+
zIndex: zIndex.value - 2
|
|
101
|
+
}
|
|
102
|
+
}, [overlay && renderOverlay(), _createVNode(Transition, {
|
|
103
|
+
"name": transition || "var-pop-" + position
|
|
104
|
+
}, {
|
|
105
|
+
default: () => [show && renderContent()]
|
|
106
|
+
})]), [[_vShow, show]])]
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
return () => {
|
|
111
|
+
var {
|
|
112
|
+
teleport
|
|
113
|
+
} = props;
|
|
114
|
+
|
|
115
|
+
if (teleport) {
|
|
116
|
+
var _slot;
|
|
117
|
+
|
|
118
|
+
return _createVNode(Teleport, {
|
|
119
|
+
"to": teleport,
|
|
120
|
+
"disabled": disabled.value
|
|
121
|
+
}, _isSlot(_slot = renderPopup()) ? _slot : {
|
|
122
|
+
default: () => [_slot]
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return renderPopup();
|
|
105
127
|
};
|
|
106
128
|
}
|
|
107
129
|
|
package/es/popup/index.js
CHANGED
package/es/popup/style/index.js
CHANGED
package/es/popup/style/less.js
CHANGED
|
@@ -5,7 +5,7 @@ import { props } from './props';
|
|
|
5
5
|
import { toNumber } from '../utils/shared';
|
|
6
6
|
var MAX_DISTANCE = 100;
|
|
7
7
|
var CONTROL_POSITION = -50;
|
|
8
|
-
var scroller
|
|
8
|
+
var scroller;
|
|
9
9
|
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
10
10
|
export function render(_ctx, _cache) {
|
|
11
11
|
var _component_var_icon = _resolveComponent("var-icon");
|
package/es/sticky/Sticky.js
CHANGED
|
@@ -48,7 +48,7 @@ export default defineComponent({
|
|
|
48
48
|
var enableCSSMode = computed(() => !props.disabled && props.cssMode);
|
|
49
49
|
var enableFixedMode = computed(() => !props.disabled && isFixed.value);
|
|
50
50
|
var offsetTop = computed(() => toPxNum(props.offsetTop));
|
|
51
|
-
var scroller
|
|
51
|
+
var scroller;
|
|
52
52
|
|
|
53
53
|
var handleScroll = () => {
|
|
54
54
|
var {
|
package/es/utils/components.js
CHANGED
package/es/utils/elements.js
CHANGED
|
@@ -153,10 +153,10 @@ export var toSizeUnit = value => {
|
|
|
153
153
|
return toPxNum(value) + "px";
|
|
154
154
|
};
|
|
155
155
|
export function requestAnimationFrame(fn) {
|
|
156
|
-
return
|
|
156
|
+
return globalThis.requestAnimationFrame ? globalThis.requestAnimationFrame(fn) : globalThis.setTimeout(fn, 16);
|
|
157
157
|
}
|
|
158
158
|
export function cancelAnimationFrame(handle) {
|
|
159
|
-
|
|
159
|
+
globalThis.cancelAnimationFrame ? globalThis.cancelAnimationFrame(handle) : globalThis.clearTimeout(handle);
|
|
160
160
|
}
|
|
161
161
|
export function nextTickFrame(fn) {
|
|
162
162
|
requestAnimationFrame(() => {
|
package/es/utils/shared.js
CHANGED
|
@@ -138,7 +138,7 @@ export function parseFormat(format, time) {
|
|
|
138
138
|
return format;
|
|
139
139
|
}
|
|
140
140
|
export var dt = (value, defaultText) => value == null ? defaultText : value;
|
|
141
|
-
export var inBrowser = typeof window !== 'undefined';
|
|
141
|
+
export var inBrowser = () => typeof window !== 'undefined';
|
|
142
142
|
export var uniq = arr => [...new Set(arr)];
|
|
143
143
|
export function kebabCase(str) {
|
|
144
144
|
var reg = /([^-])([A-Z])/g;
|
package/highlight/web-types.json
CHANGED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.render = render;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _ripple = _interopRequireDefault(require("../ripple"));
|
|
8
|
+
|
|
9
|
+
var _popup = _interopRequireDefault(require("../popup"));
|
|
10
|
+
|
|
11
|
+
var _icon = _interopRequireDefault(require("../icon"));
|
|
12
|
+
|
|
13
|
+
var _vue = require("vue");
|
|
14
|
+
|
|
15
|
+
var _props = require("./props");
|
|
16
|
+
|
|
17
|
+
var _shared = require("../utils/shared");
|
|
18
|
+
|
|
19
|
+
var _locale = require("../locale");
|
|
20
|
+
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
|
|
23
|
+
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
24
|
+
|
|
25
|
+
var _hoisted_1 = {
|
|
26
|
+
class: "var-action-sheet__title"
|
|
27
|
+
};
|
|
28
|
+
var _hoisted_2 = ["onClick"];
|
|
29
|
+
var _hoisted_3 = {
|
|
30
|
+
class: "var-action-sheet__action-name"
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
function render(_ctx, _cache) {
|
|
34
|
+
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
35
|
+
|
|
36
|
+
var _component_var_popup = (0, _vue.resolveComponent)("var-popup");
|
|
37
|
+
|
|
38
|
+
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
39
|
+
|
|
40
|
+
return (0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_popup, (0, _vue.mergeProps)({
|
|
41
|
+
class: "var-action-sheet__popup-radius",
|
|
42
|
+
position: "bottom",
|
|
43
|
+
overlay: _ctx.overlay,
|
|
44
|
+
"overlay-class": _ctx.overlayClass,
|
|
45
|
+
"overlay-style": _ctx.overlayStyle,
|
|
46
|
+
"lock-scroll": _ctx.lockScroll,
|
|
47
|
+
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
48
|
+
teleport: _ctx.teleport,
|
|
49
|
+
show: _ctx.popupShow
|
|
50
|
+
}, {
|
|
51
|
+
'onUpdate:show': value => {
|
|
52
|
+
var _ctx$$props$onUpdate, _ctx$$props;
|
|
53
|
+
|
|
54
|
+
return (_ctx$$props$onUpdate = (_ctx$$props = _ctx.$props)['onUpdate:show']) == null ? void 0 : _ctx$$props$onUpdate.call(_ctx$$props, value);
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
onOpen: _ctx.onOpen,
|
|
58
|
+
onClose: _ctx.onClose,
|
|
59
|
+
onClosed: _ctx.onClosed,
|
|
60
|
+
onOpened: _ctx.onOpened,
|
|
61
|
+
onRouteChange: _ctx.onRouteChange
|
|
62
|
+
}), {
|
|
63
|
+
default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
|
|
64
|
+
class: "var-action-sheet var--box"
|
|
65
|
+
}, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createElementVNode)("div", _hoisted_1, (0, _vue.toDisplayString)(_ctx.dt(_ctx.title, _ctx.pack.actionSheetTitle)), 1
|
|
66
|
+
/* TEXT */
|
|
67
|
+
)]), (0, _vue.renderSlot)(_ctx.$slots, "actions", {}, () => [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.actions, action => {
|
|
68
|
+
return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
69
|
+
class: (0, _vue.normalizeClass)(["var-action-sheet__action-item", [action.className, action.disabled ? 'var-action-sheet--disabled' : null]]),
|
|
70
|
+
key: action.name,
|
|
71
|
+
style: (0, _vue.normalizeStyle)({
|
|
72
|
+
color: action.color
|
|
73
|
+
}),
|
|
74
|
+
onClick: $event => _ctx.handleSelect(action)
|
|
75
|
+
}, [action.icon ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: "var-action-sheet__action-icon",
|
|
78
|
+
"var-action-sheet-cover": "",
|
|
79
|
+
name: action.icon,
|
|
80
|
+
size: action.iconSize
|
|
81
|
+
}, null, 8
|
|
82
|
+
/* PROPS */
|
|
83
|
+
, ["name", "size"])) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", _hoisted_3, (0, _vue.toDisplayString)(action.name), 1
|
|
84
|
+
/* TEXT */
|
|
85
|
+
)], 14
|
|
86
|
+
/* CLASS, STYLE, PROPS */
|
|
87
|
+
, _hoisted_2)), [[_directive_ripple, {
|
|
88
|
+
disabled: action.disabled
|
|
89
|
+
}]]);
|
|
90
|
+
}), 128
|
|
91
|
+
/* KEYED_FRAGMENT */
|
|
92
|
+
))])], 16
|
|
93
|
+
/* FULL_PROPS */
|
|
94
|
+
)]),
|
|
95
|
+
_: 3
|
|
96
|
+
/* FORWARDED */
|
|
97
|
+
|
|
98
|
+
}, 16
|
|
99
|
+
/* FULL_PROPS */
|
|
100
|
+
, ["overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "show", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange"]);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var _default = (0, _vue.defineComponent)({
|
|
104
|
+
render,
|
|
105
|
+
name: 'VarActionSheet',
|
|
106
|
+
directives: {
|
|
107
|
+
Ripple: _ripple.default
|
|
108
|
+
},
|
|
109
|
+
components: {
|
|
110
|
+
VarPopup: _popup.default,
|
|
111
|
+
VarIcon: _icon.default
|
|
112
|
+
},
|
|
113
|
+
inheritAttrs: false,
|
|
114
|
+
props: _props.props,
|
|
115
|
+
|
|
116
|
+
setup(props) {
|
|
117
|
+
var popupShow = (0, _vue.ref)(false);
|
|
118
|
+
|
|
119
|
+
var handleSelect = action => {
|
|
120
|
+
var _props$onUpdateShow;
|
|
121
|
+
|
|
122
|
+
if (action.disabled) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
var {
|
|
127
|
+
closeOnClickAction,
|
|
128
|
+
onSelect
|
|
129
|
+
} = props;
|
|
130
|
+
onSelect == null ? void 0 : onSelect(action);
|
|
131
|
+
closeOnClickAction && ((_props$onUpdateShow = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow.call(props, false));
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
(0, _vue.watch)(() => props.show, newValue => {
|
|
135
|
+
popupShow.value = newValue;
|
|
136
|
+
}, {
|
|
137
|
+
immediate: true
|
|
138
|
+
});
|
|
139
|
+
return {
|
|
140
|
+
popupShow,
|
|
141
|
+
pack: _locale.pack,
|
|
142
|
+
dt: _shared.dt,
|
|
143
|
+
handleSelect
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
exports.default = _default;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root { --action-sheet-border-radius: 2px; --action-sheet-title-color: #888; --action-sheet-title-padding: 10px 16px; --action-sheet-title-font-size: 14px; --action-sheet-action-item-height: 48px; --action-sheet-action-item-padding: 0px 18px; --action-sheet-action-item-color: #333; --action-sheet-action-item-disabled-color: var(--color-text-disabled); --action-sheet-icon-margin: 0 20px 0 0; --action-sheet-icon-size: 24px; --action-sheet-background: #fff;}.var-action-sheet { padding: 10px 0; max-height: 80%; background: var(--action-sheet-background); transition: background-color 0.25s;}.var-action-sheet__popup-radius { border-radius: var(--action-sheet-border-radius);}.var-action-sheet__title { padding: var(--action-sheet-title-padding); color: var(--action-sheet-title-color); font-size: var(--action-sheet-title-font-size);}.var-action-sheet__action-item { display: flex; align-items: center; height: var(--action-sheet-action-item-height); padding: var(--action-sheet-action-item-padding); color: var(--action-sheet-action-item-color); cursor: pointer;}.var-action-sheet__action-name { overflow: auto; max-height: var(--action-sheet-action-item-height);}.var-action-sheet__action-icon[var-action-sheet-cover] { margin: var(--action-sheet-icon-margin); width: var(--action-sheet-icon-size); height: var(--action-sheet-icon-size); font-size: var(--action-sheet-icon-size);}.var-action-sheet--disabled { color: var(--action-sheet-action-item-disabled-color) !important; cursor: not-allowed;}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@action-sheet-border-radius: 2px;
|
|
2
|
+
@action-sheet-title-color: #888;
|
|
3
|
+
@action-sheet-title-padding: 10px 16px;
|
|
4
|
+
@action-sheet-title-font-size: 14px;
|
|
5
|
+
@action-sheet-action-item-height: 48px;
|
|
6
|
+
@action-sheet-action-item-padding: 0px 18px;
|
|
7
|
+
@action-sheet-action-item-color: #333;
|
|
8
|
+
@action-sheet-action-item-disabled-color: var(--color-text-disabled);
|
|
9
|
+
@action-sheet-icon-margin: 0 20px 0 0;
|
|
10
|
+
@action-sheet-icon-size: 24px;
|
|
11
|
+
@action-sheet-background: #fff;
|
|
12
|
+
|
|
13
|
+
:root {
|
|
14
|
+
--action-sheet-border-radius: @action-sheet-border-radius;
|
|
15
|
+
--action-sheet-title-color: @action-sheet-title-color;
|
|
16
|
+
--action-sheet-title-padding: @action-sheet-title-padding;
|
|
17
|
+
--action-sheet-title-font-size: @action-sheet-title-font-size;
|
|
18
|
+
--action-sheet-action-item-height: @action-sheet-action-item-height;
|
|
19
|
+
--action-sheet-action-item-padding: @action-sheet-action-item-padding;
|
|
20
|
+
--action-sheet-action-item-color: @action-sheet-action-item-color;
|
|
21
|
+
--action-sheet-action-item-disabled-color: @action-sheet-action-item-disabled-color;
|
|
22
|
+
--action-sheet-icon-margin: @action-sheet-icon-margin;
|
|
23
|
+
--action-sheet-icon-size: @action-sheet-icon-size;
|
|
24
|
+
--action-sheet-background: @action-sheet-background;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.var-action-sheet {
|
|
28
|
+
padding: 10px 0;
|
|
29
|
+
max-height: 80%;
|
|
30
|
+
background: var(--action-sheet-background);
|
|
31
|
+
transition: background-color 0.25s;
|
|
32
|
+
|
|
33
|
+
&__popup-radius {
|
|
34
|
+
border-radius: var(--action-sheet-border-radius);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__title {
|
|
38
|
+
padding: var(--action-sheet-title-padding);
|
|
39
|
+
color: var(--action-sheet-title-color);
|
|
40
|
+
font-size: var(--action-sheet-title-font-size);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__action-item {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
height: var(--action-sheet-action-item-height);
|
|
47
|
+
padding: var(--action-sheet-action-item-padding);
|
|
48
|
+
color: var(--action-sheet-action-item-color);
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&__action-name {
|
|
53
|
+
overflow: auto;
|
|
54
|
+
max-height: var(--action-sheet-action-item-height);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__action-icon[var-action-sheet-cover] {
|
|
58
|
+
margin: var(--action-sheet-icon-margin);
|
|
59
|
+
width: var(--action-sheet-icon-size);
|
|
60
|
+
height: var(--action-sheet-icon-size);
|
|
61
|
+
font-size: var(--action-sheet-icon-size);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&--disabled {
|
|
65
|
+
color: var(--action-sheet-action-item-disabled-color) !important;
|
|
66
|
+
cursor: not-allowed;
|
|
67
|
+
}
|
|
68
|
+
}
|