@baishuyun/ui-mobile 0.7.0 → 0.9.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/dist/AMap/{AMap-DwrSlwyV.js → AMap-B1GiEoPE.js} +2 -2
- package/dist/AMap/index.js +4 -4
- package/dist/ActionSheet/ActionSheet-DVck9uyS.js +85 -0
- package/dist/ActionSheet/index.js +6 -4
- package/dist/Calendar/{Calendar-tYjpphMo.js → Calendar-B1TwDL1q.js} +2 -2
- package/dist/Calendar/index.js +4 -4
- package/dist/ConfigProvider/ConfigProvider-xyGx046s.js +328 -0
- package/dist/ConfigProvider/index.js +4 -3
- package/dist/ConfigProvider/{useLocale-CP8NRZoj.js → useLocale-Bf81I-9U.js} +57 -0
- package/dist/Editor/Editor-DUsPQevQ.js +2051 -0
- package/dist/Editor/index.js +8 -0
- package/dist/Gantt/{Gantt-D2ZGpS5p.js → Gantt-CbHw9RMw.js} +3 -3
- package/dist/Gantt/index.js +8 -6
- package/dist/Icon/{Icon-CFvcrGGg.js → Icon-D3xi1oyo.js} +1 -1
- package/dist/Icon/index.js +2 -2
- package/dist/Overlay/Overlay-CqQWOqO4.js +61 -0
- package/dist/Overlay/index.js +3 -0
- package/dist/Popup/Popup-BIIDAUmB.js +78 -0
- package/dist/Popup/index.js +5 -0
- package/dist/components/ActionSheet/ActionSheet.d.ts +1 -1
- package/dist/components/ActionSheet/interface.d.ts +1 -2
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/dist/components/ConfigProvider/context.d.ts +14 -0
- package/dist/components/Editor/Editor.d.ts +6 -0
- package/dist/components/Editor/EditorCore.d.ts +3 -0
- package/dist/components/Editor/EditorHtml.d.ts +3 -0
- package/dist/components/Editor/Thinking.d.ts +22 -0
- package/dist/components/Editor/constants.d.ts +57 -0
- package/dist/components/Editor/index.d.ts +3 -0
- package/dist/components/Editor/interface.d.ts +59 -0
- package/dist/components/Editor/nodes/ExtendedTextNode.d.ts +9 -0
- package/dist/components/Editor/nodes/ImageNode.d.ts +48 -0
- package/dist/components/Editor/plugins/HeadingPlugin.d.ts +2 -0
- package/dist/components/Editor/plugins/LinkColorPlugin.d.ts +2 -0
- package/dist/components/Editor/plugins/PasteStripImagePlugin.d.ts +2 -0
- package/dist/components/Editor/sheets.d.ts +43 -0
- package/dist/components/Editor/toolbar/Toolbar.d.ts +10 -0
- package/dist/components/Editor/toolbar/ToolbarColorGlyph.d.ts +8 -0
- package/dist/components/Editor/toolbar/useTextFormats.d.ts +16 -0
- package/dist/components/Editor/utils/applyAiPolish.d.ts +5 -0
- package/dist/components/Editor/utils/fillRootFromHtml.d.ts +2 -0
- package/dist/components/Editor/utils/isAcceptedImageType.d.ts +5 -0
- package/dist/components/Editor/utils/isEmptyEditorHtml.d.ts +1 -0
- package/dist/components/Editor/utils/readEditorAiSnapshot.d.ts +8 -0
- package/dist/components/Editor/utils/sanitizeEditorHtml.d.ts +1 -0
- package/dist/components/Editor/utils/stripInlineStyleProperty.d.ts +1 -0
- package/dist/components/Editor/utils/toPortableEditorHtml.d.ts +1 -0
- package/dist/components/Editor/utils/unwrapTypesetFence.d.ts +6 -0
- package/dist/components/Overlay/OverlayContext.d.ts +17 -0
- package/dist/components/Overlay/index.d.ts +2 -0
- package/dist/components/Popup/Popup.d.ts +3 -0
- package/dist/components/Popup/index.d.ts +2 -0
- package/dist/components/Popup/interface.d.ts +46 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/index.js +13 -10
- package/dist/locale/lang/en-US.json.d.ts +59 -0
- package/dist/locale/lang/zh-CN.json.d.ts +59 -0
- package/dist/locale/lang/zh-TW.json.d.ts +59 -0
- package/dist/style.css +1 -1
- package/dist/vendors/{version-Dg7dOJFj.js → version-CslTV1sb.js} +1 -1
- package/dist/vite-env.d.ts +5 -0
- package/package.json +12 -3
- package/dist/ActionSheet/ActionSheet-DbrKxa_y.js +0 -133
- package/dist/ConfigProvider/ConfigProvider-DnlakyRE.js +0 -208
- /package/dist/Calendar/{cssVars-UpgK6spf.js → cssVars-DNOooryc.js} +0 -0
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-CFvcrGGg.js";
|
|
2
|
-
import { t } from "../ConfigProvider/useLocale-CP8NRZoj.js";
|
|
3
|
-
import { useEffect as n, useId as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
|
|
4
|
-
import { createPortal as s } from "react-dom";
|
|
5
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
-
//#region src/components/ActionSheet/ActionSheet.module.scss
|
|
7
|
-
var u = {
|
|
8
|
-
"bsy-action-sheet": "_bsy-action-sheet_1uhjc_2",
|
|
9
|
-
"bsy-action-sheet__mask": "_bsy-action-sheet__mask_1uhjc_8",
|
|
10
|
-
"bsy-action-sheet__panel": "_bsy-action-sheet__panel_1uhjc_19",
|
|
11
|
-
"bsy-action-sheet--open": "_bsy-action-sheet--open_1uhjc_36",
|
|
12
|
-
"bsy-action-sheet__header": "_bsy-action-sheet__header_1uhjc_42",
|
|
13
|
-
"bsy-action-sheet__title": "_bsy-action-sheet__title_1uhjc_52",
|
|
14
|
-
"bsy-action-sheet__close": "_bsy-action-sheet__close_1uhjc_63",
|
|
15
|
-
"bsy-action-sheet__body": "_bsy-action-sheet__body_1uhjc_77",
|
|
16
|
-
"bsy-action-sheet__list": "_bsy-action-sheet__list_1uhjc_82",
|
|
17
|
-
"bsy-action-sheet--menu": "_bsy-action-sheet--menu_1uhjc_85",
|
|
18
|
-
"bsy-action-sheet__item": "_bsy-action-sheet__item_1uhjc_85",
|
|
19
|
-
"bsy-action-sheet__item--selected": "_bsy-action-sheet__item--selected_1uhjc_109",
|
|
20
|
-
"bsy-action-sheet__item--disabled": "_bsy-action-sheet__item--disabled_1uhjc_112",
|
|
21
|
-
"bsy-action-sheet__item-inner": "_bsy-action-sheet__item-inner_1uhjc_116",
|
|
22
|
-
"bsy-action-sheet--select": "_bsy-action-sheet--select_1uhjc_122",
|
|
23
|
-
"bsy-action-sheet__item-icon": "_bsy-action-sheet__item-icon_1uhjc_125",
|
|
24
|
-
"bsy-action-sheet__item-label": "_bsy-action-sheet__item-label_1uhjc_134",
|
|
25
|
-
"bsy-action-sheet__check": "_bsy-action-sheet__check_1uhjc_143"
|
|
26
|
-
}, d = (...e) => e.filter(Boolean).join(" "), f = ({ open: f, onClose: p, mode: m = "select", title: h, actions: g, onAction: _, children: v, zIndex: y = 1e3, getPopupContainer: b, className: x }) => {
|
|
27
|
-
let { t: S } = t(), C = r(), [w, T] = o(f), [E, D] = o(!1), O = a(!1), k = a({
|
|
28
|
-
title: h,
|
|
29
|
-
actions: g,
|
|
30
|
-
children: v,
|
|
31
|
-
mode: m
|
|
32
|
-
});
|
|
33
|
-
f && (k.current = {
|
|
34
|
-
title: h,
|
|
35
|
-
actions: g,
|
|
36
|
-
children: v,
|
|
37
|
-
mode: m
|
|
38
|
-
});
|
|
39
|
-
let A = k.current, j = A.mode === "menu";
|
|
40
|
-
n(() => {
|
|
41
|
-
if (f) {
|
|
42
|
-
T(!0);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
D(!1), O.current || T(!1);
|
|
46
|
-
}, [f]), i(() => {
|
|
47
|
-
if (!w || !f) return;
|
|
48
|
-
let e = 0, t = requestAnimationFrame(() => {
|
|
49
|
-
e = requestAnimationFrame(() => {
|
|
50
|
-
O.current = !0, D(!0);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
return () => {
|
|
54
|
-
cancelAnimationFrame(t), cancelAnimationFrame(e);
|
|
55
|
-
};
|
|
56
|
-
}, [w, f]), n(() => {
|
|
57
|
-
if (!w) return;
|
|
58
|
-
let e = document.body.style.overflow;
|
|
59
|
-
return document.body.style.overflow = "hidden", () => {
|
|
60
|
-
document.body.style.overflow = e;
|
|
61
|
-
};
|
|
62
|
-
}, [w]);
|
|
63
|
-
let M = typeof document > "u" ? null : b?.() || document.body;
|
|
64
|
-
if (!w || !M) return null;
|
|
65
|
-
let N = A.children !== void 0 && A.children !== null, P = S("actionSheet.close");
|
|
66
|
-
return s(/* @__PURE__ */ l("div", {
|
|
67
|
-
className: d(u["bsy-action-sheet"], j ? u["bsy-action-sheet--menu"] : u["bsy-action-sheet--select"], E && f && u["bsy-action-sheet--open"], x),
|
|
68
|
-
style: { zIndex: y },
|
|
69
|
-
children: [/* @__PURE__ */ c("button", {
|
|
70
|
-
type: "button",
|
|
71
|
-
className: u["bsy-action-sheet__mask"],
|
|
72
|
-
"aria-label": P,
|
|
73
|
-
onClick: p
|
|
74
|
-
}), /* @__PURE__ */ l("div", {
|
|
75
|
-
className: u["bsy-action-sheet__panel"],
|
|
76
|
-
role: "dialog",
|
|
77
|
-
"aria-modal": "true",
|
|
78
|
-
"aria-labelledby": A.title !== void 0 && A.title !== null ? C : void 0,
|
|
79
|
-
onTransitionEnd: (e) => {
|
|
80
|
-
e.propertyName === "transform" && (f || (O.current = !1, T(!1)));
|
|
81
|
-
},
|
|
82
|
-
children: [/* @__PURE__ */ l("div", {
|
|
83
|
-
className: u["bsy-action-sheet__header"],
|
|
84
|
-
children: [/* @__PURE__ */ c("div", {
|
|
85
|
-
id: C,
|
|
86
|
-
className: u["bsy-action-sheet__title"],
|
|
87
|
-
children: A.title
|
|
88
|
-
}), /* @__PURE__ */ c("button", {
|
|
89
|
-
type: "button",
|
|
90
|
-
className: u["bsy-action-sheet__close"],
|
|
91
|
-
"aria-label": P,
|
|
92
|
-
onClick: p,
|
|
93
|
-
children: /* @__PURE__ */ c(e, {
|
|
94
|
-
name: "close",
|
|
95
|
-
size: 18
|
|
96
|
-
})
|
|
97
|
-
})]
|
|
98
|
-
}), /* @__PURE__ */ c("div", {
|
|
99
|
-
className: u["bsy-action-sheet__body"],
|
|
100
|
-
children: N ? A.children : /* @__PURE__ */ c("div", {
|
|
101
|
-
className: u["bsy-action-sheet__list"],
|
|
102
|
-
children: A.actions?.map((t) => /* @__PURE__ */ l("button", {
|
|
103
|
-
type: "button",
|
|
104
|
-
disabled: t.disabled,
|
|
105
|
-
className: d(u["bsy-action-sheet__item"], !j && t.selected && u["bsy-action-sheet__item--selected"], t.disabled && u["bsy-action-sheet__item--disabled"]),
|
|
106
|
-
style: j && !t.disabled && t.color ? { color: t.color } : void 0,
|
|
107
|
-
onClick: () => {
|
|
108
|
-
_?.(t), p();
|
|
109
|
-
},
|
|
110
|
-
children: [/* @__PURE__ */ l("span", {
|
|
111
|
-
className: u["bsy-action-sheet__item-inner"],
|
|
112
|
-
children: [j && t.icon ? /* @__PURE__ */ c("span", {
|
|
113
|
-
className: u["bsy-action-sheet__item-icon"],
|
|
114
|
-
children: t.icon
|
|
115
|
-
}) : null, /* @__PURE__ */ c("span", {
|
|
116
|
-
className: u["bsy-action-sheet__item-label"],
|
|
117
|
-
children: t.text
|
|
118
|
-
})]
|
|
119
|
-
}), !j && t.selected ? /* @__PURE__ */ c("span", {
|
|
120
|
-
className: u["bsy-action-sheet__check"],
|
|
121
|
-
children: /* @__PURE__ */ c(e, {
|
|
122
|
-
name: "checkthebox",
|
|
123
|
-
size: 16
|
|
124
|
-
})
|
|
125
|
-
}) : null]
|
|
126
|
-
}, t.key))
|
|
127
|
-
})
|
|
128
|
-
})]
|
|
129
|
-
})]
|
|
130
|
-
}), M);
|
|
131
|
-
};
|
|
132
|
-
//#endregion
|
|
133
|
-
export { f as t };
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { a as e, i as t, n } from "./useLocale-CP8NRZoj.js";
|
|
2
|
-
import { useCallback as r, useContext as i, useMemo as a } from "react";
|
|
3
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
-
var s = {
|
|
5
|
-
actionSheet: { close: "關閉" },
|
|
6
|
-
calendar: {
|
|
7
|
-
today: "今天",
|
|
8
|
-
viewDay: "日",
|
|
9
|
-
viewThreeDay: "三天",
|
|
10
|
-
viewMonth: "月",
|
|
11
|
-
yearMonth: "{year}年{monthShort}",
|
|
12
|
-
monthShort: {
|
|
13
|
-
1: "1月",
|
|
14
|
-
2: "2月",
|
|
15
|
-
3: "3月",
|
|
16
|
-
4: "4月",
|
|
17
|
-
5: "5月",
|
|
18
|
-
6: "6月",
|
|
19
|
-
7: "7月",
|
|
20
|
-
8: "8月",
|
|
21
|
-
9: "9月",
|
|
22
|
-
10: "10月",
|
|
23
|
-
11: "11月",
|
|
24
|
-
12: "12月"
|
|
25
|
-
},
|
|
26
|
-
weekday: {
|
|
27
|
-
1: "一",
|
|
28
|
-
2: "二",
|
|
29
|
-
3: "三",
|
|
30
|
-
4: "四",
|
|
31
|
-
5: "五",
|
|
32
|
-
6: "六",
|
|
33
|
-
7: "日"
|
|
34
|
-
},
|
|
35
|
-
weekdayPrefixed: {
|
|
36
|
-
1: "週一",
|
|
37
|
-
2: "週二",
|
|
38
|
-
3: "週三",
|
|
39
|
-
4: "週四",
|
|
40
|
-
5: "週五",
|
|
41
|
-
6: "週六",
|
|
42
|
-
7: "週日"
|
|
43
|
-
},
|
|
44
|
-
collapse: "收合",
|
|
45
|
-
moreRecords: "還有 {count} 筆"
|
|
46
|
-
},
|
|
47
|
-
gantt: {
|
|
48
|
-
today: "今天",
|
|
49
|
-
zoomSheetTitle: "切換時間查看",
|
|
50
|
-
prevScreen: "上一屏",
|
|
51
|
-
nextScreen: "下一屏",
|
|
52
|
-
locateTask: "定位到任務",
|
|
53
|
-
week: "{week}週",
|
|
54
|
-
year: "{year}年",
|
|
55
|
-
yearMonthDay: "{year}年{month}月{day}日",
|
|
56
|
-
hour: "{hour}點",
|
|
57
|
-
hourRange: "{start}-{end}時",
|
|
58
|
-
monthDayHour: "{month}月{day}日{hour}點",
|
|
59
|
-
am: "上午",
|
|
60
|
-
pm: "下午",
|
|
61
|
-
firstHalfYear: "上半年",
|
|
62
|
-
secondHalfYear: "下半年",
|
|
63
|
-
yearQuarter: "{year}年{quarter}",
|
|
64
|
-
quarter: {
|
|
65
|
-
1: "一季度",
|
|
66
|
-
2: "二季度",
|
|
67
|
-
3: "三季度",
|
|
68
|
-
4: "四季度"
|
|
69
|
-
},
|
|
70
|
-
zoom: {
|
|
71
|
-
oneMinute: "按分鐘查看",
|
|
72
|
-
tenMinute: "按10分鐘查看",
|
|
73
|
-
halfHour: "按半小時查看",
|
|
74
|
-
hour: "按小時查看",
|
|
75
|
-
sixHour: "按6小時查看",
|
|
76
|
-
halfDay: "按半天查看",
|
|
77
|
-
day: "按日查看",
|
|
78
|
-
week: "按週查看",
|
|
79
|
-
month: "按月查看",
|
|
80
|
-
quarter: "按季查看",
|
|
81
|
-
quarterMonth: "按季/月查看",
|
|
82
|
-
year: "按年查看"
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
amap: {
|
|
86
|
-
poi: {
|
|
87
|
-
placeholder: "搜尋定位中心",
|
|
88
|
-
loading: "搜尋中...",
|
|
89
|
-
empty: "暫無結果"
|
|
90
|
-
},
|
|
91
|
-
locate: {
|
|
92
|
-
ariaLabel: "定位",
|
|
93
|
-
failed: "定位失敗,請檢查是否開啟定位權限"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}, c = {
|
|
97
|
-
actionSheet: { close: "Close" },
|
|
98
|
-
calendar: {
|
|
99
|
-
today: "Today",
|
|
100
|
-
viewDay: "Day",
|
|
101
|
-
viewThreeDay: "3-Day",
|
|
102
|
-
viewMonth: "Month",
|
|
103
|
-
yearMonth: "{monthShort} {year}",
|
|
104
|
-
monthShort: {
|
|
105
|
-
1: "Jan",
|
|
106
|
-
2: "Feb",
|
|
107
|
-
3: "Mar",
|
|
108
|
-
4: "Apr",
|
|
109
|
-
5: "May",
|
|
110
|
-
6: "Jun",
|
|
111
|
-
7: "Jul",
|
|
112
|
-
8: "Aug",
|
|
113
|
-
9: "Sep",
|
|
114
|
-
10: "Oct",
|
|
115
|
-
11: "Nov",
|
|
116
|
-
12: "Dec"
|
|
117
|
-
},
|
|
118
|
-
weekday: {
|
|
119
|
-
1: "Mon",
|
|
120
|
-
2: "Tue",
|
|
121
|
-
3: "Wed",
|
|
122
|
-
4: "Thu",
|
|
123
|
-
5: "Fri",
|
|
124
|
-
6: "Sat",
|
|
125
|
-
7: "Sun"
|
|
126
|
-
},
|
|
127
|
-
weekdayPrefixed: {
|
|
128
|
-
1: "Mon",
|
|
129
|
-
2: "Tue",
|
|
130
|
-
3: "Wed",
|
|
131
|
-
4: "Thu",
|
|
132
|
-
5: "Fri",
|
|
133
|
-
6: "Sat",
|
|
134
|
-
7: "Sun"
|
|
135
|
-
},
|
|
136
|
-
collapse: "Show less",
|
|
137
|
-
moreRecords: "{count} more"
|
|
138
|
-
},
|
|
139
|
-
gantt: {
|
|
140
|
-
today: "Today",
|
|
141
|
-
zoomSheetTitle: "Change time scale",
|
|
142
|
-
prevScreen: "Previous screen",
|
|
143
|
-
nextScreen: "Next screen",
|
|
144
|
-
locateTask: "Jump to task",
|
|
145
|
-
week: "W{week}",
|
|
146
|
-
year: "{year}",
|
|
147
|
-
yearMonthDay: "{monthShort} {day}, {year}",
|
|
148
|
-
hour: "{hour}:00",
|
|
149
|
-
hourRange: "{start}–{end}h",
|
|
150
|
-
monthDayHour: "{monthShort} {day}, {hour}:00",
|
|
151
|
-
am: "AM",
|
|
152
|
-
pm: "PM",
|
|
153
|
-
firstHalfYear: "H1",
|
|
154
|
-
secondHalfYear: "H2",
|
|
155
|
-
yearQuarter: "{quarter} {year}",
|
|
156
|
-
quarter: {
|
|
157
|
-
1: "Q1",
|
|
158
|
-
2: "Q2",
|
|
159
|
-
3: "Q3",
|
|
160
|
-
4: "Q4"
|
|
161
|
-
},
|
|
162
|
-
zoom: {
|
|
163
|
-
oneMinute: "Minute view",
|
|
164
|
-
tenMinute: "10-minute view",
|
|
165
|
-
halfHour: "Half-hour view",
|
|
166
|
-
hour: "Hour view",
|
|
167
|
-
sixHour: "6-hour view",
|
|
168
|
-
halfDay: "Half-day view",
|
|
169
|
-
day: "Day view",
|
|
170
|
-
week: "Week view",
|
|
171
|
-
month: "Month view",
|
|
172
|
-
quarter: "Quarter view",
|
|
173
|
-
quarterMonth: "Quarter/month view",
|
|
174
|
-
year: "Year view"
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
amap: {
|
|
178
|
-
poi: {
|
|
179
|
-
placeholder: "Search location center",
|
|
180
|
-
loading: "Searching...",
|
|
181
|
-
empty: "No results"
|
|
182
|
-
},
|
|
183
|
-
locate: {
|
|
184
|
-
ariaLabel: "Locate",
|
|
185
|
-
failed: "Location failed. Check that location access is enabled"
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}, l = {
|
|
189
|
-
"zh-CN": e,
|
|
190
|
-
"zh-TW": s,
|
|
191
|
-
"en-US": c
|
|
192
|
-
}, u = ({ locale: e, amap: s, children: c }) => {
|
|
193
|
-
let u = i(n), d = e ?? u.locale, f = s ?? u.amap, p = r((e, n) => t(l[d], e, n), [d]), m = a(() => ({
|
|
194
|
-
locale: d,
|
|
195
|
-
t: p,
|
|
196
|
-
amap: f
|
|
197
|
-
}), [
|
|
198
|
-
d,
|
|
199
|
-
p,
|
|
200
|
-
f
|
|
201
|
-
]);
|
|
202
|
-
return /* @__PURE__ */ o(n.Provider, {
|
|
203
|
-
value: m,
|
|
204
|
-
children: c
|
|
205
|
-
});
|
|
206
|
-
};
|
|
207
|
-
//#endregion
|
|
208
|
-
export { u as t };
|
|
File without changes
|