@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.
Files changed (48) hide show
  1. package/dist/AMap/{AMap-DwrSlwyV.js → AMap-BwIa29WQ.js} +2 -2
  2. package/dist/AMap/index.js +4 -4
  3. package/dist/ActionSheet/ActionSheet-8cPpwho3.js +85 -0
  4. package/dist/ActionSheet/index.js +6 -4
  5. package/dist/Calendar/{Calendar-Bd6CS8y7.js → Calendar-B9IuDHRd.js} +611 -596
  6. package/dist/Calendar/{timeUtils-t4A3-Hr6.js → cssVars-E8Cq0tta.js} +3 -1
  7. package/dist/Calendar/index.js +4 -4
  8. package/dist/ConfigProvider/{ConfigProvider-DnlakyRE.js → ConfigProvider-CCXPxdJt.js} +29 -21
  9. package/dist/ConfigProvider/index.js +4 -3
  10. package/dist/ConfigProvider/{useLocale-CP8NRZoj.js → useLocale-D12uIZ9q.js} +1 -0
  11. package/dist/Gantt/{Gantt-CR7eRNVP.js → Gantt-fRNTYViS.js} +384 -379
  12. package/dist/Gantt/index.js +8 -6
  13. package/dist/Icon/{Icon-CFvcrGGg.js → Icon-OUPXAIEn.js} +1 -1
  14. package/dist/Icon/index.js +2 -2
  15. package/dist/Overlay/Overlay-YzAfhILA.js +61 -0
  16. package/dist/Overlay/index.js +3 -0
  17. package/dist/Popup/Popup-C1uwPnxj.js +78 -0
  18. package/dist/Popup/index.js +5 -0
  19. package/dist/components/ActionSheet/ActionSheet.d.ts +1 -1
  20. package/dist/components/ActionSheet/interface.d.ts +1 -2
  21. package/dist/components/Calendar/context/CalendarContext.d.ts +1 -3
  22. package/dist/components/Calendar/index.d.ts +1 -1
  23. package/dist/components/Calendar/interface.d.ts +23 -2
  24. package/dist/components/Calendar/utils/colorUtils.d.ts +1 -2
  25. package/dist/components/Calendar/utils/index.d.ts +2 -1
  26. package/dist/components/Calendar/utils/theme/index.d.ts +1 -0
  27. package/dist/components/Calendar/utils/theme/resolveCalendarThemeVars.d.ts +4 -0
  28. package/dist/components/ConfigProvider/ConfigProvider.d.ts +1 -1
  29. package/dist/components/ConfigProvider/context.d.ts +14 -0
  30. package/dist/components/Gantt/index.d.ts +1 -1
  31. package/dist/components/Gantt/interface.d.ts +16 -0
  32. package/dist/components/Gantt/utils/theme/index.d.ts +1 -0
  33. package/dist/components/Gantt/utils/theme/resolveGanttThemeVars.d.ts +3 -0
  34. package/dist/components/Overlay/OverlayContext.d.ts +17 -0
  35. package/dist/components/Overlay/index.d.ts +2 -0
  36. package/dist/components/Popup/Popup.d.ts +3 -0
  37. package/dist/components/Popup/index.d.ts +2 -0
  38. package/dist/components/Popup/interface.d.ts +46 -0
  39. package/dist/components/index.d.ts +6 -2
  40. package/dist/index.js +12 -10
  41. package/dist/locale/lang/en-US.json.d.ts +3 -0
  42. package/dist/locale/lang/zh-CN.json.d.ts +3 -0
  43. package/dist/locale/lang/zh-TW.json.d.ts +3 -0
  44. package/dist/style.css +1 -1
  45. package/dist/utils/cssVars.d.ts +1 -0
  46. package/dist/vendors/{version-DsM7d69k.js → version-DdP63VFD.js} +1 -1
  47. package/package.json +2 -2
  48. package/dist/ActionSheet/ActionSheet-DbrKxa_y.js +0 -133
@@ -1,7 +1,9 @@
1
- import "../vendors/version-DsM7d69k.js";
2
- import "../ActionSheet/ActionSheet-DbrKxa_y.js";
3
- import { n as e, t } from "./Gantt-CR7eRNVP.js";
4
- import "../Icon/Icon-CFvcrGGg.js";
5
- import "../ConfigProvider/useLocale-CP8NRZoj.js";
6
- import "../Calendar/timeUtils-t4A3-Hr6.js";
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/font_4786625_7yye49rghck.js");
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: {
@@ -1,3 +1,3 @@
1
- import "../vendors/version-DsM7d69k.js";
2
- import { t as e } from "./Icon-CFvcrGGg.js";
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 };
@@ -0,0 +1,5 @@
1
+ import "../vendors/version-DdP63VFD.js";
2
+ import { t as e } from "./Popup-C1uwPnxj.js";
3
+ import "../Overlay/Overlay-YzAfhILA.js";
4
+ import "../ConfigProvider/useLocale-D12uIZ9q.js";
5
+ export { e as default };
@@ -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('react').ReactPortal | null;
2
+ declare const ActionSheet: ({ open, onClose, mode, title, actions, onAction, children, zIndex, getPopupContainer, className, }: ActionSheetProps) => import("react").JSX.Element;
3
3
  export default ActionSheet;
