litos-ui 0.15.8 → 0.16.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/lib/button/index.d.ts +4 -0
- package/lib/button/index.js +48 -40
- package/lib/check/checkbox.js +1 -1
- package/lib/check/index.d.ts +2 -1
- package/lib/check/index.js +25 -12
- package/lib/check/radio.js +1 -1
- package/lib/check-C7YSuH60.js +4 -0
- package/lib/color_picker/index.js +1 -1
- package/lib/description_panel/index.js +4 -9
- package/lib/dialog/dialog_container.js +4 -6
- package/lib/index-DvcllHRh.js +4 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +163 -164
- package/lib/input/index.js +1 -1
- package/lib/mask/index.js +1 -6
- package/lib/message/index.d.ts +11 -12
- package/lib/message/index.js +38 -39
- package/lib/modal/index.js +1 -1
- package/lib/select/index.js +1 -6
- package/lib/select_ori/index.js +1 -1
- package/lib/space/index.d.ts +8 -0
- package/lib/space/index.js +35 -0
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.js +109 -100
- package/lib/table/types.d.ts +1 -1
- package/lib/utils/index.d.ts +0 -25
- package/lib/utils/index.js +40 -87
- package/lib/utils/popover.js +24 -17
- package/package.json +72 -71
- package/styles/container.css +1 -0
- package/styles/dark.css +13 -0
- package/styles/reset.css +3 -5
- package/styles/vars.css +10 -12
- package/lib/check-A86JxUfd.js +0 -4
- package/lib/index-D4II9KsF.js +0 -4
package/lib/index.js
CHANGED
|
@@ -1,166 +1,165 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { set as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { Popover as
|
|
74
|
-
import { default as
|
|
1
|
+
import { initAttr as r, kebabToCamel as t, parseAttrValue as a, regist as f, setAttrs as s, tagAttr as l, tagAttrs as m, useId as p } from "./utils/index.js";
|
|
2
|
+
import { set as d, remove as x } from "./utils/clickoutside.js";
|
|
3
|
+
import { default as c } from "./base.js";
|
|
4
|
+
import { default as i } from "./message/index.js";
|
|
5
|
+
import { default as C } from "./dialog/index.js";
|
|
6
|
+
import { default as h } from "./dialog/dialog_container.js";
|
|
7
|
+
import { default as P } from "./loading/index.js";
|
|
8
|
+
import { default as S } from "./tabs/index.js";
|
|
9
|
+
import { default as M } from "./modal/index.js";
|
|
10
|
+
import { default as D } from "./icon/base.js";
|
|
11
|
+
import { default as v } from "./icon/arrow_down.js";
|
|
12
|
+
import { default as O } from "./icon/arrow_left.js";
|
|
13
|
+
import { default as F } from "./icon/arrow_right.js";
|
|
14
|
+
import { default as U } from "./icon/arrow_up.js";
|
|
15
|
+
import { default as y } from "./icon/caret_top.js";
|
|
16
|
+
import { default as Q } from "./icon/caret_bottom.js";
|
|
17
|
+
import { default as W } from "./icon/font_icon.js";
|
|
18
|
+
import { default as q } from "./icon/loading.js";
|
|
19
|
+
import { default as E } from "./icon/search.js";
|
|
20
|
+
import { default as K } from "./icon/sun.js";
|
|
21
|
+
import { default as X } from "./icon/moon.js";
|
|
22
|
+
import { default as _ } from "./icon/reduction.js";
|
|
23
|
+
import { default as oo } from "./icon/refresh_left.js";
|
|
24
|
+
import { default as ro } from "./icon/refresh_right.js";
|
|
25
|
+
import { default as ao } from "./icon/sort.js";
|
|
26
|
+
import { default as so } from "./icon/theme_default.js";
|
|
27
|
+
import { default as mo } from "./icon/close.js";
|
|
28
|
+
import { default as uo } from "./icon/info.js";
|
|
29
|
+
import { default as no } from "./icon/success.js";
|
|
30
|
+
import { default as Io } from "./icon/warn.js";
|
|
31
|
+
import { default as go } from "./icon/close_filled.js";
|
|
32
|
+
import { default as bo } from "./icon/more.js";
|
|
33
|
+
import { default as Ao } from "./icon/d_arrow_left.js";
|
|
34
|
+
import { default as wo } from "./icon/d_arrow_right.js";
|
|
35
|
+
import { default as To } from "./icon/zoom_in.js";
|
|
36
|
+
import { default as ko } from "./icon/zoom_out.js";
|
|
37
|
+
import { default as Ro } from "./icon/select.js";
|
|
38
|
+
import { default as Lo } from "./form/index.js";
|
|
39
|
+
import { default as Bo } from "./form/form_item.js";
|
|
40
|
+
import { default as Go } from "./check/radio_group.js";
|
|
41
|
+
import { default as Zo } from "./check/radio.js";
|
|
42
|
+
import { default as Ho } from "./check/checkbox.js";
|
|
43
|
+
import { default as Vo } from "./check/checkbox_group.js";
|
|
44
|
+
import { default as jo } from "./button/index.js";
|
|
45
|
+
import { default as zo } from "./input/index.js";
|
|
46
|
+
import { default as Jo } from "./select_ori/index.js";
|
|
47
|
+
import { default as No } from "./switch/index.js";
|
|
48
|
+
import { default as Yo } from "./md_input/index.js";
|
|
49
|
+
import { default as $o } from "./select/index.js";
|
|
50
|
+
import { default as ee } from "./list/index.js";
|
|
51
|
+
import { default as te } from "./polygon/index.js";
|
|
52
|
+
import { default as fe } from "./color_picker/index.js";
|
|
53
|
+
import { default as le } from "./tabbar/index.js";
|
|
54
|
+
import { default as pe } from "./tabbar/item.js";
|
|
55
|
+
import { default as de } from "./theme/index.js";
|
|
56
|
+
import { default as ne } from "./theme/theme_color.js";
|
|
57
|
+
import { default as Ie } from "./date_picker/index.js";
|
|
58
|
+
import { default as ge } from "./menu/index.js";
|
|
59
|
+
import { default as be } from "./menu/menu_item.js";
|
|
60
|
+
import { default as Ae } from "./menu/sub_menu.js";
|
|
61
|
+
import { default as we } from "./carousel/index.js";
|
|
62
|
+
import { default as Te } from "./carousel/item.js";
|
|
63
|
+
import { default as ke } from "./qrcode/index.js";
|
|
64
|
+
import { default as Re } from "./description_panel/index.js";
|
|
65
|
+
import { default as Le } from "./pagination/index.js";
|
|
66
|
+
import { default as Be } from "./mask/index.js";
|
|
67
|
+
import { default as Ge } from "./page_header/index.js";
|
|
68
|
+
import { default as Ze } from "./tag/index.js";
|
|
69
|
+
import { default as He } from "./collapse/index.js";
|
|
70
|
+
import { default as Ve } from "./collapse/item.js";
|
|
71
|
+
import { default as je } from "./image/index.js";
|
|
72
|
+
import { default as ze } from "./image/image_preview.js";
|
|
73
|
+
import { Popover as Je, autoUpdate as Ke, createPopoverObserver as Ne, getOverflowAncestors as Xe, popconfirmProps as Ye, updatePosition as _e } from "./utils/popover.js";
|
|
74
|
+
import { default as or } from "./table/index.js";
|
|
75
|
+
import { default as rr } from "./space/index.js";
|
|
75
76
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
r as
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
et as updatePosition,
|
|
165
|
-
x as useId
|
|
77
|
+
v as ArrowDownIcon,
|
|
78
|
+
O as ArrowLeftIcon,
|
|
79
|
+
F as ArrowRightIcon,
|
|
80
|
+
U as ArrowUpIcon,
|
|
81
|
+
c as BaseComponent,
|
|
82
|
+
D as BaseIcon,
|
|
83
|
+
jo as Button,
|
|
84
|
+
Q as CaretBottomIcon,
|
|
85
|
+
y as CaretTopIcon,
|
|
86
|
+
we as Carousel,
|
|
87
|
+
Te as CarouselItem,
|
|
88
|
+
Ho as Checkbox,
|
|
89
|
+
Vo as CheckboxGroup,
|
|
90
|
+
go as CloseFilledIcon,
|
|
91
|
+
mo as CloseIcon,
|
|
92
|
+
He as Collapse,
|
|
93
|
+
Ve as CollapseItem,
|
|
94
|
+
fe as ColorPicker,
|
|
95
|
+
Ao as DArrowLeftIcon,
|
|
96
|
+
wo as DArrowRightIcon,
|
|
97
|
+
Ie as DatePicker,
|
|
98
|
+
Re as DescriptionPanel,
|
|
99
|
+
C as Dialog,
|
|
100
|
+
h as DialogContainer,
|
|
101
|
+
W as FontIcon,
|
|
102
|
+
Lo as Form,
|
|
103
|
+
Bo as FormItem,
|
|
104
|
+
je as Image,
|
|
105
|
+
ze as ImagePreview,
|
|
106
|
+
uo as InfoIcon,
|
|
107
|
+
zo as Input,
|
|
108
|
+
ee as List,
|
|
109
|
+
P as Loading,
|
|
110
|
+
q as LoadingIcon,
|
|
111
|
+
Be as Mask,
|
|
112
|
+
Yo as MdInput,
|
|
113
|
+
ge as Menu,
|
|
114
|
+
be as MenuItem,
|
|
115
|
+
i as Message,
|
|
116
|
+
M as Modal,
|
|
117
|
+
X as MoonIcon,
|
|
118
|
+
bo as MoreIcon,
|
|
119
|
+
Ge as PageHeader,
|
|
120
|
+
Le as Pagination,
|
|
121
|
+
te as Polygon,
|
|
122
|
+
Je as Popover,
|
|
123
|
+
ke as Qrcode,
|
|
124
|
+
Zo as Radio,
|
|
125
|
+
Go as RadioGroup,
|
|
126
|
+
_ as ReductionIcon,
|
|
127
|
+
oo as RefreshLeftIcon,
|
|
128
|
+
ro as RefreshRightIcon,
|
|
129
|
+
E as SearchIcon,
|
|
130
|
+
$o as Select,
|
|
131
|
+
Ro as SelectIcon,
|
|
132
|
+
Jo as SelectOri,
|
|
133
|
+
ao as SortIcon,
|
|
134
|
+
rr as Space,
|
|
135
|
+
Ae as SubMenu,
|
|
136
|
+
no as SuccessIcon,
|
|
137
|
+
K as SunIcon,
|
|
138
|
+
No as Switch,
|
|
139
|
+
le as Tabbar,
|
|
140
|
+
pe as TabbarItem,
|
|
141
|
+
or as Table,
|
|
142
|
+
S as Tabs,
|
|
143
|
+
Ze as Tag,
|
|
144
|
+
de as Theme,
|
|
145
|
+
ne as ThemeColor,
|
|
146
|
+
so as ThemeDefaultIcon,
|
|
147
|
+
Io as WarnIcon,
|
|
148
|
+
To as ZoomInIcon,
|
|
149
|
+
ko as ZoomOutIcon,
|
|
150
|
+
d as addClickOutside,
|
|
151
|
+
Ke as autoUpdate,
|
|
152
|
+
Ne as createPopoverObserver,
|
|
153
|
+
Xe as getOverflowAncestors,
|
|
154
|
+
r as initAttr,
|
|
155
|
+
t as kebabToCamel,
|
|
156
|
+
a as parseAttrValue,
|
|
157
|
+
Ye as popconfirmProps,
|
|
158
|
+
f as regist,
|
|
159
|
+
x as removeClickOutside,
|
|
160
|
+
s as setAttrs,
|
|
161
|
+
l as tagAttr,
|
|
162
|
+
m as tagAttrs,
|
|
163
|
+
_e as updatePosition,
|
|
164
|
+
p as useId
|
|
166
165
|
};
|
package/lib/input/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { addClass as h, removeClass as u, $one as d, on as o, formatStyle as c,
|
|
|
2
2
|
import { initAttr as g, parseAttrValue as a } from "../utils/index.js";
|
|
3
3
|
import m from "../form/form_inner.js";
|
|
4
4
|
import { add as b, remove as x } from "../utils/event.js";
|
|
5
|
-
import { i as v } from "../index-
|
|
5
|
+
import { i as v } from "../index-DvcllHRh.js";
|
|
6
6
|
class I extends m {
|
|
7
7
|
static baseName = "input";
|
|
8
8
|
/** 原生 input 的 type */
|
package/lib/mask/index.js
CHANGED
|
@@ -37,12 +37,7 @@ class x extends a {
|
|
|
37
37
|
this[t],
|
|
38
38
|
t
|
|
39
39
|
);
|
|
40
|
-
|
|
41
|
-
switch (this[t] = o, t) {
|
|
42
|
-
case "zIndex":
|
|
43
|
-
o === 100 ? this.style.removeProperty("--l-mask-zindex") : this.style.setProperty("--l-mask-zindex", o);
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
40
|
+
o !== this[t] && (this[t] = o, t === "zIndex" && (o === 100 ? this.style.removeProperty("--l-mask-zindex") : this.style.setProperty("--l-mask-zindex", o)));
|
|
46
41
|
}
|
|
47
42
|
render() {
|
|
48
43
|
const t = document.createDocumentFragment(), e = n("div", {
|
package/lib/message/index.d.ts
CHANGED
|
@@ -11,15 +11,14 @@ interface MessageOption {
|
|
|
11
11
|
/** 自定义类名 */
|
|
12
12
|
customClass?: string;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
success: (
|
|
19
|
-
error: (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default Message;
|
|
14
|
+
/** 关闭消息 */
|
|
15
|
+
declare function close(id: string): void;
|
|
16
|
+
declare const _default: {
|
|
17
|
+
info: (options: string | MessageOption) => string;
|
|
18
|
+
success: (options: string | MessageOption) => string;
|
|
19
|
+
error: (options: string | MessageOption) => string;
|
|
20
|
+
warn: (options: string | MessageOption) => string;
|
|
21
|
+
show: (options: string | MessageOption) => string;
|
|
22
|
+
close: typeof close;
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
package/lib/message/index.js
CHANGED
|
@@ -1,67 +1,66 @@
|
|
|
1
|
-
import { regist as
|
|
2
|
-
import { transition as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import { regist as g, useId as y } from "../utils/index.js";
|
|
2
|
+
import { transition as m } from "ph-utils/dom";
|
|
3
|
+
import p from "../icon/close_filled.js";
|
|
4
|
+
import h from "../icon/success.js";
|
|
5
|
+
import $ from "../icon/warn.js";
|
|
6
|
+
import x from "../icon/info.js";
|
|
7
|
+
const r = [], d = [
|
|
8
8
|
["opacity", "0", "0.3s"],
|
|
9
9
|
["transform", "translate3d(-50%, -100%, 0)", "0.3s"]
|
|
10
10
|
];
|
|
11
|
-
let
|
|
12
|
-
function
|
|
13
|
-
const t =
|
|
11
|
+
let l = !0;
|
|
12
|
+
function u(e) {
|
|
13
|
+
const t = r.findIndex((o) => o.id === e);
|
|
14
14
|
if (t === -1) return;
|
|
15
|
-
const s =
|
|
15
|
+
const s = r.splice(t, 1)[0];
|
|
16
16
|
if (s == null) return;
|
|
17
|
-
|
|
17
|
+
m(s, d, "leave", () => {
|
|
18
18
|
s.remove();
|
|
19
19
|
});
|
|
20
|
-
const
|
|
20
|
+
const i = 15 + s.offsetHeight, n = r.length;
|
|
21
21
|
if (n !== 0)
|
|
22
22
|
for (let o = t; o < n; o++) {
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const a = r[o], f = parseInt(a.style.top, 10) - i;
|
|
24
|
+
a.style.setProperty("top", `${f}px`);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function v(e) {
|
|
28
28
|
const t = document.createElement("div");
|
|
29
29
|
t.id = e.id;
|
|
30
30
|
const s = e.type || "info";
|
|
31
|
-
let
|
|
32
|
-
e.customClass && (
|
|
31
|
+
let i = `l-message l-message-${s}`;
|
|
32
|
+
e.customClass && (i += " " + e.customClass), t.className = i, t.style.setProperty("top", `${e.offset}px`), t.style.setProperty("z-index", `${e.zindex || 1e3}`), e.width && t.style.setProperty("width", e.width);
|
|
33
33
|
let n = s;
|
|
34
|
-
return n === "error" && (n = "
|
|
34
|
+
return n === "error" && (n = "close-filled"), t.innerHTML = [
|
|
35
35
|
'<div class="l-message-container">',
|
|
36
36
|
`<l-${n}-icon class="l-message-icon"></l-${n}-icon>`,
|
|
37
37
|
`<span class="l-message-content">${e.message}</span>`,
|
|
38
38
|
"</div>"
|
|
39
39
|
].join(""), t;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
const t =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
),
|
|
47
|
-
|
|
48
|
-
const n = x(r);
|
|
49
|
-
c.push(n), document.body.appendChild(n), d(n, u, "enter");
|
|
50
|
-
let o = r.duration;
|
|
41
|
+
const w = ((e) => {
|
|
42
|
+
l && (g([p, h, $, x]), l = !1);
|
|
43
|
+
const t = r.reduce((a, f) => a + f.offsetHeight + 15, 15), s = y(), i = typeof e == "string" ? { message: e } : e;
|
|
44
|
+
i.id = s, i.offset = t;
|
|
45
|
+
const n = v(i);
|
|
46
|
+
r.push(n), document.body.appendChild(n), m(n, d, "enter");
|
|
47
|
+
let o = i.duration;
|
|
51
48
|
return o == null && (o = 3e3), o !== 0 && setTimeout(() => {
|
|
52
|
-
|
|
49
|
+
u(s);
|
|
53
50
|
}, o), s;
|
|
54
51
|
});
|
|
55
|
-
function
|
|
52
|
+
function c(e, t = "info") {
|
|
56
53
|
const s = typeof e == "string" ? { message: e } : e;
|
|
57
|
-
return s.type || (s.type = t),
|
|
54
|
+
return s.type || (s.type = t), w(s);
|
|
58
55
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
const F = {
|
|
57
|
+
info: (e) => c(e, "info"),
|
|
58
|
+
success: (e) => c(e, "success"),
|
|
59
|
+
error: (e) => c(e, "error"),
|
|
60
|
+
warn: (e) => c(e, "warn"),
|
|
61
|
+
show: (e) => c(e),
|
|
62
|
+
close: u
|
|
63
|
+
};
|
|
65
64
|
export {
|
|
66
|
-
|
|
65
|
+
F as default
|
|
67
66
|
};
|
package/lib/modal/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import x from "../base.js";
|
|
2
2
|
import { parseAttrValue as c, initAttr as g } from "../utils/index.js";
|
|
3
3
|
import { $one as i, transition as s, $$ as a, on as u, off as k, shouldEventNext as y } from "ph-utils/dom";
|
|
4
|
-
const v = ":host{display:none}:host(.open){display:block}.l-modal-mask{z-index:var(--l-modal-zindex, 100)}.l-modal-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:calc(var(--l-modal-zindex, 100) + 1)}.l-modal{--l-modal-translate: translate3d(0, 80px, 0);background-color:#fff;border-radius:5px;width:var(--l-modal-width, 27%);margin:auto;box-shadow:0 0 8px #0000001a;position:relative;opacity:1;transform:var(--l-modal-translate) scaleZ(1);transition:opacity .3s,transform .3s}.l-modal-header{display:block;padding:10px;font-size:16px;border-bottom:1px solid var(--l-modal-line-color, rgba(0, 0, 0, .06));font-weight:600;display:flex;align-items:center;gap:5px}.l-modal-footer{padding:10px;border-top:1px solid var(--l-modal-line-color, rgba(0, 0, 0, .06));display:flex;justify-content:flex-end;gap:10px}.l-modal-container{padding:var(--l-modal-container-padding, 15px 10px);font-size:14px}.l-btn-modal-close{--l-form-control-height: auto;position:absolute}.l-modal-close1{right:5px;top:8px}.l-modal-close1::part(default){width:auto;height:auto;padding:5px;border:none;font-size:16px}.l-modal-close2{right:-10px;top:-10px}.l-modal-close2::part(default){width:20px;height:20px;padding:0;background-color:#fff}.mask-transition-enter-from,.mask-transition-leave-to{opacity:0}.modal-transition-enter-from,.modal-transition-leave-to{transform:translateZ(0) scale3d(0,0,0)}.l-modal--mobile{border-radius:10px}.l-modal--mobile .l-modal-header{text-align:center;border-bottom-color:transparent;padding:20px 10px 5px;display:flex;justify-content:center}.l-modal--mobile .l-modal-container{--l-modal-container-padding: 5px 15px 20px;text-align:center}.l-modal--mobile .l-modal-footer{display:flex;justify-content:stretch;align-items:stretch;padding:0;text-align:center;height:50px;gap:0}.l-modal--mobile .l-modal-footer-btn{flex-grow:1;height:100%}.l-modal--mobile .l-modal-footer-btn+.l-modal-footer-btn{border-left:1px solid var(--l-modal-line-color, rgba(0, 0, 0, .06))}.l-modal--middle{--l-modal-translate: translate3d(0, -50%, 0);top:50%}.l-modal--bottom{--l-modal-translate: translate3d(0, -100%, 0);top:100%;width:100%;border-bottom-left-radius:0;border-bottom-right-radius:0}@media screen and (max-width:
|
|
4
|
+
const v = ":host{display:none}:host(.open){display:block}.l-modal-mask{z-index:var(--l-modal-zindex, 100)}.l-modal-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:calc(var(--l-modal-zindex, 100) + 1)}.l-modal{--l-modal-translate: translate3d(0, 80px, 0);background-color:#fff;border-radius:5px;width:var(--l-modal-width, 27%);margin:auto;box-shadow:0 0 8px #0000001a;position:relative;opacity:1;transform:var(--l-modal-translate) scaleZ(1);transition:opacity .3s,transform .3s}.l-modal-header{display:block;padding:10px;font-size:16px;border-bottom:1px solid var(--l-modal-line-color, rgba(0, 0, 0, .06));font-weight:600;display:flex;align-items:center;gap:5px}.l-modal-footer{padding:10px;border-top:1px solid var(--l-modal-line-color, rgba(0, 0, 0, .06));display:flex;justify-content:flex-end;gap:10px}.l-modal-container{padding:var(--l-modal-container-padding, 15px 10px);font-size:14px}.l-btn-modal-close{--l-form-control-height: auto;position:absolute}.l-modal-close1{right:5px;top:8px}.l-modal-close1::part(default){width:auto;height:auto;padding:5px;border:none;font-size:16px}.l-modal-close2{right:-10px;top:-10px}.l-modal-close2::part(default){width:20px;height:20px;padding:0;background-color:#fff}.mask-transition-enter-from,.mask-transition-leave-to{opacity:0}.modal-transition-enter-from,.modal-transition-leave-to{transform:translateZ(0) scale3d(0,0,0)}.l-modal--mobile{border-radius:10px}.l-modal--mobile .l-modal-header{text-align:center;border-bottom-color:transparent;padding:20px 10px 5px;display:flex;justify-content:center}.l-modal--mobile .l-modal-container{--l-modal-container-padding: 5px 15px 20px;text-align:center}.l-modal--mobile .l-modal-footer{display:flex;justify-content:stretch;align-items:stretch;padding:0;text-align:center;height:50px;gap:0}.l-modal--mobile .l-modal-footer-btn{flex-grow:1;height:100%}.l-modal--mobile .l-modal-footer-btn+.l-modal-footer-btn{border-left:1px solid var(--l-modal-line-color, rgba(0, 0, 0, .06))}.l-modal--middle{--l-modal-translate: translate3d(0, -50%, 0);top:50%}.l-modal--bottom{--l-modal-translate: translate3d(0, -100%, 0);top:100%;width:100%;border-bottom-left-radius:0;border-bottom-right-radius:0}@media screen and (max-width:768px){:host{--l-modal-width: 80%}}", w = ".l-mask{position:fixed;z-index:var(--l-mask-zindex, 100);inset:0;background-color:#0009;transition:opacity .3s;opacity:1}";
|
|
5
5
|
class L extends x {
|
|
6
6
|
static baseName = "modal";
|
|
7
7
|
/** 是否显示对话框 */
|
package/lib/select/index.js
CHANGED
|
@@ -103,12 +103,7 @@ class O extends x {
|
|
|
103
103
|
this[e],
|
|
104
104
|
e
|
|
105
105
|
);
|
|
106
|
-
|
|
107
|
-
switch (e) {
|
|
108
|
-
case "width":
|
|
109
|
-
s ? this.style.setProperty("--l-select-width", s) : this.style.removeProperty("--l-select-width");
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
106
|
+
s !== this[e] && (this[e] = s), this.rendered && e === "width" && (s ? this.style.setProperty("--l-select-width", s) : this.style.removeProperty("--l-select-width"));
|
|
112
107
|
}
|
|
113
108
|
setOptions(e) {
|
|
114
109
|
this.options = e, this._backOptions = [...e], this._popover && this.expanded && this._popover.updatePopoverContent();
|
package/lib/select_ori/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import a from "../form/form_inner.js";
|
|
2
2
|
import { tagAttrs as c } from "../utils/index.js";
|
|
3
3
|
import { $one as r, on as h, off as o } from "ph-utils/dom";
|
|
4
|
-
import { i as d } from "../index-
|
|
4
|
+
import { i as d } from "../index-DvcllHRh.js";
|
|
5
5
|
class v extends a {
|
|
6
6
|
static baseName = "select-ori";
|
|
7
7
|
$select;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import BaseComponent from "../base";
|
|
2
|
+
export default class Space extends BaseComponent {
|
|
3
|
+
static baseName: string;
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
static get observedAttributes(): string[];
|
|
6
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
7
|
+
render(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import r from "../base.js";
|
|
2
|
+
import { kebabToCamel as p, parseAttrValue as i } from "../utils/index.js";
|
|
3
|
+
import { isNumeric as o } from "ph-utils";
|
|
4
|
+
const c = ":host{box-sizing:border-box;display:var(--l-space-display, flex);align-items:var(--l-space-align, center);justify-content:var(--l-space-justify, flex-start);gap:var(--l-space-gap, 10px);flex-wrap:var(--l-space-wrap, nowrap);flex-direction:var(--l-space-direction, row)}";
|
|
5
|
+
class u extends r {
|
|
6
|
+
static baseName = "space";
|
|
7
|
+
connectedCallback() {
|
|
8
|
+
this.loadStyleText(c), super.connectedCallback();
|
|
9
|
+
}
|
|
10
|
+
static get observedAttributes() {
|
|
11
|
+
return ["inline", "align", "justify", "gap", "direction", "wrap"];
|
|
12
|
+
}
|
|
13
|
+
attributeChangedCallback(e, y, l) {
|
|
14
|
+
e = p(e);
|
|
15
|
+
const t = i(l, this[e], e);
|
|
16
|
+
if (e === "inline")
|
|
17
|
+
i(l, !1, "inline") ? this.style.setProperty("--l-space-display", "inline-flex") : this.style.removeProperty("--l-space-display");
|
|
18
|
+
else if (e === "gap")
|
|
19
|
+
if (t) {
|
|
20
|
+
const s = t.split(",").map((a) => o(a) ? `${a}px` : a);
|
|
21
|
+
this.style.setProperty("--l-space-gap", s.join(" "));
|
|
22
|
+
} else
|
|
23
|
+
this.style.removeProperty("--l-space-gap");
|
|
24
|
+
else {
|
|
25
|
+
const s = `--l-space-${e}`;
|
|
26
|
+
t ? this.style.setProperty(s, t) : this.style.removeProperty(s);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return "<slot></slot>";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
u as default
|
|
35
|
+
};
|
package/lib/table/index.d.ts
CHANGED
|
@@ -25,8 +25,7 @@ export default class Table extends BaseComponent {
|
|
|
25
25
|
private _globalColStyles?;
|
|
26
26
|
connectedCallback(): void;
|
|
27
27
|
setColumns(columns: Column[]): void;
|
|
28
|
-
setData(data: any[]): void;
|
|
29
|
-
setDefaultSort(sortInfo: SortOption): void;
|
|
28
|
+
setData(data: any[], sortInfo?: SortOption): void;
|
|
30
29
|
changeFixed(params?: ChangeFixedParams): void;
|
|
31
30
|
static get observedAttributes(): string[];
|
|
32
31
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
@@ -59,5 +58,6 @@ export default class Table extends BaseComponent {
|
|
|
59
58
|
private _handleTap;
|
|
60
59
|
afterInit(): void;
|
|
61
60
|
beforeDestroy(): void;
|
|
61
|
+
private _dataSort;
|
|
62
62
|
}
|
|
63
63
|
export {};
|