@dckj-npm/dc-material 0.1.0 → 0.1.3

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 (150) hide show
  1. package/build/docs/colorful-button.html +48 -0
  2. package/build/docs/colorful-input.html +48 -0
  3. package/build/docs/index.html +48 -0
  4. package/build/docs/umi.6846fe8b.js +1 -0
  5. package/build/docs/umi.7f7df875.css +8 -0
  6. package/build/docs/~demos/colorful-button-demo.html +47 -0
  7. package/build/docs/~demos/colorful-input-demo.html +47 -0
  8. package/build/index.js +19 -12
  9. package/build/lowcode/assets-daily.json +12 -12
  10. package/build/lowcode/assets-dev.json +3 -3
  11. package/build/lowcode/assets-prod.json +12 -12
  12. package/build/lowcode/index.js +1 -1
  13. package/build/lowcode/meta.js +1 -1
  14. package/build/lowcode/preview.js +147 -147
  15. package/build/lowcode/render/default/view.css +1 -1
  16. package/build/lowcode/render/default/view.js +295 -1
  17. package/build/lowcode/view.css +1 -1
  18. package/build/lowcode/view.js +295 -1
  19. package/dist/BizComps.css +1 -1
  20. package/dist/BizComps.js +6 -1
  21. package/dist/BizComps.js.map +1 -1
  22. package/es/assets/icon/navigation/index-selected.png +0 -0
  23. package/es/assets/icon/navigation/index.png +0 -0
  24. package/es/assets/icon/navigation/message-selected.png +0 -0
  25. package/es/assets/icon/navigation/message.png +0 -0
  26. package/es/assets/icon/navigation/mine-selected.png +0 -0
  27. package/es/assets/icon/navigation/mine.png +0 -0
  28. package/es/components/bottom-navigation/bottom-navigation.d.ts +13 -0
  29. package/es/components/bottom-navigation/bottom-navigation.js +39 -0
  30. package/es/components/bottom-navigation/index.d.ts +3 -0
  31. package/es/components/bottom-navigation/index.js +2 -0
  32. package/es/components/bottom-navigation/index.scss +16 -0
  33. package/es/components/colorful-button/colorful-button.d.ts +12 -12
  34. package/es/components/colorful-button/index.d.ts +3 -3
  35. package/es/components/colorful-input/colorful-input.d.ts +8 -8
  36. package/es/components/colorful-input/index.d.ts +3 -3
  37. package/es/components/dc-slider/index.d.ts +3 -0
  38. package/es/components/dc-slider/index.js +2 -0
  39. package/es/components/dc-slider/index.scss +8 -0
  40. package/es/components/dc-slider/slider.d.ts +32 -0
  41. package/es/components/dc-slider/slider.js +14 -0
  42. package/es/components/position/index.d.ts +3 -0
  43. package/es/components/position/index.js +2 -0
  44. package/es/components/position/index.scss +16 -0
  45. package/es/components/position/position.d.ts +13 -0
  46. package/es/components/position/position.js +39 -0
  47. package/es/components/teletext-list/index.d.ts +6 -6
  48. package/es/components/teletext-list/index.js +2 -2
  49. package/es/components/teletext-list/index.scss +16 -114
  50. package/es/components/teletext-list/teletext-list-item.d.ts +38 -0
  51. package/es/components/teletext-list/teletext-list-item.js +47 -0
  52. package/es/components/teletext-list/teletext-list-item.scss +74 -0
  53. package/es/components/teletext-list/teletext-list.d.ts +48 -48
  54. package/es/components/teletext-list/teletext-list.js +10 -33
  55. package/es/components/title/index.d.ts +8 -0
  56. package/es/components/title/index.js +7 -0
  57. package/es/components/title/title-1.d.ts +10 -0
  58. package/es/components/title/title-1.js +16 -0
  59. package/es/components/title/title-1.scss +26 -0
  60. package/es/components/title/title-2.d.ts +18 -0
  61. package/es/components/title/title-2.js +31 -0
  62. package/es/components/title/title-2.scss +22 -0
  63. package/es/index.d.ts +12 -8
  64. package/es/index.js +4 -2
  65. package/es/index.scss +3 -3
  66. package/es/style.js +2 -2
  67. package/es/variables.d.ts +2 -2
  68. package/lib/assets/icon/navigation/index-selected.png +0 -0
  69. package/lib/assets/icon/navigation/index.png +0 -0
  70. package/lib/assets/icon/navigation/message-selected.png +0 -0
  71. package/lib/assets/icon/navigation/message.png +0 -0
  72. package/lib/assets/icon/navigation/mine-selected.png +0 -0
  73. package/lib/assets/icon/navigation/mine.png +0 -0
  74. package/lib/components/bottom-navigation/bottom-navigation.d.ts +13 -0
  75. package/lib/components/bottom-navigation/bottom-navigation.js +46 -0
  76. package/lib/components/bottom-navigation/index.d.ts +3 -0
  77. package/lib/components/bottom-navigation/index.js +7 -0
  78. package/lib/components/bottom-navigation/index.scss +16 -0
  79. package/lib/components/colorful-button/colorful-button.d.ts +12 -12
  80. package/lib/components/colorful-button/index.d.ts +3 -3
  81. package/lib/components/colorful-input/colorful-input.d.ts +8 -8
  82. package/lib/components/colorful-input/index.d.ts +3 -3
  83. package/lib/components/dc-slider/index.d.ts +3 -0
  84. package/lib/components/dc-slider/index.js +7 -0
  85. package/lib/components/dc-slider/index.scss +8 -0
  86. package/lib/components/dc-slider/slider.d.ts +32 -0
  87. package/lib/components/dc-slider/slider.js +21 -0
  88. package/lib/components/position/index.d.ts +3 -0
  89. package/lib/components/position/index.js +7 -0
  90. package/lib/components/position/index.scss +16 -0
  91. package/lib/components/position/position.d.ts +13 -0
  92. package/lib/components/position/position.js +46 -0
  93. package/lib/components/teletext-list/index.d.ts +6 -6
  94. package/lib/components/teletext-list/index.js +2 -2
  95. package/lib/components/teletext-list/index.scss +16 -114
  96. package/lib/components/teletext-list/teletext-list-item.d.ts +38 -0
  97. package/lib/components/teletext-list/teletext-list-item.js +51 -0
  98. package/lib/components/teletext-list/teletext-list-item.scss +74 -0
  99. package/lib/components/teletext-list/teletext-list.d.ts +48 -48
  100. package/lib/components/teletext-list/teletext-list.js +10 -33
  101. package/lib/components/title/index.d.ts +8 -0
  102. package/lib/components/title/index.js +8 -0
  103. package/lib/components/title/title-1.d.ts +10 -0
  104. package/lib/components/title/title-1.js +21 -0
  105. package/lib/components/title/title-1.scss +26 -0
  106. package/lib/components/title/title-2.d.ts +18 -0
  107. package/lib/components/title/title-2.js +36 -0
  108. package/lib/components/title/title-2.scss +22 -0
  109. package/lib/index.d.ts +12 -8
  110. package/lib/index.js +8 -5
  111. package/lib/index.scss +3 -3
  112. package/lib/style.js +2 -2
  113. package/lib/variables.d.ts +2 -2
  114. package/lowcode/d-c-slider/meta.ts +331 -0
  115. package/lowcode/d-c-slider/snippets.ts +42 -0
  116. package/lowcode/navigation/meta.ts +151 -0
  117. package/lowcode/teletext-list/meta.ts +292 -292
  118. package/lowcode/{colorful-input → title1}/meta.ts +58 -56
  119. package/lowcode/title2/meta.ts +92 -0
  120. package/lowcode_es/d-c-slider/meta.d.ts +140 -0
  121. package/lowcode_es/d-c-slider/meta.js +298 -0
  122. package/lowcode_es/d-c-slider/snippets.d.ts +36 -0
  123. package/lowcode_es/d-c-slider/snippets.js +36 -0
  124. package/lowcode_es/meta.js +8 -6
  125. package/lowcode_es/{colorful-input → navigation}/meta.d.ts +22 -22
  126. package/lowcode_es/navigation/meta.js +135 -0
  127. package/lowcode_es/teletext-list/meta.d.ts +22 -22
  128. package/lowcode_es/teletext-list/meta.js +3 -3
  129. package/{lowcode_lib/colorful-button → lowcode_es/title1}/meta.d.ts +22 -22
  130. package/lowcode_es/{colorful-input → title1}/meta.js +15 -13
  131. package/lowcode_es/{colorful-button → title2}/meta.d.ts +22 -22
  132. package/lowcode_es/title2/meta.js +82 -0
  133. package/lowcode_es/view.js +3 -3
  134. package/lowcode_lib/d-c-slider/meta.d.ts +140 -0
  135. package/lowcode_lib/d-c-slider/meta.js +303 -0
  136. package/lowcode_lib/d-c-slider/snippets.d.ts +36 -0
  137. package/lowcode_lib/d-c-slider/snippets.js +40 -0
  138. package/lowcode_lib/meta.js +8 -6
  139. package/lowcode_lib/{colorful-input → navigation}/meta.d.ts +22 -22
  140. package/lowcode_lib/navigation/meta.js +140 -0
  141. package/lowcode_lib/teletext-list/meta.d.ts +22 -22
  142. package/lowcode_lib/teletext-list/meta.js +3 -3
  143. package/lowcode_lib/title1/meta.d.ts +22 -0
  144. package/lowcode_lib/{colorful-input → title1}/meta.js +15 -13
  145. package/lowcode_lib/title2/meta.d.ts +22 -0
  146. package/lowcode_lib/{colorful-button → title2}/meta.js +38 -41
  147. package/lowcode_lib/view.js +2 -2
  148. package/package.json +4 -4
  149. package/lowcode/colorful-button/meta.ts +0 -102
  150. package/lowcode_es/colorful-button/meta.js +0 -85
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ interface Navigation {
4
+ text: string;
5
+ icon: string;
6
+ selectedIcon: string;
7
+ }
8
+ export interface NavigationProps {
9
+ itemArray: Navigation[];
10
+ selectedColor: string;
11
+ }
12
+ declare const Navigation: React.FC<NavigationProps>;
13
+ export default Navigation;
@@ -0,0 +1,39 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["itemArray", "selectedColor"];
4
+ import * as React from 'react';
5
+ import { Image } from '@alilc/lowcode-materials';
6
+ import "./index.scss";
7
+ var Navigation = function bottomNavigation(_ref) {
8
+ var itemArray = _ref.itemArray,
9
+ selectedColor = _ref.selectedColor,
10
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
11
+ var _React$useState = React.useState(0),
12
+ activeNum = _React$useState[0],
13
+ setActiveNum = _React$useState[1];
14
+ var clickHandle = function clickHandle(index) {
15
+ // 更新激活tab
16
+ setActiveNum(index);
17
+ };
18
+ return /*#__PURE__*/React.createElement("div", _extends({
19
+ className: "navigation"
20
+ }, otherProps), itemArray.map(function (item, index) {
21
+ var _item$selectedIcon;
22
+ return /*#__PURE__*/React.createElement("div", {
23
+ className: "navigation-item",
24
+ onClick: function onClick() {
25
+ return clickHandle(index);
26
+ },
27
+ style: {
28
+ color: activeNum === index ? selectedColor !== null && selectedColor !== void 0 ? selectedColor : '#4598FF' : ''
29
+ }
30
+ }, /*#__PURE__*/React.createElement(Image, {
31
+ src: activeNum === index ? (_item$selectedIcon = item.selectedIcon) !== null && _item$selectedIcon !== void 0 ? _item$selectedIcon : item.icon : item.icon,
32
+ style: {
33
+ width: '24.5px',
34
+ height: '24.5px'
35
+ }
36
+ }), /*#__PURE__*/React.createElement("span", null, item.text));
37
+ }));
38
+ };
39
+ export default Navigation;
@@ -0,0 +1,3 @@
1
+ import Navigation from './bottom-navigation';
2
+ export type { NavigationProps } from './bottom-navigation';
3
+ export default Navigation;
@@ -0,0 +1,2 @@
1
+ import Navigation from "./bottom-navigation";
2
+ export default Navigation;
@@ -0,0 +1,16 @@
1
+ .navigation {
2
+ width: 100%;
3
+ display: flex;
4
+ justify-content: space-between;
5
+ align-items: center;
6
+ padding: 9px 50px 6px 50px;
7
+ position: fixed;
8
+ bottom: 0;
9
+ &-item {
10
+ display: flex;
11
+ flex-direction: column;
12
+ justify-content: center;
13
+ align-items: center;
14
+ cursor: pointer;
15
+ }
16
+ }
@@ -1,12 +1,12 @@
1
- import * as React from 'react';
2
- import './index.scss';
3
- export interface ColorfulButtonProps {
4
- /**
5
- * 类型
6
- */
7
- type?: "primary" | "secondary" | "normal";
8
- color?: string;
9
- style?: object;
10
- }
11
- declare const ColorfulButton: React.FC<ColorfulButtonProps>;
12
- export default ColorfulButton;
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ export interface ColorfulButtonProps {
4
+ /**
5
+ * 类型
6
+ */
7
+ type?: "primary" | "secondary" | "normal";
8
+ color?: string;
9
+ style?: object;
10
+ }
11
+ declare const ColorfulButton: React.FC<ColorfulButtonProps>;
12
+ export default ColorfulButton;
@@ -1,3 +1,3 @@
1
- import ColorfulButton from './colorful-button';
2
- export type { ColorfulButtonProps } from './colorful-button';
3
- export default ColorfulButton;
1
+ import ColorfulButton from './colorful-button';
2
+ export type { ColorfulButtonProps } from './colorful-button';
3
+ export default ColorfulButton;
@@ -1,8 +1,8 @@
1
- import * as React from 'react';
2
- import './index.scss';
3
- export interface ColorfulInputProps {
4
- color?: string;
5
- style?: object;
6
- }
7
- declare const ColorfulInput: React.FC<ColorfulInputProps>;
8
- export default ColorfulInput;
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ export interface ColorfulInputProps {
4
+ color?: string;
5
+ style?: object;
6
+ }
7
+ declare const ColorfulInput: React.FC<ColorfulInputProps>;
8
+ export default ColorfulInput;
@@ -1,3 +1,3 @@
1
- import ColorfulInput from './colorful-input';
2
- export type { ColorfulInputProps } from './colorful-input';
3
- export default ColorfulInput;
1
+ import ColorfulInput from './colorful-input';
2
+ export type { ColorfulInputProps } from './colorful-input';
3
+ export default ColorfulInput;
@@ -0,0 +1,3 @@
1
+ import DCSlider from './slider';
2
+ export type { ComponentProps } from './slider';
3
+ export default DCSlider;
@@ -0,0 +1,2 @@
1
+ import DCSlider from "./slider";
2
+ export default DCSlider;
@@ -0,0 +1,8 @@
1
+ /* write style here */
2
+ .ExampleComponent {
3
+
4
+ }
5
+ .img{
6
+ width: 100%;
7
+ height: 100%;
8
+ }
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ export interface ComponentProps {
4
+ prefix: string;
5
+ animation: string;
6
+ arrows: true;
7
+ arrowSize: string;
8
+ arrowPosition: string;
9
+ arrowDirection: string;
10
+ autoplaySpeed: number;
11
+ dots: boolean;
12
+ dotsDirection: string;
13
+ draggable: boolean;
14
+ infinite: boolean;
15
+ slide: string;
16
+ slideDirection: string;
17
+ slidesToShow: number;
18
+ slidesToScroll: number;
19
+ speed: number;
20
+ triggerType: string;
21
+ centerPadding: string;
22
+ cssEase: string;
23
+ edgeFriction: number;
24
+ swipe: boolean;
25
+ touchMove: boolean;
26
+ touchThreshold: number;
27
+ useCSS: boolean;
28
+ waitForAnimate: boolean;
29
+ picUrls: string[];
30
+ }
31
+ declare const DCSlider: React.FC<ComponentProps>;
32
+ export default DCSlider;
@@ -0,0 +1,14 @@
1
+ import _Slider from "@alifd/next/es/slider";
2
+ import * as React from 'react';
3
+ import { Image } from '@alilc/lowcode-materials';
4
+ import "./index.scss";
5
+ var DCSlider = function DCSlider(props) {
6
+ return /*#__PURE__*/React.createElement("div", props, /*#__PURE__*/React.createElement(_Slider, props, props.picUrls && props.picUrls.length > 0 ? props.picUrls.map(function (url, index) {
7
+ return /*#__PURE__*/React.createElement(Image, {
8
+ src: url,
9
+ alt: "Slide",
10
+ key: index
11
+ });
12
+ }) : /*#__PURE__*/React.createElement("div", null, "\u56FE\u7247\u4E3A\u7A7A")));
13
+ };
14
+ export default DCSlider;
@@ -0,0 +1,3 @@
1
+ import Position from './position';
2
+ export type { NavigationProps } from './position';
3
+ export default Position;
@@ -0,0 +1,2 @@
1
+ import Position from "./position";
2
+ export default Position;
@@ -0,0 +1,16 @@
1
+ .navigation {
2
+ width: 100%;
3
+ display: flex;
4
+ justify-content: space-between;
5
+ align-items: center;
6
+ padding: 9px 50px 6px 50px;
7
+ position: fixed;
8
+ bottom: 0;
9
+ &-item {
10
+ display: flex;
11
+ flex-direction: column;
12
+ justify-content: center;
13
+ align-items: center;
14
+ cursor: pointer;
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ interface Navigation {
4
+ text: string;
5
+ icon: string;
6
+ selectedIcon: string;
7
+ }
8
+ export interface NavigationProps {
9
+ itemArray: Navigation[];
10
+ selectedColor: string;
11
+ }
12
+ declare const Navigation: React.FC<NavigationProps>;
13
+ export default Navigation;
@@ -0,0 +1,39 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["itemArray", "selectedColor"];
4
+ import * as React from 'react';
5
+ import { Image } from '@alilc/lowcode-materials';
6
+ import "./index.scss";
7
+ var Navigation = function bottomNavigation(_ref) {
8
+ var itemArray = _ref.itemArray,
9
+ selectedColor = _ref.selectedColor,
10
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
11
+ var _React$useState = React.useState(0),
12
+ activeNum = _React$useState[0],
13
+ setActiveNum = _React$useState[1];
14
+ var clickHandle = function clickHandle(index) {
15
+ // 更新激活tab
16
+ setActiveNum(index);
17
+ };
18
+ return /*#__PURE__*/React.createElement("div", _extends({
19
+ className: "navigation"
20
+ }, otherProps), itemArray.map(function (item, index) {
21
+ var _item$selectedIcon;
22
+ return /*#__PURE__*/React.createElement("div", {
23
+ className: "navigation-item",
24
+ onClick: function onClick() {
25
+ return clickHandle(index);
26
+ },
27
+ style: {
28
+ color: activeNum === index ? selectedColor !== null && selectedColor !== void 0 ? selectedColor : '#4598FF' : ''
29
+ }
30
+ }, /*#__PURE__*/React.createElement(Image, {
31
+ src: activeNum === index ? (_item$selectedIcon = item.selectedIcon) !== null && _item$selectedIcon !== void 0 ? _item$selectedIcon : item.icon : item.icon,
32
+ style: {
33
+ width: '24.5px',
34
+ height: '24.5px'
35
+ }
36
+ }), /*#__PURE__*/React.createElement("span", null, item.text));
37
+ }));
38
+ };
39
+ export default Navigation;
@@ -1,6 +1,6 @@
1
- /**
2
- * 图文列表
3
- */
4
- import TeletextList from './teletext-list';
5
- export type { TeletextListProps } from './teletext-list';
6
- export default TeletextList;
1
+ /**
2
+ * 图文列表
3
+ */
4
+ import TeletextList from './teletext-list';
5
+ export type { TeletextListProps } from './teletext-list';
6
+ export default TeletextList;
@@ -1,5 +1,5 @@
1
- /**
2
- * 图文列表
1
+ /**
2
+ * 图文列表
3
3
  */
4
4
 
5
5
  import TeletextList from "./teletext-list";
@@ -1,114 +1,16 @@
1
- @import '../../variables.scss';
2
-
3
- .teletext-list__panel {
4
- display: flex;
5
- flex-direction: column;
6
- gap: 10px;
7
-
8
- .teletext-list__panel__title {
9
-
10
- & > span {
11
- position: relative;
12
- font-size: 17px;
13
- font-weight: 500;
14
- color: #000000;
15
- z-index: 1;
16
-
17
- &::after {
18
- content: '';
19
- position: absolute;
20
- bottom: -2px;
21
- left: 0;
22
- width: 100%;
23
- height: 5px;
24
- background: linear-gradient(-30deg, #95CDFE, #61A0FE);
25
- border-radius: 5px;
26
- opacity: 0.6;
27
- z-index: 0;
28
- }
29
- }
30
-
31
- }
32
-
33
- .teletext-list__panel__item-list {
34
- display: flex;
35
- flex-direction: column;
36
- gap: 10px;
37
-
38
- .teletext-list__panel__item {
39
- display: flex;
40
- gap: 5px;
41
- padding-bottom: 10px;
42
- justify-content: space-between;
43
-
44
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
45
-
46
- .teletext-list__panel__item_image {
47
- width: 90px;
48
- height: 71px;
49
- border-radius: 5px;
50
- flex: 0 0 auto;
51
- overflow: hidden;
52
-
53
- & > img {
54
- width: 100%;
55
- height: 100%;
56
- object-fit: cover;
57
- }
58
-
59
- }
60
-
61
- .teletext-list__panel__item__text {
62
- display: flex;
63
- flex-direction: column;
64
- gap: 3px;
65
-
66
- .teletext-list__panel__item__text__title {
67
- font-size: 15px;
68
- font-weight: 500;
69
- color: #000000;
70
- }
71
-
72
- .teletext-list__panel__item__text__description {
73
- -webkit-line-clamp: 1;
74
- overflow: hidden;
75
- color: #686868;
76
- -webkit-box-orient: vertical;
77
- display: -webkit-box;
78
- font-size: 12px;
79
- text-overflow: ellipsis;
80
- }
81
-
82
- .teletext-list__panel__item__text__tags {
83
- display: flex;
84
- gap: 6px;
85
-
86
- & > span {
87
- padding: 2px 6px;
88
- border-radius: 4px;
89
- background-color: black;
90
- color: white;
91
- font-size: 11px;
92
-
93
- &.orange {
94
- color: #F1770E;
95
- background-color: rgba(241, 119, 14, 0.1);
96
- }
97
-
98
- &.blue {
99
- color: #2972DD;
100
- background-color: rgba(41, 114, 221, 0.1);
101
- }
102
-
103
- }
104
-
105
- }
106
-
107
- }
108
-
109
- }
110
- }
111
-
112
- }
113
-
114
-
1
+ @import '../../variables.scss';
2
+
3
+ .teletext-list__panel {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 10px;
7
+
8
+ .teletext-list__panel__item-list {
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 10px;
12
+ }
13
+
14
+ }
15
+
16
+
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import './teletext-list-item.scss';
3
+ /**
4
+ * 数据
5
+ */
6
+ interface TeletextListItemProps {
7
+ /**
8
+ * 标题
9
+ */
10
+ title?: string;
11
+ /**
12
+ * 图片地址
13
+ */
14
+ image?: string;
15
+ /**
16
+ * 图片位置
17
+ */
18
+ imagePlacement?: "left" | "right" | "none";
19
+ /**
20
+ * 说明
21
+ */
22
+ description?: string;
23
+ /**
24
+ * 标签列表
25
+ */
26
+ tags?: {
27
+ /**
28
+ * 标签名称
29
+ */
30
+ name: string;
31
+ /**
32
+ * 标签颜色
33
+ */
34
+ color: string;
35
+ }[];
36
+ }
37
+ declare const TeletextListItem: React.FC<TeletextListItemProps>;
38
+ export default TeletextListItem;
@@ -0,0 +1,47 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["title", "image", "imagePlacement", "description", "tags"];
4
+ import React from 'react';
5
+ import "./teletext-list-item.scss";
6
+
7
+ /**
8
+ * 数据
9
+ */
10
+
11
+ var TeletextListItem = function TeletextListItem(_ref) {
12
+ var title = _ref.title,
13
+ image = _ref.image,
14
+ imagePlacement = _ref.imagePlacement,
15
+ description = _ref.description,
16
+ tags = _ref.tags,
17
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
18
+ var _otherProps = otherProps || {};
19
+ return /*#__PURE__*/React.createElement("div", _extends({
20
+ className: "teletext-list__panel__item"
21
+ }, _otherProps), image && imagePlacement === 'left' ? /*#__PURE__*/React.createElement("div", {
22
+ className: "teletext-list__panel__item_image"
23
+ }, /*#__PURE__*/React.createElement("img", {
24
+ alt: "img",
25
+ src: image
26
+ })) : null, /*#__PURE__*/React.createElement("div", {
27
+ className: "teletext-list__panel__item__text"
28
+ }, /*#__PURE__*/React.createElement("div", {
29
+ className: "teletext-list__panel__item__text__title"
30
+ }, title), /*#__PURE__*/React.createElement("div", {
31
+ className: "teletext-list__panel__item__text__description"
32
+ }, description), tags ? /*#__PURE__*/React.createElement("div", {
33
+ className: "teletext-list__panel__item__text__tags"
34
+ }, tags === null || tags === void 0 ? void 0 : tags.map(function (tag, tagIndex) {
35
+ return /*#__PURE__*/React.createElement("span", {
36
+ key: tagIndex,
37
+ className: tag.color
38
+ }, tag.name);
39
+ })) : null), image && imagePlacement === 'right' ? /*#__PURE__*/React.createElement("div", {
40
+ className: "teletext-list__panel__item_image"
41
+ }, /*#__PURE__*/React.createElement("img", {
42
+ alt: "img",
43
+ src: image
44
+ })) : null);
45
+ };
46
+ TeletextListItem.displayName = 'TeletextListItem';
47
+ export default TeletextListItem;
@@ -0,0 +1,74 @@
1
+ @import '../../variables.scss';
2
+
3
+ .teletext-list__panel__item {
4
+ display: flex;
5
+ gap: 5px;
6
+ padding-bottom: 10px;
7
+ justify-content: space-between;
8
+
9
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
10
+
11
+ .teletext-list__panel__item_image {
12
+ width: 90px;
13
+ height: 71px;
14
+ border-radius: 5px;
15
+ flex: 0 0 auto;
16
+ overflow: hidden;
17
+
18
+ & > img {
19
+ width: 100%;
20
+ height: 100%;
21
+ object-fit: cover;
22
+ }
23
+
24
+ }
25
+
26
+ .teletext-list__panel__item__text {
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: 3px;
30
+
31
+ .teletext-list__panel__item__text__title {
32
+ font-size: 15px;
33
+ font-weight: 500;
34
+ color: #000000;
35
+ }
36
+
37
+ .teletext-list__panel__item__text__description {
38
+ -webkit-line-clamp: 1;
39
+ overflow: hidden;
40
+ color: #686868;
41
+ -webkit-box-orient: vertical;
42
+ display: -webkit-box;
43
+ font-size: 12px;
44
+ text-overflow: ellipsis;
45
+ }
46
+
47
+ .teletext-list__panel__item__text__tags {
48
+ display: flex;
49
+ gap: 6px;
50
+
51
+ & > span {
52
+ padding: 2px 6px;
53
+ border-radius: 4px;
54
+ background-color: black;
55
+ color: white;
56
+ font-size: 11px;
57
+
58
+ &.orange {
59
+ color: #F1770E;
60
+ background-color: rgba(241, 119, 14, 0.1);
61
+ }
62
+
63
+ &.blue {
64
+ color: #2972DD;
65
+ background-color: rgba(41, 114, 221, 0.1);
66
+ }
67
+
68
+ }
69
+
70
+ }
71
+
72
+ }
73
+
74
+ }