@baishuyun/ui-base 6.0.0 → 6.2.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/AmapProvider/index.js +3 -3
- package/dist/Amap/{AmapProvider-BkJp-sWi.js → AmapProvider-BgGnih_w.js} +1 -1
- package/dist/Amap/index.js +3 -3
- package/dist/Calendar/AllDaySection-DS0Frx1p.js +53 -0
- package/dist/Calendar/Calendar-CAG1Fxlh.js +806 -0
- package/dist/Calendar/CurrentTimeIndicator-DaIywtIA.js +59 -0
- package/dist/Calendar/EventCard-D_VeOVDQ.js +155 -0
- package/dist/Calendar/TimeAxis-gKb8dTwY.js +13 -0
- package/dist/Calendar/TimeGrid-D8Du5vFP.js +47 -0
- package/dist/Calendar/adapters/index.js +2 -0
- package/dist/Calendar/adapters-zYR7CgzD.js +20 -0
- package/dist/Calendar/colorUtils-DcpqM3KR.js +55 -0
- package/dist/Calendar/context/index.js +2 -0
- package/dist/Calendar/context-DNOJ9LW_.js +21 -0
- package/dist/Calendar/index.js +21 -0
- package/dist/Calendar/layout-DvWx_7gn.js +302 -0
- package/dist/Calendar/shared/AllDaySection/index.js +8 -0
- package/dist/Calendar/shared/CurrentTimeIndicator/index.js +5 -0
- package/dist/Calendar/shared/EventCard/index.js +6 -0
- package/dist/Calendar/shared/TimeAxis/index.js +4 -0
- package/dist/Calendar/shared/TimeGrid/index.js +4 -0
- package/dist/Calendar/style/index.js +2 -0
- package/dist/Calendar/style-hCRKx3m1.js +55 -0
- package/dist/Calendar/utils/index.js +114 -0
- package/dist/Calendar/utils/layout/index.js +3 -0
- package/dist/Card/{Card-D__c94yx.js → Card-CRrtIjNT.js} +1 -1
- package/dist/Card/index.js +2 -2
- package/dist/CheckBox/{CheckBox-DF201Nxg.js → CheckBox-CkVe5Boq.js} +1 -1
- package/dist/CheckBox/{CheckBox-B04hZKaC.js → CheckBox-DIunYcfS.js} +1 -1
- package/dist/CheckBox/index.js +3 -3
- package/dist/ColorPicker/ColorPicker-CKqNqAsK.js +150 -0
- package/dist/ColorPicker/index.js +6 -5
- package/dist/ConfigProvider/index.js +2 -2
- package/dist/DatePicker/DatePicker-BIxiJQ_W.js +91 -0
- package/dist/DatePicker/DatePickerPanel-CsiEGC-1.js +217 -0
- package/dist/DatePicker/ensureDayjsPlugins-DZjJnZgo.js +16 -0
- package/dist/DatePicker/index.js +8 -0
- package/dist/DatePicker/pickerLocale-VqSP_iIm.js +15 -0
- package/dist/DatePicker/style/index.js +2 -0
- package/dist/DatePicker/style-DZaSSoNs.js +15 -0
- package/dist/DropDown/{DropDown-CMKiQDrc.js → DropDown-BR-Tz58r.js} +5 -5
- package/dist/DropDown/index.js +7 -7
- package/dist/Editor/{Buttons-D17RQIEb.js → Buttons-DdZg3jAa.js} +6 -6
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +14 -13
- package/dist/Editor/index.js +14 -13
- package/dist/Icon/{Icon-CTZCSuVg.js → Icon-BQ3Whub2.js} +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/{InputTag-F2Dv-r56.js → InputTag-zP5QdId7.js} +1 -1
- package/dist/InputTag/index.js +2 -2
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/{Modal-CweuD-VO.js → Modal-B5AW5GKt.js} +6 -5
- package/dist/Modal/index.js +2 -2
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/Segmented/Segmented-BTW445jc.js +82 -0
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/{Select-D8T0S1_m.js → Select-BGsQ-PVq.js} +14 -15
- package/dist/Select/{SelectInputSearch-Dm3CI_L4.js → SelectInputSearch-CraymTXM.js} +3 -3
- package/dist/Select/index.js +11 -11
- package/dist/Tabs/{Tabs-Cxf7jwys.js → Tabs-CPRNkfMo.js} +4 -4
- package/dist/Tabs/index.js +4 -4
- package/dist/Tooltip/Tooltip-RkD8fs0B.js +169 -0
- package/dist/Tooltip/index.js +2 -0
- package/dist/Tree/index.js +4 -4
- package/dist/components/Calendar/Calendar.d.ts +3 -0
- package/dist/components/Calendar/Header/CalendarHeader/CalendarHeader.d.ts +2 -0
- package/dist/components/Calendar/Header/CalendarHeaderLeft/CalendarHeaderLeft.d.ts +2 -0
- package/dist/components/Calendar/Header/DateDisplay/DateDisplay.d.ts +2 -0
- package/dist/components/Calendar/Header/DateDisplay/__tests__/DateDisplay.weekPicker.test.d.ts +1 -0
- package/dist/components/Calendar/Header/NavButton/NavButton.d.ts +6 -0
- package/dist/components/Calendar/Header/TodayButton/TodayButton.d.ts +2 -0
- package/dist/components/Calendar/__tests__/Calendar.contract.test.d.ts +1 -0
- package/dist/components/Calendar/__tests__/algorithm/monthLayoutAlgorithm.test.d.ts +1 -0
- package/dist/components/Calendar/__tests__/helpers/testFormatMessage.d.ts +2 -0
- package/dist/components/Calendar/adapters/__tests__/platformTheme.test.d.ts +1 -0
- package/dist/components/Calendar/adapters/index.d.ts +1 -0
- package/dist/components/Calendar/adapters/platformTheme.d.ts +29 -0
- package/dist/components/Calendar/constants.d.ts +12 -0
- package/dist/components/Calendar/context/CalendarContext.d.ts +29 -0
- package/dist/components/Calendar/context/index.d.ts +2 -0
- package/dist/components/Calendar/context/useCalendarContext.d.ts +3 -0
- package/dist/components/Calendar/index.d.ts +4 -0
- package/dist/components/Calendar/interface.d.ts +62 -0
- package/dist/components/Calendar/internalTypes.d.ts +56 -0
- package/dist/components/Calendar/panels/DayPanel/DayPanel.d.ts +3 -0
- package/dist/components/Calendar/panels/DayPanel/__tests__/CalendarDay.dayFilter.test.d.ts +1 -0
- package/dist/components/Calendar/panels/MonthPanel/MonthCell/MonthCell.d.ts +10 -0
- package/dist/components/Calendar/panels/MonthPanel/MonthCell/MonthCellPopover/MonthCellPopover.d.ts +10 -0
- package/dist/components/Calendar/panels/MonthPanel/MonthHeader/MonthHeader.d.ts +2 -0
- package/dist/components/Calendar/panels/MonthPanel/MonthPanel.d.ts +3 -0
- package/dist/components/Calendar/panels/MonthPanel/WeekEventLayer/MoreButton.d.ts +11 -0
- package/dist/components/Calendar/panels/MonthPanel/WeekEventLayer/WeekEventLayer.d.ts +3 -0
- package/dist/components/Calendar/panels/WeekPanel/WeekAllDaySection/WeekAllDaySection.d.ts +11 -0
- package/dist/components/Calendar/panels/WeekPanel/WeekHeader/WeekHeader.d.ts +6 -0
- package/dist/components/Calendar/panels/WeekPanel/WeekPanel.d.ts +3 -0
- package/dist/components/Calendar/shared/AllDaySection/AllDaySection.d.ts +7 -0
- package/dist/components/Calendar/shared/AllDaySection/index.d.ts +1 -0
- package/dist/components/Calendar/shared/CurrentTimeIndicator/CurrentTimeIndicator.d.ts +10 -0
- package/dist/components/Calendar/shared/CurrentTimeIndicator/__tests__/CurrentTimeIndicator.test.d.ts +1 -0
- package/dist/components/Calendar/shared/CurrentTimeIndicator/index.d.ts +1 -0
- package/dist/components/Calendar/shared/EventCard/EventCard.d.ts +22 -0
- package/dist/components/Calendar/shared/EventCard/__tests__/EventCard.tooltip.test.d.ts +1 -0
- package/dist/components/Calendar/shared/EventCard/index.d.ts +1 -0
- package/dist/components/Calendar/shared/TimeAxis/TimeAxis.d.ts +6 -0
- package/dist/components/Calendar/shared/TimeAxis/index.d.ts +1 -0
- package/dist/components/Calendar/shared/TimeGrid/TimeGrid.d.ts +11 -0
- package/dist/components/Calendar/shared/TimeGrid/index.d.ts +1 -0
- package/dist/components/Calendar/style/__tests__/resolveCalendarThemeVars.test.d.ts +1 -0
- package/dist/components/Calendar/style/__tests__/resolveScheduleColorVars.test.d.ts +1 -0
- package/dist/components/Calendar/style/__tests__/resolveSubcomponentThemes.test.d.ts +1 -0
- package/dist/components/Calendar/style/index.d.ts +5 -0
- package/dist/components/Calendar/style/resolveCalendarThemeVars.d.ts +2 -0
- package/dist/components/Calendar/style/resolveScheduleColorVars.d.ts +3 -0
- package/dist/components/Calendar/style/resolveSubcomponentThemes.d.ts +5 -0
- package/dist/components/Calendar/utils/__tests__/dateUtils.test.d.ts +1 -0
- package/dist/components/Calendar/utils/__tests__/eventUtils.contract.test.d.ts +1 -0
- package/dist/components/Calendar/utils/__tests__/normalizeData.test.d.ts +1 -0
- package/dist/components/Calendar/utils/colorUtils.d.ts +8 -0
- package/dist/components/Calendar/utils/dateUtils.d.ts +25 -0
- package/dist/components/Calendar/utils/eventUtils.d.ts +44 -0
- package/dist/components/Calendar/utils/index.d.ts +7 -0
- package/dist/components/Calendar/utils/layout/dayLayoutAlgorithm.d.ts +31 -0
- package/dist/components/Calendar/utils/layout/index.d.ts +3 -0
- package/dist/components/Calendar/utils/layout/monthLayoutAlgorithm.d.ts +59 -0
- package/dist/components/Calendar/utils/layout/weekLayoutAlgorithm.d.ts +7 -0
- package/dist/components/Calendar/utils/normalizeData.d.ts +7 -0
- package/dist/components/Calendar/utils/timeUtils.d.ts +27 -0
- package/dist/components/Calendar/utils/weekTimedLayout.d.ts +14 -0
- package/dist/components/ColorPicker/useFloatingColorPicker.d.ts +1 -23
- package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +17 -0
- package/dist/components/DatePicker/DatePickerPanel/DatePickerPanel.d.ts +9 -0
- package/dist/components/DatePicker/MonthPicker/MonthPicker.d.ts +4 -0
- package/dist/components/DatePicker/TodayFooter/TodayFooter.d.ts +5 -0
- package/dist/components/DatePicker/YearPicker/YearPicker.d.ts +4 -0
- package/dist/components/DatePicker/__tests__/DatePicker.theme.test.d.ts +1 -0
- package/dist/components/DatePicker/__tests__/DatePickerPanel.dom.test.d.ts +1 -0
- package/dist/components/DatePicker/__tests__/DatePickerPanel.styles.test.d.ts +1 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/interface.d.ts +37 -0
- package/dist/components/DatePicker/style/__tests__/resolveDatePickerThemeVars.test.d.ts +1 -0
- package/dist/components/DatePicker/style/index.d.ts +1 -0
- package/dist/components/DatePicker/style/resolveDatePickerThemeVars.d.ts +2 -0
- package/dist/components/DatePicker/utils/__tests__/normalizePickerValue.test.d.ts +1 -0
- package/dist/components/DatePicker/utils/chunkArray.d.ts +1 -0
- package/dist/components/DatePicker/utils/ensureDayjsPlugins.d.ts +2 -0
- package/dist/components/DatePicker/utils/formatPickerLabel.d.ts +1 -0
- package/dist/components/DatePicker/utils/normalizePickerValue.d.ts +10 -0
- package/dist/components/DatePicker/utils/pickerConstants.d.ts +8 -0
- package/dist/components/DatePicker/utils/pickerLocale.d.ts +4 -0
- package/dist/components/Segmented/Segmented.type.d.ts +30 -0
- package/dist/components/Segmented/__tests__/Segmented.theme.test.d.ts +1 -0
- package/dist/components/Segmented/index.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +6 -0
- package/dist/components/Tooltip/Tooltip.type.d.ts +33 -0
- package/dist/components/Tooltip/__tests__/Tooltip.test.d.ts +1 -0
- package/dist/components/Tooltip/context/TooltipFloatingContext.d.ts +2 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/hooks/useFloatingOverlay.d.ts +20 -0
- package/dist/hooks/useLocale.d.ts +4 -2
- package/dist/index.js +39 -23
- package/dist/locale/LocaleContext.d.ts +2 -1
- package/dist/locale/formatLocaleMessage.d.ts +2 -0
- package/dist/locale/lang/en-US.json.d.ts +43 -1
- package/dist/locale/lang/zh-CN.json.d.ts +43 -1
- package/dist/locale/lang/zh-TW.json.d.ts +43 -1
- package/dist/style.css +1 -1
- package/dist/utils/cssVars.d.ts +1 -0
- package/dist/utils/mergeRefs.d.ts +4 -0
- package/dist/vendors/{ConfigProvider-BekyDD3V.js → ConfigProvider-aWr8b3e3.js} +123 -32
- package/dist/vendors/{LocaleContext-Jj_JGgi2.js → LocaleContext-CuXR7Y03.js} +52 -7
- package/dist/vendors/{Tree-Bg2UzLsC.js → Tree-BTQ25Pi7.js} +3 -3
- package/dist/vendors/cssVars-C4BlzyxA.js +6 -0
- package/dist/vendors/useFloatingOverlay-uxlI1G-V.js +26 -0
- package/dist/vendors/{useLocale-Mk0d7wNt.js → useLocale-DvdSwM9e.js} +1 -1
- package/package.json +8 -3
- package/dist/ColorPicker/ColorPicker-nnQIw0_e.js +0 -168
- package/dist/Segmented/Segmented-Byw8j1hQ.js +0 -62
- /package/dist/Loading/{Loading-dsLWSWsE.js → Loading-WjmzBabh.js} +0 -0
- /package/dist/NotFoundContent/{NotFoundContent-DJUQ0_2D.js → NotFoundContent-7xV-zOG2.js} +0 -0
- /package/dist/Radio/{Radio-WNw-VqIS.js → Radio-DkrZHoG1.js} +0 -0
- /package/dist/vendors/{animations-C2i5EijE.js → animations-BmT0HT5q.js} +0 -0
- /package/dist/vendors/{color-CxdZwdYM.js → color-BeQo449h.js} +0 -0
- /package/dist/vendors/{useFloatingPortal-CDgiCnbb.js → useFloatingPortal-DsEtsAGW.js} +0 -0
|
@@ -2,7 +2,7 @@ import { createFromIconfontCN as e } from "@ant-design/icons";
|
|
|
2
2
|
import { isNumber as t } from "lodash-es";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Icon/Icon.tsx
|
|
5
|
-
var r = e({ scriptUrl: "https://at.alicdn.com/t/c/
|
|
5
|
+
var r = e({ scriptUrl: "https://at.alicdn.com/t/c/font_4786625_7yye49rghck.js" }), i = ({ name: e, style: i, className: a, onClick: o, color: s, size: c = 16 }) => {
|
|
6
6
|
let l = {
|
|
7
7
|
color: s,
|
|
8
8
|
fontSize: t(c) ? `${c}px` : c,
|
package/dist/Icon/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Icon-
|
|
1
|
+
import { t as e } from "./Icon-BQ3Whub2.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback as r, useEffect as i, useLayoutEffect as a, useRef as o, useState as s } from "react";
|
|
4
4
|
import c from "clsx";
|
package/dist/InputTag/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import { t as e } from "./InputTag-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { t as e } from "./InputTag-zP5QdId7.js";
|
|
3
3
|
export { e as default };
|
package/dist/Loading/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Loading-
|
|
1
|
+
import { t as e } from "./Loading-WjmzBabh.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { useState as r } from "react";
|
|
4
4
|
import { Modal as i } from "antd";
|
|
5
5
|
import { useControllableValue as a } from "ahooks";
|
|
6
6
|
//#region src/components/Modal/modal.module.scss
|
|
7
|
-
var o = "
|
|
7
|
+
var o = "_modal_xkmkv_1", s = "_modal__title_xkmkv_4", c = "_modal__actions_xkmkv_17", l = "_modal__button_groups_xkmkv_21", u = "_modal__button_xkmkv_21", d = "_modal__icon_xkmkv_41", f = {
|
|
8
8
|
modal: o,
|
|
9
9
|
modal__title: s,
|
|
10
|
-
"modal__title-text": "_modal__title-
|
|
10
|
+
"modal__title-text": "_modal__title-text_xkmkv_13",
|
|
11
11
|
modal__actions: c,
|
|
12
12
|
modal__button_groups: l,
|
|
13
13
|
modal__button: u,
|
|
14
|
-
"modal__button--fullscreen": "_modal__button--
|
|
14
|
+
"modal__button--fullscreen": "_modal__button--fullscreen_xkmkv_38",
|
|
15
15
|
modal__icon: d
|
|
16
16
|
}, p = (o) => {
|
|
17
17
|
let { fullSwitch: s = !1 } = o, [c, l] = a(o, {
|
|
@@ -58,7 +58,8 @@ var o = "_modal_2gsat_1", s = "_modal__title_2gsat_4", c = "_modal__actions_2gsa
|
|
|
58
58
|
className: f.modal__button,
|
|
59
59
|
children: /* @__PURE__ */ t(e, {
|
|
60
60
|
name: "close",
|
|
61
|
-
className: f.modal__icon
|
|
61
|
+
className: f.modal__icon,
|
|
62
|
+
size: 18
|
|
62
63
|
})
|
|
63
64
|
})]
|
|
64
65
|
}) : null,
|
package/dist/Modal/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import { t as e } from "./Modal-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { t as e } from "./Modal-B5AW5GKt.js";
|
|
3
3
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./NotFoundContent-
|
|
1
|
+
import { t as e } from "./NotFoundContent-7xV-zOG2.js";
|
|
2
2
|
export { e as NotFoundContent };
|
package/dist/Radio/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Radio-
|
|
1
|
+
import { t as e } from "./Radio-DkrZHoG1.js";
|
|
2
2
|
export { e as default };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { t as e } from "../vendors/cssVars-C4BlzyxA.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback as r, useLayoutEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
4
|
+
import c from "clsx";
|
|
5
|
+
import { useControllableValue as l } from "ahooks";
|
|
6
|
+
import { motion as u } from "motion/react";
|
|
7
|
+
//#region src/components/Segmented/Segmented.module.scss
|
|
8
|
+
var d = {
|
|
9
|
+
"bsy-segmented": "_bsy-segmented_1yc4d_1",
|
|
10
|
+
"bsy-segmented--block": "_bsy-segmented--block_1yc4d_12",
|
|
11
|
+
"bsy-segmented__item": "_bsy-segmented__item_1yc4d_17",
|
|
12
|
+
"bsy-segmented__item--disabled": "_bsy-segmented__item--disabled_1yc4d_31",
|
|
13
|
+
"bsy-segmented__item--block": "_bsy-segmented__item--block_1yc4d_36",
|
|
14
|
+
"bsy-segmented__item--active": "_bsy-segmented__item--active_1yc4d_44",
|
|
15
|
+
"bsy-segmented__item--inactive": "_bsy-segmented__item--inactive_1yc4d_48",
|
|
16
|
+
"bsy-segmented__slider": "_bsy-segmented__slider_1yc4d_56"
|
|
17
|
+
}, f = {
|
|
18
|
+
type: "spring",
|
|
19
|
+
stiffness: 350,
|
|
20
|
+
damping: 35
|
|
21
|
+
}, p = { duration: 0 }, m = "#fff", h = (h) => {
|
|
22
|
+
let { options: g, block: _ = !1, disabled: v = !1, enableAnimation: y = !1, theme: b } = h, [x, S] = l(h), [C, w] = s({
|
|
23
|
+
width: 0,
|
|
24
|
+
left: 0
|
|
25
|
+
}), T = o(null), E = o(/* @__PURE__ */ new Map()), D = o(!1), O = r(() => {
|
|
26
|
+
let e = E.current.get(x), t = T.current;
|
|
27
|
+
if (e && t) {
|
|
28
|
+
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
29
|
+
w({
|
|
30
|
+
width: r.width,
|
|
31
|
+
left: r.left - n.left
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}, [x]);
|
|
35
|
+
i(() => {
|
|
36
|
+
if (y && D.current) {
|
|
37
|
+
let e = requestAnimationFrame(() => {
|
|
38
|
+
O();
|
|
39
|
+
});
|
|
40
|
+
return () => cancelAnimationFrame(e);
|
|
41
|
+
}
|
|
42
|
+
O();
|
|
43
|
+
}, [
|
|
44
|
+
x,
|
|
45
|
+
y,
|
|
46
|
+
O
|
|
47
|
+
]), i(() => {
|
|
48
|
+
let e = new ResizeObserver(O);
|
|
49
|
+
return T.current && e.observe(T.current), () => {
|
|
50
|
+
e.disconnect();
|
|
51
|
+
};
|
|
52
|
+
}, [O]);
|
|
53
|
+
let k = a(() => {
|
|
54
|
+
let t = {};
|
|
55
|
+
return e(t, "--bsy-segmented-color", b?.colorText), e(t, "--bsy-segmented-background", b?.trackBg), b?.itemSelectedBg && (t["--bsy-segmented-active-color"] = m, t["--bsy-segmented-slider-background"] = b.itemSelectedBg, t["--bsy-segmented-slider-border"] = b.itemSelectedBg), e(t, "--bsy-segmented-hover-background", b?.itemHoverBg), e(t, "--bsy-segmented-hover-border", b?.itemHoverBorder), t;
|
|
56
|
+
}, [b]);
|
|
57
|
+
return /* @__PURE__ */ n("div", {
|
|
58
|
+
ref: T,
|
|
59
|
+
className: c(d["bsy-segmented"], _ && d["bsy-segmented--block"]),
|
|
60
|
+
style: {
|
|
61
|
+
...k,
|
|
62
|
+
..._ ? { gridTemplateColumns: `repeat(${g.length}, 1fr)` } : null
|
|
63
|
+
},
|
|
64
|
+
children: [/* @__PURE__ */ t(u.div, {
|
|
65
|
+
className: d["bsy-segmented__slider"],
|
|
66
|
+
animate: C,
|
|
67
|
+
transition: y && D.current ? f : p
|
|
68
|
+
}), g.map((e) => /* @__PURE__ */ t("button", {
|
|
69
|
+
ref: (t) => {
|
|
70
|
+
t ? E.current.set(e.value, t) : E.current.delete(e.value);
|
|
71
|
+
},
|
|
72
|
+
onClick: () => {
|
|
73
|
+
v || (y && e.value !== x && (D.current = !0), S(e.value));
|
|
74
|
+
},
|
|
75
|
+
className: c(d["bsy-segmented__item"], _ && d["bsy-segmented__item--block"], x === e.value ? d["bsy-segmented__item--active"] : d["bsy-segmented__item--inactive"], { [d["bsy-segmented__item--disabled"]]: v }),
|
|
76
|
+
children: e.label
|
|
77
|
+
}, e.value))]
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
h.displayName = "BsySegmented";
|
|
81
|
+
//#endregion
|
|
82
|
+
export { h as t };
|
package/dist/Segmented/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Segmented-
|
|
1
|
+
import { t as e } from "./Segmented-BTW445jc.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
2
|
-
import { t } from "../vendors/useLocale-
|
|
3
|
-
import { n, t as r } from "../vendors/animations-
|
|
4
|
-
import { t as i } from "./SelectInputSearch-
|
|
5
|
-
import { n as a, t as o } from "../vendors/Tree-
|
|
6
|
-
import { t as s } from "../CheckBox/CheckBox-
|
|
7
|
-
import { t as c } from "../NotFoundContent/NotFoundContent-
|
|
8
|
-
import { t as l } from "../vendors/useFloatingPortal-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { t } from "../vendors/useLocale-DvdSwM9e.js";
|
|
3
|
+
import { n, t as r } from "../vendors/animations-BmT0HT5q.js";
|
|
4
|
+
import { t as i } from "./SelectInputSearch-CraymTXM.js";
|
|
5
|
+
import { n as a, t as o } from "../vendors/Tree-BTQ25Pi7.js";
|
|
6
|
+
import { t as s } from "../CheckBox/CheckBox-DIunYcfS.js";
|
|
7
|
+
import { t as c } from "../NotFoundContent/NotFoundContent-7xV-zOG2.js";
|
|
8
|
+
import { t as l } from "../vendors/useFloatingPortal-DsEtsAGW.js";
|
|
9
9
|
import { first as u, isArray as d, isEmpty as f, isNil as p, noop as m } from "lodash-es";
|
|
10
10
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
11
|
import { Suspense as v, createContext as y, forwardRef as b, memo as x, useCallback as S, useContext as C, useDeferredValue as w, useId as T, useImperativeHandle as E, useLayoutEffect as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
@@ -89,10 +89,10 @@ H.displayName = "BsySelectSingleInput";
|
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region src/components/Select/SelectInput/SelectMultipleInput/OptionTag/option-tag.module.scss
|
|
91
91
|
var U = {
|
|
92
|
-
"bsy-input-tag__container": "_bsy-input-
|
|
93
|
-
"bsy-input-tag__item": "_bsy-input-
|
|
94
|
-
"bsy-input-tag__item--disabled": "_bsy-input-tag__item--
|
|
95
|
-
"bsy-input-tag__item-icon": "_bsy-input-tag__item-
|
|
92
|
+
"bsy-input-tag__container": "_bsy-input-tag__container_znvs6_1",
|
|
93
|
+
"bsy-input-tag__item": "_bsy-input-tag__item_znvs6_7",
|
|
94
|
+
"bsy-input-tag__item--disabled": "_bsy-input-tag__item--disabled_znvs6_20",
|
|
95
|
+
"bsy-input-tag__item-icon": "_bsy-input-tag__item-icon_znvs6_24"
|
|
96
96
|
}, W = b(({ children: e, style: t, disabled: n }, r) => /* @__PURE__ */ g("div", {
|
|
97
97
|
"data-bsy-input-tag": "true",
|
|
98
98
|
className: j({
|
|
@@ -146,7 +146,7 @@ var G = "_select_multiple_input__container_8pd2n_1", K = "_select_multiple_input
|
|
|
146
146
|
children: /* @__PURE__ */ _(W.Container, { children: [n?.map((t, n) => {
|
|
147
147
|
let a = (t) => /* @__PURE__ */ g("div", {
|
|
148
148
|
style: t,
|
|
149
|
-
className: "bsy-input-tag__item-icon cursor-pointer",
|
|
149
|
+
className: j(U["bsy-input-tag__item-icon"], "cursor-pointer"),
|
|
150
150
|
children: /* @__PURE__ */ g(e, {
|
|
151
151
|
name: "close",
|
|
152
152
|
style: { fontSize: 12 },
|
|
@@ -178,7 +178,7 @@ var G = "_select_multiple_input__container_8pd2n_1", K = "_select_multiple_input
|
|
|
178
178
|
children: [v, /* @__PURE__ */ _(W.Container, { children: [n?.slice(0, u).map((t, n) => {
|
|
179
179
|
let a = (n) => /* @__PURE__ */ g("div", {
|
|
180
180
|
style: n,
|
|
181
|
-
className: j("bsy-input-tag__item-icon", {
|
|
181
|
+
className: j(U["bsy-input-tag__item-icon"], {
|
|
182
182
|
[Y.select_multiple_input__close_btn]: !s,
|
|
183
183
|
[Y.select_multiple_input__close_btn + "--disabled"]: s
|
|
184
184
|
}),
|
|
@@ -384,7 +384,6 @@ var de = (e) => {
|
|
|
384
384
|
return /* @__PURE__ */ g("li", {
|
|
385
385
|
className: j("flex items-center gap-[8px] min-h-[34px]", "cursor-pointer rounded-[4px]", "bsy-multiple-select-item", {
|
|
386
386
|
"hover:bg-[#f3f3f3]": !0,
|
|
387
|
-
"text-[#0265ff]": o,
|
|
388
387
|
"text-[#4d609f]": c && !o
|
|
389
388
|
}),
|
|
390
389
|
children: /* @__PURE__ */ g(s, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
2
|
-
import { t } from "../vendors/useLocale-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { t } from "../vendors/useLocale-DvdSwM9e.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Select/SelectInputSearch/SelectInputSearch.tsx
|
|
5
5
|
var i = (i) => {
|
|
@@ -35,7 +35,7 @@ var i = (i) => {
|
|
|
35
35
|
onClick: () => c?.(""),
|
|
36
36
|
role: "button",
|
|
37
37
|
"aria-label": "clear search",
|
|
38
|
-
children: /* @__PURE__ */ n(e, { name: "
|
|
38
|
+
children: /* @__PURE__ */ n(e, { name: "empty" })
|
|
39
39
|
})
|
|
40
40
|
]
|
|
41
41
|
})
|
package/dist/Select/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import "../vendors/LocaleContext-
|
|
3
|
-
import "../vendors/useLocale-
|
|
4
|
-
import { n as e, r as t, t as n } from "./Select-
|
|
5
|
-
import "./SelectInputSearch-
|
|
6
|
-
import "../vendors/Tree-
|
|
7
|
-
import "../CheckBox/CheckBox-
|
|
8
|
-
import "../CheckBox/CheckBox-
|
|
9
|
-
import "../Radio/Radio-
|
|
10
|
-
import "../NotFoundContent/NotFoundContent-
|
|
11
|
-
import "../vendors/useFloatingPortal-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import "../vendors/LocaleContext-CuXR7Y03.js";
|
|
3
|
+
import "../vendors/useLocale-DvdSwM9e.js";
|
|
4
|
+
import { n as e, r as t, t as n } from "./Select-BGsQ-PVq.js";
|
|
5
|
+
import "./SelectInputSearch-CraymTXM.js";
|
|
6
|
+
import "../vendors/Tree-BTQ25Pi7.js";
|
|
7
|
+
import "../CheckBox/CheckBox-CkVe5Boq.js";
|
|
8
|
+
import "../CheckBox/CheckBox-DIunYcfS.js";
|
|
9
|
+
import "../Radio/Radio-DkrZHoG1.js";
|
|
10
|
+
import "../NotFoundContent/NotFoundContent-7xV-zOG2.js";
|
|
11
|
+
import "../vendors/useFloatingPortal-DsEtsAGW.js";
|
|
12
12
|
export { e as Mode, n as Select, t as SelectType };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
2
|
-
import { n as t } from "../vendors/color-
|
|
3
|
-
import { n } from "../vendors/animations-
|
|
4
|
-
import { t as r } from "../vendors/useFloatingPortal-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { n as t } from "../vendors/color-BeQo449h.js";
|
|
3
|
+
import { n } from "../vendors/animations-BmT0HT5q.js";
|
|
4
|
+
import { t as r } from "../vendors/useFloatingPortal-DsEtsAGW.js";
|
|
5
5
|
import { isString as i } from "lodash-es";
|
|
6
6
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
import { createContext as c, useCallback as l, useContext as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
|
package/dist/Tabs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import "../vendors/color-
|
|
3
|
-
import "../vendors/useFloatingPortal-
|
|
4
|
-
import { i as e, n as t, r as n, t as r } from "./Tabs-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import "../vendors/color-BeQo449h.js";
|
|
3
|
+
import "../vendors/useFloatingPortal-DsEtsAGW.js";
|
|
4
|
+
import { i as e, n as t, r as n, t as r } from "./Tabs-CPRNkfMo.js";
|
|
5
5
|
export { e as TABS_TYPE, n as TabPanel, r as TabSelect, t as default };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as r, cloneElement as i, createContext as a, isValidElement as ee, useCallback as te, useEffect as ne, useMemo as o, useRef as re, useState as ie } from "react";
|
|
3
|
+
import { useControllableValue as ae } from "ahooks";
|
|
4
|
+
import { FloatingArrow as s, FloatingPortal as c, arrow as l, autoUpdate as u, flip as d, offset as f, safePolygon as p, shift as m, size as h, useClick as g, useDismiss as _, useFloating as v, useHover as y, useInteractions as oe, useRole as se, useTransitionStyles as ce } from "@floating-ui/react";
|
|
5
|
+
//#region src/utils/mergeRefs.ts
|
|
6
|
+
var b = (...e) => (t) => {
|
|
7
|
+
e.forEach((e) => {
|
|
8
|
+
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
9
|
+
});
|
|
10
|
+
}, x = a(null), S = {
|
|
11
|
+
"bsy-tooltip": "_bsy-tooltip_1ilez_1",
|
|
12
|
+
"bsy-tooltip__trigger": "_bsy-tooltip__trigger_1ilez_4",
|
|
13
|
+
"bsy-tooltip__content": "_bsy-tooltip__content_1ilez_8"
|
|
14
|
+
}, le = "M0 14C0 14 1.44834 13.9879 4.14272 10.7864C5.24990 9.46652 6.28557 8.66663 7.0002 8.66663C7.71415 8.66663 8.73670 9.55158 9.85697 10.8831C12.5664 14.1005 14 14 14 14H0Z", ue = "#525867", C = (e, t) => e ? t ? (n) => {
|
|
15
|
+
e(n), t(n);
|
|
16
|
+
} : e : t, w = (e) => {
|
|
17
|
+
if (!(e === "auto" || e === void 0)) return typeof e == "number" ? `${e}px` : e;
|
|
18
|
+
}, de = (e) => e.type === r || (e.type?.toString().includes("Fragment") ?? !1), T = ({ children: r, content: a, trigger: T = "hover", style: E, showArrow: D = !0, placement: O = "bottom", onClose: k, hoverDelay: A = 500, getPopupContainer: j, moveToFloatingKeepOpen: M = !1, widthMode: N = "content", width: P, minWidth: F = 60, maxWidth: I = 340, offset: L = 10, fallbackPlacements: R, virtualReference: z, flipBoundary: B, animated: V = !1, animationConfig: H, ...fe }) => {
|
|
19
|
+
let U = re(null), [pe, me] = ie(null), [W, G] = ae(fe, {
|
|
20
|
+
valuePropName: "visible",
|
|
21
|
+
trigger: "onVisibleChange",
|
|
22
|
+
defaultValue: !1
|
|
23
|
+
}), he = te((e) => {
|
|
24
|
+
!e && W && k && k(), G(e);
|
|
25
|
+
}, [
|
|
26
|
+
W,
|
|
27
|
+
k,
|
|
28
|
+
G
|
|
29
|
+
]), ge = o(() => {
|
|
30
|
+
let e = R ? { fallbackPlacements: R } : {};
|
|
31
|
+
B && (e.boundary = B);
|
|
32
|
+
let t = [
|
|
33
|
+
f(L),
|
|
34
|
+
d(e),
|
|
35
|
+
m({ padding: 8 })
|
|
36
|
+
];
|
|
37
|
+
return D && t.push(l({ element: U })), N === "reference" && t.push(h({ apply({ rects: e, elements: t }) {
|
|
38
|
+
t.floating.style.width = `${e.reference.width}px`;
|
|
39
|
+
let n = w(F);
|
|
40
|
+
n && (t.floating.style.minWidth = n);
|
|
41
|
+
let r = w(I);
|
|
42
|
+
r && (t.floating.style.maxWidth = r);
|
|
43
|
+
} })), t;
|
|
44
|
+
}, [
|
|
45
|
+
N,
|
|
46
|
+
F,
|
|
47
|
+
I,
|
|
48
|
+
L,
|
|
49
|
+
R,
|
|
50
|
+
B,
|
|
51
|
+
D
|
|
52
|
+
]), { refs: K, floatingStyles: q, context: J } = v({
|
|
53
|
+
open: W,
|
|
54
|
+
onOpenChange: he,
|
|
55
|
+
whileElementsMounted: W ? (e, t, n) => u(e, t, n, {
|
|
56
|
+
animationFrame: !1,
|
|
57
|
+
ancestorScroll: !0,
|
|
58
|
+
ancestorResize: !0,
|
|
59
|
+
elementResize: !0,
|
|
60
|
+
layoutShift: !1
|
|
61
|
+
}) : void 0,
|
|
62
|
+
placement: O,
|
|
63
|
+
middleware: ge,
|
|
64
|
+
transform: !1
|
|
65
|
+
}), { isMounted: _e, styles: ve } = ce(J, V && H ? H : { duration: 0 }), ye = V ? _e : W, Y = o(() => {
|
|
66
|
+
let e = {
|
|
67
|
+
...q,
|
|
68
|
+
...E
|
|
69
|
+
};
|
|
70
|
+
switch (N) {
|
|
71
|
+
case "content":
|
|
72
|
+
e.width = "auto";
|
|
73
|
+
break;
|
|
74
|
+
case "manual":
|
|
75
|
+
P !== void 0 && (e.width = w(P));
|
|
76
|
+
break;
|
|
77
|
+
case "reference": break;
|
|
78
|
+
default: e.width = "max-content";
|
|
79
|
+
}
|
|
80
|
+
return N !== "reference" && (F !== void 0 && (e.minWidth = w(F)), I !== void 0 && (e.maxWidth = w(I))), e;
|
|
81
|
+
}, [
|
|
82
|
+
q,
|
|
83
|
+
E,
|
|
84
|
+
N,
|
|
85
|
+
P,
|
|
86
|
+
F,
|
|
87
|
+
I
|
|
88
|
+
]);
|
|
89
|
+
ne(() => {
|
|
90
|
+
z && K.setPositionReference(z);
|
|
91
|
+
}, [z, K]);
|
|
92
|
+
let { getReferenceProps: X, getFloatingProps: be } = oe([
|
|
93
|
+
y(J, {
|
|
94
|
+
enabled: T === "hover",
|
|
95
|
+
delay: { open: A },
|
|
96
|
+
handleClose: M ? p() : void 0
|
|
97
|
+
}),
|
|
98
|
+
g(J, { enabled: T === "click" }),
|
|
99
|
+
_(J),
|
|
100
|
+
se(J, { role: "tooltip" })
|
|
101
|
+
]), Z = X(), Q = {
|
|
102
|
+
...Z,
|
|
103
|
+
onClick: (e) => {
|
|
104
|
+
T === "click" && e.stopPropagation(), Z.onClick?.(e);
|
|
105
|
+
},
|
|
106
|
+
onMouseEnter: (e) => {
|
|
107
|
+
T === "hover" && e.stopPropagation(), Z.onMouseEnter?.(e);
|
|
108
|
+
},
|
|
109
|
+
onMouseLeave: (e) => {
|
|
110
|
+
T === "hover" && e.stopPropagation(), Z.onMouseLeave?.(e);
|
|
111
|
+
},
|
|
112
|
+
onMouseMove: (e) => {
|
|
113
|
+
Z.onMouseMove?.(e);
|
|
114
|
+
}
|
|
115
|
+
}, xe = j?.(), Se = typeof E?.background == "string" ? E.background : ue, Ce = b(K.setFloating, me), $ = ye ? /* @__PURE__ */ t(c, {
|
|
116
|
+
root: xe ?? void 0,
|
|
117
|
+
children: /* @__PURE__ */ n("div", {
|
|
118
|
+
ref: Ce,
|
|
119
|
+
style: V ? {
|
|
120
|
+
...Y,
|
|
121
|
+
...ve
|
|
122
|
+
} : Y,
|
|
123
|
+
...be(),
|
|
124
|
+
className: S["bsy-tooltip__content"],
|
|
125
|
+
onClick: (e) => e.stopPropagation(),
|
|
126
|
+
children: [D ? /* @__PURE__ */ t(s, {
|
|
127
|
+
ref: U,
|
|
128
|
+
context: J,
|
|
129
|
+
width: 14,
|
|
130
|
+
height: 14,
|
|
131
|
+
tipRadius: 2,
|
|
132
|
+
fill: Se,
|
|
133
|
+
d: le
|
|
134
|
+
}) : null, /* @__PURE__ */ t(x.Provider, {
|
|
135
|
+
value: pe,
|
|
136
|
+
children: a
|
|
137
|
+
})]
|
|
138
|
+
})
|
|
139
|
+
}) : null;
|
|
140
|
+
if (ee(r) && !de(r)) {
|
|
141
|
+
let t = r.props, a = r.ref;
|
|
142
|
+
return /* @__PURE__ */ n(e, { children: [i(r, {
|
|
143
|
+
...t,
|
|
144
|
+
...Q,
|
|
145
|
+
ref: a ? b(K.setReference, a) : K.setReference,
|
|
146
|
+
style: t.style,
|
|
147
|
+
onClick: C(t.onClick, Q.onClick),
|
|
148
|
+
onMouseEnter: C(t.onMouseEnter, Q.onMouseEnter),
|
|
149
|
+
onMouseLeave: C(t.onMouseLeave, Q.onMouseLeave),
|
|
150
|
+
onMouseMove: C(t.onMouseMove, Q.onMouseMove)
|
|
151
|
+
}), $] });
|
|
152
|
+
}
|
|
153
|
+
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
154
|
+
className: S["bsy-tooltip"],
|
|
155
|
+
children: /* @__PURE__ */ t("div", {
|
|
156
|
+
ref: K.setReference,
|
|
157
|
+
...Q,
|
|
158
|
+
className: S["bsy-tooltip__trigger"],
|
|
159
|
+
children: r
|
|
160
|
+
})
|
|
161
|
+
}), $] });
|
|
162
|
+
}, E = ({ content: n, children: r, ...i }) => n ? /* @__PURE__ */ t(T, {
|
|
163
|
+
content: n,
|
|
164
|
+
...i,
|
|
165
|
+
children: r
|
|
166
|
+
}) : /* @__PURE__ */ t(e, { children: r });
|
|
167
|
+
E.displayName = "BsyTooltip";
|
|
168
|
+
//#endregion
|
|
169
|
+
export { x as n, E as t };
|
package/dist/Tree/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import { t as e } from "../vendors/Tree-
|
|
3
|
-
import "../CheckBox/CheckBox-
|
|
4
|
-
import "../Radio/Radio-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { t as e } from "../vendors/Tree-BTQ25Pi7.js";
|
|
3
|
+
import "../CheckBox/CheckBox-CkVe5Boq.js";
|
|
4
|
+
import "../Radio/Radio-DkrZHoG1.js";
|
|
5
5
|
export { e as Tree };
|
package/dist/components/Calendar/Header/DateDisplay/__tests__/DateDisplay.weekPicker.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { resolvePlatformCalendarTheme, type PlatformCalendarThemeConfig } from './platformTheme';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CalendarTheme } from '../interface';
|
|
2
|
+
/** 低代码 / 现网平台主题结构,Calendar 组件本体不依赖此类型。 */
|
|
3
|
+
export interface PlatformCalendarThemeConfig {
|
|
4
|
+
background?: {
|
|
5
|
+
color?: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
type?: 'color' | 'image';
|
|
8
|
+
position?: 'center' | 'stretch' | 'masterDrawingCenter';
|
|
9
|
+
};
|
|
10
|
+
titleColor?: string;
|
|
11
|
+
overTitleColor?: string;
|
|
12
|
+
headerBackground?: string;
|
|
13
|
+
highlightColor?: string;
|
|
14
|
+
/** @deprecated 平台历史拼写,请优先使用 dataChooseBackgroundColor */
|
|
15
|
+
dataChooseBackroundColor?: string;
|
|
16
|
+
dataChooseBackgroundColor?: string;
|
|
17
|
+
/** @deprecated 平台历史拼写,请优先使用 weekRangeBackgroundColor */
|
|
18
|
+
weekRangeBackroundColor?: string;
|
|
19
|
+
weekRangeBackgroundColor?: string;
|
|
20
|
+
moreRecord?: string;
|
|
21
|
+
scheduleColor?: {
|
|
22
|
+
verticalBackground?: string;
|
|
23
|
+
horizontalBackground?: string;
|
|
24
|
+
horizontalBackgroundHover?: string;
|
|
25
|
+
};
|
|
26
|
+
specificallyColor?: string;
|
|
27
|
+
}
|
|
28
|
+
/** 将平台主题配置翻译为 Calendar 组件 Design Token。 */
|
|
29
|
+
export declare const resolvePlatformCalendarTheme: (config: PlatformCalendarThemeConfig) => CalendarTheme;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CalendarMode } from './interface';
|
|
2
|
+
export declare const DEFAULT_MODES: CalendarMode[];
|
|
3
|
+
export declare const EVENT_CARD_CONSTANTS: {
|
|
4
|
+
readonly MIN_HEIGHT_FOR_TIME: 32;
|
|
5
|
+
readonly MIN_HEIGHT_FOR_TITLE: 22;
|
|
6
|
+
};
|
|
7
|
+
export declare const ALL_DAY_SECTION_CONSTANTS: {
|
|
8
|
+
readonly COLLAPSED_COUNT: 3;
|
|
9
|
+
readonly EXPANDED_COUNT: 5;
|
|
10
|
+
readonly EVENT_HEIGHT: 22;
|
|
11
|
+
readonly EVENT_GAP: 4;
|
|
12
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AddClickPayload, CalendarAxis, CalendarEventClickHandler, CalendarMode, CalendarTooltipConfig } from '../interface';
|
|
2
|
+
import { CalendarFormatMessage } from '../internalTypes';
|
|
3
|
+
import { SegmentedTheme } from '../../Segmented';
|
|
4
|
+
import { DatePickerTheme } from '../../DatePicker';
|
|
5
|
+
export interface CalendarStateContextValue {
|
|
6
|
+
currentDate: Date;
|
|
7
|
+
hoveredEventId: string | number | null;
|
|
8
|
+
mode: CalendarMode;
|
|
9
|
+
modes: CalendarMode[];
|
|
10
|
+
axis: CalendarAxis;
|
|
11
|
+
allowAdd: boolean;
|
|
12
|
+
timeZone?: string;
|
|
13
|
+
tooltip?: CalendarTooltipConfig;
|
|
14
|
+
segmentedTheme?: SegmentedTheme;
|
|
15
|
+
datePickerTheme?: DatePickerTheme;
|
|
16
|
+
formatMessage: CalendarFormatMessage;
|
|
17
|
+
onEventClick?: CalendarEventClickHandler;
|
|
18
|
+
onAddClick?: (payload: AddClickPayload) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface CalendarDispatchContextValue {
|
|
21
|
+
setCurrentDate: (date: Date) => void;
|
|
22
|
+
setHoveredEventId: (id: string | number | null) => void;
|
|
23
|
+
switchToDay: () => void;
|
|
24
|
+
switchPrevDate: () => void;
|
|
25
|
+
switchNextDate: () => void;
|
|
26
|
+
onPanelChange: (mode: CalendarMode) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare const CalendarStateContext: any;
|
|
29
|
+
export declare const CalendarDispatchContext: any;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CalendarDispatchContextValue, CalendarStateContextValue } from './CalendarContext';
|
|
2
|
+
export declare function useCalendarStateSelector<T>(selector: (state: CalendarStateContextValue) => T): T;
|
|
3
|
+
export declare function useCalendarDispatchSelector<T>(selector: (dispatch: CalendarDispatchContextValue) => T): T;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default } from './Calendar';
|
|
2
|
+
export type { CalendarProps, CalendarDataItem, CalendarTimeInput, CalendarMode, CalendarAxis, CalendarTheme, CalendarPanelBgImagePosition, CalendarTooltipConfig, CalendarEventClickHandler, AddClickPayload, } from './interface';
|
|
3
|
+
export { resolveCalendarThemeVars } from './style';
|
|
4
|
+
export { resolvePlatformCalendarTheme, type PlatformCalendarThemeConfig } from './adapters';
|