@pisell/materials 1.0.1034 → 1.0.1035

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 (254) 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 +1 -1
  6. package/build/lowcode/preview.js +17 -17
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +18 -23
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +27 -32
  11. package/es/components/Pagination/index.js +1 -1
  12. package/es/components/PisellCards/index.d.ts +6 -6
  13. package/es/components/calendar/index.d.ts +2 -2
  14. package/es/components/checkbox/index.d.ts +2 -2
  15. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
  16. package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +2 -2
  17. package/es/components/dataSourceComponents/fields/Input.Password/index.d.ts +2 -2
  18. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +3 -3
  19. package/es/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +2 -2
  20. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  21. package/es/components/date-picker/index.d.ts +2 -2
  22. package/es/components/filter/components/Dropdown/index.js +6 -2
  23. package/es/components/filter/components/FilterButton/index.js +3 -2
  24. package/es/components/filter/components/FilterButton/types.d.ts +5 -2
  25. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +67 -0
  26. package/es/components/filter/components/FilterItem/index.js +105 -6
  27. package/es/components/filter/components/FilterItem/index.less +90 -0
  28. package/es/components/filter/types.d.ts +4 -2
  29. package/es/components/input/index.d.ts +2 -2
  30. package/es/components/pisell-config-provider/context.d.ts +2 -2
  31. package/es/components/pisellCurrency/PisellCurrency.less +163 -25
  32. package/es/components/pisellDatePicker/index.d.ts +2 -2
  33. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +11 -10
  34. package/es/components/pisellDateTimeDisplay/types.d.ts +5 -0
  35. package/es/components/pisellEmail/PisellEmail.d.ts +2 -33
  36. package/es/components/pisellEmail/PisellEmail.js +1 -1
  37. package/es/components/pisellEmail/PisellEmail.less +119 -10
  38. package/es/components/pisellEmail/index.d.ts +1 -1
  39. package/es/components/pisellFilter/docs/PisellFilter.md +289 -232
  40. package/es/components/pisellFilter/index.js +66 -11
  41. package/es/components/pisellLongText/PisellLongText.less +72 -4
  42. package/es/components/pisellLookup/PisellLookup.js +3 -3
  43. package/es/components/pisellLookup/PisellLookup.less +14 -9
  44. package/es/components/pisellLookup/components/LookupTrigger.js +6 -2
  45. package/es/components/pisellMetricCard/PisellMetricCard.d.ts +38 -0
  46. package/es/components/pisellMetricCard/PisellMetricCard.js +136 -0
  47. package/es/components/pisellMetricCard/components/MetricComparison.js +54 -0
  48. package/es/components/pisellMetricCard/components/MetricTitle.js +41 -0
  49. package/es/components/pisellMetricCard/components/MetricValue.js +26 -0
  50. package/es/components/pisellMetricCard/components/TrendIcon.js +26 -0
  51. package/es/components/pisellMetricCard/docs/pisellMetricCard.$tab-design.md +2 -6
  52. package/es/components/pisellMetricCard/index.d.ts +2 -0
  53. package/es/components/pisellMetricCard/types.d.ts +143 -0
  54. package/es/components/pisellMetricCard/utils/calculateTrend.js +22 -0
  55. package/es/components/pisellMetricCard/utils/formatMetricValue.js +52 -0
  56. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +151 -124
  57. package/es/components/pisellMultipleSelect/components/EditView.js +8 -1
  58. package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +18 -6
  59. package/es/components/pisellNumber/PisellNumber.less +135 -17
  60. package/es/components/pisellPercent/PisellPercent.less +142 -24
  61. package/es/components/pisellPhone/PisellPhone.less +122 -27
  62. package/es/components/pisellPhone/components/EditView.js +1 -1
  63. package/es/components/pisellPhone/components/ReadOnlyView.js +15 -5
  64. package/es/components/pisellPhone/utils/countryCodeHelper.js +1 -10
  65. package/es/components/pisellRating/PisellRating.less +20 -12
  66. package/es/components/pisellRecordBoard/PisellRecordBoard.js +148 -0
  67. package/es/components/pisellRecordBoard/README.md +183 -0
  68. package/es/components/pisellRecordBoard/context/RecordBoardContext.js +7 -0
  69. package/es/components/pisellRecordBoard/context/RecordBoardProvider.js +14 -0
  70. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-design.md +128 -0
  71. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-dev.md +82 -0
  72. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-test.md +70 -0
  73. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.md +552 -0
  74. package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.d.ts +20 -0
  75. package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.js +16 -0
  76. package/es/components/pisellRecordBoard/index.d.ts +40 -0
  77. package/es/components/pisellRecordBoard/index.js +28 -0
  78. package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.d.ts +15 -0
  79. package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.js +24 -0
  80. package/es/components/pisellRecordBoard/layouts/CardLayout/index.d.ts +15 -0
  81. package/es/components/pisellRecordBoard/layouts/CardLayout/index.js +21 -0
  82. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +17 -0
  83. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +105 -0
  84. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +13 -0
  85. package/es/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +15 -0
  86. package/es/components/pisellRecordBoard/layouts/GridLayout/index.js +21 -0
  87. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +12 -0
  88. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +69 -0
  89. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +40 -0
  90. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +60 -0
  91. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  92. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +17 -0
  93. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +52 -0
  94. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.less +61 -0
  95. package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +13 -0
  96. package/es/components/pisellRecordBoard/shellFrame/Search/index.js +34 -0
  97. package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +77 -0
  98. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +14 -0
  99. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +136 -0
  100. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +2 -0
  101. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +62 -0
  102. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +2 -0
  103. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +45 -0
  104. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  105. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +27 -0
  106. package/es/components/pisellRecordBoard/shellFrame/index.js +38 -0
  107. package/es/components/pisellRecordBoard/types.d.ts +259 -0
  108. package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +287 -0
  109. package/es/components/pisellShellFrame/PisellShellFrame.d.ts +16 -0
  110. package/es/components/pisellShellFrame/PisellShellFrame.js +60 -0
  111. package/es/components/pisellShellFrame/PisellShellFrame.less +73 -0
  112. package/es/components/pisellShellFrame/README.md +58 -0
  113. package/es/components/pisellShellFrame/index.d.ts +2 -0
  114. package/es/components/pisellShellFrame/types.d.ts +60 -0
  115. package/es/components/pisellSingleSelect/PisellSingleSelect.less +88 -46
  116. package/es/components/pisellSingleSelect/components/EditView.js +8 -1
  117. package/es/components/pisellSingleSelect/components/ReadOnlyView.js +8 -2
  118. package/es/components/pisellUrl/PisellUrl.d.ts +2 -33
  119. package/es/components/pisellUrl/PisellUrl.js +1 -1
  120. package/es/components/pisellUrl/PisellUrl.less +120 -11
  121. package/es/components/pisellUrl/index.d.ts +1 -1
  122. package/es/components/radio/index.d.ts +2 -2
  123. package/es/components/section-footers/index.d.ts +2 -2
  124. package/es/components/skeleton/index.d.ts +2 -2
  125. package/es/components/sort/index.js +12 -1
  126. package/es/components/sort/types.d.ts +8 -2
  127. package/es/components/time-picker/index.d.ts +2 -2
  128. package/es/index.d.ts +19 -11
  129. package/es/index.js +19 -15
  130. package/es/locales/en-US.js +16 -2
  131. package/es/locales/zh-CN.js +18 -4
  132. package/es/locales/zh-TW.js +18 -4
  133. package/es/utils/tagColor.js +31 -0
  134. package/lib/components/Pagination/index.js +1 -1
  135. package/lib/components/checkbox/index.d.ts +2 -2
  136. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
  137. package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +2 -2
  138. package/lib/components/dataSourceComponents/fields/Input.Password/index.d.ts +2 -2
  139. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  140. package/lib/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +2 -2
  141. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  142. package/lib/components/filter/components/Dropdown/index.js +6 -2
  143. package/lib/components/filter/components/FilterButton/index.js +3 -2
  144. package/lib/components/filter/components/FilterButton/types.d.ts +5 -2
  145. package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +69 -0
  146. package/lib/components/filter/components/FilterItem/index.js +106 -6
  147. package/lib/components/filter/components/FilterItem/index.less +90 -0
  148. package/lib/components/filter/types.d.ts +4 -2
  149. package/lib/components/input/index.d.ts +2 -2
  150. package/lib/components/pisell-config-provider/context.d.ts +2 -2
  151. package/lib/components/pisellCurrency/PisellCurrency.less +163 -25
  152. package/lib/components/pisellDatePicker/index.d.ts +2 -2
  153. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +11 -10
  154. package/lib/components/pisellDateTimeDisplay/types.d.ts +5 -0
  155. package/lib/components/pisellEmail/PisellEmail.d.ts +2 -33
  156. package/lib/components/pisellEmail/PisellEmail.js +1 -1
  157. package/lib/components/pisellEmail/PisellEmail.less +119 -10
  158. package/lib/components/pisellEmail/index.d.ts +1 -1
  159. package/lib/components/pisellFilter/docs/PisellFilter.md +289 -232
  160. package/lib/components/pisellFilter/index.js +65 -10
  161. package/lib/components/pisellLongText/PisellLongText.less +72 -4
  162. package/lib/components/pisellLookup/PisellLookup.js +3 -3
  163. package/lib/components/pisellLookup/PisellLookup.less +14 -9
  164. package/lib/components/pisellLookup/components/LookupTrigger.js +6 -2
  165. package/lib/components/pisellMetricCard/PisellMetricCard.d.ts +38 -0
  166. package/lib/components/pisellMetricCard/PisellMetricCard.js +138 -0
  167. package/lib/components/pisellMetricCard/components/MetricComparison.js +56 -0
  168. package/lib/components/pisellMetricCard/components/MetricTitle.js +43 -0
  169. package/lib/components/pisellMetricCard/components/MetricValue.js +28 -0
  170. package/lib/components/pisellMetricCard/components/TrendIcon.js +28 -0
  171. package/lib/components/pisellMetricCard/docs/pisellMetricCard.$tab-design.md +2 -6
  172. package/lib/components/pisellMetricCard/index.d.ts +2 -0
  173. package/lib/components/pisellMetricCard/types.d.ts +143 -0
  174. package/lib/components/pisellMetricCard/utils/calculateTrend.js +23 -0
  175. package/lib/components/pisellMetricCard/utils/formatMetricValue.js +53 -0
  176. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +151 -124
  177. package/lib/components/pisellMultipleSelect/components/EditView.js +7 -0
  178. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +17 -5
  179. package/lib/components/pisellNumber/PisellNumber.less +135 -17
  180. package/lib/components/pisellPercent/PisellPercent.less +142 -24
  181. package/lib/components/pisellPhone/PisellPhone.less +122 -27
  182. package/lib/components/pisellPhone/components/EditView.js +1 -1
  183. package/lib/components/pisellPhone/components/ReadOnlyView.js +15 -5
  184. package/lib/components/pisellPhone/utils/countryCodeHelper.js +0 -10
  185. package/lib/components/pisellRating/PisellRating.less +20 -12
  186. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +150 -0
  187. package/lib/components/pisellRecordBoard/README.md +183 -0
  188. package/lib/components/pisellRecordBoard/context/RecordBoardContext.js +8 -0
  189. package/lib/components/pisellRecordBoard/context/RecordBoardProvider.js +16 -0
  190. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-design.md +128 -0
  191. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-dev.md +82 -0
  192. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-test.md +70 -0
  193. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.md +552 -0
  194. package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.d.ts +20 -0
  195. package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.js +17 -0
  196. package/lib/components/pisellRecordBoard/index.d.ts +40 -0
  197. package/lib/components/pisellRecordBoard/index.js +28 -0
  198. package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.d.ts +15 -0
  199. package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.js +26 -0
  200. package/lib/components/pisellRecordBoard/layouts/CardLayout/index.d.ts +15 -0
  201. package/lib/components/pisellRecordBoard/layouts/CardLayout/index.js +23 -0
  202. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +17 -0
  203. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +107 -0
  204. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +13 -0
  205. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +15 -0
  206. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.js +23 -0
  207. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +12 -0
  208. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +71 -0
  209. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +43 -0
  210. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +62 -0
  211. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  212. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +17 -0
  213. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +54 -0
  214. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.less +61 -0
  215. package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +13 -0
  216. package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +36 -0
  217. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +77 -0
  218. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +14 -0
  219. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +139 -0
  220. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +64 -0
  221. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +2 -0
  222. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +47 -0
  223. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  224. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
  225. package/lib/components/pisellRecordBoard/shellFrame/index.js +40 -0
  226. package/lib/components/pisellRecordBoard/types.d.ts +259 -0
  227. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +292 -0
  228. package/lib/components/pisellShellFrame/PisellShellFrame.d.ts +16 -0
  229. package/lib/components/pisellShellFrame/PisellShellFrame.js +62 -0
  230. package/lib/components/pisellShellFrame/PisellShellFrame.less +73 -0
  231. package/lib/components/pisellShellFrame/README.md +58 -0
  232. package/lib/components/pisellShellFrame/index.d.ts +2 -0
  233. package/lib/components/pisellShellFrame/types.d.ts +60 -0
  234. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +88 -46
  235. package/lib/components/pisellSingleSelect/components/EditView.js +7 -0
  236. package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +8 -2
  237. package/lib/components/pisellUrl/PisellUrl.d.ts +2 -33
  238. package/lib/components/pisellUrl/PisellUrl.js +1 -1
  239. package/lib/components/pisellUrl/PisellUrl.less +120 -11
  240. package/lib/components/pisellUrl/index.d.ts +1 -1
  241. package/lib/components/radio/index.d.ts +2 -2
  242. package/lib/components/section-footers/index.d.ts +2 -2
  243. package/lib/components/skeleton/index.d.ts +2 -2
  244. package/lib/components/sort/index.js +12 -1
  245. package/lib/components/sort/types.d.ts +8 -2
  246. package/lib/components/time-picker/index.d.ts +2 -2
  247. package/lib/components/upload/index.d.ts +2 -2
  248. package/lib/index.d.ts +19 -11
  249. package/lib/index.js +33 -25
  250. package/lib/locales/en-US.js +16 -2
  251. package/lib/locales/zh-CN.js +18 -4
  252. package/lib/locales/zh-TW.js +18 -4
  253. package/lib/utils/tagColor.js +32 -0
  254. package/package.json +3 -3
