bitz-react-admin-ui 1.6.5 → 1.6.7

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 (84) hide show
  1. package/README.md +2 -2
  2. package/dist/bitz-ui.mjs +126 -120
  3. package/dist/components/BitzFluentInput/index.mjs +20 -17
  4. package/dist/components/BitzFluentSelect/index.mjs +20 -18
  5. package/dist/components/BitzList/List.mjs +28 -0
  6. package/dist/components/BitzList/LoadMore.mjs +69 -0
  7. package/dist/components/BitzList/index.less.mjs +4 -0
  8. package/dist/components/BitzList/index.mjs +6 -0
  9. package/dist/components/BitzPullRefresh/PullRefresh.mjs +113 -0
  10. package/dist/components/BitzPullRefresh/index.mjs +6 -0
  11. package/dist/components/BitzPullRefresh/style/index.less.mjs +4 -0
  12. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +133 -94
  13. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +64 -0
  14. package/dist/components/BitzTable/ActionBar/Button.mjs +10 -0
  15. package/dist/components/BitzTable/ActionBar/index.mjs +6 -60
  16. package/dist/components/BitzTable/ActionBar/style.mjs +36 -32
  17. package/dist/components/BitzTable/ActionCol/index.mjs +29 -28
  18. package/dist/components/BitzTable/Table/index.mjs +302 -253
  19. package/dist/components/BitzTable/TableSkeleton/index.mjs +46 -42
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +179 -173
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/DndItem.mjs +28 -26
  22. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +10 -9
  23. package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +1 -1
  24. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +28 -25
  25. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +3 -2
  26. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +23 -14
  27. package/dist/components/BitzTable/ToolBar/style.mjs +29 -20
  28. package/dist/hooks/use-event-listener.mjs +40 -0
  29. package/dist/hooks/use-lock-fn.mjs +21 -0
  30. package/dist/hooks/use-scroll-parent.mjs +34 -0
  31. package/dist/hooks/use-touch.mjs +33 -0
  32. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +751 -1050
  33. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs +16 -0
  34. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs +28 -0
  35. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs +6 -0
  36. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_Symbol.mjs +5 -0
  37. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs +11 -0
  38. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseTrim.mjs +9 -0
  39. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_freeGlobal.mjs +5 -0
  40. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_getRawTag.mjs +16 -0
  41. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_objectToString.mjs +8 -0
  42. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_root.mjs +5 -0
  43. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
  44. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +55 -0
  45. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObject.mjs +8 -0
  46. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObjectLike.mjs +7 -0
  47. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isSymbol.mjs +10 -0
  48. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/now.mjs +7 -0
  49. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/throttle.mjs +19 -0
  50. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/toNumber.mjs +23 -0
  51. package/dist/node_modules/.store/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +48 -37
  52. package/dist/node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs +23 -0
  53. package/dist/style.css +1 -1
  54. package/dist/type/bitz-ui.d.ts +2 -0
  55. package/dist/type/components/BitzList/List.d.ts +4 -0
  56. package/dist/type/components/BitzList/LoadMore.d.ts +4 -0
  57. package/dist/type/components/BitzList/PropsType.d.ts +35 -0
  58. package/dist/type/components/BitzList/index.d.ts +5 -0
  59. package/dist/type/components/BitzPagination/index.d.ts +8 -2
  60. package/dist/type/components/BitzPullRefresh/PropsType.d.ts +43 -0
  61. package/dist/type/components/BitzPullRefresh/PullRefresh.d.ts +4 -0
  62. package/dist/type/components/BitzPullRefresh/index.d.ts +5 -0
  63. package/dist/type/components/BitzSelect/component/BitzSelectMobile.d.ts +1 -0
  64. package/dist/type/components/BitzTable/ActionBar/ActionBar.d.ts +37 -0
  65. package/dist/type/components/BitzTable/ActionBar/Button.d.ts +6 -0
  66. package/dist/type/components/BitzTable/ActionBar/index.d.ts +6 -33
  67. package/dist/type/components/BitzTable/ActionBar/style.d.ts +2 -2
  68. package/dist/type/components/BitzTable/Store/index.d.ts +2 -3
  69. package/dist/type/components/BitzTable/Table/index.d.ts +2 -2
  70. package/dist/type/components/BitzTable/TableSkeleton/index.d.ts +1 -1
  71. package/dist/type/components/BitzTable/ToolBar/ExportIcon/index.d.ts +2 -1
  72. package/dist/type/components/BitzTable/ToolBar/style.d.ts +1 -2
  73. package/dist/type/components/BitzTable/index.d.ts +6 -7
  74. package/dist/type/hooks/use-event-listener.d.ts +11 -0
  75. package/dist/type/hooks/use-lock-fn.d.ts +2 -0
  76. package/dist/type/hooks/use-scroll-parent.d.ts +9 -0
  77. package/dist/type/hooks/use-touch.d.ts +18 -0
  78. package/dist/type/pages/Login2/useRowSelection.d.ts +6 -4
  79. package/dist/type/pages/Test/index.d.ts +3 -0
  80. package/dist/type/utils/get-default-props.d.ts +2 -0
  81. package/dist/type/utils/scroll.d.ts +6 -0
  82. package/dist/utils/get-default-props.mjs +12 -0
  83. package/dist/utils/scroll.mjs +15 -0
  84. package/package.json +2 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Bitz的Admin组件
