@baishuyun/ui-mobile 0.6.1 → 0.8.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-BwIa29WQ.js} +2 -2
- package/dist/AMap/index.js +4 -4
- package/dist/ActionSheet/ActionSheet-8cPpwho3.js +85 -0
- package/dist/ActionSheet/index.js +6 -4
- package/dist/Calendar/{Calendar-Bd6CS8y7.js → Calendar-B9IuDHRd.js} +611 -596
- package/dist/Calendar/{timeUtils-t4A3-Hr6.js → cssVars-E8Cq0tta.js} +3 -1
- package/dist/Calendar/index.js +4 -4
- package/dist/ConfigProvider/{ConfigProvider-DnlakyRE.js → ConfigProvider-CCXPxdJt.js} +29 -21
- package/dist/ConfigProvider/index.js +4 -3
- package/dist/ConfigProvider/{useLocale-CP8NRZoj.js → useLocale-D12uIZ9q.js} +1 -0
- package/dist/Gantt/{Gantt-CR7eRNVP.js → Gantt-fRNTYViS.js} +384 -379
- package/dist/Gantt/index.js +8 -6
- package/dist/Icon/{Icon-CFvcrGGg.js → Icon-OUPXAIEn.js} +1 -1
- package/dist/Icon/index.js +2 -2
- package/dist/Overlay/Overlay-YzAfhILA.js +61 -0
- package/dist/Overlay/index.js +3 -0
- package/dist/Popup/Popup-C1uwPnxj.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/Calendar/context/CalendarContext.d.ts +1 -3
- package/dist/components/Calendar/index.d.ts +1 -1
- package/dist/components/Calendar/interface.d.ts +23 -2
- package/dist/components/Calendar/utils/colorUtils.d.ts +1 -2
- package/dist/components/Calendar/utils/index.d.ts +2 -1
- package/dist/components/Calendar/utils/theme/index.d.ts +1 -0
- package/dist/components/Calendar/utils/theme/resolveCalendarThemeVars.d.ts +4 -0
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/dist/components/ConfigProvider/context.d.ts +14 -0
- package/dist/components/Gantt/index.d.ts +1 -1
- package/dist/components/Gantt/interface.d.ts +16 -0
- package/dist/components/Gantt/utils/theme/index.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/resolveGanttThemeVars.d.ts +3 -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 -2
- package/dist/index.js +12 -10
- package/dist/locale/lang/en-US.json.d.ts +3 -0
- package/dist/locale/lang/zh-CN.json.d.ts +3 -0
- package/dist/locale/lang/zh-TW.json.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/utils/cssVars.d.ts +1 -0
- package/dist/vendors/{version-DsM7d69k.js → version-DdP63VFD.js} +1 -1
- package/package.json +2 -2
- package/dist/ActionSheet/ActionSheet-DbrKxa_y.js +0 -133
package/dist/Gantt/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
2
|
-
import "../
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import "../
|
|
6
|
-
import "../
|
|
1
|
+
import "../vendors/version-DdP63VFD.js";
|
|
2
|
+
import "../Popup/Popup-C1uwPnxj.js";
|
|
3
|
+
import "../ActionSheet/ActionSheet-8cPpwho3.js";
|
|
4
|
+
import { n as e, t } from "./Gantt-fRNTYViS.js";
|
|
5
|
+
import "../Icon/Icon-OUPXAIEn.js";
|
|
6
|
+
import "../Overlay/Overlay-YzAfhILA.js";
|
|
7
|
+
import "../ConfigProvider/useLocale-D12uIZ9q.js";
|
|
8
|
+
import "../Calendar/cssVars-E8Cq0tta.js";
|
|
7
9
|
export { e as ALL_ZOOM_LEVELS, t as default };
|
|
@@ -7,7 +7,7 @@ var t = { "bsy-icon": "_bsy-icon_gwzb9_1" }, n = /* @__PURE__ */ new Set();
|
|
|
7
7
|
if (!e || n.has(e) || (n.add(e), [...document.scripts].some((t) => t.getAttribute("src") === e))) return;
|
|
8
8
|
let t = document.createElement("script");
|
|
9
9
|
t.setAttribute("src", e), document.body.appendChild(t);
|
|
10
|
-
})("https://at.alicdn.com/t/c/
|
|
10
|
+
})("https://at.alicdn.com/t/c/font_4786625_ymyxnlj0j89.js");
|
|
11
11
|
var r = ({ name: n, size: r = 16, color: i, className: a }) => /* @__PURE__ */ e("svg", {
|
|
12
12
|
className: [t["bsy-icon"], a].filter(Boolean).join(" "),
|
|
13
13
|
style: {
|
package/dist/Icon/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
2
|
-
import { t as e } from "./Icon-
|
|
1
|
+
import "../vendors/version-DdP63VFD.js";
|
|
2
|
+
import { t as e } from "./Icon-OUPXAIEn.js";
|
|
3
3
|
export { e as default };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createContext as e, useContext as t, useEffect as n, useMemo as r } from "react";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/Overlay/OverlayContext.tsx
|
|
4
|
+
var a = 1e3, o = 10, s = e({
|
|
5
|
+
offset: 0,
|
|
6
|
+
step: 10
|
|
7
|
+
}), c = /* @__PURE__ */ new Map(), l = (e, t) => t === void 0 ? e : Math.min(e, t), u = () => {
|
|
8
|
+
if (c.size === 0) return;
|
|
9
|
+
let e = Math.max(...c.keys()), t = c.get(e);
|
|
10
|
+
return l(e + t.step, t.max);
|
|
11
|
+
}, d = (e) => {
|
|
12
|
+
let t = e ?? u();
|
|
13
|
+
return t === void 0 ? void 0 : { zIndex: t };
|
|
14
|
+
}, f = ({ zIndex: e, offset: a, step: o, max: l, children: u }) => {
|
|
15
|
+
let d = t(s), f = r(() => ({
|
|
16
|
+
parentZ: e ?? d.parentZ,
|
|
17
|
+
offset: a ?? d.offset,
|
|
18
|
+
step: o ?? d.step,
|
|
19
|
+
max: l ?? d.max
|
|
20
|
+
}), [
|
|
21
|
+
l,
|
|
22
|
+
a,
|
|
23
|
+
d.max,
|
|
24
|
+
d.offset,
|
|
25
|
+
d.parentZ,
|
|
26
|
+
d.step,
|
|
27
|
+
o,
|
|
28
|
+
e
|
|
29
|
+
]);
|
|
30
|
+
return n(() => {
|
|
31
|
+
if (e === void 0) return;
|
|
32
|
+
let t = c.get(e);
|
|
33
|
+
return c.set(e, {
|
|
34
|
+
count: (t?.count ?? 0) + 1,
|
|
35
|
+
step: f.step,
|
|
36
|
+
max: f.max
|
|
37
|
+
}), () => {
|
|
38
|
+
let t = c.get(e);
|
|
39
|
+
if (t === void 0 || t.count <= 1) {
|
|
40
|
+
c.delete(e);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
c.set(e, {
|
|
44
|
+
...t,
|
|
45
|
+
count: t.count - 1
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
}, [
|
|
49
|
+
e,
|
|
50
|
+
f.max,
|
|
51
|
+
f.step
|
|
52
|
+
]), /* @__PURE__ */ i(s.Provider, {
|
|
53
|
+
value: f,
|
|
54
|
+
children: u
|
|
55
|
+
});
|
|
56
|
+
}, p = (e) => {
|
|
57
|
+
let { parentZ: n, offset: r, step: i, max: o } = t(s);
|
|
58
|
+
return e === void 0 ? n === void 0 ? r + a : l(n + i, o) : e;
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
export { d as a, u as i, o as n, p as o, f as r, a as t };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "../vendors/version-DdP63VFD.js";
|
|
2
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./Overlay-YzAfhILA.js";
|
|
3
|
+
export { a as OVERLAY_Z_BASE, n as OVERLAY_Z_STEP, i as OverlayProvider, t as getNextImperativeOverlayZIndex, e as imperativeOverlayStyle, r as useOverlayZIndex };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { o as e, r as t } from "../Overlay/Overlay-YzAfhILA.js";
|
|
2
|
+
import { t as n } from "../ConfigProvider/useLocale-D12uIZ9q.js";
|
|
3
|
+
import { useEffect 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/Popup/Popup.module.scss
|
|
7
|
+
var u = {
|
|
8
|
+
"bsy-mobile-popup": "_bsy-mobile-popup_103dr_2",
|
|
9
|
+
"bsy-mobile-popup__mask": "_bsy-mobile-popup__mask_103dr_8",
|
|
10
|
+
"bsy-mobile-popup__panel": "_bsy-mobile-popup__panel_103dr_19",
|
|
11
|
+
"bsy-mobile-popup--bottom": "_bsy-mobile-popup--bottom_103dr_32",
|
|
12
|
+
"bsy-mobile-popup--top": "_bsy-mobile-popup--top_103dr_37",
|
|
13
|
+
"bsy-mobile-popup--round": "_bsy-mobile-popup--round_103dr_42",
|
|
14
|
+
"bsy-mobile-popup--open": "_bsy-mobile-popup--open_103dr_45"
|
|
15
|
+
}, d = (...e) => e.filter(Boolean).join(" "), f = ({ open: f, onClose: p, position: m = "bottom", round: h = !0, zIndex: g, closeOnClickOverlay: _ = !0, getPopupContainer: v, className: y, children: b }) => {
|
|
16
|
+
let { t: x } = n(), S = e(g), [C, w] = o(f), [T, E] = o(!1), D = a(!1), O = a({
|
|
17
|
+
children: b,
|
|
18
|
+
position: m,
|
|
19
|
+
round: h
|
|
20
|
+
});
|
|
21
|
+
f && (O.current = {
|
|
22
|
+
children: b,
|
|
23
|
+
position: m,
|
|
24
|
+
round: h
|
|
25
|
+
});
|
|
26
|
+
let k = O.current;
|
|
27
|
+
r(() => {
|
|
28
|
+
if (f) {
|
|
29
|
+
w(!0);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
E(!1), D.current || w(!1);
|
|
33
|
+
}, [f]), i(() => {
|
|
34
|
+
if (!C || !f) return;
|
|
35
|
+
let e = 0, t = requestAnimationFrame(() => {
|
|
36
|
+
e = requestAnimationFrame(() => {
|
|
37
|
+
D.current = !0, E(!0);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
return () => {
|
|
41
|
+
cancelAnimationFrame(t), cancelAnimationFrame(e);
|
|
42
|
+
};
|
|
43
|
+
}, [C, f]), r(() => {
|
|
44
|
+
if (!C) return;
|
|
45
|
+
let e = document.body.style.overflow;
|
|
46
|
+
return document.body.style.overflow = "hidden", () => {
|
|
47
|
+
document.body.style.overflow = e;
|
|
48
|
+
};
|
|
49
|
+
}, [C]);
|
|
50
|
+
let A = typeof document > "u" ? null : v?.() || document.body;
|
|
51
|
+
if (!C || !A) return null;
|
|
52
|
+
let j = x("popup.close"), M = k.position === "top";
|
|
53
|
+
return s(/* @__PURE__ */ l("div", {
|
|
54
|
+
className: d(u["bsy-mobile-popup"], M ? u["bsy-mobile-popup--top"] : u["bsy-mobile-popup--bottom"], k.round && u["bsy-mobile-popup--round"], T && f && u["bsy-mobile-popup--open"], y),
|
|
55
|
+
style: { zIndex: S },
|
|
56
|
+
children: [/* @__PURE__ */ c("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
className: u["bsy-mobile-popup__mask"],
|
|
59
|
+
"aria-label": j,
|
|
60
|
+
onClick: () => {
|
|
61
|
+
_ && p();
|
|
62
|
+
}
|
|
63
|
+
}), /* @__PURE__ */ c("div", {
|
|
64
|
+
className: u["bsy-mobile-popup__panel"],
|
|
65
|
+
role: "dialog",
|
|
66
|
+
"aria-modal": "true",
|
|
67
|
+
onTransitionEnd: (e) => {
|
|
68
|
+
e.propertyName === "transform" && (f || (D.current = !1, w(!1)));
|
|
69
|
+
},
|
|
70
|
+
children: /* @__PURE__ */ c(t, {
|
|
71
|
+
zIndex: S,
|
|
72
|
+
children: k.children
|
|
73
|
+
})
|
|
74
|
+
})]
|
|
75
|
+
}), A);
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
export { f as t };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ActionSheetProps } from './interface';
|
|
2
|
-
declare const ActionSheet: ({ open, onClose, mode, title, actions, onAction, children, zIndex, getPopupContainer, className, }: ActionSheetProps) => import(
|
|
2
|
+
declare const ActionSheet: ({ open, onClose, mode, title, actions, onAction, children, zIndex, getPopupContainer, className, }: ActionSheetProps) => import("react").JSX.Element;
|
|
3
3
|
export default ActionSheet;
|
|
@@ -7,7 +7,6 @@ export interface CalendarContextValue {
|
|
|
7
7
|
viewMode: CalendarViewMode;
|
|
8
8
|
setViewMode: (mode: CalendarViewMode) => void;
|
|
9
9
|
yearMonthText: string;
|
|
10
|
-
scheduleColor: string;
|
|
11
10
|
timeZone?: string;
|
|
12
11
|
timezoneLabel: string;
|
|
13
12
|
events: NormalizedCalendarEvent[];
|
|
@@ -21,12 +20,11 @@ export interface CalendarProviderProps {
|
|
|
21
20
|
setCurrentDate: (date: Date) => void;
|
|
22
21
|
viewMode: CalendarViewMode;
|
|
23
22
|
setViewMode: (mode: CalendarViewMode) => void;
|
|
24
|
-
scheduleColor: string;
|
|
25
23
|
timeZone?: string;
|
|
26
24
|
events: NormalizedCalendarEvent[];
|
|
27
25
|
onEventClick?: (event: NormalizedCalendarEvent) => void;
|
|
28
26
|
onDayClick?: (date: Date, dayEvents: NormalizedCalendarEvent[]) => void;
|
|
29
27
|
}
|
|
30
|
-
export declare const CalendarProvider: ({ children, currentDate, setCurrentDate, viewMode, setViewMode,
|
|
28
|
+
export declare const CalendarProvider: ({ children, currentDate, setCurrentDate, viewMode, setViewMode, timeZone, events, onEventClick, onDayClick, }: CalendarProviderProps) => import("react").JSX.Element;
|
|
31
29
|
export declare const useCalendarContext: () => CalendarContextValue;
|
|
32
30
|
export default CalendarContext;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './Calendar';
|
|
2
|
-
export type { CalendarProps, CalendarEvent, CalendarViewMode } from './interface';
|
|
2
|
+
export type { CalendarProps, CalendarEvent, CalendarViewMode, CalendarTheme, CalendarPanelBgImagePosition, } from './interface';
|
|
@@ -25,6 +25,23 @@ export interface CalendarEvent {
|
|
|
25
25
|
*/
|
|
26
26
|
[key: string]: unknown;
|
|
27
27
|
}
|
|
28
|
+
export type CalendarPanelBgImagePosition = 'center' | 'stretch' | 'masterDrawingCenter';
|
|
29
|
+
export interface CalendarTheme {
|
|
30
|
+
colorBgContainer?: string;
|
|
31
|
+
panelBgImage?: string;
|
|
32
|
+
panelBgImagePosition?: CalendarPanelBgImagePosition;
|
|
33
|
+
colorText?: string;
|
|
34
|
+
colorTextTertiary?: string;
|
|
35
|
+
colorTextQuaternary?: string;
|
|
36
|
+
colorPrimary?: string;
|
|
37
|
+
colorPrimaryText?: string;
|
|
38
|
+
colorFillSecondary?: string;
|
|
39
|
+
colorSplit?: string;
|
|
40
|
+
colorLink?: string;
|
|
41
|
+
eventBorderColor?: string;
|
|
42
|
+
eventBg?: string;
|
|
43
|
+
eventBgHover?: string;
|
|
44
|
+
}
|
|
28
45
|
export interface CalendarProps {
|
|
29
46
|
/**
|
|
30
47
|
* @description 日程数据
|
|
@@ -32,9 +49,13 @@ export interface CalendarProps {
|
|
|
32
49
|
*/
|
|
33
50
|
events?: CalendarEvent[];
|
|
34
51
|
/**
|
|
35
|
-
* @description
|
|
52
|
+
* @description 日程强调色简写;未传时按 theme.event* → theme.colorPrimary → #0265ff 回退
|
|
53
|
+
*/
|
|
54
|
+
scheduleColor?: string;
|
|
55
|
+
/**
|
|
56
|
+
* @description 组件级颜色 token
|
|
36
57
|
*/
|
|
37
|
-
|
|
58
|
+
theme?: CalendarTheme;
|
|
38
59
|
/**
|
|
39
60
|
* @description IANA 时区;未传则用浏览器本地时区
|
|
40
61
|
*/
|
|
@@ -4,6 +4,5 @@ interface ColorScheme {
|
|
|
4
4
|
}
|
|
5
5
|
/** 获取颜色方案;无预设时按亮度生成默认色 */
|
|
6
6
|
export declare const getColorScheme: (hex: string) => ColorScheme;
|
|
7
|
-
|
|
8
|
-
export declare const resolveScheduleColorVars: (color: string) => Record<string, string>;
|
|
7
|
+
export declare const buildScheduleColorVars: (border?: string, bg?: string, hover?: string) => Record<string, string>;
|
|
9
8
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { cx } from './cx';
|
|
2
|
-
export { getColorScheme
|
|
2
|
+
export { getColorScheme } from './colorUtils';
|
|
3
|
+
export { resolveCalendarThemeVars } from './theme';
|
|
3
4
|
export { ensureDayjsPlugins } from './ensureDayjsPlugins';
|
|
4
5
|
export { parseCalendarTime, getCurrentTimeInTZ, getTimeZoneLabel, isTodayInTZ } from './timeUtils';
|
|
5
6
|
export { normalizeEvents } from './normalizeData';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { resolveCalendarThemeVars } from './resolveCalendarThemeVars';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ConfigProviderProps } from './context';
|
|
2
|
-
export declare const ConfigProvider: ({ locale: localeProp, amap, children }: ConfigProviderProps) => import("react").JSX.Element;
|
|
2
|
+
export declare const ConfigProvider: ({ locale: localeProp, amap, overlayOffset, overlayStep, overlayMax, children, }: ConfigProviderProps) => import("react").JSX.Element;
|
|
3
3
|
export default ConfigProvider;
|
|
@@ -20,5 +20,19 @@ export type ConfigProviderProps = {
|
|
|
20
20
|
* @description 高德地图配置。任意 App 接入 AMap 的正式入口。
|
|
21
21
|
*/
|
|
22
22
|
amap?: AMapConfig;
|
|
23
|
+
/**
|
|
24
|
+
* @description 全局浮层 z-index 偏移,第一层 = offset + 1000
|
|
25
|
+
* @default 0
|
|
26
|
+
*/
|
|
27
|
+
overlayOffset?: number;
|
|
28
|
+
/**
|
|
29
|
+
* @description 嵌套浮层步长
|
|
30
|
+
* @default 10
|
|
31
|
+
*/
|
|
32
|
+
overlayStep?: number;
|
|
33
|
+
/**
|
|
34
|
+
* @description 嵌套浮层 z-index 上限;不传则不封顶
|
|
35
|
+
*/
|
|
36
|
+
overlayMax?: number;
|
|
23
37
|
children?: ReactNode;
|
|
24
38
|
};
|
|
@@ -19,6 +19,21 @@ export interface GanttTask {
|
|
|
19
19
|
progress?: number;
|
|
20
20
|
color?: string;
|
|
21
21
|
}
|
|
22
|
+
export interface GanttTheme {
|
|
23
|
+
colorText?: string;
|
|
24
|
+
colorTextSecondary?: string;
|
|
25
|
+
colorSplit?: string;
|
|
26
|
+
colorBorder?: string;
|
|
27
|
+
colorPrimary?: string;
|
|
28
|
+
colorBgContainer?: string;
|
|
29
|
+
colorBgWeekend?: string;
|
|
30
|
+
todayLineColor?: string;
|
|
31
|
+
toolbarTodayHoverBg?: string;
|
|
32
|
+
toolbarIconColor?: string;
|
|
33
|
+
toolbarIconHoverColor?: string;
|
|
34
|
+
arrowBg?: string;
|
|
35
|
+
toolbarBg?: string;
|
|
36
|
+
}
|
|
22
37
|
export interface GanttProps {
|
|
23
38
|
tasks?: GanttTask[];
|
|
24
39
|
timeZone?: string;
|
|
@@ -27,4 +42,5 @@ export interface GanttProps {
|
|
|
27
42
|
onZoomChange?: (level: ZoomLevel) => void;
|
|
28
43
|
onTaskClick?: (task: GanttTask) => void;
|
|
29
44
|
className?: string;
|
|
45
|
+
theme?: GanttTheme;
|
|
30
46
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { resolveGanttThemeVars } from './resolveGanttThemeVars';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties, PropsWithChildren } from 'react';
|
|
2
|
+
/** 第一层浮层底座。嵌套时改为 parentZ + step */
|
|
3
|
+
export declare const OVERLAY_Z_BASE = 1000;
|
|
4
|
+
export declare const OVERLAY_Z_STEP = 10;
|
|
5
|
+
export type OverlayProviderProps = PropsWithChildren<{
|
|
6
|
+
zIndex?: number;
|
|
7
|
+
offset?: number;
|
|
8
|
+
step?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
}>;
|
|
11
|
+
/** 无已挂载浮层时返回 undefined,调用方应保持默认层级 */
|
|
12
|
+
export declare const getNextImperativeOverlayZIndex: () => number | undefined;
|
|
13
|
+
/** 只写内联 z-index,不改 CSS 变量 */
|
|
14
|
+
export declare const imperativeOverlayStyle: (zIndex?: number) => CSSProperties | undefined;
|
|
15
|
+
export declare const resetOverlayZIndexRegistryForTest: () => void;
|
|
16
|
+
export declare const OverlayProvider: ({ zIndex, offset, step, max, children }: OverlayProviderProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const useOverlayZIndex: (override?: number) => number;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @description 弹出方向,仅顶 / 底
|
|
4
|
+
*/
|
|
5
|
+
export type PopupPosition = 'top' | 'bottom';
|
|
6
|
+
export interface PopupProps {
|
|
7
|
+
/**
|
|
8
|
+
* @description 是否打开
|
|
9
|
+
*/
|
|
10
|
+
open: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @description 点蒙层关闭;`closeOnClickOverlay` 为 `false` 时蒙层不关
|
|
13
|
+
*/
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* @description 弹出方向
|
|
17
|
+
* @default 'bottom'
|
|
18
|
+
*/
|
|
19
|
+
position?: PopupPosition;
|
|
20
|
+
/**
|
|
21
|
+
* @description 为 `true` 时左上、右上圆角 20px
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
round?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @description 根节点层级;未传则走 Overlay(无父层为 1000,有父层为 parent + step)
|
|
27
|
+
*/
|
|
28
|
+
zIndex?: number;
|
|
29
|
+
/**
|
|
30
|
+
* @description 点蒙层是否关闭
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
closeOnClickOverlay?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @description 挂载节点;未传或返回空则用 `document.body`
|
|
36
|
+
*/
|
|
37
|
+
getPopupContainer?: () => HTMLElement;
|
|
38
|
+
/**
|
|
39
|
+
* @description 根节点 class
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
/**
|
|
43
|
+
* @description 面板内容
|
|
44
|
+
*/
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
export { default as Popup } from './Popup';
|
|
2
|
+
export type { PopupProps, PopupPosition } from './Popup';
|
|
1
3
|
export { default as ActionSheet } from './ActionSheet';
|
|
2
4
|
export type { ActionSheetProps, ActionSheetAction, ActionSheetMode } from './ActionSheet';
|
|
3
5
|
export { default as Gantt } from './Gantt';
|
|
4
|
-
export type { GanttProps, GanttTask, ZoomLevel } from './Gantt';
|
|
6
|
+
export type { GanttProps, GanttTask, ZoomLevel, GanttTheme } from './Gantt';
|
|
5
7
|
export { ALL_ZOOM_LEVELS } from './Gantt';
|
|
6
8
|
export { default as Calendar } from './Calendar';
|
|
7
|
-
export type { CalendarProps, CalendarEvent, CalendarViewMode } from './Calendar';
|
|
9
|
+
export type { CalendarProps, CalendarEvent, CalendarViewMode, CalendarTheme, CalendarPanelBgImagePosition, } from './Calendar';
|
|
8
10
|
export { default as AMap, useAMap } from './AMap';
|
|
9
11
|
export type { AMapControlsProps, AMapLabelColor, AMapLocateProps, AMapMarker, AMapMarkerDisplayChange, AMapMarkerSize, AMapMarkersProps, AMapPoiItem, AMapPoiSearchProps, AMapRootProps, Location, } from './AMap';
|
|
10
12
|
export { ConfigProvider, useLocale } from './ConfigProvider';
|
|
11
13
|
export type { ConfigProviderProps, AMapConfig, LocaleKeys, Locale } from './ConfigProvider';
|
|
14
|
+
export { OverlayProvider, useOverlayZIndex, OVERLAY_Z_BASE, OVERLAY_Z_STEP, getNextImperativeOverlayZIndex, imperativeOverlayStyle, } from './Overlay';
|
|
15
|
+
export type { OverlayProviderProps } from './Overlay';
|
|
12
16
|
export { default as Icon } from './Icon';
|
|
13
17
|
export type { IconProps } from './Icon';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import "./vendors/version-
|
|
2
|
-
import { t as e } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { t as r } from "./
|
|
5
|
-
import { t as i } from "./
|
|
6
|
-
import {
|
|
7
|
-
import { t as s } from "./
|
|
8
|
-
import "./
|
|
9
|
-
import { t as
|
|
10
|
-
|
|
1
|
+
import "./vendors/version-DdP63VFD.js";
|
|
2
|
+
import { t as e } from "./Popup/Popup-C1uwPnxj.js";
|
|
3
|
+
import { t } from "./ActionSheet/ActionSheet-8cPpwho3.js";
|
|
4
|
+
import { n, t as r } from "./Gantt/Gantt-fRNTYViS.js";
|
|
5
|
+
import { t as i } from "./Calendar/Calendar-B9IuDHRd.js";
|
|
6
|
+
import { t as a } from "./Icon/Icon-OUPXAIEn.js";
|
|
7
|
+
import { n as o, t as s } from "./AMap/AMap-BwIa29WQ.js";
|
|
8
|
+
import { a as c, i as l, n as u, o as d, r as f, t as p } from "./Overlay/Overlay-YzAfhILA.js";
|
|
9
|
+
import { t as m } from "./ConfigProvider/useLocale-D12uIZ9q.js";
|
|
10
|
+
import "./Calendar/cssVars-E8Cq0tta.js";
|
|
11
|
+
import { t as h } from "./ConfigProvider/ConfigProvider-CCXPxdJt.js";
|
|
12
|
+
export { n as ALL_ZOOM_LEVELS, s as AMap, t as ActionSheet, i as Calendar, h as ConfigProvider, r as Gantt, a as Icon, p as OVERLAY_Z_BASE, u as OVERLAY_Z_STEP, f as OverlayProvider, e as Popup, l as getNextImperativeOverlayZIndex, c as imperativeOverlayStyle, o as useAMap, m as useLocale, d as useOverlayZIndex };
|