@@ -254,9 +254,7 @@ https://www.figma.com/design/pM8Ho6d7kCMv9vIBvFHUlj/Pisell-2.0-Component-Library
254
254
  - 显示数值 "3249"
255
255
  - 显示环比 "v.s. pre -230" + 红色下降箭头
256
256
 
257
- ## 7.4 带副标题和标签示例
258
-
259
- ```
257
+ ## 7.4 带副标题和标签示例```
260
258
  <PisellMetricCard
261
259
  title="Active Users"
262
260
  subtitle="Last 30 days"
@@ -317,7 +315,5 @@ https://www.figma.com/design/pM8Ho6d7kCMv9vIBvFHUlj/Pisell-2.0-Component-Library
317
315
 
318
316
  - 使用 Ant Design 图标库:`ArrowUpOutlined`、`ArrowDownOutlined`
319
317
  - 根据 `comparison` 值自动判断正负
320
- - 正值显示绿色上升箭头,负值显示红色下降箭头
321
-
322
- ## 8.4 响应式设计- 支持移动端、平板、PC 端自适应
318
+ - 正值显示绿色上升箭头,负值显示红色下降箭头## 8.4 响应式设计- 支持移动端、平板、PC 端自适应
323
319
  - 可根据容器宽度自动调整布局
@@ -0,0 +1,2 @@
1
+ import { PisellMetricCardProps } from "./types.js";
2
+ import { PisellMetricCard } from "./PisellMetricCard.js";
@@ -0,0 +1,143 @@
1
+ import { CSSProperties, ReactNode } from "react";
2
+
3
+ //#region src/components/pisellMetricCard/types.d.ts
4
+ /**
5
+ * 数值格式化配置
6
+ */
7
+ interface ValueFormatConfig {
8
+ /** 小数精度(小数位数),默认 0 */
9
+ precision?: number;
10
+ /** 是否使用千分位分隔符,默认 false */
11
+ useGrouping?: boolean;
12
+ /** 是否显示货币符号,默认 false */
13
+ showCurrencySymbol?: boolean;
14
+ /** 货币符号(如 $, ¥),默认 '' */
15
+ currencySymbol?: string;
16
+ /** 自定义格式化函数 */
17
+ formatter?: (value: number | null) => string;
18
+ /** 整数时隐藏小数部分,默认 true */
19
+ hideDecimalForWholeNumbers?: boolean;
20
+ }
21
+ /**
22
+ * 环比配置
23
+ */
24
+ interface ComparisonConfig {
25
+ /** 环比数值(支持正负值) */
26
+ value: number | string | null;
27
+ /** 环比前缀文本,默认 'v.s. pre' */
28
+ text?: string;
29
+ /** 是否显示趋势箭头,默认 true */
30
+ showTrendIcon?: boolean;
31
+ /** 正向趋势颜色,默认 '#52c41a' */
32
+ positiveColor?: string;
33
+ /** 负向趋势颜色,默认 '#ff4d4f' */
34
+ negativeColor?: string;
35
+ /** 环比字号,默认 14 */
36
+ size?: number | string;
37
+ }
38
+ /**
39
+ * 样式配置
40
+ */
41
+ interface MetricCardStyleConfig {
42
+ /** 卡片容器样式 */
43
+ card?: {
44
+ /** 是否显示边框,默认 true */bordered?: boolean; /** 圆角大小(px),默认 12 */
45
+ borderRadius?: number; /** 内边距(px),默认 16 */
46
+ padding?: number; /** 阴影效果,默认 true */
47
+ shadow?: boolean | string; /** 背景色,默认 '#ffffff' */
48
+ background?: string; /** 卡片宽度,默认 'auto' */
49
+ width?: string | number;
50
+ };
51
+ /** 标题样式 */
52
+ title?: {
53
+ /** 字号,默认 14 */size?: number | string; /** 字重,默认 400 */
54
+ weight?: number | string; /** 颜色,默认 'rgba(0, 0, 0, 0.45)' */
55
+ color?: string;
56
+ };
57
+ /** 数值样式 */
58
+ value?: {
59
+ /** 字号,默认 30 */size?: number | string; /** 字重,默认 600 */
60
+ weight?: number | string; /** 颜色,默认 'rgba(0, 0, 0, 0.85)' */
61
+ color?: string;
62
+ };
63
+ }
64
+ /**
65
+ * PisellMetricCard 组件 Props
66
+ *
67
+ * 采用扁平 + 对象组合的设计,降低复杂度和耦合
68
+ *
69
+ * @example 基础用法
70
+ * ```tsx
71
+ * <PisellMetricCard
72
+ * title="Total Sales"
73
+ * value={1580}
74
+ * />
75
+ * ```
76
+ *
77
+ * @example 带格式化和环比
78
+ * ```tsx
79
+ * <PisellMetricCard
80
+ * title="Revenue"
81
+ * value={1580}
82
+ * format={{
83
+ * showCurrencySymbol: true,
84
+ * currencySymbol: '$',
85
+ * useGrouping: true
86
+ * }}
87
+ * comparison={{
88
+ * value: 120,
89
+ * text: 'v.s. last month'
90
+ * }}
91
+ * />
92
+ * ```
93
+ */
94
+ interface PisellMetricCardProps {
95
+ /** 标题文本 */
96
+ title: string | ReactNode;
97
+ /** 主数值 */
98
+ value: number | string | null;
99
+ /** 副标题文本(可选) */
100
+ subtitle?: string | ReactNode;
101
+ /** 标签内容(可选) */
102
+ tag?: ReactNode;
103
+ /** 提示信息内容(可选) */
104
+ tooltip?: string | ReactNode;
105
+ /**
106
+ * 数值格式化配置
107
+ * @example format={{ precision: 2, useGrouping: true, currencySymbol: '$' }}
108
+ */
109
+ format?: ValueFormatConfig;
110
+ /**
111
+ * 环比配置
112
+ * @example comparison={{ value: 120, text: 'v.s. pre' }}
113
+ */
114
+ comparison?: ComparisonConfig;
115
+ /**
116
+ * 样式配置
117
+ * @example
118
+ * styleConfig={{
119
+ * card: { borderRadius: 8, padding: 24 },
120
+ * title: { size: 16, weight: 600 },
121
+ * value: { size: 36, color: '#1890ff' }
122
+ * }}
123
+ */
124
+ styleConfig?: MetricCardStyleConfig;
125
+ /** 是否显示副标题,默认 false */
126
+ showSubtitle?: boolean;
127
+ /** 是否显示标签,默认 false */
128
+ showTag?: boolean;
129
+ /** 是否显示提示信息,默认 false */
130
+ showTooltip?: boolean;
131
+ /** 是否显示加载状态,默认 false */
132
+ loading?: boolean;
133
+ /** 鼠标悬停是否有交互效果,默认 true */
134
+ hoverable?: boolean;
135
+ /** 自定义类名 */
136
+ className?: string;
137
+ /** 自定义样式 */
138
+ style?: CSSProperties;
139
+ /** 点击卡片回调 */
140
+ onClick?: () => void;
141
+ }
142
+ //#endregion
143
+ export { PisellMetricCardProps };
@@ -0,0 +1,22 @@
1
+ //#region src/components/pisellMetricCard/utils/calculateTrend.ts
2
+ /**
3
+ * 计算趋势方向
4
+ *
5
+ * @param comparison 环比数值
6
+ * @returns 'up' | 'down' | 'neutral'
7
+ *
8
+ * @example
9
+ * calculateTrend(120) // 'up'
10
+ * calculateTrend(-230) // 'down'
11
+ * calculateTrend(0) // 'neutral'
12
+ * calculateTrend(null) // 'neutral'
13
+ */
14
+ function calculateTrend(comparison) {
15
+ if (comparison === null || comparison === void 0) return "neutral";
16
+ const numComparison = typeof comparison === "string" ? parseFloat(comparison) : comparison;
17
+ if (isNaN(numComparison) || numComparison === 0) return "neutral";
18
+ return numComparison > 0 ? "up" : "down";
19
+ }
20
+
21
+ //#endregion
22
+ export { calculateTrend };
@@ -0,0 +1,52 @@
1
+ import { formatAmountWithOptions } from "@pisell/utils";
2
+
3
+ //#region src/components/pisellMetricCard/utils/formatMetricValue.ts
4
+ /**
5
+ * 格式化指标数值
6
+ *
7
+ * 支持以下格式化选项:
8
+ * - 小数精度控制
9
+ * - 千分位分隔符
10
+ * - 货币符号显示
11
+ * - 自定义格式化函数
12
+ * - 整数时隐藏小数部分
13
+ *
14
+ * @param value 数值
15
+ * @param options 格式化选项
16
+ * @returns 格式化后的字符串,null 时返回 null
17
+ *
18
+ * @example
19
+ * formatMetricValue(1234.56, { precision: 2, useGrouping: true })
20
+ * // 返回: "1,234.56"
21
+ *
22
+ * @example
23
+ * formatMetricValue(1580, {
24
+ * showCurrencySymbol: true,
25
+ * currencySymbol: '$'
26
+ * })
27
+ * // 返回: "$1580"
28
+ *
29
+ * @example
30
+ * formatMetricValue(100.00, {
31
+ * precision: 2,
32
+ * hideDecimalForWholeNumbers: true
33
+ * })
34
+ * // 返回: "100"
35
+ */
36
+ function formatMetricValue(value, options = {}) {
37
+ var _options$precision, _options$useGrouping, _options$showCurrency, _options$hideDecimalF;
38
+ if (value === null || value === void 0) return null;
39
+ const numValue = typeof value === "string" ? parseFloat(value) : value;
40
+ if (isNaN(numValue)) return null;
41
+ if (options.formatter) return options.formatter(numValue);
42
+ const formatted = formatAmountWithOptions(numValue, options.currencySymbol || "", {
43
+ precision: (_options$precision = options.precision) !== null && _options$precision !== void 0 ? _options$precision : 0,
44
+ useThousandsSeparator: (_options$useGrouping = options.useGrouping) !== null && _options$useGrouping !== void 0 ? _options$useGrouping : false,
45
+ showCurrencySymbol: (_options$showCurrency = options.showCurrencySymbol) !== null && _options$showCurrency !== void 0 ? _options$showCurrency : false,
46
+ hideDecimalForWholeNumbers: (_options$hideDecimalF = options.hideDecimalForWholeNumbers) !== null && _options$hideDecimalF !== void 0 ? _options$hideDecimalF : true
47
+ });
48
+ return String(formatted);
49
+ }
50
+
51
+ //#endregion
52
+ export { formatMetricValue };
@@ -1,53 +1,131 @@
1
1
  /**
2
2
  * PisellMultipleSelect 组件样式
3
- *
4
- * 注意:大部分样式通过 tokens.ts 中的 Select Token 配置实现
5
- * 此文件仅包含 Token 无法实现的样式
3
+ * 基于 Figma 设计规范,覆盖时使用 pisell-lowcode-xxx
6
4
  */
