@pisell/materials 1.0.1057 → 1.0.1059

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 (202) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +3 -3
  6. package/build/lowcode/preview.js +9 -9
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +20 -20
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -23
  11. package/es/components/PisellCards/index.d.ts +3 -0
  12. package/es/components/PisellCards/index.js +3 -1
  13. package/es/components/PisellContactBrief/PisellContactBrief.d.ts +13 -0
  14. package/es/components/PisellContactBrief/PisellContactBrief.js +223 -0
  15. package/es/components/PisellContactBrief/PisellContactBrief.less +192 -0
  16. package/es/components/PisellContactBrief/PisellContactBrief.stories.d.ts +31 -0
  17. package/es/components/PisellContactBrief/PisellContactBrief.stories.js +196 -0
  18. package/es/components/PisellContactBrief/components/ContactFormModal.d.ts +23 -0
  19. package/es/components/PisellContactBrief/components/ContactFormModal.js +177 -0
  20. package/es/components/PisellContactBrief/components/index.d.ts +5 -0
  21. package/es/components/PisellContactBrief/components/index.js +4 -0
  22. package/es/components/PisellContactBrief/index.d.ts +6 -0
  23. package/es/components/PisellContactBrief/index.js +5 -0
  24. package/es/components/PisellContactBrief/locales.d.ts +55 -0
  25. package/es/components/PisellContactBrief/locales.js +54 -0
  26. package/es/components/PisellContactBrief/types.d.ts +82 -0
  27. package/es/components/PisellContactBrief/types.js +1 -0
  28. package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +8 -0
  29. package/es/components/pisellActionPanel/PisellActionPanel.d.ts +13 -0
  30. package/es/components/pisellActionPanel/PisellActionPanel.js +98 -0
  31. package/es/components/pisellActionPanel/PisellActionPanel.less +69 -0
  32. package/es/components/pisellActionPanel/PisellActionPanel.stories.d.ts +19 -0
  33. package/es/components/pisellActionPanel/PisellActionPanel.stories.js +208 -0
  34. package/es/components/pisellActionPanel/index.d.ts +6 -0
  35. package/es/components/pisellActionPanel/index.js +5 -0
  36. package/es/components/pisellActionPanel/types.d.ts +83 -0
  37. package/es/components/pisellActionPanel/types.js +1 -0
  38. package/es/components/pisellBaseCard/PisellBaseCard.d.ts +8 -0
  39. package/es/components/pisellBaseCard/PisellBaseCard.js +96 -0
  40. package/es/components/pisellBaseCard/PisellBaseCard.less +25 -0
  41. package/es/components/pisellBaseCard/PisellBaseCard.stories.d.ts +19 -0
  42. package/es/components/pisellBaseCard/PisellBaseCard.stories.js +99 -0
  43. package/es/components/pisellBaseCard/index.d.ts +5 -0
  44. package/es/components/pisellBaseCard/index.js +4 -0
  45. package/es/components/pisellBaseCard/types.d.ts +45 -0
  46. package/es/components/pisellBaseCard/types.js +1 -0
  47. package/es/components/pisellCurrency/PisellCurrency.js +18 -12
  48. package/es/components/pisellCurrency/PisellCurrency.less +0 -123
  49. package/es/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +15 -0
  50. package/es/components/pisellCustomerBrief/PisellCustomerBrief.js +145 -0
  51. package/es/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
  52. package/es/components/pisellCustomerBrief/PisellCustomerBrief.stories.d.ts +23 -0
  53. package/es/components/pisellCustomerBrief/PisellCustomerBrief.stories.js +193 -0
  54. package/es/components/pisellCustomerBrief/index.d.ts +6 -0
  55. package/es/components/pisellCustomerBrief/index.js +5 -0
  56. package/es/components/pisellCustomerBrief/types.d.ts +82 -0
  57. package/es/components/pisellCustomerBrief/types.js +1 -0
  58. package/es/components/pisellEmail/PisellEmail.js +48 -42
  59. package/es/components/pisellEmail/PisellEmail.less +0 -92
  60. package/es/components/pisellEntityCard/PisellEntityCard.d.ts +8 -0
  61. package/es/components/pisellEntityCard/PisellEntityCard.js +474 -0
  62. package/es/components/pisellEntityCard/PisellEntityCard.less +362 -0
  63. package/es/components/pisellEntityCard/PisellEntityCard.stories.d.ts +47 -0
  64. package/es/components/pisellEntityCard/PisellEntityCard.stories.js +450 -0
  65. package/es/components/pisellEntityCard/index.d.ts +5 -0
  66. package/es/components/pisellEntityCard/index.js +4 -0
  67. package/es/components/pisellEntityCard/types.d.ts +144 -0
  68. package/es/components/pisellEntityCard/types.js +1 -0
  69. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +32 -4
  70. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +4 -2
  71. package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
  72. package/es/components/pisellFloorMapLayout/components/ViewControls.js +12 -2
  73. package/es/components/pisellFloorMapLayout/types.d.ts +2 -0
  74. package/es/components/pisellLongText/PisellLongText.js +18 -12
  75. package/es/components/pisellLongText/PisellLongText.less +0 -67
  76. package/es/components/pisellLookup/PisellLookup.js +8 -1
  77. package/es/components/pisellMultipleSelect/PisellMultipleSelect.js +14 -6
  78. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
  79. package/es/components/pisellMultipleSelect/components/EditView.js +1 -0
  80. package/es/components/pisellNumber/PisellNumber.js +18 -12
  81. package/es/components/pisellNumber/PisellNumber.less +0 -103
  82. package/es/components/pisellPhone/PisellPhone.js +18 -12
  83. package/es/components/pisellPhone/PisellPhone.less +0 -119
  84. package/es/components/pisellPhone/components/EditView.js +44 -33
  85. package/es/components/pisellPhone/constants/countryCodes.d.ts +1 -0
  86. package/es/components/pisellPhone/constants/countryCodes.js +26 -25
  87. package/es/components/pisellPhone/types.d.ts +2 -2
  88. package/es/components/pisellPhone/utils/countryCodeHelper.d.ts +4 -4
  89. package/es/components/pisellPhone/utils/countryCodeHelper.js +5 -5
  90. package/es/components/pisellRating/PisellRating.js +7 -3
  91. package/es/components/pisellSingleLineText/PisellSingleLineText.js +27 -20
  92. package/es/components/pisellSingleLineText/PisellSingleLineText.less +58 -201
  93. package/es/components/pisellSingleSelect/PisellSingleSelect.js +14 -5
  94. package/es/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
  95. package/es/components/pisellUrl/PisellUrl.js +48 -42
  96. package/es/components/pisellWalletPassCard/index.js +2 -1
  97. package/es/index.d.ts +15 -4
  98. package/es/index.js +8 -4
  99. package/es/theme/pisell-components.d.ts +14 -0
  100. package/es/theme/pisell-components.js +74 -0
  101. package/lib/components/PisellCards/index.d.ts +3 -0
  102. package/lib/components/PisellCards/index.js +3 -1
  103. package/lib/components/PisellContactBrief/PisellContactBrief.d.ts +13 -0
  104. package/lib/components/PisellContactBrief/PisellContactBrief.js +231 -0
  105. package/lib/components/PisellContactBrief/PisellContactBrief.less +192 -0
  106. package/lib/components/PisellContactBrief/PisellContactBrief.stories.d.ts +31 -0
  107. package/lib/components/PisellContactBrief/PisellContactBrief.stories.js +188 -0
  108. package/lib/components/PisellContactBrief/components/ContactFormModal.d.ts +23 -0
  109. package/lib/components/PisellContactBrief/components/ContactFormModal.js +154 -0
  110. package/lib/components/PisellContactBrief/components/index.d.ts +5 -0
  111. package/lib/components/PisellContactBrief/components/index.js +29 -0
  112. package/lib/components/PisellContactBrief/index.d.ts +6 -0
  113. package/lib/components/PisellContactBrief/index.js +29 -0
  114. package/lib/components/PisellContactBrief/locales.d.ts +55 -0
  115. package/lib/components/PisellContactBrief/locales.js +74 -0
  116. package/lib/components/PisellContactBrief/types.d.ts +82 -0
  117. package/lib/components/PisellContactBrief/types.js +17 -0
  118. package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +8 -0
  119. package/lib/components/pisellActionPanel/PisellActionPanel.d.ts +13 -0
  120. package/lib/components/pisellActionPanel/PisellActionPanel.js +124 -0
  121. package/lib/components/pisellActionPanel/PisellActionPanel.less +69 -0
  122. package/lib/components/pisellActionPanel/PisellActionPanel.stories.d.ts +19 -0
  123. package/lib/components/pisellActionPanel/PisellActionPanel.stories.js +186 -0
  124. package/lib/components/pisellActionPanel/index.d.ts +6 -0
  125. package/lib/components/pisellActionPanel/index.js +29 -0
  126. package/lib/components/pisellActionPanel/types.d.ts +83 -0
  127. package/lib/components/pisellActionPanel/types.js +17 -0
  128. package/lib/components/pisellBaseCard/PisellBaseCard.d.ts +8 -0
  129. package/lib/components/pisellBaseCard/PisellBaseCard.js +124 -0
  130. package/lib/components/pisellBaseCard/PisellBaseCard.less +25 -0
  131. package/lib/components/pisellBaseCard/PisellBaseCard.stories.d.ts +19 -0
  132. package/lib/components/pisellBaseCard/PisellBaseCard.stories.js +107 -0
  133. package/lib/components/pisellBaseCard/index.d.ts +5 -0
  134. package/lib/components/pisellBaseCard/index.js +29 -0
  135. package/lib/components/pisellBaseCard/types.d.ts +45 -0
  136. package/lib/components/pisellBaseCard/types.js +17 -0
  137. package/lib/components/pisellCurrency/PisellCurrency.js +16 -10
  138. package/lib/components/pisellCurrency/PisellCurrency.less +0 -123
  139. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +15 -0
  140. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.js +143 -0
  141. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
  142. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.stories.d.ts +23 -0
  143. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.stories.js +171 -0
  144. package/lib/components/pisellCustomerBrief/index.d.ts +6 -0
  145. package/lib/components/pisellCustomerBrief/index.js +29 -0
  146. package/lib/components/pisellCustomerBrief/types.d.ts +82 -0
  147. package/lib/components/pisellCustomerBrief/types.js +17 -0
  148. package/lib/components/pisellEmail/PisellEmail.js +16 -10
  149. package/lib/components/pisellEmail/PisellEmail.less +0 -92
  150. package/lib/components/pisellEntityCard/PisellEntityCard.d.ts +8 -0
  151. package/lib/components/pisellEntityCard/PisellEntityCard.js +426 -0
  152. package/lib/components/pisellEntityCard/PisellEntityCard.less +362 -0
  153. package/lib/components/pisellEntityCard/PisellEntityCard.stories.d.ts +47 -0
  154. package/lib/components/pisellEntityCard/PisellEntityCard.stories.js +349 -0
  155. package/lib/components/pisellEntityCard/index.d.ts +5 -0
  156. package/lib/components/pisellEntityCard/index.js +29 -0
  157. package/lib/components/pisellEntityCard/types.d.ts +144 -0
  158. package/lib/components/pisellEntityCard/types.js +17 -0
  159. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +22 -3
  160. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +2 -2
  161. package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
  162. package/lib/components/pisellFloorMapLayout/components/ViewControls.js +11 -1
  163. package/lib/components/pisellFloorMapLayout/types.d.ts +2 -0
  164. package/lib/components/pisellLongText/PisellLongText.js +16 -10
  165. package/lib/components/pisellLongText/PisellLongText.less +0 -67
  166. package/lib/components/pisellLookup/PisellLookup.js +5 -1
  167. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.js +62 -53
  168. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
  169. package/lib/components/pisellMultipleSelect/components/EditView.js +42 -30
  170. package/lib/components/pisellNumber/PisellNumber.js +16 -10
  171. package/lib/components/pisellNumber/PisellNumber.less +0 -103
  172. package/lib/components/pisellPhone/PisellPhone.js +16 -10
  173. package/lib/components/pisellPhone/PisellPhone.less +0 -119
  174. package/lib/components/pisellPhone/components/EditView.js +40 -24
  175. package/lib/components/pisellPhone/constants/countryCodes.d.ts +1 -0
  176. package/lib/components/pisellPhone/constants/countryCodes.js +24 -24
  177. package/lib/components/pisellPhone/types.d.ts +2 -2
  178. package/lib/components/pisellPhone/utils/countryCodeHelper.d.ts +4 -4
  179. package/lib/components/pisellPhone/utils/countryCodeHelper.js +1 -1
  180. package/lib/components/pisellRating/PisellRating.js +4 -2
  181. package/lib/components/pisellSingleLineText/PisellSingleLineText.js +16 -10
  182. package/lib/components/pisellSingleLineText/PisellSingleLineText.less +58 -201
  183. package/lib/components/pisellSingleSelect/PisellSingleSelect.js +34 -35
  184. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
  185. package/lib/components/pisellUrl/PisellUrl.js +16 -10
  186. package/lib/components/pisellWalletPassCard/index.js +1 -1
  187. package/lib/index.d.ts +15 -4
  188. package/lib/index.js +18 -3
  189. package/lib/theme/pisell-components.d.ts +14 -0
  190. package/lib/theme/pisell-components.js +89 -0
  191. package/lowcode/pisell-action-panel/meta.ts +146 -0
  192. package/lowcode/pisell-action-panel/snippets.ts +42 -0
  193. package/lowcode/pisell-base-card/meta.ts +98 -0
  194. package/lowcode/pisell-base-card/snippets.ts +13 -0
  195. package/lowcode/pisell-contact-brief/meta.ts +178 -0
  196. package/lowcode/pisell-contact-brief/snippets.ts +40 -0
  197. package/lowcode/pisell-customer-brief/meta.ts +262 -0
  198. package/lowcode/pisell-customer-brief/snippets.ts +46 -0
  199. package/lowcode/pisell-entity-card/meta.ts +296 -0
  200. package/lowcode/pisell-entity-card/snippets.ts +41 -0
  201. package/lowcode/pisell-floor-map-layout/meta.ts +37 -1
  202. package/package.json +4 -4
