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.
Files changed (83) hide show
  1. package/dist/bitz-ui.mjs +126 -120
  2. package/dist/components/BitzFluentInput/index.mjs +17 -14
  3. package/dist/components/BitzFluentSelect/index.mjs +17 -15
  4. package/dist/components/BitzList/List.mjs +14 -0
  5. package/dist/components/BitzList/LoadMore.mjs +60 -0
  6. package/dist/components/BitzList/index.less.mjs +4 -0
  7. package/dist/components/BitzList/index.mjs +6 -0
  8. package/dist/components/BitzPullRefresh/PullRefresh.mjs +84 -0
  9. package/dist/components/BitzPullRefresh/index.mjs +6 -0
  10. package/dist/components/BitzPullRefresh/style/index.less.mjs +4 -0
  11. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +86 -74
  12. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +36 -0
  13. package/dist/components/BitzTable/ActionBar/Button.mjs +10 -0
  14. package/dist/components/BitzTable/ActionBar/index.mjs +6 -34
  15. package/dist/components/BitzTable/ActionBar/style.mjs +36 -27
  16. package/dist/components/BitzTable/ActionCol/index.mjs +18 -17
  17. package/dist/components/BitzTable/Table/index.mjs +154 -92
  18. package/dist/components/BitzTable/TableSkeleton/index.mjs +36 -32
  19. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +88 -99
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/DndItem.mjs +20 -18
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -8
  22. package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +7 -7
  23. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +13 -13
  24. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +5 -5
  25. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +7 -3
  26. package/dist/components/BitzTable/ToolBar/style.mjs +29 -20
  27. package/dist/hooks/use-event-listener.mjs +31 -0
  28. package/dist/hooks/use-lock-fn.mjs +18 -0
  29. package/dist/hooks/use-scroll-parent.mjs +32 -0
  30. package/dist/hooks/use-touch.mjs +33 -0
  31. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +751 -1050
  32. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs +16 -0
  33. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs +28 -0
  34. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs +6 -0
  35. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_Symbol.mjs +5 -0
  36. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs +11 -0
  37. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseTrim.mjs +9 -0
  38. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_freeGlobal.mjs +5 -0
  39. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_getRawTag.mjs +16 -0
  40. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_objectToString.mjs +8 -0
  41. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_root.mjs +5 -0
  42. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
  43. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +55 -0
  44. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObject.mjs +8 -0
  45. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObjectLike.mjs +7 -0
  46. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isSymbol.mjs +10 -0
  47. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/now.mjs +7 -0
  48. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/throttle.mjs +19 -0
  49. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/toNumber.mjs +23 -0
  50. package/dist/node_modules/.store/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +48 -37
  51. package/dist/node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs +23 -0
  52. package/dist/style.css +1 -1
  53. package/dist/type/bitz-ui.d.ts +2 -0
  54. package/dist/type/components/BitzList/List.d.ts +4 -0
  55. package/dist/type/components/BitzList/LoadMore.d.ts +4 -0
  56. package/dist/type/components/BitzList/PropsType.d.ts +35 -0
  57. package/dist/type/components/BitzList/index.d.ts +5 -0
  58. package/dist/type/components/BitzPagination/index.d.ts +8 -2
  59. package/dist/type/components/BitzPullRefresh/PropsType.d.ts +43 -0
  60. package/dist/type/components/BitzPullRefresh/PullRefresh.d.ts +4 -0
  61. package/dist/type/components/BitzPullRefresh/index.d.ts +5 -0
  62. package/dist/type/components/BitzSelect/component/BitzSelectMobile.d.ts +1 -0
  63. package/dist/type/components/BitzTable/ActionBar/ActionBar.d.ts +37 -0
  64. package/dist/type/components/BitzTable/ActionBar/Button.d.ts +6 -0
  65. package/dist/type/components/BitzTable/ActionBar/index.d.ts +6 -33
  66. package/dist/type/components/BitzTable/ActionBar/style.d.ts +2 -2
  67. package/dist/type/components/BitzTable/Store/index.d.ts +2 -3
  68. package/dist/type/components/BitzTable/Table/index.d.ts +2 -2
  69. package/dist/type/components/BitzTable/TableSkeleton/index.d.ts +1 -1
  70. package/dist/type/components/BitzTable/ToolBar/ExportIcon/index.d.ts +2 -1
  71. package/dist/type/components/BitzTable/ToolBar/style.d.ts +1 -2
  72. package/dist/type/components/BitzTable/index.d.ts +5 -1
  73. package/dist/type/hooks/use-event-listener.d.ts +11 -0
  74. package/dist/type/hooks/use-lock-fn.d.ts +2 -0
  75. package/dist/type/hooks/use-scroll-parent.d.ts +9 -0
  76. package/dist/type/hooks/use-touch.d.ts +18 -0
  77. package/dist/type/pages/Login2/useRowSelection.d.ts +6 -4
  78. package/dist/type/pages/Test/index.d.ts +3 -0
  79. package/dist/type/utils/get-default-props.d.ts +2 -0
  80. package/dist/type/utils/scroll.d.ts +6 -0
  81. package/dist/utils/get-default-props.mjs +12 -0
  82. package/dist/utils/scroll.mjs +15 -0
  83. package/package.json +2 -1