7
5
 
8
6
  .pisell-multiple-select {
7
+ height: 48px !important;
9
8
  width: 100%;
10
9
 
11
- // 包装器布局(Token 无法配置)
10
+ // Select 触发器(Figma 设计规范,与 SingleSelect / Input 体系一致)
11
+ .pisell-lowcode-select:not(.pisell-lowcode-select-disabled):not(.pisell-lowcode-select-customize-input) {
12
+ .pisell-lowcode-select-selector {
13
+ font-size: 16px !important;
14
+ line-height: 24px !important;
15
+ border-radius: 8px !important;
16
+ border: 1px solid #d0d5dd !important; // Gray/300
17
+ padding: 12px 16px !important;
18
+ min-height: 48px !important;
19
+ color: #101828 !important; // Gray/900
20
+ background-color: #ffffff !important;
21
+ }
22
+
23
+ // 多选模式:内边距适配标签,高度保持 48px
24
+ &.pisell-lowcode-select-multiple .pisell-lowcode-select-selector {
25
+ padding: 6px 16px !important;
26
+ min-height: 48px !important;
27
+ }
28
+
29
+ &.pisell-lowcode-select-open .pisell-lowcode-select-selector {
30
+ border-color: #d6bbfb !important; // Primary/300
31
+ box-shadow: 0 0 0 4px #f4ebff !important; // Primary/100
32
+ }
33
+
34
+ &:not(.pisell-lowcode-select-open):not(.pisell-lowcode-select-disabled)
35
+ .pisell-lowcode-select-selector:hover {
36
+ border-color: #b692f6 !important; // Primary/400
37
+ }
38
+
39
+ &.pisell-lowcode-select-disabled .pisell-lowcode-select-selector {
40
+ background-color: #f9fafb !important; // Gray/50
41
+ color: #98a2b3 !important; // Gray/400
42
+ border-color: #d0d5dd !important;
43
+ cursor: not-allowed !important;
44
+ }
45
+
46
+ .pisell-lowcode-select-selection-placeholder {
47
+ color: #667085 !important; // Gray/500
48
+ }
49
+
50
+ .pisell-lowcode-select-arrow {
51
+ color: #667085;
52
+ }
53
+
54
+ .pisell-lowcode-select-clear {
55
+ color: #667085;
56
+
57
+ &:hover {
58
+ color: #344054;
59
+ }
60
+ }
61
+
62
+ // 多选标签(选择后展示的 item)高度 36px
63
+ .pisell-lowcode-select-selection-item {
64
+ border-radius: 6px !important;
65
+ padding: 0 10px !important;
66
+ margin-inline-end: 4px !important;
67
+ height: 36px !important;
68
+ min-height: 36px !important;
69
+ line-height: 36px !important;
70
+
71
+ &-content {
72
+ line-height: 36px !important;
73
+ }
74
+
75
+ &-remove {
76
+ margin-left: 4px !important;
77
+
78
+ &:hover {
79
+ background-color: transparent !important;
80
+ }
81
+ }
82
+ }
83
+ }
84
+
12
85
  &-wrapper {
13
86
  display: flex;
14
87
  flex-direction: column;
15
88
  gap: 8px;
89
+ position: relative;
90
+
91
+ // 下拉选项高度 48px(通过 getPopupContainer 挂到 wrapper 内,无需 :global)
92
+ .pisell-multiple-select-dropdown .pisell-lowcode-select-item {
93
+ min-height: 48px !important;
94
+ height: 48px !important;
95
+ line-height: 48px !important;
96
+ padding: 0 16px !important;
97
+ font-size: 16px !important;
98
+ }
16
99
  }
17
100
 
18
- // 标签(Token 无法配置的自定义元素)
19
101
  &-label {
20
- font-family: 'Inter', sans-serif;
21
102
  font-size: 14px;
22
103
  font-weight: 600;
23
- color: #344054;
104
+ color: #344054; // Gray/700
24
105
  line-height: 20px;
25
106
 
26
107
  &-required::after {
27
108
  content: ' *';
28
- color: #D92D20;
109
+ color: #d92d20; // Error/600
29
110
  margin-left: 0;
30
111
  }
31
112
  }
32
113
 
33
- // 辅助文本(Token 无法配置的自定义元素)
34
114
  &-helper-text {
35
115
  font-size: 14px;
36
116
  font-weight: 400;
37
- color: #667085;
117
+ color: #667085; // Gray/500
38
118
  line-height: 20px;
39
119
  }
40
120
 
41
- // 错误文本(Token 无法配置的自定义元素)
42
121
  &-error-text {
43
- font-size: 14px;
122
+ font-size: 12px;
44
123
  font-weight: 400;
45
- color: #D92D20;
46
- line-height: 20px;
47
- animation: fadeIn 0.3s ease-in-out;
124
+ color: #d92d20; // Error/600
125
+ line-height: 1.5;
126
+ animation: pisell-multiple-select-fadeIn 0.3s ease-in-out;
48
127
  }
49
128
 
50
- // 下拉选项中的勾选图标(Figma 设计)
51
129
  &-option-content {
52
130
  display: flex;
53
131
  align-items: center;
@@ -56,99 +134,34 @@
56
134
  }
57
135
 
58
136
  &-option-check {
59
- color: #7F56D9; // Primary/600
137
+ color: #7f56d9; // Primary/600
60
138
  font-size: 16px;
61
139
  margin-left: 8px;
62
140
  }
63
141
 
64
- // 多选模式下的特殊样式(Token 部分支持,Less 补充细节)
65
- :global {
66
- // 选择框垂直内边距(多选时需要更小的内边距以容纳标签)
67
- .pisell-lowcode-select-multiple .pisell-lowcode-select-selector {
68
- padding: 6px 16px !important;
69
- }
70
-
71
- // 标签圆角(Token 不支持 multipleItemBorderRadius)
72
- .pisell-lowcode-select-selection-item {
73
- border-radius: 6px !important;
74
- padding: 6px 10px !important;
75
- margin-inline-end: 4px !important;
76
-
77
- // 确保标签内容垂直居中
78
- &-content {
79
- line-height: 24px !important;
80
- }
81
-
82
- // 删除图标样式微调
83
- &-remove {
84
- margin-left: 4px !important;
85
-
86
- &:hover {
87
- background-color: transparent !important;
88
- }
89
- }
90
- }
91
-
92
- // hover 边框颜色(Token 不支持 colorBorderHover)
93
- .pisell-lowcode-select-multiple:not(.pisell-lowcode-select-disabled):not(.pisell-lowcode-select-customize-input):not(.ant-select-open) {
94
- .ant-select-selector:hover {
95
- border-color: #D6BBFB !important;
96
- }
97
- }
98
- }
99
- }
100
-
101
- // 下拉框内的搜索框样式(Figma 设计)
102
- :global {
103
- .pisell-select-search-wrapper {
104
- padding: 6px;
105
- border-bottom: 1px solid #EAECF0;
106
- }
107
-
108
- .pisell-select-search-input {
109
- padding: 9px 10px !important;
110
- font-size: 14px;
111
-
112
- .ant-input {
113
- font-size: 14px !important;
114
- color: #344054 !important;
115
-
116
- &::placeholder {
117
- color: #98A2B3 !important;
118
- font-size: 12px !important;
119
- }
120
- }
121
-
122
- &:hover,
123
- &:focus-within {
124
- background-color: transparent !important;
125
- }
126
- }
127
- }
128
-
129
- .pisell-multiple-select {
130
- // 错误状态(Token 无法单独配置错误边框颜色)
142
+ // 错误状态(Figma 设计体系 Error 色)
131
143
  &-error {
132
- :global(.ant-select-selector) {
133
- border-color: #D92D20 !important;
144
+ .pisell-lowcode-select .pisell-lowcode-select-selector {
145
+ border-color: #fda29b !important; // Error/300
134
146
 
135
147
  &:hover {
136
- border-color: #D92D20 !important;
148
+ border-color: #f97066 !important; // Error/400
137
149
  }
138
150
  }
139
151
 
140
- :global(.ant-select-focused .ant-select-selector) {
141
- border-color: #D92D20 !important;
142
- box-shadow: 0px 0px 0px 4px rgba(217, 45, 32, 0.1), 0px 1px 2px 0px rgba(16, 24, 40, 0.05) !important;
152
+ .pisell-lowcode-select.pisell-lowcode-select-focused .pisell-lowcode-select-selector,
153
+ .pisell-lowcode-select.pisell-lowcode-select-open .pisell-lowcode-select-selector {
154
+ border-color: #f97066 !important; // Error/400
155
+ box-shadow: 0 0 0 4px #fee4e2 !important; // Error/100
143
156
  }
144
157
  }
145
158
 
146
- // 自定义聚合标签样式(用于 maxTagPlaceholder 返回的元素,不受 Token 控制)
159
+ // 聚合标签(maxTagPlaceholder
147
160
  &-more-tag {
148
161
  display: inline-flex;
149
162
  align-items: center;
150
- background-color: #EAECF0;
151
- color: #344054;
163
+ background-color: #eaecf0;
164
+ color: #344054; // Gray/700
152
165
  border: none;
153
166
  border-radius: 6px;
154
167
  padding: 6px 10px;
@@ -159,35 +172,28 @@
159
172
  transition: background-color 0.2s ease;
160
173
 
161
174
  &:hover {
162
- background-color: #D0D5DD;
175
+ background-color: #d0d5dd; // Gray/300
163
176
  }
164
177
  }
165
178
 
166
- // 只读状态(完全自定义的显示,不使用 Select 组件)
179
+ // 只读状态
167
180
  &-readonly {
168
181
  &-display {
169
182
  display: flex;
170
183
  flex-wrap: wrap;
171
184
  gap: 4px;
172
- padding: 12px 16px;
173
- background-color: #F9FAFB;
174
- border: 1px solid #EAECF0;
175
- border-radius: 8px;
176
- min-height: 48px;
185
+ align-items: center;
186
+ min-height: 24px;
177
187
  }
178
188
 
179
189
  &-tag {
180
- display: inline-flex;
181
- align-items: center;
182
- gap: 4px;
183
- padding: 6px 10px;
184
- background-color: #EAECF0;
185
- border: none;
186
- border-radius: 6px;
187
- font-size: 16px;
188
- font-weight: 500;
189
- line-height: 24px;
190
- color: #344054;
190
+ margin: 0;
191
+ cursor: default;
192
+ border-radius: 12px;
193
+ border: 1px solid transparent;
194
+ font-size: 14px;
195
+ line-height: 22px;
196
+ padding: 2px 10px;
191
197
 
192
198
  &-icon {
193
199
  display: flex;
@@ -196,17 +202,13 @@
196
202
  }
197
203
 
198
204
  &-more-tag {
199
- display: inline-flex;
200
- align-items: center;
201
- padding: 6px 10px;
202
- background-color: #EAECF0;
203
- color: #344054;
204
- border: none;
205
- border-radius: 6px;
206
- font-size: 16px;
207
- font-weight: 500;
208
- line-height: 24px;
209
- cursor: pointer;
205
+ margin: 0;
206
+ cursor: default;
207
+ border-radius: 12px;
208
+ border: 1px solid transparent;
209
+ font-size: 14px;
210
+ line-height: 22px;
211
+ padding: 2px 10px;
210
212
  }
211
213
 
212
214
  &-empty {
@@ -218,8 +220,33 @@
218
220
  }
219
221
  }
220
222
 
221
- // 动画
222
- @keyframes fadeIn {
223
+ // 下拉内搜索框(在 dropdown 内)
224
+ .pisell-select-search-wrapper {
225
+ padding: 6px;
226
+ border-bottom: 1px solid #eaecf0;
227
+ }
228
+
229
+ .pisell-select-search-input {
230
+ padding: 9px 10px !important;
231
+ font-size: 14px;
232
+
233
+ .pisell-lowcode-input {
234
+ font-size: 14px !important;
235
+ color: #344054 !important;
236
+
237
+ &::placeholder {
238
+ color: #98a2b3 !important;
239
+ font-size: 12px !important;
240
+ }
241
+ }
242
+
243
+ &:hover,
244
+ &:focus-within {
245
+ background-color: transparent !important;
246
+ }
247
+ }
248
+
249
+ @keyframes pisell-multiple-select-fadeIn {
223
250
  from {
224
251
  opacity: 0;
225
252
  transform: translateY(-4px);
@@ -2,7 +2,7 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.108.0/
2
2
  import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js";
3
3
  import { Input, Select, Tooltip } from "antd";
4
4
  import classNames from "classnames";
5
- import React, { forwardRef, useCallback, useMemo, useState } from "react";
5
+ import React, { forwardRef, useCallback, useMemo, useRef, useState } from "react";
6
6
  import { useDebouncedSearch } from "@pisell/utils";
7
7
  import { CheckOutlined, SearchOutlined } from "@ant-design/icons";
8
8
 
@@ -61,6 +61,7 @@ const EditView = forwardRef((props, ref) => {
61
61
  filterOption,
62
62
  options
63
63
  ]);
64
+ const wrapperRef = useRef(null);
64
65
  const menuItemSelectedIcon = /* @__PURE__ */ React.createElement(CheckOutlined, { style: {
65
66
  color: "#7F56D9",
66
67
  fontSize: 16
@@ -93,6 +94,7 @@ const EditView = forwardRef((props, ref) => {
93
94
  return /* @__PURE__ */ React.createElement(Tooltip, { title: tooltipContent }, /* @__PURE__ */ React.createElement("span", { className: "pisell-multiple-select-more-tag" }, "+", omittedValues.length));
94
95
  }, [options, showTooltipOnOverflow]);
95
96
  return /* @__PURE__ */ React.createElement("div", {
97
+ ref: wrapperRef,
96
98
  className: classNames("pisell-multiple-select-wrapper", className),
97
99
  style
98
100
  }, label && /* @__PURE__ */ React.createElement("label", { className: classNames("pisell-multiple-select-label", { "pisell-multiple-select-label-required": required }) }, label), /* @__PURE__ */ React.createElement(Select, _objectSpread2(_objectSpread2({}, restProps), {}, {
@@ -109,6 +111,11 @@ const EditView = forwardRef((props, ref) => {
109
111
  maxTagCount,
110
112
  maxTagPlaceholder,
111
113
  size,
114
+ popupClassName: "pisell-multiple-select-dropdown",
115
+ getPopupContainer: () => {
116
+ var _wrapperRef$current;
117
+ return (_wrapperRef$current = wrapperRef.current) !== null && _wrapperRef$current !== void 0 ? _wrapperRef$current : document.body;
118
+ },
112
119
  className: classNames("pisell-multiple-select", { "pisell-multiple-select-error": error })
113
120
  })), helperText && !error && /* @__PURE__ */ React.createElement("div", { className: "pisell-multiple-select-helper-text" }, helperText), error && errorText && /* @__PURE__ */ React.createElement("div", { className: "pisell-multiple-select-error-text" }, errorText));
114
121
  });
@@ -1,4 +1,5 @@
1
- import { Tooltip } from "antd";
1
+ import { getDefaultTagColor } from "../../../utils/tagColor.js";
2
+ import { Tag, Tooltip } from "antd";
2
3
  import classNames from "classnames";
3
4
  import React, { useMemo } from "react";
4
5
  import { calculateTagDisplay, findOptionsByValues } from "@pisell/utils";
@@ -6,7 +7,7 @@ import { calculateTagDisplay, findOptionsByValues } from "@pisell/utils";
6
7
  //#region src/components/pisellMultipleSelect/components/ReadOnlyView.tsx
7
8
  /**
8
9
  * PisellMultipleSelect - ReadOnlyView (只读态视图)
9
- * 只读状态下的渲染
10
+ * 只读状态下使用 Tag 展示选中值
10
11
  */
11
12
  const ReadOnlyView = (props) => {
12
13
  const { value = [], options, label, required, maxTagCount = 3, className, style } = props;
@@ -19,10 +20,21 @@ const ReadOnlyView = (props) => {
19
20
  return /* @__PURE__ */ React.createElement("div", {
20
21
  className: classNames("pisell-multiple-select-wrapper", "pisell-multiple-select-readonly", className),
21
22
  style
22
- }, label && /* @__PURE__ */ React.createElement("label", { className: classNames("pisell-multiple-select-label", { "pisell-multiple-select-label-required": required }) }, label), /* @__PURE__ */ React.createElement("div", { className: "pisell-multiple-select-readonly-display" }, selectedOptions.length > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, tagDisplayInfo.visibleTags.map((option) => /* @__PURE__ */ React.createElement("span", {
23
- key: option.value,
24
- className: "pisell-multiple-select-readonly-tag"
25
- }, option.icon && /* @__PURE__ */ React.createElement("span", { className: "pisell-multiple-select-readonly-tag-icon" }, option.icon), option.label)), tagDisplayInfo.hiddenCount > 0 && /* @__PURE__ */ React.createElement(Tooltip, { title: tagDisplayInfo.hiddenTags.map((t) => t.label).join(", ") }, /* @__PURE__ */ React.createElement("span", { className: "pisell-multiple-select-readonly-more-tag" }, "+", tagDisplayInfo.hiddenCount))) : /* @__PURE__ */ React.createElement("span", { className: "pisell-multiple-select-readonly-empty" }, "-")));
23
+ }, label && /* @__PURE__ */ React.createElement("label", { className: classNames("pisell-multiple-select-label", { "pisell-multiple-select-label-required": required }) }, label), /* @__PURE__ */ React.createElement("div", { className: "pisell-multiple-select-readonly-display" }, selectedOptions.length > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, tagDisplayInfo.visibleTags.map((option, idx) => {
24
+ var _option$color;
25
+ return /* @__PURE__ */ React.createElement(Tag, {
26
+ key: option.value,
27
+ className: "pisell-multiple-select-readonly-tag",
28
+ color: (_option$color = option.color) !== null && _option$color !== void 0 ? _option$color : getDefaultTagColor(option.value, idx)
29
+ }, option.icon && /* @__PURE__ */ React.createElement("span", { className: "pisell-multiple-select-readonly-tag-icon" }, option.icon), option.label);
30
+ }), tagDisplayInfo.hiddenCount > 0 && /* @__PURE__ */ React.createElement(Tooltip, { title: tagDisplayInfo.hiddenTags.map((t) => t.label).join(", ") }, /* @__PURE__ */ React.createElement(Tag, {
31
+ className: "pisell-multiple-select-readonly-more-tag",
32
+ style: {
33
+ backgroundColor: "#F2F4F7",
34
+ borderColor: "#EAECF0",
35
+ color: "#667085"
36
+ }
37
+ }, "+", tagDisplayInfo.hiddenCount))) : /* @__PURE__ */ React.createElement("span", { className: "pisell-multiple-select-readonly-empty" }, "-")));
26
38
  };
27
39
  ReadOnlyView.displayName = "PisellMultipleSelectReadOnlyView";
28
40
  var ReadOnlyView_default = ReadOnlyView;