@@ -0,0 +1,362 @@
1
+ /**
2
+ * PisellEntityCard 样式
3
+ * 按 Figma Entity Card 设计:8px 圆角、8px 内边距、Gray/300 边框、标题 14px Semibold、次级 14px Regular #667085、间距 6px/4px、标签 pill
4
+ */
5
+ /* Figma 设计稿:卡片圆角 8px、边框 #D0D5DD */
6
+ @entity-card-radius: 8px;
7
+ @entity-card-padding: 8px;
8
+ @entity-card-border: 1px solid #d0d5dd;
9
+ @entity-card-bg: #ffffff;
10
+ /* 标题:Text sm/Semibold 14px #000,行高 20 */
11
+ @entity-card-title-size: 14px;
12
+ @entity-card-title-weight: 600;
13
+ @entity-card-title-color: #000000;
14
+ @entity-card-title-line-height: 20px;
15
+ /* 次级:Text sm/Regular 14px #667085,行高 20 */
16
+ @entity-card-secondary-size: 14px;
17
+ @entity-card-secondary-color: #667085;
18
+ @entity-card-secondary-line-height: 20px;
19
+ /* 媒体与文案间距 6px,文案列内间距 4px */
20
+ @entity-card-gap-media-text: 6px;
21
+ @entity-card-gap-text-inner: 0;
22
+ /* 标签:xs/Medium 12px,行高 18,pill 圆角 16px,padding 2px 8px */
23
+ @entity-card-tag-size: 12px;
24
+ @entity-card-tag-line-height: 18px;
25
+ @entity-card-tag-padding: 2px 8px;
26
+ @entity-card-tag-radius: 16px;
27
+
28
+ .pisell-entity-card-wrap {
29
+ box-sizing: border-box;
30
+ min-width: 0;
31
+
32
+ &.pisell-entity-card-wrap-swipe {
33
+ overflow: hidden;
34
+ border-radius: @entity-card-radius;
35
+ }
36
+ }
37
+
38
+ .pisell-entity-card-swipe-container {
39
+ position: relative;
40
+ overflow: hidden;
41
+ border-radius: @entity-card-radius;
42
+ touch-action: none;
43
+ }
44
+
45
+ .pisell-entity-card-swipe-delete {
46
+ position: absolute;
47
+ top: 0;
48
+ right: 0;
49
+ bottom: 0;
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ background: #ff4d4f;
54
+ color: #fff;
55
+ font-size: 14px;
56
+ cursor: pointer;
57
+ user-select: none;
58
+ z-index: 0;
59
+ border-radius: 0 @entity-card-radius @entity-card-radius 0;
60
+ }
61
+
62
+ .pisell-entity-card-swipe-content {
63
+ position: relative;
64
+ z-index: 1;
65
+ background: inherit;
66
+ transition: transform 0.2s ease;
67
+ border-radius: @entity-card-radius;
68
+ }
69
+
70
+ /* 根节点:布局;Figma 默认 8px 圆角/内边距/边框由组件传入 style 合并 */
71
+ .pisell-entity-card-root {
72
+ display: flex;
73
+ flex-direction: column;
74
+ min-width: 0;
75
+ }
76
+
77
+ .pisell-entity-card-summary {
78
+ display: flex;
79
+ min-width: 0;
80
+ flex: 1;
81
+
82
+ /* 横向:头像靠上,文案区垂直居中 */
83
+ &[data-layout='horizontal'] {
84
+ flex-direction: row;
85
+ align-items: flex-start;
86
+ }
87
+
88
+ &[data-layout='vertical'] {
89
+ flex-direction: column;
90
+ align-items: center;
91
+ }
92
+ }
93
+
94
+ .pisell-entity-card-summary[data-layout='horizontal'] .pisell-entity-card-media-wrap {
95
+ align-self: flex-start;
96
+ }
97
+
98
+ .pisell-entity-card-summary[data-layout='horizontal'] .pisell-entity-card-text-wrap {
99
+ align-self: center;
100
+ }
101
+
102
+ .pisell-entity-card-media-wrap {
103
+ flex-shrink: 0;
104
+ }
105
+
106
+ .pisell-entity-card-media {
107
+ display: block;
108
+ }
109
+
110
+ .pisell-entity-card-media-avatar {
111
+ border-radius: 50%;
112
+ }
113
+
114
+ .pisell-entity-card-text-wrap {
115
+ flex: 1;
116
+ min-width: 0;
117
+ display: flex;
118
+ flex-direction: column;
119
+ gap: @entity-card-gap-text-inner;
120
+ overflow: hidden;
121
+ }
122
+
123
+ .pisell-entity-card-summary[data-layout='horizontal'] .pisell-entity-card-text-wrap {
124
+ margin-left: @entity-card-gap-media-text;
125
+ }
126
+
127
+ .pisell-entity-card-summary[data-layout='vertical'] .pisell-entity-card-text-wrap {
128
+ margin-top: @entity-card-gap-media-text;
129
+ align-items: center;
130
+ text-align: center;
131
+ }
132
+
133
+ /* 主文案行:标题与副标题同一行时垂直居中对齐;空间不够时副标题与标签整体换行 */
134
+ .pisell-entity-card-primary-row {
135
+ display: flex;
136
+ flex-wrap: wrap;
137
+ align-items: center;
138
+ gap: @entity-card-gap-media-text;
139
+ min-width: 0;
140
+ }
141
+
142
+ /* 竖向布局:主标题单独一行,副标题与标签单独一行并居中 */
143
+ .pisell-entity-card-summary[data-layout='vertical'] .pisell-entity-card-primary-row {
144
+ justify-content: center;
145
+ }
146
+
147
+ .pisell-entity-card-summary[data-layout='vertical'] .pisell-entity-card-primary-row .pisell-entity-card-primary {
148
+ flex: 0 0 100%;
149
+ width: 100%;
150
+ text-align: center;
151
+ }
152
+
153
+ .pisell-entity-card-summary[data-layout='vertical'] .pisell-entity-card-primary-row .pisell-entity-card-primary-extra {
154
+ flex: 0 0 100%;
155
+ width: 100%;
156
+ justify-content: center;
157
+ }
158
+
159
+ /* 副标题与 inline 标签的容器:不压缩,空间不够时整块换行;换行后各自可省略 */
160
+ .pisell-entity-card-primary-extra {
161
+ flex: 1 0 auto;
162
+ min-width: min-content;
163
+ display: flex;
164
+ flex-wrap: wrap;
165
+ align-items: center;
166
+ gap: 4px;
167
+ overflow: hidden;
168
+ max-width: 100%;
169
+ }
170
+
171
+ /* 主标题:先占内容宽度,不主动压缩,让副标题/标签先换行;仅在极窄时单行省略 */
172
+ .pisell-entity-card-primary {
173
+ flex: 0 1 auto;
174
+ min-width: 0;
175
+ max-width: 100%;
176
+ overflow: hidden;
177
+ }
178
+
179
+ /* Figma Title text: 14px Semibold #000, line-height 20;宽度不足时单行省略号 */
180
+ .pisell-entity-card-primary-text {
181
+ margin-top: 0;
182
+ margin-bottom: 0;
183
+ padding-top: 0;
184
+ padding-bottom: 0;
185
+ font-size: @entity-card-title-size;
186
+ font-weight: @entity-card-title-weight;
187
+ color: @entity-card-title-color;
188
+ line-height: @entity-card-title-line-height;
189
+ display: block;
190
+ overflow: hidden;
191
+ text-overflow: ellipsis;
192
+ white-space: nowrap;
193
+
194
+ /* 有行数限制时:多行截断并省略,覆盖 antd 与默认单行样式;需有宽度约束 line-clamp 才生效 */
195
+
196
+ &.pisell-entity-card-primary-text-has-line-clamp {
197
+ display: -webkit-box !important;
198
+ -webkit-line-clamp: 1; /* 默认 1 行,2/3 行等由组件 style 覆盖 */
199
+ -webkit-box-orient: vertical !important;
200
+ overflow: hidden !important;
201
+ white-space: normal !important;
202
+ text-overflow: ellipsis;
203
+ width: 100%;
204
+ max-width: 100%;
205
+ min-width: 0;
206
+ }
207
+ }
208
+
209
+ /* 副标题:与主标题/标签同行或换行,宽度不足时单行省略 */
210
+ .pisell-entity-card-subtitle-wrap {
211
+ flex: 1 1 auto;
212
+ min-width: 0;
213
+ overflow: hidden;
214
+ }
215
+
216
+ .pisell-entity-card-subtitle {
217
+ margin-top: 0;
218
+ margin-bottom: 0;
219
+ padding-top: 0;
220
+ padding-bottom: 0;
221
+ display: block;
222
+ font-size: @entity-card-secondary-size;
223
+ font-weight: 400;
224
+ color: @entity-card-secondary-color;
225
+ line-height: @entity-card-secondary-line-height;
226
+ overflow: hidden;
227
+ text-overflow: ellipsis;
228
+ white-space: nowrap;
229
+ max-width: 100%;
230
+ }
231
+
232
+ .pisell-entity-card-secondary {
233
+ min-width: 0;
234
+ }
235
+
236
+ /* Figma Text information: 14px Regular #667085, line-height 20 */
237
+ .pisell-entity-card-secondary-text {
238
+ margin-top: 0;
239
+ margin-bottom: 0;
240
+ padding-top: 0;
241
+ padding-bottom: 0;
242
+ font-size: @entity-card-secondary-size;
243
+ font-weight: 400;
244
+ color: @entity-card-secondary-color;
245
+ line-height: @entity-card-secondary-line-height;
246
+ }
247
+
248
+ .pisell-entity-card-secondary-line {
249
+ margin-top: 0;
250
+ margin-bottom: 0;
251
+ padding-top: 0;
252
+ padding-bottom: 0;
253
+ display: block;
254
+ line-height: @entity-card-secondary-line-height;
255
+ }
256
+
257
+ .pisell-entity-card-secondary-tooltip-icon {
258
+ margin-right: 4px;
259
+ font-size: 12px;
260
+ color: @entity-card-secondary-color;
261
+ }
262
+
263
+ .pisell-entity-card-tags {
264
+ display: flex;
265
+ flex-wrap: wrap;
266
+ gap: @entity-card-gap-media-text;
267
+ margin-top: 0;
268
+ min-width: 0;
269
+
270
+ /* inline 标签:可换行,宽度不足时整体收缩、单签可省略 */
271
+
272
+ &.pisell-entity-card-tags-inline {
273
+ flex: 0 1 auto;
274
+ min-width: 0;
275
+ overflow: hidden;
276
+ max-width: 100%;
277
+ }
278
+ }
279
+
280
+ /* Figma Badge: 12px Medium, pill 16px radius, padding 2px 8px */
281
+ .pisell-entity-card-tag {
282
+ display: inline-block;
283
+ padding: @entity-card-tag-padding;
284
+ font-size: @entity-card-tag-size;
285
+ font-weight: 500;
286
+ line-height: @entity-card-tag-line-height;
287
+ border-radius: @entity-card-tag-radius;
288
+ background: #f5f5f5;
289
+ color: @entity-card-secondary-color;
290
+
291
+ /* inline 时单签过长可省略 */
292
+
293
+ .pisell-entity-card-tags-inline & {
294
+ max-width: 100%;
295
+ min-width: 0;
296
+ overflow: hidden;
297
+ text-overflow: ellipsis;
298
+ white-space: nowrap;
299
+ }
300
+ }
301
+
302
+ /* 设计稿:卡片内容一行,左侧 summary、右侧 actions(justify-between) */
303
+ .pisell-entity-card-body {
304
+ display: flex;
305
+ align-items: center;
306
+ justify-content: space-between;
307
+ gap: 12px;
308
+ width: 100%;
309
+ min-width: 0;
310
+ }
311
+
312
+ /* Figma 13355-110786:Action 在右侧,与 summary 同一行;操作项支持文本/按钮/图标 */
313
+ .pisell-entity-card-actions {
314
+ display: flex;
315
+ align-items: center;
316
+ gap: 4px;
317
+ flex-shrink: 0;
318
+ }
319
+
320
+ .pisell-entity-card-action {
321
+ padding: 4px 0;
322
+ border: none;
323
+ background: transparent;
324
+ font-size: 14px;
325
+ color: #475467;
326
+ cursor: pointer;
327
+ display: inline-flex;
328
+ align-items: center;
329
+ justify-content: center;
330
+ gap: 6px;
331
+
332
+ &:focus-visible {
333
+ outline: 1px solid #1677ff;
334
+ outline-offset: 2px;
335
+ }
336
+
337
+ &.pisell-entity-card-action-text {
338
+ color: #1677ff;
339
+ }
340
+
341
+ &.pisell-entity-card-action-button {
342
+ padding: 4px 12px;
343
+ border: 1px solid #d0d5dd;
344
+ border-radius: 6px;
345
+ color: #344054;
346
+ background: #fff;
347
+
348
+ &:hover {
349
+ border-color: #1677ff;
350
+ color: #1677ff;
351
+ }
352
+ }
353
+
354
+ &.pisell-entity-card-action-icon {
355
+ padding: 4px;
356
+ color: #475467;
357
+
358
+ .anticon {
359
+ font-size: 20px;
360
+ }
361
+ }
362
+ }
@@ -0,0 +1,47 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { PisellEntityCard } from './PisellEntityCard';
3
+ declare const meta: Meta<typeof PisellEntityCard>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof PisellEntityCard>;
6
+ /** 默认:横向 B2,主文案 + 次级 + 头像 */
7
+ export declare const Default: Story;
8
+ /** 仅主文案(最小) */
9
+ export declare const PrimaryOnly: Story;
10
+ /** 主文案 + 头像 一行 */
11
+ export declare const B1Line: Story;
12
+ /** B2 横向:头像 + 主 + 次级两行 */
13
+ export declare const B2Horizontal: Story;
14
+ /** B2 竖向 */
15
+ export declare const B2Vertical: Story;
16
+ /** B5:次级最多 5 行 */
17
+ export declare const B5Standard: Story;
18
+ /** B9 全部展示 */
19
+ export declare const B9Extended: Story;
20
+ /** Action 区域默认关闭(不传 showActions 或 showActions: false) */
21
+ export declare const ActionDefaultOff: Story;
22
+ /** Action 仅文本 */
23
+ export declare const ActionTextOnly: Story;
24
+ /** Action 仅按钮 */
25
+ export declare const ActionButtonOnly: Story;
26
+ /** Action 仅图标(Figma 支持右侧按钮 - 编辑图标) */
27
+ export declare const ActionIconOnly: Story;
28
+ /** Action 混合:文本 + 按钮 + 图标,并各自自定义样式 */
29
+ export declare const ActionMixedWithCustomStyle: Story;
30
+ /** 带底部操作(兼容旧名) */
31
+ export declare const WithActions: Story;
32
+ /** 左滑删除(需在真机或模拟 touch 下左滑验证) */
33
+ export declare const SwipeToDelete: Story;
34
+ /** 标签 inline */
35
+ export declare const TagPositionInline: Story;
36
+ /** 宽度撑满父容器 */
37
+ export declare const WidthFull: Story;
38
+ /** 自定义主文案插槽 */
39
+ export declare const SlotPrimary: Story;
40
+ /** 缩略图类型媒体 */
41
+ export declare const MediaThumbnail: Story;
42
+ /** 图标类型媒体 */
43
+ export declare const MediaIcon: Story;
44
+ /** 可点击卡片 */
45
+ export declare const Clickable: Story;
46
+ /** 禁用态 */
47
+ export declare const Disabled: Story;