@dckj-npm/dc-material 0.1.147 → 0.1.149

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 (276) hide show
  1. package/build/lowcode/assets-daily.json +13 -13
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +13 -13
  4. package/build/lowcode/meta.design.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.js +1 -1
  8. package/es/components/bottom-navigation/bottom-navigation.d.ts +15 -0
  9. package/es/components/bottom-navigation/index.d.ts +3 -0
  10. package/es/components/button/button.d.ts +14 -0
  11. package/es/components/button/index.d.ts +6 -0
  12. package/es/components/carousel/carousel.d.ts +14 -0
  13. package/es/components/colorful-button/colorful-button.d.ts +12 -0
  14. package/es/components/colorful-button/index.d.ts +3 -0
  15. package/es/components/colorful-input/colorful-input.d.ts +8 -0
  16. package/es/components/colorful-input/index.d.ts +3 -0
  17. package/es/components/form/form-item.d.ts +42 -0
  18. package/es/components/form/form.d.ts +57 -0
  19. package/es/components/form/form.js +46 -0
  20. package/es/components/form/index.d.ts +6 -0
  21. package/es/components/form/index.js +6 -0
  22. package/es/components/form/index.scss +22 -0
  23. package/es/components/form/next-wrapper.d.ts +54 -0
  24. package/es/components/form/next-wrapper.js +43 -0
  25. package/es/components/goods-card-list/goods-card-list-common.d.ts +5 -0
  26. package/es/components/goods-card-list/goods-card-list-common.js +60 -0
  27. package/es/components/goods-card-list/goods-card-list-common.scss +118 -0
  28. package/es/components/goods-card-list/goods-card-list.d.ts +5 -0
  29. package/es/components/goods-card-list/goods-card-list.js +156 -0
  30. package/es/components/goods-card-list/goods-card-list.scss +112 -0
  31. package/es/components/goods-card-list/index.d.ts +4 -0
  32. package/es/components/goods-card-list/index.js +3 -0
  33. package/es/components/goods-card-list/types.d.ts +45 -0
  34. package/es/components/goods-card-list/types.js +1 -0
  35. package/es/components/grid-nav/grid-nav.d.ts +13 -0
  36. package/es/components/grid-nav/grid-nav.js +102 -0
  37. package/es/components/grid-nav/index.d.ts +3 -0
  38. package/es/components/grid-nav/index.js +2 -0
  39. package/es/components/grid-nav/index.scss +50 -0
  40. package/es/components/integral-task/index.d.ts +6 -0
  41. package/es/components/integral-task/index.js +5 -0
  42. package/es/components/integral-task/index.scss +35 -0
  43. package/es/components/integral-task/integral-task.d.ts +40 -0
  44. package/es/components/integral-task/integral-task.js +54 -0
  45. package/es/components/menu-list/index.d.ts +6 -0
  46. package/es/components/menu-list/index.js +6 -0
  47. package/es/components/menu-list/index.scss +16 -0
  48. package/es/components/menu-list/menu-list-item.d.ts +5 -0
  49. package/es/components/menu-list/menu-list-item.js +32 -0
  50. package/es/components/menu-list/menu-list-item.scss +49 -0
  51. package/es/components/menu-list/menu-list.d.ts +5 -0
  52. package/es/components/menu-list/menu-list.js +25 -0
  53. package/es/components/menu-list/types.d.ts +23 -0
  54. package/es/components/menu-list/types.js +1 -0
  55. package/es/components/message-list/index.d.ts +6 -0
  56. package/es/components/message-list/index.js +6 -0
  57. package/es/components/message-list/index.scss +22 -0
  58. package/es/components/message-list/message-list-item.d.ts +33 -0
  59. package/es/components/message-list/message-list-item.js +41 -0
  60. package/es/components/message-list/message-list-item.scss +60 -0
  61. package/es/components/message-list/message-list.d.ts +28 -0
  62. package/es/components/message-list/message-list.js +53 -0
  63. package/es/components/notice-bar/index.d.ts +3 -0
  64. package/es/components/notice-bar/index.js +2 -0
  65. package/es/components/notice-bar/index.scss +84 -0
  66. package/es/components/notice-bar/notice-bar-item.d.ts +18 -0
  67. package/es/components/notice-bar/notice-bar-item.js +30 -0
  68. package/es/components/notice-bar/notice-bar-item.scss +26 -0
  69. package/es/components/notice-bar/notice-bar.d.ts +46 -0
  70. package/es/components/notice-bar/notice-bar.js +57 -0
  71. package/es/components/position/entity.d.ts +5 -0
  72. package/es/components/position/entity.js +1 -0
  73. package/es/components/position/index.d.ts +3 -0
  74. package/es/components/position/index.js +2 -0
  75. package/es/components/position/index.scss +27 -0
  76. package/es/components/position/position-left.d.ts +9 -0
  77. package/es/components/position/position-left.js +28 -0
  78. package/es/components/position/position-list.d.ts +11 -0
  79. package/es/components/position/position-list.js +29 -0
  80. package/es/components/position/position.d.ts +8 -0
  81. package/es/components/position/position.js +48 -0
  82. package/es/components/radio-group/index.d.ts +8 -0
  83. package/es/components/radio-group/index.js +7 -0
  84. package/es/components/radio-group/index.scss +40 -0
  85. package/es/components/radio-group/radio-group-item.d.ts +48 -0
  86. package/es/components/radio-group/radio-group-item.js +74 -0
  87. package/es/components/radio-group/radio-group.d.ts +52 -0
  88. package/es/components/radio-group/radio-group.js +80 -0
  89. package/es/components/rich-text/index.d.ts +6 -0
  90. package/es/components/rich-text/index.js +6 -0
  91. package/es/components/rich-text/index.scss +19 -0
  92. package/es/components/rich-text/rich-text.d.ts +14 -0
  93. package/es/components/rich-text/rich-text.js +37 -0
  94. package/es/components/search-bar/index.d.ts +3 -0
  95. package/es/components/search-bar/index.js +2 -0
  96. package/es/components/search-bar/index.scss +39 -0
  97. package/es/components/search-bar/search-bar.d.ts +10 -0
  98. package/es/components/search-bar/search-bar.js +73 -0
  99. package/es/components/stream-list/index.d.ts +6 -0
  100. package/es/components/stream-list/index.js +6 -0
  101. package/es/components/stream-list/index.scss +26 -0
  102. package/es/components/stream-list/stream-list.d.ts +54 -0
  103. package/es/components/stream-list/stream-list.js +159 -0
  104. package/es/components/swiper/index.d.ts +3 -0
  105. package/es/components/swiper/index.js +2 -0
  106. package/es/components/swiper/index.scss +33 -0
  107. package/es/components/swiper/swiper.d.ts +26 -0
  108. package/es/components/swiper/swiper.js +77 -0
  109. package/es/components/tab/index.d.ts +6 -0
  110. package/es/components/tab/index.js +5 -0
  111. package/es/components/tab/index.scss +39 -0
  112. package/es/components/tab/tab.d.ts +27 -0
  113. package/es/components/tab/tab.js +50 -0
  114. package/es/components/tab-container/index.d.ts +3 -0
  115. package/es/components/tab-container/index.js +2 -0
  116. package/es/components/tab-container/index.scss +48 -0
  117. package/es/components/tab-container/tab-container.d.ts +10 -0
  118. package/es/components/tab-container/tab-container.js +26 -0
  119. package/es/components/tab-container-item/index.d.ts +3 -0
  120. package/es/components/tab-container-item/index.js +2 -0
  121. package/es/components/tab-container-item/index.scss +0 -0
  122. package/es/components/tab-container-item/tab-container-item.d.ts +11 -0
  123. package/es/components/tab-container-item/tab-container-item.js +19 -0
  124. package/es/components/tag/index.d.ts +6 -0
  125. package/es/components/tag/index.js +5 -0
  126. package/es/components/tag/index.scss +24 -0
  127. package/es/components/tag/tag.d.ts +14 -0
  128. package/es/components/tag/tag.js +14 -0
  129. package/es/components/teletext-list/index.d.ts +6 -0
  130. package/es/components/teletext-list/index.js +6 -0
  131. package/es/components/teletext-list/index.scss +40 -0
  132. package/es/components/teletext-list/teletext-list-item.d.ts +33 -0
  133. package/es/components/teletext-list/teletext-list-item.js +61 -0
  134. package/es/components/teletext-list/teletext-list-item.scss +57 -0
  135. package/es/components/teletext-list/teletext-list.d.ts +61 -0
  136. package/es/components/teletext-list/teletext-list.js +48 -0
  137. package/es/components/title/index.d.ts +8 -0
  138. package/es/components/title/index.js +7 -0
  139. package/es/components/title/title-1.d.ts +10 -0
  140. package/es/components/title/title-1.js +16 -0
  141. package/es/components/title/title-1.scss +25 -0
  142. package/es/components/title/title-2.d.ts +18 -0
  143. package/es/components/title/title-2.js +31 -0
  144. package/es/components/title/title-2.scss +22 -0
  145. package/es/entity/dynamic-column-data-type.d.ts +47 -0
  146. package/es/entity/dynamic-column-data-type.js +165 -0
  147. package/es/index.d.ts +46 -0
  148. package/es/index.js +86 -0
  149. package/es/index.scss +6 -0
  150. package/es/style.js +4 -0
  151. package/es/utils/children-node-handle.d.ts +9 -0
  152. package/es/utils/children-node-handle.js +25 -0
  153. package/es/utils/component-wrapper.d.ts +9 -0
  154. package/es/utils/component-wrapper.js +38 -0
  155. package/es/utils/debounce.d.ts +1 -0
  156. package/es/utils/debounce.js +14 -0
  157. package/es/utils/textUtil.d.ts +10 -0
  158. package/es/utils/textUtil.js +51 -0
  159. package/es/utils/time-util.d.ts +5 -0
  160. package/es/utils/time-util.js +18 -0
  161. package/es/variables.d.ts +2 -0
  162. package/es/variables.js +2 -0
  163. package/es/variables.scss +3 -0
  164. package/lib/assets/icon/grid-nav/right.png +0 -0
  165. package/lib/assets/icon/position/img.png +0 -0
  166. package/lib/assets/icon/position/location.png +0 -0
  167. package/lib/assets/icon/search/delete.png +0 -0
  168. package/lib/assets/icon/search/search.png +0 -0
  169. package/lib/assets/icon/teletext-list/arr.png +0 -0
  170. package/lib/components/bottom-navigation/bottom-navigation.d.ts +15 -0
  171. package/lib/components/bottom-navigation/index.d.ts +3 -0
  172. package/lib/components/button/button.d.ts +14 -0
  173. package/lib/components/button/index.d.ts +6 -0
  174. package/lib/components/carousel/carousel.d.ts +14 -0
  175. package/lib/components/colorful-button/colorful-button.d.ts +12 -0
  176. package/lib/components/colorful-button/index.d.ts +3 -0
  177. package/lib/components/colorful-input/colorful-input.d.ts +8 -0
  178. package/lib/components/colorful-input/index.d.ts +3 -0
  179. package/lib/components/form/form-item.d.ts +42 -0
  180. package/lib/components/form/form-item.js +86 -0
  181. package/lib/components/form/form-item.scss +20 -0
  182. package/lib/components/form/form.d.ts +57 -0
  183. package/lib/components/form/form.js +49 -0
  184. package/lib/components/form/index.d.ts +6 -0
  185. package/lib/components/form/index.js +6 -0
  186. package/lib/components/form/index.scss +22 -0
  187. package/lib/components/form/next-wrapper.d.ts +54 -0
  188. package/lib/components/form/next-wrapper.js +49 -0
  189. package/lib/components/goods-card-list/goods-card-list-common.d.ts +5 -0
  190. package/lib/components/goods-card-list/goods-card-list.d.ts +5 -0
  191. package/lib/components/goods-card-list/index.d.ts +4 -0
  192. package/lib/components/goods-card-list/types.d.ts +45 -0
  193. package/lib/components/grid-nav/grid-nav.d.ts +13 -0
  194. package/lib/components/grid-nav/grid-nav.js +15 -4
  195. package/lib/components/grid-nav/index.d.ts +3 -0
  196. package/lib/components/grid-nav/index.scss +27 -18
  197. package/lib/components/integral-task/index.d.ts +6 -0
  198. package/lib/components/integral-task/integral-task.d.ts +40 -0
  199. package/lib/components/menu-list/index.d.ts +6 -0
  200. package/lib/components/menu-list/menu-list-item.d.ts +5 -0
  201. package/lib/components/menu-list/menu-list.d.ts +5 -0
  202. package/lib/components/menu-list/types.d.ts +23 -0
  203. package/lib/components/message-list/index.d.ts +6 -0
  204. package/lib/components/message-list/message-list-item.d.ts +33 -0
  205. package/lib/components/message-list/message-list-item.scss +1 -1
  206. package/lib/components/message-list/message-list.d.ts +28 -0
  207. package/lib/components/notice-bar/index.d.ts +3 -0
  208. package/lib/components/notice-bar/index.scss +56 -14
  209. package/lib/components/notice-bar/notice-bar-item.d.ts +18 -0
  210. package/lib/components/notice-bar/notice-bar-item.js +6 -5
  211. package/lib/components/notice-bar/notice-bar-item.scss +1 -1
  212. package/lib/components/notice-bar/notice-bar.d.ts +46 -0
  213. package/lib/components/notice-bar/notice-bar.js +28 -56
  214. package/lib/components/position/entity.d.ts +5 -0
  215. package/lib/components/position/index.d.ts +3 -0
  216. package/lib/components/position/position-left.d.ts +9 -0
  217. package/lib/components/position/position-list.d.ts +11 -0
  218. package/lib/components/position/position-list.js +2 -3
  219. package/lib/components/position/position.d.ts +8 -0
  220. package/lib/components/radio-group/index.d.ts +8 -0
  221. package/lib/components/radio-group/radio-group-item.d.ts +48 -0
  222. package/lib/components/radio-group/radio-group.d.ts +52 -0
  223. package/lib/components/rich-text/index.d.ts +6 -0
  224. package/lib/components/rich-text/rich-text.d.ts +14 -0
  225. package/lib/components/search-bar/index.d.ts +3 -0
  226. package/lib/components/search-bar/index.scss +36 -10
  227. package/lib/components/search-bar/search-bar.d.ts +10 -0
  228. package/lib/components/search-bar/search-bar.js +67 -27
  229. package/lib/components/stream-list/index.d.ts +6 -0
  230. package/lib/components/stream-list/index.js +6 -0
  231. package/lib/components/stream-list/index.scss +26 -0
  232. package/lib/components/stream-list/stream-list.d.ts +54 -0
  233. package/lib/components/stream-list/stream-list.js +166 -0
  234. package/lib/components/swiper/index.d.ts +3 -0
  235. package/lib/components/swiper/index.scss +29 -8
  236. package/lib/components/swiper/swiper.d.ts +26 -0
  237. package/lib/components/swiper/swiper.js +60 -19
  238. package/lib/components/tab/index.d.ts +6 -0
  239. package/lib/components/tab/tab.d.ts +27 -0
  240. package/lib/components/tab-container/index.d.ts +3 -0
  241. package/lib/components/tab-container/tab-container.d.ts +10 -0
  242. package/lib/components/tab-container-item/index.d.ts +3 -0
  243. package/lib/components/tab-container-item/tab-container-item.d.ts +11 -0
  244. package/lib/components/tag/index.d.ts +6 -0
  245. package/lib/components/tag/tag.d.ts +14 -0
  246. package/lib/components/teletext-list/index.d.ts +6 -0
  247. package/lib/components/teletext-list/index.scss +21 -0
  248. package/lib/components/teletext-list/teletext-list-item.d.ts +33 -0
  249. package/lib/components/teletext-list/teletext-list-item.scss +4 -2
  250. package/lib/components/teletext-list/teletext-list.d.ts +61 -0
  251. package/lib/components/teletext-list/teletext-list.js +17 -7
  252. package/lib/components/title/index.d.ts +8 -0
  253. package/lib/components/title/title-1.d.ts +10 -0
  254. package/lib/components/title/title-2.d.ts +18 -0
  255. package/lib/entity/dynamic-column-data-type.d.ts +47 -0
  256. package/lib/entity/dynamic-column-data-type.js +169 -0
  257. package/lib/index.d.ts +46 -0
  258. package/lib/index.js +9 -1
  259. package/lib/style.js +1 -2
  260. package/lib/utils/children-node-handle.d.ts +9 -0
  261. package/lib/utils/component-wrapper.d.ts +9 -0
  262. package/lib/utils/debounce.d.ts +1 -0
  263. package/lib/utils/textUtil.d.ts +10 -0
  264. package/lib/utils/textUtil.js +55 -0
  265. package/lib/utils/time-util.d.ts +5 -0
  266. package/lib/variables.d.ts +2 -0
  267. package/lowcode/{d-c-form → form}/meta.ts +6 -6
  268. package/lowcode_es/{d-c-form → form}/meta.js +6 -6
  269. package/lowcode_es/meta.js +3 -3
  270. package/lowcode_lib/{d-c-form → form}/meta.js +6 -6
  271. package/lowcode_lib/meta.js +3 -3
  272. package/package.json +3 -3
  273. package/lib/components/notice-bar/components/ScrollSwitcher.js +0 -52
  274. package/lib/components/notice-bar/components/ScrollSwitcher.scss +0 -17
  275. /package/lowcode_es/{d-c-form → form}/meta.d.ts +0 -0
  276. /package/lowcode_lib/{d-c-form → form}/meta.d.ts +0 -0
