@varlet/ui 2.20.1 → 2.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/action-sheet/ActionSheet.mjs +146 -0
- package/es/action-sheet/ActionSheetSfc.css +0 -0
- package/es/action-sheet/actionSheet.css +1 -0
- package/es/action-sheet/index.mjs +86 -0
- package/es/action-sheet/props.mjs +50 -0
- package/es/action-sheet/style/index.mjs +6 -0
- package/es/app-bar/AppBar.mjs +158 -0
- package/es/app-bar/AppBarSfc.css +0 -0
- package/es/app-bar/appBar.css +1 -0
- package/es/app-bar/index.mjs +12 -0
- package/es/app-bar/props.mjs +20 -0
- package/es/app-bar/style/index.mjs +4 -0
- package/es/avatar/Avatar.mjs +142 -0
- package/es/avatar/AvatarSfc.css +0 -0
- package/es/avatar/avatar.css +1 -0
- package/es/avatar/index.mjs +12 -0
- package/es/avatar/props.mjs +30 -0
- package/es/avatar/style/index.mjs +3 -0
- package/es/avatar-group/AvatarGroup.mjs +45 -0
- package/es/avatar-group/AvatarGroupSfc.css +0 -0
- package/es/avatar-group/avatarGroup.css +1 -0
- package/es/avatar-group/index.mjs +12 -0
- package/es/avatar-group/props.mjs +7 -0
- package/es/avatar-group/style/index.mjs +3 -0
- package/es/back-top/BackTop.mjs +108 -0
- package/es/back-top/BackTopSfc.css +0 -0
- package/es/back-top/backTop.css +1 -0
- package/es/back-top/index.mjs +12 -0
- package/es/back-top/props.mjs +22 -0
- package/es/back-top/style/index.mjs +5 -0
- package/es/badge/Badge.mjs +111 -0
- package/es/badge/BadgeSfc.css +0 -0
- package/es/badge/badge.css +1 -0
- package/es/badge/index.mjs +12 -0
- package/es/badge/props.mjs +33 -0
- package/es/badge/style/index.mjs +4 -0
- package/es/bottom-navigation/BottomNavigation.mjs +188 -0
- package/es/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/es/bottom-navigation/bottomNavigation.css +1 -0
- package/es/bottom-navigation/index.mjs +12 -0
- package/es/bottom-navigation/props.mjs +24 -0
- package/es/bottom-navigation/provide.mjs +18 -0
- package/es/bottom-navigation/style/index.mjs +7 -0
- package/es/bottom-navigation-item/BottomNavigationItem.mjs +125 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/es/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/es/bottom-navigation-item/index.mjs +12 -0
- package/es/bottom-navigation-item/props.mjs +16 -0
- package/es/bottom-navigation-item/provide.mjs +21 -0
- package/es/bottom-navigation-item/style/index.mjs +6 -0
- package/es/breadcrumb/Breadcrumb.mjs +73 -0
- package/es/breadcrumb/BreadcrumbSfc.css +0 -0
- package/es/breadcrumb/breadcrumb.css +1 -0
- package/es/breadcrumb/index.mjs +12 -0
- package/es/breadcrumb/props.mjs +8 -0
- package/es/breadcrumb/provide.mjs +19 -0
- package/es/breadcrumb/style/index.mjs +3 -0
- package/es/breadcrumbs/Breadcrumbs.mjs +38 -0
- package/es/breadcrumbs/BreadcrumbsSfc.css +0 -0
- package/es/breadcrumbs/breadcrumbs.css +1 -0
- package/es/breadcrumbs/index.mjs +12 -0
- package/es/breadcrumbs/props.mjs +9 -0
- package/es/breadcrumbs/provide.mjs +16 -0
- package/es/breadcrumbs/style/index.mjs +3 -0
- package/es/button/Button.mjs +147 -0
- package/es/button/ButtonSfc.css +0 -0
- package/es/button/button.css +1 -0
- package/es/button/index.mjs +12 -0
- package/es/button/props.mjs +57 -0
- package/es/button/provide.mjs +13 -0
- package/es/button/style/index.mjs +7 -0
- package/es/button-group/ButtonGroup.mjs +53 -0
- package/es/button-group/ButtonGroupSfc.css +0 -0
- package/es/button-group/buttonGroup.css +1 -0
- package/es/button-group/index.mjs +12 -0
- package/es/button-group/props.mjs +24 -0
- package/es/button-group/provide.mjs +14 -0
- package/es/button-group/style/index.mjs +4 -0
- package/es/card/Card.mjs +351 -0
- package/es/card/CardSfc.css +0 -0
- package/es/card/card.css +1 -0
- package/es/card/index.mjs +12 -0
- package/es/card/props.mjs +34 -0
- package/es/card/style/index.mjs +7 -0
- package/es/cell/Cell.mjs +122 -0
- package/es/cell/CellSfc.css +0 -0
- package/es/cell/cell.css +1 -0
- package/es/cell/index.mjs +12 -0
- package/es/cell/props.mjs +19 -0
- package/es/cell/style/index.mjs +4 -0
- package/es/checkbox/Checkbox.mjs +221 -0
- package/es/checkbox/CheckboxSfc.css +0 -0
- package/es/checkbox/checkbox.css +1 -0
- package/es/checkbox/index.mjs +12 -0
- package/es/checkbox/props.mjs +37 -0
- package/es/checkbox/provide.mjs +15 -0
- package/es/checkbox/style/index.mjs +7 -0
- package/es/checkbox-group/CheckboxGroup.mjs +133 -0
- package/es/checkbox-group/CheckboxGroupSfc.css +0 -0
- package/es/checkbox-group/checkboxGroup.css +1 -0
- package/es/checkbox-group/index.mjs +12 -0
- package/es/checkbox-group/props.mjs +22 -0
- package/es/checkbox-group/provide.mjs +16 -0
- package/es/checkbox-group/style/index.mjs +4 -0
- package/es/chip/Chip.mjs +103 -0
- package/es/chip/ChipSfc.css +0 -0
- package/es/chip/chip.css +1 -0
- package/es/chip/index.mjs +12 -0
- package/es/chip/props.mjs +29 -0
- package/es/chip/style/index.mjs +4 -0
- package/es/col/Col.mjs +96 -0
- package/es/col/ColSfc.css +0 -0
- package/es/col/col.css +1 -0
- package/es/col/index.mjs +12 -0
- package/es/col/props.mjs +26 -0
- package/es/col/provide.mjs +13 -0
- package/es/col/style/index.mjs +3 -0
- package/es/collapse/Collapse.mjs +116 -0
- package/es/collapse/CollapseSfc.css +1 -0
- package/es/collapse/index.mjs +12 -0
- package/es/collapse/props.mjs +22 -0
- package/es/collapse/provide.mjs +16 -0
- package/es/collapse/style/index.mjs +3 -0
- package/es/collapse-item/CollapseItem.mjs +231 -0
- package/es/collapse-item/CollapseItemSfc.css +0 -0
- package/es/collapse-item/collapseItem.css +1 -0
- package/es/collapse-item/index.mjs +12 -0
- package/es/collapse-item/props.mjs +12 -0
- package/es/collapse-item/provide.mjs +19 -0
- package/es/collapse-item/style/index.mjs +4 -0
- package/es/context/index.mjs +12 -0
- package/es/context/lock.mjs +74 -0
- package/es/context/style/index.mjs +0 -0
- package/es/context/zIndex.mjs +19 -0
- package/es/countdown/Countdown.mjs +168 -0
- package/es/countdown/CountdownSfc.css +0 -0
- package/es/countdown/countdown.css +1 -0
- package/es/countdown/index.mjs +12 -0
- package/es/countdown/props.mjs +20 -0
- package/es/countdown/style/index.mjs +3 -0
- package/es/counter/Counter.mjs +333 -0
- package/es/counter/CounterSfc.css +0 -0
- package/es/counter/counter.css +1 -0
- package/es/counter/index.mjs +12 -0
- package/es/counter/props.mjs +57 -0
- package/es/counter/provide.ts +3 -0
- package/es/counter/style/index.mjs +9 -0
- package/es/date-picker/DatePicker.mjs +685 -0
- package/es/date-picker/DatePickerSfc.css +0 -0
- package/es/date-picker/date-picker.css +1 -0
- package/es/date-picker/index.mjs +12 -0
- package/es/date-picker/props.mjs +49 -0
- package/es/date-picker/src/day-picker-panel.mjs +366 -0
- package/es/date-picker/src/month-picker-panel.mjs +282 -0
- package/es/date-picker/src/panel-header.mjs +135 -0
- package/es/date-picker/src/year-picker-panel.mjs +303 -0
- package/es/date-picker/style/index.mjs +8 -0
- package/es/dialog/Dialog.mjs +235 -0
- package/es/dialog/DialogSfc.css +0 -0
- package/es/dialog/dialog.css +1 -0
- package/es/dialog/index.mjs +97 -0
- package/es/dialog/props.mjs +65 -0
- package/es/dialog/style/index.mjs +5 -0
- package/es/divider/Divider.mjs +85 -0
- package/es/divider/DividerSfc.css +0 -0
- package/es/divider/divider.css +1 -0
- package/es/divider/index.mjs +12 -0
- package/es/divider/props.mjs +14 -0
- package/es/divider/style/index.mjs +3 -0
- package/es/drag/Drag.mjs +261 -0
- package/es/drag/DragSfc.css +0 -0
- package/es/drag/drag.css +1 -0
- package/es/drag/index.mjs +12 -0
- package/es/drag/props.mjs +30 -0
- package/es/drag/style/index.mjs +3 -0
- package/es/ellipsis/Ellipsis.mjs +110 -0
- package/es/ellipsis/EllipsisSfc.css +0 -0
- package/es/ellipsis/ellipsis.css +1 -0
- package/es/ellipsis/index.mjs +12 -0
- package/es/ellipsis/props.mjs +14 -0
- package/es/ellipsis/style/index.mjs +4 -0
- package/es/fab/Fab.mjs +149 -0
- package/es/fab/fab.css +1 -0
- package/es/fab/index.mjs +12 -0
- package/es/fab/props.mjs +73 -0
- package/es/fab/style/index.mjs +8 -0
- package/es/field-decorator/FieldDecorator.mjs +252 -0
- package/es/field-decorator/FieldDecoratorSfc.css +0 -0
- package/es/field-decorator/fieldDecorator.css +1 -0
- package/es/field-decorator/index.mjs +12 -0
- package/es/field-decorator/props.mjs +43 -0
- package/es/field-decorator/style/index.mjs +4 -0
- package/es/floating-panel/FloatingPanel.mjs +184 -0
- package/es/floating-panel/FloatingPanelSfc.css +0 -0
- package/es/floating-panel/floatingPanel.css +1 -0
- package/es/floating-panel/index.mjs +11 -0
- package/es/floating-panel/props.mjs +27 -0
- package/es/floating-panel/style/index.mjs +4 -0
- package/es/form/Form.mjs +116 -0
- package/es/form/FormSfc.css +0 -0
- package/es/form/index.mjs +15 -0
- package/es/form/props.mjs +15 -0
- package/es/form/provide.mjs +47 -0
- package/es/form/style/index.mjs +2 -0
- package/es/form-details/FormDetails.mjs +91 -0
- package/es/form-details/FormDetailsSfc.css +0 -0
- package/es/form-details/formDetails.css +1 -0
- package/es/form-details/index.mjs +12 -0
- package/es/form-details/props.mjs +13 -0
- package/es/form-details/style/index.mjs +3 -0
- package/es/hover/index.mjs +125 -0
- package/es/hover/style/index.mjs +0 -0
- package/es/hover-overlay/HoverOverlay.mjs +29 -0
- package/es/hover-overlay/HoverOverlaySfc.css +0 -0
- package/es/hover-overlay/hoverOverlay.css +1 -0
- package/es/hover-overlay/index.mjs +24 -0
- package/es/hover-overlay/props.mjs +9 -0
- package/es/hover-overlay/style/index.mjs +2 -0
- package/es/icon/Icon.mjs +89 -0
- package/es/icon/IconSfc.css +0 -0
- package/es/icon/icon.css +1 -0
- package/es/icon/index.mjs +12 -0
- package/es/icon/props.mjs +19 -0
- package/es/icon/style/index.mjs +3 -0
- package/es/image/Image.mjs +111 -0
- package/es/image/ImageSfc.css +0 -0
- package/es/image/image.css +1 -0
- package/es/image/index.mjs +12 -0
- package/es/image/props.mjs +30 -0
- package/es/image/style/index.mjs +4 -0
- package/es/image-preview/ImagePreview.mjs +348 -0
- package/es/image-preview/ImagePreviewSfc.css +0 -0
- package/es/image-preview/imagePreview.css +1 -0
- package/es/image-preview/index.mjs +87 -0
- package/es/image-preview/props.mjs +52 -0
- package/es/image-preview/style/index.mjs +7 -0
- package/es/index-anchor/IndexAnchor.mjs +87 -0
- package/es/index-anchor/IndexAnchorSfc.css +1 -0
- package/es/index-anchor/index.mjs +12 -0
- package/es/index-anchor/props.mjs +6 -0
- package/es/index-anchor/provide.mjs +19 -0
- package/es/index-anchor/style/index.mjs +3 -0
- package/es/index-bar/IndexBar.mjs +222 -0
- package/es/index-bar/IndexBarSfc.css +0 -0
- package/es/index-bar/index.mjs +12 -0
- package/es/index-bar/indexBar.css +1 -0
- package/es/index-bar/props.mjs +29 -0
- package/es/index-bar/provide.mjs +16 -0
- package/es/index-bar/style/index.mjs +3 -0
- package/es/index.bundle.mjs +533 -0
- package/es/index.d.ts +1 -0
- package/es/index.mjs +173 -173
- package/es/input/Input.mjs +375 -0
- package/es/input/InputSfc.css +0 -0
- package/es/input/index.mjs +12 -0
- package/es/input/input.css +1 -0
- package/es/input/props.mjs +65 -0
- package/es/input/provide.ts +3 -0
- package/es/input/style/index.mjs +6 -0
- package/es/lazy/index.mjs +213 -0
- package/es/lazy/style/index.mjs +0 -0
- package/es/link/Link.mjs +81 -0
- package/es/link/LinkSfc.css +0 -0
- package/es/link/index.mjs +12 -0
- package/es/link/link.css +1 -0
- package/es/link/props.mjs +23 -0
- package/es/link/style/index.mjs +3 -0
- package/es/list/List.mjs +185 -0
- package/es/list/ListSfc.css +0 -0
- package/es/list/index.mjs +12 -0
- package/es/list/list.css +1 -0
- package/es/list/props.mjs +23 -0
- package/es/list/provide.mjs +13 -0
- package/es/list/style/index.mjs +5 -0
- package/es/loading/Loading.mjs +190 -0
- package/es/loading/LoadingSfc.css +0 -0
- package/es/loading/index.mjs +12 -0
- package/es/loading/loading.css +1 -0
- package/es/loading/props.mjs +17 -0
- package/es/loading/style/index.mjs +3 -0
- package/es/loading-bar/LoadingBar.mjs +33 -0
- package/es/loading-bar/index.mjs +102 -0
- package/es/loading-bar/loadingBar.css +1 -0
- package/es/loading-bar/props.mjs +18 -0
- package/es/loading-bar/style/index.mjs +2 -0
- package/es/locale/en-US.d.ts +5 -0
- package/es/locale/en-US.mjs +108 -0
- package/es/locale/index.mjs +79 -0
- package/es/locale/style/index.mjs +0 -0
- package/es/locale/zh-CN.d.ts +5 -0
- package/es/locale/zh-CN.mjs +108 -0
- package/es/locale/zh-HK.d.ts +5 -0
- package/es/locale/zh-HK.mjs +5 -0
- package/es/locale/zh-TW.d.ts +5 -0
- package/es/locale/zh-TW.mjs +105 -0
- package/es/menu/Menu.mjs +124 -0
- package/es/menu/MenuSfc.css +0 -0
- package/es/menu/index.mjs +12 -0
- package/es/menu/menu.css +1 -0
- package/es/menu/props.mjs +50 -0
- package/es/menu/style/index.mjs +4 -0
- package/es/menu/usePopover.mjs +333 -0
- package/es/menu-option/MenuOption.mjs +122 -0
- package/es/menu-option/MenuOptionSfc.css +0 -0
- package/es/menu-option/index.mjs +12 -0
- package/es/menu-option/menuOption.css +1 -0
- package/es/menu-option/props.mjs +8 -0
- package/es/menu-option/provide.mjs +19 -0
- package/es/menu-option/style/index.mjs +5 -0
- package/es/menu-select/MenuSelect.mjs +113 -0
- package/es/menu-select/MenuSelectSfc.css +0 -0
- package/es/menu-select/index.mjs +12 -0
- package/es/menu-select/menuSelect.css +1 -0
- package/es/menu-select/props.mjs +57 -0
- package/es/menu-select/provide.mjs +16 -0
- package/es/menu-select/style/index.mjs +5 -0
- package/es/option/Option.mjs +127 -0
- package/es/option/OptionSfc.css +0 -0
- package/es/option/index.mjs +12 -0
- package/es/option/option.css +1 -0
- package/es/option/props.mjs +8 -0
- package/es/option/provide.mjs +17 -0
- package/es/option/style/index.mjs +6 -0
- package/es/overlay/Overlay.mjs +68 -0
- package/es/overlay/index.mjs +12 -0
- package/es/overlay/overlay.css +1 -0
- package/es/overlay/props.mjs +14 -0
- package/es/overlay/style/index.mjs +2 -0
- package/es/pagination/Pagination.mjs +428 -0
- package/es/pagination/PaginationSfc.css +0 -0
- package/es/pagination/index.mjs +12 -0
- package/es/pagination/pagination.css +1 -0
- package/es/pagination/props.mjs +41 -0
- package/es/pagination/style/index.mjs +10 -0
- package/es/paper/Paper.mjs +61 -0
- package/es/paper/PaperSfc.css +0 -0
- package/es/paper/index.mjs +12 -0
- package/es/paper/paper.css +1 -0
- package/es/paper/props.mjs +17 -0
- package/es/paper/style/index.mjs +4 -0
- package/es/picker/Picker.mjs +486 -0
- package/es/picker/PickerSfc.css +0 -0
- package/es/picker/index.mjs +84 -0
- package/es/picker/picker.css +1 -0
- package/es/picker/props.mjs +79 -0
- package/es/picker/style/index.mjs +5 -0
- package/es/popup/Popup.mjs +127 -0
- package/es/popup/index.mjs +12 -0
- package/es/popup/popup.css +1 -0
- package/es/popup/props.mjs +44 -0
- package/es/popup/provide.mjs +23 -0
- package/es/popup/style/index.mjs +2 -0
- package/es/progress/Progress.mjs +257 -0
- package/es/progress/ProgressSfc.css +0 -0
- package/es/progress/index.mjs +12 -0
- package/es/progress/progress.css +1 -0
- package/es/progress/props.mjs +39 -0
- package/es/progress/style/index.mjs +3 -0
- package/es/pull-refresh/PullRefresh.mjs +217 -0
- package/es/pull-refresh/PullRefreshSfc.css +0 -0
- package/es/pull-refresh/index.mjs +12 -0
- package/es/pull-refresh/props.mjs +23 -0
- package/es/pull-refresh/pullRefresh.css +1 -0
- package/es/pull-refresh/style/index.mjs +5 -0
- package/es/radio/Radio.mjs +202 -0
- package/es/radio/RadioSfc.css +0 -0
- package/es/radio/index.mjs +12 -0
- package/es/radio/props.mjs +35 -0
- package/es/radio/provide.mjs +13 -0
- package/es/radio/radio.css +1 -0
- package/es/radio/style/index.mjs +7 -0
- package/es/radio-group/RadioGroup.mjs +96 -0
- package/es/radio-group/RadioGroupSfc.css +0 -0
- package/es/radio-group/index.mjs +12 -0
- package/es/radio-group/props.mjs +21 -0
- package/es/radio-group/provide.mjs +16 -0
- package/es/radio-group/radioGroup.css +1 -0
- package/es/radio-group/style/index.mjs +4 -0
- package/es/rate/Rate.mjs +204 -0
- package/es/rate/RateSfc.css +0 -0
- package/es/rate/index.mjs +12 -0
- package/es/rate/props.mjs +46 -0
- package/es/rate/provide.ts +3 -0
- package/es/rate/rate.css +1 -0
- package/es/rate/style/index.mjs +7 -0
- package/es/result/Empty.mjs +26 -0
- package/es/result/Error.mjs +26 -0
- package/es/result/Info.mjs +26 -0
- package/es/result/Question.mjs +26 -0
- package/es/result/Result.mjs +129 -0
- package/es/result/ResultSfc.css +0 -0
- package/es/result/Success.mjs +104 -0
- package/es/result/Warning.mjs +26 -0
- package/es/result/index.mjs +12 -0
- package/es/result/props.mjs +16 -0
- package/es/result/result.css +1 -0
- package/es/result/style/index.mjs +3 -0
- package/es/ripple/index.mjs +150 -0
- package/es/ripple/ripple.css +1 -0
- package/es/ripple/style/index.mjs +2 -0
- package/es/row/Row.mjs +62 -0
- package/es/row/RowSfc.css +0 -0
- package/es/row/index.mjs +12 -0
- package/es/row/props.mjs +19 -0
- package/es/row/provide.mjs +14 -0
- package/es/row/row.css +1 -0
- package/es/row/style/index.mjs +3 -0
- package/es/select/Select.mjs +417 -0
- package/es/select/SelectSfc.css +0 -0
- package/es/select/index.mjs +12 -0
- package/es/select/props.mjs +64 -0
- package/es/select/provide.mjs +14 -0
- package/es/select/select.css +1 -0
- package/es/select/style/index.mjs +9 -0
- package/es/select/useSelectController.mjs +67 -0
- package/es/skeleton/Skeleton.mjs +195 -0
- package/es/skeleton/SkeletonSfc.css +0 -0
- package/es/skeleton/index.mjs +12 -0
- package/es/skeleton/props.mjs +28 -0
- package/es/skeleton/skeleton.css +1 -0
- package/es/skeleton/style/index.mjs +3 -0
- package/es/slider/Slider.mjs +488 -0
- package/es/slider/SliderSfc.css +0 -0
- package/es/slider/index.mjs +12 -0
- package/es/slider/props.mjs +51 -0
- package/es/slider/provide.ts +3 -0
- package/es/slider/slider.css +1 -0
- package/es/slider/style/index.mjs +5 -0
- package/es/snackbar/Snackbar.mjs +62 -0
- package/es/snackbar/SnackbarSfc.css +0 -0
- package/es/snackbar/core.mjs +170 -0
- package/es/snackbar/coreSfc.css +0 -0
- package/es/snackbar/index.mjs +229 -0
- package/es/snackbar/props.mjs +59 -0
- package/es/snackbar/snackbar.css +1 -0
- package/es/snackbar/style/index.mjs +8 -0
- package/es/space/Space.mjs +67 -0
- package/es/space/index.mjs +12 -0
- package/es/space/margin.mjs +34 -0
- package/es/space/props.mjs +23 -0
- package/es/space/space.css +1 -0
- package/es/space/style/index.mjs +2 -0
- package/es/step/Step.mjs +123 -0
- package/es/step/StepSfc.css +0 -0
- package/es/step/index.mjs +12 -0
- package/es/step/props.mjs +16 -0
- package/es/step/provide.mjs +17 -0
- package/es/step/step.css +1 -0
- package/es/step/style/index.mjs +4 -0
- package/es/steps/Steps.mjs +49 -0
- package/es/steps/StepsSfc.css +1 -0
- package/es/steps/index.mjs +12 -0
- package/es/steps/props.mjs +17 -0
- package/es/steps/provide.mjs +13 -0
- package/es/steps/style/index.mjs +2 -0
- package/es/sticky/Sticky.mjs +176 -0
- package/es/sticky/StickySfc.css +0 -0
- package/es/sticky/index.mjs +12 -0
- package/es/sticky/props.mjs +17 -0
- package/es/sticky/sticky.css +1 -0
- package/es/sticky/style/index.mjs +3 -0
- package/es/style-provider/StyleProvider.mjs +24 -0
- package/es/style-provider/StyleProviderSfc.css +0 -0
- package/es/style-provider/index.mjs +25 -0
- package/es/style-provider/props.mjs +13 -0
- package/es/style-provider/style/index.mjs +2 -0
- package/es/style.mjs +86 -0
- package/es/styles/common.css +1 -0
- package/es/styles/elevation.css +1 -0
- package/es/styles/style/index.mjs +0 -0
- package/es/swipe/Swipe.mjs +512 -0
- package/es/swipe/SwipeSfc.css +0 -0
- package/es/swipe/index.mjs +12 -0
- package/es/swipe/props.mjs +34 -0
- package/es/swipe/provide.mjs +16 -0
- package/es/swipe/style/index.mjs +8 -0
- package/es/swipe/swipe.css +1 -0
- package/es/swipe-item/SwipeItem.mjs +50 -0
- package/es/swipe-item/SwipeItemSfc.css +0 -0
- package/es/swipe-item/index.mjs +9 -0
- package/es/swipe-item/provide.mjs +17 -0
- package/es/swipe-item/style/index.mjs +3 -0
- package/es/swipe-item/swipeItem.css +1 -0
- package/es/switch/Switch.mjs +225 -0
- package/es/switch/SwitchSfc.css +0 -0
- package/es/switch/index.mjs +12 -0
- package/es/switch/props.mjs +30 -0
- package/es/switch/provide.ts +3 -0
- package/es/switch/style/index.mjs +8 -0
- package/es/switch/switch.css +1 -0
- package/es/tab/Tab.mjs +87 -0
- package/es/tab/TabSfc.css +0 -0
- package/es/tab/index.mjs +12 -0
- package/es/tab/props.mjs +13 -0
- package/es/tab/provide.mjs +17 -0
- package/es/tab/style/index.mjs +4 -0
- package/es/tab/tab.css +1 -0
- package/es/tab-item/TabItem.mjs +52 -0
- package/es/tab-item/TabItemSfc.css +0 -0
- package/es/tab-item/index.mjs +12 -0
- package/es/tab-item/props.mjs +6 -0
- package/es/tab-item/provide.mjs +30 -0
- package/es/tab-item/style/index.mjs +4 -0
- package/es/tab-item/tabItem.css +1 -0
- package/es/table/Table.mjs +67 -0
- package/es/table/TableSfc.css +0 -0
- package/es/table/index.mjs +12 -0
- package/es/table/props.mjs +13 -0
- package/es/table/style/index.mjs +4 -0
- package/es/table/table.css +1 -0
- package/es/tabs/Tabs.mjs +246 -0
- package/es/tabs/TabsSfc.css +0 -0
- package/es/tabs/index.mjs +12 -0
- package/es/tabs/props.mjs +46 -0
- package/es/tabs/provide.mjs +14 -0
- package/es/tabs/style/index.mjs +5 -0
- package/es/tabs/tabs.css +1 -0
- package/es/tabs-items/TabsItems.mjs +102 -0
- package/es/tabs-items/TabsItemsSfc.css +0 -0
- package/es/tabs-items/index.mjs +12 -0
- package/es/tabs-items/props.mjs +16 -0
- package/es/tabs-items/provide.mjs +16 -0
- package/es/tabs-items/style/index.mjs +3 -0
- package/es/themes/dark/actionSheet.mjs +8 -0
- package/es/themes/dark/appBar.mjs +6 -0
- package/es/themes/dark/avatar.mjs +7 -0
- package/es/themes/dark/badge.mjs +6 -0
- package/es/themes/dark/bottomNavigation.mjs +7 -0
- package/es/themes/dark/bottomNavigationItem.mjs +6 -0
- package/es/themes/dark/breadcrumb.mjs +6 -0
- package/es/themes/dark/button.mjs +7 -0
- package/es/themes/dark/card.mjs +10 -0
- package/es/themes/dark/cell.mjs +7 -0
- package/es/themes/dark/checkbox.mjs +7 -0
- package/es/themes/dark/chip.mjs +7 -0
- package/es/themes/dark/collapse.mjs +8 -0
- package/es/themes/dark/countdown.mjs +6 -0
- package/es/themes/dark/datePicker.mjs +10 -0
- package/es/themes/dark/dialog.mjs +8 -0
- package/es/themes/dark/divider.mjs +7 -0
- package/es/themes/dark/fieldDecorator.mjs +7 -0
- package/es/themes/dark/floatingPanel.mjs +6 -0
- package/es/themes/dark/index.d.ts +5 -0
- package/es/themes/dark/index.mjs +73 -0
- package/es/themes/dark/link.mjs +6 -0
- package/es/themes/dark/menu.mjs +6 -0
- package/es/themes/dark/menuOption.mjs +6 -0
- package/es/themes/dark/menuSelect.mjs +6 -0
- package/es/themes/dark/option.mjs +6 -0
- package/es/themes/dark/pagination.mjs +11 -0
- package/es/themes/dark/paper.mjs +6 -0
- package/es/themes/dark/picker.mjs +11 -0
- package/es/themes/dark/popup.mjs +6 -0
- package/es/themes/dark/progress.mjs +6 -0
- package/es/themes/dark/pullRefresh.mjs +6 -0
- package/es/themes/dark/radio.mjs +7 -0
- package/es/themes/dark/result.mjs +12 -0
- package/es/themes/dark/select.mjs +6 -0
- package/es/themes/dark/skeleton.mjs +11 -0
- package/es/themes/dark/steps.mjs +8 -0
- package/es/themes/dark/switch.mjs +7 -0
- package/es/themes/dark/tab.mjs +6 -0
- package/es/themes/dark/table.mjs +12 -0
- package/es/themes/dark/tabs.mjs +6 -0
- package/es/themes/dark/timePicker.mjs +9 -0
- package/es/themes/dark/uploader.mjs +10 -0
- package/es/themes/dark/watermark.mjs +6 -0
- package/es/themes/index.mjs +8 -0
- package/es/themes/style/index.mjs +0 -0
- package/es/time-picker/TimePicker.mjs +438 -0
- package/es/time-picker/TimePickerSfc.css +0 -0
- package/es/time-picker/clock.mjs +335 -0
- package/es/time-picker/index.mjs +12 -0
- package/es/time-picker/props.mjs +33 -0
- package/es/time-picker/style/index.mjs +4 -0
- package/es/time-picker/timePicker.css +1 -0
- package/es/time-picker/utils.mjs +76 -0
- package/es/tooltip/Tooltip.mjs +129 -0
- package/es/tooltip/TooltipSfc.css +0 -0
- package/es/tooltip/index.mjs +12 -0
- package/es/tooltip/props.mjs +47 -0
- package/es/tooltip/style/index.mjs +3 -0
- package/es/tooltip/tooltip.css +1 -0
- package/es/uploader/Uploader.mjs +485 -0
- package/es/uploader/UploaderSfc.css +0 -0
- package/es/uploader/index.mjs +12 -0
- package/es/uploader/props.mjs +59 -0
- package/es/uploader/provide.ts +3 -0
- package/es/uploader/style/index.mjs +9 -0
- package/es/uploader/uploader.css +1 -0
- package/es/utils/components.mjs +200 -0
- package/es/utils/elements.mjs +190 -0
- package/es/utils/logger.mjs +10 -0
- package/es/utils/shared.mjs +54 -0
- package/es/utils/style/index.mjs +0 -0
- package/es/utils/test.mjs +281 -0
- package/es/varlet.esm.js +1 -1
- package/es/watermark/Watermark.mjs +248 -0
- package/es/watermark/WatermarkSfc.css +0 -0
- package/es/watermark/index.mjs +12 -0
- package/es/watermark/props.mjs +53 -0
- package/es/watermark/style/index.mjs +3 -0
- package/es/watermark/watermark.css +1 -0
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +2 -2
- package/package.json +7 -7
- package/umd/varlet.js +1 -1
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
var __async = (__this, __arguments, generator) => {
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
var fulfilled = (value) => {
|
|
10
|
+
try {
|
|
11
|
+
step(generator.next(value));
|
|
12
|
+
} catch (e) {
|
|
13
|
+
reject(e);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var rejected = (value) => {
|
|
17
|
+
try {
|
|
18
|
+
step(generator.throw(value));
|
|
19
|
+
} catch (e) {
|
|
20
|
+
reject(e);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
24
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
import { nextTick } from "vue";
|
|
28
|
+
import { config } from "@vue/test-utils";
|
|
29
|
+
import { isPlainObject, getStyle } from "@varlet/shared";
|
|
30
|
+
const delay = (time) => new Promise((resolve) => {
|
|
31
|
+
setTimeout(resolve, time);
|
|
32
|
+
});
|
|
33
|
+
function getTouch(el, x, y) {
|
|
34
|
+
return {
|
|
35
|
+
identifier: Date.now(),
|
|
36
|
+
target: el,
|
|
37
|
+
pageX: x,
|
|
38
|
+
pageY: y,
|
|
39
|
+
clientX: x,
|
|
40
|
+
clientY: y,
|
|
41
|
+
radiusX: 2.5,
|
|
42
|
+
radiusY: 2.5,
|
|
43
|
+
rotationAngle: 10,
|
|
44
|
+
force: 0.5
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function mockDoubleRaf() {
|
|
48
|
+
const originMethod = window.requestAnimationFrame;
|
|
49
|
+
Object.assign(window, {
|
|
50
|
+
requestAnimationFrame(fn) {
|
|
51
|
+
setTimeout(fn, 16);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
mockRestore() {
|
|
56
|
+
window.requestAnimationFrame = originMethod;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function trigger(wrapper, eventName, x = 0, y = 0, offsetX = 0, offsetY = 0) {
|
|
61
|
+
const el = "element" in wrapper ? wrapper.element : wrapper;
|
|
62
|
+
const touchList = [getTouch(el, x, y)];
|
|
63
|
+
const event = new CustomEvent(eventName, { bubbles: true, cancelable: true, detail: {} });
|
|
64
|
+
Object.assign(event, {
|
|
65
|
+
clientX: x,
|
|
66
|
+
clientY: y,
|
|
67
|
+
offsetX,
|
|
68
|
+
offsetY,
|
|
69
|
+
touches: touchList,
|
|
70
|
+
targetTouches: touchList,
|
|
71
|
+
changedTouches: touchList
|
|
72
|
+
});
|
|
73
|
+
el.dispatchEvent(event);
|
|
74
|
+
return nextTick();
|
|
75
|
+
}
|
|
76
|
+
function mockOffset({
|
|
77
|
+
offsetWidth,
|
|
78
|
+
offsetHeight,
|
|
79
|
+
clientWidth,
|
|
80
|
+
clientHeight,
|
|
81
|
+
offsetLeft,
|
|
82
|
+
offsetTop
|
|
83
|
+
} = {}) {
|
|
84
|
+
Object.defineProperties(HTMLElement.prototype, {
|
|
85
|
+
offsetWidth: {
|
|
86
|
+
get() {
|
|
87
|
+
return offsetWidth != null ? offsetWidth : parseFloat(getStyle(this).width) || 0;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
offsetHeight: {
|
|
91
|
+
get() {
|
|
92
|
+
return offsetHeight != null ? offsetHeight : parseFloat(getStyle(this).height) || 0;
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
clientWidth: {
|
|
96
|
+
get() {
|
|
97
|
+
return clientWidth != null ? clientWidth : parseFloat(getStyle(this).width) || 0;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
clientHeight: {
|
|
101
|
+
get() {
|
|
102
|
+
return clientHeight != null ? clientHeight : parseFloat(getStyle(this).height) || 0;
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
offsetLeft: {
|
|
106
|
+
get() {
|
|
107
|
+
return offsetLeft != null ? offsetLeft : parseFloat(getStyle(this).marginLeft) || 0;
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
offsetTop: {
|
|
111
|
+
get() {
|
|
112
|
+
return offsetTop != null ? offsetTop : parseFloat(getStyle(this).marginTop) || 0;
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
offsetParent: {
|
|
116
|
+
get() {
|
|
117
|
+
var _a;
|
|
118
|
+
return (_a = this.parentNode) != null ? _a : {};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function mockImageNaturalSize(naturalWidth, naturalHeight) {
|
|
124
|
+
Object.defineProperties(HTMLImageElement.prototype, {
|
|
125
|
+
naturalWidth: {
|
|
126
|
+
get() {
|
|
127
|
+
return naturalWidth;
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
naturalHeight: {
|
|
131
|
+
get() {
|
|
132
|
+
return naturalHeight;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function triggerDrag(el, x = 0, y = 0) {
|
|
138
|
+
return __async(this, null, function* () {
|
|
139
|
+
yield trigger(el, "touchstart", 0, 0);
|
|
140
|
+
yield trigger(el, "touchmove", x / 4, y / 4);
|
|
141
|
+
yield trigger(el, "touchmove", x / 3, y / 3);
|
|
142
|
+
yield trigger(el, "touchmove", x / 2, y / 2);
|
|
143
|
+
yield trigger(el, "touchmove", x, y);
|
|
144
|
+
yield trigger(el, "touchend", x, y);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function mockTranslate() {
|
|
148
|
+
const originMethod = window.getComputedStyle;
|
|
149
|
+
const XRE = /translateX\((-?\d+)px\)/;
|
|
150
|
+
const YRE = /translateY\(-?(\d+)px\)/;
|
|
151
|
+
Object.assign(window, {
|
|
152
|
+
getComputedStyle: (el) => {
|
|
153
|
+
var _a, _b, _c, _d;
|
|
154
|
+
const styles = originMethod.call(window, el);
|
|
155
|
+
const x = (_b = (_a = el.style.transform.match(XRE)) == null ? void 0 : _a[1]) != null ? _b : 0;
|
|
156
|
+
const y = (_d = (_c = el.style.transform.match(YRE)) == null ? void 0 : _c[1]) != null ? _d : 0;
|
|
157
|
+
styles.transform = `matrix(1, 0, 0, 1, ${x}, ${y})`;
|
|
158
|
+
return styles;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return {
|
|
162
|
+
mockRestore() {
|
|
163
|
+
window.getComputedStyle = originMethod;
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function mockFileReader(url) {
|
|
168
|
+
const originMethod = window.FileReader;
|
|
169
|
+
class FileReader {
|
|
170
|
+
constructor() {
|
|
171
|
+
__publicField(this, "result", "");
|
|
172
|
+
}
|
|
173
|
+
onload() {
|
|
174
|
+
}
|
|
175
|
+
readAsDataURL() {
|
|
176
|
+
this.result = url;
|
|
177
|
+
this.onload();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
Object.assign(window, {
|
|
181
|
+
FileReader
|
|
182
|
+
});
|
|
183
|
+
return {
|
|
184
|
+
mockRestore() {
|
|
185
|
+
window.FileReader = originMethod;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function mockStubs() {
|
|
190
|
+
const originStubs = config.global.stubs;
|
|
191
|
+
config.global.stubs = {};
|
|
192
|
+
return {
|
|
193
|
+
mockRestore() {
|
|
194
|
+
config.global.stubs = originStubs;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function mockConsole(method, fn = () => {
|
|
199
|
+
}) {
|
|
200
|
+
const originMethod = console[method];
|
|
201
|
+
console[method] = fn;
|
|
202
|
+
return {
|
|
203
|
+
mockRestore() {
|
|
204
|
+
console[method] = originMethod;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function mockScrollTo() {
|
|
209
|
+
Object.assign(window, { scrollTo() {
|
|
210
|
+
} });
|
|
211
|
+
Object.defineProperty(Element.prototype, "scrollTo", {
|
|
212
|
+
value(x, y) {
|
|
213
|
+
if (isPlainObject(x)) {
|
|
214
|
+
this.scrollLeft = x.left;
|
|
215
|
+
this.scrollTop = x.top;
|
|
216
|
+
} else {
|
|
217
|
+
this.scrollLeft = x;
|
|
218
|
+
this.scrollTop = y;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
function mockScrollIntoView() {
|
|
224
|
+
Object.defineProperty(Element.prototype, "scrollIntoView", {
|
|
225
|
+
value() {
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function mockUserAgent(userAgent) {
|
|
230
|
+
const originUserAgent = navigator.userAgent;
|
|
231
|
+
Object.defineProperty(window.navigator, "userAgent", {
|
|
232
|
+
configurable: true,
|
|
233
|
+
get() {
|
|
234
|
+
return userAgent;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
return {
|
|
238
|
+
restore() {
|
|
239
|
+
Object.defineProperty(window.navigator, "userAgent", {
|
|
240
|
+
configurable: true,
|
|
241
|
+
get() {
|
|
242
|
+
return originUserAgent;
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function mockCanvas() {
|
|
249
|
+
Object.defineProperties(HTMLCanvasElement.prototype, {
|
|
250
|
+
getContext: {
|
|
251
|
+
value() {
|
|
252
|
+
return {
|
|
253
|
+
drawImage() {
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
toDataURL: {
|
|
259
|
+
value() {
|
|
260
|
+
return "mock data url";
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
export {
|
|
266
|
+
delay,
|
|
267
|
+
getTouch,
|
|
268
|
+
mockCanvas,
|
|
269
|
+
mockConsole,
|
|
270
|
+
mockDoubleRaf,
|
|
271
|
+
mockFileReader,
|
|
272
|
+
mockImageNaturalSize,
|
|
273
|
+
mockOffset,
|
|
274
|
+
mockScrollIntoView,
|
|
275
|
+
mockScrollTo,
|
|
276
|
+
mockStubs,
|
|
277
|
+
mockTranslate,
|
|
278
|
+
mockUserAgent,
|
|
279
|
+
trigger,
|
|
280
|
+
triggerDrag
|
|
281
|
+
};
|
package/es/varlet.esm.js
CHANGED
|
@@ -19239,7 +19239,7 @@ ie(li);
|
|
|
19239
19239
|
ue(li, yp);
|
|
19240
19240
|
const O6 = li;
|
|
19241
19241
|
var Wl = li;
|
|
19242
|
-
const GE = "2.20.
|
|
19242
|
+
const GE = "2.20.2";
|
|
19243
19243
|
function XE(e) {
|
|
19244
19244
|
Si.install && e.use(Si), ki.install && e.use(ki), Ti.install && e.use(Ti), Ei.install && e.use(Ei), Ii.install && e.use(Ii), gr.install && e.use(gr), Bi.install && e.use(Bi), Di.install && e.use(Di), Mi.install && e.use(Mi), Ni.install && e.use(Ni), mn.install && e.use(mn), Vi.install && e.use(Vi), Ai.install && e.use(Ai), br.install && e.use(br), Oo.install && e.use(Oo), zi.install && e.use(zi), yr.install && e.use(yr), Li.install && e.use(Li), Ri.install && e.use(Ri), Ui.install && e.use(Ui), kn.install && e.use(kn), ji.install && e.use(ji), Zi.install && e.use(Zi), Qi.install && e.use(Qi), _i.install && e.use(_i), xi.install && e.use(xi), Pr.install && e.use(Pr), tl.install && e.use(tl), ol.install && e.use(ol), Bo.install && e.use(Bo), rl.install && e.use(rl), al.install && e.use(al), $n.install && e.use($n), On.install && e.use(On), Bn.install && e.use(Bn), He.install && e.use(He), il.install && e.use(il), No.install && e.use(No), ll.install && e.use(ll), sl.install && e.use(sl), Tr.install && e.use(Tr), Po.install && e.use(Po), ul.install && e.use(ul), dl.install && e.use(dl), Kt.install && e.use(Kt), cl.install && e.use(cl), Ci.install && e.use(Ci), eo.install && e.use(eo), fl.install && e.use(fl), vl.install && e.use(vl), ml.install && e.use(ml), pl.install && e.use(pl), hl.install && e.use(hl), gl.install && e.use(gl), bl.install && e.use(bl), gt.install && e.use(gt), yl.install && e.use(yl), $l.install && e.use($l), wl.install && e.use(wl), Cl.install && e.use(Cl), Sl.install && e.use(Sl), kl.install && e.use(kl), Qe.install && e.use(Qe), Pl.install && e.use(Pl), Ol.install && e.use(Ol), Tl.install && e.use(Tl), El.install && e.use(El), Bl.install && e.use(Bl), Dl.install && e.use(Dl), Ml.install && e.use(Ml), Nl.install && e.use(Nl), Qt.install && e.use(Qt), Vl.install && e.use(Vl), Do.install && e.use(Do), Mo.install && e.use(Mo), Al.install && e.use(Al), zl.install && e.use(zl), Ll.install && e.use(Ll), Rl.install && e.use(Rl), Ul.install && e.use(Ul), Hl.install && e.use(Hl), Fl.install && e.use(Fl), Yl.install && e.use(Yl), Or.install && e.use(Or), jl.install && e.use(jl), Wl.install && e.use(Wl);
|
|
19245
19245
|
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
import { defineComponent, ref, watch, nextTick, onUnmounted, onMounted } from "vue";
|
|
41
|
+
import { createNamespace } from "../utils/components.mjs";
|
|
42
|
+
import { props } from "./props.mjs";
|
|
43
|
+
import { getStyle } from "@varlet/shared";
|
|
44
|
+
const { name, n, classes } = createNamespace("watermark");
|
|
45
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, vShow as _vShow, withDirectives as _withDirectives, normalizeClass as _normalizeClass, Teleport as _Teleport, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
46
|
+
const _withScopeId = (n2) => (_pushScopeId(""), n2 = n2(), _popScopeId(), n2);
|
|
47
|
+
const _hoisted_1 = { ref: "svgRef" };
|
|
48
|
+
const _hoisted_2 = ["viewBox", "width", "height"];
|
|
49
|
+
const _hoisted_3 = ["width", "height"];
|
|
50
|
+
const _hoisted_4 = ["href", "xlink:href", "x", "y", "width", "height"];
|
|
51
|
+
function __render__(_ctx, _cache) {
|
|
52
|
+
return _openBlock(), _createElementBlock(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
class: _normalizeClass(_ctx.n())
|
|
56
|
+
},
|
|
57
|
+
[
|
|
58
|
+
_renderSlot(_ctx.$slots, "default"),
|
|
59
|
+
(_openBlock(), _createBlock(_Teleport, {
|
|
60
|
+
to: "body",
|
|
61
|
+
disabled: !_ctx.fullscreen
|
|
62
|
+
}, [
|
|
63
|
+
_createElementVNode(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
ref: "containerRef",
|
|
67
|
+
class: _normalizeClass(_ctx.classes(_ctx.n("container"), [_ctx.fullscreen, _ctx.n("--fullscreen")])),
|
|
68
|
+
style: _normalizeStyle({
|
|
69
|
+
backgroundImage: `url(${_ctx.watermarkUrl})`,
|
|
70
|
+
zIndex: _ctx.zIndex
|
|
71
|
+
})
|
|
72
|
+
},
|
|
73
|
+
[
|
|
74
|
+
_withDirectives(_createElementVNode(
|
|
75
|
+
"div",
|
|
76
|
+
_hoisted_1,
|
|
77
|
+
[
|
|
78
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
79
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
80
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
81
|
+
viewBox: `0 0 ${_ctx.width + _ctx.gapX} ${_ctx.height + _ctx.gapY}`,
|
|
82
|
+
width: `${_ctx.width + _ctx.gapX}`,
|
|
83
|
+
height: `${_ctx.height + _ctx.gapY}`,
|
|
84
|
+
style: _normalizeStyle({
|
|
85
|
+
padding: `0 ${_ctx.gapX}px ${_ctx.gapY}px 0`,
|
|
86
|
+
opacity: _ctx.opacity
|
|
87
|
+
})
|
|
88
|
+
}, [
|
|
89
|
+
_ctx.showContent() ? (_openBlock(), _createElementBlock("foreignObject", {
|
|
90
|
+
key: 0,
|
|
91
|
+
x: "0",
|
|
92
|
+
y: "0",
|
|
93
|
+
width: _ctx.width,
|
|
94
|
+
height: _ctx.height
|
|
95
|
+
}, [
|
|
96
|
+
_createElementVNode(
|
|
97
|
+
"div",
|
|
98
|
+
{
|
|
99
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
100
|
+
style: _normalizeStyle({
|
|
101
|
+
transform: `translate(${_ctx.offsetX}px, ${_ctx.offsetY}px) rotate(${_ctx.rotate}deg)`,
|
|
102
|
+
transformOrigin: "center"
|
|
103
|
+
})
|
|
104
|
+
},
|
|
105
|
+
[
|
|
106
|
+
_renderSlot(_ctx.$slots, "content", {}, () => [
|
|
107
|
+
_createElementVNode(
|
|
108
|
+
"span",
|
|
109
|
+
{
|
|
110
|
+
style: _normalizeStyle(__spreadProps(__spreadValues({}, _ctx.font), { fontSize: `${_ctx.font.fontSize}px`, color: _ctx.textColor }))
|
|
111
|
+
},
|
|
112
|
+
_toDisplayString(_ctx.content),
|
|
113
|
+
5
|
|
114
|
+
/* TEXT, STYLE */
|
|
115
|
+
)
|
|
116
|
+
])
|
|
117
|
+
],
|
|
118
|
+
4
|
|
119
|
+
/* STYLE */
|
|
120
|
+
)
|
|
121
|
+
], 8, _hoisted_3)) : _createCommentVNode("v-if", true),
|
|
122
|
+
!_ctx.$slots.content && _ctx.image ? (_openBlock(), _createElementBlock("image", {
|
|
123
|
+
key: 1,
|
|
124
|
+
href: _ctx.imageUrl,
|
|
125
|
+
"xlink:href": _ctx.imageUrl,
|
|
126
|
+
x: _ctx.offsetX,
|
|
127
|
+
y: _ctx.offsetY,
|
|
128
|
+
width: _ctx.width,
|
|
129
|
+
height: _ctx.height,
|
|
130
|
+
style: _normalizeStyle({
|
|
131
|
+
transform: `rotate(${_ctx.rotate}deg)`,
|
|
132
|
+
transformOrigin: "center"
|
|
133
|
+
})
|
|
134
|
+
}, null, 12, _hoisted_4)) : _createCommentVNode("v-if", true)
|
|
135
|
+
], 12, _hoisted_2))
|
|
136
|
+
],
|
|
137
|
+
512
|
|
138
|
+
/* NEED_PATCH */
|
|
139
|
+
), [
|
|
140
|
+
[_vShow, false]
|
|
141
|
+
])
|
|
142
|
+
],
|
|
143
|
+
6
|
|
144
|
+
/* CLASS, STYLE */
|
|
145
|
+
)
|
|
146
|
+
], 8, ["disabled"]))
|
|
147
|
+
],
|
|
148
|
+
2
|
|
149
|
+
/* CLASS */
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
const __sfc__ = defineComponent({
|
|
153
|
+
name,
|
|
154
|
+
props,
|
|
155
|
+
setup(props2, { slots }) {
|
|
156
|
+
const watermarkUrl = ref("");
|
|
157
|
+
const imageUrl = ref("");
|
|
158
|
+
const textColor = ref("");
|
|
159
|
+
const svgRef = ref(null);
|
|
160
|
+
const containerRef = ref(null);
|
|
161
|
+
watch(
|
|
162
|
+
() => [
|
|
163
|
+
props2.image,
|
|
164
|
+
props2.font,
|
|
165
|
+
props2.content,
|
|
166
|
+
props2.height,
|
|
167
|
+
props2.width,
|
|
168
|
+
props2.rotate,
|
|
169
|
+
props2.gapX,
|
|
170
|
+
props2.gapY,
|
|
171
|
+
props2.offsetX,
|
|
172
|
+
props2.offsetY,
|
|
173
|
+
props2.opacity
|
|
174
|
+
],
|
|
175
|
+
resize,
|
|
176
|
+
{
|
|
177
|
+
deep: true
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
onMounted(resize);
|
|
181
|
+
onUnmounted(revokeWatermarkUrl);
|
|
182
|
+
function showContent() {
|
|
183
|
+
if (slots.content) {
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
if (props2.content && !props2.image) {
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
function imageToBase64() {
|
|
192
|
+
return __async(this, null, function* () {
|
|
193
|
+
return new Promise((resolve) => {
|
|
194
|
+
const canvas = document.createElement("canvas");
|
|
195
|
+
const ctx = canvas.getContext("2d");
|
|
196
|
+
const img = new Image();
|
|
197
|
+
img.crossOrigin = "anonymous";
|
|
198
|
+
img.referrerPolicy = "no-referrer";
|
|
199
|
+
img.src = props2.image;
|
|
200
|
+
img.onload = () => {
|
|
201
|
+
canvas.width = img.width;
|
|
202
|
+
canvas.height = img.height;
|
|
203
|
+
ctx.drawImage(img, 0, 0);
|
|
204
|
+
resolve(canvas.toDataURL());
|
|
205
|
+
};
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function svgToBlobUrl(svgStr) {
|
|
210
|
+
const svgBlob = new Blob([svgStr], {
|
|
211
|
+
type: "image/svg+xml"
|
|
212
|
+
});
|
|
213
|
+
return URL.createObjectURL(svgBlob);
|
|
214
|
+
}
|
|
215
|
+
function revokeWatermarkUrl() {
|
|
216
|
+
if (watermarkUrl.value) {
|
|
217
|
+
URL.revokeObjectURL(watermarkUrl.value);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function resize() {
|
|
221
|
+
return __async(this, null, function* () {
|
|
222
|
+
textColor.value = getStyle(containerRef.value).color;
|
|
223
|
+
if (props2.image) {
|
|
224
|
+
imageUrl.value = yield imageToBase64();
|
|
225
|
+
}
|
|
226
|
+
yield nextTick();
|
|
227
|
+
revokeWatermarkUrl();
|
|
228
|
+
watermarkUrl.value = svgToBlobUrl(svgRef.value.innerHTML);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
return {
|
|
232
|
+
svgRef,
|
|
233
|
+
containerRef,
|
|
234
|
+
watermarkUrl,
|
|
235
|
+
imageUrl,
|
|
236
|
+
textColor,
|
|
237
|
+
n,
|
|
238
|
+
classes,
|
|
239
|
+
showContent,
|
|
240
|
+
resize
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
__sfc__.render = __render__;
|
|
245
|
+
var stdin_default = __sfc__;
|
|
246
|
+
export {
|
|
247
|
+
stdin_default as default
|
|
248
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Watermark from "./Watermark.mjs";
|
|
2
|
+
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
3
|
+
import { props as watermarkProps } from "./props.mjs";
|
|
4
|
+
withInstall(Watermark);
|
|
5
|
+
withPropsDefaultsSetter(Watermark, watermarkProps);
|
|
6
|
+
const _WatermarkComponent = Watermark;
|
|
7
|
+
var stdin_default = Watermark;
|
|
8
|
+
export {
|
|
9
|
+
_WatermarkComponent,
|
|
10
|
+
stdin_default as default,
|
|
11
|
+
watermarkProps
|
|
12
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const props = {
|
|
2
|
+
width: {
|
|
3
|
+
type: Number,
|
|
4
|
+
default: 100
|
|
5
|
+
},
|
|
6
|
+
height: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 100
|
|
9
|
+
},
|
|
10
|
+
content: String,
|
|
11
|
+
image: String,
|
|
12
|
+
rotate: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: -22
|
|
15
|
+
},
|
|
16
|
+
offsetX: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 0
|
|
19
|
+
},
|
|
20
|
+
offsetY: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 0
|
|
23
|
+
},
|
|
24
|
+
gapX: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0
|
|
27
|
+
},
|
|
28
|
+
gapY: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0
|
|
31
|
+
},
|
|
32
|
+
zIndex: {
|
|
33
|
+
type: [Number, String],
|
|
34
|
+
default: 10
|
|
35
|
+
},
|
|
36
|
+
opacity: {
|
|
37
|
+
type: [Number, String],
|
|
38
|
+
default: 0.5
|
|
39
|
+
},
|
|
40
|
+
fullscreen: Boolean,
|
|
41
|
+
font: {
|
|
42
|
+
type: Object,
|
|
43
|
+
default: () => ({
|
|
44
|
+
fontStyle: "normal",
|
|
45
|
+
fontVariant: "normal",
|
|
46
|
+
fontWeight: "normal",
|
|
47
|
+
fontSize: 14
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
props
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root { --watermark-content-color: #808080;}.var-watermark { position: relative;}.var-watermark__container { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; background-repeat: repeat; color: var(--watermark-content-color);}.var-watermark--fullscreen { position: fixed;}
|
package/lib/varlet.cjs.js
CHANGED
|
@@ -25056,9 +25056,9 @@ const skeleton = "";
|
|
|
25056
25056
|
const SkeletonSfc = "";
|
|
25057
25057
|
const slider = "";
|
|
25058
25058
|
const SliderSfc = "";
|
|
25059
|
-
const SnackbarSfc = "";
|
|
25060
25059
|
const snackbar = "";
|
|
25061
25060
|
const coreSfc = "";
|
|
25061
|
+
const SnackbarSfc = "";
|
|
25062
25062
|
const space = "";
|
|
25063
25063
|
const step = "";
|
|
25064
25064
|
const StepSfc = "";
|
|
@@ -25085,7 +25085,7 @@ const uploader = "";
|
|
|
25085
25085
|
const UploaderSfc = "";
|
|
25086
25086
|
const watermark = "";
|
|
25087
25087
|
const WatermarkSfc = "";
|
|
25088
|
-
const version = "2.20.
|
|
25088
|
+
const version = "2.20.2";
|
|
25089
25089
|
function install(app) {
|
|
25090
25090
|
stdin_default$3k.install && app.use(stdin_default$3k);
|
|
25091
25091
|
stdin_default$3i.install && app.use(stdin_default$3i);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.2",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/shared": "2.20.
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/
|
|
51
|
+
"@varlet/shared": "2.20.2",
|
|
52
|
+
"@varlet/icons": "2.20.2",
|
|
53
|
+
"@varlet/use": "2.20.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.3.4",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"typescript": "^5.1.5",
|
|
67
67
|
"vue": "3.3.4",
|
|
68
68
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/
|
|
70
|
-
"@varlet/
|
|
71
|
-
"@varlet/
|
|
69
|
+
"@varlet/ui": "2.20.2",
|
|
70
|
+
"@varlet/touch-emulator": "2.20.2",
|
|
71
|
+
"@varlet/cli": "2.20.2"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|