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
|
@@ -0,0 +1,191 @@
|
|
|
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 name2 in all)
|
|
9
|
+
__defProp(target, name2, { get: all[name2], 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
|
+
default: () => stdin_default,
|
|
31
|
+
timelineProps: () => timelineProps
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
34
|
+
var import_vue = require("vue");
|
|
35
|
+
var import_vue2 = require("vue");
|
|
36
|
+
var import_switch = __toESM(require("../switch"));
|
|
37
|
+
var import_utils = require("../utils");
|
|
38
|
+
const [name, bem] = (0, import_utils.createNamespace)("timeline");
|
|
39
|
+
const timelineProps = {
|
|
40
|
+
title: (0, import_utils.makeStringProp)("\u529E\u7406\u7ECF\u8FC7"),
|
|
41
|
+
// 默认折叠显示
|
|
42
|
+
defaultFold: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
// 折叠时显示几条数据
|
|
47
|
+
collapseCount: (0, import_utils.makeNumberProp)(0),
|
|
48
|
+
processes: (0, import_utils.makeArrayProp)([]),
|
|
49
|
+
opinionKey: (0, import_utils.makeStringProp)("\u5904\u7406\u610F\u89C1"),
|
|
50
|
+
enableSingleFold: import_utils.truthProp,
|
|
51
|
+
dot: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var stdin_default = (0, import_vue2.defineComponent)({
|
|
57
|
+
name,
|
|
58
|
+
props: timelineProps,
|
|
59
|
+
setup(props, {
|
|
60
|
+
slots
|
|
61
|
+
}) {
|
|
62
|
+
const isFold = (0, import_vue2.ref)(props.defaultFold);
|
|
63
|
+
const genTopBar = () => {
|
|
64
|
+
if (slots["top-bar"]) {
|
|
65
|
+
return (0, import_vue.createVNode)("div", {
|
|
66
|
+
"class": [bem("top-bar"), import_utils.BORDER_BOTTOM]
|
|
67
|
+
}, [slots["top-bar"]()]);
|
|
68
|
+
} else {
|
|
69
|
+
return (0, import_vue.createVNode)("div", {
|
|
70
|
+
"class": [bem("top-bar"), import_utils.BORDER_BOTTOM]
|
|
71
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
72
|
+
"class": bem("top-left")
|
|
73
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
74
|
+
"class": bem("bar")
|
|
75
|
+
}, null), (0, import_vue.createVNode)("div", {
|
|
76
|
+
"class": bem("title")
|
|
77
|
+
}, [props.title])]), (0, import_vue.createVNode)("div", {
|
|
78
|
+
"class": bem("top-right")
|
|
79
|
+
}, [(0, import_vue.createVNode)("span", {
|
|
80
|
+
"class": bem("fold-text")
|
|
81
|
+
}, [(0, import_vue.createTextVNode)("\u6298\u53E0"), props.title]), (0, import_vue.createVNode)(import_switch.default, {
|
|
82
|
+
"modelValue": isFold.value,
|
|
83
|
+
"onUpdate:modelValue": ($event) => isFold.value = $event
|
|
84
|
+
}, null)])]);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const genAvatar = (item) => {
|
|
88
|
+
if (slots.avatar) {
|
|
89
|
+
return (0, import_vue.createVNode)("div", {
|
|
90
|
+
"class": bem("avatar-box")
|
|
91
|
+
}, [slots.avatar(item)]);
|
|
92
|
+
}
|
|
93
|
+
if (props.dot) {
|
|
94
|
+
return (0, import_vue.createVNode)("div", {
|
|
95
|
+
"class": bem("dot")
|
|
96
|
+
}, null);
|
|
97
|
+
}
|
|
98
|
+
return (0, import_vue.createVNode)("div", {
|
|
99
|
+
"class": bem("avatar-box")
|
|
100
|
+
}, [item.avatar ? (0, import_vue.createVNode)("img", {
|
|
101
|
+
"class": bem("avatar"),
|
|
102
|
+
"src": item.avatar,
|
|
103
|
+
"alt": ""
|
|
104
|
+
}, null) : (0, import_vue.createVNode)("div", {
|
|
105
|
+
"class": bem("avatar")
|
|
106
|
+
}, [item.human.slice(-2)])]);
|
|
107
|
+
};
|
|
108
|
+
const genTitle = (item) => {
|
|
109
|
+
if (slots.title) {
|
|
110
|
+
return (0, import_vue.createVNode)("div", {
|
|
111
|
+
"class": bem("title-box")
|
|
112
|
+
}, [slots.title(item)]);
|
|
113
|
+
}
|
|
114
|
+
return (0, import_vue.createVNode)("div", {
|
|
115
|
+
"class": bem("title-box")
|
|
116
|
+
}, [(0, import_vue.createVNode)("span", {
|
|
117
|
+
"class": bem("title")
|
|
118
|
+
}, [`${item.department}[${item.human}]`]), (0, import_vue.createVNode)("span", {
|
|
119
|
+
"class": bem("time")
|
|
120
|
+
}, [item.timestamp])]);
|
|
121
|
+
};
|
|
122
|
+
const genOpinion = (item) => {
|
|
123
|
+
if (slots.opinion) {
|
|
124
|
+
return (0, import_vue.createVNode)("div", {
|
|
125
|
+
"class": bem("opinion-box")
|
|
126
|
+
}, [slots.opinion(item)]);
|
|
127
|
+
}
|
|
128
|
+
return (0, import_vue.createVNode)("div", {
|
|
129
|
+
"class": bem("opinion-box")
|
|
130
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
131
|
+
"class": bem("opinion-label")
|
|
132
|
+
}, [props.opinionKey]), (0, import_vue.createVNode)("div", {
|
|
133
|
+
"class": bem("opinion")
|
|
134
|
+
}, [item.opinion || "\u65E0"])]);
|
|
135
|
+
};
|
|
136
|
+
const genContent = (item) => {
|
|
137
|
+
if (slots.content) {
|
|
138
|
+
return (0, import_vue.createVNode)("div", {
|
|
139
|
+
"class": [bem("content-box"), import_utils.BORDER_BOTTOM]
|
|
140
|
+
}, [slots.content(item)]);
|
|
141
|
+
}
|
|
142
|
+
return (0, import_vue.createVNode)("div", {
|
|
143
|
+
"class": [bem("content-box"), import_utils.BORDER_BOTTOM]
|
|
144
|
+
}, [(0, import_vue.createTextVNode)("\u5728"), (0, import_vue.createVNode)("span", null, [item.stage]), (0, import_vue.createTextVNode)("\u9636\u6BB5"), (0, import_vue.createVNode)("span", {
|
|
145
|
+
"class": bem("text-bold")
|
|
146
|
+
}, [(0, import_vue.createTextVNode)(" "), item.action, (0, import_vue.createTextVNode)(" ")]), (0, import_vue.createTextVNode)("\u5230"), (0, import_vue.createVNode)("span", null, [item.nextAction]), (0, import_vue.createVNode)("span", null, [item.nextDepartment]), (0, import_vue.createVNode)("span", {
|
|
147
|
+
"class": bem("text-bold")
|
|
148
|
+
}, [(0, import_vue.createTextVNode)(" ["), item.nextHuman, (0, import_vue.createTextVNode)("]")])]);
|
|
149
|
+
};
|
|
150
|
+
const genProcessItem = (item, isLast) => {
|
|
151
|
+
function itemClicked() {
|
|
152
|
+
if (!props.enableSingleFold) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
item.folded = !item.folded;
|
|
156
|
+
}
|
|
157
|
+
return (0, import_vue.createVNode)("div", {
|
|
158
|
+
"class": bem("item") + ` ${isLast ? "last-item" : ""}`,
|
|
159
|
+
"onClick": itemClicked
|
|
160
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
161
|
+
"class": [bem("left-container"), props.dot ? bem("dot-container") : ""]
|
|
162
|
+
}, [genAvatar(item), (0, import_vue.createVNode)("div", {
|
|
163
|
+
"class": bem(props.dot ? "line-dot" : "line")
|
|
164
|
+
}, null)]), (0, import_vue.createVNode)("div", {
|
|
165
|
+
"class": bem("right-container")
|
|
166
|
+
}, [genTitle(item), !item.folded && (0, import_vue.createVNode)("div", {
|
|
167
|
+
"class": bem("main-container")
|
|
168
|
+
}, [genContent(item), genOpinion(item)])])]);
|
|
169
|
+
};
|
|
170
|
+
const computedProcesses = (0, import_vue2.computed)(() => {
|
|
171
|
+
const wrapper = props.processes.map((v) => {
|
|
172
|
+
v.folded = false;
|
|
173
|
+
return v;
|
|
174
|
+
});
|
|
175
|
+
if (isFold.value) {
|
|
176
|
+
const showProcesses = wrapper.slice(0, props.collapseCount);
|
|
177
|
+
return showProcesses.map((item, index) => genProcessItem(item, index === showProcesses.length - 1));
|
|
178
|
+
} else {
|
|
179
|
+
return wrapper.map((item, index) => genProcessItem(item, index === wrapper.length - 1));
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
return () => {
|
|
183
|
+
var _a;
|
|
184
|
+
return (0, import_vue.createVNode)("div", {
|
|
185
|
+
"class": bem()
|
|
186
|
+
}, [genTopBar(), ((_a = computedProcesses.value) == null ? void 0 : _a.length) > 0 && (0, import_vue.createVNode)("div", {
|
|
187
|
+
"class": bem("container")
|
|
188
|
+
}, [computedProcesses.value])]);
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--zt-timeline-title-color: var(--zt-gray-default);--zt-timeline-sub-title-color: var(--zt-gray-a6);--zt-timeline-content-color: var(--zt-gray-default);--zt-timeline-background: var(--zt-white);--zt-timeline-bar-background: var(--zt-primary-color);--zt-timeline-time-color: var(--zt-gray-a8)}.zt-timeline{background-color:var(--zt-timeline-background)}.zt-timeline__top-bar{height:44px;display:flex;justify-content:space-between;align-items:center}.zt-timeline__top-left{display:flex;align-items:center}.zt-timeline__bar{width:4px;height:16px;background:var(--zt-timeline-bar-background);margin-right:12px}.zt-timeline__title{font-size:16px;font-weight:700;color:var(--zt-timeline-title-color);line-height:24px}.zt-timeline__top-right{padding-right:16px;display:flex;align-items:center}.zt-timeline__top-right .zt-switch--on{background:var(--zt-timeline-bar-background)}.zt-timeline__fold-text{font-size:16px;color:var(--zt-gray-a6);line-height:24px;margin-right:8px}.zt-timeline__container{padding-top:16px}.zt-timeline__item{padding:0 16px 16px;display:flex}.zt-timeline__item.last-item .zt-timeline__line-dot,.zt-timeline__item.last-item .zt-timeline__line{height:0}.zt-timeline__item.last-item .zt-timeline__dot{border-color:var(--zt-timeline-bar-background)}.zt-timeline__left-container{margin-right:8px;display:flex;flex-direction:column;align-items:center;position:relative}.zt-timeline__right-container{flex:1}.zt-timeline__dot-container{top:5px}.zt-timeline__dot{width:12px;height:12px;background-color:#fff;border:1px solid rgba(45,75,115,.2);border-radius:50%;z-index:2}.zt-timeline__avatar-box{width:40px;height:40px;z-index:2}.zt-timeline__avatar{width:40px;height:40px;background:#0091fa;border-radius:4px;font-size:14px;font-weight:700;text-align:center;color:#fff;line-height:40px}.zt-timeline__line{background-color:#f5f5f5;width:2px;height:100%;margin-top:4px;margin-bottom:-12px}.zt-timeline__line-dot{position:absolute;background-color:#f5f5f5;width:2px;height:calc(100% + 16px)}.zt-timeline__title-box{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.zt-timeline__time{font-size:12px;color:var(--zt-timeline-time-color);line-height:16px}.zt-timeline__content-box{font-size:14px;color:var(--zt-timeline-content-color);line-height:20px;padding-bottom:8px}.zt-timeline__main-container{background:rgba(0,0,0,.02);border-radius:4px;padding:8px 12px}.zt-timeline__main-container:before{border-radius:4px}.zt-timeline__main-container .zt-timeline__text-bold{font-weight:700}.zt-timeline__opinion-box{padding-top:7px}.zt-timeline__opinion-label{margin-bottom:4px;font-size:14px;color:var(--zt-timeline-sub-title-color);line-height:20px}.zt-timeline__opinion{font-size:14px;color:var(--zt-timeline-content-color);line-height:20px;word-break:break-all}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const Timeline: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
title: {
|
|
3
|
+
type: import("vue").PropType<string>;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
defaultFold: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
collapseCount: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
processes: {
|
|
15
|
+
type: import("vue").PropType<import("./Timeline").TimelineProcessOption[]>;
|
|
16
|
+
default: () => import("./Timeline").TimelineProcessOption[];
|
|
17
|
+
};
|
|
18
|
+
opinionKey: {
|
|
19
|
+
type: import("vue").PropType<string>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
enableSingleFold: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: true;
|
|
25
|
+
};
|
|
26
|
+
dot: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
title: {
|
|
32
|
+
type: import("vue").PropType<string>;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
defaultFold: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
collapseCount: {
|
|
40
|
+
type: NumberConstructor;
|
|
41
|
+
default: number;
|
|
42
|
+
};
|
|
43
|
+
processes: {
|
|
44
|
+
type: import("vue").PropType<import("./Timeline").TimelineProcessOption[]>;
|
|
45
|
+
default: () => import("./Timeline").TimelineProcessOption[];
|
|
46
|
+
};
|
|
47
|
+
opinionKey: {
|
|
48
|
+
type: import("vue").PropType<string>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
enableSingleFold: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: true;
|
|
54
|
+
};
|
|
55
|
+
dot: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
}>>, {
|
|
60
|
+
title: string;
|
|
61
|
+
dot: boolean;
|
|
62
|
+
defaultFold: boolean;
|
|
63
|
+
collapseCount: number;
|
|
64
|
+
processes: import("./Timeline").TimelineProcessOption[];
|
|
65
|
+
opinionKey: string;
|
|
66
|
+
enableSingleFold: boolean;
|
|
67
|
+
}>>;
|
|
68
|
+
export default Timeline;
|
|
69
|
+
export { timelineProps } from './Timeline';
|
|
70
|
+
export type { TimelineProcessOption, TimelineProps } from './Timeline';
|
|
71
|
+
declare module 'vue' {
|
|
72
|
+
interface GlobalComponents {
|
|
73
|
+
ZtTimeline: typeof Timeline;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -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
|
+
Timeline: () => Timeline,
|
|
31
|
+
default: () => stdin_default,
|
|
32
|
+
timelineProps: () => import_Timeline2.timelineProps
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
35
|
+
var import_utils = require("../utils");
|
|
36
|
+
var import_Timeline = __toESM(require("./Timeline"));
|
|
37
|
+
var import_Timeline2 = require("./Timeline");
|
|
38
|
+
const Timeline = (0, import_utils.withInstall)(import_Timeline.default);
|
|
39
|
+
var stdin_default = Timeline;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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/toast/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
|
));
|
|
@@ -195,8 +195,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
195
195
|
onClickPreview?: ((...args: any[]) => any) | undefined;
|
|
196
196
|
}, {
|
|
197
197
|
name: string | number;
|
|
198
|
-
accept: string;
|
|
199
198
|
disabled: boolean;
|
|
199
|
+
accept: string;
|
|
200
200
|
modelValue: UploaderFileListItem[];
|
|
201
201
|
readonly: boolean;
|
|
202
202
|
multiple: boolean;
|
package/lib/uploader/Uploader.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/uploader/index.d.ts
CHANGED
|
@@ -128,8 +128,8 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
|
|
|
128
128
|
onClickPreview?: ((...args: any[]) => any) | undefined;
|
|
129
129
|
}, {
|
|
130
130
|
name: string | number;
|
|
131
|
-
accept: string;
|
|
132
131
|
disabled: boolean;
|
|
132
|
+
accept: string;
|
|
133
133
|
modelValue: import("./types").UploaderFileListItem[];
|
|
134
134
|
readonly: boolean;
|
|
135
135
|
multiple: boolean;
|
package/lib/uploader/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/uploader/utils.js
CHANGED
|
@@ -69,7 +69,7 @@ function filterFiles(items, maxSize) {
|
|
|
69
69
|
});
|
|
70
70
|
return { valid, invalid };
|
|
71
71
|
}
|
|
72
|
-
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
|
|
72
|
+
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;
|
|
73
73
|
const isImageUrl = (url) => IMAGE_REGEXP.test(url);
|
|
74
74
|
function isImageFile(item) {
|
|
75
75
|
if (item.isImage) {
|
package/lib/utils/create.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/utils/dom.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export declare function resetScroll(): void;
|
|
|
9
9
|
export declare const stopPropagation: (event: Event) => void;
|
|
10
10
|
export declare function preventDefault(event: Event, isStopPropagation?: boolean): void;
|
|
11
11
|
export declare function isHidden(elementRef: HTMLElement | Ref<HTMLElement | undefined>): boolean;
|
|
12
|
+
export declare function colorFromCSSClass(className: string, defaultColor: string): string;
|
|
12
13
|
export declare const windowWidth: Ref<number>, windowHeight: Ref<number>;
|
package/lib/utils/dom.js
CHANGED
|
@@ -17,6 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var stdin_exports = {};
|
|
19
19
|
__export(stdin_exports, {
|
|
20
|
+
colorFromCSSClass: () => colorFromCSSClass,
|
|
20
21
|
getElementTop: () => getElementTop,
|
|
21
22
|
getRootScrollTop: () => getRootScrollTop,
|
|
22
23
|
getScrollTop: () => getScrollTop,
|
|
@@ -83,4 +84,14 @@ function isHidden(elementRef) {
|
|
|
83
84
|
const parentHidden = el.offsetParent === null && style.position !== "fixed";
|
|
84
85
|
return hidden || parentHidden;
|
|
85
86
|
}
|
|
87
|
+
function colorFromCSSClass(className, defaultColor) {
|
|
88
|
+
var _a;
|
|
89
|
+
const tmp = document.createElement("div");
|
|
90
|
+
tmp.style.cssText = "position:fixed;left:-100px;top:-100px;width:1px;height:1px";
|
|
91
|
+
tmp.className = className;
|
|
92
|
+
document.body.appendChild(tmp);
|
|
93
|
+
const classColor = (_a = getComputedStyle(tmp)) == null ? void 0 : _a.getPropertyValue("color");
|
|
94
|
+
document.body.removeChild(tmp);
|
|
95
|
+
return !classColor ? defaultColor : classColor;
|
|
96
|
+
}
|
|
86
97
|
const { width: windowWidth, height: windowHeight } = (0, import_use.useWindowSize)();
|