@bifrostui/react 1.4.7 → 1.4.8-beta.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/Calendar/Calendar.js +5 -1
- package/dist/Calendar/Calendar.types.d.ts +5 -0
- package/dist/Collapse/Collapse.css +0 -1
- package/dist/Collapse/Collapse.d.ts +1 -1
- package/dist/Collapse/Collapse.js +11 -8
- package/dist/Collapse/Collapse.miniapp.d.ts +5 -0
- package/dist/Collapse/Collapse.miniapp.js +177 -0
- package/dist/CollapsePanel/CollapsePanel.css +4 -2
- package/dist/DatePicker/DatePicker.d.ts +4 -0
- package/dist/DatePicker/DatePicker.js +335 -0
- package/dist/DatePicker/DatePicker.types.d.ts +36 -0
- package/dist/DatePicker/DatePicker.types.js +15 -0
- package/dist/DatePicker/constants.d.ts +9 -0
- package/dist/DatePicker/constants.js +37 -0
- package/dist/DatePicker/index.d.ts +3 -0
- package/dist/DatePicker/index.js +44 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +5 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.js +280 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.types.d.ts +163 -0
- package/dist/DesktopDatePicker/DesktopDatePicker.types.js +15 -0
- package/dist/DesktopDatePicker/deskTopPickerContainer.css +100 -0
- package/dist/DesktopDatePicker/index.css +61 -0
- package/dist/DesktopDatePicker/index.d.ts +2 -0
- package/dist/DesktopDatePicker/index.js +41 -0
- package/dist/DesktopDatePicker/useGetDatePickerContent.d.ts +6 -0
- package/dist/DesktopDatePicker/useGetDatePickerContent.js +343 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +5 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +322 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +163 -0
- package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.js +15 -0
- package/dist/DesktopDateTimePicker/index.css +66 -0
- package/dist/DesktopDateTimePicker/index.d.ts +2 -0
- package/dist/DesktopDateTimePicker/index.js +41 -0
- package/dist/DesktopPicker/DesktopPicker.d.ts +5 -0
- package/dist/DesktopPicker/DesktopPicker.js +238 -0
- package/dist/DesktopPicker/DesktopPicker.types.d.ts +57 -0
- package/dist/DesktopPicker/DesktopPicker.types.js +15 -0
- package/dist/DesktopPicker/index.css +37 -0
- package/dist/DesktopPicker/index.d.ts +2 -0
- package/dist/DesktopPicker/index.js +41 -0
- package/dist/DesktopPicker/utils/calcAfterMounted.d.ts +2 -0
- package/dist/{Tabs/utils/bound.js → DesktopPicker/utils/calcAfterMounted.js} +7 -14
- package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +2 -0
- package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.js +38 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.d.ts +5 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.js +288 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.types.d.ts +182 -0
- package/dist/DesktopTimePicker/DesktopTimePicker.types.js +15 -0
- package/dist/DesktopTimePicker/DesktopTimePickerList.d.ts +4 -0
- package/dist/DesktopTimePicker/DesktopTimePickerList.js +111 -0
- package/dist/DesktopTimePicker/index.css +170 -0
- package/dist/DesktopTimePicker/index.d.ts +2 -0
- package/dist/DesktopTimePicker/index.js +41 -0
- package/dist/DesktopTimePicker/useGetTimePickerContent.d.ts +6 -0
- package/dist/DesktopTimePicker/useGetTimePickerContent.js +249 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.d.ts +2 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.js +27 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +2 -0
- package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.js +51 -0
- package/dist/DesktopTimePicker/utils/utils.d.ts +28 -0
- package/dist/DesktopTimePicker/utils/utils.js +408 -0
- package/dist/Dialog/FunctionalDialog.js +1 -1
- package/dist/Modal/Modal.miniapp.d.ts +1 -1
- package/dist/Picker/Picker.css +5 -0
- package/dist/Picker/Picker.js +27 -5
- package/dist/Picker/Picker.types.d.ts +15 -2
- package/dist/Picker/PickerPanel.css +4 -0
- package/dist/Picker/PickerPanel.js +7 -6
- package/dist/Popover/Popover.js +70 -27
- package/dist/Portal/Portal.miniapp.js +7 -4
- package/dist/ScrollView/ScrollView.js +24 -11
- package/dist/ScrollView/ScrollView.types.d.ts +0 -1
- package/dist/Select/Select.css +1 -4
- package/dist/Select/Select.js +63 -40
- package/dist/Slider/Slider.js +13 -5
- package/dist/SwipeAction/SwipeAction.css +79 -0
- package/dist/SwipeAction/SwipeAction.d.ts +5 -0
- package/dist/SwipeAction/SwipeAction.js +349 -0
- package/dist/SwipeAction/SwipeAction.types.d.ts +75 -0
- package/dist/SwipeAction/SwipeAction.types.js +15 -0
- package/dist/SwipeAction/SwipeActionContext.d.ts +4 -0
- package/dist/SwipeAction/SwipeActionContext.js +30 -0
- package/dist/SwipeAction/SwipeActionItem.css +31 -0
- package/dist/SwipeAction/SwipeActionItem.d.ts +5 -0
- package/dist/SwipeAction/SwipeActionItem.js +105 -0
- package/dist/SwipeAction/constants.d.ts +9 -0
- package/dist/SwipeAction/constants.js +39 -0
- package/dist/SwipeAction/index.d.ts +5 -0
- package/dist/SwipeAction/index.js +50 -0
- package/dist/Tabs/Tab.js +13 -4
- package/dist/Tabs/Tabs.js +30 -15
- package/dist/Tabs/utils/scroll.d.ts +2 -0
- package/dist/Tabs/utils/scroll.js +55 -0
- package/dist/Toast/FunctionalToast.js +1 -1
- package/dist/Toast/Toast.css +0 -1
- package/dist/Tooltip/Tooltip.js +70 -27
- package/dist/index.d.ts +6 -0
- package/dist/index.js +13 -1
- package/dist/locales/base.d.ts +11 -0
- package/dist/locales/en-US.js +24 -0
- package/dist/locales/zh-CN.js +24 -0
- package/dist/locales/zh-TW.js +24 -0
- package/es/Calendar/Calendar.js +5 -1
- package/es/Calendar/Calendar.types.d.ts +5 -0
- package/es/Collapse/Collapse.css +0 -1
- package/es/Collapse/Collapse.d.ts +1 -1
- package/es/Collapse/Collapse.js +11 -8
- package/es/Collapse/Collapse.miniapp.d.ts +5 -0
- package/es/Collapse/Collapse.miniapp.js +157 -0
- package/es/CollapsePanel/CollapsePanel.css +4 -2
- package/es/DatePicker/DatePicker.d.ts +4 -0
- package/es/DatePicker/DatePicker.js +308 -0
- package/es/DatePicker/DatePicker.types.d.ts +36 -0
- package/es/DatePicker/DatePicker.types.js +1 -0
- package/es/DatePicker/constants.d.ts +9 -0
- package/es/DatePicker/constants.js +14 -0
- package/es/DatePicker/index.d.ts +3 -0
- package/es/DatePicker/index.js +8 -0
- package/es/DesktopDatePicker/DesktopDatePicker.d.ts +5 -0
- package/es/DesktopDatePicker/DesktopDatePicker.js +253 -0
- package/es/DesktopDatePicker/DesktopDatePicker.types.d.ts +163 -0
- package/es/DesktopDatePicker/DesktopDatePicker.types.js +1 -0
- package/es/DesktopDatePicker/deskTopPickerContainer.css +100 -0
- package/es/DesktopDatePicker/index.css +61 -0
- package/es/DesktopDatePicker/index.d.ts +2 -0
- package/es/DesktopDatePicker/index.js +6 -0
- package/es/DesktopDatePicker/useGetDatePickerContent.d.ts +6 -0
- package/es/DesktopDatePicker/useGetDatePickerContent.js +316 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +5 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +295 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +163 -0
- package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.js +1 -0
- package/es/DesktopDateTimePicker/index.css +66 -0
- package/es/DesktopDateTimePicker/index.d.ts +2 -0
- package/es/DesktopDateTimePicker/index.js +9 -0
- package/es/DesktopPicker/DesktopPicker.d.ts +5 -0
- package/es/DesktopPicker/DesktopPicker.js +221 -0
- package/es/DesktopPicker/DesktopPicker.types.d.ts +57 -0
- package/es/DesktopPicker/DesktopPicker.types.js +1 -0
- package/es/DesktopPicker/index.css +37 -0
- package/es/DesktopPicker/index.d.ts +2 -0
- package/es/DesktopPicker/index.js +6 -0
- package/es/DesktopPicker/utils/calcAfterMounted.d.ts +2 -0
- package/es/DesktopPicker/utils/calcAfterMounted.js +6 -0
- package/es/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +2 -0
- package/es/DesktopPicker/utils/calcAfterMounted.miniapp.js +9 -0
- package/es/DesktopTimePicker/DesktopTimePicker.d.ts +5 -0
- package/es/DesktopTimePicker/DesktopTimePicker.js +261 -0
- package/es/DesktopTimePicker/DesktopTimePicker.types.d.ts +182 -0
- package/es/DesktopTimePicker/DesktopTimePicker.types.js +1 -0
- package/es/DesktopTimePicker/DesktopTimePickerList.d.ts +4 -0
- package/es/DesktopTimePicker/DesktopTimePickerList.js +84 -0
- package/es/DesktopTimePicker/index.css +170 -0
- package/es/DesktopTimePicker/index.d.ts +2 -0
- package/es/DesktopTimePicker/index.js +6 -0
- package/es/DesktopTimePicker/useGetTimePickerContent.d.ts +6 -0
- package/es/DesktopTimePicker/useGetTimePickerContent.js +226 -0
- package/es/DesktopTimePicker/utils/scrollUtil.d.ts +2 -0
- package/es/DesktopTimePicker/utils/scrollUtil.js +8 -0
- package/es/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +2 -0
- package/es/DesktopTimePicker/utils/scrollUtil.miniapp.js +22 -0
- package/es/DesktopTimePicker/utils/utils.d.ts +28 -0
- package/es/DesktopTimePicker/utils/utils.js +365 -0
- package/es/Dialog/FunctionalDialog.js +2 -2
- package/es/Picker/Picker.css +5 -0
- package/es/Picker/Picker.js +27 -5
- package/es/Picker/Picker.types.d.ts +15 -2
- package/es/Picker/PickerPanel.css +4 -0
- package/es/Picker/PickerPanel.js +7 -6
- package/es/Popover/Popover.js +73 -29
- package/es/Portal/Portal.miniapp.js +8 -5
- package/es/ScrollView/ScrollView.js +24 -11
- package/es/ScrollView/ScrollView.types.d.ts +0 -1
- package/es/Select/Select.css +1 -4
- package/es/Select/Select.js +63 -41
- package/es/Slider/Slider.js +16 -6
- package/es/SwipeAction/SwipeAction.css +79 -0
- package/es/SwipeAction/SwipeAction.d.ts +5 -0
- package/es/SwipeAction/SwipeAction.js +334 -0
- package/es/SwipeAction/SwipeAction.types.d.ts +75 -0
- package/es/SwipeAction/SwipeAction.types.js +1 -0
- package/es/SwipeAction/SwipeActionContext.d.ts +4 -0
- package/es/SwipeAction/SwipeActionContext.js +11 -0
- package/es/SwipeAction/SwipeActionItem.css +31 -0
- package/es/SwipeAction/SwipeActionItem.d.ts +5 -0
- package/es/SwipeAction/SwipeActionItem.js +78 -0
- package/es/SwipeAction/constants.d.ts +9 -0
- package/es/SwipeAction/constants.js +15 -0
- package/es/SwipeAction/index.d.ts +5 -0
- package/es/SwipeAction/index.js +12 -0
- package/es/Tabs/Tab.js +13 -4
- package/es/Tabs/Tabs.js +30 -15
- package/es/Tabs/utils/scroll.d.ts +2 -0
- package/es/Tabs/utils/scroll.js +36 -0
- package/es/Toast/FunctionalToast.js +2 -2
- package/es/Toast/Toast.css +0 -1
- package/es/Tooltip/Tooltip.js +73 -29
- package/es/index.d.ts +6 -0
- package/es/index.js +6 -0
- package/es/locales/base.d.ts +11 -0
- package/es/locales/en-US.js +24 -0
- package/es/locales/zh-CN.js +24 -0
- package/es/locales/zh-TW.js +24 -0
- package/package.json +5 -5
- package/dist/Tabs/utils/bound.d.ts +0 -1
- package/es/Tabs/utils/bound.d.ts +0 -1
- package/es/Tabs/utils/bound.js +0 -13
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var SwipeAction_exports = {};
|
|
30
|
+
__export(SwipeAction_exports, {
|
|
31
|
+
DragPhaseEnum: () => import_constants.DragPhaseEnum,
|
|
32
|
+
SideTypeEnum: () => import_constants.SideTypeEnum,
|
|
33
|
+
SwipeAction: () => import_SwipeAction2.default,
|
|
34
|
+
SwipeActionItem: () => import_SwipeActionItem.default,
|
|
35
|
+
default: () => import_SwipeAction.default
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(SwipeAction_exports);
|
|
38
|
+
__reExport(SwipeAction_exports, require("./SwipeAction.types"), module.exports);
|
|
39
|
+
var import_SwipeAction = __toESM(require("./SwipeAction"));
|
|
40
|
+
var import_SwipeAction2 = __toESM(require("./SwipeAction"));
|
|
41
|
+
var import_SwipeActionItem = __toESM(require("./SwipeActionItem"));
|
|
42
|
+
var import_constants = require("./constants");
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
DragPhaseEnum,
|
|
46
|
+
SideTypeEnum,
|
|
47
|
+
SwipeAction,
|
|
48
|
+
SwipeActionItem,
|
|
49
|
+
...require("./SwipeAction.types")
|
|
50
|
+
});
|
package/dist/Tabs/Tab.js
CHANGED
|
@@ -66,7 +66,19 @@ var import_TabsContext = __toESM(require("./TabsContext"));
|
|
|
66
66
|
var import_Tab2 = require("./Tab.css");
|
|
67
67
|
const prefixCls = "bui-tab";
|
|
68
68
|
const Tab = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
69
|
-
const _a = props, {
|
|
69
|
+
const _a = props, {
|
|
70
|
+
className,
|
|
71
|
+
children,
|
|
72
|
+
index,
|
|
73
|
+
disabled = false,
|
|
74
|
+
onClick
|
|
75
|
+
} = _a, others = __objRest(_a, [
|
|
76
|
+
"className",
|
|
77
|
+
"children",
|
|
78
|
+
"index",
|
|
79
|
+
"disabled",
|
|
80
|
+
"onClick"
|
|
81
|
+
]);
|
|
70
82
|
const tabsContext = import_react.default.useContext(import_TabsContext.default);
|
|
71
83
|
const { value, align, triggerChange } = tabsContext;
|
|
72
84
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -104,7 +116,4 @@ const Tab = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
104
116
|
);
|
|
105
117
|
});
|
|
106
118
|
Tab.displayName = "BuiTab";
|
|
107
|
-
Tab.defaultProps = {
|
|
108
|
-
disabled: false
|
|
109
|
-
};
|
|
110
119
|
var Tab_default = Tab;
|
package/dist/Tabs/Tabs.js
CHANGED
|
@@ -61,9 +61,10 @@ var import_clsx = __toESM(require("clsx"));
|
|
|
61
61
|
var import_react = __toESM(require("react"));
|
|
62
62
|
var import_Tab = __toESM(require("./Tab"));
|
|
63
63
|
var import_TabsContext = require("./TabsContext");
|
|
64
|
-
var
|
|
64
|
+
var import_scroll = __toESM(require("./utils/scroll"));
|
|
65
65
|
var import_Tabs2 = require("./Tabs.css");
|
|
66
66
|
const prefixCls = "bui-tabs";
|
|
67
|
+
const duration = 300;
|
|
67
68
|
const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
68
69
|
const _a = props, { children, className, value, tabs, align, onChange } = _a, others = __objRest(_a, ["children", "className", "value", "tabs", "align", "onChange"]);
|
|
69
70
|
const [active, setActive] = (0, import_react.useState)("");
|
|
@@ -78,14 +79,11 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
78
79
|
leftMaskOpacity: 0,
|
|
79
80
|
rightMaskOpacity: 0
|
|
80
81
|
});
|
|
81
|
-
const
|
|
82
|
+
const getActiveTabElement = () => {
|
|
82
83
|
const container = tabsRef.current;
|
|
83
84
|
if (!container)
|
|
84
|
-
return;
|
|
85
|
+
return void 0;
|
|
85
86
|
const activeIndex = !!tabs.length && tabs.findIndex((item) => item.index === active);
|
|
86
|
-
const activeLine = activeLineRef.current;
|
|
87
|
-
if (!activeLine)
|
|
88
|
-
return;
|
|
89
87
|
let activeTab;
|
|
90
88
|
if (tabs.length) {
|
|
91
89
|
activeTab = activeIndex > -1 ? container.childNodes[activeIndex + 1] : void 0;
|
|
@@ -99,6 +97,25 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
99
97
|
return [...child.classList].includes("bui-tab-active");
|
|
100
98
|
});
|
|
101
99
|
}
|
|
100
|
+
return activeTab;
|
|
101
|
+
};
|
|
102
|
+
const scrollIntoView = () => {
|
|
103
|
+
const tabsContainer = tabsRef.current;
|
|
104
|
+
const activeTab = getActiveTabElement();
|
|
105
|
+
if (!tabsContainer || !activeTab) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const to = activeTab.offsetLeft - (tabsContainer.offsetWidth - activeTab.offsetWidth) / 2;
|
|
109
|
+
(0, import_scroll.default)(tabsContainer, to, duration);
|
|
110
|
+
};
|
|
111
|
+
const animate = ({ transitionInUse }) => {
|
|
112
|
+
const container = tabsRef.current;
|
|
113
|
+
if (!container)
|
|
114
|
+
return;
|
|
115
|
+
const activeLine = activeLineRef.current;
|
|
116
|
+
if (!activeLine)
|
|
117
|
+
return;
|
|
118
|
+
const activeTab = getActiveTabElement();
|
|
102
119
|
let activeTabLeft = 0;
|
|
103
120
|
let activeTabWidth = 0;
|
|
104
121
|
let containerWidth = 0;
|
|
@@ -121,13 +138,8 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
121
138
|
const maxScrollDistance = containerScrollWidth - containerWidth;
|
|
122
139
|
if (maxScrollDistance <= 0 || !activeTab)
|
|
123
140
|
return;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
0,
|
|
127
|
-
containerScrollWidth - containerWidth
|
|
128
|
-
);
|
|
129
|
-
if (tabsRef.current) {
|
|
130
|
-
tabsRef.current.scrollLeft = nextScrollLeft;
|
|
141
|
+
if (!import_utils.isMini) {
|
|
142
|
+
scrollIntoView();
|
|
131
143
|
}
|
|
132
144
|
};
|
|
133
145
|
(0, import_react.useEffect)(() => {
|
|
@@ -157,7 +169,10 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
157
169
|
return;
|
|
158
170
|
const scrollLeft = container == null ? void 0 : container.scrollLeft;
|
|
159
171
|
const showLeftMask = scrollLeft > 0;
|
|
160
|
-
const
|
|
172
|
+
const rightRange = Math.abs(
|
|
173
|
+
container.scrollWidth - (scrollLeft + container.offsetWidth)
|
|
174
|
+
);
|
|
175
|
+
const showRightMask = rightRange > 1;
|
|
161
176
|
setMaskData({
|
|
162
177
|
leftMaskOpacity: showLeftMask ? 1 : 0,
|
|
163
178
|
rightMaskOpacity: showRightMask ? 1 : 0
|
|
@@ -215,7 +230,7 @@ const Tabs = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
|
|
|
215
230
|
"bui-tabline-invisible": import_utils.isMini || !lineData.hasActiveTab
|
|
216
231
|
}),
|
|
217
232
|
style: {
|
|
218
|
-
transition: lineData.transitionInUse ?
|
|
233
|
+
transition: lineData.transitionInUse ? `transform ${duration / 1e3}s ease` : void 0,
|
|
219
234
|
transform: `translate3d(${lineData.x}px, 0px, 0px)`
|
|
220
235
|
}
|
|
221
236
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var scroll_exports = {};
|
|
19
|
+
__export(scroll_exports, {
|
|
20
|
+
default: () => scroll_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(scroll_exports);
|
|
23
|
+
const root = window || global;
|
|
24
|
+
let rafId;
|
|
25
|
+
let prev = Date.now();
|
|
26
|
+
const rafPolyfill = (fn) => {
|
|
27
|
+
const curr = Date.now();
|
|
28
|
+
const ms = Math.max(0, 16 - (curr - prev));
|
|
29
|
+
const id = setTimeout(fn, ms);
|
|
30
|
+
prev = curr + ms;
|
|
31
|
+
return id;
|
|
32
|
+
};
|
|
33
|
+
const cancelRaf = (id) => {
|
|
34
|
+
const cancelAnimationFrame = (root == null ? void 0 : root.cancelAnimationFrame) || (root == null ? void 0 : root.clearTimeout) || clearTimeout;
|
|
35
|
+
cancelAnimationFrame.call(root, id);
|
|
36
|
+
};
|
|
37
|
+
const raf = (fn) => {
|
|
38
|
+
const requestAnimationFrame = (root == null ? void 0 : root.requestAnimationFrame) || rafPolyfill;
|
|
39
|
+
return requestAnimationFrame.call(root, fn);
|
|
40
|
+
};
|
|
41
|
+
const scrollLeftTo = (scroller, to, duration) => {
|
|
42
|
+
cancelRaf(rafId);
|
|
43
|
+
let count = 0;
|
|
44
|
+
const from = scroller.scrollLeft;
|
|
45
|
+
const frames = duration === 0 ? 1 : Math.round(duration / 16);
|
|
46
|
+
function animate() {
|
|
47
|
+
scroller.scrollLeft += (to - from) / frames;
|
|
48
|
+
count += 1;
|
|
49
|
+
if (count < frames) {
|
|
50
|
+
rafId = raf(animate);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
animate();
|
|
54
|
+
};
|
|
55
|
+
var scroll_default = scrollLeftTo;
|
|
@@ -100,7 +100,7 @@ const functionalToast = (props) => {
|
|
|
100
100
|
rootWrapper.style[property] = styles[property];
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
-
const rootElement = (0, import_utils.
|
|
103
|
+
const rootElement = (0, import_utils.getRootContainer)();
|
|
104
104
|
rootElement.appendChild(rootWrapper);
|
|
105
105
|
const ToastComponent = () => {
|
|
106
106
|
const _a = options, { duration, allowMultiple, onClose } = _a, others = __objRest(_a, ["duration", "allowMultiple", "onClose"]);
|
package/dist/Toast/Toast.css
CHANGED
package/dist/Tooltip/Tooltip.js
CHANGED
|
@@ -51,6 +51,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
51
51
|
mod
|
|
52
52
|
));
|
|
53
53
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
54
|
+
var __async = (__this, __arguments, generator) => {
|
|
55
|
+
return new Promise((resolve, reject) => {
|
|
56
|
+
var fulfilled = (value) => {
|
|
57
|
+
try {
|
|
58
|
+
step(generator.next(value));
|
|
59
|
+
} catch (e) {
|
|
60
|
+
reject(e);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var rejected = (value) => {
|
|
64
|
+
try {
|
|
65
|
+
step(generator.throw(value));
|
|
66
|
+
} catch (e) {
|
|
67
|
+
reject(e);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
71
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
72
|
+
});
|
|
73
|
+
};
|
|
54
74
|
var Tooltip_exports = {};
|
|
55
75
|
__export(Tooltip_exports, {
|
|
56
76
|
default: () => Tooltip_default
|
|
@@ -72,8 +92,8 @@ const Tooltip = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
72
92
|
offsetSpacing = 0,
|
|
73
93
|
placement = "top",
|
|
74
94
|
trigger = "click",
|
|
75
|
-
|
|
76
|
-
|
|
95
|
+
open,
|
|
96
|
+
onOpenChange
|
|
77
97
|
} = _a, others = __objRest(_a, [
|
|
78
98
|
"className",
|
|
79
99
|
"style",
|
|
@@ -83,8 +103,8 @@ const Tooltip = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
83
103
|
"offsetSpacing",
|
|
84
104
|
"placement",
|
|
85
105
|
"trigger",
|
|
86
|
-
"
|
|
87
|
-
"
|
|
106
|
+
"open",
|
|
107
|
+
"onOpenChange"
|
|
88
108
|
]);
|
|
89
109
|
const controlByUser = typeof open !== "undefined";
|
|
90
110
|
const { direction, location = "center" } = (0, import_utils.parsePlacement)(placement);
|
|
@@ -92,11 +112,18 @@ const Tooltip = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
92
112
|
const [openStatus, setOpenStatus] = (0, import_react.useState)(defaultOpen);
|
|
93
113
|
const [arrowDirection, setArrowDirection] = (0, import_react.useState)(direction);
|
|
94
114
|
const [arrowLocation, setArrowLocation] = (0, import_react.useState)(location);
|
|
95
|
-
const [
|
|
96
|
-
const
|
|
115
|
+
const [toolStyles, setToolStyles] = (0, import_react.useState)({});
|
|
116
|
+
const tipRef = (0, import_react.useRef)(null);
|
|
117
|
+
const nodeRef = (0, import_utils.useForkRef)(ref, tipRef);
|
|
118
|
+
const clearRef = (status) => {
|
|
119
|
+
if (status === false) {
|
|
120
|
+
tipRef.current = null;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
97
123
|
const changeOpenStatus = (event, status) => {
|
|
98
124
|
if (controlByUser)
|
|
99
125
|
return;
|
|
126
|
+
clearRef(status);
|
|
100
127
|
setOpenStatus(status);
|
|
101
128
|
onOpenChange == null ? void 0 : onOpenChange(event, { open: status });
|
|
102
129
|
};
|
|
@@ -115,23 +142,33 @@ const Tooltip = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
115
142
|
if (!controlByUser)
|
|
116
143
|
return;
|
|
117
144
|
setOpenStatus(open);
|
|
145
|
+
clearRef(open);
|
|
118
146
|
}, [open]);
|
|
147
|
+
(0, import_react.useEffect)(() => {
|
|
148
|
+
if (!openStatus) {
|
|
149
|
+
setToolStyles({
|
|
150
|
+
visibility: "hidden"
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}, [openStatus]);
|
|
119
154
|
const clickEventHandler = (event) => {
|
|
120
155
|
if (trigger === "hover" || (trigger == null ? void 0 : trigger.length) === 1 && (trigger == null ? void 0 : trigger[0]) === "hover")
|
|
121
156
|
return;
|
|
122
157
|
hideTooltip(event);
|
|
123
158
|
};
|
|
124
|
-
const onRootElementMouted = (0, import_utils.throttle)(() => {
|
|
159
|
+
const onRootElementMouted = (0, import_utils.throttle)(() => __async(void 0, null, function* () {
|
|
160
|
+
if (!tipRef.current)
|
|
161
|
+
return;
|
|
125
162
|
const {
|
|
126
163
|
direction: newParsedDirection,
|
|
127
164
|
location: newParsedLocation = "center"
|
|
128
165
|
} = (0, import_utils.parsePlacement)(placement);
|
|
129
|
-
const result = (0, import_utils.getStylesAndLocation)({
|
|
166
|
+
const result = yield (0, import_utils.getStylesAndLocation)({
|
|
130
167
|
childrenRef,
|
|
131
168
|
arrowDirection: newParsedDirection,
|
|
132
169
|
arrowLocation: newParsedLocation,
|
|
133
170
|
offsetSpacing,
|
|
134
|
-
|
|
171
|
+
tipRef
|
|
135
172
|
});
|
|
136
173
|
if (!result)
|
|
137
174
|
return;
|
|
@@ -142,26 +179,32 @@ const Tooltip = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
142
179
|
if (newArrowLocation !== arrowLocation) {
|
|
143
180
|
setArrowLocation(newArrowLocation);
|
|
144
181
|
}
|
|
145
|
-
|
|
146
|
-
}, 100);
|
|
147
|
-
const bindEvent = () => {
|
|
148
|
-
if (!controlByUser) {
|
|
149
|
-
document.addEventListener("click", clickEventHandler);
|
|
150
|
-
}
|
|
151
|
-
window.addEventListener("resize", onRootElementMouted);
|
|
152
|
-
};
|
|
153
|
-
const unbindEvent = () => {
|
|
154
|
-
if (!controlByUser) {
|
|
155
|
-
document.removeEventListener("click", clickEventHandler);
|
|
156
|
-
}
|
|
157
|
-
window.removeEventListener("resize", onRootElementMouted);
|
|
158
|
-
};
|
|
182
|
+
setToolStyles(styles);
|
|
183
|
+
}), 100);
|
|
159
184
|
(0, import_react.useEffect)(() => {
|
|
185
|
+
const bindEvent = () => {
|
|
186
|
+
if (!openStatus)
|
|
187
|
+
return;
|
|
188
|
+
if (!controlByUser) {
|
|
189
|
+
document.addEventListener("click", clickEventHandler);
|
|
190
|
+
}
|
|
191
|
+
if (!import_utils.isMini) {
|
|
192
|
+
window.addEventListener("resize", onRootElementMouted);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const unbindEvent = () => {
|
|
196
|
+
if (!controlByUser) {
|
|
197
|
+
document.removeEventListener("click", clickEventHandler);
|
|
198
|
+
}
|
|
199
|
+
if (!import_utils.isMini) {
|
|
200
|
+
window.removeEventListener("resize", onRootElementMouted);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
160
203
|
bindEvent();
|
|
161
204
|
return () => {
|
|
162
205
|
unbindEvent();
|
|
163
206
|
};
|
|
164
|
-
}, []);
|
|
207
|
+
}, [openStatus]);
|
|
165
208
|
let triggerEventOption;
|
|
166
209
|
if (!controlByUser) {
|
|
167
210
|
triggerEventOption = (0, import_utils.triggerEventTransform)({
|
|
@@ -174,12 +217,12 @@ const Tooltip = /* @__PURE__ */ import_react.default.forwardRef((props, ref) =>
|
|
|
174
217
|
const childrenOptions = __spreadValues({
|
|
175
218
|
ref: childrenRef
|
|
176
219
|
}, triggerEventOption);
|
|
177
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, (open || openStatus) && title ? /* @__PURE__ */ import_react.default.createElement(import_Portal.default, { onRootElementMouted
|
|
220
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, (open || openStatus) && title ? /* @__PURE__ */ import_react.default.createElement(import_Portal.default, { onRootElementMouted }, /* @__PURE__ */ import_react.default.createElement(
|
|
178
221
|
"div",
|
|
179
222
|
__spreadValues({
|
|
180
223
|
className: (0, import_clsx.default)(prefixCls, className, `tooltip-${arrowDirection}`),
|
|
181
|
-
style: __spreadValues(__spreadValues({}, style),
|
|
182
|
-
|
|
224
|
+
style: __spreadValues(__spreadValues({}, style), toolStyles),
|
|
225
|
+
ref: nodeRef
|
|
183
226
|
}, others),
|
|
184
227
|
/* @__PURE__ */ import_react.default.createElement(
|
|
185
228
|
"div",
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,11 @@ export * from './Calendar';
|
|
|
8
8
|
export * from './Card';
|
|
9
9
|
export * from './Checkbox';
|
|
10
10
|
export * from './Collapse';
|
|
11
|
+
export * from './DatePicker';
|
|
12
|
+
export * from './DesktopDatePicker';
|
|
13
|
+
export * from './DesktopTimePicker';
|
|
14
|
+
export * from './DesktopDateTimePicker';
|
|
15
|
+
export * from './DesktopPicker';
|
|
11
16
|
export * from './Divider';
|
|
12
17
|
export * from './Drawer';
|
|
13
18
|
export * from './Fade';
|
|
@@ -48,3 +53,4 @@ export * from './Toast';
|
|
|
48
53
|
export * from './Dialog';
|
|
49
54
|
export * from './ThemeProvider';
|
|
50
55
|
export * from './locales';
|
|
56
|
+
export * from './SwipeAction';
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,11 @@ __reExport(src_exports, require("./Calendar"), module.exports);
|
|
|
24
24
|
__reExport(src_exports, require("./Card"), module.exports);
|
|
25
25
|
__reExport(src_exports, require("./Checkbox"), module.exports);
|
|
26
26
|
__reExport(src_exports, require("./Collapse"), module.exports);
|
|
27
|
+
__reExport(src_exports, require("./DatePicker"), module.exports);
|
|
28
|
+
__reExport(src_exports, require("./DesktopDatePicker"), module.exports);
|
|
29
|
+
__reExport(src_exports, require("./DesktopTimePicker"), module.exports);
|
|
30
|
+
__reExport(src_exports, require("./DesktopDateTimePicker"), module.exports);
|
|
31
|
+
__reExport(src_exports, require("./DesktopPicker"), module.exports);
|
|
27
32
|
__reExport(src_exports, require("./Divider"), module.exports);
|
|
28
33
|
__reExport(src_exports, require("./Drawer"), module.exports);
|
|
29
34
|
__reExport(src_exports, require("./Fade"), module.exports);
|
|
@@ -64,6 +69,7 @@ __reExport(src_exports, require("./Toast"), module.exports);
|
|
|
64
69
|
__reExport(src_exports, require("./Dialog"), module.exports);
|
|
65
70
|
__reExport(src_exports, require("./ThemeProvider"), module.exports);
|
|
66
71
|
__reExport(src_exports, require("./locales"), module.exports);
|
|
72
|
+
__reExport(src_exports, require("./SwipeAction"), module.exports);
|
|
67
73
|
// Annotate the CommonJS export names for ESM import in node:
|
|
68
74
|
0 && (module.exports = {
|
|
69
75
|
...require("./ActionSheet"),
|
|
@@ -76,6 +82,11 @@ __reExport(src_exports, require("./locales"), module.exports);
|
|
|
76
82
|
...require("./Card"),
|
|
77
83
|
...require("./Checkbox"),
|
|
78
84
|
...require("./Collapse"),
|
|
85
|
+
...require("./DatePicker"),
|
|
86
|
+
...require("./DesktopDatePicker"),
|
|
87
|
+
...require("./DesktopTimePicker"),
|
|
88
|
+
...require("./DesktopDateTimePicker"),
|
|
89
|
+
...require("./DesktopPicker"),
|
|
79
90
|
...require("./Divider"),
|
|
80
91
|
...require("./Drawer"),
|
|
81
92
|
...require("./Fade"),
|
|
@@ -115,5 +126,6 @@ __reExport(src_exports, require("./locales"), module.exports);
|
|
|
115
126
|
...require("./Toast"),
|
|
116
127
|
...require("./Dialog"),
|
|
117
128
|
...require("./ThemeProvider"),
|
|
118
|
-
...require("./locales")
|
|
129
|
+
...require("./locales"),
|
|
130
|
+
...require("./SwipeAction")
|
|
119
131
|
});
|
package/dist/locales/base.d.ts
CHANGED
|
@@ -37,4 +37,15 @@ export interface BaseLang {
|
|
|
37
37
|
currentType?: Record<string, string>;
|
|
38
38
|
hotCityType?: Record<string, string>;
|
|
39
39
|
};
|
|
40
|
+
desktopDatePicker?: {
|
|
41
|
+
month?: Record<number, string>;
|
|
42
|
+
};
|
|
43
|
+
datePicker?: {
|
|
44
|
+
year: string;
|
|
45
|
+
month: string;
|
|
46
|
+
day: string;
|
|
47
|
+
hour: string;
|
|
48
|
+
minute: string;
|
|
49
|
+
second: string;
|
|
50
|
+
};
|
|
40
51
|
}
|
package/dist/locales/en-US.js
CHANGED
|
@@ -64,6 +64,30 @@ const enUS = {
|
|
|
64
64
|
title: "Hot",
|
|
65
65
|
code: "HOT"
|
|
66
66
|
}
|
|
67
|
+
},
|
|
68
|
+
desktopDatePicker: {
|
|
69
|
+
month: {
|
|
70
|
+
1: "Jan",
|
|
71
|
+
2: "Feb",
|
|
72
|
+
3: "Mar",
|
|
73
|
+
4: "Apr",
|
|
74
|
+
5: "May",
|
|
75
|
+
6: "Jun",
|
|
76
|
+
7: "Jul",
|
|
77
|
+
8: "Aug",
|
|
78
|
+
9: "Sep",
|
|
79
|
+
10: "Oct",
|
|
80
|
+
11: "Nov",
|
|
81
|
+
12: "Dec"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
datePicker: {
|
|
85
|
+
year: "Year",
|
|
86
|
+
month: "Month",
|
|
87
|
+
day: "Day",
|
|
88
|
+
hour: "Hour",
|
|
89
|
+
minute: "Minute",
|
|
90
|
+
second: "Second"
|
|
67
91
|
}
|
|
68
92
|
};
|
|
69
93
|
var en_US_default = enUS;
|
package/dist/locales/zh-CN.js
CHANGED
|
@@ -46,6 +46,30 @@ const zhCN = {
|
|
|
46
46
|
located: "\u5B9A\u4F4D",
|
|
47
47
|
current: "\u5F53\u524D",
|
|
48
48
|
hot: "\u70ED\u95E8"
|
|
49
|
+
},
|
|
50
|
+
desktopDatePicker: {
|
|
51
|
+
month: {
|
|
52
|
+
1: "1\u6708",
|
|
53
|
+
2: "2\u6708",
|
|
54
|
+
3: "3\u6708",
|
|
55
|
+
4: "4\u6708",
|
|
56
|
+
5: "5\u6708",
|
|
57
|
+
6: "6\u6708",
|
|
58
|
+
7: "7\u6708",
|
|
59
|
+
8: "8\u6708",
|
|
60
|
+
9: "9\u6708",
|
|
61
|
+
10: "10\u6708",
|
|
62
|
+
11: "11\u6708",
|
|
63
|
+
12: "12\u6708"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
datePicker: {
|
|
67
|
+
year: "\u5E74",
|
|
68
|
+
month: "\u6708",
|
|
69
|
+
day: "\u65E5",
|
|
70
|
+
hour: "\u65F6",
|
|
71
|
+
minute: "\u5206",
|
|
72
|
+
second: "\u79D2"
|
|
49
73
|
}
|
|
50
74
|
};
|
|
51
75
|
var zh_CN_default = zhCN;
|
package/dist/locales/zh-TW.js
CHANGED
|
@@ -46,6 +46,30 @@ const zhTW = {
|
|
|
46
46
|
located: "\u5B9A\u4F4D",
|
|
47
47
|
current: "\u76EE\u524D",
|
|
48
48
|
hot: "\u71B1\u9580"
|
|
49
|
+
},
|
|
50
|
+
desktopDatePicker: {
|
|
51
|
+
month: {
|
|
52
|
+
1: "1\u6708",
|
|
53
|
+
2: "2\u6708",
|
|
54
|
+
3: "3\u6708",
|
|
55
|
+
4: "4\u6708",
|
|
56
|
+
5: "5\u6708",
|
|
57
|
+
6: "6\u6708",
|
|
58
|
+
7: "7\u6708",
|
|
59
|
+
8: "8\u6708",
|
|
60
|
+
9: "9\u6708",
|
|
61
|
+
10: "10\u6708",
|
|
62
|
+
11: "11\u6708",
|
|
63
|
+
12: "12\u6708"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
datePicker: {
|
|
67
|
+
year: "\u5E74",
|
|
68
|
+
month: "\u6708",
|
|
69
|
+
day: "\u65E5",
|
|
70
|
+
hour: "\u6642",
|
|
71
|
+
minute: "\u5206",
|
|
72
|
+
second: "\u79D2"
|
|
49
73
|
}
|
|
50
74
|
};
|
|
51
75
|
var zh_TW_default = zhTW;
|
package/es/Calendar/Calendar.js
CHANGED
|
@@ -34,11 +34,13 @@ import { useDidMountEffect, useValue } from "@bifrostui/utils";
|
|
|
34
34
|
import clsx from "clsx";
|
|
35
35
|
import dayjs from "dayjs";
|
|
36
36
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
37
|
+
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
37
38
|
import React, { useMemo, useState } from "react";
|
|
38
39
|
import { formatDate, isRange, isSame } from "./utils";
|
|
39
40
|
import { useLocaleText } from "../locales";
|
|
40
41
|
import "./Calendar.css";
|
|
41
42
|
dayjs.extend(isoWeek);
|
|
43
|
+
dayjs.extend(customParseFormat);
|
|
42
44
|
const classes = {
|
|
43
45
|
root: "bui-calendar",
|
|
44
46
|
handler: "bui-calendar-handler",
|
|
@@ -61,6 +63,7 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
61
63
|
headerBarRightIcon,
|
|
62
64
|
disabledDate,
|
|
63
65
|
highlightDate,
|
|
66
|
+
headerVisible = false,
|
|
64
67
|
dateRender,
|
|
65
68
|
weekRender,
|
|
66
69
|
onMonthChange,
|
|
@@ -78,6 +81,7 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
78
81
|
"headerBarRightIcon",
|
|
79
82
|
"disabledDate",
|
|
80
83
|
"highlightDate",
|
|
84
|
+
"headerVisible",
|
|
81
85
|
"dateRender",
|
|
82
86
|
"weekRender",
|
|
83
87
|
"onMonthChange",
|
|
@@ -292,7 +296,7 @@ const Calendar = /* @__PURE__ */ React.forwardRef(
|
|
|
292
296
|
}, others), {
|
|
293
297
|
"data-mode": mode
|
|
294
298
|
}), data),
|
|
295
|
-
/* @__PURE__ */ React.createElement("div", { className: classes.handler }, /* @__PURE__ */ React.createElement("div", { onClick: onClickPrev, className: `${classes.handler}-btn` }, headerBarIcon.left), /* @__PURE__ */ React.createElement("div", { className: `${classes.handler}-text` }, dayjs(renderMonth).format(headerBarFormat)), /* @__PURE__ */ React.createElement("div", { onClick: onClickNext, className: `${classes.handler}-btn` }, headerBarIcon.right)),
|
|
299
|
+
!headerVisible && /* @__PURE__ */ React.createElement("div", { className: classes.handler }, /* @__PURE__ */ React.createElement("div", { onClick: onClickPrev, className: `${classes.handler}-btn` }, headerBarIcon.left), /* @__PURE__ */ React.createElement("div", { className: `${classes.handler}-text` }, dayjs(renderMonth).format(headerBarFormat)), /* @__PURE__ */ React.createElement("div", { onClick: onClickNext, className: `${classes.handler}-btn` }, headerBarIcon.right)),
|
|
296
300
|
/* @__PURE__ */ React.createElement("div", { className: classes.week }, SUNDAY_WEEK_DATA == null ? void 0 : SUNDAY_WEEK_DATA.map((w) => {
|
|
297
301
|
return weekRender ? weekRender(w) : /* @__PURE__ */ React.createElement("div", { key: w, className: `${classes.week}-item` }, w);
|
|
298
302
|
})),
|
package/es/Collapse/Collapse.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CollapseProps } from './Collapse.types';
|
|
3
3
|
import './Collapse.less';
|
|
4
|
-
declare const Collapse: React.ForwardRefExoticComponent<CollapseProps & React.RefAttributes<
|
|
4
|
+
declare const Collapse: React.ForwardRefExoticComponent<CollapseProps & React.RefAttributes<HTMLElement>>;
|
|
5
5
|
export default Collapse;
|