litos-ui 0.21.0 → 0.23.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 +121 -15
- package/README.zh-CN.md +155 -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 +8 -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 +10 -10
- package/lib/{dialog_container_style-C1s0aBf7.js → dialog/dialog_container.css_inline.js} +2 -3
- package/lib/dialog/dialog_container.d.ts +1 -0
- package/lib/dialog/dialog_container.js +71 -60
- package/lib/dialog/dialog_container_style.js +8 -2
- package/lib/dialog/index.d.ts +1 -0
- package/lib/dialog/index.js +11 -6
- 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-box.d.ts +2 -0
- package/lib/entries/notification-box.js +2 -0
- package/lib/entries/notification.d.ts +2 -0
- package/lib/entries/notification.js +2 -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/base.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/icon_style.js +8 -2
- package/lib/{icon_style-J7iiDS_a.js → icon/index.less_inline.js} +2 -3
- package/lib/icon/minus.d.ts +5 -0
- package/lib/icon/minus.js +10 -0
- 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/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 +12 -0
- package/lib/index.js +48 -40
- 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.js +3 -3
- package/lib/{style-C5wUmE2b.js → input_number/index.less_inline.js} +2 -3
- package/lib/input_number/style.js +8 -2
- 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.js +21 -22
- package/lib/notification/index.d.ts +171 -0
- package/lib/notification/index.js +326 -0
- package/lib/notification/index.less_inline.js +4 -0
- package/lib/notification/notification_box.d.ts +40 -0
- package/lib/notification/notification_box.js +57 -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 +8 -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 +8 -2
- package/lib/{mask-Ox6CoyFB.js → styles/mask/index.css_inline.js} +2 -3
- package/lib/styles/mask/index.js +8 -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 +8 -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/dark.css +21 -1
- 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 +7 -7
- 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/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
|
@@ -31,6 +31,7 @@ export default class DialogContainer extends BaseComponent<DialogContainerState>
|
|
|
31
31
|
beforeDestroy(): void;
|
|
32
32
|
static get observedAttributes(): string[] | null | undefined;
|
|
33
33
|
protected attributeChanged(name: string, oldValue: string, newValue: string): void;
|
|
34
|
+
protected updateDOM(changedProps: Set<string>): void;
|
|
34
35
|
render_v2(): {
|
|
35
36
|
template: DocumentFragment;
|
|
36
37
|
styleSheets: CSSStyleSheet[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import e from "../base.js";
|
|
2
|
-
import { t } from "../
|
|
3
|
-
import
|
|
2
|
+
import { parseAttrValue as t } from "../utils/index.js";
|
|
3
|
+
import n from "./dialog_container_style.js";
|
|
4
|
+
import { $ as r, $$ as i, $one as a, formatClass as o, iterate as s, off as c, on as l, shouldEventNext as u } from "utilane/browser";
|
|
4
5
|
//#region src/components/dialog/dialog_container.ts
|
|
5
|
-
var
|
|
6
|
+
var d = class extends e {
|
|
6
7
|
static baseName = "dialog-container";
|
|
7
8
|
constructor() {
|
|
8
9
|
super(), this.version = 2, this._state = {
|
|
@@ -19,19 +20,19 @@ var u = class extends e {
|
|
|
19
20
|
}
|
|
20
21
|
afterInit() {
|
|
21
22
|
this._state.close === 2 && this.classList.add("l-container-close-outside");
|
|
22
|
-
let e =
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
let e = r("[data-action]", this.root);
|
|
24
|
+
s(e, (e) => {
|
|
25
|
+
l(e, "click", this.#e);
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
beforeDestroy() {
|
|
28
|
-
let e =
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
let e = r("[data-action]", this.root);
|
|
30
|
+
s(e, (e) => {
|
|
31
|
+
c(e, "click", this.#e);
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
#e(e) {
|
|
34
|
-
let [t, n] =
|
|
35
|
+
let [t, n] = u(e, "data-action");
|
|
35
36
|
t && this.emit("dialogAction", { detail: { action: n } });
|
|
36
37
|
}
|
|
37
38
|
static get observedAttributes() {
|
|
@@ -49,108 +50,118 @@ var u = class extends e {
|
|
|
49
50
|
"confirm-loading"
|
|
50
51
|
];
|
|
51
52
|
}
|
|
52
|
-
attributeChanged(e,
|
|
53
|
+
attributeChanged(e, n, r) {
|
|
53
54
|
switch (e) {
|
|
54
55
|
case "show-header":
|
|
55
|
-
this._state.showHeader =
|
|
56
|
+
this._state.showHeader = t(r, !0, e), this.connectedCallback();
|
|
56
57
|
break;
|
|
57
58
|
case "header":
|
|
58
|
-
this._state.header =
|
|
59
|
+
this._state.header = r || void 0, this.connectedCallback();
|
|
59
60
|
break;
|
|
60
61
|
case "show-footer":
|
|
61
|
-
this._state.showFooter =
|
|
62
|
+
this._state.showFooter = t(r, !0, e);
|
|
62
63
|
break;
|
|
63
64
|
case "show-cancel":
|
|
64
|
-
this._state.showCancel =
|
|
65
|
+
this._state.showCancel = t(r, !0, e), this.connectedCallback();
|
|
65
66
|
break;
|
|
66
67
|
case "cancel-text":
|
|
67
|
-
this._state.cancelText =
|
|
68
|
+
this._state.cancelText = r || "取消", this.connectedCallback();
|
|
68
69
|
break;
|
|
69
70
|
case "show-ok":
|
|
70
|
-
this._state.showOk =
|
|
71
|
+
this._state.showOk = t(r, !0, e), this.connectedCallback();
|
|
71
72
|
break;
|
|
72
73
|
case "ok-text":
|
|
73
|
-
this._state.okText =
|
|
74
|
+
this._state.okText = r || "确定", this.connectedCallback();
|
|
74
75
|
break;
|
|
75
76
|
case "close":
|
|
76
|
-
this._state.close = Number(
|
|
77
|
-
let
|
|
78
|
-
this._state.close === 0 &&
|
|
77
|
+
this._state.close = Number(r), this._state.close === 2 ? this.classList.add("l-container-close-outside") : this.classList.remove("l-container-close-outside");
|
|
78
|
+
let n = a(".l-btn-dialog-close", this.root);
|
|
79
|
+
this._state.close === 0 && n ? (c(n, "click", this.#e), n.remove()) : n ? n.className = this.#t() : (n = this.#n(), l(n, "click", this.#e), this.root.appendChild(n));
|
|
79
80
|
break;
|
|
80
81
|
case "container-class":
|
|
81
|
-
this._state.containerClass =
|
|
82
|
+
this._state.containerClass = r || void 0, this.connectedCallback();
|
|
82
83
|
break;
|
|
83
84
|
case "mobile":
|
|
84
|
-
this._state.mobile =
|
|
85
|
+
this._state.mobile = t(r, !1, e), this.connectedCallback();
|
|
85
86
|
break;
|
|
86
87
|
case "confirm-loading":
|
|
87
|
-
this._state.confirmLoading =
|
|
88
|
-
let
|
|
89
|
-
|
|
88
|
+
this._state.confirmLoading = t(r, !1, e);
|
|
89
|
+
let i = a("[data-action=\"ok\"]", this.root);
|
|
90
|
+
i && i.setAttribute("loading", this._state.confirmLoading.toString());
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
#t() {
|
|
93
94
|
return `l-btn-dialog-close l-dialog-close${this._state.close}`;
|
|
94
95
|
}
|
|
95
96
|
#n() {
|
|
96
|
-
let e =
|
|
97
|
+
let e = i("l-button", {
|
|
97
98
|
shape: "circle",
|
|
98
99
|
type: "normal",
|
|
99
100
|
class: this.#t(),
|
|
100
101
|
"data-action": "close",
|
|
101
102
|
part: "close-icon"
|
|
102
|
-
}), t =
|
|
103
|
+
}), t = i("l-close-icon");
|
|
104
|
+
return e.appendChild(t), e;
|
|
105
|
+
}
|
|
106
|
+
updateDOM(e) {
|
|
107
|
+
if (e.has("show-footer")) {
|
|
108
|
+
let e = a(".l-dialog-footer", this.root);
|
|
109
|
+
if (!this._state.showFooter) e && e.remove();
|
|
110
|
+
else if (!e) {
|
|
111
|
+
let e = a(".l-dialog-main", this.root);
|
|
112
|
+
e && e.appendChild(this.#r());
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
#r() {
|
|
117
|
+
let e = i("div", {
|
|
118
|
+
class: "l-dialog-footer",
|
|
119
|
+
part: "footer"
|
|
120
|
+
}), t = i("slot", { name: "footer" });
|
|
121
|
+
if (this._state.showCancel) {
|
|
122
|
+
let e = i("l-button", {
|
|
123
|
+
"data-action": "cancel",
|
|
124
|
+
text: this._state.mobile
|
|
125
|
+
});
|
|
126
|
+
e.textContent = this._state.cancelText, t.appendChild(e);
|
|
127
|
+
}
|
|
128
|
+
if (this._state.showOk) {
|
|
129
|
+
let e = i("l-button", {
|
|
130
|
+
type: "primary",
|
|
131
|
+
"data-action": "ok",
|
|
132
|
+
loading: this._state.confirmLoading,
|
|
133
|
+
text: this._state.mobile
|
|
134
|
+
});
|
|
135
|
+
e.textContent = this._state.okText, t.appendChild(e);
|
|
136
|
+
}
|
|
103
137
|
return e.appendChild(t), e;
|
|
104
138
|
}
|
|
105
139
|
render_v2() {
|
|
106
140
|
return {
|
|
107
141
|
template: this.render(),
|
|
108
|
-
styleSheets: [
|
|
142
|
+
styleSheets: [n]
|
|
109
143
|
};
|
|
110
144
|
}
|
|
111
145
|
render() {
|
|
112
146
|
let e = document.createDocumentFragment();
|
|
113
147
|
this._state.close !== 0 && e.appendChild(this.#n());
|
|
114
|
-
let t =
|
|
148
|
+
let t = i("div", {
|
|
115
149
|
class: ["l-dialog-main", this._state.mobile ? "l-dialog-main--mobile" : ""],
|
|
116
150
|
part: "main"
|
|
117
151
|
});
|
|
118
152
|
if (this._state.showHeader) {
|
|
119
|
-
let e =
|
|
153
|
+
let e = i("header", {
|
|
120
154
|
class: "l-dialog-header",
|
|
121
155
|
part: "header"
|
|
122
|
-
}), n =
|
|
156
|
+
}), n = i("slot", { name: "header" });
|
|
123
157
|
n.textContent = this._state.header || "", e.appendChild(n), t.appendChild(e);
|
|
124
158
|
}
|
|
125
|
-
let n =
|
|
126
|
-
class:
|
|
159
|
+
let n = i("div", {
|
|
160
|
+
class: o(["l-dialog-container", this._state.containerClass]),
|
|
127
161
|
part: "container"
|
|
128
|
-
}),
|
|
129
|
-
|
|
130
|
-
let e = r("div", {
|
|
131
|
-
class: "l-dialog-footer",
|
|
132
|
-
part: "footer"
|
|
133
|
-
}), n = r("slot", { name: "footer" });
|
|
134
|
-
if (this._state.showCancel) {
|
|
135
|
-
let e = r("l-button", {
|
|
136
|
-
"data-action": "cancel",
|
|
137
|
-
text: this._state.mobile
|
|
138
|
-
});
|
|
139
|
-
e.textContent = this._state.cancelText, n.appendChild(e);
|
|
140
|
-
}
|
|
141
|
-
if (this._state.showOk) {
|
|
142
|
-
let e = r("l-button", {
|
|
143
|
-
type: "primary",
|
|
144
|
-
"data-action": "ok",
|
|
145
|
-
loading: this._state.confirmLoading,
|
|
146
|
-
text: this._state.mobile
|
|
147
|
-
});
|
|
148
|
-
e.textContent = this._state.okText, n.appendChild(e);
|
|
149
|
-
}
|
|
150
|
-
e.appendChild(n), t.appendChild(e);
|
|
151
|
-
}
|
|
152
|
-
return e.appendChild(t), e;
|
|
162
|
+
}), r = i("slot");
|
|
163
|
+
return n.appendChild(r), t.appendChild(n), this._state.showFooter && t.appendChild(this.#r()), e.appendChild(t), e;
|
|
153
164
|
}
|
|
154
165
|
};
|
|
155
166
|
//#endregion
|
|
156
|
-
export {
|
|
167
|
+
export { d as default };
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import e from "./dialog_container.css_inline.js";
|
|
2
|
+
//#region src/components/dialog/dialog_container_style.ts
|
|
3
|
+
var t = /* @__PURE__ */ (() => {
|
|
4
|
+
let t = new CSSStyleSheet();
|
|
5
|
+
return t.replaceSync(e), t;
|
|
6
|
+
})();
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as default };
|
package/lib/dialog/index.d.ts
CHANGED
package/lib/dialog/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { $one as e, addClass as t, getAttr as n, hasClass as r, off as i, on as a, removeClass as o } from "
|
|
1
|
+
import { $one as e, addClass as t, getAttr as n, hasClass as r, off as i, on as a, removeClass as o } from "utilane/browser";
|
|
2
2
|
//#region src/components/dialog/index.ts
|
|
3
3
|
var s = class {
|
|
4
4
|
$dialog;
|
|
5
5
|
$container;
|
|
6
6
|
config;
|
|
7
|
+
finishClose;
|
|
7
8
|
constructor(e) {
|
|
8
9
|
e != null && this.init(e);
|
|
9
10
|
}
|
|
@@ -39,15 +40,19 @@ var s = class {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
open() {
|
|
42
|
-
this.$dialog && (this.$dialog.showModal(), t(this.$dialog, "l-dialog--open"), t(document.body, "l-body--dialog-open"));
|
|
43
|
+
this.$dialog && (this.finishClose &&= (i(this.$dialog, "transitionend", this.finishClose), void 0), this.$dialog.showModal(), t(this.$dialog, "l-dialog--open"), t(document.body, "l-body--dialog-open"));
|
|
43
44
|
}
|
|
44
45
|
close() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
let e = this.$dialog;
|
|
47
|
+
if (e && !this.finishClose && r(e, "l-dialog--open")) {
|
|
48
|
+
let t = (n) => {
|
|
49
|
+
n && n.target !== e || this.finishClose === t && (i(e, "transitionend", t), this.finishClose = void 0, e.open && e.close(), o(document.body, "l-body--dialog-open"));
|
|
50
|
+
};
|
|
51
|
+
this.finishClose = t, a(e, "transitionend", t), o(e, "l-dialog--open");
|
|
52
|
+
}
|
|
48
53
|
}
|
|
49
54
|
destroy() {
|
|
50
|
-
this.$dialog &&= (this.close(), i(this.$dialog, "keydown", this.handleKeydown), i(this.$dialog, "click", this.handleClick), this.$container && i(this.$container, "dialogAction", this.handleContainerAction), this.$container = void 0, void 0);
|
|
55
|
+
this.$dialog &&= (this.close(), this.finishClose?.(), i(this.$dialog, "keydown", this.handleKeydown), i(this.$dialog, "click", this.handleClick), this.$container && i(this.$container, "dialogAction", this.handleContainerAction), this.$container = void 0, void 0);
|
|
51
56
|
}
|
|
52
57
|
setProp(e, t) {
|
|
53
58
|
if (this.config && (this.config[e] = t, this.$dialog)) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./calendar";
|
|
2
|
+
import "./button";
|
|
3
|
+
import "./icon-calendar";
|
|
4
|
+
import "./icon-arrow-left";
|
|
5
|
+
import "./icon-arrow-right";
|
|
6
|
+
import "./icon-d-arrow-left";
|
|
7
|
+
import "./icon-d-arrow-right";
|
|
8
|
+
export { default } from "../date_picker";
|
|
9
|
+
export * from "../date_picker";
|