2
2
 
3
3
  ## 引入方式
4
- import 'bitz-react-admin/dist/style.css'
5
- import { BitzTable } from 'bitz-react-admin'
4
+ import 'bitz-react-admin-ui/dist/style.css'
5
+ import { BitzTable } from 'bitz-react-admin-ui'
6
6
 
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,28 +1,30 @@
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 ? /* @__PURE__ */ t.jsx(r, { allowClear: !0, placeholder: o, ...e }) : /* @__PURE__ */ t.jsxs(
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 u, Input as n } from "antd";
4
+ const f = ({ placeholder: r, 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 ? /* @__PURE__ */ l.jsx(n, { allowClear: !0, placeholder: r, ...o }) : /* @__PURE__ */ l.jsxs(
7
7
  "div",
8
8
  {
9
- className: n`
9
+ className: a`
10
10
  position: relative;
11
11
  &:focus-within {
12
12
  label {
13
- top: -4%;
14
- background-color: #fff;
13
+ top: 0;
14
+ background-color: ${e.colorBgBase};
15
+ font-size: 10px;
16
+ color: ${e.colorText};
15
17
  }
16
18
  }
17
19
  `,
18
20
  children: [
19
- /* @__PURE__ */ t.jsx(r, { allowClear: !0, ...e }),
20
- /* @__PURE__ */ t.jsx(
21
+ /* @__PURE__ */ l.jsx(n, { allowClear: !0, ...o }),
22
+ /* @__PURE__ */ l.jsx(
21
23
  "label",
22
24
  {
23
- className: n`
25
+ className: a`
24
26
  position: absolute;
25
- top: ${l || a ? "-4%" : "50%"};
27
+ top: ${t ? 0 : "50%"};
26
28
  left: 10px;
27
29
  z-index: 10;
28
30
  white-space: nowrap;
@@ -31,12 +33,13 @@ const p = ({ placeholder: o, hideFluent: i, ...e }) => {
31
33
  transform: translateY(-50%);
32
34
  pointer-events: none;
33
35
  transition: all 0.1s ease-out;
34
- font-size: ${l || a ? "10px" : "12px"};
35
- background-color: ${l || a ? "#fff" : "transparent"};
36
+ font-size: ${t ? "10px" : "12px"};
37
+ background-color: ${t ? e.colorBgBase : "transparent"};
38
+ color: ${t ? e.colorText : e.colorTextPlaceholder};
36
39
  padding: 0 2px;
37
40
  border-radius: 2px;
38
41
  `,
39
- children: o
42
+ children: r
40
43
  }
41
44
  )
42
45
  ]
@@ -44,5 +47,5 @@ const p = ({ placeholder: o, hideFluent: i, ...e }) => {
44
47
  );
45
48
  };
46
49
  export {
47
- p as default
50
+ f as default
48
51
  };
