litos-ui 0.23.0 → 0.24.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 +2 -2
- package/README.zh-CN.md +2 -2
- package/lib/base.d.ts +3 -2
- package/lib/base.js +11 -8
- package/lib/button/index.d.ts +21 -5
- package/lib/button/index.js +115 -62
- package/lib/button/index.less_inline.js +2 -3
- package/lib/button/style.js +1 -2
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar/index.js +19 -17
- package/lib/calendar/index.less_inline.js +1 -2
- package/lib/calendar/langs.js +21 -11
- package/lib/card/index.js +8 -9
- package/lib/card/index.less_inline.js +1 -2
- package/lib/carousel/index.js +10 -11
- package/lib/carousel/index.less_inline.js +1 -2
- package/lib/carousel/item.js +1 -2
- package/lib/carousel/item.less_inline.js +1 -2
- package/lib/carousel/timer.js +1 -2
- package/lib/check/check.d.ts +40 -8
- package/lib/check/check.js +200 -65
- package/lib/check/check.less_inline.js +2 -3
- package/lib/check/checkbox.js +2 -3
- package/lib/check/checkbox.less_inline.js +2 -3
- package/lib/check/checkbox_group.js +1 -2
- package/lib/check/index.d.ts +28 -8
- package/lib/check/index.js +151 -46
- package/lib/check/index.less_inline.js +1 -2
- package/lib/check/radio.js +2 -3
- package/lib/check/radio.less_inline.js +1 -2
- package/lib/check/radio_group.js +2 -3
- package/lib/collapse/index.d.ts +12 -4
- package/lib/collapse/index.js +80 -46
- package/lib/collapse/index.less_inline.js +2 -3
- package/lib/collapse/item.d.ts +35 -9
- package/lib/collapse/item.js +219 -57
- package/lib/collapse/item.less_inline.js +2 -3
- package/lib/collapse/types.d.ts +17 -3
- package/lib/color_picker/index.d.ts +4 -2
- package/lib/color_picker/index.js +26 -17
- package/lib/color_picker/index.less_inline.js +1 -2
- package/lib/date_picker/index.d.ts +5 -1
- package/lib/date_picker/index.js +39 -23
- package/lib/date_picker/index.less_inline.js +1 -2
- package/lib/date_picker_ori/index.d.ts +7 -2
- package/lib/date_picker_ori/index.js +123 -47
- package/lib/date_picker_ori/index.less_inline.js +1 -2
- package/lib/description_panel/index.js +2 -10
- package/lib/description_panel/index.less_inline.js +1 -2
- package/lib/dialog/dialog_box.js +28 -29
- package/lib/dialog/dialog_container.css_inline.js +1 -2
- package/lib/dialog/dialog_container.js +13 -14
- package/lib/dialog/dialog_container_style.js +1 -2
- package/lib/dialog/index.d.ts +2 -0
- package/lib/dialog/index.js +11 -9
- package/lib/dropdown/index.d.ts +39 -0
- package/lib/dropdown/index.js +98 -0
- package/lib/entries/base.js +1 -2
- package/lib/entries/button.js +5 -6
- package/lib/entries/calendar.js +5 -6
- package/lib/entries/card.js +5 -6
- package/lib/entries/carousel-item.js +5 -6
- package/lib/entries/carousel.js +5 -6
- package/lib/entries/checkbox-group.js +5 -6
- package/lib/entries/checkbox.js +5 -6
- package/lib/entries/collapse-item.d.ts +0 -1
- package/lib/entries/collapse-item.js +6 -6
- package/lib/entries/collapse.d.ts +0 -1
- package/lib/entries/collapse.js +11 -6
- package/lib/entries/color-picker.js +5 -6
- package/lib/entries/date-picker-ori.js +5 -6
- package/lib/entries/date-picker.js +5 -6
- package/lib/entries/description-panel.js +5 -6
- package/lib/entries/dialog-box.js +1 -2
- package/lib/entries/dialog-container.js +5 -6
- package/lib/entries/dialog.js +1 -2
- package/lib/entries/dropdown.d.ts +2 -0
- package/lib/entries/dropdown.js +1 -0
- package/lib/entries/form-item.js +5 -6
- package/lib/entries/form.js +5 -6
- package/lib/entries/icon-arrow-down.js +5 -6
- package/lib/entries/icon-arrow-left.js +5 -6
- package/lib/entries/icon-arrow-right.js +5 -6
- package/lib/entries/icon-arrow-up.js +5 -6
- package/lib/entries/icon-base.js +5 -6
- package/lib/entries/icon-calendar.js +5 -6
- package/lib/entries/icon-caret-bottom.js +5 -6
- package/lib/entries/icon-caret-top.js +5 -6
- package/lib/entries/icon-close-filled.js +5 -6
- package/lib/entries/icon-close.js +5 -6
- package/lib/entries/icon-copy.js +5 -6
- package/lib/entries/icon-d-arrow-left.js +5 -6
- package/lib/entries/icon-d-arrow-right.js +5 -6
- package/lib/entries/icon-delete.js +5 -6
- package/lib/entries/icon-eye-outline.js +5 -6
- package/lib/entries/icon-font-icon.js +5 -6
- package/lib/entries/icon-info.js +5 -6
- package/lib/entries/icon-loading.js +5 -6
- package/lib/entries/icon-minus.js +5 -6
- package/lib/entries/icon-moon.js +5 -6
- package/lib/entries/icon-more.js +5 -6
- package/lib/entries/icon-picture.js +5 -6
- package/lib/entries/icon-plus.js +5 -6
- package/lib/entries/icon-reduction.js +5 -6
- package/lib/entries/icon-refresh-left.js +5 -6
- package/lib/entries/icon-refresh-right.js +5 -6
- package/lib/entries/icon-refresh.js +5 -6
- package/lib/entries/icon-search.js +5 -6
- package/lib/entries/icon-select.js +5 -6
- package/lib/entries/icon-sort.js +5 -6
- package/lib/entries/icon-success.js +5 -6
- package/lib/entries/icon-sun.js +5 -6
- package/lib/entries/icon-theme-default.js +5 -6
- package/lib/entries/icon-warn.js +5 -6
- package/lib/entries/icon-zoom-in.js +5 -6
- package/lib/entries/icon-zoom-out.js +5 -6
- package/lib/entries/image-preview.js +5 -6
- package/lib/entries/image.js +5 -6
- package/lib/entries/input-number.js +5 -6
- package/lib/entries/input.js +5 -6
- package/lib/entries/list.js +5 -6
- package/lib/entries/loading.js +1 -2
- package/lib/entries/mask.js +5 -6
- package/lib/entries/md-input.js +5 -6
- package/lib/entries/menu.js +5 -6
- package/lib/entries/message.js +1 -2
- package/lib/entries/modal-box.js +1 -2
- package/lib/entries/modal.js +5 -6
- package/lib/entries/notification-box.js +1 -2
- package/lib/entries/notification.js +1 -2
- package/lib/entries/page-header.js +5 -6
- package/lib/entries/pagination.js +5 -6
- package/lib/entries/polygon.js +5 -6
- package/lib/entries/popconfirm.js +1 -2
- package/lib/entries/popover.js +1 -2
- package/lib/entries/qrcode.js +5 -6
- package/lib/entries/radio-group.js +5 -6
- package/lib/entries/radio.js +5 -6
- package/lib/entries/select-ori.js +5 -6
- package/lib/entries/select.js +5 -6
- package/lib/entries/space.js +5 -6
- package/lib/entries/switch.js +5 -6
- package/lib/entries/tabbar-item.js +5 -6
- package/lib/entries/tabbar.js +5 -6
- package/lib/entries/table.js +5 -6
- package/lib/entries/tabs.js +1 -2
- package/lib/entries/tag.js +5 -6
- package/lib/entries/theme-color.js +5 -6
- package/lib/entries/theme.js +5 -6
- package/lib/entries/transition.js +1 -2
- package/lib/entries/upload.js +5 -6
- package/lib/entries/utils.js +1 -2
- package/lib/form/accessibility.d.ts +15 -0
- package/lib/form/accessibility.js +56 -0
- package/lib/form/autocomplete.d.ts +21 -0
- package/lib/form/autocomplete.js +59 -0
- package/lib/form/context.d.ts +157 -0
- package/lib/form/context.js +88 -0
- package/lib/form/form_inner.d.ts +99 -24
- package/lib/form/form_inner.js +424 -72
- package/lib/form/form_item.d.ts +35 -11
- package/lib/form/form_item.js +210 -78
- package/lib/form/form_item.less_inline.js +2 -3
- package/lib/form/form_item_style.d.ts +3 -0
- package/lib/form/form_item_style.js +7 -0
- package/lib/form/index.d.ts +69 -15
- package/lib/form/index.js +501 -101
- package/lib/form/index.less_inline.js +1 -2
- package/lib/form/owner.d.ts +78 -0
- package/lib/form/owner.js +138 -0
- package/lib/form/style.d.ts +3 -0
- package/lib/form/style.js +7 -0
- package/lib/icon/arrow_down.js +1 -2
- package/lib/icon/arrow_left.js +1 -2
- package/lib/icon/arrow_right.js +1 -2
- package/lib/icon/arrow_up.js +1 -2
- package/lib/icon/base.js +1 -2
- package/lib/icon/calendar.js +1 -2
- package/lib/icon/caret_bottom.js +1 -2
- package/lib/icon/caret_top.js +1 -2
- package/lib/icon/close.js +1 -2
- package/lib/icon/close_filled.js +1 -2
- package/lib/icon/copy.js +1 -2
- package/lib/icon/d_arrow_left.js +1 -2
- package/lib/icon/d_arrow_right.js +1 -2
- package/lib/icon/delete.js +1 -2
- package/lib/icon/eye_outline.js +1 -2
- package/lib/icon/font_icon.js +1 -2
- package/lib/icon/icon_style.js +1 -2
- package/lib/icon/index.less_inline.js +1 -2
- package/lib/icon/info.js +1 -2
- package/lib/icon/loading.js +1 -2
- package/lib/icon/minus.js +1 -2
- package/lib/icon/moon.js +1 -2
- package/lib/icon/more.js +1 -2
- package/lib/icon/picture.js +1 -2
- package/lib/icon/plus.js +1 -2
- package/lib/icon/reduction.js +1 -2
- package/lib/icon/refresh.js +1 -2
- package/lib/icon/refresh_left.js +1 -2
- package/lib/icon/refresh_right.js +1 -2
- package/lib/icon/search.js +1 -2
- package/lib/icon/select.js +1 -2
- package/lib/icon/sort.js +1 -2
- package/lib/icon/success.js +1 -2
- package/lib/icon/sun.js +1 -2
- package/lib/icon/theme_default.js +1 -2
- package/lib/icon/warn.js +1 -2
- package/lib/icon/zoom_in.js +1 -2
- package/lib/icon/zoom_out.js +1 -2
- package/lib/image/image_preview.js +1 -2
- package/lib/image/image_preview.less_inline.js +1 -2
- package/lib/image/index.js +1 -2
- package/lib/image/index.less_inline.js +1 -2
- package/lib/index.d.ts +2 -1
- package/lib/index.js +88 -87
- package/lib/input/index.d.ts +18 -1
- package/lib/input/index.js +151 -48
- package/lib/input/index.less_inline.js +2 -3
- package/lib/input/input_inner.less_inline.js +1 -2
- package/lib/input/style.d.ts +3 -0
- package/lib/input/style.js +7 -0
- package/lib/input_number/index.d.ts +7 -0
- package/lib/input_number/index.js +70 -48
- package/lib/input_number/index.less_inline.js +1 -2
- package/lib/input_number/style.js +1 -2
- package/lib/list/index.js +4 -5
- package/lib/list/index.less_inline.js +1 -2
- package/lib/loading/index.js +1 -2
- package/lib/mask/index.js +2 -7
- package/lib/mask/index.less_inline.js +1 -2
- package/lib/md_input/index.d.ts +11 -2
- package/lib/md_input/index.js +63 -27
- package/lib/md_input/index.less_inline.js +2 -3
- package/lib/menu/index.js +2 -7
- package/lib/menu/index.less_inline.js +1 -2
- package/lib/message/index.js +1 -2
- package/lib/modal/index.js +15 -16
- package/lib/modal/index.less_inline.js +1 -2
- package/lib/modal/modal_box.js +24 -25
- package/lib/notification/index.js +15 -29
- package/lib/notification/index.less_inline.js +1 -2
- package/lib/notification/notification_box.js +2 -3
- package/lib/notification/placement.js +1 -2
- package/lib/notification/style.js +1 -2
- package/lib/page_header/index.js +1 -2
- package/lib/page_header/index.less_inline.js +1 -2
- package/lib/pagination/index.js +26 -25
- package/lib/pagination/index.less_inline.js +2 -3
- package/lib/polygon/index.js +1 -2
- package/lib/polygon/index.less_inline.js +1 -2
- package/lib/qrcode/index.js +1 -2
- package/lib/qrcode/index.less_inline.js +1 -2
- package/lib/select/index.d.ts +21 -2
- package/lib/select/index.js +138 -77
- package/lib/select/index.less_inline.js +1 -2
- package/lib/select_ori/index.d.ts +9 -1
- package/lib/select_ori/index.js +36 -24
- package/lib/select_ori/index.less_inline.js +1 -2
- package/lib/space/index.js +1 -2
- package/lib/space/index.less_inline.js +1 -2
- package/lib/styles/animation/index.css_inline.js +1 -2
- package/lib/styles/animation/index.js +1 -2
- package/lib/styles/mask/index.css_inline.js +1 -2
- package/lib/styles/mask/index.js +1 -2
- package/lib/switch/index.d.ts +6 -0
- package/lib/switch/index.js +31 -16
- package/lib/switch/index.less_inline.js +1 -2
- package/lib/tabbar/index.js +1 -2
- package/lib/tabbar/index.less_inline.js +1 -2
- package/lib/tabbar/item.js +1 -2
- package/lib/tabbar/item.less_inline.js +1 -2
- package/lib/table/index.d.ts +2 -0
- package/lib/table/index.js +12 -4
- package/lib/table/index.less_inline.js +1 -2
- package/lib/tabs/index.js +1 -2
- package/lib/tag/index.d.ts +11 -3
- package/lib/tag/index.js +25 -24
- package/lib/tag/index.less_inline.js +2 -3
- package/lib/theme/appearance.d.ts +5 -0
- package/lib/theme/appearance.js +34 -0
- package/lib/theme/index.js +83 -39
- package/lib/theme/index.less_inline.js +1 -2
- package/lib/theme/theme_color.js +1 -2
- package/lib/upload/index.js +28 -41
- package/lib/upload/index.less_inline.js +2 -3
- package/lib/upload/style.js +1 -2
- package/lib/utils/clickoutside.js +1 -2
- package/lib/utils/event.js +1 -2
- package/lib/utils/index.d.ts +27 -5
- package/lib/utils/index.js +43 -22
- package/lib/utils/popover.js +7 -16
- package/lib/utils/transition.js +1 -2
- package/package.json +16 -13
- package/styles/dark.css +10 -2
- package/styles/dropdown.css +46 -0
- package/styles/reset.css +0 -1
- package/styles/select.css +5 -0
- package/styles/themes/apple.css +47 -0
- package/styles/{theme-coral.css → themes/coral.css} +5 -3
- package/styles/themes/deep-sea-blue.css +12 -0
- package/styles/themes/gamboge.css +15 -0
- package/styles/{theme-jade.css → themes/jade.css} +5 -3
- package/styles/themes/lotus-seed.css +12 -0
- package/styles/{theme-tangerine.css → themes/tangerine.css} +5 -3
- package/styles/themes.css +8 -0
- package/styles/vars.css +8 -2
- package/types/preact.d.ts +43 -0
- package/lib/form/types.d.ts +0 -7
- package/lib/utils/context_provide.d.ts +0 -10
- package/lib/utils/context_provide.js +0 -22
- package/lib/utils/signal_types.d.ts +0 -5
package/lib/carousel/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import e from "../base.js";
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
2
|
+
import t from "./index.less_inline.js";
|
|
3
|
+
import { parseAttrValue as n } from "../utils/index.js";
|
|
4
4
|
import r from "./timer.js";
|
|
5
5
|
import { $ as i, $$ as a, $one as o, debounce as s, getAttr as c, iterate as l, off as u, on as d, shouldEventNext as f } from "utilane/browser";
|
|
6
|
-
|
|
6
|
+
// src/components/carousel/index.ts
|
|
7
7
|
var p = class extends e {
|
|
8
8
|
static baseName = "carousel";
|
|
9
9
|
arrows = "hover";
|
|
@@ -27,10 +27,10 @@ var p = class extends e {
|
|
|
27
27
|
"autoplay"
|
|
28
28
|
];
|
|
29
29
|
}
|
|
30
|
-
attributeChangedCallback(e,
|
|
30
|
+
attributeChangedCallback(e, t, r) {
|
|
31
31
|
switch (e) {
|
|
32
32
|
case "arrows":
|
|
33
|
-
let e =
|
|
33
|
+
let e = n(r, "hover");
|
|
34
34
|
if (e !== this.arrows) {
|
|
35
35
|
this.arrows = e;
|
|
36
36
|
let t = document.createDocumentFragment();
|
|
@@ -38,19 +38,19 @@ var p = class extends e {
|
|
|
38
38
|
}
|
|
39
39
|
break;
|
|
40
40
|
case "loop":
|
|
41
|
-
this.loop =
|
|
41
|
+
this.loop = n(r, !1, "loop");
|
|
42
42
|
break;
|
|
43
43
|
case "current-index":
|
|
44
|
-
let
|
|
45
|
-
|
|
44
|
+
let t = n(r, 0);
|
|
45
|
+
t !== this.currentIndex && this.#h(this.loop ? t + 1 : t);
|
|
46
46
|
break;
|
|
47
47
|
case "autoplay":
|
|
48
|
-
let i =
|
|
48
|
+
let i = n(r, !1, "autoplay");
|
|
49
49
|
i !== this.autoplay && (this.autoplay = i, this.#t && (i ? this.#t.start() : this.#t.stop()));
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
connectedCallback() {
|
|
53
|
-
this.loadStyleText(
|
|
53
|
+
this.loadStyleText(t), this.style.setProperty("--carousel-width", `${Math.floor(this.clientWidth)}px`);
|
|
54
54
|
let e = c(this, "height");
|
|
55
55
|
e && this.style.setProperty("height", `${e}px`), this.#d(), super.connectedCallback();
|
|
56
56
|
}
|
|
@@ -253,5 +253,4 @@ var p = class extends e {
|
|
|
253
253
|
this.#r && (this.#r = !1, this.#y(), this.#C());
|
|
254
254
|
};
|
|
255
255
|
};
|
|
256
|
-
//#endregion
|
|
257
256
|
export { p as default };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/carousel/index.less?inline
|
|
2
2
|
var e = ":host{box-sizing:border-box;width:100%;height:180px;margin:0 auto;display:block;position:relative;overflow:hidden}.container{box-sizing:border-box;min-width:900%;height:100%;display:flex;position:relative}.nav-button{cursor:pointer;z-index:20;color:#fff;background-color:#292d3d4d;border:none;border-radius:50%;outline:none;justify-content:center;align-items:center;width:30px;height:30px;margin:0;padding:0;font-size:16px;transition:background-color .3s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.nav-button:hover{background-color:#292d3d66}.nav-button:active{background-color:#292d3d80}.nav-prev{left:20px}.nav-next{right:20px}.pagination{z-index:2;justify-content:center;align-items:center;gap:8px;width:100%;display:flex;position:absolute;bottom:10px;left:0}.bullet{cursor:pointer;background-color:#0000004d;border-radius:50%;width:8px;height:8px;transition:background-color .3s;display:inline-block}.bullet.active{background-color:var(--l-primary-color,#722ed1)}";
|
|
3
|
-
//#endregion
|
|
4
3
|
export { e as default };
|
package/lib/carousel/item.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../base.js";
|
|
2
2
|
import t from "./item.less_inline.js";
|
|
3
3
|
import { $$ as n } from "utilane/browser";
|
|
4
|
-
|
|
4
|
+
// src/components/carousel/item.ts
|
|
5
5
|
var r = class extends e {
|
|
6
6
|
static baseName = "carousel-item";
|
|
7
7
|
connectedCallback() {
|
|
@@ -11,5 +11,4 @@ var r = class extends e {
|
|
|
11
11
|
return n("slot");
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
export { r as default };
|
package/lib/carousel/timer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/carousel/timer.ts
|
|
2
2
|
function e(e, t = 3e3) {
|
|
3
3
|
let n = 0, r = !1, i = null;
|
|
4
4
|
function a() {
|
|
@@ -15,5 +15,4 @@ function e(e, t = 3e3) {
|
|
|
15
15
|
stop: o
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
export { e as default };
|
package/lib/check/check.d.ts
CHANGED
|
@@ -1,32 +1,64 @@
|
|
|
1
|
-
import type { Signal, SignalStop } from "../utils/signal_types";
|
|
2
1
|
import FormInner from "../form/form_inner";
|
|
3
2
|
type CheckState = {
|
|
4
|
-
/** 是否为按钮样式 */
|
|
5
3
|
button: boolean;
|
|
6
4
|
label?: string;
|
|
7
5
|
indeterminate: boolean;
|
|
8
6
|
};
|
|
9
7
|
export default class Check extends FormInner<CheckState> {
|
|
10
|
-
|
|
11
|
-
/** 是否选中 */
|
|
8
|
+
checked: boolean;
|
|
12
9
|
private _checked;
|
|
10
|
+
private dirtyChecked;
|
|
11
|
+
private _groupProvider?;
|
|
12
|
+
private radioScope?;
|
|
13
13
|
_inputType: "radio" | "checkbox";
|
|
14
14
|
$input?: HTMLInputElement;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
constructor();
|
|
16
|
+
get grouped(): boolean;
|
|
17
|
+
protected get intrinsicDefaultValue(): string;
|
|
18
|
+
get defaultChecked(): boolean;
|
|
19
|
+
set defaultChecked(value: boolean);
|
|
17
20
|
setChecked(isChecked: boolean): void;
|
|
21
|
+
/** Default and group synchronization must not dirty the checked property. */
|
|
22
|
+
private applyChecked;
|
|
18
23
|
getChecked(): boolean;
|
|
19
|
-
|
|
24
|
+
protected get fallbackAccessibleName(): string | undefined;
|
|
20
25
|
static get observedAttributes(): string[];
|
|
21
26
|
connectedCallback(): void;
|
|
27
|
+
protected refreshConfiguration(): void;
|
|
22
28
|
afterInit(): void;
|
|
23
29
|
beforeDestroy(): void;
|
|
24
30
|
render(): DocumentFragment;
|
|
31
|
+
setValue(value: any): void;
|
|
25
32
|
protected attributeChange(name: string, _oldValue: string, newValue: string): void;
|
|
26
33
|
protected checkedChange(): void;
|
|
27
34
|
protected disabledChange(): void;
|
|
35
|
+
/** @internal */
|
|
36
|
+
static normalizeToken(token: string): string;
|
|
37
|
+
/** @internal */
|
|
38
|
+
get token(): string;
|
|
39
|
+
protected serializeFormValue(): string | null;
|
|
40
|
+
protected serializeFormState(): string;
|
|
41
|
+
formStateRestoreCallback(state: string | File | FormData | null, _mode: "restore" | "autocomplete"): void;
|
|
42
|
+
reset(): void;
|
|
43
|
+
get requiredSelection(): boolean;
|
|
44
|
+
protected get nativeValueMissing(): boolean;
|
|
28
45
|
private _updateIndeterminate;
|
|
29
|
-
|
|
46
|
+
private _updateGroup;
|
|
47
|
+
private applyGroupChecked;
|
|
48
|
+
private getRadioScope;
|
|
49
|
+
private updateRadioScope;
|
|
50
|
+
private radioMembers;
|
|
51
|
+
private syncRadioPeers;
|
|
52
|
+
private syncStandaloneRadioTabStops;
|
|
53
|
+
private static inDocumentOrder;
|
|
54
|
+
/** @internal 单选组仅让当前选中项或第一个可用项进入 Tab 顺序。 */
|
|
55
|
+
static syncRadioTabStops(radios: readonly Check[], selected?: Check): void;
|
|
56
|
+
private uncheckPeers;
|
|
57
|
+
private _stopNativeEvent;
|
|
58
|
+
private _handleNativeChange;
|
|
59
|
+
private _handleKeydown;
|
|
60
|
+
private _handleClick;
|
|
61
|
+
emitChange(checked?: boolean): void;
|
|
30
62
|
_doChangeAction(): void;
|
|
31
63
|
}
|
|
32
64
|
export {};
|
package/lib/check/check.js
CHANGED
|
@@ -1,27 +1,60 @@
|
|
|
1
|
-
import
|
|
2
|
-
import n from "../form/
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import e from "../form/form_inner.js";
|
|
2
|
+
import { FORM_CONTEXT_EVENTS as t, requestFormContext as n } from "../form/context.js";
|
|
3
|
+
import { referenceText as r } from "../form/accessibility.js";
|
|
4
|
+
import { parseAttrValue as i } from "../utils/index.js";
|
|
5
|
+
import { $$ as a } from "utilane/browser";
|
|
6
|
+
// src/components/check/check.ts
|
|
7
|
+
var o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map([
|
|
8
|
+
["ArrowLeft", -1],
|
|
9
|
+
["ArrowUp", -1],
|
|
10
|
+
["ArrowRight", 1],
|
|
11
|
+
["ArrowDown", 1]
|
|
12
|
+
]), c = class c extends e {
|
|
13
|
+
_checked = !1;
|
|
14
|
+
dirtyChecked = !1;
|
|
15
|
+
_groupProvider;
|
|
16
|
+
radioScope;
|
|
17
|
+
_inputType = "radio";
|
|
9
18
|
$input;
|
|
10
|
-
_groupCtx;
|
|
11
|
-
_groupCtxStop;
|
|
12
|
-
setChecked(e) {
|
|
13
|
-
this._checked = e, this.checkedChange();
|
|
14
|
-
}
|
|
15
|
-
getChecked() {
|
|
16
|
-
return this._checked;
|
|
17
|
-
}
|
|
18
19
|
constructor() {
|
|
19
|
-
super()
|
|
20
|
+
super();
|
|
21
|
+
let e = Object.getOwnPropertyDescriptor(this, "checked")?.value;
|
|
22
|
+
Object.defineProperty(this, "checked", {
|
|
20
23
|
configurable: !0,
|
|
21
24
|
enumerable: !0,
|
|
22
25
|
get: this.getChecked,
|
|
23
26
|
set: this.setChecked
|
|
24
|
-
});
|
|
27
|
+
}), e !== void 0 && this.setChecked(e);
|
|
28
|
+
}
|
|
29
|
+
get grouped() {
|
|
30
|
+
return !!this._groupProvider;
|
|
31
|
+
}
|
|
32
|
+
get intrinsicDefaultValue() {
|
|
33
|
+
return "on";
|
|
34
|
+
}
|
|
35
|
+
get defaultChecked() {
|
|
36
|
+
return this.hasAttribute("checked");
|
|
37
|
+
}
|
|
38
|
+
set defaultChecked(e) {
|
|
39
|
+
this.toggleAttribute("checked", !!e);
|
|
40
|
+
}
|
|
41
|
+
setChecked(e) {
|
|
42
|
+
this.grouped || (this.dirtyChecked = !0, this.applyChecked(e));
|
|
43
|
+
}
|
|
44
|
+
applyChecked(e) {
|
|
45
|
+
let t = this._checked !== !!e;
|
|
46
|
+
this._checked = !!e;
|
|
47
|
+
let n = this.radioScope;
|
|
48
|
+
n && this._checked && this.uncheckPeers(n), t && !this.grouped && this.notifyFieldValueChanged(), this.checkedChange(), n && this.syncRadioPeers(n);
|
|
49
|
+
}
|
|
50
|
+
getChecked() {
|
|
51
|
+
return this._checked;
|
|
52
|
+
}
|
|
53
|
+
get fallbackAccessibleName() {
|
|
54
|
+
return this.root.querySelector("slot")?.assignedNodes({ flatten: !0 }).map((e) => {
|
|
55
|
+
if (e instanceof Text) return e.data.trim();
|
|
56
|
+
if (e instanceof Element && !e.matches("[aria-hidden=\"true\"],[hidden],script,style")) return r([e]);
|
|
57
|
+
}).filter(Boolean).join(" ");
|
|
25
58
|
}
|
|
26
59
|
static get observedAttributes() {
|
|
27
60
|
return [
|
|
@@ -29,89 +62,191 @@ var u = class extends n {
|
|
|
29
62
|
"label",
|
|
30
63
|
"button",
|
|
31
64
|
"indeterminate",
|
|
32
|
-
|
|
65
|
+
"required",
|
|
66
|
+
...e.observedAttributes
|
|
33
67
|
];
|
|
34
68
|
}
|
|
35
69
|
connectedCallback() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
70
|
+
if (Object.prototype.hasOwnProperty.call(this, "defaultChecked")) {
|
|
71
|
+
let e = this.defaultChecked;
|
|
72
|
+
delete this.defaultChecked, this.defaultChecked = e;
|
|
73
|
+
}
|
|
74
|
+
this._groupProvider = n(this, "group"), this.addEventListener(t.configuration, this._updateGroup), super.connectedCallback(), this._updateGroup(), this.disabledChange(), this._updateIndeterminate(), this.applyChecked(this.getChecked());
|
|
75
|
+
}
|
|
76
|
+
refreshConfiguration() {
|
|
77
|
+
this.isConnected && (this._groupProvider = n(this, "group")), super.refreshConfiguration(), this.updateRadioScope(this.getRadioScope()), this.applyGroupChecked();
|
|
43
78
|
}
|
|
44
79
|
afterInit() {
|
|
45
|
-
|
|
80
|
+
this.addEventListener("click", this._handleClick), this.$input?.addEventListener("change", this._handleNativeChange), this.$input?.addEventListener("input", this._stopNativeEvent), this.$input?.addEventListener("keydown", this._handleKeydown);
|
|
46
81
|
}
|
|
47
82
|
beforeDestroy() {
|
|
48
|
-
|
|
83
|
+
this.removeEventListener("click", this._handleClick), this.removeEventListener(t.configuration, this._updateGroup), this.$input?.removeEventListener("change", this._handleNativeChange), this.$input?.removeEventListener("input", this._stopNativeEvent), this.$input?.removeEventListener("keydown", this._handleKeydown), this.updateRadioScope(void 0), this._groupProvider = void 0, this.$input = void 0;
|
|
49
84
|
}
|
|
50
85
|
render() {
|
|
51
|
-
let e = document.createDocumentFragment(), t =
|
|
86
|
+
let e = document.createDocumentFragment(), t = a("input", {
|
|
52
87
|
type: this._inputType,
|
|
53
88
|
class: "l-check__input",
|
|
54
|
-
|
|
55
|
-
value: this.value,
|
|
56
|
-
checked: this.getChecked(),
|
|
57
|
-
disabled: this.isDisabled() ? "disabled" : void 0
|
|
89
|
+
checked: this.getChecked()
|
|
58
90
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
e.appendChild(t);
|
|
62
|
-
}
|
|
63
|
-
let n = r("label", {
|
|
91
|
+
this.$input = t, e.appendChild(t), this._state.button || e.appendChild(a("span", { class: "l-check__inner" }));
|
|
92
|
+
let n = a("label", {
|
|
64
93
|
class: "l-check__label",
|
|
65
94
|
part: "label"
|
|
66
|
-
})
|
|
67
|
-
return n.appendChild(
|
|
95
|
+
});
|
|
96
|
+
return n.appendChild(a("slot", { textContent: this._state.label })), e.appendChild(n), e;
|
|
97
|
+
}
|
|
98
|
+
setValue(e) {
|
|
99
|
+
super.setValue(e), this._updateGroup(), this.checkedChange();
|
|
68
100
|
}
|
|
69
|
-
attributeChange(t, n
|
|
70
|
-
switch (
|
|
101
|
+
attributeChange(e, t, n) {
|
|
102
|
+
switch (e) {
|
|
71
103
|
case "checked":
|
|
72
|
-
|
|
73
|
-
this.setChecked(n);
|
|
104
|
+
this.grouped ? this.applyGroupChecked() : this.dirtyChecked || this.applyChecked(this.defaultChecked);
|
|
74
105
|
break;
|
|
75
106
|
case "button":
|
|
76
|
-
this._state
|
|
107
|
+
this._state.button = i(n, !1, e);
|
|
77
108
|
break;
|
|
78
109
|
case "indeterminate":
|
|
79
|
-
|
|
80
|
-
this._state.indeterminate = i, this._updateIndeterminate();
|
|
110
|
+
this._state.indeterminate = i(n, !1, e), this._updateIndeterminate();
|
|
81
111
|
break;
|
|
82
|
-
case "label":
|
|
112
|
+
case "label": {
|
|
113
|
+
this._state.label = n;
|
|
114
|
+
let e = this.root.querySelector("slot");
|
|
115
|
+
e && (e.textContent = n);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case "required": this.checkedChange();
|
|
83
119
|
}
|
|
84
120
|
}
|
|
85
121
|
checkedChange() {
|
|
86
|
-
this.
|
|
122
|
+
this.classList.toggle("is-checked", this.getChecked()), this.$input && (this.$input.checked = this.getChecked(), this.$input.value = this.token), this.syncNativeValue(), this.syncNativeValidity();
|
|
87
123
|
}
|
|
88
124
|
disabledChange() {
|
|
89
|
-
|
|
125
|
+
this.classList.toggle("is-disabled", this.isDisabled()), this.$input && (this.$input.disabled = this.isDisabled()), this.syncNativeValidity(), this._groupProvider?.fieldStateChanged?.(), this.radioScope && this.syncStandaloneRadioTabStops(this.radioMembers(this.radioScope));
|
|
126
|
+
}
|
|
127
|
+
static normalizeToken(e) {
|
|
128
|
+
return e.replace(/[\uD800-\uDFFF]/gu, "�");
|
|
129
|
+
}
|
|
130
|
+
get token() {
|
|
131
|
+
return c.normalizeToken(String(this.value ?? "on"));
|
|
132
|
+
}
|
|
133
|
+
serializeFormValue() {
|
|
134
|
+
return !this.grouped && this.getChecked() ? this.token : null;
|
|
135
|
+
}
|
|
136
|
+
serializeFormState() {
|
|
137
|
+
return JSON.stringify({
|
|
138
|
+
version: 1,
|
|
139
|
+
value: this.value ?? "on",
|
|
140
|
+
checked: this.getChecked(),
|
|
141
|
+
indeterminate: !!this._state.indeterminate
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
formStateRestoreCallback(e, t) {
|
|
145
|
+
if (typeof e == "string") try {
|
|
146
|
+
let n = JSON.parse(e);
|
|
147
|
+
if (n?.version !== 1 || !Object.hasOwn(n, "value") || typeof n.checked != "boolean" || n.indeterminate !== void 0 && typeof n.indeterminate != "boolean") return;
|
|
148
|
+
super.formStateRestoreCallback(e, t), this._state.indeterminate = !!n.indeterminate, this.grouped ? this.applyGroupChecked() : this.setChecked(n.checked), this._updateIndeterminate();
|
|
149
|
+
} catch {}
|
|
150
|
+
}
|
|
151
|
+
reset() {
|
|
152
|
+
super.reset(), this.dirtyChecked = !1, this.grouped ? this._updateGroup() : this.applyChecked(this.defaultChecked), this._updateIndeterminate();
|
|
153
|
+
}
|
|
154
|
+
get requiredSelection() {
|
|
155
|
+
if (this.getChecked()) return !0;
|
|
156
|
+
let e = this.getRadioScope();
|
|
157
|
+
return !!e && this.radioMembers(e).some((e) => e.getChecked());
|
|
158
|
+
}
|
|
159
|
+
get nativeValueMissing() {
|
|
160
|
+
return !this.requiredSelection;
|
|
90
161
|
}
|
|
91
162
|
_updateIndeterminate() {
|
|
92
|
-
this.
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
163
|
+
this.classList.toggle("is-indeterminate", !!this._state.indeterminate), this.$input && (this.$input.indeterminate = !!this._state.indeterminate);
|
|
164
|
+
}
|
|
165
|
+
_updateGroup = () => {
|
|
166
|
+
this.isConnected && (this._groupProvider = n(this, "group")), this.disabledChange(), this.applyGroupChecked();
|
|
167
|
+
};
|
|
168
|
+
applyGroupChecked() {
|
|
169
|
+
let e = this._groupProvider;
|
|
170
|
+
if (!e) return;
|
|
171
|
+
let t = e.getFieldChecked?.(this) ?? e.getSnapshot().values?.includes(this.token);
|
|
172
|
+
this.applyChecked(t ?? !1);
|
|
173
|
+
}
|
|
174
|
+
getRadioScope() {
|
|
175
|
+
let e = this.getName();
|
|
176
|
+
if (e && this.isConnected && !this.grouped && this._inputType === "radio") return {
|
|
177
|
+
owner: this.form ?? (this.hasAttribute("form") ? null : this.closest("l-form")) ?? this.getRootNode(),
|
|
178
|
+
name: e
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
updateRadioScope(e) {
|
|
182
|
+
let t = this.radioScope;
|
|
183
|
+
!e && !this.grouped && this.$input?.removeAttribute("tabindex"), (t?.owner !== e?.owner || t?.name !== e?.name) && (this.radioScope = e, e ? o.add(this) : o.delete(this), t && this.syncRadioPeers(t), e && (this.getChecked() && this.uncheckPeers(e), this.syncRadioPeers(e)));
|
|
184
|
+
}
|
|
185
|
+
radioMembers(e) {
|
|
186
|
+
return [...o].filter((t) => t.radioScope?.owner === e.owner && t.radioScope.name === e.name);
|
|
187
|
+
}
|
|
188
|
+
syncRadioPeers(e) {
|
|
189
|
+
let t = this.radioMembers(e);
|
|
190
|
+
for (let e of t) e !== this && e.syncNativeValidity();
|
|
191
|
+
this.syncStandaloneRadioTabStops(t);
|
|
192
|
+
}
|
|
193
|
+
syncStandaloneRadioTabStops(e) {
|
|
194
|
+
c.syncRadioTabStops(e, e.find((e) => e.getChecked()));
|
|
195
|
+
}
|
|
196
|
+
static inDocumentOrder(e) {
|
|
197
|
+
return e.sort((e, t) => {
|
|
198
|
+
let n = e.compareDocumentPosition(t);
|
|
199
|
+
return !n || n & Node.DOCUMENT_POSITION_DISCONNECTED ? 0 : n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
static syncRadioTabStops(e, t) {
|
|
203
|
+
let n = e.filter((e) => e.$input && !e.isDisabled()), r = t && n.includes(t) ? t : c.inDocumentOrder(n)[0];
|
|
204
|
+
for (let t of e) t.$input && (t.$input.tabIndex = t === r ? 0 : -1);
|
|
205
|
+
}
|
|
206
|
+
uncheckPeers(e) {
|
|
207
|
+
for (let t of this.radioMembers(e)) t !== this && t.getChecked() && t.applyChecked(!1);
|
|
208
|
+
}
|
|
209
|
+
_stopNativeEvent = (e) => e.stopPropagation();
|
|
210
|
+
_handleNativeChange = (e) => {
|
|
211
|
+
e.stopPropagation(), this._updateIndeterminate(), this._doChangeAction();
|
|
212
|
+
};
|
|
213
|
+
_handleKeydown = (e) => {
|
|
214
|
+
if (e.defaultPrevented || this.isDisabled()) return;
|
|
215
|
+
if (e.key === "Enter") {
|
|
216
|
+
e.preventDefault(), this._doChangeAction();
|
|
217
|
+
return;
|
|
101
218
|
}
|
|
219
|
+
let t = s.get(e.key);
|
|
220
|
+
if (this._inputType !== "radio" || !t || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
221
|
+
let n = this.radioScope ? this.radioMembers(this.radioScope) : this._groupProvider?.getRadioMembers?.() ?? [], r = c.inDocumentOrder(n.filter((e) => e instanceof c && !!e.$input && !e.isDisabled())), i = r.indexOf(this);
|
|
222
|
+
if (i === -1) return;
|
|
223
|
+
e.preventDefault();
|
|
224
|
+
let a = r[(i + t + r.length) % r.length];
|
|
225
|
+
a !== this && (a.$input?.focus(), a.$input?.click());
|
|
102
226
|
};
|
|
103
|
-
|
|
227
|
+
_handleClick = (e) => {
|
|
228
|
+
let t = e.composedPath();
|
|
229
|
+
e.defaultPrevented || t[0] === this.$input || t.some((e) => e instanceof c && e !== this) || this._doChangeAction();
|
|
230
|
+
};
|
|
231
|
+
emitChange(e = this.getChecked()) {
|
|
104
232
|
this.emit("change", {
|
|
105
233
|
detail: {
|
|
106
|
-
value: this.
|
|
234
|
+
value: this.token,
|
|
107
235
|
name: this.getName(),
|
|
108
|
-
checked:
|
|
236
|
+
checked: e
|
|
109
237
|
},
|
|
110
238
|
composed: !0,
|
|
111
239
|
bubbles: !0
|
|
112
240
|
});
|
|
113
241
|
}
|
|
114
|
-
_doChangeAction() {
|
|
242
|
+
_doChangeAction() {
|
|
243
|
+
if (this.isDisabled()) {
|
|
244
|
+
this.$input && (this.$input.checked = this.getChecked());
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
if (this._inputType === "radio" && this.getChecked()) return;
|
|
248
|
+
let e = this._inputType === "radio" || !this.getChecked();
|
|
249
|
+
this.grouped ? (this.dirtyChecked = !0, this._groupProvider?.requestFieldChecked?.(this, e)) : (this.setChecked(e), this.validateInput()), this.emitChange(e);
|
|
250
|
+
}
|
|
115
251
|
};
|
|
116
|
-
|
|
117
|
-
export { u as default };
|
|
252
|
+
export { c as default };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
var e = ":host{cursor:pointer;outline:none;align-items:center;width:auto;transition:color .3s,border-color .3s,background-color .3s;display:inline-flex;position:relative}.l-check__input{z-index:-1;opacity:0;width:0;height:0;margin:0;position:absolute}
|
|
3
|
-
//#endregion
|
|
1
|
+
// src/components/check/check.less?inline
|
|
2
|
+
var e = ":host{cursor:pointer;outline:none;align-items:center;width:auto;transition:color .3s,border-color .3s,background-color .3s;display:inline-flex;position:relative}.l-check__input{z-index:-1;opacity:0;width:0;height:0;margin:0;position:absolute}:host(:focus-within){outline:2px solid var(--l-primary-color,#722ed1);outline-offset:2px}.l-check__inner{width:var(--l-check-size,14px);height:var(--l-check-size,14px);box-sizing:border-box;border:1px solid #dcddd9;flex-shrink:0;justify-content:center;align-items:center;margin-right:5px;transition:border-color .3s ease-in-out;display:flex;position:relative}.l-check__label{cursor:inherit;line-height:1;transition:color .3s}:host(.is-checked) .l-check__inner{border-color:var(--l-primary-color,#722ed1)}:host(.is-disabled){cursor:not-allowed}:host(.is-disabled) .l-check__label{color:var(--l-disabled-color,#e6e6e6)}:host([button]){height:var(--l-form-control-height,32px);border-radius:inherit;border:1px solid #c0c4cc;border-left-width:0;justify-content:center;margin-left:0;padding:0 15px}:host([button]:first-child){border-top-left-radius:var(--l-check-border-radius,var(--l-border-radius,13px));border-bottom-left-radius:var(--l-check-border-radius,var(--l-border-radius,13px));border-left-width:1px}:host([button]:last-child){border-top-right-radius:var(--l-check-border-radius,var(--l-border-radius,13px));border-bottom-right-radius:var(--l-check-border-radius,var(--l-border-radius,13px))}:host([button].is-checked){background-color:var(--l-primary-color,#722ed1);color:#fff;border-color:var(--l-primary-color,#722ed1);border-right-color:#fff}:host([button].is-checked:last-child){border-right-color:var(--l-primary-color,#722ed1)}";
|
|
4
3
|
export { e as default };
|
package/lib/check/checkbox.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./check.js";
|
|
2
2
|
import t from "./check.less_inline.js";
|
|
3
3
|
import n from "./checkbox.less_inline.js";
|
|
4
|
-
|
|
4
|
+
// src/components/check/checkbox.ts
|
|
5
5
|
var r = class extends e {
|
|
6
6
|
static baseName = "checkbox";
|
|
7
7
|
constructor() {
|
|
@@ -11,8 +11,7 @@ var r = class extends e {
|
|
|
11
11
|
this.loadStyleText([t, n]), super.connectedCallback();
|
|
12
12
|
}
|
|
13
13
|
_doChangeAction() {
|
|
14
|
-
|
|
14
|
+
super._doChangeAction();
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { r as default };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
var e = "
|
|
3
|
-
//#endregion
|
|
1
|
+
// src/components/check/checkbox.less?inline
|
|
2
|
+
var e = ".l-check__inner{border-radius:var(--l-check-border-radius,3px)}.l-check__inner:after,:host(.is-checked) .l-check__inner:after{content:\"\";width:calc(var(--l-check-size,14px) * .6);height:calc(var(--l-check-size,14px) * .3);border-top:none;border-bottom:1px solid #0000;border-left:1px solid #0000;border-right:none;margin-top:-3px;transition:border-color .2s ease-in-out;display:block;transform:rotate(-45deg)}:host(.is-checked) .l-check__inner{background-color:var(--l-primary-color,#722ed1)}:host(.is-checked) .l-check__inner:after{border-color:#fff}:host(.is-indeterminate) .l-check__inner{background-color:var(--l-primary-color,#722ed1)}:host(.is-indeterminate) .l-check__inner:after{width:calc(var(--l-check-size,14px) * .4);border-color:#fff #fff #fff currentColor;border-left-style:none;border-left-width:medium;height:1px;margin-top:0;transform:rotate(0)}:host(.is-disabled) .l-check__inner{background-color:var(--l-disabled-color,#e6e6e6);border-color:var(--l-disabled-color,#e6e6e6)}";
|
|
4
3
|
export { e as default };
|
package/lib/check/index.d.ts
CHANGED
|
@@ -1,24 +1,44 @@
|
|
|
1
|
-
import type { Signal } from "../utils/signal_types";
|
|
2
1
|
import FormInner from "../form/form_inner";
|
|
3
2
|
type CheckGroupState = {
|
|
4
3
|
gap?: string;
|
|
5
4
|
};
|
|
6
5
|
export default class CheckGroup extends FormInner<CheckGroupState> {
|
|
7
|
-
|
|
8
|
-
values:
|
|
6
|
+
/** 已解码的普通 token 数组;更新时整体替换,不原地修改。 */
|
|
7
|
+
values: string[];
|
|
9
8
|
multiple: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
private selectedRadio?;
|
|
10
|
+
private readonly provider;
|
|
11
|
+
private readonly groupProvider;
|
|
12
|
+
private stopProviding?;
|
|
12
13
|
constructor();
|
|
14
|
+
setValue(value: any): void;
|
|
15
|
+
protected get intrinsicDefaultValue(): string | null;
|
|
16
|
+
get defaultValue(): any;
|
|
17
|
+
set defaultValue(value: any);
|
|
13
18
|
static get observedAttributes(): string[];
|
|
14
19
|
attributeChange(name: string, _oldValue: any, newValue: any): void;
|
|
15
20
|
protected updateDOM(changedProps: Set<string>): void;
|
|
16
21
|
connectedCallback(): void;
|
|
17
|
-
afterInit(): void;
|
|
18
22
|
beforeDestroy(): void;
|
|
19
23
|
render(): HTMLElement;
|
|
20
|
-
|
|
24
|
+
protected disabledChange(): void;
|
|
25
|
+
private publishConfiguration;
|
|
21
26
|
_updateGap: () => void;
|
|
22
|
-
|
|
27
|
+
private _handleChange;
|
|
28
|
+
private isMemberChecked;
|
|
29
|
+
private setMemberChecked;
|
|
30
|
+
private encodeValues;
|
|
31
|
+
protected updateChecked(value: any): void;
|
|
32
|
+
private reconcileRadio;
|
|
33
|
+
private syncMembers;
|
|
34
|
+
private getRadioMembers;
|
|
35
|
+
protected serializeFormValue(): string | FormData | null;
|
|
36
|
+
get requiredSelection(): boolean;
|
|
37
|
+
protected get nativeValueMissing(): boolean;
|
|
38
|
+
get valueSnapshot(): any;
|
|
39
|
+
private matchingValues;
|
|
40
|
+
protected serializeFormState(): string | null;
|
|
41
|
+
formStateRestoreCallback(state: string | File | FormData | null, mode: "restore" | "autocomplete"): void;
|
|
42
|
+
reset(): void;
|
|
23
43
|
}
|
|
24
44
|
export {};
|