litos-ui 0.20.1 → 0.22.0
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/README.md +119 -15
- package/README.zh-CN.md +153 -0
- package/lib/base.d.ts +1 -0
- package/lib/base.js +1 -1
- package/lib/button/index.js +4 -4
- package/lib/{style-gKR_qwzm.js → button/index.less_inline.js} +2 -3
- package/lib/button/style.js +6 -2
- package/lib/calendar/index.js +140 -2
- package/lib/calendar/index.less_inline.js +4 -0
- package/lib/calendar/langs.js +12 -0
- package/lib/card/index.js +64 -2
- package/lib/card/index.less_inline.js +4 -0
- package/lib/carousel/index.js +257 -2
- package/lib/carousel/index.less_inline.js +4 -0
- package/lib/carousel/item.js +15 -2
- package/lib/carousel/item.less_inline.js +4 -0
- package/lib/carousel/timer.js +19 -0
- package/lib/check/check.d.ts +1 -0
- package/lib/check/check.js +117 -0
- package/lib/check/check.less_inline.js +4 -0
- package/lib/check/checkbox.js +18 -2
- package/lib/{checkbox-DhGHJXwI.js → check/checkbox.less_inline.js} +2 -14
- package/lib/check/checkbox_group.js +1 -1
- package/lib/check/index.d.ts +1 -0
- package/lib/{check-DFlwStH9.js → check/index.js} +10 -9
- package/lib/check/index.less_inline.js +4 -0
- package/lib/check/radio.js +15 -2
- package/lib/{radio-C9NPQWGI.js → check/radio.less_inline.js} +2 -11
- package/lib/check/radio_group.js +1 -1
- package/lib/collapse/index.js +103 -2
- package/lib/collapse/index.less_inline.js +4 -0
- package/lib/collapse/item.d.ts +1 -0
- package/lib/collapse/item.js +118 -2
- package/lib/collapse/item.less_inline.js +4 -0
- package/lib/collapse/types.d.ts +1 -0
- package/lib/color_picker/index.js +42 -2
- package/lib/color_picker/index.less_inline.js +4 -0
- package/lib/date_picker/index.js +100 -3
- package/lib/date_picker/index.less_inline.js +4 -0
- package/lib/date_picker_ori/index.js +121 -2
- package/lib/date_picker_ori/index.less_inline.js +4 -0
- package/lib/description_panel/index.js +54 -2
- package/lib/description_panel/index.less_inline.js +4 -0
- package/lib/dialog/dialog_box.js +11 -11
- package/lib/dialog/dialog_container.css_inline.js +4 -0
- package/lib/dialog/dialog_container.d.ts +1 -1
- package/lib/dialog/dialog_container.js +156 -2
- package/lib/dialog/dialog_container_style.d.ts +2 -0
- package/lib/dialog/dialog_container_style.js +6 -0
- package/lib/dialog/index.js +1 -1
- package/lib/entries/base.d.ts +2 -0
- package/lib/entries/base.js +2 -0
- package/lib/entries/button.d.ts +2 -0
- package/lib/entries/button.js +6 -0
- package/lib/entries/calendar.d.ts +2 -0
- package/lib/entries/calendar.js +6 -0
- package/lib/entries/card.d.ts +2 -0
- package/lib/entries/card.js +6 -0
- package/lib/entries/carousel-item.d.ts +2 -0
- package/lib/entries/carousel-item.js +6 -0
- package/lib/entries/carousel.d.ts +5 -0
- package/lib/entries/carousel.js +6 -0
- package/lib/entries/checkbox-group.d.ts +3 -0
- package/lib/entries/checkbox-group.js +6 -0
- package/lib/entries/checkbox.d.ts +2 -0
- package/lib/entries/checkbox.js +6 -0
- package/lib/entries/collapse-item.d.ts +3 -0
- package/lib/entries/collapse-item.js +6 -0
- package/lib/entries/collapse.d.ts +3 -0
- package/lib/entries/collapse.js +6 -0
- package/lib/entries/color-picker.d.ts +3 -0
- package/lib/entries/color-picker.js +6 -0
- package/lib/entries/date-picker-ori.d.ts +2 -0
- package/lib/entries/date-picker-ori.js +6 -0
- package/lib/entries/date-picker.d.ts +9 -0
- package/lib/entries/date-picker.js +6 -0
- package/lib/entries/description-panel.d.ts +4 -0
- package/lib/entries/description-panel.js +6 -0
- package/lib/entries/dialog-box.d.ts +6 -0
- package/lib/entries/dialog-box.js +2 -0
- package/lib/entries/dialog-container.d.ts +4 -0
- package/lib/entries/dialog-container.js +6 -0
- package/lib/entries/dialog.d.ts +3 -0
- package/lib/entries/dialog.js +2 -0
- package/lib/entries/form-item.d.ts +2 -0
- package/lib/entries/form-item.js +6 -0
- package/lib/entries/form.d.ts +3 -0
- package/lib/entries/form.js +6 -0
- package/lib/entries/icon-arrow-down.d.ts +2 -0
- package/lib/entries/icon-arrow-down.js +6 -0
- package/lib/entries/icon-arrow-left.d.ts +2 -0
- package/lib/entries/icon-arrow-left.js +6 -0
- package/lib/entries/icon-arrow-right.d.ts +2 -0
- package/lib/entries/icon-arrow-right.js +6 -0
- package/lib/entries/icon-arrow-up.d.ts +2 -0
- package/lib/entries/icon-arrow-up.js +6 -0
- package/lib/entries/icon-base.d.ts +2 -0
- package/lib/entries/icon-base.js +6 -0
- package/lib/entries/icon-calendar.d.ts +2 -0
- package/lib/entries/icon-calendar.js +6 -0
- package/lib/entries/icon-caret-bottom.d.ts +2 -0
- package/lib/entries/icon-caret-bottom.js +6 -0
- package/lib/entries/icon-caret-top.d.ts +2 -0
- package/lib/entries/icon-caret-top.js +6 -0
- package/lib/entries/icon-close-filled.d.ts +2 -0
- package/lib/entries/icon-close-filled.js +6 -0
- package/lib/entries/icon-close.d.ts +2 -0
- package/lib/entries/icon-close.js +6 -0
- package/lib/entries/icon-copy.d.ts +2 -0
- package/lib/entries/icon-copy.js +6 -0
- package/lib/entries/icon-d-arrow-left.d.ts +2 -0
- package/lib/entries/icon-d-arrow-left.js +6 -0
- package/lib/entries/icon-d-arrow-right.d.ts +2 -0
- package/lib/entries/icon-d-arrow-right.js +6 -0
- package/lib/entries/icon-delete.d.ts +2 -0
- package/lib/entries/icon-delete.js +6 -0
- package/lib/entries/icon-eye-outline.d.ts +2 -0
- package/lib/entries/icon-eye-outline.js +6 -0
- package/lib/entries/icon-font-icon.d.ts +2 -0
- package/lib/entries/icon-font-icon.js +6 -0
- package/lib/entries/icon-info.d.ts +2 -0
- package/lib/entries/icon-info.js +6 -0
- package/lib/entries/icon-loading.d.ts +2 -0
- package/lib/entries/icon-loading.js +6 -0
- package/lib/entries/icon-minus.d.ts +2 -0
- package/lib/entries/icon-minus.js +6 -0
- package/lib/entries/icon-moon.d.ts +2 -0
- package/lib/entries/icon-moon.js +6 -0
- package/lib/entries/icon-more.d.ts +2 -0
- package/lib/entries/icon-more.js +6 -0
- package/lib/entries/icon-picture.d.ts +2 -0
- package/lib/entries/icon-picture.js +6 -0
- package/lib/entries/icon-plus.d.ts +2 -0
- package/lib/entries/icon-plus.js +6 -0
- package/lib/entries/icon-reduction.d.ts +2 -0
- package/lib/entries/icon-reduction.js +6 -0
- package/lib/entries/icon-refresh-left.d.ts +2 -0
- package/lib/entries/icon-refresh-left.js +6 -0
- package/lib/entries/icon-refresh-right.d.ts +2 -0
- package/lib/entries/icon-refresh-right.js +6 -0
- package/lib/entries/icon-refresh.d.ts +2 -0
- package/lib/entries/icon-refresh.js +6 -0
- package/lib/entries/icon-search.d.ts +2 -0
- package/lib/entries/icon-search.js +6 -0
- package/lib/entries/icon-select.d.ts +2 -0
- package/lib/entries/icon-select.js +6 -0
- package/lib/entries/icon-sort.d.ts +2 -0
- package/lib/entries/icon-sort.js +6 -0
- package/lib/entries/icon-success.d.ts +2 -0
- package/lib/entries/icon-success.js +6 -0
- package/lib/entries/icon-sun.d.ts +2 -0
- package/lib/entries/icon-sun.js +6 -0
- package/lib/entries/icon-theme-default.d.ts +2 -0
- package/lib/entries/icon-theme-default.js +6 -0
- package/lib/entries/icon-warn.d.ts +2 -0
- package/lib/entries/icon-warn.js +6 -0
- package/lib/entries/icon-zoom-in.d.ts +2 -0
- package/lib/entries/icon-zoom-in.js +6 -0
- package/lib/entries/icon-zoom-out.d.ts +2 -0
- package/lib/entries/icon-zoom-out.js +6 -0
- package/lib/entries/image-preview.d.ts +10 -0
- package/lib/entries/image-preview.js +6 -0
- package/lib/entries/image.d.ts +2 -0
- package/lib/entries/image.js +6 -0
- package/lib/entries/input-number.d.ts +2 -0
- package/lib/entries/input-number.js +6 -0
- package/lib/entries/input.d.ts +2 -0
- package/lib/entries/input.js +6 -0
- package/lib/entries/list.d.ts +3 -0
- package/lib/entries/list.js +6 -0
- package/lib/entries/loading.d.ts +2 -0
- package/lib/entries/loading.js +2 -0
- package/lib/entries/mask.d.ts +2 -0
- package/lib/entries/mask.js +6 -0
- package/lib/entries/md-input.d.ts +2 -0
- package/lib/entries/md-input.js +6 -0
- package/lib/entries/menu.d.ts +3 -0
- package/lib/entries/menu.js +6 -0
- package/lib/entries/message.d.ts +6 -0
- package/lib/entries/message.js +2 -0
- package/lib/entries/modal-box.d.ts +6 -0
- package/lib/entries/modal-box.js +2 -0
- package/lib/entries/modal.d.ts +4 -0
- package/lib/entries/modal.js +6 -0
- package/lib/entries/notification.d.ts +7 -0
- package/lib/entries/notification.js +6 -0
- package/lib/entries/page-header.d.ts +4 -0
- package/lib/entries/page-header.js +6 -0
- package/lib/entries/pagination.d.ts +9 -0
- package/lib/entries/pagination.js +6 -0
- package/lib/entries/polygon.d.ts +2 -0
- package/lib/entries/polygon.js +6 -0
- package/lib/entries/popconfirm.d.ts +3 -0
- package/lib/entries/popconfirm.js +2 -0
- package/lib/entries/popover.d.ts +1 -0
- package/lib/entries/popover.js +2 -0
- package/lib/entries/qrcode.d.ts +2 -0
- package/lib/entries/qrcode.js +6 -0
- package/lib/entries/radio-group.d.ts +3 -0
- package/lib/entries/radio-group.js +6 -0
- package/lib/entries/radio.d.ts +2 -0
- package/lib/entries/radio.js +6 -0
- package/lib/entries/select-ori.d.ts +2 -0
- package/lib/entries/select-ori.js +6 -0
- package/lib/entries/select.d.ts +4 -0
- package/lib/entries/select.js +6 -0
- package/lib/entries/space.d.ts +2 -0
- package/lib/entries/space.js +6 -0
- package/lib/entries/switch.d.ts +2 -0
- package/lib/entries/switch.js +6 -0
- package/lib/entries/tabbar-item.d.ts +2 -0
- package/lib/entries/tabbar-item.js +6 -0
- package/lib/entries/tabbar.d.ts +3 -0
- package/lib/entries/tabbar.js +6 -0
- package/lib/entries/table.d.ts +3 -0
- package/lib/entries/table.js +6 -0
- package/lib/entries/tabs.d.ts +3 -0
- package/lib/entries/tabs.js +2 -0
- package/lib/entries/tag.d.ts +2 -0
- package/lib/entries/tag.js +6 -0
- package/lib/entries/theme-color.d.ts +3 -0
- package/lib/entries/theme-color.js +6 -0
- package/lib/entries/theme.d.ts +9 -0
- package/lib/entries/theme.js +6 -0
- package/lib/entries/transition.d.ts +1 -0
- package/lib/entries/transition.js +2 -0
- package/lib/entries/upload.d.ts +3 -0
- package/lib/entries/upload.js +6 -0
- package/lib/entries/utils.d.ts +1 -0
- package/lib/entries/utils.js +2 -0
- package/lib/form/form_inner.d.ts +1 -0
- package/lib/{form_inner-Cnwb6f_Q.js → form/form_inner.js} +9 -9
- package/lib/form/form_item.d.ts +2 -1
- package/lib/form/form_item.js +148 -2
- package/lib/form/form_item.less_inline.js +4 -0
- package/lib/form/index.d.ts +3 -2
- package/lib/form/index.js +191 -2
- package/lib/form/index.less_inline.js +4 -0
- package/lib/icon/arrow_down.js +1 -1
- package/lib/icon/arrow_left.js +1 -1
- package/lib/icon/arrow_right.js +1 -1
- package/lib/icon/arrow_up.js +1 -1
- package/lib/icon/base.d.ts +2 -1
- package/lib/icon/base.js +63 -2
- package/lib/icon/calendar.js +1 -1
- package/lib/icon/caret_bottom.js +1 -1
- package/lib/icon/caret_top.js +1 -1
- package/lib/icon/close.js +1 -1
- package/lib/icon/close_filled.js +1 -1
- package/lib/icon/copy.d.ts +6 -0
- package/lib/icon/copy.js +13 -0
- package/lib/icon/d_arrow_left.js +1 -1
- package/lib/icon/d_arrow_right.js +1 -1
- package/lib/icon/delete.d.ts +5 -0
- package/lib/icon/delete.js +10 -0
- package/lib/icon/eye_outline.d.ts +6 -0
- package/lib/icon/eye_outline.js +13 -0
- package/lib/icon/font_icon.js +1 -1
- package/lib/icon/icon_style.d.ts +2 -0
- package/lib/icon/icon_style.js +6 -0
- package/lib/icon/index.less_inline.js +4 -0
- package/lib/icon/info.js +1 -1
- package/lib/icon/loading.js +1 -1
- package/lib/icon/minus.d.ts +5 -0
- package/lib/icon/minus.js +10 -0
- package/lib/icon/moon.js +1 -1
- package/lib/icon/more.js +1 -1
- package/lib/icon/picture.d.ts +5 -0
- package/lib/icon/picture.js +10 -0
- package/lib/icon/plus.d.ts +5 -0
- package/lib/icon/plus.js +10 -0
- package/lib/icon/reduction.js +1 -1
- package/lib/icon/refresh.js +1 -1
- package/lib/icon/refresh_left.js +1 -1
- package/lib/icon/refresh_right.js +1 -1
- package/lib/icon/search.js +1 -1
- package/lib/icon/select.js +1 -1
- package/lib/icon/sort.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/sun.js +1 -1
- package/lib/icon/theme_default.js +1 -1
- package/lib/icon/warn.js +1 -1
- package/lib/icon/zoom_in.js +1 -1
- package/lib/icon/zoom_out.js +1 -1
- package/lib/image/image_preview.js +91 -2
- package/lib/image/image_preview.less_inline.js +4 -0
- package/lib/image/index.js +163 -2
- package/lib/image/index.less_inline.js +4 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.js +75 -65
- package/lib/input/index.js +4 -4
- package/lib/{input-DUBlLEXS.js → input/index.less_inline.js} +1 -1
- package/lib/{input_inner-x4GfLGjj.js → input/input_inner.less_inline.js} +1 -1
- package/lib/input_number/index.d.ts +59 -0
- package/lib/input_number/index.js +203 -0
- package/lib/input_number/index.less_inline.js +4 -0
- package/lib/input_number/style.d.ts +2 -0
- package/lib/input_number/style.js +6 -0
- package/lib/list/index.js +52 -2
- package/lib/list/index.less_inline.js +4 -0
- package/lib/loading/index.js +1 -1
- package/lib/mask/index.d.ts +1 -1
- package/lib/mask/index.js +109 -2
- package/lib/mask/index.less_inline.js +4 -0
- package/lib/md_input/index.js +59 -2
- package/lib/md_input/index.less_inline.js +4 -0
- package/lib/menu/index.js +275 -2
- package/lib/menu/index.less_inline.js +4 -0
- package/lib/message/index.js +1 -1
- package/lib/modal/index.js +199 -2
- package/lib/modal/index.less_inline.js +4 -0
- package/lib/modal/modal_box.d.ts +22 -0
- package/lib/modal/modal_box.js +21 -22
- package/lib/notification/index.d.ts +212 -0
- package/lib/notification/index.js +380 -0
- package/lib/notification/index.less_inline.js +4 -0
- package/lib/notification/placement.d.ts +49 -0
- package/lib/notification/placement.js +48 -0
- package/lib/notification/style.d.ts +2 -0
- package/lib/notification/style.js +6 -0
- package/lib/page_header/index.js +100 -2
- package/lib/page_header/index.less_inline.js +4 -0
- package/lib/pagination/index.js +214 -2
- package/lib/pagination/index.less_inline.js +4 -0
- package/lib/polygon/index.js +21 -2
- package/lib/{polygon-DhhovlrG.js → polygon/index.less_inline.js} +2 -18
- package/lib/qrcode/index.js +65 -2
- package/lib/qrcode/index.less_inline.js +4 -0
- package/lib/select/index.js +355 -3
- package/lib/select/index.less_inline.js +4 -0
- package/lib/select_ori/index.js +58 -2
- package/lib/select_ori/index.less_inline.js +4 -0
- package/lib/space/index.js +40 -2
- package/lib/space/index.less_inline.js +4 -0
- package/lib/{animation-Bo4jbSGK.js → styles/animation/index.css_inline.js} +2 -3
- package/lib/styles/animation/index.js +6 -2
- package/lib/{mask-Ox6CoyFB.js → styles/mask/index.css_inline.js} +2 -3
- package/lib/styles/mask/index.js +6 -2
- package/lib/switch/index.js +51 -2
- package/lib/switch/index.less_inline.js +4 -0
- package/lib/tabbar/index.js +97 -2
- package/lib/tabbar/index.less_inline.js +4 -0
- package/lib/tabbar/item.js +61 -2
- package/lib/tabbar/item.less_inline.js +4 -0
- package/lib/table/index.js +234 -2
- package/lib/table/index.less_inline.js +4 -0
- package/lib/tabs/index.js +1 -1
- package/lib/tag/index.js +75 -2
- package/lib/tag/index.less_inline.js +4 -0
- package/lib/theme/index.js +86 -2
- package/lib/theme/index.less_inline.js +4 -0
- package/lib/theme/theme_color.js +1 -1
- package/lib/upload/index.d.ts +170 -0
- package/lib/upload/index.js +848 -0
- package/lib/upload/index.less_inline.js +4 -0
- package/lib/upload/style.d.ts +2 -0
- package/lib/upload/style.js +6 -0
- package/lib/utils/context_provide.d.ts +1 -0
- package/lib/utils/context_provide.js +1 -1
- package/lib/utils/event.d.ts +30 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.js +1 -1
- package/lib/utils/popover.js +1 -1
- package/lib/utils/signal_types.d.ts +5 -0
- package/lib/utils/transition.d.ts +28 -0
- package/lib/utils/transition.js +1 -1
- package/package.json +39 -18
- package/styles/animation.css +2 -2
- package/styles/container.css +8 -8
- package/styles/datepicker.css +9 -9
- package/styles/dialog.css +7 -7
- package/styles/loading.css +17 -17
- package/styles/message.css +9 -9
- package/styles/modal_box.css +3 -3
- package/styles/notification.css +17 -0
- package/styles/popover.css +11 -14
- package/styles/reset.css +13 -15
- package/styles/scrollbar.css +5 -5
- package/styles/select.css +6 -6
- package/styles/tabs.css +3 -3
- package/styles/theme-coral.css +35 -0
- package/styles/theme-jade.css +35 -0
- package/styles/theme-tangerine.css +35 -0
- package/styles/transition.css +1 -1
- package/styles/vars.css +41 -7
- package/lib/base-Dyj1rzaK.js +0 -61
- package/lib/calendar-CvlUsN6w.js +0 -146
- package/lib/card-3DM-lJQV.js +0 -63
- package/lib/carousel-DvkZ1YXq.js +0 -276
- package/lib/check-doQ2ZpQj.js +0 -117
- package/lib/collapse-B6-Rn05A.js +0 -102
- package/lib/color_picker-0a-IGZY9.js +0 -41
- package/lib/date_picker-BDN2PAz5.js +0 -99
- package/lib/date_picker_ori-BXFs1eET.js +0 -120
- package/lib/description_panel--AKXBzLL.js +0 -53
- package/lib/dialog_container-BNPQ9n0V.js +0 -145
- package/lib/esm-DAha108i.js +0 -270
- package/lib/form-DJxvBiLy.js +0 -190
- package/lib/form_item-BqPMRABd.js +0 -147
- package/lib/image-CVQai6NX.js +0 -162
- package/lib/image_preview-DfQAKSJH.js +0 -90
- package/lib/item-CQ2Sknbz.js +0 -14
- package/lib/item-DI6mQXtB.js +0 -117
- package/lib/item-D_ZOPXuE.js +0 -60
- package/lib/list-MG8PRzos.js +0 -51
- package/lib/mask-Bx-yNIJv.js +0 -108
- package/lib/md_input-BX3bujz8.js +0 -58
- package/lib/menu-DKscK5mw.js +0 -274
- package/lib/modal-Cwi3qlEf.js +0 -198
- package/lib/page_header-ujV3pncE.js +0 -99
- package/lib/pagination-aRbGd3Rf.js +0 -213
- package/lib/qrcode-Dip8uLSA.js +0 -64
- package/lib/select-BZMDj5VE.js +0 -354
- package/lib/select_ori-C7sUZxen.js +0 -57
- package/lib/space-CKuTk0YB.js +0 -39
- package/lib/switch-wh2-ivty.js +0 -50
- package/lib/tabbar-CBXK-_AV.js +0 -96
- package/lib/table-BQxMD2Ae.js +0 -233
- package/lib/tag-Di1z9PoZ.js +0 -74
- package/lib/theme-CLbBS-in.js +0 -85
- package/styles/dark.css +0 -13
package/lib/index.js
CHANGED
|
@@ -1,80 +1,90 @@
|
|
|
1
1
|
import e from "./base.js";
|
|
2
2
|
import { initAttr as t, kebabToCamel as n, parseAttrValue as r, regist as i, setAttrs as a, stopSignal as o, tagAttr as s, tagAttrs as c, unitNumberStr as l, useId as u } from "./utils/index.js";
|
|
3
3
|
import { remove as d, set as f } from "./utils/clickoutside.js";
|
|
4
|
-
import
|
|
4
|
+
import p from "./icon/base.js";
|
|
5
5
|
import m from "./icon/close_filled.js";
|
|
6
6
|
import h from "./icon/success.js";
|
|
7
7
|
import g from "./icon/warn.js";
|
|
8
8
|
import _ from "./icon/info.js";
|
|
9
9
|
import v from "./message/index.js";
|
|
10
10
|
import y from "./dialog/index.js";
|
|
11
|
-
import
|
|
11
|
+
import b from "./dialog/dialog_container.js";
|
|
12
12
|
import x from "./button/index.js";
|
|
13
13
|
import S from "./icon/close.js";
|
|
14
|
-
import
|
|
14
|
+
import C from "./form/form_item.js";
|
|
15
15
|
import w from "./input/index.js";
|
|
16
16
|
import T from "./dialog/dialog_box.js";
|
|
17
17
|
import E from "./loading/index.js";
|
|
18
18
|
import D from "./tabs/index.js";
|
|
19
|
-
import
|
|
20
|
-
import k from "./
|
|
21
|
-
import A from "./icon/
|
|
22
|
-
import j from "./icon/
|
|
23
|
-
import M from "./icon/
|
|
24
|
-
import N from "./icon/
|
|
25
|
-
import P from "./icon/
|
|
26
|
-
import F from "./icon/
|
|
27
|
-
import I from "./icon/
|
|
28
|
-
import L from "./icon/
|
|
29
|
-
import R from "./icon/
|
|
30
|
-
import z from "./icon/
|
|
31
|
-
import B from "./icon/
|
|
32
|
-
import V from "./icon/
|
|
33
|
-
import H from "./icon/
|
|
34
|
-
import U from "./icon/
|
|
35
|
-
import W from "./icon/
|
|
36
|
-
import G from "./icon/
|
|
37
|
-
import K from "./icon/
|
|
38
|
-
import q from "./icon/
|
|
39
|
-
import J from "./icon/
|
|
40
|
-
import Y from "./icon/
|
|
41
|
-
import X from "./icon/
|
|
42
|
-
import Z from "./icon/
|
|
43
|
-
import Q from "./icon/
|
|
44
|
-
import
|
|
45
|
-
import ee from "./
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import re from "./
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import {
|
|
61
|
-
import
|
|
62
|
-
import Se from "./
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
|
|
19
|
+
import O from "./modal/index.js";
|
|
20
|
+
import k from "./modal/modal_box.js";
|
|
21
|
+
import A from "./icon/arrow_down.js";
|
|
22
|
+
import j from "./icon/arrow_left.js";
|
|
23
|
+
import M from "./icon/arrow_right.js";
|
|
24
|
+
import N from "./icon/arrow_up.js";
|
|
25
|
+
import P from "./icon/caret_top.js";
|
|
26
|
+
import F from "./icon/caret_bottom.js";
|
|
27
|
+
import I from "./icon/font_icon.js";
|
|
28
|
+
import L from "./icon/loading.js";
|
|
29
|
+
import R from "./icon/search.js";
|
|
30
|
+
import z from "./icon/sun.js";
|
|
31
|
+
import B from "./icon/moon.js";
|
|
32
|
+
import V from "./icon/reduction.js";
|
|
33
|
+
import H from "./icon/refresh_left.js";
|
|
34
|
+
import U from "./icon/refresh_right.js";
|
|
35
|
+
import W from "./icon/sort.js";
|
|
36
|
+
import G from "./icon/theme_default.js";
|
|
37
|
+
import K from "./icon/more.js";
|
|
38
|
+
import q from "./icon/d_arrow_left.js";
|
|
39
|
+
import J from "./icon/d_arrow_right.js";
|
|
40
|
+
import Y from "./icon/zoom_in.js";
|
|
41
|
+
import X from "./icon/zoom_out.js";
|
|
42
|
+
import Z from "./icon/select.js";
|
|
43
|
+
import Q from "./icon/calendar.js";
|
|
44
|
+
import $ from "./icon/refresh.js";
|
|
45
|
+
import ee from "./icon/copy.js";
|
|
46
|
+
import te from "./icon/plus.js";
|
|
47
|
+
import ne from "./icon/minus.js";
|
|
48
|
+
import re from "./icon/eye_outline.js";
|
|
49
|
+
import ie from "./icon/delete.js";
|
|
50
|
+
import ae from "./icon/picture.js";
|
|
51
|
+
import oe from "./form/index.js";
|
|
52
|
+
import se from "./check/radio_group.js";
|
|
53
|
+
import ce from "./check/radio.js";
|
|
54
|
+
import le from "./check/checkbox.js";
|
|
55
|
+
import ue from "./check/checkbox_group.js";
|
|
56
|
+
import de from "./input_number/index.js";
|
|
57
|
+
import fe from "./select_ori/index.js";
|
|
58
|
+
import pe from "./switch/index.js";
|
|
59
|
+
import me from "./md_input/index.js";
|
|
60
|
+
import { Popover as he, autoUpdate as ge, createPopoverObserver as _e, getOverflowAncestors as ve, popconfirmProps as ye, updatePosition as be } from "./utils/popover.js";
|
|
61
|
+
import xe from "./select/index.js";
|
|
62
|
+
import Se from "./date_picker/index.js";
|
|
63
|
+
import Ce from "./date_picker_ori/index.js";
|
|
64
|
+
import we from "./color_picker/index.js";
|
|
65
|
+
import Te from "./list/index.js";
|
|
66
|
+
import Ee from "./polygon/index.js";
|
|
67
|
+
import De from "./tabbar/index.js";
|
|
68
|
+
import Oe from "./tabbar/item.js";
|
|
69
|
+
import ke from "./theme/index.js";
|
|
70
|
+
import Ae from "./theme/theme_color.js";
|
|
71
|
+
import je from "./menu/index.js";
|
|
72
|
+
import Me from "./carousel/index.js";
|
|
73
|
+
import Ne from "./carousel/item.js";
|
|
74
|
+
import Pe from "./qrcode/index.js";
|
|
75
|
+
import Fe from "./description_panel/index.js";
|
|
76
|
+
import Ie from "./pagination/index.js";
|
|
77
|
+
import Le from "./mask/index.js";
|
|
78
|
+
import Re from "./page_header/index.js";
|
|
79
|
+
import ze from "./tag/index.js";
|
|
80
|
+
import Be from "./collapse/index.js";
|
|
81
|
+
import Ve from "./collapse/item.js";
|
|
82
|
+
import He from "./image/index.js";
|
|
83
|
+
import Ue from "./image/image_preview.js";
|
|
84
|
+
import We from "./table/index.js";
|
|
85
|
+
import Ge from "./space/index.js";
|
|
86
|
+
import Ke from "./card/index.js";
|
|
87
|
+
import qe from "./calendar/index.js";
|
|
88
|
+
import Je, { defaultUploadResponseParser as Ye } from "./upload/index.js";
|
|
89
|
+
import Xe from "./notification/index.js";
|
|
90
|
+
export { A as ArrowDownIcon, j as ArrowLeftIcon, M as ArrowRightIcon, N as ArrowUpIcon, e as BaseComponent, p as BaseIcon, x as Button, qe as Calendar, Q as CalendarIcon, Ke as Card, F as CaretBottomIcon, P as CaretTopIcon, Me as Carousel, Ne as CarouselItem, le as Checkbox, ue as CheckboxGroup, m as CloseFilledIcon, S as CloseIcon, Be as Collapse, Ve as CollapseItem, we as ColorPicker, ee as CopyIcon, q as DArrowLeftIcon, J as DArrowRightIcon, Se as DatePicker, Ce as DatePickerOri, ie as DeleteIcon, Fe as DescriptionPanel, y as Dialog, T as DialogBox, b as DialogContainer, re as EyeOutlineIcon, I as FontIcon, oe as Form, C as FormItem, He as Image, Ue as ImagePreview, _ as InfoIcon, w as Input, de as InputNumber, Te as List, E as Loading, L as LoadingIcon, Le as Mask, me as MdInput, je as Menu, v as Message, ne as MinusIcon, O as Modal, k as ModalBox, B as MoonIcon, K as MoreIcon, Xe as Notification, Re as PageHeader, Ie as Pagination, ae as PictureIcon, te as PlusIcon, Ee as Polygon, he as Popover, Pe as Qrcode, ce as Radio, se as RadioGroup, V as ReductionIcon, $ as RefreshIcon, H as RefreshLeftIcon, U as RefreshRightIcon, R as SearchIcon, xe as Select, Z as SelectIcon, fe as SelectOri, W as SortIcon, Ge as Space, h as SuccessIcon, z as SunIcon, pe as Switch, De as Tabbar, Oe as TabbarItem, We as Table, D as Tabs, ze as Tag, ke as Theme, Ae as ThemeColor, G as ThemeDefaultIcon, Je as Upload, g as WarnIcon, Y as ZoomInIcon, X as ZoomOutIcon, f as addClickOutside, ge as autoUpdate, _e as createPopoverObserver, Ye as defaultUploadResponseParser, ve as getOverflowAncestors, t as initAttr, n as kebabToCamel, r as parseAttrValue, ye as popconfirmProps, i as regist, d as removeClickOutside, a as setAttrs, o as stopSignal, s as tagAttr, c as tagAttrs, l as unitNumberStr, be as updatePosition, u as useId };
|
package/lib/input/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { parseAttrValue as e, unitNumberStr as t } from "../utils/index.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { $ as a, $$ as o, $one as s, addClass as c, formatStyle as l, off as u, on as d, removeClass as f } from "
|
|
2
|
+
import n from "../form/form_inner.js";
|
|
3
|
+
import r from "./index.less_inline.js";
|
|
4
|
+
import i from "./input_inner.less_inline.js";
|
|
5
|
+
import { $ as a, $$ as o, $one as s, addClass as c, formatStyle as l, off as u, on as d, removeClass as f } from "utilane/browser";
|
|
6
6
|
//#region src/components/input/index.ts
|
|
7
7
|
var p = class extends n {
|
|
8
8
|
static baseName = "input";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/components/input/index.less?inline
|
|
2
2
|
var e = ":host{--l-input-border-color:var(--l-border-color,#dedede);width:var(--l-input-width,170px);height:var(--l-form-control-height,32px);border:1px solid var(--l-input-border-color,#dedede);border-radius:var(--l-border-radius,3px);vertical-align:middle;box-sizing:border-box;background-color:#0000;align-items:center;padding:0 7px;transition:border-color .3s,box-shadow .3s;display:inline-flex}:host(:focus){--l-input-border-color:var(--l-primary-color,#722ed1);box-shadow:0 0 0 3px var(--l-primary-color-light5)}:host(.is-block){width:100%}:host(.is-disabled){background-color:var(--l-disabled-color,#f5f7fa)}:host(.is-error){--l-input-border-color:var(--l-error-color)}:host(.is-error:focus){box-shadow:0 0 0 3px var(--l-error-color-light5)}.l-input__prefix,.l-input__suffix{color:#a8abb2;flex-shrink:0;font-size:14px;display:inline-flex}.l-input__prefix{margin-right:5px}.l-input__suffix{margin-left:5px}.l-clearable{cursor:pointer}.l-clearable:hover{color:#999}";
|
|
3
3
|
//#endregion
|
|
4
|
-
export { e as
|
|
4
|
+
export { e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/components/input/input_inner.less?inline
|
|
2
2
|
var e = ".l-input__inner{box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:inherit;font-size:inherit;background-color:#0000;border:none;outline:none;flex-grow:1}.l-input__inner:disabled{background-color:#0000}";
|
|
3
3
|
//#endregion
|
|
4
|
-
export { e as
|
|
4
|
+
export { e as default };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import FormInner from "../form/form_inner";
|
|
2
|
+
interface InputNumberState {
|
|
3
|
+
/** 最小值 */
|
|
4
|
+
min?: number;
|
|
5
|
+
/** 最大值 */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** 步长 */
|
|
8
|
+
step: number;
|
|
9
|
+
/** 小数精度 */
|
|
10
|
+
precision?: number;
|
|
11
|
+
/** 占位符 */
|
|
12
|
+
placeholder: string;
|
|
13
|
+
/** 尺寸 */
|
|
14
|
+
size: "small" | "default" | "large";
|
|
15
|
+
/** 宽度 */
|
|
16
|
+
width?: string;
|
|
17
|
+
/** 是否禁用步进按钮 */
|
|
18
|
+
controlsDisabled: boolean;
|
|
19
|
+
}
|
|
20
|
+
export default class InputNumber extends FormInner<InputNumberState> {
|
|
21
|
+
static baseName: string;
|
|
22
|
+
$input?: HTMLInputElement;
|
|
23
|
+
$minusBtn?: HTMLButtonElement;
|
|
24
|
+
$plusBtn?: HTMLButtonElement;
|
|
25
|
+
constructor();
|
|
26
|
+
static get observedAttributes(): string[];
|
|
27
|
+
protected attributeChange(name: string, _oldValue: string, newValue: string): void;
|
|
28
|
+
protected updateDOM(changedProps: Set<string>): void;
|
|
29
|
+
render_v2(): {
|
|
30
|
+
template: DocumentFragment;
|
|
31
|
+
styleSheets: CSSStyleSheet[];
|
|
32
|
+
};
|
|
33
|
+
render(): DocumentFragment;
|
|
34
|
+
afterInit(): void;
|
|
35
|
+
beforeDestroy(): void;
|
|
36
|
+
set value(value: any);
|
|
37
|
+
get value(): any;
|
|
38
|
+
disabledChange(): void;
|
|
39
|
+
focus(): void;
|
|
40
|
+
/** 将值限制在 min/max 范围内并格式化精度 */
|
|
41
|
+
private _clamp;
|
|
42
|
+
private _formatValue;
|
|
43
|
+
private _getCurrentNum;
|
|
44
|
+
private _commitValue;
|
|
45
|
+
private _handleInput;
|
|
46
|
+
private _handleChange;
|
|
47
|
+
private _handleBlur;
|
|
48
|
+
private _handleKeydown;
|
|
49
|
+
private _handleMinus;
|
|
50
|
+
private _handlePlus;
|
|
51
|
+
private _stepUp;
|
|
52
|
+
private _stepDown;
|
|
53
|
+
private _updateBtnState;
|
|
54
|
+
private _updateWidth;
|
|
55
|
+
private _updateControls;
|
|
56
|
+
protected innerBlockChange(innerBlock: boolean): void;
|
|
57
|
+
protected validResult(msg?: string): void;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { parseAttrValue as e, unitNumberStr as t } from "../utils/index.js";
|
|
2
|
+
import n from "../form/form_inner.js";
|
|
3
|
+
import r from "./style.js";
|
|
4
|
+
import { $$ as i, $one as a, addClass as o, off as s, on as c, removeClass as l } from "utilane/browser";
|
|
5
|
+
//#region src/components/input_number/index.ts
|
|
6
|
+
var u = class extends n {
|
|
7
|
+
static baseName = "input-number";
|
|
8
|
+
$input;
|
|
9
|
+
$minusBtn;
|
|
10
|
+
$plusBtn;
|
|
11
|
+
constructor() {
|
|
12
|
+
super(), this.version = 2, this._state = {
|
|
13
|
+
step: 1,
|
|
14
|
+
placeholder: "",
|
|
15
|
+
size: "default",
|
|
16
|
+
controlsDisabled: !1
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static get observedAttributes() {
|
|
20
|
+
return [
|
|
21
|
+
"disabled",
|
|
22
|
+
"value",
|
|
23
|
+
"name",
|
|
24
|
+
"inner-block",
|
|
25
|
+
"min",
|
|
26
|
+
"max",
|
|
27
|
+
"step",
|
|
28
|
+
"precision",
|
|
29
|
+
"placeholder",
|
|
30
|
+
"size",
|
|
31
|
+
"width",
|
|
32
|
+
"controls-disabled"
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
attributeChange(n, r, i) {
|
|
36
|
+
switch (n) {
|
|
37
|
+
case "min":
|
|
38
|
+
case "max":
|
|
39
|
+
case "precision":
|
|
40
|
+
let r = Number(i);
|
|
41
|
+
this._state[n] = Number.isFinite(r) ? r : void 0;
|
|
42
|
+
break;
|
|
43
|
+
case "step":
|
|
44
|
+
let a = Number(i);
|
|
45
|
+
this._state.step = Number.isFinite(a) ? a : 1;
|
|
46
|
+
break;
|
|
47
|
+
case "placeholder":
|
|
48
|
+
case "size":
|
|
49
|
+
this._state[n] = i.trim();
|
|
50
|
+
break;
|
|
51
|
+
case "width":
|
|
52
|
+
this._state.width = t(i);
|
|
53
|
+
break;
|
|
54
|
+
case "controls-disabled": this._state.controlsDisabled = e(i, !1, "controls-disabled");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
updateDOM(e) {
|
|
58
|
+
e.has("placeholder") && this.$input && (this.$input.placeholder = this._state.placeholder), e.has("width") && this._updateWidth(), e.has("controls-disabled") && this._updateControls(), (e.has("step") || e.has("min") || e.has("max")) && this._updateBtnState();
|
|
59
|
+
}
|
|
60
|
+
render_v2() {
|
|
61
|
+
return {
|
|
62
|
+
template: this.render(),
|
|
63
|
+
styleSheets: [r]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
let e = document.createDocumentFragment(), t = i("button", {
|
|
68
|
+
class: "l-input-number__btn l-input-number__minus",
|
|
69
|
+
type: "button",
|
|
70
|
+
part: "minus"
|
|
71
|
+
});
|
|
72
|
+
t.innerHTML = "<svg viewBox=\"0 0 1024 1024\" width=\"12\" height=\"12\" fill=\"currentColor\"><path d=\"M128 512h768a25.6 25.6 0 1 1 0 51.2H128a25.6 25.6 0 1 1 0-51.2z\"></path></svg>", t.disabled = this.isDisabled(), e.appendChild(t);
|
|
73
|
+
let n = i("input", {
|
|
74
|
+
class: "l-input-number__inner",
|
|
75
|
+
value: this._formatValue(this.value),
|
|
76
|
+
name: this.getName(),
|
|
77
|
+
placeholder: this._state.placeholder,
|
|
78
|
+
part: "default",
|
|
79
|
+
type: "text",
|
|
80
|
+
inputmode: this._state.precision == null ? "numeric" : "decimal",
|
|
81
|
+
disabled: this.isDisabled() ? !0 : void 0
|
|
82
|
+
});
|
|
83
|
+
e.appendChild(n);
|
|
84
|
+
let r = i("button", {
|
|
85
|
+
class: "l-input-number__btn l-input-number__plus",
|
|
86
|
+
type: "button",
|
|
87
|
+
part: "plus"
|
|
88
|
+
});
|
|
89
|
+
return r.innerHTML = "<svg viewBox=\"0 0 1024 1024\" width=\"12\" height=\"12\" fill=\"currentColor\"><path d=\"M512 128a25.6 25.6 0 0 1 25.6 25.6v332.8h332.8a25.6 25.6 0 1 1 0 51.2H537.6v332.8a25.6 25.6 0 1 1-51.2 0V537.6H153.6a25.6 25.6 0 1 1 0-51.2h332.8V153.6A25.6 25.6 0 0 1 512 128z\"></path></svg>", r.disabled = this.isDisabled(), e.appendChild(r), e;
|
|
90
|
+
}
|
|
91
|
+
afterInit() {
|
|
92
|
+
this.$input = a(".l-input-number__inner", this.root), this.$minusBtn = a(".l-input-number__minus", this.root), this.$plusBtn = a(".l-input-number__plus", this.root), c(this.$input, "input", this._handleInput), c(this.$input, "change", this._handleChange), c(this.$input, "blur", this._handleBlur), c(this.$input, "keydown", this._handleKeydown), c(this.$minusBtn, "click", this._handleMinus), c(this.$plusBtn, "click", this._handlePlus), this._updateWidth(), this._updateBtnState(), this._updateControls(), this.className = `l-input-number--${this._state.size || "default"} ${this.className}`;
|
|
93
|
+
}
|
|
94
|
+
beforeDestroy() {
|
|
95
|
+
this.$input && (s(this.$input, "input", this._handleInput), s(this.$input, "change", this._handleChange), s(this.$input, "blur", this._handleBlur), s(this.$input, "keydown", this._handleKeydown)), this.$minusBtn && s(this.$minusBtn, "click", this._handleMinus), this.$plusBtn && s(this.$plusBtn, "click", this._handlePlus), this.$input = void 0, this.$minusBtn = void 0, this.$plusBtn = void 0;
|
|
96
|
+
}
|
|
97
|
+
set value(e) {
|
|
98
|
+
this.setValue(e), this.$input && (this.$input.value = this._formatValue(e)), this._updateBtnState();
|
|
99
|
+
}
|
|
100
|
+
get value() {
|
|
101
|
+
return this.getValue();
|
|
102
|
+
}
|
|
103
|
+
disabledChange() {
|
|
104
|
+
this.isDisabled() ? o(this, "is-disabled") : l(this, "is-disabled"), this.$input && (this.$input.disabled = this.isDisabled()), this.$minusBtn && (this.$minusBtn.disabled = this.isDisabled()), this.$plusBtn && (this.$plusBtn.disabled = this.isDisabled());
|
|
105
|
+
}
|
|
106
|
+
focus() {
|
|
107
|
+
this.$input?.focus();
|
|
108
|
+
}
|
|
109
|
+
_clamp(e) {
|
|
110
|
+
let { min: t, max: n, precision: r } = this._state;
|
|
111
|
+
return t != null && e < t && (e = t), n != null && e > n && (e = n), r != null && (e = parseFloat(e.toFixed(r))), e;
|
|
112
|
+
}
|
|
113
|
+
_formatValue(e) {
|
|
114
|
+
if (e == null || e === "") return "";
|
|
115
|
+
let t = Number(e);
|
|
116
|
+
if (isNaN(t)) return "";
|
|
117
|
+
let { precision: n } = this._state;
|
|
118
|
+
return n == null ? String(t) : t.toFixed(n);
|
|
119
|
+
}
|
|
120
|
+
_getCurrentNum() {
|
|
121
|
+
let e = this.$input?.value ?? this.value;
|
|
122
|
+
if (e == null || e === "") return 0;
|
|
123
|
+
let t = Number(e);
|
|
124
|
+
return isNaN(t) ? 0 : t;
|
|
125
|
+
}
|
|
126
|
+
_commitValue(e) {
|
|
127
|
+
let t = this._clamp(e);
|
|
128
|
+
this.value = t, this.$input && (this.$input.value = this._formatValue(t)), this.emit("input", {
|
|
129
|
+
bubbles: !0,
|
|
130
|
+
detail: {
|
|
131
|
+
value: t,
|
|
132
|
+
name: this.getName()
|
|
133
|
+
}
|
|
134
|
+
}), this._updateBtnState();
|
|
135
|
+
}
|
|
136
|
+
_handleInput = (e) => {
|
|
137
|
+
let t = e.target.value;
|
|
138
|
+
if (t === "-" || t === "." || t === "-.") return;
|
|
139
|
+
let n = Number(t);
|
|
140
|
+
Number.isFinite(n) && (this.setValue(n), this.emit("input", {
|
|
141
|
+
bubbles: !0,
|
|
142
|
+
detail: {
|
|
143
|
+
value: n,
|
|
144
|
+
name: this.getName()
|
|
145
|
+
}
|
|
146
|
+
}));
|
|
147
|
+
};
|
|
148
|
+
_handleChange = (e) => {
|
|
149
|
+
let t = e.target, n = Number(t.value);
|
|
150
|
+
if (Number.isFinite(n)) {
|
|
151
|
+
let e = this._clamp(n);
|
|
152
|
+
this.value = e, this.$input && (this.$input.value = this._formatValue(e)), this.emit("change", { detail: {
|
|
153
|
+
value: e,
|
|
154
|
+
name: this.getName()
|
|
155
|
+
} });
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
_handleBlur = () => {
|
|
159
|
+
if (this.$input) {
|
|
160
|
+
let e = this.$input.value, t = parseFloat(e);
|
|
161
|
+
if (Number.isFinite(t)) {
|
|
162
|
+
let e = this._clamp(t);
|
|
163
|
+
this.value = e, this.$input.value = this._formatValue(e);
|
|
164
|
+
} else this.value = void 0, this.$input.value = "";
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
_handleKeydown = (e) => {
|
|
168
|
+
let t = e;
|
|
169
|
+
this.isDisabled() || (t.key === "ArrowUp" ? (t.preventDefault(), this._stepUp()) : t.key === "ArrowDown" && (t.preventDefault(), this._stepDown()));
|
|
170
|
+
};
|
|
171
|
+
_handleMinus = () => {
|
|
172
|
+
this.isDisabled() || (this._stepDown(), this.focus());
|
|
173
|
+
};
|
|
174
|
+
_handlePlus = () => {
|
|
175
|
+
this.isDisabled() || (this._stepUp(), this.focus());
|
|
176
|
+
};
|
|
177
|
+
_stepUp() {
|
|
178
|
+
let e = this._getCurrentNum();
|
|
179
|
+
this._commitValue(e + this._state.step);
|
|
180
|
+
}
|
|
181
|
+
_stepDown() {
|
|
182
|
+
let e = this._getCurrentNum();
|
|
183
|
+
this._commitValue(e - this._state.step);
|
|
184
|
+
}
|
|
185
|
+
_updateBtnState() {
|
|
186
|
+
let e = this._getCurrentNum(), { min: t, max: n } = this._state;
|
|
187
|
+
this.$minusBtn && t != null && (this.$minusBtn.disabled = this.isDisabled() || e <= t), this.$plusBtn && n != null && (this.$plusBtn.disabled = this.isDisabled() || e >= n);
|
|
188
|
+
}
|
|
189
|
+
_updateWidth() {
|
|
190
|
+
this._state.width ? this.style.setProperty("--l-input-number-width", this._state.width) : this.style.removeProperty("--l-input-number-width");
|
|
191
|
+
}
|
|
192
|
+
_updateControls() {
|
|
193
|
+
this._state.controlsDisabled ? (o(this, "l-input-number--no-controls"), this.$minusBtn && (this.$minusBtn.style.display = "none"), this.$plusBtn && (this.$plusBtn.style.display = "none")) : (l(this, "l-input-number--no-controls"), this.$minusBtn && (this.$minusBtn.style.display = ""), this.$plusBtn && (this.$plusBtn.style.display = ""));
|
|
194
|
+
}
|
|
195
|
+
innerBlockChange(e) {
|
|
196
|
+
e ? o(this, "is-block") : l(this, "is-block");
|
|
197
|
+
}
|
|
198
|
+
validResult(e) {
|
|
199
|
+
e == null ? l(this, "is-error") : o(this, "is-error");
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
//#endregion
|
|
203
|
+
export { u as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/components/input_number/index.less?inline
|
|
2
|
+
var e = ":host{--l-input-number-border-color:var(--l-border-color,#d9d9d9);--l-input-number-btn-color:#606266;--l-input-number-btn-hover-color:var(--l-primary-color,#722ed1);--l-input-number-btn-disabled-color:#c0c4cc;--l-input-number-bg:#fff;--l-input-number-btn-bg:#f5f7fa;--l-input-number-btn-hover-bg:var(--l-primary-color-light5,#f3e8ff);--l-input-number-width:170px;width:var(--l-input-number-width);height:var(--l-form-control-height,32px);border:1px solid var(--l-input-number-border-color);border-radius:var(--l-border-radius,3px);box-sizing:border-box;vertical-align:middle;background-color:var(--l-input-number-bg);align-items:center;transition:border-color .3s,box-shadow .3s;display:inline-flex;overflow:hidden}:host(:focus-within){--l-input-number-border-color:var(--l-primary-color,#722ed1);box-shadow:0 0 0 3px var(--l-primary-color-light5)}:host(.is-block){width:100%}:host(.is-disabled){background-color:var(--l-disabled-color,#f5f7fa);cursor:not-allowed}:host(.is-disabled) .l-input-number__btn{color:var(--l-input-number-btn-disabled-color);cursor:not-allowed}:host(.is-disabled) .l-input-number__btn:hover{background-color:var(--l-input-number-btn-bg)}:host(.is-error){--l-input-number-border-color:var(--l-error-color)}:host(.is-error:focus-within){box-shadow:0 0 0 3px var(--l-error-color-light5)}:host(.l-input-number--small){--l-form-control-height:24px;font-size:12px}:host(.l-input-number--large){--l-form-control-height:40px;--l-border-radius:6px;font-size:16px}.l-input-number__btn{background:var(--l-input-number-btn-bg);width:32px;height:100%;color:var(--l-input-number-btn-color);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:inherit;border:none;outline:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;transition:background-color .25s,color .25s;display:inline-flex}.l-input-number__btn:hover:not(:disabled){background:var(--l-input-number-btn-hover-bg);color:var(--l-input-number-btn-hover-color)}.l-input-number__btn:active:not(:disabled){background:var(--l-primary-color-light4,#e2d3fa);color:var(--l-primary-color-dark1,#531dab)}.l-input-number__btn:disabled{color:var(--l-input-number-btn-disabled-color);cursor:not-allowed}:host(.l-input-number--no-controls) .l-input-number__inner{text-align:left}.l-input-number__inner{text-align:center;width:100%;height:100%;font-size:inherit;color:var(--l-input-number-btn-color);box-sizing:border-box;-moz-appearance:textfield;background:0 0;border:none;outline:none;flex:1;padding:0 8px}.l-input-number__inner::-webkit-outer-spin-button,.l-input-number__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.l-input-number__inner::placeholder{color:#c0c4cc}html.dark :host{--l-input-number-bg:#ffffff0f;--l-input-number-btn-bg:#ffffff14;--l-input-number-btn-color:#ffffffa6;--l-input-number-btn-hover-bg:var(--l-primary-color-light5);--l-input-number-btn-disabled-color:#ffffff40}html.dark :host(.is-disabled){background-color:#ffffff14}html.dark .l-input-number__inner::placeholder{color:#ffffff4d}";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as default };
|
package/lib/list/index.js
CHANGED
|
@@ -1,2 +1,52 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import e from "../base.js";
|
|
2
|
+
import { parseAttrValue as t } from "../utils/index.js";
|
|
3
|
+
import n from "../styles/animation/index.js";
|
|
4
|
+
import r from "./index.less_inline.js";
|
|
5
|
+
import { $one as i } from "utilane/browser";
|
|
6
|
+
//#region src/components/list/index.ts
|
|
7
|
+
var a = class extends e {
|
|
8
|
+
static baseName = "list";
|
|
9
|
+
finish = !1;
|
|
10
|
+
infinite = !0;
|
|
11
|
+
observer;
|
|
12
|
+
$more;
|
|
13
|
+
_page = 0;
|
|
14
|
+
static get observedAttributes() {
|
|
15
|
+
return ["finish", "infinite"];
|
|
16
|
+
}
|
|
17
|
+
attributeChangedCallback(e, n, r) {
|
|
18
|
+
if (e === "finish") {
|
|
19
|
+
let n = t(r, !1, e);
|
|
20
|
+
this.finish !== n && (this.finish = n, this._finishChange());
|
|
21
|
+
} else if (e === "infinite") {
|
|
22
|
+
let n = t(r, !0, e);
|
|
23
|
+
this.infinite !== n && (this.infinite = n);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
this.loadStyleText([r]), this.root.adoptedStyleSheets = [n], super.connectedCallback(), this.infinite && (this.observer = new IntersectionObserver((e) => {
|
|
28
|
+
e[0].isIntersecting && !this.finish && (this._page++, this.setAttribute("loading", ""), this.emit("load", { detail: { page: this._page } }));
|
|
29
|
+
}), this.$more = i(".l-list-loadmore", this.root), !this.finish && this.$more && this.observer.observe(this.$more));
|
|
30
|
+
}
|
|
31
|
+
disconnectedCallback() {
|
|
32
|
+
super.disconnectedCallback(), this.observer &&= (this.$more &&= (this.observer.unobserve(this.$more), void 0), this.observer.disconnect(), void 0);
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
let e = ["<slot></slot>"];
|
|
36
|
+
return this.infinite && (e.push("<div class=\"l-list-loadmore\">"), this.finish || e.push("<l-loading-icon class=\"l-list-icon l-rotate-anim\"></l-loading-icon>"), e.push(`<span class="l-list-loadmore-text">${this._loadingText()}</span></div>`)), e.join("");
|
|
37
|
+
}
|
|
38
|
+
_loadingText() {
|
|
39
|
+
return this.finish ? "已经到底啦!" : "加载中……";
|
|
40
|
+
}
|
|
41
|
+
_finishChange() {
|
|
42
|
+
if (this.$more) {
|
|
43
|
+
this.observer && (this.finish ? this.observer.unobserve(this.$more) : this.observer.observe(this.$more));
|
|
44
|
+
let e = i(".l-list-loadmore-text", this.$more);
|
|
45
|
+
e && (e.textContent = this._loadingText());
|
|
46
|
+
let t = i(".l-list-icon", this.$more);
|
|
47
|
+
this.finish ? t && t.remove() : t ?? (t = document.createElement("l-loading-icon"), t.className = "l-list-icon l-rotate-anim", this.$more.prepend(t));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { a as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/components/list/index.less?inline
|
|
2
|
+
var e = ":host{-webkit-overflow-scrolling:touch;height:100%;display:block;position:relative;overflow:auto}.l-list-loadmore{color:#999;justify-content:center;align-items:center;padding:10px;display:flex}.l-list-icon{margin-right:10px;font-size:24px;transform:rotate(80deg)}";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as default };
|
package/lib/loading/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, $$ as t, $one as n, addClass as r, hasClass as i, iterate as a } from "
|
|
1
|
+
import { $ as e, $$ as t, $one as n, addClass as r, hasClass as i, iterate as a } from "utilane/browser";
|
|
2
2
|
//#region src/components/loading/index.ts
|
|
3
3
|
function o(e, a) {
|
|
4
4
|
if (i(e, "l-loading")) return;
|
package/lib/mask/index.d.ts
CHANGED