@@ -1,30 +1,31 @@
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 x = ({ placeholder: o, hideFluent: n, ...e }) => {
5
- const l = e.value, a = e.defaultValue;
6
- return n ? /* @__PURE__ */ t.jsx(i, { allowClear: !0, placeholder: o, ...e }) : /* @__PURE__ */ t.jsxs(
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 x, Select as n } from "antd";
4
+ const p = ({ placeholder: r, hideFluent: s, ...o }) => {
5
+ const i = o.value, c = o.defaultValue, { token: e } = x.useToken(), t = i !== void 0 || c !== void 0;
6
+ return s ? /* @__PURE__ */ l.jsx(n, { allowClear: !0, placeholder: r, ...o }) : /* @__PURE__ */ l.jsxs(
7
7
  "div",
8
8
  {
9
- className: r`
9
+ className: a`
10
10
  position: relative;
11
11
  &:focus-within {
12
12
  label {
13
- top: -4%;
14
- background-color: #fff;
13
+ top: 0;
14
+ background-color: ${e.colorBgBase};
15
+ font-size: 10px;
16
+ color: ${e.colorText};
15
17
  }
16
18
  }
17
19
  `,
18
20
  children: [
19
- /* @__PURE__ */ t.jsx(i, { allowClear: !0, ...e }),
20
- /* @__PURE__ */ t.jsx(
21
+ /* @__PURE__ */ l.jsx(n, { allowClear: !0, ...o }),
22
+ /* @__PURE__ */ l.jsx(
21
23
  "label",
22
24
  {
23
- className: r`
25
+ className: a`
24
26
  position: absolute;
25
- top: ${l || a ? "-4%" : "50%"};
27
+ top: ${t ? 0 : "50%"};
26
28
  left: 10px;
27
- /* right: 10px; */
28
29
  z-index: 10;
29
30
  white-space: nowrap;
30
31
  overflow: hidden;
@@ -32,12 +33,13 @@ const x = ({ placeholder: o, hideFluent: n, ...e }) => {
32
33
  transform: translateY(-50%);
33
34
  pointer-events: none;
34
35
  transition: all 0.1s ease-out;
35
- font-size: ${l || a ? "10px" : "12px"};
36
- background-color: ${l || a ? "#fff" : "transparent"};
36
+ font-size: ${t ? "10px" : "12px"};
37
+ background-color: ${t ? e.colorBgBase : "transparent"};
38
+ color: ${t ? e.colorText : e.colorTextPlaceholder};
37
39
  padding: 0 2px;
38
40
  border-radius: 2px;
39
41
  `,
40
- children: o
42
+ children: r
41
43
  }
42
44
  )
43
45
  ]
@@ -45,5 +47,5 @@ const x = ({ placeholder: o, hideFluent: n, ...e }) => {
45
47
  );
46
48
  };
47
49
  export {
48
- x as default
50
+ p as default
49
51
  };
