bitz-react-admin-ui 1.6.6 → 1.6.8
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/bitz-ui.mjs +126 -120
- package/dist/components/BitzFluentInput/index.mjs +17 -14
- package/dist/components/BitzFluentSelect/index.mjs +17 -15
- package/dist/components/BitzList/List.mjs +14 -0
- package/dist/components/BitzList/LoadMore.mjs +60 -0
- package/dist/components/BitzList/index.less.mjs +4 -0
- package/dist/components/BitzList/index.mjs +6 -0
- package/dist/components/BitzPullRefresh/PullRefresh.mjs +84 -0
- package/dist/components/BitzPullRefresh/index.mjs +6 -0
- package/dist/components/BitzPullRefresh/style/index.less.mjs +4 -0
- package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +86 -74
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +36 -0
- package/dist/components/BitzTable/ActionBar/Button.mjs +10 -0
- package/dist/components/BitzTable/ActionBar/index.mjs +6 -34
- package/dist/components/BitzTable/ActionBar/style.mjs +36 -27
- package/dist/components/BitzTable/ActionCol/index.mjs +18 -17
- package/dist/components/BitzTable/Table/index.mjs +154 -92
- package/dist/components/BitzTable/TableSkeleton/index.mjs +36 -32
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +88 -99
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/DndItem.mjs +20 -18
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -8
- package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +7 -7
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +13 -13
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +5 -5
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +7 -3
- package/dist/components/BitzTable/ToolBar/style.mjs +29 -20
- package/dist/hooks/use-event-listener.mjs +31 -0
- package/dist/hooks/use-lock-fn.mjs +18 -0
- package/dist/hooks/use-scroll-parent.mjs +32 -0
- package/dist/hooks/use-touch.mjs +33 -0
- package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +751 -1050
- package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs +16 -0
- package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs +28 -0
- package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs +6 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_Symbol.mjs +5 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs +11 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseTrim.mjs +9 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_freeGlobal.mjs +5 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_getRawTag.mjs +16 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_objectToString.mjs +8 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_root.mjs +5 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +55 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObject.mjs +8 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObjectLike.mjs +7 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isSymbol.mjs +10 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/now.mjs +7 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/throttle.mjs +19 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/toNumber.mjs +23 -0
- package/dist/node_modules/.store/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +48 -37
- package/dist/node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs +23 -0
- package/dist/style.css +1 -1
- package/dist/type/bitz-ui.d.ts +2 -0
- package/dist/type/components/BitzList/List.d.ts +4 -0
- package/dist/type/components/BitzList/LoadMore.d.ts +4 -0
- package/dist/type/components/BitzList/PropsType.d.ts +35 -0
- package/dist/type/components/BitzList/index.d.ts +5 -0
- package/dist/type/components/BitzPagination/index.d.ts +8 -2
- package/dist/type/components/BitzPullRefresh/PropsType.d.ts +43 -0
- package/dist/type/components/BitzPullRefresh/PullRefresh.d.ts +4 -0
- package/dist/type/components/BitzPullRefresh/index.d.ts +5 -0
- package/dist/type/components/BitzSelect/component/BitzSelectMobile.d.ts +1 -0
- package/dist/type/components/BitzTable/ActionBar/ActionBar.d.ts +37 -0
- package/dist/type/components/BitzTable/ActionBar/Button.d.ts +6 -0
- package/dist/type/components/BitzTable/ActionBar/index.d.ts +6 -33
- package/dist/type/components/BitzTable/ActionBar/style.d.ts +2 -2
- package/dist/type/components/BitzTable/Store/index.d.ts +2 -3
- package/dist/type/components/BitzTable/Table/index.d.ts +2 -2
- package/dist/type/components/BitzTable/TableSkeleton/index.d.ts +1 -1
- package/dist/type/components/BitzTable/ToolBar/ExportIcon/index.d.ts +2 -1
- package/dist/type/components/BitzTable/ToolBar/style.d.ts +1 -2
- package/dist/type/components/BitzTable/index.d.ts +5 -1
- package/dist/type/hooks/use-event-listener.d.ts +11 -0
- package/dist/type/hooks/use-lock-fn.d.ts +2 -0
- package/dist/type/hooks/use-scroll-parent.d.ts +9 -0
- package/dist/type/hooks/use-touch.d.ts +18 -0
- package/dist/type/pages/Login2/useRowSelection.d.ts +6 -4
- package/dist/type/pages/Test/index.d.ts +3 -0
- package/dist/type/utils/get-default-props.d.ts +2 -0
- package/dist/type/utils/scroll.d.ts +6 -0
- package/dist/utils/get-default-props.mjs +12 -0
- package/dist/utils/scroll.mjs +15 -0
- package/package.json +2 -1
package/dist/bitz-ui.mjs
CHANGED
|
@@ -1,122 +1,128 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { ConfigProvider as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import
|
|
28
|
-
import { default as at } from "./components/
|
|
29
|
-
import { default as rt } from "./components/
|
|
30
|
-
import { default as it } from "./components/
|
|
31
|
-
import { default as dt } from "./components/
|
|
32
|
-
import { default as st } from "./components/
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as zt } from "./components/
|
|
35
|
-
import { default as nt } from "./components/
|
|
36
|
-
import { default as ct } from "./components/
|
|
37
|
-
import { default as Ct } from "./components/
|
|
38
|
-
import { default as bt } from "./components/
|
|
39
|
-
import { default as Lt } from "./components/
|
|
40
|
-
import { default as
|
|
41
|
-
import
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import {
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import {
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
1
|
+
import { default as r } from "./components/BitzAddressBook/index.mjs";
|
|
2
|
+
import { default as i } from "./components/BitzAddTag/index.mjs";
|
|
3
|
+
import { default as d } from "./components/BitzAppPage/index.mjs";
|
|
4
|
+
import { default as s } from "./components/BitzAppRefresh/index.mjs";
|
|
5
|
+
import { default as u } from "./components/BitzBetterScroll/index.mjs";
|
|
6
|
+
import { default as z } from "./components/BitzButton/index.mjs";
|
|
7
|
+
import { default as n } from "./components/BitzCalendar/index.mjs";
|
|
8
|
+
import { default as c } from "./components/BitzCascader/index.mjs";
|
|
9
|
+
import { default as C } from "./components/BitzCollapse/index.mjs";
|
|
10
|
+
import { ConfigProvider as b } from "antd";
|
|
11
|
+
import { default as L } from "./components/BitzConfirmModal/index.mjs";
|
|
12
|
+
import { default as M } from "./components/BitzConvert/index.mjs";
|
|
13
|
+
import { default as F } from "./components/BitzDayJs/index.mjs";
|
|
14
|
+
import { default as D } from "./components/BitzDescriptions/index.mjs";
|
|
15
|
+
import { default as v } from "./components/BitzDrawer/index.mjs";
|
|
16
|
+
import { default as w } from "./components/BitzEmpty/index.mjs";
|
|
17
|
+
import { default as H } from "./components/BitzException/index.mjs";
|
|
18
|
+
import { default as N } from "./components/BitzFloatLayout/index.mjs";
|
|
19
|
+
import { default as Q } from "./components/BitzFluentInput/index.mjs";
|
|
20
|
+
import { default as W } from "./components/BitzFluentSelect/index.mjs";
|
|
21
|
+
import { default as j } from "./components/BitzFuiCalendar/index.mjs";
|
|
22
|
+
import { default as G } from "./components/BitzFullScreen/index.mjs";
|
|
23
|
+
import { default as V } from "./components/BitzHighlight/index.mjs";
|
|
24
|
+
import { default as Y } from "./components/BitzImage/index.mjs";
|
|
25
|
+
import { default as _ } from "./components/BitzLanguageTabs/index.mjs";
|
|
26
|
+
import { default as tt } from "./components/BitzLazyLoad/index.mjs";
|
|
27
|
+
import "./components/BitzList/index.less.mjs";
|
|
28
|
+
import { default as at } from "./components/BitzList/List.mjs";
|
|
29
|
+
import { default as rt } from "./components/BitzLoadMore/index.mjs";
|
|
30
|
+
import { default as it } from "./components/BitzLocalStorage/index.mjs";
|
|
31
|
+
import { default as dt } from "./components/BitzMeetingTime/index.mjs";
|
|
32
|
+
import { default as st } from "./components/BitzMobileLoading/index.mjs";
|
|
33
|
+
import { default as ut } from "./components/BitzModal/index.mjs";
|
|
34
|
+
import { default as zt } from "./components/BitzNoData/index.mjs";
|
|
35
|
+
import { default as nt } from "./components/BitzNoMore/index.mjs";
|
|
36
|
+
import { default as ct } from "./components/BitzOrganizationSelection/index.mjs";
|
|
37
|
+
import { default as Ct } from "./components/BitzPageContainer/index.mjs";
|
|
38
|
+
import { default as bt } from "./components/BitzPageHeader/index.mjs";
|
|
39
|
+
import { default as Lt } from "./components/BitzPagination/index.mjs";
|
|
40
|
+
import { default as Mt } from "./components/BitzPopover/index.mjs";
|
|
41
|
+
import "./components/BitzPullRefresh/style/index.less.mjs";
|
|
42
|
+
import { default as Ft } from "./components/BitzPullRefresh/PullRefresh.mjs";
|
|
43
|
+
import { default as Dt } from "./components/BitzQRCode/index.mjs";
|
|
44
|
+
import { default as vt } from "./components/BitzQueryFilter/index.mjs";
|
|
45
|
+
import { default as wt } from "./components/BitzRefresh/index.mjs";
|
|
46
|
+
import { default as Ht } from "./components/BitzRemark/index.mjs";
|
|
47
|
+
import { default as Nt } from "./components/BitzScheduleCenter/index.mjs";
|
|
48
|
+
import { default as Qt } from "./components/BitzSearch/index.mjs";
|
|
49
|
+
import { default as Wt } from "./components/BitzSelect/index.mjs";
|
|
50
|
+
import { default as jt } from "./components/BitzSkeleton/index.mjs";
|
|
51
|
+
import { default as Gt } from "./components/BitzSwitch/index.mjs";
|
|
52
|
+
import { default as Vt } from "./components/BitzTabbar/index.mjs";
|
|
53
|
+
import { default as Yt } from "./components/BitzTable/index.mjs";
|
|
54
|
+
import { default as _t } from "./components/BitzTableOperations/index.mjs";
|
|
55
|
+
import { default as te } from "./components/BitzTableSelect/index.mjs";
|
|
56
|
+
import { default as ae } from "./components/BitzTag/index.mjs";
|
|
57
|
+
import { default as re } from "./components/BitzTimeline/index.mjs";
|
|
58
|
+
import { BitzTimer as ie } from "./components/BitzTimer/index.mjs";
|
|
59
|
+
import { default as de } from "./components/BitzToast/index.mjs";
|
|
60
|
+
import { default as se } from "./components/BitzTree/index.mjs";
|
|
61
|
+
import { default as ue } from "./components/BitzUeEditor/index.mjs";
|
|
62
|
+
import { default as ze } from "./components/BitzUpload/index.mjs";
|
|
63
|
+
import { default as ne } from "./components/BitzWebAppDrawer/index.mjs";
|
|
64
|
+
import { default as ce } from "./components/BitzWebAppModal/index.mjs";
|
|
61
65
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
66
|
+
i as BitzAddTag,
|
|
67
|
+
r as BitzAddressBook,
|
|
68
|
+
d as BitzAppPage,
|
|
69
|
+
s as BitzAppRefresh,
|
|
70
|
+
u as BitzBetterScroll,
|
|
71
|
+
z as BitzButton,
|
|
72
|
+
n as BitzCalendar,
|
|
73
|
+
c as BitzCascader,
|
|
74
|
+
C as BitzCollapse,
|
|
75
|
+
b as BitzConfigProvider,
|
|
76
|
+
L as BitzConfirmModal,
|
|
77
|
+
M as BitzConvert,
|
|
78
|
+
F as BitzDayJs,
|
|
79
|
+
D as BitzDescriptions,
|
|
80
|
+
v as BitzDrawer,
|
|
81
|
+
w as BitzEmpty,
|
|
82
|
+
H as BitzException,
|
|
83
|
+
N as BitzFloatLayout,
|
|
84
|
+
Q as BitzFluentInput,
|
|
85
|
+
W as BitzFluentSelect,
|
|
86
|
+
j as BitzFuiCalendar,
|
|
87
|
+
G as BitzFullScreen,
|
|
88
|
+
V as BitzHighlight,
|
|
89
|
+
Y as BitzImage,
|
|
90
|
+
_ as BitzLanguageTabs,
|
|
91
|
+
tt as BitzLazyLoad,
|
|
92
|
+
at as BitzList,
|
|
93
|
+
rt as BitzLoadMore,
|
|
94
|
+
it as BitzLocalStorage,
|
|
95
|
+
dt as BitzMeetingTime,
|
|
96
|
+
st as BitzMobileLoading,
|
|
97
|
+
ut as BitzModal,
|
|
98
|
+
zt as BitzNoData,
|
|
99
|
+
nt as BitzNoMore,
|
|
100
|
+
ct as BitzOrganizationSelection,
|
|
101
|
+
Ct as BitzPageContainer,
|
|
102
|
+
bt as BitzPageHeader,
|
|
103
|
+
Lt as BitzPagination,
|
|
104
|
+
Mt as BitzPopover,
|
|
105
|
+
Ft as BitzPullRefresh,
|
|
106
|
+
Dt as BitzQRCode,
|
|
107
|
+
vt as BitzQueryFilter,
|
|
108
|
+
wt as BitzRefresh,
|
|
109
|
+
Ht as BitzRemark,
|
|
110
|
+
Nt as BitzScheduleCenter,
|
|
111
|
+
Qt as BitzSearch,
|
|
112
|
+
Wt as BitzSelect,
|
|
113
|
+
jt as BitzSkeleton,
|
|
114
|
+
Gt as BitzSwitch,
|
|
115
|
+
Vt as BitzTabbar,
|
|
116
|
+
Yt as BitzTable,
|
|
117
|
+
_t as BitzTableOperations,
|
|
118
|
+
te as BitzTableSelect,
|
|
119
|
+
ae as BitzTag,
|
|
120
|
+
re as BitzTimeline,
|
|
121
|
+
ie as BitzTimer,
|
|
122
|
+
de as BitzToast,
|
|
123
|
+
se as BitzTree,
|
|
124
|
+
ue as BitzUeEditor,
|
|
125
|
+
ze as BitzUpload,
|
|
126
|
+
ne as BitzWebAppDrawer,
|
|
127
|
+
ce as BitzWebAppModal
|
|
122
128
|
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { css as
|
|
3
|
-
import { Input as
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
return
|
|
1
|
+
import { j as l } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { css as r } from "../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
|
|
3
|
+
import { theme as u, Input as a } from "antd";
|
|
4
|
+
const f = ({ placeholder: n, hideFluent: s, ...o }) => {
|
|
5
|
+
const i = o.value, c = o.defaultValue, { token: e } = u.useToken(), t = i !== void 0 || c !== void 0;
|
|
6
|
+
return s ? l.jsx(a, { allowClear: !0, placeholder: n, ...o }) : l.jsxs("div", { className: r`
|
|
7
7
|
position: relative;
|
|
8
8
|
&:focus-within {
|
|
9
9
|
label {
|
|
10
|
-
top:
|
|
11
|
-
background-color:
|
|
10
|
+
top: 0;
|
|
11
|
+
background-color: ${e.colorBgBase};
|
|
12
|
+
font-size: 10px;
|
|
13
|
+
color: ${e.colorText};
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
|
-
`, children: [
|
|
16
|
+
`, children: [l.jsx(a, { allowClear: !0, ...o }), l.jsx("label", { className: r`
|
|
15
17
|
position: absolute;
|
|
16
|
-
top: ${
|
|
18
|
+
top: ${t ? 0 : "50%"};
|
|
17
19
|
left: 10px;
|
|
18
20
|
z-index: 10;
|
|
19
21
|
white-space: nowrap;
|
|
@@ -22,12 +24,13 @@ const p = ({ placeholder: o, hideFluent: i, ...e }) => {
|
|
|
22
24
|
transform: translateY(-50%);
|
|
23
25
|
pointer-events: none;
|
|
24
26
|
transition: all 0.1s ease-out;
|
|
25
|
-
font-size: ${
|
|
26
|
-
background-color: ${
|
|
27
|
+
font-size: ${t ? "10px" : "12px"};
|
|
28
|
+
background-color: ${t ? e.colorBgBase : "transparent"};
|
|
29
|
+
color: ${t ? e.colorText : e.colorTextPlaceholder};
|
|
27
30
|
padding: 0 2px;
|
|
28
31
|
border-radius: 2px;
|
|
29
|
-
`, children:
|
|
32
|
+
`, children: n })] });
|
|
30
33
|
};
|
|
31
34
|
export {
|
|
32
|
-
|
|
35
|
+
f as default
|
|
33
36
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { css as
|
|
3
|
-
import { Select as
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
return
|
|
1
|
+
import { j as l } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { css as a } from "../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
|
|
3
|
+
import { theme as d, Select as n } from "antd";
|
|
4
|
+
const p = ({ placeholder: r, hideFluent: s, ...o }) => {
|
|
5
|
+
const i = o.value, c = o.defaultValue, { token: e } = d.useToken(), t = i !== void 0 || c !== void 0;
|
|
6
|
+
return s ? l.jsx(n, { allowClear: !0, placeholder: r, ...o }) : l.jsxs("div", { className: a`
|
|
7
7
|
position: relative;
|
|
8
8
|
&:focus-within {
|
|
9
9
|
label {
|
|
10
|
-
top:
|
|
11
|
-
background-color:
|
|
10
|
+
top: 0;
|
|
11
|
+
background-color: ${e.colorBgBase};
|
|
12
|
+
font-size: 10px;
|
|
13
|
+
color: ${e.colorText};
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
|
-
`, children: [
|
|
16
|
+
`, children: [l.jsx(n, { allowClear: !0, ...o }), l.jsx("label", { className: a`
|
|
15
17
|
position: absolute;
|
|
16
|
-
top: ${
|
|
18
|
+
top: ${t ? 0 : "50%"};
|
|
17
19
|
left: 10px;
|
|
18
|
-
/* right: 10px; */
|
|
19
20
|
z-index: 10;
|
|
20
21
|
white-space: nowrap;
|
|
21
22
|
overflow: hidden;
|
|
@@ -23,12 +24,13 @@ const d = ({ placeholder: o, hideFluent: n, ...e }) => {
|
|
|
23
24
|
transform: translateY(-50%);
|
|
24
25
|
pointer-events: none;
|
|
25
26
|
transition: all 0.1s ease-out;
|
|
26
|
-
font-size: ${
|
|
27
|
-
background-color: ${
|
|
27
|
+
font-size: ${t ? "10px" : "12px"};
|
|
28
|
+
background-color: ${t ? e.colorBgBase : "transparent"};
|
|
29
|
+
color: ${t ? e.colorText : e.colorTextPlaceholder};
|
|
28
30
|
padding: 0 2px;
|
|
29
31
|
border-radius: 2px;
|
|
30
|
-
`, children:
|
|
32
|
+
`, children: r })] });
|
|
31
33
|
};
|
|
32
34
|
export {
|
|
33
|
-
|
|
35
|
+
p as default
|
|
34
36
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { j as s } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { clsx as i } from "../../node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs";
|
|
4
|
+
import f from "./LoadMore.mjs";
|
|
5
|
+
import { mergeProps as d } from "../../utils/get-default-props.mjs";
|
|
6
|
+
const p = t((o, r) => {
|
|
7
|
+
const e = d(o, {
|
|
8
|
+
offset: 300
|
|
9
|
+
});
|
|
10
|
+
return s.jsx(f, { ref: r, className: i(e.className), style: e.style, onLoad: e.onLoad, threshold: e.offset, finished: e.finished, finishedText: e.finishedText, loadingText: e.loadingText, errorText: e.errorText, children: e.children });
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
p as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { j as s } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import x from "../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
4
|
+
import y from "../../hooks/use-lock-fn.mjs";
|
|
5
|
+
import { getScrollParent as L } from "../../hooks/use-scroll-parent.mjs";
|
|
6
|
+
import b from "../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs";
|
|
7
|
+
import { mergeProps as z } from "../../utils/get-default-props.mjs";
|
|
8
|
+
import { Spin as E } from "antd";
|
|
9
|
+
function F(o) {
|
|
10
|
+
return o === window;
|
|
11
|
+
}
|
|
12
|
+
const A = t.forwardRef((o, R) => {
|
|
13
|
+
const e = z(o, {
|
|
14
|
+
threshold: 300
|
|
15
|
+
}), [u, d] = t.useState(!1), f = y(async (n) => {
|
|
16
|
+
try {
|
|
17
|
+
await e.onLoad(n);
|
|
18
|
+
} catch {
|
|
19
|
+
d(!0);
|
|
20
|
+
}
|
|
21
|
+
}), l = t.useRef(null), [m, h] = t.useState({}), c = t.useRef(m), [i, _] = t.useState(), { run: a } = b(async () => {
|
|
22
|
+
if (c.current !== m || e.finished || u)
|
|
23
|
+
return;
|
|
24
|
+
const n = l.current;
|
|
25
|
+
if (!n || !n.offsetParent)
|
|
26
|
+
return;
|
|
27
|
+
const r = L(n);
|
|
28
|
+
if (_(r), !r)
|
|
29
|
+
return;
|
|
30
|
+
const N = n.getBoundingClientRect().top;
|
|
31
|
+
if ((F(r) ? window.innerHeight : r.getBoundingClientRect().bottom) >= N - e.threshold) {
|
|
32
|
+
const p = {};
|
|
33
|
+
c.current = p, await f(!1), h(p);
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
wait: 100,
|
|
37
|
+
leading: !0,
|
|
38
|
+
trailing: !0
|
|
39
|
+
});
|
|
40
|
+
t.useEffect(() => {
|
|
41
|
+
a();
|
|
42
|
+
}), t.useEffect(() => {
|
|
43
|
+
if (!l.current || !i)
|
|
44
|
+
return;
|
|
45
|
+
function r() {
|
|
46
|
+
a();
|
|
47
|
+
}
|
|
48
|
+
return i.addEventListener("scroll", r), () => {
|
|
49
|
+
i.removeEventListener("scroll", r);
|
|
50
|
+
};
|
|
51
|
+
}, [i]);
|
|
52
|
+
async function g() {
|
|
53
|
+
d(!1), await f(!0), h(c.current);
|
|
54
|
+
}
|
|
55
|
+
const v = () => e.finishedText ? s.jsx("div", { className: "bitz-list__finished", children: e.finishedText || "加载完成" }) : null, w = () => e.errorText ? typeof e.errorText == "function" ? e.errorText(g) : s.jsx("div", { onClick: g, className: "bitz_error", children: e.errorText }) : null, T = () => s.jsxs("div", { className: "bitz-list__loading", children: [s.jsx(E, { tip: "Loading", size: "small" }), s.jsx("div", { className: "bitz-list__loadingText", children: e.loadingText || "加载中..." })] }), j = () => e.finished ? v() : u ? w() : T();
|
|
56
|
+
return t.useImperativeHandle(R, () => ({ check: a })), s.jsxs("div", { className: x(e.className, "bitz-list"), style: e.style, children: [e.children, s.jsx("div", { className: x(e.className, "bitz-list__loadmore"), ref: l, children: j() })] });
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
A as default
|
|
60
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { j as f } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { useRef as h, useCallback as D, useMemo as k } from "react";
|
|
3
|
+
import { clsx as d } from "../../node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs";
|
|
4
|
+
import { preventDefault as z, getScrollTop as P } from "../../utils/scroll.mjs";
|
|
5
|
+
import { getScrollParent as Y } from "../../hooks/use-scroll-parent.mjs";
|
|
6
|
+
import w from "../../hooks/use-event-listener.mjs";
|
|
7
|
+
import A from "../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs";
|
|
8
|
+
import M from "../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs";
|
|
9
|
+
import U from "../../hooks/use-touch.mjs";
|
|
10
|
+
import { mergeProps as C } from "../../utils/get-default-props.mjs";
|
|
11
|
+
const L = 50, F = ["pulling", "loosing", "success"], G = {
|
|
12
|
+
pulling: "下拉即可刷新...",
|
|
13
|
+
loosing: "释放即可刷新...",
|
|
14
|
+
loading: "加载中..."
|
|
15
|
+
}, Z = (E) => {
|
|
16
|
+
const e = C(E, {
|
|
17
|
+
headHeight: 50,
|
|
18
|
+
animationDuration: 300,
|
|
19
|
+
successDuration: 500
|
|
20
|
+
}), { disabled: m, animationDuration: g } = e, H = h(null), [s, n] = A({
|
|
21
|
+
refreshing: !1,
|
|
22
|
+
status: "normal",
|
|
23
|
+
distance: 0,
|
|
24
|
+
duration: 0
|
|
25
|
+
}), p = h(null), i = h(null), o = U(), _ = () => {
|
|
26
|
+
if (e.headHeight !== L)
|
|
27
|
+
return {
|
|
28
|
+
height: `${e.headHeight}px`
|
|
29
|
+
};
|
|
30
|
+
}, c = D(() => s.status !== "loading" && s.status !== "success" && !m, [s.status, m]), v = (t) => {
|
|
31
|
+
const r = +(e.pullDistance || e.headHeight);
|
|
32
|
+
return t > r && (t < r * 2 ? t = r + (t - r) / 2 : t = r * 1.5 + (t - r * 2) / 4), Math.round(t);
|
|
33
|
+
}, u = (t, r) => {
|
|
34
|
+
const l = +(e.pullDistance || e.headHeight), a = { distance: t };
|
|
35
|
+
r ? a.status = "loading" : t === 0 ? a.status = "normal" : t < l ? a.status = "pulling" : a.status = "loosing", n(a);
|
|
36
|
+
}, T = () => s.status === "normal" ? "" : e[`${s.status}Text`] || G[s.status], y = () => {
|
|
37
|
+
var a;
|
|
38
|
+
const { status: t, distance: r } = s;
|
|
39
|
+
if (typeof e[`${s.status}Text`] == "function")
|
|
40
|
+
return (a = e[`${s.status}Text`]) == null ? void 0 : a.call(e, { distance: r });
|
|
41
|
+
const l = [];
|
|
42
|
+
return F.includes(t) && l.push(f.jsx("div", { className: "bitz-pull-refresh__text", children: T() }, "text")), t === "loading" && l.push(f.jsx("div", { className: "bitz-pull-refresh__loading", children: T() })), l;
|
|
43
|
+
}, b = () => {
|
|
44
|
+
n({ status: "success" }), setTimeout(() => {
|
|
45
|
+
u(0);
|
|
46
|
+
}, +e.successDuration);
|
|
47
|
+
}, j = async () => {
|
|
48
|
+
try {
|
|
49
|
+
n({ refreshing: !0 }), await e.onRefresh(), n({ refreshing: !1 });
|
|
50
|
+
} catch {
|
|
51
|
+
n({ refreshing: !1 });
|
|
52
|
+
}
|
|
53
|
+
}, x = (t) => {
|
|
54
|
+
const r = Y(t.target);
|
|
55
|
+
i.current = P(r) === 0, i.current && (n({ duration: 0 }), o.start(t));
|
|
56
|
+
}, R = (t) => {
|
|
57
|
+
c() && x(t.nativeEvent);
|
|
58
|
+
}, N = D(
|
|
59
|
+
(t) => {
|
|
60
|
+
c() && (i.current || x(t), o.move(t), i.current && o.deltaY.current >= 0 && o.isVertical() ? (u(v(o.deltaY.current)), z(t)) : u(0));
|
|
61
|
+
},
|
|
62
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
63
|
+
[i.current, o.deltaY.current, c]
|
|
64
|
+
), S = async () => {
|
|
65
|
+
i.current && o.deltaY && c() && (n({ duration: +g }), s.status === "loosing" ? (u(+e.headHeight, !0), await j(), setTimeout(() => {
|
|
66
|
+
var t;
|
|
67
|
+
return (t = e.onRefreshEnd) == null ? void 0 : t.call(e);
|
|
68
|
+
})) : u(0));
|
|
69
|
+
};
|
|
70
|
+
w("touchmove", N, {
|
|
71
|
+
target: p.current,
|
|
72
|
+
depends: [i.current, c(), o.deltaY]
|
|
73
|
+
}), M(() => {
|
|
74
|
+
n({ duration: +g }), s.refreshing ? u(+e.headHeight, !0) : e.successText ? b() : u(0, !1);
|
|
75
|
+
}, [s.refreshing]);
|
|
76
|
+
const $ = k(() => ({
|
|
77
|
+
transitionDuration: `${s.duration}ms`,
|
|
78
|
+
transform: s.distance ? `translate3d(0,${s.distance}px, 0)` : ""
|
|
79
|
+
}), [s.duration, s.distance]);
|
|
80
|
+
return f.jsx("div", { ref: H, className: d(e.className, "bitz-pull-refresh"), style: e.style, children: f.jsxs("div", { ref: p, className: d("bitz-pull-refresh__track"), style: $, onTouchStart: R, onTouchEnd: S, onTouchCancel: S, children: [f.jsx("div", { className: d("bitz-pull-refresh__head"), style: _(), children: y() }), e.children] }) });
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
Z as default
|
|
84
|
+
};
|