@@ -0,0 +1,5 @@
1
+ export interface Location {
2
+ lat: string;
3
+ lng: string;
4
+ address: string;
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import Position from './position';
2
+ export type { LocationProps } from './position';
3
+ export default Position;
@@ -0,0 +1,2 @@
1
+ import Position from "./position";
2
+ export default Position;
@@ -0,0 +1,27 @@
1
+ .location {
2
+ display: flex;
3
+ cursor: pointer;
4
+ color: #414141;
5
+ font-size: 13.5px;
6
+ &-address {
7
+ margin-right: 7px;
8
+ }
9
+ &-icon {
10
+ display: flex;
11
+ align-items: center;
12
+ }
13
+ }
14
+ .location-list {
15
+ position: fixed;
16
+ top: 0;
17
+ left: 0;
18
+ width: 100vw;
19
+ height: 100vh;
20
+ background-color: #fff;
21
+ padding: 10px 15px;
22
+ z-index: 999;
23
+ &-item {
24
+ padding: 10px 0;
25
+ border-bottom: solid 1px #eee;
26
+ }
27
+ }
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ import { Location } from "./entity";
4
+ export interface LocationProps {
5
+ currentLocation: Location;
6
+ clickHandle: () => void;
7
+ }
8
+ declare const NavigationLeft: React.FC<LocationProps>;
9
+ export default NavigationLeft;
@@ -0,0 +1,28 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["currentLocation", "clickHandle"];
4
+ import * as React from 'react';
5
+ import "./index.scss";
6
+ import arror from "../../assets/icon/position/arror.png";
7
+ var NavigationLeft = function navigationLeft(_ref) {
8
+ var currentLocation = _ref.currentLocation,
9
+ clickHandle = _ref.clickHandle,
10
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
11
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", _extends({
12
+ className: "location"
13
+ }, otherProps, {
14
+ onClick: function onClick() {
15
+ return clickHandle();
16
+ }
17
+ }), /*#__PURE__*/React.createElement("div", {
18
+ className: "location-address"
19
+ }, currentLocation.address), /*#__PURE__*/React.createElement("div", {
20
+ className: "location-icon"
21
+ }, /*#__PURE__*/React.createElement("img", {
22
+ src: arror,
23
+ width: "10",
24
+ height: "5",
25
+ alt: "icon"
26
+ }))));
27
+ };
28
+ export default NavigationLeft;
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ import { Location } from "./position";
4
+ interface LocationProps {
5
+ itemArray: Location[];
6
+ open: boolean;
7
+ setIsOpen: () => void;
8
+ setCurrent: (data: Location) => void;
9
+ }
10
+ declare const ContentList: React.FC<LocationProps>;
11
+ export default ContentList;
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import "./index.scss";
3
+ var ContentList = function navigationList(_ref) {
4
+ var open = _ref.open,
5
+ itemArray = _ref.itemArray,
6
+ setIsOpen = _ref.setIsOpen,
7
+ setCurrent = _ref.setCurrent;
8
+ var changeHandle = function changeHandle(position) {
9
+ console.log('changeHandle', position);
10
+ // 设置当前选中位置
11
+ setCurrent(position);
12
+ // 关闭位置列表
13
+ setIsOpen();
14
+ };
15
+ return /*#__PURE__*/React.createElement("div", {
16
+ className: "location-list",
17
+ style: {
18
+ display: open ? 'block' : 'none'
19
+ }
20
+ }, itemArray ? itemArray.map(function (item) {
21
+ return /*#__PURE__*/React.createElement("div", {
22
+ onClick: function onClick() {
23
+ return changeHandle(item);
24
+ },
25
+ className: "location-list-item"
26
+ }, item.address);
27
+ }) : /*#__PURE__*/React.createElement("div", null, "\u6682\u65E0\u6570\u636E"));
28
+ };
29
+ export default ContentList;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Location } from "./entity";
3
+ export interface LocationProps {
4
+ itemArray: Location[];
5
+ defaultLocation: Location;
6
+ }
7
+ declare const Navigation: React.FC<LocationProps>;
8
+ export default Navigation;
@@ -0,0 +1,48 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["itemArray", "defaultLocation", "__designMode"];
4
+ import * as React from 'react';
5
+ import { default as List } from "./position-list";
6
+ import { default as Position } from "./position-left";
7
+ var Navigation = function bottomNavigation(_ref) {
8
+ var itemArray = _ref.itemArray,
9
+ defaultLocation = _ref.defaultLocation,
10
+ __designMode = _ref.__designMode,
11
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
12
+ var _React$useState = React.useState(defaultLocation),
13
+ current = _React$useState[0],
14
+ _setCurrent = _React$useState[1];
15
+ var _React$useState2 = React.useState(false),
16
+ isOpen = _React$useState2[0],
17
+ setIsOpen = _React$useState2[1];
18
+ var openList = function openList() {
19
+ if (__designMode == 'design') {
20
+ // 设计态不打开列表
21
+ return;
22
+ }
23
+ setIsOpen(!isOpen);
24
+ console.log('isopen', isOpen);
25
+ };
26
+ // React.useEffect(() => {
27
+ // console.log('defaultLocation', defaultLocation)
28
+ // if (defaultLocation) {
29
+ // setCurrent(defaultLocation)
30
+ // }
31
+ // })
32
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Position, _extends({
33
+ currentLocation: current
34
+ }, otherProps, {
35
+ clickHandle: function clickHandle() {
36
+ return openList();
37
+ }
38
+ })), /*#__PURE__*/React.createElement(List, {
39
+ open: isOpen,
40
+ currentLocation: current,
41
+ itemArray: itemArray,
42
+ setIsOpen: openList,
43
+ setCurrent: function setCurrent(value) {
44
+ return _setCurrent(value);
45
+ }
46
+ }));
47
+ };
48
+ export default Navigation;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 单选按钮组
3
+ */
4
+ import RadioGroup from './radio-group';
5
+ import RadioGroupItem from './radio-group-item';
6
+ export type { RadioGroupProps } from './radio-group';
7
+ export type { RadioGroupItemProps } from './radio-group-item';
8
+ export { RadioGroup as CustomRadioGroup, RadioGroupItem as CustomRadioGroupItem, };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 单选按钮组
3
+ */
4
+
5
+ import RadioGroup from "./radio-group";
6
+ import RadioGroupItem from "./radio-group-item";
7
+ export { RadioGroup as CustomRadioGroup, RadioGroupItem as CustomRadioGroupItem };
@@ -0,0 +1,40 @@
1
+ @import '../../variables.scss';
2
+
3
+ .radio-group__panel {
4
+ display: flex;
5
+ gap: 12px;
6
+ width: 100%;
7
+
8
+ .radio-group-item__button {
9
+ flex: 0 0 auto;
10
+ transition-property: all;
11
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
12
+ transition-duration: 250ms;
13
+ font-size: 12px;
14
+ padding: 5px 11px;
15
+ border-radius: 25rem;
16
+ }
17
+
18
+ .radio-group-item__text {
19
+ flex: 0 0 auto;
20
+ transition-property: all;
21
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
22
+ transition-duration: 250ms;
23
+ font-size: 12px;
24
+ padding: 5px 0;
25
+
26
+ .radio-group-item__text__line {
27
+ width: 100%;
28
+ height: 1px;
29
+ right: 0;
30
+ left: 0;
31
+ bottom: 0;
32
+ position: absolute;
33
+ }
34
+
35
+ }
36
+
37
+
38
+ }
39
+
40
+
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ export type RadioGroupItemType = 'button' | 'text';
4
+ export interface RadioGroupItemProps {
5
+ /**
6
+ * 选项
7
+ */
8
+ label: string;
9
+ /**
10
+ * 值
11
+ */
12
+ value: string;
13
+ /**
14
+ * 是否选中
15
+ */
16
+ checked: boolean;
17
+ /**
18
+ * 选中颜色
19
+ */
20
+ selectColor?: string;
21
+ /**
22
+ * 选中的文字颜色
23
+ */
24
+ selectTextColor?: string;
25
+ /**
26
+ * 未选中颜色
27
+ */
28
+ unSelectColor?: string;
29
+ /**
30
+ * 未选中的文字颜色
31
+ */
32
+ unSelectTextColor?: string;
33
+ /**
34
+ * 类型
35
+ */
36
+ type?: RadioGroupItemType;
37
+ /**
38
+ * 名称
39
+ */
40
+ name: string;
41
+ /**
42
+ * 改变事件
43
+ * @param value
44
+ */
45
+ onChange: (value: string) => void;
46
+ }
47
+ declare const RadioGroupItem: React.FC<RadioGroupItemProps>;
48
+ export default RadioGroupItem;
@@ -0,0 +1,74 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["label", "value", "checked", "type", "name", "selectColor", "selectTextColor", "unSelectColor", "unSelectTextColor", "onChange"];
4
+ import React from 'react';
5
+ import "./index.scss";
6
+ var styleFunction = function styleFunction(type, bgColors, textColors, checked) {
7
+ var bgColor = checked ? bgColors[1] : bgColors[0];
8
+ var textColor = checked ? textColors[1] : textColors[0];
9
+ if (type === 'button') {
10
+ return {
11
+ 'backgroundColor': bgColor,
12
+ 'color': textColor
13
+ };
14
+ }
15
+ if (type === 'text') {
16
+ return {
17
+ 'color': textColor,
18
+ 'position': checked ? 'relative' : 'static'
19
+ };
20
+ }
21
+ return {};
22
+ };
23
+ var RadioGroupItem = function RadioGroupItem(_ref) {
24
+ var _ref$label = _ref.label,
25
+ label = _ref$label === void 0 ? '标签' : _ref$label,
26
+ _ref$value = _ref.value,
27
+ value = _ref$value === void 0 ? 'value' : _ref$value,
28
+ checked = _ref.checked,
29
+ _ref$type = _ref.type,
30
+ type = _ref$type === void 0 ? 'button' : _ref$type,
31
+ name = _ref.name,
32
+ _ref$selectColor = _ref.selectColor,
33
+ selectColor = _ref$selectColor === void 0 ? '#F5743F' : _ref$selectColor,
34
+ _ref$selectTextColor = _ref.selectTextColor,
35
+ selectTextColor = _ref$selectTextColor === void 0 ? 'white' : _ref$selectTextColor,
36
+ _ref$unSelectColor = _ref.unSelectColor,
37
+ unSelectColor = _ref$unSelectColor === void 0 ? '#F0F0F0' : _ref$unSelectColor,
38
+ _ref$unSelectTextColo = _ref.unSelectTextColor,
39
+ unSelectTextColor = _ref$unSelectTextColo === void 0 ? '#727272' : _ref$unSelectTextColo,
40
+ onChange = _ref.onChange,
41
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
42
+ var _otherProps = otherProps || {};
43
+ var handleChange = function handleChange(event) {
44
+ onChange(event.target.value);
45
+ };
46
+ // 获取特殊的样式
47
+ var customStyle = styleFunction(type, [unSelectColor, selectColor], [unSelectTextColor, selectTextColor], checked);
48
+ if (_otherProps.style) {
49
+ _otherProps.style = _extends({}, _otherProps.style, customStyle);
50
+ } else {
51
+ _otherProps.style = _extends({}, customStyle);
52
+ }
53
+ var className = type === 'button' ? 'radio-group-item__button' : 'radio-group-item__text';
54
+ return /*#__PURE__*/React.createElement("label", _extends({
55
+ key: value,
56
+ className: className
57
+ }, _otherProps), type === 'text' && checked && /*#__PURE__*/React.createElement("span", {
58
+ className: "radio-group-item__text__line",
59
+ style: {
60
+ 'background-color': selectColor
61
+ }
62
+ }), /*#__PURE__*/React.createElement("input", {
63
+ type: "radio",
64
+ style: {
65
+ 'display': 'none'
66
+ },
67
+ name: name,
68
+ value: value,
69
+ checked: checked,
70
+ onChange: handleChange
71
+ }), label);
72
+ };
73
+ RadioGroupItem.displayName = 'RadioGroupItem';
74
+ export default RadioGroupItem;
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ export interface RadioType {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export type RadioGroupItemType = 'button' | 'text';
8
+ export interface RadioGroupProps {
9
+ /**
10
+ * 选项
11
+ */
12
+ options: Array<RadioType>;
13
+ /**
14
+ * 默认值
15
+ */
16
+ defaultValue?: string;
17
+ /**
18
+ * 是否换行
19
+ */
20
+ isWrap?: boolean;
21
+ /**
22
+ * 选中颜色
23
+ */
24
+ selectColor?: string;
25
+ /**
26
+ * 选中的文字颜色
27
+ */
28
+ selectTextColor?: string;
29
+ /**
30
+ * 未选中颜色
31
+ */
32
+ unSelectColor?: string;
33
+ /**
34
+ * 未选中的文字颜色
35
+ */
36
+ unSelectTextColor?: string;
37
+ /**
38
+ * 改变事件
39
+ * @param value
40
+ */
41
+ onChange?: (value: string) => void;
42
+ /**
43
+ * 类型
44
+ */
45
+ type?: RadioGroupItemType;
46
+ /**
47
+ * 名称
48
+ */
49
+ name?: string;
50
+ }
51
+ declare const RadioGroup: React.FC<RadioGroupProps>;
52
+ export default RadioGroup;
@@ -0,0 +1,80 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["options", "name", "type", "defaultValue", "selectColor", "selectTextColor", "unSelectColor", "unSelectTextColor", "isWrap", "onChange", "children"];
4
+ import React, { useEffect, useState } from 'react';
5
+ import "./index.scss";
6
+ import RadioGroupItem from "./radio-group-item";
7
+ function uuid() {
8
+ return Math.random().toString(36).substring(2);
9
+ }
10
+ var RadioGroup = function RadioGroup(_ref) {
11
+ var _options$;
12
+ var options = _ref.options,
13
+ _ref$name = _ref.name,
14
+ name = _ref$name === void 0 ? uuid() : _ref$name,
15
+ _ref$type = _ref.type,
16
+ type = _ref$type === void 0 ? 'button' : _ref$type,
17
+ defaultValue = _ref.defaultValue,
18
+ _ref$selectColor = _ref.selectColor,
19
+ selectColor = _ref$selectColor === void 0 ? '#F5743F' : _ref$selectColor,
20
+ _ref$selectTextColor = _ref.selectTextColor,
21
+ selectTextColor = _ref$selectTextColor === void 0 ? 'white' : _ref$selectTextColor,
22
+ _ref$unSelectColor = _ref.unSelectColor,
23
+ unSelectColor = _ref$unSelectColor === void 0 ? '#F0F0F0' : _ref$unSelectColor,
24
+ _ref$unSelectTextColo = _ref.unSelectTextColor,
25
+ unSelectTextColor = _ref$unSelectTextColo === void 0 ? '#727272' : _ref$unSelectTextColo,
26
+ _ref$isWrap = _ref.isWrap,
27
+ isWrap = _ref$isWrap === void 0 ? false : _ref$isWrap,
28
+ _ref$onChange = _ref.onChange,
29
+ onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
30
+ children = _ref.children,
31
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
32
+ var _otherProps = otherProps || {};
33
+ var defaultV = (options === null || options === void 0 ? void 0 : (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value) || defaultValue || '';
34
+ var _useState = useState(defaultV),
35
+ selectedValue = _useState[0],
36
+ setSelectedValue = _useState[1];
37
+ useEffect(function () {
38
+ if (defaultV) {
39
+ handleChange(defaultV);
40
+ }
41
+ }, [defaultV]);
42
+ var handleChange = function handleChange(value) {
43
+ setSelectedValue(value);
44
+ onChange(value);
45
+ };
46
+ var wrapClass = isWrap ? 'flex-wrap: wrap;' : 'flex-wrap: nowrap;overflow-x: auto;';
47
+ _otherProps.style = wrapClass + ' ' + _otherProps.style ? _otherProps.style : '';
48
+ return /*#__PURE__*/React.createElement("div", _extends({
49
+ className: "radio-group__panel"
50
+ }, _otherProps), (options || []).map(function (option) {
51
+ return /*#__PURE__*/React.createElement(RadioGroupItem, {
52
+ label: option.label,
53
+ value: option.value,
54
+ key: option.value,
55
+ checked: selectedValue === option.value,
56
+ name: name,
57
+ type: type,
58
+ selectColor: selectColor,
59
+ selectTextColor: selectTextColor,
60
+ unSelectColor: unSelectColor,
61
+ unSelectTextColor: unSelectTextColor,
62
+ onChange: handleChange
63
+ });
64
+ // return convertChildren(children, 'custom-radio-group-item', {
65
+ // label: option.label,
66
+ // value: option.value,
67
+ // key: option.value,
68
+ // checked: selectedValue === option.value,
69
+ // name: name,
70
+ // type: type,
71
+ // selectColor: selectColor,
72
+ // selectTextColor: selectTextColor,
73
+ // unSelectColor: unSelectColor,
74
+ // unSelectTextColor: unSelectTextColor,
75
+ // onChange: handleChange
76
+ // })
77
+ }));
78
+ };
79
+ RadioGroup.displayName = 'RadioGroup';
80
+ export default RadioGroup;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 富文本
3
+ */
4
+ import RichText from './rich-text';
5
+ export type { RichTextProps } from './rich-text';
6
+ export { RichText, };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 富文本
3
+ */
4
+
5
+ import RichText from "./rich-text";
6
+ export { RichText };
@@ -0,0 +1,19 @@
1
+ .rich-text {
2
+ width: 100%;
3
+ display: flex;
4
+ flex-direction: column;
5
+ padding: 0; /* 添加内边距 */
6
+ margin: 0; /* 去除外边距 */
7
+ word-break: break-word; /* 处理长单词换行 */
8
+ overflow-wrap: break-word; /* 支持长单词换行 */
9
+ overflow: hidden; /* 隐藏超出部分 */
10
+ }
11
+ p {
12
+ padding: 0;
13
+ margin: 0 0 20px 0 !important;
14
+ }
15
+ img {
16
+ max-width: 100%;
17
+ height: auto; /* 保持纵横比 */
18
+ object-fit: contain; /* 确保图片保持在容器内 */
19
+ }
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import './index.scss';
3
+ interface DataProps {
4
+ content?: string;
5
+ }
6
+ export interface RichTextProps {
7
+ content?: string;
8
+ dataList?: DataProps[];
9
+ }
10
+ declare const RichText: {
11
+ (props: RichTextProps): JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export default RichText;
@@ -0,0 +1,37 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["content", "dataList"];
4
+ import React from 'react';
5
+ import "./index.scss";
6
+ // 富文本
7
+
8
+ // 用于处理富文本内容的函数
9
+ var processContent = function processContent(content) {
10
+ // 检查内容是否为字符串
11
+ if (typeof content !== 'string') {
12
+ return '';
13
+ }
14
+ // 替换转义符号(这里可以根据需要添加更多处理逻辑)
15
+ return content.replace(/\\/g, '');
16
+ };
17
+ var RichText = function RichText(props) {
18
+ var content = props.content,
19
+ dataList = props.dataList,
20
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
21
+ return /*#__PURE__*/React.createElement("div", _extends({
22
+ className: "rich-text"
23
+ }, otherProps), dataList && dataList.length > 0 ? dataList.map(function (item, index) {
24
+ return /*#__PURE__*/React.createElement("div", {
25
+ key: index,
26
+ dangerouslySetInnerHTML: {
27
+ __html: processContent(item.content)
28
+ }
29
+ });
30
+ }) : /*#__PURE__*/React.createElement("div", {
31
+ dangerouslySetInnerHTML: {
32
+ __html: processContent(content)
33
+ }
34
+ }));
35
+ };
36
+ RichText.displayName = 'RichText';
37
+ export default RichText;
@@ -0,0 +1,3 @@
1
+ import SearchBar from "./search-bar";
2
+ export type { SearchBarProps } from './search-bar';
3
+ export default SearchBar;
@@ -0,0 +1,2 @@
1
+ import SearchBar from "./search-bar";
2
+ export default SearchBar;
@@ -0,0 +1,39 @@
1
+ .search-bar-form {
2
+ height: 35px;
3
+ flex: 1;
4
+ box-shadow: 0 1px 6px 0 rgba(66, 36, 8, 0.08);
5
+ border-radius: 17px;
6
+ }
7
+ .search-bar {
8
+ //border: solid 1px #c4c6cf;
9
+ display: flex;
10
+ align-items: center;
11
+ height: 100%;
12
+ padding-right: 16px;
13
+ &-input {
14
+ outline: none;
15
+ border: none;
16
+ //width: calc(100% - 15px - 34px);
17
+ height: 100%;
18
+ flex: 1;
19
+ }
20
+ &-icon {
21
+ margin-left: 15px;
22
+ margin-right: 5px;
23
+ display: flex;
24
+ align-items: center;
25
+ &-img {
26
+ width: 15px;
27
+ height: 15px;
28
+ }
29
+ }
30
+ &-delete-img {
31
+ width: 15px;
32
+ height: 15px;
33
+ }
34
+ &-enter {
35
+ font-size: 14px;
36
+ color: #f77c32;
37
+ margin-left: 6px;
38
+ }
39
+ }
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export interface SearchBarProps {
3
+ onSearch?: () => void;
4
+ onConfirm?: (value: string) => void;
5
+ placeholder?: string;
6
+ searchText?: boolean;
7
+ autofocus?: boolean;
8
+ }
9
+ declare const SearchBar: React.FC<SearchBarProps>;
10
+ export default SearchBar;