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/styles/popover.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.l-popover {
|
|
1
|
+
:where(.l-popover) {
|
|
2
2
|
--l-popover-background: #ffffff;
|
|
3
3
|
--l-popover-border-color: #e4e4e4;
|
|
4
4
|
--l-popover-color: #666666;
|
|
@@ -17,10 +17,9 @@
|
|
|
17
17
|
display: none;
|
|
18
18
|
z-index: 300;
|
|
19
19
|
line-height: 1;
|
|
20
|
-
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
.l-popover-arrow {
|
|
22
|
+
:where(.l-popover-arrow) {
|
|
24
23
|
position: absolute;
|
|
25
24
|
background: var(--l-popover-background);
|
|
26
25
|
width: var(--l-popover-arrow-size, 8px);
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
/* tooltip */
|
|
33
|
-
.l-popover.l-popover--tooltip {
|
|
32
|
+
:where(.l-popover).l-popover--tooltip {
|
|
34
33
|
--l-popover-color: #fff;
|
|
35
34
|
--l-popover-box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
|
|
36
35
|
--l-popover-background: #383838;
|
|
@@ -40,22 +39,22 @@
|
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
/* popconfirm */
|
|
43
|
-
.l-popover--popconfirm {
|
|
42
|
+
:where(.l-popover--popconfirm) {
|
|
44
43
|
min-width: 150px;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
.l-popover--popconfirm .l-popconfirm-container {
|
|
46
|
+
:where(.l-popover--popconfirm .l-popconfirm-container) {
|
|
48
47
|
display: flex;
|
|
49
48
|
align-items: center;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
.l-popover--popconfirm .l-popconfirm-icon-wrapper {
|
|
51
|
+
:where(.l-popover--popconfirm .l-popconfirm-icon-wrapper) {
|
|
53
52
|
margin-right: 10px;
|
|
54
53
|
display: inline-flex;
|
|
55
|
-
color: var(--l-
|
|
54
|
+
color: var(--l-warning-color, #f90);
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
.l-popover--popconfirm .l-popconfirm-footer {
|
|
57
|
+
:where(.l-popover--popconfirm .l-popconfirm-footer) {
|
|
59
58
|
display: flex;
|
|
60
59
|
align-items: center;
|
|
61
60
|
justify-content: flex-end;
|
|
@@ -63,17 +62,15 @@
|
|
|
63
62
|
gap: 7px;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
.l-popover--popconfirm .l-popconfirm-btn {
|
|
65
|
+
:where(.l-popover--popconfirm .l-popconfirm-btn) {
|
|
67
66
|
height: 24px;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
.l-popover--popconfirm .l-popconfirm-btn::part(default) {
|
|
69
|
+
:where(.l-popover--popconfirm .l-popconfirm-btn)::part(default) {
|
|
71
70
|
padding: 0 6px;
|
|
72
71
|
font-size: 13px;
|
|
73
72
|
}
|
|
74
73
|
|
|
75
|
-
.l-popover--tooltip,
|
|
76
|
-
.l-popover--popconfirm,
|
|
77
|
-
.l-popover--default {
|
|
74
|
+
:where(.l-popover--tooltip, .l-popover--popconfirm, .l-popover--default) {
|
|
78
75
|
padding: 10px;
|
|
79
76
|
}
|
package/styles/reset.css
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/* 一般开发网页的时候,都是按照100%来开发 */
|
|
2
|
-
html {
|
|
2
|
+
:where(html) {
|
|
3
3
|
font-size: 62.5%;
|
|
4
4
|
}
|
|
5
|
-
html,
|
|
6
|
-
body {
|
|
5
|
+
:where(html, body) {
|
|
7
6
|
height: 100%;
|
|
8
7
|
}
|
|
9
|
-
body {
|
|
8
|
+
:where(body) {
|
|
10
9
|
margin: 0;
|
|
11
10
|
font-size: 14px;
|
|
12
11
|
line-height: 1.6;
|
|
@@ -14,49 +13,48 @@ body {
|
|
|
14
13
|
-webkit-tap-highlight-color: transparent;
|
|
15
14
|
}
|
|
16
15
|
/* 修复由于 inline baseline 导致的图片下方的空白间隙问题 */
|
|
17
|
-
img {
|
|
16
|
+
:where(img) {
|
|
18
17
|
vertical-align: top;
|
|
19
18
|
}
|
|
20
19
|
/* 非大面积文字排版网站通常不需要列表项,如果需要可单独设置 */
|
|
21
|
-
ul,
|
|
22
|
-
ol {
|
|
20
|
+
:where(ul, ol) {
|
|
23
21
|
list-style: none;
|
|
24
22
|
margin: 0;
|
|
25
23
|
padding: 0;
|
|
26
24
|
}
|
|
27
|
-
dialog {
|
|
25
|
+
:where(dialog) {
|
|
28
26
|
border: none;
|
|
29
27
|
outline: none;
|
|
30
28
|
padding: 0;
|
|
31
29
|
opacity: 0;
|
|
32
30
|
transition: opacity 3s;
|
|
33
31
|
}
|
|
34
|
-
dialog[open] {
|
|
32
|
+
:where(dialog)[open] {
|
|
35
33
|
opacity: 1;
|
|
36
34
|
}
|
|
37
35
|
/* 统一采用盒子模式 */
|
|
38
|
-
div {
|
|
36
|
+
:where(div) {
|
|
39
37
|
box-sizing: border-box;
|
|
40
38
|
}
|
|
41
39
|
/*
|
|
42
40
|
* 去除链接默认的下划线,提高文字可读性
|
|
43
41
|
*/
|
|
44
|
-
a {
|
|
42
|
+
:where(a) {
|
|
45
43
|
text-decoration: none;
|
|
46
44
|
color: #4998f6;
|
|
47
45
|
cursor: pointer;
|
|
48
46
|
transition: color 0.3s;
|
|
49
47
|
}
|
|
50
|
-
a:hover {
|
|
48
|
+
:where(a):hover {
|
|
51
49
|
color: #5ba2f7; /* less tint(#4998f6, 10%) */
|
|
52
50
|
}
|
|
53
|
-
a:active {
|
|
51
|
+
:where(a):active {
|
|
54
52
|
color: #64a7f7; /* less tint(#4998f6, 15%) */
|
|
55
53
|
}
|
|
56
54
|
|
|
57
|
-
p {
|
|
55
|
+
:where(p) {
|
|
58
56
|
margin: 5px 0;
|
|
59
57
|
font-size: 16px;
|
|
60
58
|
line-height: 1.4;
|
|
61
59
|
color: #333;
|
|
62
|
-
}
|
|
60
|
+
}
|
package/styles/scrollbar.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@media screen and (min-width: 768px) {
|
|
2
|
-
.l-scrollbar {
|
|
2
|
+
:where(.l-scrollbar) {
|
|
3
3
|
/* 滑块背景色 */
|
|
4
4
|
--l-scrollbar-bg: #d9d9d9;
|
|
5
5
|
/* 滑块尺寸, 水平滚动条时为高度,垂直时为宽度 */
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
overflow: auto;
|
|
10
10
|
scroll-behavior: smooth;
|
|
11
11
|
}
|
|
12
|
-
.l-scrollbar::-webkit-scrollbar-thumb {
|
|
12
|
+
:where(.l-scrollbar)::-webkit-scrollbar-thumb {
|
|
13
13
|
background: var(--l-scrollbar-bg);
|
|
14
14
|
border-radius: calc(var(--l-scrollbar-size) / 2);
|
|
15
15
|
}
|
|
16
|
-
.l-scrollbar::-webkit-scrollbar {
|
|
16
|
+
:where(.l-scrollbar)::-webkit-scrollbar {
|
|
17
17
|
width: var(--l-scrollbar-size);
|
|
18
18
|
height: var(--l-scrollbar-size);
|
|
19
19
|
}
|
|
20
|
-
.l-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
20
|
+
:where(.l-scrollbar)::-webkit-scrollbar-thumb:hover {
|
|
21
21
|
background: var(--l-scrollbar-hover);
|
|
22
22
|
}
|
|
23
|
-
}
|
|
23
|
+
}
|
package/styles/select.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.l-popover--select {
|
|
1
|
+
:where(.l-popover--select) {
|
|
2
2
|
--l-select-option-hover-background: var(--l-primary-color-light4, #722ed1);
|
|
3
3
|
max-height: 200px;
|
|
4
4
|
overflow: auto;
|
|
5
5
|
padding: 0;
|
|
6
6
|
box-sizing: border-box;
|
|
7
7
|
}
|
|
8
|
-
.l-select-option {
|
|
8
|
+
:where(.l-select-option) {
|
|
9
9
|
padding: 10px;
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
transition: background-color 0.3s;
|
|
@@ -16,22 +16,22 @@
|
|
|
16
16
|
line-height: 1;
|
|
17
17
|
font-size: 14px;
|
|
18
18
|
}
|
|
19
|
-
.l-select-option-content {
|
|
19
|
+
:where(.l-select-option-content) {
|
|
20
20
|
display: inline-block;
|
|
21
21
|
max-width: 100%;
|
|
22
22
|
white-space: nowrap;
|
|
23
23
|
overflow: hidden;
|
|
24
24
|
text-overflow: ellipsis;
|
|
25
25
|
}
|
|
26
|
-
.l-select-option:hover {
|
|
26
|
+
:where(.l-select-option):hover {
|
|
27
27
|
background-color: var(--l-select-option-hover-background);
|
|
28
28
|
}
|
|
29
29
|
.l-select-option--empty {
|
|
30
30
|
--l-select-option-hover-background: transparent;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
cursor: default;
|
|
33
|
-
color: var(--l-
|
|
33
|
+
color: var(--l-text-color, #999);
|
|
34
34
|
}
|
|
35
35
|
.l-select-option--selected {
|
|
36
36
|
color: var(--l-primary-color-light1, #9254de);
|
|
37
|
-
}
|
|
37
|
+
}
|
package/styles/tabs.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.l-tabs-main {
|
|
1
|
+
:where(.l-tabs-main) {
|
|
2
2
|
margin-top: 15px;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
display: none;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.l-tabs-card .l-tabs-main {
|
|
9
|
+
.l-tabs-card :where(.l-tabs-main) {
|
|
10
10
|
margin-top: 0;
|
|
11
11
|
border: 1px solid #f5f7fa;
|
|
12
12
|
border-top-width: 0;
|
|
13
|
-
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* 珊瑚红主题 · #FF6448,先引入 vars.css */
|
|
2
|
+
:root {
|
|
3
|
+
/* 主题色 */
|
|
4
|
+
--l-primary-color: #ff6448;
|
|
5
|
+
--l-primary-color-light1: #ff836d;
|
|
6
|
+
--l-primary-color-light2: #ffa291;
|
|
7
|
+
--l-primary-color-light3: #ffc1b6;
|
|
8
|
+
--l-primary-color-light4: #ffe0da;
|
|
9
|
+
--l-primary-color-light5: #fff0ed;
|
|
10
|
+
--l-primary-color-dark1: #cc503a;
|
|
11
|
+
--l-primary-color-dark2: #993c2b;
|
|
12
|
+
/* 状态色:保持成功、错误和警告的语义区别 */
|
|
13
|
+
--l-success-color: #409b72;
|
|
14
|
+
--l-success-color-light1: #66af8e;
|
|
15
|
+
--l-success-color-light2: #8cc3aa;
|
|
16
|
+
--l-success-color-light3: #b3d7c7;
|
|
17
|
+
--l-success-color-light4: #d9ebe3;
|
|
18
|
+
--l-success-color-light5: #ecf5f1;
|
|
19
|
+
--l-success-color-dark1: #337c5b;
|
|
20
|
+
--l-error-color: #d9364f;
|
|
21
|
+
--l-error-color-light3: #f0afb9;
|
|
22
|
+
--l-error-color-light5: #fbebed;
|
|
23
|
+
--l-warning-color: #d99420;
|
|
24
|
+
--l-warning-color-light5: #fbf4e9;
|
|
25
|
+
--l-text-color: #8c7c78;
|
|
26
|
+
--l-text-secondary-color: #f9f8f8;
|
|
27
|
+
/* 中性色 */
|
|
28
|
+
--l-border-color: #e8dcd8;
|
|
29
|
+
--l-disabled-color: #efe7e4;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* 暗黑模式下保持禁用状态的可辨识度 */
|
|
33
|
+
:root.dark {
|
|
34
|
+
--l-disabled-color: #6c6c6c;
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* 翡翠绿主题 · #00AA7E,先引入 vars.css */
|
|
2
|
+
:root {
|
|
3
|
+
/* 主题色 */
|
|
4
|
+
--l-primary-color: #00aa7e;
|
|
5
|
+
--l-primary-color-light1: #33bb98;
|
|
6
|
+
--l-primary-color-light2: #66ccb2;
|
|
7
|
+
--l-primary-color-light3: #99ddcb;
|
|
8
|
+
--l-primary-color-light4: #cceee5;
|
|
9
|
+
--l-primary-color-light5: #e6f7f2;
|
|
10
|
+
--l-primary-color-dark1: #008865;
|
|
11
|
+
--l-primary-color-dark2: #00664c;
|
|
12
|
+
/* 状态色:保持成功、错误和警告的语义区别 */
|
|
13
|
+
--l-success-color: #389e60;
|
|
14
|
+
--l-success-color-light1: #60b180;
|
|
15
|
+
--l-success-color-light2: #88c5a0;
|
|
16
|
+
--l-success-color-light3: #afd8bf;
|
|
17
|
+
--l-success-color-light4: #d7ecdf;
|
|
18
|
+
--l-success-color-light5: #ebf5ef;
|
|
19
|
+
--l-success-color-dark1: #2d7e4d;
|
|
20
|
+
--l-error-color: #df4b52;
|
|
21
|
+
--l-error-color-light3: #f2b7ba;
|
|
22
|
+
--l-error-color-light5: #fcedee;
|
|
23
|
+
--l-warning-color: #d99016;
|
|
24
|
+
--l-warning-color-light5: #fbf4e8;
|
|
25
|
+
--l-text-color: #738780;
|
|
26
|
+
--l-text-secondary-color: #f8f9f9;
|
|
27
|
+
/* 中性色 */
|
|
28
|
+
--l-border-color: #d8e5e0;
|
|
29
|
+
--l-disabled-color: #e5ece9;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* 暗黑模式下保持禁用状态的可辨识度 */
|
|
33
|
+
:root.dark {
|
|
34
|
+
--l-disabled-color: #6c6c6c;
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* 活力橙主题 · #FF7802,先引入 vars.css */
|
|
2
|
+
:root {
|
|
3
|
+
/* 主题色 */
|
|
4
|
+
--l-primary-color: #ff7802;
|
|
5
|
+
--l-primary-color-light1: #ff9335;
|
|
6
|
+
--l-primary-color-light2: #ffae67;
|
|
7
|
+
--l-primary-color-light3: #ffc99a;
|
|
8
|
+
--l-primary-color-light4: #ffe4cc;
|
|
9
|
+
--l-primary-color-light5: #fff2e6;
|
|
10
|
+
--l-primary-color-dark1: #cc6002;
|
|
11
|
+
--l-primary-color-dark2: #994801;
|
|
12
|
+
/* 状态色:保持成功、错误和警告的语义区别 */
|
|
13
|
+
--l-success-color: #489b60;
|
|
14
|
+
--l-success-color-light1: #6daf80;
|
|
15
|
+
--l-success-color-light2: #91c3a0;
|
|
16
|
+
--l-success-color-light3: #b6d7bf;
|
|
17
|
+
--l-success-color-light4: #daebdf;
|
|
18
|
+
--l-success-color-light5: #edf5ef;
|
|
19
|
+
--l-success-color-dark1: #3a7c4d;
|
|
20
|
+
--l-error-color: #dc4848;
|
|
21
|
+
--l-error-color-light3: #f1b6b6;
|
|
22
|
+
--l-error-color-light5: #fceded;
|
|
23
|
+
--l-warning-color: #d9a11b;
|
|
24
|
+
--l-warning-color-light5: #fbf6e8;
|
|
25
|
+
--l-text-color: #8a8073;
|
|
26
|
+
--l-text-secondary-color: #f9f9f8;
|
|
27
|
+
/* 中性色 */
|
|
28
|
+
--l-border-color: #e8dfd3;
|
|
29
|
+
--l-disabled-color: #eee9e1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* 暗黑模式下保持禁用状态的可辨识度 */
|
|
33
|
+
:root.dark {
|
|
34
|
+
--l-disabled-color: #6c6c6c;
|
|
35
|
+
}
|
package/styles/transition.css
CHANGED
package/styles/vars.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
/* button、input 元素高度 */
|
|
3
|
-
--l-form-control-height:
|
|
3
|
+
--l-form-control-height: 40px;
|
|
4
4
|
/** 禁用状态颜色 */
|
|
5
5
|
--l-disabled-color: #e6e6e6;
|
|
6
6
|
/* 主题(primary)颜色 - 明亮蓝系列 */
|
|
@@ -24,12 +24,46 @@
|
|
|
24
24
|
--l-success-color-light4: #d9f7be;
|
|
25
25
|
--l-success-color-light5: #f6ffed;
|
|
26
26
|
--l-success-color-dark1: #389e0d;
|
|
27
|
-
/* 表示警告(
|
|
28
|
-
--l-
|
|
29
|
-
/*
|
|
30
|
-
--l-
|
|
31
|
-
--l-
|
|
27
|
+
/* 表示警告(warning)的颜色 */
|
|
28
|
+
--l-warning-color: #f90;
|
|
29
|
+
/* 文字颜色 */
|
|
30
|
+
--l-text-color: rgba(0, 0, 0, 0.88);
|
|
31
|
+
--l-text-secondary-color: rgba(0, 0, 0, 0.45);
|
|
32
32
|
/* 边框颜色 */
|
|
33
33
|
--l-border-color: #dedede;
|
|
34
|
-
--l-border-radius:
|
|
34
|
+
--l-border-radius: 5px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* 暗黑模式 */
|
|
38
|
+
:root.dark {
|
|
39
|
+
--l-disabled-color: #6c6c6c;
|
|
40
|
+
/* 表格配置 */
|
|
41
|
+
--l-table-border-color: #444444;
|
|
42
|
+
--l-table-th-bg: #2d2d2d;
|
|
43
|
+
--l-table-th-color: #e0e0e0;
|
|
44
|
+
--l-table-td-bg: #1e1e1e;
|
|
45
|
+
--l-table-td-color: #e0e0e0;
|
|
46
|
+
--l-table-row-hover-bg: #333333;
|
|
47
|
+
--l-table-empty-color: #888888;
|
|
48
|
+
--l-table-stripe-bg: #252525;
|
|
49
|
+
--l-table-sort-inactive-color: #777777;
|
|
50
|
+
/* Card:仅覆盖暗黑模式中需要变化的值,默认值由组件消费处提供。 */
|
|
51
|
+
--l-card-bg: #232324;
|
|
52
|
+
--l-card-text-color: rgba(255, 255, 255, 0.7);
|
|
53
|
+
--l-card-border-color: rgb(72, 72, 73);
|
|
54
|
+
/* Upload:仅覆盖暗黑模式中需要变化的值,默认值由组件消费处提供。 */
|
|
55
|
+
--l-upload-border-color: rgba(255, 255, 255, 0.2);
|
|
56
|
+
--l-upload-border-hover-color: var(--l-primary-color-light1, #3399ff);
|
|
57
|
+
--l-upload-background: #1e1e1e;
|
|
58
|
+
--l-upload-text-color: rgba(255, 255, 255, 0.88);
|
|
59
|
+
--l-upload-text-secondary-color: rgba(255, 255, 255, 0.45);
|
|
60
|
+
--l-upload-disabled-color: rgba(255, 255, 255, 0.3);
|
|
61
|
+
--l-upload-disabled-background: rgba(255, 255, 255, 0.04);
|
|
62
|
+
--l-upload-disabled-border-color: rgba(255, 255, 255, 0.15);
|
|
63
|
+
--l-upload-list-hover-background: rgba(255, 255, 255, 0.04);
|
|
64
|
+
--l-upload-dragover-background: color-mix(
|
|
65
|
+
in srgb,
|
|
66
|
+
var(--l-primary-color, #007bff) 15%,
|
|
67
|
+
transparent
|
|
68
|
+
);
|
|
35
69
|
}
|
package/lib/base-Dyj1rzaK.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import e from "./base.js";
|
|
2
|
-
import { unitNumberStr as t } from "./utils/index.js";
|
|
3
|
-
//#region src/components/icon/index.less?inline
|
|
4
|
-
var n = ":host{display:inline-flex}.l-icon{fill:currentColor;vertical-align:middle;width:1em;height:1em;color:var(--l-icon-color,inherit);font-size:var(--l-icon-size,inherit);display:inline-block}", r = class extends e {
|
|
5
|
-
static baseName = "base-icon";
|
|
6
|
-
useLink;
|
|
7
|
-
viewBox;
|
|
8
|
-
constructor() {
|
|
9
|
-
super(), this.useLink = !1, this.viewBox = "0 0 1024 1024", this.version = 2, this._state = {};
|
|
10
|
-
}
|
|
11
|
-
static get observedAttributes() {
|
|
12
|
-
return ["color", "size"];
|
|
13
|
-
}
|
|
14
|
-
attributeChanged(e, n, r) {
|
|
15
|
-
switch (e) {
|
|
16
|
-
case "color":
|
|
17
|
-
this._state.color = r;
|
|
18
|
-
break;
|
|
19
|
-
case "size": this._state.size = t(r);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
connectedCallback() {
|
|
23
|
-
super.connectedCallback(), this._updateColor(), this._updateSize();
|
|
24
|
-
}
|
|
25
|
-
updateDOM(e) {
|
|
26
|
-
console.log("up"), e.has("color") && this._updateColor(), e.has("size") && this._updateSize();
|
|
27
|
-
}
|
|
28
|
-
_updateSize() {
|
|
29
|
-
this._state.size ? this.style.setProperty("--l-icon-size", this._state.size) : this.style.removeProperty("--l-icon-size");
|
|
30
|
-
}
|
|
31
|
-
_updateColor() {
|
|
32
|
-
this._state.color ? this.style.setProperty("--l-icon-color", this._state.color) : this.style.removeProperty("--l-icon-color");
|
|
33
|
-
}
|
|
34
|
-
render_v2() {
|
|
35
|
-
let e = this.createEl("svg");
|
|
36
|
-
e.classList.add("l-icon"), this.useLink || e.setAttribute("viewBox", this.viewBox);
|
|
37
|
-
let t = this.renderChildren();
|
|
38
|
-
if (typeof t == "string") {
|
|
39
|
-
if (t === "") {
|
|
40
|
-
let t = this.children, n = [];
|
|
41
|
-
for (let e = 0, r = t.length; e < r; e++) {
|
|
42
|
-
let r = t[e];
|
|
43
|
-
n.push(r.outerHTML);
|
|
44
|
-
}
|
|
45
|
-
e.innerHTML = n.join("");
|
|
46
|
-
} else e.innerHTML = t;
|
|
47
|
-
} else e.append(t);
|
|
48
|
-
return {
|
|
49
|
-
template: e,
|
|
50
|
-
style: n
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
renderChildren() {
|
|
54
|
-
return "";
|
|
55
|
-
}
|
|
56
|
-
createEl(e) {
|
|
57
|
-
return document.createElementNS("http://www.w3.org/2000/svg", e);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
//#endregion
|
|
61
|
-
export { r as t };
|
package/lib/calendar-CvlUsN6w.js
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import e from "./base.js";
|
|
2
|
-
import { parseAttrValue as t } from "./utils/index.js";
|
|
3
|
-
import { $one as n, get as r, hasClass as i, off as a, on as o, shouldEventNext as s } from "ph-utils/browser";
|
|
4
|
-
import { endOf as c, format as l, startOf as u, timestamp as d } from "ph-utils";
|
|
5
|
-
//#region src/components/calendar/index.less?inline
|
|
6
|
-
var f = ":host{box-sizing:border-box;width:100%;height:100%;display:block}.calendar-table{border-collapse:collapse;table-layout:fixed;width:100%;height:100%}.calendar-table thead{height:var(--l-calendar-header-height,32px)}.calendar-table th{cursor:default;font-weight:400}.calendar-table .excluded{color:var(--l-calendar-off-text-color,#a8abb2)}.day{text-align:center;cursor:pointer;font-size:14px;transition:background-color .2s}:where(.day:hover){background-color:#0000000a}.day.disabled{color:var(--l-calendar-off-text-color,#a8abb2);cursor:not-allowed}.day.active:not(.disabled){background-color:var(--l-primary-color,#007bff);color:#fff;font-weight:700}.day.today{color:var(--l-primary-color,#007bff)}.day.range{background-color:var(--l-primary-color-light4,#cce6ff)}.day.range-start,.day.range-end{background-color:var(--l-primary-color,#007bff);color:#fff}", p = { "zh-CN": { weekdays: [
|
|
7
|
-
"一",
|
|
8
|
-
"二",
|
|
9
|
-
"三",
|
|
10
|
-
"四",
|
|
11
|
-
"五",
|
|
12
|
-
"六",
|
|
13
|
-
"七"
|
|
14
|
-
] } }, m = class extends e {
|
|
15
|
-
static baseName = "calendar";
|
|
16
|
-
_langData;
|
|
17
|
-
$container;
|
|
18
|
-
_selectDates;
|
|
19
|
-
_range;
|
|
20
|
-
_value;
|
|
21
|
-
constructor() {
|
|
22
|
-
super(), this.version = 2;
|
|
23
|
-
let e = r("l_app_locale", "zh-CN", { storage: "session" }), t = /* @__PURE__ */ new Date();
|
|
24
|
-
this._value = "", this._state = {
|
|
25
|
-
locale: e,
|
|
26
|
-
minDate: -Infinity,
|
|
27
|
-
maxDate: Infinity,
|
|
28
|
-
year: t.getFullYear(),
|
|
29
|
-
type: "select",
|
|
30
|
-
month: t.getMonth()
|
|
31
|
-
}, this._langData = p[e], this._selectDates = /* @__PURE__ */ new Set(), this._range = [0, 0];
|
|
32
|
-
}
|
|
33
|
-
get value() {
|
|
34
|
-
return this._value;
|
|
35
|
-
}
|
|
36
|
-
set value(e) {
|
|
37
|
-
this.setValue(e);
|
|
38
|
-
}
|
|
39
|
-
setValue(e) {
|
|
40
|
-
e != this._value && (this._value = e, this._updateValue());
|
|
41
|
-
}
|
|
42
|
-
_updateValue() {
|
|
43
|
-
this._state.type === "range" ? (this._range = this._value ? this._value.split(",").map((e) => /^\d+$/.test(e) ? e.length === 10 ? Number(e) * 1e3 : Number(e) : d(e, "ms")) : [0, 0], this._selectDates.clear()) : (this._selectDates = new Set(this._value.split("&")), this._range = [0, 0]), this.batchUpdate();
|
|
44
|
-
}
|
|
45
|
-
afterInit() {
|
|
46
|
-
this.$container = n(".calendar-table", this.root), o(this.root, "click", this.handleCellClick), o(this.$container, "mouseover", this.handleCellHover);
|
|
47
|
-
}
|
|
48
|
-
beforeDestroy() {
|
|
49
|
-
a(this.root, "click", this.handleCellClick), this.$container &&= (a(this.$container, "mouseover", this.handleCellHover), void 0);
|
|
50
|
-
}
|
|
51
|
-
static get observedAttributes() {
|
|
52
|
-
return [
|
|
53
|
-
"value",
|
|
54
|
-
"locale",
|
|
55
|
-
"year",
|
|
56
|
-
"month",
|
|
57
|
-
"min-date",
|
|
58
|
-
"max-date",
|
|
59
|
-
"type"
|
|
60
|
-
];
|
|
61
|
-
}
|
|
62
|
-
handleCellClick = (e) => {
|
|
63
|
-
let [t, n, r] = s(e, "l-day", this.root);
|
|
64
|
-
t && this._emitDayAction(r, "click", n);
|
|
65
|
-
};
|
|
66
|
-
handleCellHover = (e) => {
|
|
67
|
-
let [t, n, r] = s(e, "l-day", this.root);
|
|
68
|
-
t && this._emitDayAction(r, "hover", n);
|
|
69
|
-
};
|
|
70
|
-
_emitDayAction(e, t, n) {
|
|
71
|
-
this.emit(`day-${t}`, { detail: {
|
|
72
|
-
minTimestamp: this._state.minDate,
|
|
73
|
-
maxTimestamp: this._state.maxDate,
|
|
74
|
-
dayTimestamp: Number(n),
|
|
75
|
-
day: e.title,
|
|
76
|
-
isActiveMonth: !i(e, "excluded")
|
|
77
|
-
} });
|
|
78
|
-
}
|
|
79
|
-
attributeChanged(e, n, r) {
|
|
80
|
-
switch (e) {
|
|
81
|
-
case "locale":
|
|
82
|
-
p.hasOwnProperty(r) && (this._state.locale = r, this._langData = p[r]);
|
|
83
|
-
break;
|
|
84
|
-
case "min-date":
|
|
85
|
-
this._state.minDate = u(r).getTime();
|
|
86
|
-
break;
|
|
87
|
-
case "max-date":
|
|
88
|
-
this._state.maxDate = c(r).getTime();
|
|
89
|
-
break;
|
|
90
|
-
case "year":
|
|
91
|
-
this._state.year = t(r, this._state.year);
|
|
92
|
-
break;
|
|
93
|
-
case "month":
|
|
94
|
-
this._state.month = t(r, this._state.month + 1) - 1;
|
|
95
|
-
break;
|
|
96
|
-
case "type":
|
|
97
|
-
this._state.type = r, this._updateValue();
|
|
98
|
-
break;
|
|
99
|
-
case "value": this.setValue(r);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
updateDOM(e) {
|
|
103
|
-
e.has("locale") ? this.rerenderHeader() : e.has("year") || e.has("month") ? this.$container && (this.$container.innerHTML = this.rerender()) : this.rerenderBody();
|
|
104
|
-
}
|
|
105
|
-
_renderHeader() {
|
|
106
|
-
return `<tr>${this._langData.weekdays.map((e) => `<th>${e}</th>`).join("")}</tr>`;
|
|
107
|
-
}
|
|
108
|
-
_renderBody() {
|
|
109
|
-
let e = this._state.year, t = this._state.month, n = l(null, "yyyy-mm-dd"), r = new Date(e, t, 1), i = r.getDay() - 1;
|
|
110
|
-
i < 0 && (i = 6);
|
|
111
|
-
let a = new Date(e, t + 1, 0), o = a.getDate(), s = l(a, "yyyy-mm"), c = new Date(e, t, 0), u = c.getDate(), d = l(c, "yyyy-mm"), f = new Date(e, t + 1, 1), p = l(f, "yyyy-mm"), m = new Date(r);
|
|
112
|
-
m.setDate(m.getDate() - i);
|
|
113
|
-
let h = m.setHours(0, 0, 0, 0), g = "", [_, v] = this._range || [];
|
|
114
|
-
for (let e = 0; e < 42; e++) {
|
|
115
|
-
e % 7 == 0 && (g += "<tr>");
|
|
116
|
-
let t, r = "day", a = "";
|
|
117
|
-
e < i ? (t = `${u - i + e + 1}`, r += " excluded", a = d) : e < i + o ? (t = `${e - i + 1}`, a = s) : (t = `${e - i - o + 1}`, r += " excluded", a = p), (h < this._state.minDate || h > this._state.maxDate) && (r += " disabled");
|
|
118
|
-
let c = `${a}-${t.padStart(2, "0")}`;
|
|
119
|
-
c === n && (r += " today"), this._selectDates.has(c) && (r += " active"), _ && v && (_ === h ? r += " range-start" : v === h ? r += " range-end" : _ < h && h < v && (r += " range")), g += `<td class="${r}" title="${c}" l-day="${h}">${t}</td>`, h += 864e5, e % 7 == 6 && (g += "</tr>");
|
|
120
|
-
}
|
|
121
|
-
return g;
|
|
122
|
-
}
|
|
123
|
-
rerenderHeader() {
|
|
124
|
-
if (this.$container) {
|
|
125
|
-
let e = n("thead", this.$container);
|
|
126
|
-
e.innerHTML = this._renderHeader();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
rerenderBody() {
|
|
130
|
-
if (this.$container) {
|
|
131
|
-
let e = n("tbody", this.$container);
|
|
132
|
-
e.innerHTML = this._renderBody();
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
rerender() {
|
|
136
|
-
return `<thead>${this._renderHeader()}</thead><tbody>${this._renderBody()}</tbody>`;
|
|
137
|
-
}
|
|
138
|
-
render_v2() {
|
|
139
|
-
return {
|
|
140
|
-
template: `<table class="calendar-table" l-day="__stop__">${this.rerender()}</table>`,
|
|
141
|
-
style: [f]
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
//#endregion
|
|
146
|
-
export { m as t };
|
package/lib/card-3DM-lJQV.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import e from "./base.js";
|
|
2
|
-
import { kebabToCamel as t, parseAttrValue as n } from "./utils/index.js";
|
|
3
|
-
import { $$ as r } from "ph-utils/browser";
|
|
4
|
-
//#region src/components/card/index.less?inline
|
|
5
|
-
var i = ":host{--l-card-bg:#fff;--l-card-text-color:#333;--l-card-border-color:var(--l-border-color,#e8e8e8);border:1px solid var(--l-card-border-color);background-color:var(--l-card-bg);color:var(--l-card-text-color);border-radius:4px;display:block;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a}.l-card__header{border-bottom:1px solid var(--l-card-border-color);box-sizing:border-box;justify-content:space-between;align-items:center;padding:15px;display:flex}.l-card__footer{border-top:1px solid var(--l-card-border-color);box-sizing:border-box;padding:15px}.l-card__body{padding:15px}.l-header-extra:empty{display:none}:host-context(html.dark){--l-card-bg:#232324;--l-card-text-color:#ffffffb3;--l-card-border-color:#484849}", a = class extends e {
|
|
6
|
-
static baseName = "card";
|
|
7
|
-
constructor() {
|
|
8
|
-
super(), this.version = 2, this._state = {
|
|
9
|
-
headerText: "",
|
|
10
|
-
showHeader: !0,
|
|
11
|
-
footerText: "",
|
|
12
|
-
showFooter: !1
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
static get observedAttributes() {
|
|
16
|
-
return [
|
|
17
|
-
"header-text",
|
|
18
|
-
"show-header",
|
|
19
|
-
"footer-text",
|
|
20
|
-
"show-footer"
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
attributeChanged(e, r, i) {
|
|
24
|
-
switch (e) {
|
|
25
|
-
case "header-text":
|
|
26
|
-
case "footer-text":
|
|
27
|
-
this._state[t(e)] = i;
|
|
28
|
-
break;
|
|
29
|
-
case "show-header":
|
|
30
|
-
case "show-footer": this._state[t(e)] = n(i, !1, e);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
render_v2() {
|
|
34
|
-
return {
|
|
35
|
-
style: i,
|
|
36
|
-
template: this.render()
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
render() {
|
|
40
|
-
let e = document.createDocumentFragment();
|
|
41
|
-
if (this._state.showHeader) {
|
|
42
|
-
let t = r("div", {
|
|
43
|
-
class: "l-card__header",
|
|
44
|
-
part: "header"
|
|
45
|
-
}, [this._state.headerText ? r("span", { textContent: this._state.headerText }) : r("slot", { name: "header" }), r("slot", { name: "header-extra" })]);
|
|
46
|
-
e.appendChild(t);
|
|
47
|
-
}
|
|
48
|
-
let t = r("div", {
|
|
49
|
-
class: "l-card__body",
|
|
50
|
-
part: "body"
|
|
51
|
-
}, [r("slot")]);
|
|
52
|
-
if (e.appendChild(t), this._state.showFooter) {
|
|
53
|
-
let t = r("div", {
|
|
54
|
-
class: "l-card__footer",
|
|
55
|
-
part: "footer"
|
|
56
|
-
}, [this._state.footerText ? r("span", { textContent: this._state.footerText }) : r("slot", { name: "footer" })]);
|
|
57
|
-
e.appendChild(t);
|
|
58
|
-
}
|
|
59
|
-
return e;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
//#endregion
|
|
63
|
-
export { a as t };
|