@@ -60,8 +60,7 @@ export interface ActionSheetProps {
60
60
  */
61
61
  children?: ReactNode;
62
62
  /**
63
- * @description 根节点层级
64
- * @default 1000
63
+ * @description 透传给 Popup;未传则跟 Overlay
65
64
  */
66
65
  zIndex?: number;
67
66
  /**
@@ -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, scheduleColor, timeZone, events, onEventClick, onDayClick, }: CalendarProviderProps) => import("react").JSX.Element;
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
- scheduleColor: string;
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
- /** 将 scheduleColor 转为根节点 CSS 变量 */
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, resolveScheduleColorVars } from './colorUtils';
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';
@@ -0,0 +1,4 @@
1
+ import { CSSProperties } from 'react';
2
+ import { CalendarTheme } from '../../interface';
3
+ export declare const DEFAULT_CALENDAR_SCHEDULE_COLOR = "#0265ff";
4
+ export declare const resolveCalendarThemeVars: (theme?: CalendarTheme, scheduleColor?: string) => CSSProperties;
@@ -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
  };
@@ -1,3 +1,3 @@
1
1
  export { default } from './Gantt';
2
- export type { GanttProps, GanttTask, ZoomLevel } from './interface';
2
+ export type { GanttProps, GanttTask, ZoomLevel, GanttTheme } from './interface';
3
3
  export { ALL_ZOOM_LEVELS } from './interface';
@@ -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,3 @@
1
+ import { CSSProperties } from 'react';
2
+ import { GanttTheme } from '../../interface';
3
+ export declare const resolveGanttThemeVars: (theme?: GanttTheme) => CSSProperties;
@@ -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,2 @@
1
+ export { OverlayProvider, useOverlayZIndex, OVERLAY_Z_BASE, OVERLAY_Z_STEP, getNextImperativeOverlayZIndex, imperativeOverlayStyle, } from './OverlayContext';
2
+ export type { OverlayProviderProps } from './OverlayContext';
@@ -0,0 +1,3 @@
1
+ import { PopupProps } from './interface';
2
+ declare const Popup: ({ open, onClose, position, round, zIndex: zIndexProp, closeOnClickOverlay, getPopupContainer, className, children, }: PopupProps) => import('react').ReactPortal | null;
3
+ export default Popup;
@@ -0,0 +1,2 @@
1
+ export { default } from './Popup';
2
+ export type { PopupProps, PopupPosition } from './interface';
@@ -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-DsM7d69k.js";
2
- import { t as e } from "./ActionSheet/ActionSheet-DbrKxa_y.js";
3
- import { n as t, t as n } from "./Gantt/Gantt-CR7eRNVP.js";
4
- import { t as r } from "./Calendar/Calendar-Bd6CS8y7.js";
5
- import { t as i } from "./Icon/Icon-CFvcrGGg.js";
6
- import { n as a, t as o } from "./AMap/AMap-DwrSlwyV.js";
7
- import { t as s } from "./ConfigProvider/useLocale-CP8NRZoj.js";
8
- import "./Calendar/timeUtils-t4A3-Hr6.js";
9
- import { t as c } from "./ConfigProvider/ConfigProvider-DnlakyRE.js";
10
- export { t as ALL_ZOOM_LEVELS, o as AMap, e as ActionSheet, r as Calendar, c as ConfigProvider, n as Gantt, i as Icon, a as useAMap, s as useLocale };
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 };
@@ -2,6 +2,9 @@ declare const _default: {
2
2
  "actionSheet": {
3
3
  "close": "Close"
4
4
  },
5
+ "popup": {
6
+ "close": "Close"
7
+ },
5
8
  "calendar": {
6
9
  "today": "Today",
7
10
  "viewDay": "Day",
@@ -2,6 +2,9 @@ declare const _default: {
2
2
  "actionSheet": {
3
3
  "close": "关闭"
4
4
  },
5
+ "popup": {
6
+ "close": "关闭"
7
+ },
5
8
  "calendar": {
6
9
  "today": "今天",
7
10
  "viewDay": "日",
@@ -2,6 +2,9 @@ declare const _default: {
2
2
  "actionSheet": {
3
3
  "close": "關閉"
4
4
  },
5
+ "popup": {
6
+ "close": "關閉"
7
+ },
5
8
  "calendar": {
6
9
  "today": "今天",
7
10
  "viewDay": "日",