zartui 3.0.5 → 3.0.7
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/button/Button.d.ts +3 -0
- package/es/button/Button.mjs +2 -0
- package/es/button/index.d.ts +2 -0
- package/es/cascader/Cascader.mjs +0 -2
- package/es/cascader/index.css +1 -1
- package/es/checkbox/Checkbox.d.ts +1 -1
- package/es/checkbox/Checker.d.ts +2 -2
- package/es/checkbox/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.mjs +3 -1
- package/es/date-time-picker/DateTimePicker.d.ts +1 -1
- package/es/date-time-picker/DateTimePicker.mjs +9 -3
- package/es/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
- package/es/date-time-picker/index.d.ts +1 -1
- package/es/dialog/index.css +1 -1
- package/es/divider/index.css +1 -1
- package/es/dropdown-item/DropdownItem.mjs +7 -4
- package/es/dropdown-menu/DropdownMenu.mjs +2 -2
- package/es/dropdown-menu/types.d.ts +1 -0
- package/es/empty/Images.mjs +9 -9
- package/es/empty/index.css +1 -1
- package/es/hierarchy-select/Breadcrumb.d.ts +43 -0
- package/es/hierarchy-select/Breadcrumb.mjs +56 -0
- package/es/hierarchy-select/HierarchySelect.d.ts +104 -0
- package/es/hierarchy-select/HierarchySelect.mjs +221 -0
- package/es/hierarchy-select/index.css +1 -0
- package/es/hierarchy-select/index.d.ts +79 -0
- package/es/hierarchy-select/index.mjs +8 -0
- package/es/hierarchy-select/style/index.d.ts +1 -0
- package/es/hierarchy-select/style/index.mjs +8 -0
- package/es/hierarchy-select/svg/SubIcon.d.ts +1 -0
- package/es/hierarchy-select/svg/SubIcon.mjs +33 -0
- package/es/hierarchy-select/types.d.ts +7 -0
- package/es/hierarchy-select/types.mjs +0 -0
- package/es/icon/config.mjs +3 -1
- package/es/icon/index.css +1 -1
- package/es/image-preview/ImagePreview.mjs +1 -1
- package/es/index-anchor/IndexAnchor.d.ts +11 -0
- package/es/index-anchor/IndexAnchor.mjs +88 -0
- package/es/index-anchor/index.css +1 -0
- package/es/index-anchor/index.d.ts +14 -0
- package/es/index-anchor/index.mjs +10 -0
- package/es/index-anchor/style/index.d.ts +1 -0
- package/es/index-anchor/style/index.mjs +3 -0
- package/es/index-anchor/types.d.ts +11 -0
- package/es/index-anchor/types.mjs +0 -0
- package/es/index-bar/IndexBar.d.ts +64 -0
- package/es/index-bar/IndexBar.mjs +275 -0
- package/es/index-bar/index.css +1 -0
- package/es/index-bar/index.d.ts +50 -0
- package/es/index-bar/index.mjs +10 -0
- package/es/index-bar/style/index.d.ts +1 -0
- package/es/index-bar/style/index.mjs +2 -0
- package/es/index-bar/types.d.ts +16 -0
- package/es/index-bar/types.mjs +0 -0
- package/es/index.d.ts +8 -1
- package/es/index.mjs +22 -1
- package/es/lazyload/vue-lazyload/index.mjs +5 -0
- package/es/lazyload/vue-lazyload/lazy.mjs +81 -0
- package/es/lazyload/vue-lazyload/listener.mjs +45 -0
- package/es/list/List.mjs +2 -4
- package/es/list/index.css +1 -1
- package/es/locale/lang/en-US.d.ts +7 -23
- package/es/locale/lang/en-US.mjs +7 -23
- package/es/locale/lang/zh-CN.d.ts +7 -23
- package/es/locale/lang/zh-CN.mjs +7 -23
- package/es/media-picker/MediaPicker.mjs +20 -0
- package/es/media-picker/image/PickFileIcon.mjs +1 -1
- package/es/media-picker/image/PickPhotoIcon.mjs +1 -1
- package/es/media-picker/image/TakeAudioIcon.mjs +1 -1
- package/es/media-picker/image/TakePhotoIcon.mjs +1 -1
- package/es/media-picker/image/TakeVideoIcon.mjs +1 -1
- package/es/media-picker/index.css +1 -1
- package/es/media-picker/util/media-util.mjs +3 -0
- package/es/media-picker/watermark/image-processor.mjs +10 -6
- package/es/media-picker/watermark/resize-options.mjs +1 -0
- package/es/media-picker/watermark/watermark.mjs +4 -0
- package/es/multiple-picker/MultiplePicker.d.ts +4 -4
- package/es/multiple-picker/MultiplePicker.mjs +3 -3
- package/es/multiple-picker/MultiplePickerOptions.d.ts +4 -4
- package/es/multiple-picker/MultiplePickerOptions.mjs +3 -3
- package/es/multiple-picker/index.d.ts +3 -3
- package/es/notice-bar/index.css +1 -1
- package/es/picker/Picker.mjs +7 -4
- package/es/picker/PickerToolbar.mjs +1 -0
- package/es/popover/Popover.d.ts +13 -0
- package/es/popover/Popover.mjs +91 -4
- package/es/popover/index.css +1 -1
- package/es/popover/index.d.ts +9 -0
- package/es/popup/Popup.mjs +1 -0
- package/es/popup/index.css +1 -1
- package/es/popup/shared.mjs +12 -0
- package/es/radio/Radio.d.ts +1 -1
- package/es/radio/index.d.ts +1 -1
- package/es/rate/index.css +1 -1
- package/es/search/Search.d.ts +1 -1
- package/es/search/Search.mjs +1 -0
- package/es/search/index.d.ts +1 -1
- package/es/signature/Signature.mjs +13 -10
- package/es/signature/index.css +1 -1
- package/es/step/Step.mjs +10 -6
- package/es/step/index.css +1 -1
- package/es/stepper/Stepper.mjs +2 -0
- package/es/stepper/index.css +1 -1
- package/es/steps/index.css +1 -1
- package/es/sticky/Sticky.mjs +2 -0
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/swipe/Swipe.d.ts +3 -1
- package/es/swipe/Swipe.mjs +19 -2
- package/es/swipe/index.d.ts +3 -1
- package/es/swipe-cell/SwipeCell.d.ts +44 -0
- package/es/swipe-cell/SwipeCell.mjs +163 -0
- package/es/swipe-cell/index.css +1 -0
- package/es/swipe-cell/index.d.ts +39 -0
- package/es/swipe-cell/index.mjs +10 -0
- package/es/swipe-cell/style/index.d.ts +1 -0
- package/es/swipe-cell/style/index.mjs +2 -0
- package/es/swipe-cell/types.d.ts +9 -0
- package/es/swipe-cell/types.mjs +0 -0
- package/es/switch/index.css +1 -1
- package/es/tabbar-item/index.css +1 -1
- package/es/table/Table.d.ts +113 -0
- package/es/table/Table.mjs +118 -0
- package/es/table/index.css +1 -0
- package/es/table/index.d.ts +75 -0
- package/es/table/index.mjs +10 -0
- package/es/table/style/index.d.ts +1 -0
- package/es/table/style/index.mjs +2 -0
- package/es/tabs/Tabs.mjs +2 -0
- package/es/tabs/index.css +1 -1
- package/es/tag/Tag.d.ts +18 -1
- package/es/tag/Tag.mjs +47 -2
- package/es/tag/index.css +1 -1
- package/es/tag/index.d.ts +13 -1
- package/es/text-ellipsis/TextEllipsis.d.ts +76 -0
- package/es/text-ellipsis/TextEllipsis.mjs +118 -0
- package/es/text-ellipsis/index.css +1 -0
- package/es/text-ellipsis/index.d.ts +60 -0
- package/es/text-ellipsis/index.mjs +10 -0
- package/es/text-ellipsis/style/index.d.ts +1 -0
- package/es/text-ellipsis/style/index.mjs +2 -0
- package/es/text-ellipsis/types.d.ts +3 -0
- package/es/text-ellipsis/types.mjs +0 -0
- package/es/timeline/Timeline.d.ts +113 -0
- package/es/timeline/Timeline.mjs +162 -0
- package/es/timeline/index.css +1 -0
- package/es/timeline/index.d.ts +75 -0
- package/es/timeline/index.mjs +10 -0
- package/es/timeline/style/index.d.ts +1 -0
- package/es/timeline/style/index.mjs +4 -0
- package/es/uploader/Uploader.d.ts +1 -1
- package/es/uploader/index.d.ts +1 -1
- package/es/uploader/utils.mjs +1 -1
- package/es/utils/dom.d.ts +1 -0
- package/es/utils/dom.mjs +11 -0
- package/lib/action-sheet/index.js +4 -0
- package/lib/avatar/Avatar.js +4 -0
- package/lib/avatar/index.js +4 -0
- package/lib/badge/index.js +4 -0
- package/lib/button/Button.d.ts +3 -0
- package/lib/button/Button.js +2 -0
- package/lib/button/index.d.ts +2 -0
- package/lib/button/index.js +4 -0
- package/lib/calendar/Calendar.js +4 -0
- package/lib/calendar/CalendarMonth.js +4 -0
- package/lib/calendar/index.js +4 -0
- package/lib/cascader/Cascader.js +4 -2
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.js +4 -0
- package/lib/cell/index.js +4 -0
- package/lib/cell-group/index.js +4 -0
- package/lib/checkbox/Checkbox.d.ts +1 -1
- package/lib/checkbox/Checkbox.js +4 -0
- package/lib/checkbox/Checker.d.ts +2 -2
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +4 -0
- package/lib/checkbox-group/index.js +4 -0
- package/lib/col/index.js +4 -0
- package/lib/collapse/index.js +4 -0
- package/lib/collapse-item/CollapseItem.js +7 -1
- package/lib/collapse-item/index.js +4 -0
- package/lib/config-provider/index.js +4 -0
- package/lib/date-time-picker/DateTimePicker.d.ts +1 -1
- package/lib/date-time-picker/DateTimePicker.js +13 -3
- package/lib/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
- package/lib/date-time-picker/DateTimePickerWrapper.js +4 -0
- package/lib/date-time-picker/index.d.ts +1 -1
- package/lib/date-time-picker/index.js +4 -0
- package/lib/dialog/function-call.js +4 -0
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.js +4 -0
- package/lib/divider/index.css +1 -1
- package/lib/divider/index.js +4 -0
- package/lib/dropdown-item/DropdownItem.js +6 -3
- package/lib/dropdown-item/index.js +4 -0
- package/lib/dropdown-menu/DropdownMenu.js +6 -2
- package/lib/dropdown-menu/index.js +4 -0
- package/lib/dropdown-menu/types.d.ts +1 -0
- package/lib/empty/Images.js +9 -9
- package/lib/empty/index.css +1 -1
- package/lib/empty/index.js +4 -0
- package/lib/field/index.js +4 -0
- package/lib/form/index.js +4 -0
- package/lib/grid/index.js +4 -0
- package/lib/grid-item/index.js +4 -0
- package/lib/hierarchy-select/Breadcrumb.d.ts +43 -0
- package/lib/hierarchy-select/Breadcrumb.js +85 -0
- package/lib/hierarchy-select/HierarchySelect.d.ts +104 -0
- package/lib/hierarchy-select/HierarchySelect.js +250 -0
- package/lib/hierarchy-select/index.css +1 -0
- package/lib/hierarchy-select/index.d.ts +79 -0
- package/lib/hierarchy-select/index.js +37 -0
- package/lib/hierarchy-select/style/index.d.ts +1 -0
- package/lib/hierarchy-select/style/index.js +8 -0
- package/lib/hierarchy-select/svg/SubIcon.d.ts +1 -0
- package/lib/hierarchy-select/svg/SubIcon.js +52 -0
- package/lib/hierarchy-select/types.d.ts +7 -0
- package/lib/hierarchy-select/types.js +15 -0
- package/lib/icon/config.js +3 -1
- package/lib/icon/index.css +1 -1
- package/lib/icon/index.js +4 -0
- package/lib/image/index.js +4 -0
- package/lib/image-preview/ImagePreview.js +5 -1
- package/lib/image-preview/function-call.js +4 -0
- package/lib/image-preview/index.js +4 -0
- package/lib/index-anchor/IndexAnchor.d.ts +11 -0
- package/lib/index-anchor/IndexAnchor.js +107 -0
- package/lib/index-anchor/index.css +1 -0
- package/lib/index-anchor/index.d.ts +14 -0
- package/lib/index-anchor/index.js +39 -0
- package/lib/index-anchor/style/index.d.ts +1 -0
- package/lib/index-anchor/style/index.js +3 -0
- package/lib/index-anchor/types.d.ts +11 -0
- package/lib/index-anchor/types.js +15 -0
- package/lib/index-bar/IndexBar.d.ts +64 -0
- package/lib/index-bar/IndexBar.js +294 -0
- package/lib/index-bar/index.css +1 -0
- package/lib/index-bar/index.d.ts +50 -0
- package/lib/index-bar/index.js +39 -0
- package/lib/index-bar/style/index.d.ts +1 -0
- package/lib/index-bar/style/index.js +2 -0
- package/lib/index-bar/types.d.ts +16 -0
- package/lib/index-bar/types.js +15 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +8 -1
- package/lib/index.js +22 -1
- package/lib/lazyload/vue-lazyload/index.js +9 -0
- package/lib/lazyload/vue-lazyload/lazy.js +85 -0
- package/lib/lazyload/vue-lazyload/listener.js +45 -0
- package/lib/list/List.js +2 -4
- package/lib/list/index.css +1 -1
- package/lib/list/index.js +4 -0
- package/lib/loading/index.js +4 -0
- package/lib/locale/index.js +4 -0
- package/lib/locale/lang/en-US.d.ts +7 -23
- package/lib/locale/lang/en-US.js +7 -23
- package/lib/locale/lang/zh-CN.d.ts +7 -23
- package/lib/locale/lang/zh-CN.js +7 -23
- package/lib/media-picker/MediaPicker.js +24 -0
- package/lib/media-picker/image/PickFileIcon.js +1 -1
- package/lib/media-picker/image/PickPhotoIcon.js +1 -1
- package/lib/media-picker/image/TakeAudioIcon.js +1 -1
- package/lib/media-picker/image/TakePhotoIcon.js +1 -1
- package/lib/media-picker/image/TakeVideoIcon.js +1 -1
- package/lib/media-picker/index.css +1 -1
- package/lib/media-picker/index.js +4 -0
- package/lib/media-picker/util/media-util.js +3 -0
- package/lib/media-picker/watermark/image-processor.js +10 -6
- package/lib/media-picker/watermark/resize-options.js +1 -0
- package/lib/media-picker/watermark/watermark.js +4 -0
- package/lib/media-player/MediaPlayer.js +4 -0
- package/lib/media-player/index.js +4 -0
- package/lib/multiple-picker/MultiplePicker.d.ts +4 -4
- package/lib/multiple-picker/MultiplePicker.js +7 -3
- package/lib/multiple-picker/MultiplePickerOptions.d.ts +4 -4
- package/lib/multiple-picker/MultiplePickerOptions.js +3 -3
- package/lib/multiple-picker/index.d.ts +3 -3
- package/lib/multiple-picker/index.js +4 -0
- package/lib/nav-bar/index.js +4 -0
- package/lib/notice-bar/NoticeBar.js +4 -0
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.js +4 -0
- package/lib/notify/function-call.js +4 -0
- package/lib/notify/index.js +4 -0
- package/lib/number-keyboard/NumberKeyboard.js +4 -0
- package/lib/number-keyboard/NumberKeyboardKey.js +4 -0
- package/lib/number-keyboard/index.js +4 -0
- package/lib/overlay/index.js +4 -0
- package/lib/password-input/index.js +4 -0
- package/lib/picker/Picker.js +10 -3
- package/lib/picker/PickerToolbar.js +1 -0
- package/lib/picker/index.js +4 -0
- package/lib/popover/Popover.d.ts +13 -0
- package/lib/popover/Popover.js +90 -3
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.d.ts +9 -0
- package/lib/popover/index.js +4 -0
- package/lib/popup/Popup.js +1 -0
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +4 -0
- package/lib/popup/shared.js +12 -0
- package/lib/pull-refresh/index.js +4 -0
- package/lib/radio/Radio.d.ts +1 -1
- package/lib/radio/Radio.js +4 -0
- package/lib/radio/index.d.ts +1 -1
- package/lib/radio/index.js +4 -0
- package/lib/radio-group/index.js +4 -0
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.js +4 -0
- package/lib/row/index.js +4 -0
- package/lib/search/Search.d.ts +1 -1
- package/lib/search/Search.js +1 -0
- package/lib/search/index.d.ts +1 -1
- package/lib/search/index.js +4 -0
- package/lib/signature/Signature.js +16 -9
- package/lib/signature/index.css +1 -1
- package/lib/signature/index.js +4 -0
- package/lib/skeleton/index.js +4 -0
- package/lib/step/Step.js +10 -6
- package/lib/step/index.css +1 -1
- package/lib/step/index.js +4 -0
- package/lib/stepper/Stepper.js +6 -0
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.js +4 -0
- package/lib/steps/index.css +1 -1
- package/lib/steps/index.js +4 -0
- package/lib/sticky/Sticky.js +2 -0
- package/lib/sticky/index.js +4 -0
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/swipe/Swipe.d.ts +3 -1
- package/lib/swipe/Swipe.js +19 -2
- package/lib/swipe/index.d.ts +3 -1
- package/lib/swipe/index.js +4 -0
- package/lib/swipe-cell/SwipeCell.d.ts +44 -0
- package/lib/swipe-cell/SwipeCell.js +182 -0
- package/lib/swipe-cell/index.css +1 -0
- package/lib/swipe-cell/index.d.ts +39 -0
- package/lib/swipe-cell/index.js +39 -0
- package/lib/swipe-cell/style/index.d.ts +1 -0
- package/lib/swipe-cell/style/index.js +2 -0
- package/lib/swipe-cell/types.d.ts +9 -0
- package/lib/swipe-cell/types.js +15 -0
- package/lib/swipe-item/index.js +4 -0
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.js +4 -0
- package/lib/tab/index.js +4 -0
- package/lib/tabbar/index.js +4 -0
- package/lib/tabbar-item/index.css +1 -1
- package/lib/tabbar-item/index.js +4 -0
- package/lib/table/Table.d.ts +113 -0
- package/lib/table/Table.js +137 -0
- package/lib/table/index.css +1 -0
- package/lib/table/index.d.ts +75 -0
- package/lib/table/index.js +39 -0
- package/lib/table/style/index.d.ts +1 -0
- package/lib/table/style/index.js +2 -0
- package/lib/tabs/Tabs.js +6 -0
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.js +4 -0
- package/lib/tag/Tag.d.ts +18 -1
- package/lib/tag/Tag.js +47 -2
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.d.ts +13 -1
- package/lib/tag/index.js +4 -0
- package/lib/text-ellipsis/TextEllipsis.d.ts +76 -0
- package/lib/text-ellipsis/TextEllipsis.js +137 -0
- package/lib/text-ellipsis/index.css +1 -0
- package/lib/text-ellipsis/index.d.ts +60 -0
- package/lib/text-ellipsis/index.js +39 -0
- package/lib/text-ellipsis/style/index.d.ts +1 -0
- package/lib/text-ellipsis/style/index.js +2 -0
- package/lib/text-ellipsis/types.d.ts +3 -0
- package/lib/text-ellipsis/types.js +15 -0
- package/lib/time-picker/TimePicker.js +4 -0
- package/lib/time-picker/TimePickerColumn.js +4 -0
- package/lib/time-picker/index.js +4 -0
- package/lib/timeline/Timeline.d.ts +113 -0
- package/lib/timeline/Timeline.js +191 -0
- package/lib/timeline/index.css +1 -0
- package/lib/timeline/index.d.ts +75 -0
- package/lib/timeline/index.js +39 -0
- package/lib/timeline/style/index.d.ts +1 -0
- package/lib/timeline/style/index.js +4 -0
- package/lib/toast/function-call.js +4 -0
- package/lib/toast/index.js +4 -0
- package/lib/uploader/Uploader.d.ts +1 -1
- package/lib/uploader/Uploader.js +4 -0
- package/lib/uploader/index.d.ts +1 -1
- package/lib/uploader/index.js +4 -0
- package/lib/uploader/utils.js +1 -1
- package/lib/utils/create.js +4 -0
- package/lib/utils/dom.d.ts +1 -0
- package/lib/utils/dom.js +11 -0
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +2619 -1019
- package/lib/zartui.es.js +2671 -1071
- package/lib/zartui.js +3354 -1218
- package/lib/zartui.min.js +1 -1
- package/package.json +24 -23
- package/README.md +0 -25
package/lib/step/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-step-text-color: var(--zt-text-color-2);--zt-step-active-color: var(--zt-gray-default);--zt-step-process-text-color: var(--zt-text-color);--zt-step-font-size: var(--zt-font-size-md);--zt-step-line-color: var(--zt-gray-a1);--zt-step-finish-line-color: var(--zt-primary-color);--zt-step-finish-text-color: var(--zt-text-color);--zt-step-icon-size: 12px;--zt-step-circle-size: 20px;--zt-step-circle-font-size: 14px;--zt-step-circle-color: var(--zt-gray-6);--zt-step-horizontal-title-font-size: var(--zt-font-size-md)}.zt-step{-webkit-user-select:none;user-select:none;position:relative;flex:1}.zt-step__circle{display:block;width:var(--zt-step-circle-size);height:var(--zt-step-circle-size);line-height:var(--zt-step-circle-size);border-radius:50%;text-align:center;font-size:var(--zt-step-circle-font-size)}.zt-step__line{position:absolute;background-color:var(--zt-step-line-color);transition:background-color var(--zt-duration-base)}.zt-step--horizontal{float:left}.zt-step--horizontal .zt-step__circle-container{position:absolute;top:10px;left:calc(50% - 10px);z-index:1;background-color:var(--zt-
|
|
1
|
+
:root{--zt-step-text-color: var(--zt-text-color-2);--zt-step-active-color: var(--zt-gray-default);--zt-step-process-text-color: var(--zt-text-color);--zt-step-font-size: var(--zt-font-size-md);--zt-step-line-color: var(--zt-gray-a1);--zt-step-finish-line-color: var(--zt-primary-color);--zt-step-finish-text-color: var(--zt-text-color);--zt-step-icon-size: 12px;--zt-step-circle-container-backgroud: var(--zt-background-2);--zt-step-circle-size: 20px;--zt-step-circle-font-size: 14px;--zt-step-circle-color: var(--zt-gray-6);--zt-step-horizontal-title-font-size: var(--zt-font-size-md)}.zt-step{-webkit-user-select:none;user-select:none;position:relative;flex:1}.zt-step__circle{display:block;width:var(--zt-step-circle-size);height:var(--zt-step-circle-size);line-height:var(--zt-step-circle-size);background:var(--zt-gray-a2);border-radius:50%;text-align:center;font-size:var(--zt-step-circle-font-size)}.zt-step__line{position:absolute;background-color:var(--zt-step-line-color);transition:background-color var(--zt-duration-base)}.zt-step--horizontal{float:left}.zt-step--horizontal .zt-step__circle-container{position:absolute;top:10px;left:calc(50% - 10px);z-index:1;background-color:var(--zt-step-circle-container-backgroud);transform:translateY(-50%)}.zt-step--horizontal .zt-step__title{display:inline-block;margin-top:26px;font-size:var(--zt-step-horizontal-title-font-size);color:var(--zt-gray-a6);width:100%;text-align:center}.zt-step--horizontal .zt-step__title--active{color:var(--zt-text-color)}.zt-step--horizontal .zt-step__line{top:10px;left:calc(50% + 14px);width:calc(100% - 28px);height:1px}.zt-step--horizontal .zt-step__icon{display:block;font-size:var(--zt-step-icon-size);left:50%;top:50%;transform:translate(-50%,-50%)}.zt-step--horizontal .zt-step--process{color:var(--zt-step-process-text-color)}.zt-step--vertical{display:block;float:none;padding:10px 16px 10px 8px;line-height:var(--zt-line-height-sm)}.zt-step--vertical .zt-step__title{font-size:var(--zt-step-horizontal-title-font-size);color:var(--zt-gray-a6)}.zt-step--vertical .zt-step__circle-container{position:absolute;top:20px;left:0px;z-index:1;font-size:var(--zt-step-icon-size);line-height:1;transform:translate(-100%,-50%)}.zt-step--vertical .zt-step__line{left:-10px;top:34px;height:calc(100% - 28px);width:1px}.zt-step--vertical .zt-step__icon{display:block;font-size:var(--zt-step-icon-size);left:50%;top:50%;transform:translate(-50%,-50%)}.zt-step:last-child .zt-step__line{width:0}.zt-step__icon,.zt-step__title{transition:color var(--zt-duration-base)}
|
package/lib/step/index.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/lib/stepper/Stepper.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -237,6 +241,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
237
241
|
bem("minus", {
|
|
238
242
|
disabled: minusDisabled.value
|
|
239
243
|
}),
|
|
244
|
+
// { [HAPTICS_FEEDBACK]: !minusDisabled.value },
|
|
240
245
|
{
|
|
241
246
|
[bem("could-click")]: !minusDisabled.value
|
|
242
247
|
}
|
|
@@ -272,6 +277,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
272
277
|
{
|
|
273
278
|
[bem("could-click")]: !plusDisabled.value
|
|
274
279
|
}
|
|
280
|
+
// { [HAPTICS_FEEDBACK]: !plusDisabled.value },
|
|
275
281
|
],
|
|
276
282
|
"aria-disabled": plusDisabled.value || void 0
|
|
277
283
|
}, createListeners("plus")), [(0, import_vue.createVNode)(import_icon.default, {
|
package/lib/stepper/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-stepper-background: rgba(45, 75, 115, .04);--zt-stepper-button-icon-color: var(--zt-text-color);--zt-stepper-button-disabled-color: var(--zt-background);--zt-stepper-button-disabled-icon-color: var(--zt-gray-
|
|
1
|
+
:root{--zt-stepper-background: rgba(45, 75, 115, .04);--zt-stepper-background-image: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%, #ffffff 100%);--zt-stepper-box-border: 0;--zt-stepper-button-icon-color: var(--zt-text-color);--zt-stepper-button-disabled-color: var(--zt-background);--zt-stepper-button-disabled-icon-color: var(--zt-gray-a2);--zt-stepper-button-round-theme-color: var(--zt-primary-color);--zt-stepper-button-box-shadow: -4px -4px 8px 0 #ffffff, 4px 4px 8px 0px rgba(45, 75, 115, .1);--zt-stepper-input-width: 60px;--zt-stepper-input-height: 32px;--zt-stepper-input-font-size: var(--zt-font-size-md);--zt-stepper-input-line-height: 20px;--zt-stepper-input-text-color: var(--zt-text-color);--zt-stepper-input-disabled-text-color: var(--zt-gray-a2);--zt-stepper-input-disabled-background: var(--zt-active-color);--zt-stepper-input-box-shadow: inset 4px 4px 8px -4px rgba(45, 75, 115, .1);--zt-stepper-radius: var(--zt-radius-max)}.zt-stepper{display:inline-block;-webkit-user-select:none;user-select:none}.zt-stepper__could-click:active{box-shadow:inset 4px 4px 8px rgba(45,75,115,.24)}.zt-stepper__minus,.zt-stepper__plus{display:inline-flex;justify-content:center;align-items:center;position:relative;box-sizing:border-box;width:var(--zt-stepper-input-height);height:var(--zt-stepper-input-height);margin:0;padding:0;vertical-align:middle;background:var(--zt-stepper-background);border:var(--zt-stepper-box-border);background-image:var(--zt-stepper-background-image);box-shadow:var(--zt-stepper-button-box-shadow)}.zt-stepper__minus i,.zt-stepper__plus i{transform:scale(.625)}.zt-stepper__minus--disabled,.zt-stepper__plus--disabled{color:var(--zt-stepper-button-disabled-icon-color);background-color:var(--zt-stepper-button-disabled-color);cursor:not-allowed}.zt-stepper__minus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__minus:after{display:none}.zt-stepper__plus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__input{box-sizing:border-box;width:var(--zt-stepper-input-width);height:var(--zt-stepper-input-height);margin:0 12px;padding:4px;color:var(--zt-stepper-input-text-color);font-size:var(--zt-stepper-input-font-size);line-height:var(--zt-stepper-input-line-height);text-align:center;vertical-align:middle;background:var(--zt-stepper-background);border:var(--zt-stepper-box-border);border-radius:var(--zt-radius-gt);box-shadow:var(--zt-stepper-input-box-shadow);-webkit-appearance:none}.zt-stepper__input:disabled{color:var(--zt-stepper-input-disabled-text-color);background:var(--zt-stepper-input-disabled-background);-webkit-text-fill-color:var(--zt-stepper-input-disabled-text-color);opacity:1}.zt-stepper__input:read-only{cursor:default}.zt-stepper--round .zt-stepper__input{background-color:transparent}.zt-stepper--round .zt-stepper__plus,.zt-stepper--round .zt-stepper__minus{border-radius:100%}.zt-stepper--round .zt-stepper__plus--disabled,.zt-stepper--round .zt-stepper__minus--disabled{opacity:.3;cursor:not-allowed}.zt-stepper--round .zt-stepper__plus{color:var(--zt-white);background:var(--zt-stepper-button-round-theme-color)}.zt-stepper--round .zt-stepper__minus{color:var(--zt-stepper-button-round-theme-color);background-color:var(--zt-background-2);border:1px solid var(--zt-stepper-button-round-theme-color)}.zt-theme-dark{--zt-stepper-background: #19232d;--zt-stepper-background-image: linear-gradient(135deg, #0e1824 0%, #203043 100%);--zt-stepper-box-border: 1px solid rgba(255, 255, 255, .12);--zt-stepper-button-box-shadow: -1px -1px 2px 0 rgba(255, 255, 255, .12), 0 0 3px 0 rgba(0, 12, 24, .8);--zt-stepper-input-disabled-background: linear-gradient(147deg, #0e1824 0%, #203043 100%)}
|
package/lib/stepper/index.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/lib/steps/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-steps-background: var(--zt-background-2)}.zt-steps{overflow:hidden;background-color:var(--zt-steps-background);margin:12px;border:0 solid rgba(0,0,0,.1);box-shadow:0 4px 8px rgba(0,0,0,.1);border-radius:8px}.zt-steps--horizontal{padding:8px 0}.zt-steps--horizontal .zt-steps__items{position:relative;display:flex}.zt-steps--vertical{padding:0 0 0 var(--zt-padding-xl)}
|
|
1
|
+
:root{--zt-steps-background: var(--zt-background-2);--zt-steps-vertical-title-color: rgba(0, 0, 0, .4)}.zt-steps{overflow:hidden;background-color:var(--zt-steps-background);margin:12px;border:0 solid rgba(0,0,0,.1);box-shadow:0 4px 8px rgba(0,0,0,.1);border-radius:8px}.zt-steps--horizontal{padding:8px 0}.zt-steps--horizontal .zt-steps__items{position:relative;display:flex}.zt-steps--vertical{padding:0 0 0 var(--zt-padding-xl)}.zt-theme-dark{--zt-steps-vertical-title-color: rgba(255, 255, 255, .4)}
|
package/lib/steps/index.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/lib/sticky/Sticky.js
CHANGED
|
@@ -46,7 +46,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
46
46
|
const state = (0, import_vue2.reactive)({
|
|
47
47
|
fixed: false,
|
|
48
48
|
width: 0,
|
|
49
|
+
// root width
|
|
49
50
|
height: 0,
|
|
51
|
+
// root height
|
|
50
52
|
transform: 0
|
|
51
53
|
});
|
|
52
54
|
const offset = (0, import_vue2.computed)(() => (0, import_utils.unitToPx)(props.position === "top" ? props.offsetTop : props.offsetBottom));
|
package/lib/sticky/index.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/lib/style/base.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-black: #000;--zt-white: #fff;--zt-gray-default: #2d4b73;--zt-gray-1: #f7f8fa;--zt-gray-2: #f2f3f5;--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgba(45, 75, 115, .04);--zt-gray-a08: rgba(45, 75, 115, .08);--zt-gray-a1: rgba(45, 75, 115, .1);--zt-gray-a2: rgba(45, 75, 115, .2);--zt-gray-a4: rgba(45, 75, 115, .4);--zt-gray-a5: rgba(45, 75, 115, .5);--zt-gray-a6: rgba(45, 75, 115, .6);--zt-gray-a8: rgba(45, 75, 115, .8);--zt-red: #ff5a3c;--zt-blue-light: #3caafa;--zt-blue: #0091fa;--zt-orange: #faaf5a;--zt-orange-dark: #ff5a3c;--zt-orange-light: #fffbe8;--zt-green: #00e173;--zt-yellow: #ffcd23;--zt-orange-2: #ff8700;--zt-primary-color: var(--zt-blue);--zt-success-color: var(--zt-green);--zt-danger-color: #ff5a5a;--zt-warning-color: #ffaf00;--zt-text-color: var(--zt-gray-default);--zt-text-color-a2: var(--zt-gray-a2);--zt-text-color-a4: var(--zt-gray-a4);--zt-text-color-a6: var(--zt-gray-a6);--zt-text-color-a8: var(--zt-gray-a8);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-text-color-a2);--zt-link-color: #576b95;--zt-active-color: var(--zt-gray-2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: var(--zt-white);--zt-background-3: var(--zt-white);--zt-background-4: rgba(255, 205, 35, .2);--zt-background-5: #ff4b50;--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-gt: 18px;--zt-line-height-xs: 16px;--zt-line-height-sm: 18px;--zt-line-height-md: 20px;--zt-line-height-lg: 22px;--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-left-color: #ffcdcd;--zt-border-right-color: rgba(220, 0, 4, .8);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}.zt-theme-dark{--zt-text-color: var(--zt-white);--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-border-color: #3a3a3c;--zt-active-color: #3a3a3c;--zt-background: #0f1923;--zt-background-2: #19232d;--zt-background-3: #37363b;--zt-background-card: rgba(255, 205, 205, .04);--zt-gray-default: rgba(255, 255, 255, .4);--zt-gray-a2: rgba(255, 255, 255, .2);--zt-gray-a6: rgba(255, 255, 255, .6);--zt-gray-a8: rgba(255, 255, 255, .8)}html{-webkit-tap-highlight-color:transparent}:root{margin:0;font-family:var(--zt-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=zt-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes zt-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes zt-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes zt-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes zt-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes zt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes zt-fade-out{0%{opacity:1}to{opacity:0}}@keyframes zt-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.zt-fade-enter-active{animation:var(--zt-duration-base) zt-fade-in both var(--zt-ease-out)}.zt-fade-leave-active{animation:var(--zt-duration-base) zt-fade-out both var(--zt-ease-in)}.zt-slide-up-enter-active{animation:zt-slide-up-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-up-leave-active{animation:zt-slide-up-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-down-enter-active{animation:zt-slide-down-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-down-leave-active{animation:zt-slide-down-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-left-enter-active{animation:zt-slide-left-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-left-leave-active{animation:zt-slide-left-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-right-enter-active{animation:zt-slide-right-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-right-leave-active{animation:zt-slide-right-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-clearfix:after{display:table;clear:both;content:""}.zt-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.zt-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.zt-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.zt-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.zt-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.zt-haptics-feedback{cursor:pointer}.zt-haptics-feedback:active{opacity:var(--zt-active-opacity)}[class*=zt-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-hairline,.zt-hairline--top,.zt-hairline--left,.zt-hairline--right,.zt-hairline--bottom,.zt-hairline--surround,.zt-hairline--top-bottom{position:relative}.zt-hairline--top:after{border-top-width:var(--zt-border-width)}.zt-hairline--left:after{border-left-width:var(--zt-border-width)}.zt-hairline--right:after{border-right-width:var(--zt-border-width)}.zt-hairline--bottom:after{border-bottom-width:var(--zt-border-width)}.zt-hairline--top-bottom:after,.zt-hairline-unset--top-bottom:after{border-width:var(--zt-border-width) 0}.zt-hairline--surround:after{border-width:var(--zt-border-width)}
|
|
1
|
+
:root{--zt-black: #000;--zt-white: #fff;--zt-gray-default: #2d4b73;--zt-gray-1: #f7f8fa;--zt-gray-2: #f2f3f5;--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgba(45, 75, 115, .04);--zt-gray-a08: rgba(45, 75, 115, .08);--zt-gray-a1: rgba(45, 75, 115, .1);--zt-gray-a2: rgba(45, 75, 115, .2);--zt-gray-a4: rgba(45, 75, 115, .4);--zt-gray-a5: rgba(45, 75, 115, .5);--zt-gray-a6: rgba(45, 75, 115, .6);--zt-gray-a8: rgba(45, 75, 115, .8);--zt-red: #ff5a3c;--zt-blue-light: #3caafa;--zt-blue: #0091fa;--zt-orange: #faaf5a;--zt-orange-dark: #ff5a3c;--zt-orange-light: #fffbe8;--zt-green: #00e173;--zt-yellow: #ffcd23;--zt-orange-2: #ff8700;--zt-primary-color: var(--zt-blue);--zt-success-color: var(--zt-green);--zt-danger-color: #ff5a5a;--zt-warning-color: #ffaf00;--zt-text-color: var(--zt-gray-default);--zt-text-color-a2: var(--zt-gray-a2);--zt-text-color-a4: var(--zt-gray-a4);--zt-text-color-a6: var(--zt-gray-a6);--zt-text-color-a8: var(--zt-gray-a8);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-text-color-a2);--zt-link-color: #576b95;--zt-active-color: var(--zt-gray-2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: var(--zt-white);--zt-background-3: var(--zt-white);--zt-background-4: rgba(255, 205, 35, .2);--zt-background-5: #ff4b50;--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-gt: 18px;--zt-line-height-xs: 16px;--zt-line-height-sm: 18px;--zt-line-height-md: 20px;--zt-line-height-lg: 22px;--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-left-color: #ffcdcd;--zt-border-right-color: rgba(220, 0, 4, .8);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}.zt-theme-dark{--zt-text-color: var(--zt-white);--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-border-color: #3a3a3c;--zt-active-color: #3a3a3c;--zt-background: #0f1923;--zt-background-2: #19232d;--zt-background-3: #37363b;--zt-background-card: rgba(255, 205, 205, .04);--zt-gray-default: rgba(255, 255, 255, .4);--zt-gray-a1: rgba(255, 255, 255, .1);--zt-gray-a2: rgba(255, 255, 255, .2);--zt-gray-a4: rgba(255, 255, 255, .4);--zt-gray-a6: rgba(255, 255, 255, .6);--zt-gray-a8: rgba(255, 255, 255, .8)}html{-webkit-tap-highlight-color:transparent}:root{margin:0;font-family:var(--zt-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=zt-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes zt-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes zt-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes zt-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes zt-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes zt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes zt-fade-out{0%{opacity:1}to{opacity:0}}@keyframes zt-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.zt-fade-enter-active{animation:var(--zt-duration-base) zt-fade-in both var(--zt-ease-out)}.zt-fade-leave-active{animation:var(--zt-duration-base) zt-fade-out both var(--zt-ease-in)}.zt-slide-up-enter-active{animation:zt-slide-up-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-up-leave-active{animation:zt-slide-up-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-down-enter-active{animation:zt-slide-down-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-down-leave-active{animation:zt-slide-down-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-left-enter-active{animation:zt-slide-left-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-left-leave-active{animation:zt-slide-left-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-right-enter-active{animation:zt-slide-right-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-right-leave-active{animation:zt-slide-right-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-clearfix:after{display:table;clear:both;content:""}.zt-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.zt-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.zt-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.zt-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.zt-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.zt-haptics-feedback{cursor:pointer}.zt-haptics-feedback:active{opacity:var(--zt-active-opacity)}[class*=zt-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-hairline,.zt-hairline--top,.zt-hairline--left,.zt-hairline--right,.zt-hairline--bottom,.zt-hairline--surround,.zt-hairline--top-bottom{position:relative}.zt-hairline--top:after{border-top-width:var(--zt-border-width)}.zt-hairline--left:after{border-left-width:var(--zt-border-width)}.zt-hairline--right:after{border-right-width:var(--zt-border-width)}.zt-hairline--bottom:after{border-bottom-width:var(--zt-border-width)}.zt-hairline--top-bottom:after,.zt-hairline-unset--top-bottom:after{border-width:var(--zt-border-width) 0}.zt-hairline--surround:after{border-width:var(--zt-border-width)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-black: #000;--zt-white: #fff;--zt-gray-default: #2d4b73;--zt-gray-1: #f7f8fa;--zt-gray-2: #f2f3f5;--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgba(45, 75, 115, .04);--zt-gray-a08: rgba(45, 75, 115, .08);--zt-gray-a1: rgba(45, 75, 115, .1);--zt-gray-a2: rgba(45, 75, 115, .2);--zt-gray-a4: rgba(45, 75, 115, .4);--zt-gray-a5: rgba(45, 75, 115, .5);--zt-gray-a6: rgba(45, 75, 115, .6);--zt-gray-a8: rgba(45, 75, 115, .8);--zt-red: #ff5a3c;--zt-blue-light: #3caafa;--zt-blue: #0091fa;--zt-orange: #faaf5a;--zt-orange-dark: #ff5a3c;--zt-orange-light: #fffbe8;--zt-green: #00e173;--zt-yellow: #ffcd23;--zt-orange-2: #ff8700;--zt-primary-color: var(--zt-blue);--zt-success-color: var(--zt-green);--zt-danger-color: #ff5a5a;--zt-warning-color: #ffaf00;--zt-text-color: var(--zt-gray-default);--zt-text-color-a2: var(--zt-gray-a2);--zt-text-color-a4: var(--zt-gray-a4);--zt-text-color-a6: var(--zt-gray-a6);--zt-text-color-a8: var(--zt-gray-a8);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-text-color-a2);--zt-link-color: #576b95;--zt-active-color: var(--zt-gray-2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: var(--zt-white);--zt-background-3: var(--zt-white);--zt-background-4: rgba(255, 205, 35, .2);--zt-background-5: #ff4b50;--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-gt: 18px;--zt-line-height-xs: 16px;--zt-line-height-sm: 18px;--zt-line-height-md: 20px;--zt-line-height-lg: 22px;--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-left-color: #ffcdcd;--zt-border-right-color: rgba(220, 0, 4, .8);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}.zt-theme-dark{--zt-text-color: var(--zt-white);--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-border-color: #3a3a3c;--zt-active-color: #3a3a3c;--zt-background: #0f1923;--zt-background-2: #19232d;--zt-background-3: #37363b;--zt-background-card: rgba(255, 205, 205, .04);--zt-gray-default: rgba(255, 255, 255, .4);--zt-gray-a2: rgba(255, 255, 255, .2);--zt-gray-a6: rgba(255, 255, 255, .6);--zt-gray-a8: rgba(255, 255, 255, .8)}
|
|
1
|
+
:root{--zt-black: #000;--zt-white: #fff;--zt-gray-default: #2d4b73;--zt-gray-1: #f7f8fa;--zt-gray-2: #f2f3f5;--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgba(45, 75, 115, .04);--zt-gray-a08: rgba(45, 75, 115, .08);--zt-gray-a1: rgba(45, 75, 115, .1);--zt-gray-a2: rgba(45, 75, 115, .2);--zt-gray-a4: rgba(45, 75, 115, .4);--zt-gray-a5: rgba(45, 75, 115, .5);--zt-gray-a6: rgba(45, 75, 115, .6);--zt-gray-a8: rgba(45, 75, 115, .8);--zt-red: #ff5a3c;--zt-blue-light: #3caafa;--zt-blue: #0091fa;--zt-orange: #faaf5a;--zt-orange-dark: #ff5a3c;--zt-orange-light: #fffbe8;--zt-green: #00e173;--zt-yellow: #ffcd23;--zt-orange-2: #ff8700;--zt-primary-color: var(--zt-blue);--zt-success-color: var(--zt-green);--zt-danger-color: #ff5a5a;--zt-warning-color: #ffaf00;--zt-text-color: var(--zt-gray-default);--zt-text-color-a2: var(--zt-gray-a2);--zt-text-color-a4: var(--zt-gray-a4);--zt-text-color-a6: var(--zt-gray-a6);--zt-text-color-a8: var(--zt-gray-a8);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-text-color-a2);--zt-link-color: #576b95;--zt-active-color: var(--zt-gray-2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: var(--zt-white);--zt-background-3: var(--zt-white);--zt-background-4: rgba(255, 205, 35, .2);--zt-background-5: #ff4b50;--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-gt: 18px;--zt-line-height-xs: 16px;--zt-line-height-sm: 18px;--zt-line-height-md: 20px;--zt-line-height-lg: 22px;--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-left-color: #ffcdcd;--zt-border-right-color: rgba(220, 0, 4, .8);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}.zt-theme-dark{--zt-text-color: var(--zt-white);--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-border-color: #3a3a3c;--zt-active-color: #3a3a3c;--zt-background: #0f1923;--zt-background-2: #19232d;--zt-background-3: #37363b;--zt-background-card: rgba(255, 205, 205, .04);--zt-gray-default: rgba(255, 255, 255, .4);--zt-gray-a1: rgba(255, 255, 255, .1);--zt-gray-a2: rgba(255, 255, 255, .2);--zt-gray-a4: rgba(255, 255, 255, .4);--zt-gray-a6: rgba(255, 255, 255, .6);--zt-gray-a8: rgba(255, 255, 255, .8)}
|
package/lib/swipe/Swipe.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
73
|
default: true;
|
|
74
74
|
};
|
|
75
75
|
title: ArrayConstructor;
|
|
76
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
76
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "dragStart" | "dragEnd")[], "change" | "dragStart" | "dragEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
77
77
|
loop: {
|
|
78
78
|
type: BooleanConstructor;
|
|
79
79
|
default: true;
|
|
@@ -110,6 +110,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
110
110
|
title: ArrayConstructor;
|
|
111
111
|
}>> & {
|
|
112
112
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
onDragStart?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
onDragEnd?: ((...args: any[]) => any) | undefined;
|
|
113
115
|
}, {
|
|
114
116
|
autoplay: string | number;
|
|
115
117
|
loop: boolean;
|
package/lib/swipe/Swipe.js
CHANGED
|
@@ -48,7 +48,7 @@ const SWIPE_KEY = Symbol(name);
|
|
|
48
48
|
var stdin_default = (0, import_vue2.defineComponent)({
|
|
49
49
|
name,
|
|
50
50
|
props: swipeProps,
|
|
51
|
-
emits: ["change"],
|
|
51
|
+
emits: ["change", "dragStart", "dragEnd"],
|
|
52
52
|
setup(props, {
|
|
53
53
|
emit,
|
|
54
54
|
slots
|
|
@@ -62,6 +62,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
62
62
|
active: 0,
|
|
63
63
|
swiping: false
|
|
64
64
|
});
|
|
65
|
+
let dragging = false;
|
|
65
66
|
const touch = (0, import_use_touch.useTouch)();
|
|
66
67
|
const {
|
|
67
68
|
children,
|
|
@@ -212,6 +213,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
212
213
|
if (count.value) {
|
|
213
214
|
active = Math.min(count.value - 1, active);
|
|
214
215
|
}
|
|
216
|
+
if (active === -1) {
|
|
217
|
+
active = count.value - 1;
|
|
218
|
+
}
|
|
215
219
|
state.active = active;
|
|
216
220
|
state.swiping = true;
|
|
217
221
|
state.offset = getTargetOffset(active);
|
|
@@ -229,9 +233,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
229
233
|
const resize = () => initialize(state.active);
|
|
230
234
|
let touchStartTime;
|
|
231
235
|
const onTouchStart = (event) => {
|
|
232
|
-
if (!props.touchable
|
|
236
|
+
if (!props.touchable || // avoid resetting position on multi-finger touch
|
|
237
|
+
event.touches.length > 1) {
|
|
233
238
|
return;
|
|
239
|
+
}
|
|
234
240
|
touch.start(event);
|
|
241
|
+
dragging = false;
|
|
235
242
|
touchStartTime = Date.now();
|
|
236
243
|
stopAutoplay();
|
|
237
244
|
correctPosition();
|
|
@@ -244,6 +251,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
244
251
|
move({
|
|
245
252
|
offset: delta.value
|
|
246
253
|
});
|
|
254
|
+
if (!dragging) {
|
|
255
|
+
emit("dragStart", {
|
|
256
|
+
index: activeIndicator.value
|
|
257
|
+
});
|
|
258
|
+
dragging = true;
|
|
259
|
+
}
|
|
247
260
|
}
|
|
248
261
|
}
|
|
249
262
|
};
|
|
@@ -271,7 +284,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
271
284
|
pace: 0
|
|
272
285
|
});
|
|
273
286
|
}
|
|
287
|
+
dragging = false;
|
|
274
288
|
state.swiping = false;
|
|
289
|
+
emit("dragEnd", {
|
|
290
|
+
index: activeIndicator.value
|
|
291
|
+
});
|
|
275
292
|
autoplay();
|
|
276
293
|
};
|
|
277
294
|
const swipeTo = (index, options = {}) => {
|
package/lib/swipe/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare const Swipe: import("../utils").WithInstall<import("vue").DefineC
|
|
|
34
34
|
default: true;
|
|
35
35
|
};
|
|
36
36
|
title: ArrayConstructor;
|
|
37
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "dragStart" | "dragEnd")[], "change" | "dragStart" | "dragEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
38
|
loop: {
|
|
39
39
|
type: BooleanConstructor;
|
|
40
40
|
default: true;
|
|
@@ -71,6 +71,8 @@ export declare const Swipe: import("../utils").WithInstall<import("vue").DefineC
|
|
|
71
71
|
title: ArrayConstructor;
|
|
72
72
|
}>> & {
|
|
73
73
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
74
|
+
onDragStart?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
onDragEnd?: ((...args: any[]) => any) | undefined;
|
|
74
76
|
}, {
|
|
75
77
|
autoplay: string | number;
|
|
76
78
|
loop: boolean;
|
package/lib/swipe/index.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type PropType, type ExtractPropTypes } from 'vue';
|
|
2
|
+
import { Interceptor } from '../utils';
|
|
3
|
+
export declare const swipeCellProps: {
|
|
4
|
+
name: {
|
|
5
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
disabled: BooleanConstructor;
|
|
9
|
+
leftWidth: (NumberConstructor | StringConstructor)[];
|
|
10
|
+
rightWidth: (NumberConstructor | StringConstructor)[];
|
|
11
|
+
beforeClose: PropType<Interceptor>;
|
|
12
|
+
stopPropagation: BooleanConstructor;
|
|
13
|
+
};
|
|
14
|
+
export declare type SwipeCellProps = ExtractPropTypes<typeof swipeCellProps>;
|
|
15
|
+
declare const _default: import("vue").DefineComponent<{
|
|
16
|
+
name: {
|
|
17
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
disabled: BooleanConstructor;
|
|
21
|
+
leftWidth: (NumberConstructor | StringConstructor)[];
|
|
22
|
+
rightWidth: (NumberConstructor | StringConstructor)[];
|
|
23
|
+
beforeClose: PropType<Interceptor>;
|
|
24
|
+
stopPropagation: BooleanConstructor;
|
|
25
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "close" | "open")[], "open" | "click" | "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
26
|
+
name: {
|
|
27
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
disabled: BooleanConstructor;
|
|
31
|
+
leftWidth: (NumberConstructor | StringConstructor)[];
|
|
32
|
+
rightWidth: (NumberConstructor | StringConstructor)[];
|
|
33
|
+
beforeClose: PropType<Interceptor>;
|
|
34
|
+
stopPropagation: BooleanConstructor;
|
|
35
|
+
}>> & {
|
|
36
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
name: string | number;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
stopPropagation: boolean;
|
|
43
|
+
}>;
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name2 in all)
|
|
7
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
default: () => stdin_default,
|
|
21
|
+
swipeCellProps: () => swipeCellProps
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
24
|
+
var import_vue = require("vue");
|
|
25
|
+
var import_vue2 = require("vue");
|
|
26
|
+
var import_utils = require("../utils");
|
|
27
|
+
var import_use = require("@zartui/use");
|
|
28
|
+
var import_use_touch = require("../composables/use-touch");
|
|
29
|
+
var import_use_expose = require("../composables/use-expose");
|
|
30
|
+
const [name, bem] = (0, import_utils.createNamespace)("swipe-cell");
|
|
31
|
+
const swipeCellProps = {
|
|
32
|
+
name: (0, import_utils.makeNumericProp)(""),
|
|
33
|
+
disabled: Boolean,
|
|
34
|
+
leftWidth: import_utils.numericProp,
|
|
35
|
+
rightWidth: import_utils.numericProp,
|
|
36
|
+
beforeClose: Function,
|
|
37
|
+
stopPropagation: Boolean
|
|
38
|
+
};
|
|
39
|
+
var stdin_default = (0, import_vue2.defineComponent)({
|
|
40
|
+
name,
|
|
41
|
+
props: swipeCellProps,
|
|
42
|
+
emits: ["open", "close", "click"],
|
|
43
|
+
setup(props, {
|
|
44
|
+
emit,
|
|
45
|
+
slots
|
|
46
|
+
}) {
|
|
47
|
+
let opened;
|
|
48
|
+
let lockClick;
|
|
49
|
+
let startOffset;
|
|
50
|
+
const root = (0, import_vue2.ref)();
|
|
51
|
+
const leftRef = (0, import_vue2.ref)();
|
|
52
|
+
const rightRef = (0, import_vue2.ref)();
|
|
53
|
+
const state = (0, import_vue2.reactive)({
|
|
54
|
+
offset: 0,
|
|
55
|
+
dragging: false
|
|
56
|
+
});
|
|
57
|
+
const touch = (0, import_use_touch.useTouch)();
|
|
58
|
+
const getWidthByRef = (ref2) => ref2.value ? (0, import_use.useRect)(ref2).width : 0;
|
|
59
|
+
const leftWidth = (0, import_vue2.computed)(() => (0, import_utils.isDef)(props.leftWidth) ? +props.leftWidth : getWidthByRef(leftRef));
|
|
60
|
+
const rightWidth = (0, import_vue2.computed)(() => (0, import_utils.isDef)(props.rightWidth) ? +props.rightWidth : getWidthByRef(rightRef));
|
|
61
|
+
const open = (side) => {
|
|
62
|
+
state.offset = side === "left" ? leftWidth.value : -rightWidth.value;
|
|
63
|
+
if (!opened) {
|
|
64
|
+
opened = true;
|
|
65
|
+
emit("open", {
|
|
66
|
+
name: props.name,
|
|
67
|
+
position: side
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const close = (position) => {
|
|
72
|
+
state.offset = 0;
|
|
73
|
+
if (opened) {
|
|
74
|
+
opened = false;
|
|
75
|
+
emit("close", {
|
|
76
|
+
name: props.name,
|
|
77
|
+
position
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const toggle = (side) => {
|
|
82
|
+
const offset = Math.abs(state.offset);
|
|
83
|
+
const THRESHOLD = 0.15;
|
|
84
|
+
const threshold = opened ? 1 - THRESHOLD : THRESHOLD;
|
|
85
|
+
const width = side === "left" ? leftWidth.value : rightWidth.value;
|
|
86
|
+
if (width && offset > width * threshold) {
|
|
87
|
+
open(side);
|
|
88
|
+
} else {
|
|
89
|
+
close(side);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const onTouchStart = (event) => {
|
|
93
|
+
if (!props.disabled) {
|
|
94
|
+
startOffset = state.offset;
|
|
95
|
+
touch.start(event);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const onTouchMove = (event) => {
|
|
99
|
+
if (props.disabled) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const {
|
|
103
|
+
deltaX
|
|
104
|
+
} = touch;
|
|
105
|
+
touch.move(event);
|
|
106
|
+
if (touch.isHorizontal()) {
|
|
107
|
+
lockClick = true;
|
|
108
|
+
state.dragging = true;
|
|
109
|
+
const isEdge = !opened || deltaX.value * startOffset < 0;
|
|
110
|
+
if (isEdge) {
|
|
111
|
+
(0, import_utils.preventDefault)(event, props.stopPropagation);
|
|
112
|
+
}
|
|
113
|
+
state.offset = (0, import_utils.clamp)(deltaX.value + startOffset, -rightWidth.value, leftWidth.value);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
const onTouchEnd = () => {
|
|
117
|
+
if (state.dragging) {
|
|
118
|
+
state.dragging = false;
|
|
119
|
+
toggle(state.offset > 0 ? "left" : "right");
|
|
120
|
+
setTimeout(() => {
|
|
121
|
+
lockClick = false;
|
|
122
|
+
}, 0);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const onClick = (position = "outside") => {
|
|
126
|
+
emit("click", position);
|
|
127
|
+
if (opened && !lockClick) {
|
|
128
|
+
(0, import_utils.callInterceptor)(props.beforeClose, {
|
|
129
|
+
args: [{
|
|
130
|
+
name: props.name,
|
|
131
|
+
position
|
|
132
|
+
}],
|
|
133
|
+
done: () => close(position)
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const getClickHandler = (position, stop) => (event) => {
|
|
138
|
+
if (stop) {
|
|
139
|
+
event.stopPropagation();
|
|
140
|
+
}
|
|
141
|
+
onClick(position);
|
|
142
|
+
};
|
|
143
|
+
const renderSideContent = (side, ref2) => {
|
|
144
|
+
const contentSlot = slots[side];
|
|
145
|
+
if (contentSlot) {
|
|
146
|
+
return (0, import_vue.createVNode)("div", {
|
|
147
|
+
"ref": ref2,
|
|
148
|
+
"class": bem(side),
|
|
149
|
+
"onClick": getClickHandler(side, true)
|
|
150
|
+
}, [contentSlot()]);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
(0, import_use_expose.useExpose)({
|
|
154
|
+
open,
|
|
155
|
+
close
|
|
156
|
+
});
|
|
157
|
+
(0, import_use.useClickAway)(root, () => onClick("outside"), {
|
|
158
|
+
eventName: "touchstart"
|
|
159
|
+
});
|
|
160
|
+
(0, import_use.useEventListener)("touchmove", onTouchMove, {
|
|
161
|
+
target: root
|
|
162
|
+
});
|
|
163
|
+
return () => {
|
|
164
|
+
var _a;
|
|
165
|
+
const wrapperStyle = {
|
|
166
|
+
transform: `translate3d(${state.offset}px, 0, 0)`,
|
|
167
|
+
transitionDuration: state.dragging ? "0s" : ".6s"
|
|
168
|
+
};
|
|
169
|
+
return (0, import_vue.createVNode)("div", {
|
|
170
|
+
"ref": root,
|
|
171
|
+
"class": bem(),
|
|
172
|
+
"onClick": getClickHandler("cell", lockClick),
|
|
173
|
+
"onTouchstartPassive": onTouchStart,
|
|
174
|
+
"onTouchend": onTouchEnd,
|
|
175
|
+
"onTouchcancel": onTouchEnd
|
|
176
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
177
|
+
"class": bem("wrapper"),
|
|
178
|
+
"style": wrapperStyle
|
|
179
|
+
}, [renderSideContent("left", leftRef), (_a = slots.default) == null ? void 0 : _a.call(slots), renderSideContent("right", rightRef)])]);
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zt-swipe-cell{position:relative;overflow:hidden;cursor:-webkit-grab;cursor:grab}.zt-swipe-cell__wrapper{transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-property:transform}.zt-swipe-cell__left,.zt-swipe-cell__right{position:absolute;top:0;height:100%}.zt-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.zt-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { SwipeCellProps } from './SwipeCell';
|
|
2
|
+
export declare const SwipeCell: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
3
|
+
name: {
|
|
4
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
disabled: BooleanConstructor;
|
|
8
|
+
leftWidth: (NumberConstructor | StringConstructor)[];
|
|
9
|
+
rightWidth: (NumberConstructor | StringConstructor)[];
|
|
10
|
+
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
|
11
|
+
stopPropagation: BooleanConstructor;
|
|
12
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "close" | "open")[], "open" | "click" | "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
name: {
|
|
14
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
disabled: BooleanConstructor;
|
|
18
|
+
leftWidth: (NumberConstructor | StringConstructor)[];
|
|
19
|
+
rightWidth: (NumberConstructor | StringConstructor)[];
|
|
20
|
+
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
|
21
|
+
stopPropagation: BooleanConstructor;
|
|
22
|
+
}>> & {
|
|
23
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
name: string | number;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
stopPropagation: boolean;
|
|
30
|
+
}>>;
|
|
31
|
+
export default SwipeCell;
|
|
32
|
+
export { swipeCellProps } from './SwipeCell';
|
|
33
|
+
export type { SwipeCellProps };
|
|
34
|
+
export type { SwipeCellSide, SwipeCellPosition, SwipeCellInstance, } from './types';
|
|
35
|
+
declare module 'vue' {
|
|
36
|
+
interface GlobalComponents {
|
|
37
|
+
VanSwipeCell: typeof SwipeCell;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var stdin_exports = {};
|
|
29
|
+
__export(stdin_exports, {
|
|
30
|
+
SwipeCell: () => SwipeCell,
|
|
31
|
+
default: () => stdin_default,
|
|
32
|
+
swipeCellProps: () => import_SwipeCell2.swipeCellProps
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
35
|
+
var import_utils = require("../utils");
|
|
36
|
+
var import_SwipeCell = __toESM(require("./SwipeCell"));
|
|
37
|
+
var import_SwipeCell2 = require("./SwipeCell");
|
|
38
|
+
const SwipeCell = (0, import_utils.withInstall)(import_SwipeCell.default);
|
|
39
|
+
var stdin_default = SwipeCell;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
2
|
+
import type { SwipeCellProps } from './SwipeCell';
|
|
3
|
+
export declare type SwipeCellSide = 'left' | 'right';
|
|
4
|
+
export declare type SwipeCellPosition = SwipeCellSide | 'cell' | 'outside';
|
|
5
|
+
export declare type SwipeCellExpose = {
|
|
6
|
+
open: (side: SwipeCellSide) => void;
|
|
7
|
+
close: (position: SwipeCellPosition) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare type SwipeCellInstance = ComponentPublicInstance<SwipeCellProps, SwipeCellExpose>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var stdin_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(stdin_exports);
|
package/lib/swipe-item/index.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|