@@ -0,0 +1,28 @@
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((e, r) => {
7
+ const o = d(e, {
8
+ offset: 300
9
+ });
10
+ return /* @__PURE__ */ s.jsx(
11
+ f,
12
+ {
13
+ ref: r,
14
+ className: i(o.className),
15
+ style: o.style,
16
+ onLoad: o.onLoad,
17
+ threshold: o.offset,
18
+ finished: o.finished,
19
+ finishedText: o.finishedText,
20
+ loadingText: o.loadingText,
21
+ errorText: o.errorText,
22
+ children: o.children
23
+ }
24
+ );
25
+ });
26
+ export {
27
+ p as default
28
+ };
@@ -0,0 +1,69 @@
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(
22
+ async () => {
23
+ if (c.current !== m || e.finished || u)
24
+ return;
25
+ const n = l.current;
26
+ if (!n || !n.offsetParent)
27
+ return;
28
+ const r = L(n);
29
+ if (_(r), !r)
30
+ return;
31
+ const N = n.getBoundingClientRect().top;
32
+ if ((F(r) ? window.innerHeight : r.getBoundingClientRect().bottom) >= N - e.threshold) {
33
+ const p = {};
34
+ c.current = p, await f(!1), h(p);
35
+ }
36
+ },
37
+ {
38
+ wait: 100,
39
+ leading: !0,
40
+ trailing: !0
41
+ }
42
+ );
43
+ t.useEffect(() => {
44
+ a();
45
+ }), t.useEffect(() => {
46
+ if (!l.current || !i)
47
+ return;
48
+ function r() {
49
+ a();
50
+ }
51
+ return i.addEventListener("scroll", r), () => {
52
+ i.removeEventListener("scroll", r);
53
+ };
54
+ }, [i]);
55
+ async function g() {
56
+ d(!1), await f(!0), h(c.current);
57
+ }
58
+ const v = () => e.finishedText ? /* @__PURE__ */ s.jsx("div", { className: "bitz-list__finished", children: e.finishedText || "加载完成" }) : null, w = () => e.errorText ? typeof e.errorText == "function" ? e.errorText(g) : /* @__PURE__ */ s.jsx("div", { onClick: g, className: "bitz_error", children: e.errorText }) : null, T = () => /* @__PURE__ */ s.jsxs("div", { className: "bitz-list__loading", children: [
59
+ /* @__PURE__ */ s.jsx(E, { tip: "Loading", size: "small" }),
60
+ /* @__PURE__ */ s.jsx("div", { className: "bitz-list__loadingText", children: e.loadingText || "加载中..." })
61
+ ] }), j = () => e.finished ? v() : u ? w() : T();
62
+ return t.useImperativeHandle(R, () => ({ check: a })), /* @__PURE__ */ s.jsxs("div", { className: x(e.className, "bitz-list"), style: e.style, children: [
63
+ e.children,
64
+ /* @__PURE__ */ s.jsx("div", { className: x(e.className, "bitz-list__loadmore"), ref: l, children: j() })
65
+ ] });
66
+ });
67
+ export {
68
+ A as default
69
+ };
@@ -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,113 @@
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 = (v) => {
16
+ const e = C(v, {
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
+ }, l = D(() => s.status !== "loading" && s.status !== "success" && !m, [s.status, m]), y = (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 c = +(e.pullDistance || e.headHeight), a = { distance: t };
35
+ r ? a.status = "loading" : t === 0 ? a.status = "normal" : t < c ? a.status = "pulling" : a.status = "loosing", n(a);
36
+ }, T = () => s.status === "normal" ? "" : e[`${s.status}Text`] || G[s.status], E = () => {
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 c = [];
42
+ return F.includes(t) && c.push(
43
+ /* @__PURE__ */ f.jsx("div", { className: "bitz-pull-refresh__text", children: T() }, "text")
44
+ ), t === "loading" && c.push(
45
+ /* @__PURE__ */ f.jsx("div", { className: "bitz-pull-refresh__loading", children: T() })
46
+ ), c;
47
+ }, b = () => {
48
+ n({ status: "success" }), setTimeout(() => {
49
+ u(0);
50
+ }, +e.successDuration);
51
+ }, j = async () => {
52
+ try {
53
+ n({ refreshing: !0 }), await e.onRefresh(), n({ refreshing: !1 });
54
+ } catch {
55
+ n({ refreshing: !1 });
56
+ }
57
+ }, x = (t) => {
58
+ const r = Y(t.target);
59
+ i.current = P(r) === 0, i.current && (n({ duration: 0 }), o.start(t));
60
+ }, R = (t) => {
61
+ l() && x(t.nativeEvent);
62
+ }, N = D(
63
+ (t) => {
64
+ l() && (i.current || x(t), o.move(t), i.current && o.deltaY.current >= 0 && o.isVertical() ? (u(y(o.deltaY.current)), z(t)) : u(0));
65
+ },
66
+ // eslint-disable-next-line react-hooks/exhaustive-deps
67
+ [i.current, o.deltaY.current, l]
68
+ ), S = async () => {
69
+ i.current && o.deltaY && l() && (n({ duration: +g }), s.status === "loosing" ? (u(+e.headHeight, !0), await j(), setTimeout(() => {
70
+ var t;
71
+ return (t = e.onRefreshEnd) == null ? void 0 : t.call(e);
72
+ })) : u(0));
73
+ };
74
+ w("touchmove", N, {
75
+ target: p.current,
76
+ depends: [i.current, l(), o.deltaY]
77
+ }), M(() => {
78
+ n({ duration: +g }), s.refreshing ? u(+e.headHeight, !0) : e.successText ? b() : u(0, !1);
79
+ }, [s.refreshing]);
80
+ const $ = k(
81
+ () => ({
82
+ transitionDuration: `${s.duration}ms`,
83
+ transform: s.distance ? `translate3d(0,${s.distance}px, 0)` : ""
84
+ }),
85
+ [s.duration, s.distance]
86
+ );
87
+ return /* @__PURE__ */ f.jsx(
88
+ "div",
89
+ {
90
+ ref: H,
91
+ className: d(e.className, "bitz-pull-refresh"),
92
+ style: e.style,
93
+ children: /* @__PURE__ */ f.jsxs(
94
+ "div",
95
+ {
96
+ ref: p,
97
+ className: d("bitz-pull-refresh__track"),
98
+ style: $,
99
+ onTouchStart: R,
100
+ onTouchEnd: S,
101
+ onTouchCancel: S,
102
+ children: [
103
+ /* @__PURE__ */ f.jsx("div", { className: d("bitz-pull-refresh__head"), style: _(), children: E() }),
104
+ e.children
105
+ ]
106
+ }
107
+ )
108
+ }
109
+ );
110
+ };
111
+ export {
112
+ Z as default
113
+ };
@@ -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
+ };