package/dist/bitz-ui.mjs CHANGED
@@ -1,122 +1,128 @@
1
- import { default as a } from "./components/BitzAddressBook/index.mjs";
2
- import { default as r } from "./components/BitzAddTag/index.mjs";
3
- import { default as i } from "./components/BitzAppPage/index.mjs";
4
- import { default as d } from "./components/BitzAppRefresh/index.mjs";
5
- import { default as s } from "./components/BitzBetterScroll/index.mjs";
6
- import { default as m } from "./components/BitzButton/index.mjs";
7
- import { default as z } from "./components/BitzCalendar/index.mjs";
8
- import { default as n } from "./components/BitzCascader/index.mjs";
9
- import { default as c } from "./components/BitzCollapse/index.mjs";
10
- import { ConfigProvider as C } from "antd";
11
- import { default as b } from "./components/BitzConfirmModal/index.mjs";
12
- import { default as L } from "./components/BitzConvert/index.mjs";
13
- import { default as P } from "./components/BitzDayJs/index.mjs";
14
- import { default as F } from "./components/BitzDescriptions/index.mjs";
15
- import { default as D } from "./components/BitzDrawer/index.mjs";
16
- import { default as R } from "./components/BitzEmpty/index.mjs";
17
- import { default as w } from "./components/BitzException/index.mjs";
18
- import { default as H } from "./components/BitzFloatLayout/index.mjs";
19
- import { default as N } from "./components/BitzFluentInput/index.mjs";
20
- import { default as Q } from "./components/BitzFluentSelect/index.mjs";
21
- import { default as W } from "./components/BitzFuiCalendar/index.mjs";
22
- import { default as j } from "./components/BitzFullScreen/index.mjs";
23
- import { default as G } from "./components/BitzHighlight/index.mjs";
24
- import { default as V } from "./components/BitzImage/index.mjs";
25
- import { default as Y } from "./components/BitzLanguageTabs/index.mjs";
26
- import { default as _ } from "./components/BitzLazyLoad/index.mjs";
27
- import { default as tt } from "./components/BitzLoadMore/index.mjs";
28
- import { default as at } from "./components/BitzLocalStorage/index.mjs";
29
- import { default as rt } from "./components/BitzMeetingTime/index.mjs";
30
- import { default as it } from "./components/BitzMobileLoading/index.mjs";
31
- import { default as dt } from "./components/BitzModal/index.mjs";
32
- import { default as st } from "./components/BitzNoData/index.mjs";
33
- import { default as mt } from "./components/BitzNoMore/index.mjs";
34
- import { default as zt } from "./components/BitzOrganizationSelection/index.mjs";
35
- import { default as nt } from "./components/BitzPageContainer/index.mjs";
36
- import { default as ct } from "./components/BitzPageHeader/index.mjs";
37
- import { default as Ct } from "./components/BitzPagination/index.mjs";
38
- import { default as bt } from "./components/BitzPopover/index.mjs";
39
- import { default as Lt } from "./components/BitzQRCode/index.mjs";
40
- import { default as Pt } from "./components/BitzQueryFilter/index.mjs";
41
- import { default as Ft } from "./components/BitzRefresh/index.mjs";
42
- import { default as Dt } from "./components/BitzRemark/index.mjs";
43
- import { default as Rt } from "./components/BitzScheduleCenter/index.mjs";
44
- import { default as wt } from "./components/BitzSearch/index.mjs";
45
- import { default as Ht } from "./components/BitzSelect/index.mjs";
46
- import { default as Nt } from "./components/BitzSkeleton/index.mjs";
47
- import { default as Qt } from "./components/BitzSwitch/index.mjs";
48
- import { default as Wt } from "./components/BitzTabbar/index.mjs";
49
- import { default as jt } from "./components/BitzTable/index.mjs";
50
- import { default as Gt } from "./components/BitzTableOperations/index.mjs";
51
- import { default as Vt } from "./components/BitzTableSelect/index.mjs";
52
- import { default as Yt } from "./components/BitzTag/index.mjs";
53
- import { default as _t } from "./components/BitzTimeline/index.mjs";
54
- import { BitzTimer as te } from "./components/BitzTimer/index.mjs";
55
- import { default as ae } from "./components/BitzToast/index.mjs";
56
- import { default as re } from "./components/BitzTree/index.mjs";
57
- import { default as ie } from "./components/BitzUeEditor/index.mjs";
58
- import { default as de } from "./components/BitzUpload/index.mjs";
59
- import { default as se } from "./components/BitzWebAppDrawer/index.mjs";
60
- import { default as me } from "./components/BitzWebAppModal/index.mjs";
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
- r as BitzAddTag,
63
- a as BitzAddressBook,
64
- i as BitzAppPage,
65
- d as BitzAppRefresh,
66
- s as BitzBetterScroll,
67
- m as BitzButton,
68
- z as BitzCalendar,
69
- n as BitzCascader,
70
- c as BitzCollapse,
71
- C as BitzConfigProvider,
72
- b as BitzConfirmModal,
73
- L as BitzConvert,
74
- P as BitzDayJs,
75
- F as BitzDescriptions,
76
- D as BitzDrawer,
77
- R as BitzEmpty,
78
- w as BitzException,
79
- H as BitzFloatLayout,
80
- N as BitzFluentInput,
81
- Q as BitzFluentSelect,
82
- W as BitzFuiCalendar,
83
- j as BitzFullScreen,
84
- G as BitzHighlight,
85
- V as BitzImage,
86
- Y as BitzLanguageTabs,
87
- _ as BitzLazyLoad,
88
- tt as BitzLoadMore,
89
- at as BitzLocalStorage,
90
- rt as BitzMeetingTime,
91
- it as BitzMobileLoading,
92
- dt as BitzModal,
93
- st as BitzNoData,
94
- mt as BitzNoMore,
95
- zt as BitzOrganizationSelection,
96
- nt as BitzPageContainer,
97
- ct as BitzPageHeader,
98
- Ct as BitzPagination,
99
- bt as BitzPopover,
100
- Lt as BitzQRCode,
101
- Pt as BitzQueryFilter,
102
- Ft as BitzRefresh,
103
- Dt as BitzRemark,
104
- Rt as BitzScheduleCenter,
105
- wt as BitzSearch,
106
- Ht as BitzSelect,
107
- Nt as BitzSkeleton,
108
- Qt as BitzSwitch,
109
- Wt as BitzTabbar,
110
- jt as BitzTable,
111
- Gt as BitzTableOperations,
112
- Vt as BitzTableSelect,
113
- Yt as BitzTag,
114
- _t as BitzTimeline,
115
- te as BitzTimer,
116
- ae as BitzToast,
117
- re as BitzTree,
118
- ie as BitzUeEditor,
119
- de as BitzUpload,
120
- se as BitzWebAppDrawer,
121
- me as BitzWebAppModal
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 t } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { css as n } from "../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
3
- import { Input as r } from "antd";
4
- const p = ({ placeholder: o, hideFluent: i, ...e }) => {
5
- const l = e.value, a = e.defaultValue;
6
- return i ? t.jsx(r, { allowClear: !0, placeholder: o, ...e }) : t.jsxs("div", { className: n`
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: -4%;
11
- background-color: #fff;
10
+ top: 0;
11
+ background-color: ${e.colorBgBase};
12
+ font-size: 10px;
13
+ color: ${e.colorText};
12
14
  }
13
15
  }
14
- `, children: [t.jsx(r, { allowClear: !0, ...e }), t.jsx("label", { className: n`
16
+ `, children: [l.jsx(a, { allowClear: !0, ...o }), l.jsx("label", { className: r`
15
17
  position: absolute;
16
- top: ${l || a ? "-4%" : "50%"};
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: ${l || a ? "10px" : "12px"};
26
- background-color: ${l || a ? "#fff" : "transparent"};
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: o })] });
32
+ `, children: n })] });
30
33
  };
31
34
  export {
32
- p as default
35
+ f as default
33
36
  };
@@ -1,21 +1,22 @@
1
- import { j as t } 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 { Select as i } from "antd";
4
- const d = ({ placeholder: o, hideFluent: n, ...e }) => {
5
- const l = e.value, a = e.defaultValue;
6
- return n ? t.jsx(i, { allowClear: !0, placeholder: o, ...e }) : t.jsxs("div", { className: r`
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: -4%;
11
- background-color: #fff;
10
+ top: 0;
11
+ background-color: ${e.colorBgBase};
12
+ font-size: 10px;
13
+ color: ${e.colorText};
12
14
  }
13
15
  }
14
- `, children: [t.jsx(i, { allowClear: !0, ...e }), t.jsx("label", { className: r`
16
+ `, children: [l.jsx(n, { allowClear: !0, ...o }), l.jsx("label", { className: a`
15
17
  position: absolute;
16
- top: ${l || a ? "-4%" : "50%"};
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: ${l || a ? "10px" : "12px"};
27
- background-color: ${l || a ? "#fff" : "transparent"};
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: o })] });
32
+ `, children: r })] });
31
33
  };
32
34
  export {
33
- d as default
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,4 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,6 @@
1
+ import "./index.less.mjs";
2
+ import r from "./List.mjs";
3
+ export {
4
+ r as List,
5
+ r as default
6
+ };
@@ -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
+ };
@@ -0,0 +1,6 @@
1
+ import "./style/index.less.mjs";
2
+ import o from "./PullRefresh.mjs";
3
+ export {
4
+ o as PullRefresh,
5
+ o as default
6
+ };
@@ -0,0 +1,4 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };