@pisell/materials 6.9.4 → 6.11.1

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 (608) hide show
  1. package/README.md +283 -1
  2. package/build/lowcode/assets-daily.json +11 -11
  3. package/build/lowcode/assets-dev.json +2 -2
  4. package/build/lowcode/assets-prod.json +11 -11
  5. package/build/lowcode/index.js +1 -1
  6. package/build/lowcode/meta.js +7 -7
  7. package/build/lowcode/preview.js +145 -145
  8. package/build/lowcode/render/default/view.css +1 -1
  9. package/build/lowcode/render/default/view.js +18 -18
  10. package/build/lowcode/view.css +1 -1
  11. package/build/lowcode/view.js +20 -20
  12. package/es/components/PisellFields/index.d.ts +36 -0
  13. package/es/components/PisellFields/index.js +41 -0
  14. package/es/components/PisellLayouts/index.d.ts +32 -0
  15. package/es/components/PisellLayouts/index.js +43 -0
  16. package/es/components/PisellMetrics/index.d.ts +23 -0
  17. package/es/components/PisellMetrics/index.js +29 -0
  18. package/es/components/cardMetricItem/index.d.ts +4 -1
  19. package/es/components/cardMetricItem/index.js +5 -0
  20. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  21. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  22. package/es/components/dataSourceComponents/fields/index.d.ts +9 -9
  23. package/es/components/page/index.js +4 -121
  24. package/es/components/pisellCurrency/PisellCurrency.d.ts +39 -0
  25. package/es/components/pisellCurrency/PisellCurrency.js +67 -0
  26. package/es/components/pisellCurrency/PisellCurrency.less +43 -0
  27. package/es/components/pisellCurrency/PisellCurrency.stories.d.ts +56 -0
  28. package/es/components/pisellCurrency/PisellCurrency.stories.js +426 -0
  29. package/es/components/pisellCurrency/components/DisabledView.d.ts +11 -0
  30. package/es/components/pisellCurrency/components/DisabledView.js +51 -0
  31. package/es/components/pisellCurrency/components/EditView.d.ts +18 -0
  32. package/es/components/pisellCurrency/components/EditView.js +127 -0
  33. package/es/components/pisellCurrency/components/ReadOnlyView.d.ts +17 -0
  34. package/es/components/pisellCurrency/components/ReadOnlyView.js +70 -0
  35. package/es/components/pisellCurrency/components/index.d.ts +6 -0
  36. package/es/components/pisellCurrency/components/index.js +7 -0
  37. package/es/components/pisellCurrency/index.d.ts +6 -0
  38. package/es/components/pisellCurrency/index.js +7 -0
  39. package/es/components/pisellCurrency/types.d.ts +56 -0
  40. package/es/components/pisellCurrency/types.js +1 -0
  41. package/es/components/pisellCurrency/utils/currencyFormatter.d.ts +31 -0
  42. package/es/components/pisellCurrency/utils/currencyFormatter.js +50 -0
  43. package/es/components/pisellCurrency/utils/index.d.ts +5 -0
  44. package/es/components/pisellCurrency/utils/index.js +5 -0
  45. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.d.ts +35 -0
  46. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +188 -0
  47. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +75 -0
  48. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.d.ts +176 -0
  49. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +1085 -0
  50. package/es/components/pisellDateTimeDisplay/components/DateDisplay.d.ts +43 -0
  51. package/es/components/pisellDateTimeDisplay/components/DateDisplay.js +50 -0
  52. package/es/components/pisellDateTimeDisplay/components/TimeDisplay.d.ts +42 -0
  53. package/es/components/pisellDateTimeDisplay/components/TimeDisplay.js +44 -0
  54. package/es/components/pisellDateTimeDisplay/components/WeekdayDisplay.d.ts +57 -0
  55. package/es/components/pisellDateTimeDisplay/components/WeekdayDisplay.js +59 -0
  56. package/es/components/pisellDateTimeDisplay/components/index.d.ts +6 -0
  57. package/es/components/pisellDateTimeDisplay/components/index.js +3 -0
  58. package/es/components/pisellDateTimeDisplay/hooks/index.d.ts +2 -0
  59. package/es/components/pisellDateTimeDisplay/hooks/index.js +1 -0
  60. package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.d.ts +45 -0
  61. package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +79 -0
  62. package/es/components/pisellDateTimeDisplay/index.d.ts +2 -0
  63. package/es/components/pisellDateTimeDisplay/index.js +1 -0
  64. package/es/components/pisellDateTimeDisplay/types.d.ts +298 -0
  65. package/es/components/pisellDateTimeDisplay/types.js +1 -0
  66. package/es/components/pisellDateTimeDisplay/utils/formatDate.d.ts +21 -0
  67. package/es/components/pisellDateTimeDisplay/utils/formatDate.js +127 -0
  68. package/es/components/pisellDateTimeDisplay/utils/formatTime.d.ts +19 -0
  69. package/es/components/pisellDateTimeDisplay/utils/formatTime.js +44 -0
  70. package/es/components/pisellDateTimeDisplay/utils/formatWeekday.d.ts +30 -0
  71. package/es/components/pisellDateTimeDisplay/utils/formatWeekday.js +61 -0
  72. package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +18 -0
  73. package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.js +28 -0
  74. package/es/components/pisellDateTimeDisplay/utils/index.d.ts +4 -0
  75. package/es/components/pisellDateTimeDisplay/utils/index.js +4 -0
  76. package/es/components/pisellEmail/PisellEmail.d.ts +37 -0
  77. package/es/components/pisellEmail/PisellEmail.js +64 -0
  78. package/es/components/pisellEmail/PisellEmail.less +50 -0
  79. package/es/components/pisellEmail/PisellEmail.stories.d.ts +116 -0
  80. package/es/components/pisellEmail/PisellEmail.stories.js +699 -0
  81. package/es/components/pisellEmail/components/DisabledView.d.ts +14 -0
  82. package/es/components/pisellEmail/components/DisabledView.js +21 -0
  83. package/es/components/pisellEmail/components/EditView.d.ts +15 -0
  84. package/es/components/pisellEmail/components/EditView.js +146 -0
  85. package/es/components/pisellEmail/components/ReadOnlyView.d.ts +15 -0
  86. package/es/components/pisellEmail/components/ReadOnlyView.js +81 -0
  87. package/es/components/pisellEmail/constants/emailDomains.d.ts +5 -0
  88. package/es/components/pisellEmail/constants/emailDomains.js +11 -0
  89. package/es/components/pisellEmail/constants/emailRegex.d.ts +13 -0
  90. package/es/components/pisellEmail/constants/emailRegex.js +15 -0
  91. package/es/components/pisellEmail/index.d.ts +5 -0
  92. package/es/components/pisellEmail/index.js +5 -0
  93. package/es/components/pisellEmail/types.d.ts +176 -0
  94. package/es/components/pisellEmail/types.js +1 -0
  95. package/es/components/pisellEmail/utils/domainSuggestions.d.ts +15 -0
  96. package/es/components/pisellEmail/utils/domainSuggestions.js +46 -0
  97. package/es/components/pisellEmail/utils/emailHelper.d.ts +66 -0
  98. package/es/components/pisellEmail/utils/emailHelper.js +135 -0
  99. package/es/components/pisellEmail/utils/emailValidator.d.ts +45 -0
  100. package/es/components/pisellEmail/utils/emailValidator.js +130 -0
  101. package/es/components/pisellEmail/utils/index.d.ts +6 -0
  102. package/es/components/pisellEmail/utils/index.js +12 -0
  103. package/es/components/pisellLayout/index.d.ts +1 -1
  104. package/es/components/pisellLongText/PisellLongText.d.ts +39 -0
  105. package/es/components/pisellLongText/PisellLongText.js +66 -0
  106. package/es/components/pisellLongText/PisellLongText.less +60 -0
  107. package/es/components/pisellLongText/PisellLongText.stories.d.ts +123 -0
  108. package/es/components/pisellLongText/PisellLongText.stories.js +589 -0
  109. package/es/components/pisellLongText/components/DisabledView.d.ts +16 -0
  110. package/es/components/pisellLongText/components/DisabledView.js +51 -0
  111. package/es/components/pisellLongText/components/EditView.d.ts +19 -0
  112. package/es/components/pisellLongText/components/EditView.js +62 -0
  113. package/es/components/pisellLongText/components/ReadOnlyView.d.ts +18 -0
  114. package/es/components/pisellLongText/components/ReadOnlyView.js +97 -0
  115. package/es/components/pisellLongText/index.d.ts +6 -0
  116. package/es/components/pisellLongText/index.js +7 -0
  117. package/es/components/pisellLongText/types.d.ts +147 -0
  118. package/es/components/pisellLongText/types.js +1 -0
  119. package/es/components/pisellMetricCard/PisellMetricCard.d.ts +35 -0
  120. package/es/components/pisellMetricCard/PisellMetricCard.js +169 -0
  121. package/es/components/pisellMetricCard/PisellMetricCard.less +74 -0
  122. package/es/components/pisellMetricCard/PisellMetricCard.stories.d.ts +17 -0
  123. package/es/components/pisellMetricCard/PisellMetricCard.stories.js +208 -0
  124. package/es/components/pisellMetricCard/components/MetricComparison.d.ts +14 -0
  125. package/es/components/pisellMetricCard/components/MetricComparison.js +72 -0
  126. package/es/components/pisellMetricCard/components/MetricTitle.d.ts +12 -0
  127. package/es/components/pisellMetricCard/components/MetricTitle.js +52 -0
  128. package/es/components/pisellMetricCard/components/MetricValue.d.ts +12 -0
  129. package/es/components/pisellMetricCard/components/MetricValue.js +29 -0
  130. package/es/components/pisellMetricCard/components/TrendIcon.d.ts +14 -0
  131. package/es/components/pisellMetricCard/components/TrendIcon.js +30 -0
  132. package/es/components/pisellMetricCard/components/index.d.ts +7 -0
  133. package/es/components/pisellMetricCard/components/index.js +8 -0
  134. package/es/components/pisellMetricCard/index.d.ts +6 -0
  135. package/es/components/pisellMetricCard/index.js +7 -0
  136. package/es/components/pisellMetricCard/types.d.ts +201 -0
  137. package/es/components/pisellMetricCard/types.js +1 -0
  138. package/es/components/pisellMetricCard/utils/calculateTrend.d.ts +14 -0
  139. package/es/components/pisellMetricCard/utils/calculateTrend.js +29 -0
  140. package/es/components/pisellMetricCard/utils/formatMetricValue.d.ts +34 -0
  141. package/es/components/pisellMetricCard/utils/formatMetricValue.js +63 -0
  142. package/es/components/pisellMetricCard/utils/index.d.ts +5 -0
  143. package/es/components/pisellMetricCard/utils/index.js +6 -0
  144. package/es/components/pisellMultipleSelect/PisellMultipleSelect.d.ts +9 -0
  145. package/es/components/pisellMultipleSelect/PisellMultipleSelect.js +99 -0
  146. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +231 -0
  147. package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.d.ts +70 -0
  148. package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +576 -0
  149. package/es/components/pisellMultipleSelect/components/DisabledView.d.ts +8 -0
  150. package/es/components/pisellMultipleSelect/components/DisabledView.js +56 -0
  151. package/es/components/pisellMultipleSelect/components/EditView.d.ts +8 -0
  152. package/es/components/pisellMultipleSelect/components/EditView.js +176 -0
  153. package/es/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +8 -0
  154. package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +57 -0
  155. package/es/components/pisellMultipleSelect/index.d.ts +6 -0
  156. package/es/components/pisellMultipleSelect/index.js +7 -0
  157. package/es/components/pisellMultipleSelect/types.d.ts +160 -0
  158. package/es/components/pisellMultipleSelect/types.js +1 -0
  159. package/es/components/pisellNumber/PisellNumber.d.ts +42 -0
  160. package/es/components/pisellNumber/PisellNumber.js +70 -0
  161. package/es/components/pisellNumber/PisellNumber.less +30 -0
  162. package/es/components/pisellNumber/PisellNumber.stories.d.ts +66 -0
  163. package/es/components/pisellNumber/PisellNumber.stories.js +427 -0
  164. package/es/components/pisellNumber/components/DisabledView.d.ts +11 -0
  165. package/es/components/pisellNumber/components/DisabledView.js +50 -0
  166. package/es/components/pisellNumber/components/EditView.d.ts +18 -0
  167. package/es/components/pisellNumber/components/EditView.js +87 -0
  168. package/es/components/pisellNumber/components/ReadOnlyView.d.ts +16 -0
  169. package/es/components/pisellNumber/components/ReadOnlyView.js +60 -0
  170. package/es/components/pisellNumber/components/index.d.ts +6 -0
  171. package/es/components/pisellNumber/components/index.js +7 -0
  172. package/es/components/pisellNumber/index.d.ts +6 -0
  173. package/es/components/pisellNumber/index.js +7 -0
  174. package/es/components/pisellNumber/types.d.ts +168 -0
  175. package/es/components/pisellNumber/types.js +1 -0
  176. package/es/components/pisellPercent/PisellPercent.d.ts +38 -0
  177. package/es/components/pisellPercent/PisellPercent.js +66 -0
  178. package/es/components/pisellPercent/PisellPercent.less +54 -0
  179. package/es/components/pisellPercent/PisellPercent.stories.d.ts +52 -0
  180. package/es/components/pisellPercent/PisellPercent.stories.js +332 -0
  181. package/es/components/pisellPercent/components/DisabledView.d.ts +11 -0
  182. package/es/components/pisellPercent/components/DisabledView.js +49 -0
  183. package/es/components/pisellPercent/components/EditView.d.ts +17 -0
  184. package/es/components/pisellPercent/components/EditView.js +120 -0
  185. package/es/components/pisellPercent/components/ReadOnlyView.d.ts +14 -0
  186. package/es/components/pisellPercent/components/ReadOnlyView.js +94 -0
  187. package/es/components/pisellPercent/components/index.d.ts +6 -0
  188. package/es/components/pisellPercent/components/index.js +7 -0
  189. package/es/components/pisellPercent/index.d.ts +6 -0
  190. package/es/components/pisellPercent/index.js +7 -0
  191. package/es/components/pisellPercent/types.d.ts +68 -0
  192. package/es/components/pisellPercent/types.js +1 -0
  193. package/es/components/pisellPercent/utils/index.d.ts +6 -0
  194. package/es/components/pisellPercent/utils/index.js +6 -0
  195. package/es/components/pisellPercent/utils/percentFormatter.d.ts +27 -0
  196. package/es/components/pisellPercent/utils/percentFormatter.js +50 -0
  197. package/es/components/pisellPercent/utils/rangeConverter.d.ts +36 -0
  198. package/es/components/pisellPercent/utils/rangeConverter.js +87 -0
  199. package/es/components/pisellPhone/PisellPhone.d.ts +36 -0
  200. package/es/components/pisellPhone/PisellPhone.js +63 -0
  201. package/es/components/pisellPhone/PisellPhone.less +85 -0
  202. package/es/components/pisellPhone/PisellPhone.stories.d.ts +80 -0
  203. package/es/components/pisellPhone/PisellPhone.stories.js +363 -0
  204. package/es/components/pisellPhone/components/DisabledView.d.ts +16 -0
  205. package/es/components/pisellPhone/components/DisabledView.js +53 -0
  206. package/es/components/pisellPhone/components/EditView.d.ts +19 -0
  207. package/es/components/pisellPhone/components/EditView.js +116 -0
  208. package/es/components/pisellPhone/components/ReadOnlyView.d.ts +17 -0
  209. package/es/components/pisellPhone/components/ReadOnlyView.js +76 -0
  210. package/es/components/pisellPhone/constants/countryCodes.d.ts +20 -0
  211. package/es/components/pisellPhone/constants/countryCodes.js +199 -0
  212. package/es/components/pisellPhone/index.d.ts +7 -0
  213. package/es/components/pisellPhone/index.js +9 -0
  214. package/es/components/pisellPhone/types.d.ts +209 -0
  215. package/es/components/pisellPhone/types.js +1 -0
  216. package/es/components/pisellPhone/utils/countryCodeHelper.d.ts +35 -0
  217. package/es/components/pisellPhone/utils/countryCodeHelper.js +87 -0
  218. package/es/components/pisellPhone/utils/index.d.ts +6 -0
  219. package/es/components/pisellPhone/utils/index.js +7 -0
  220. package/es/components/pisellPhone/utils/phoneFormatter.d.ts +39 -0
  221. package/es/components/pisellPhone/utils/phoneFormatter.js +112 -0
  222. package/es/components/pisellPhone/utils/phoneValidator.d.ts +11 -0
  223. package/es/components/pisellPhone/utils/phoneValidator.js +59 -0
  224. package/es/components/pisellRating/PisellRating.d.ts +31 -0
  225. package/es/components/pisellRating/PisellRating.js +120 -0
  226. package/es/components/pisellRating/PisellRating.less +41 -0
  227. package/es/components/pisellRating/PisellRating.stories.d.ts +53 -0
  228. package/es/components/pisellRating/PisellRating.stories.js +243 -0
  229. package/es/components/pisellRating/index.d.ts +6 -0
  230. package/es/components/pisellRating/index.js +7 -0
  231. package/es/components/pisellRating/types.d.ts +124 -0
  232. package/es/components/pisellRating/types.js +1 -0
  233. package/es/components/pisellRow/index.d.ts +1 -1
  234. package/es/components/pisellSingleLineText/PisellSingleLineText.d.ts +40 -0
  235. package/es/components/pisellSingleLineText/PisellSingleLineText.js +67 -0
  236. package/es/components/pisellSingleLineText/PisellSingleLineText.less +62 -0
  237. package/es/components/pisellSingleLineText/PisellSingleLineText.stories.d.ts +102 -0
  238. package/es/components/pisellSingleLineText/PisellSingleLineText.stories.js +507 -0
  239. package/es/components/pisellSingleLineText/components/DisabledView.d.ts +16 -0
  240. package/es/components/pisellSingleLineText/components/DisabledView.js +51 -0
  241. package/es/components/pisellSingleLineText/components/EditView.d.ts +19 -0
  242. package/es/components/pisellSingleLineText/components/EditView.js +59 -0
  243. package/es/components/pisellSingleLineText/components/ReadOnlyView.d.ts +20 -0
  244. package/es/components/pisellSingleLineText/components/ReadOnlyView.js +153 -0
  245. package/es/components/pisellSingleLineText/index.d.ts +6 -0
  246. package/es/components/pisellSingleLineText/index.js +7 -0
  247. package/es/components/pisellSingleLineText/types.d.ts +139 -0
  248. package/es/components/pisellSingleLineText/types.js +1 -0
  249. package/es/components/pisellSingleSelect/PisellSingleSelect.d.ts +9 -0
  250. package/es/components/pisellSingleSelect/PisellSingleSelect.js +70 -0
  251. package/es/components/pisellSingleSelect/PisellSingleSelect.less +159 -0
  252. package/es/components/pisellSingleSelect/PisellSingleSelect.stories.d.ts +66 -0
  253. package/es/components/pisellSingleSelect/PisellSingleSelect.stories.js +517 -0
  254. package/es/components/pisellSingleSelect/components/DisabledView.d.ts +8 -0
  255. package/es/components/pisellSingleSelect/components/DisabledView.js +54 -0
  256. package/es/components/pisellSingleSelect/components/EditView.d.ts +8 -0
  257. package/es/components/pisellSingleSelect/components/EditView.js +156 -0
  258. package/es/components/pisellSingleSelect/components/ReadOnlyView.d.ts +8 -0
  259. package/es/components/pisellSingleSelect/components/ReadOnlyView.js +37 -0
  260. package/es/components/pisellSingleSelect/index.d.ts +6 -0
  261. package/es/components/pisellSingleSelect/index.js +7 -0
  262. package/es/components/pisellSingleSelect/types.d.ts +92 -0
  263. package/es/components/pisellSingleSelect/types.js +1 -0
  264. package/es/components/pisellUrl/PisellUrl.d.ts +37 -0
  265. package/es/components/pisellUrl/PisellUrl.js +64 -0
  266. package/es/components/pisellUrl/PisellUrl.less +46 -0
  267. package/es/components/pisellUrl/PisellUrl.stories.d.ts +108 -0
  268. package/es/components/pisellUrl/PisellUrl.stories.js +713 -0
  269. package/es/components/pisellUrl/components/DisabledView.d.ts +14 -0
  270. package/es/components/pisellUrl/components/DisabledView.js +21 -0
  271. package/es/components/pisellUrl/components/EditView.d.ts +15 -0
  272. package/es/components/pisellUrl/components/EditView.js +119 -0
  273. package/es/components/pisellUrl/components/ReadOnlyView.d.ts +15 -0
  274. package/es/components/pisellUrl/components/ReadOnlyView.js +90 -0
  275. package/es/components/pisellUrl/index.d.ts +5 -0
  276. package/es/components/pisellUrl/index.js +5 -0
  277. package/es/components/pisellUrl/types.d.ts +160 -0
  278. package/es/components/pisellUrl/types.js +1 -0
  279. package/es/components/pisellUrl/utils/index.d.ts +6 -0
  280. package/es/components/pisellUrl/utils/index.js +12 -0
  281. package/es/components/pisellUrl/utils/urlFormatter.d.ts +38 -0
  282. package/es/components/pisellUrl/utils/urlFormatter.js +80 -0
  283. package/es/components/pisellUrl/utils/urlHelper.d.ts +63 -0
  284. package/es/components/pisellUrl/utils/urlHelper.js +141 -0
  285. package/es/components/pisellUrl/utils/urlValidator.d.ts +46 -0
  286. package/es/components/pisellUrl/utils/urlValidator.js +83 -0
  287. package/es/components/table/Table/fields/index.d.ts +2 -2
  288. package/es/components/table/Table/utils.d.ts +1 -1
  289. package/es/index.d.ts +103 -65
  290. package/es/index.js +129 -49
  291. package/es/theme/tokens.d.ts +22 -0
  292. package/es/theme/tokens.js +277 -0
  293. package/lib/components/PisellFields/index.d.ts +36 -0
  294. package/lib/components/PisellFields/index.js +49 -0
  295. package/lib/components/PisellLayouts/index.d.ts +32 -0
  296. package/lib/components/PisellLayouts/index.js +57 -0
  297. package/lib/components/PisellMetrics/index.d.ts +23 -0
  298. package/lib/components/PisellMetrics/index.js +43 -0
  299. package/lib/components/cardMetricItem/index.d.ts +4 -1
  300. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  301. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  302. package/lib/components/dataSourceComponents/fields/index.d.ts +9 -9
  303. package/lib/components/page/index.js +3 -121
  304. package/lib/components/pisellCurrency/PisellCurrency.d.ts +39 -0
  305. package/lib/components/pisellCurrency/PisellCurrency.js +63 -0
  306. package/lib/components/pisellCurrency/PisellCurrency.less +43 -0
  307. package/lib/components/pisellCurrency/PisellCurrency.stories.d.ts +56 -0
  308. package/lib/components/pisellCurrency/PisellCurrency.stories.js +251 -0
  309. package/lib/components/pisellCurrency/components/DisabledView.d.ts +11 -0
  310. package/lib/components/pisellCurrency/components/DisabledView.js +77 -0
  311. package/lib/components/pisellCurrency/components/EditView.d.ts +18 -0
  312. package/lib/components/pisellCurrency/components/EditView.js +117 -0
  313. package/lib/components/pisellCurrency/components/ReadOnlyView.d.ts +17 -0
  314. package/lib/components/pisellCurrency/components/ReadOnlyView.js +79 -0
  315. package/lib/components/pisellCurrency/components/index.d.ts +6 -0
  316. package/lib/components/pisellCurrency/components/index.js +45 -0
  317. package/lib/components/pisellCurrency/index.d.ts +6 -0
  318. package/lib/components/pisellCurrency/index.js +39 -0
  319. package/lib/components/pisellCurrency/types.d.ts +56 -0
  320. package/lib/components/pisellCurrency/types.js +17 -0
  321. package/lib/components/pisellCurrency/utils/currencyFormatter.d.ts +31 -0
  322. package/lib/components/pisellCurrency/utils/currencyFormatter.js +56 -0
  323. package/lib/components/pisellCurrency/utils/index.d.ts +5 -0
  324. package/lib/components/pisellCurrency/utils/index.js +29 -0
  325. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.d.ts +35 -0
  326. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +178 -0
  327. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +75 -0
  328. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.d.ts +176 -0
  329. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +783 -0
  330. package/lib/components/pisellDateTimeDisplay/components/DateDisplay.d.ts +43 -0
  331. package/lib/components/pisellDateTimeDisplay/components/DateDisplay.js +67 -0
  332. package/lib/components/pisellDateTimeDisplay/components/TimeDisplay.d.ts +42 -0
  333. package/lib/components/pisellDateTimeDisplay/components/TimeDisplay.js +64 -0
  334. package/lib/components/pisellDateTimeDisplay/components/WeekdayDisplay.d.ts +57 -0
  335. package/lib/components/pisellDateTimeDisplay/components/WeekdayDisplay.js +64 -0
  336. package/lib/components/pisellDateTimeDisplay/components/index.d.ts +6 -0
  337. package/lib/components/pisellDateTimeDisplay/components/index.js +35 -0
  338. package/lib/components/pisellDateTimeDisplay/hooks/index.d.ts +2 -0
  339. package/lib/components/pisellDateTimeDisplay/hooks/index.js +29 -0
  340. package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.d.ts +45 -0
  341. package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +72 -0
  342. package/lib/components/pisellDateTimeDisplay/index.d.ts +2 -0
  343. package/lib/components/pisellDateTimeDisplay/index.js +39 -0
  344. package/lib/components/pisellDateTimeDisplay/types.d.ts +298 -0
  345. package/lib/components/pisellDateTimeDisplay/types.js +17 -0
  346. package/lib/components/pisellDateTimeDisplay/utils/formatDate.d.ts +21 -0
  347. package/lib/components/pisellDateTimeDisplay/utils/formatDate.js +91 -0
  348. package/lib/components/pisellDateTimeDisplay/utils/formatTime.d.ts +19 -0
  349. package/lib/components/pisellDateTimeDisplay/utils/formatTime.js +47 -0
  350. package/lib/components/pisellDateTimeDisplay/utils/formatWeekday.d.ts +30 -0
  351. package/lib/components/pisellDateTimeDisplay/utils/formatWeekday.js +45 -0
  352. package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +18 -0
  353. package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.js +35 -0
  354. package/lib/components/pisellDateTimeDisplay/utils/index.d.ts +4 -0
  355. package/lib/components/pisellDateTimeDisplay/utils/index.js +38 -0
  356. package/lib/components/pisellEmail/PisellEmail.d.ts +37 -0
  357. package/lib/components/pisellEmail/PisellEmail.js +62 -0
  358. package/lib/components/pisellEmail/PisellEmail.less +50 -0
  359. package/lib/components/pisellEmail/PisellEmail.stories.d.ts +116 -0
  360. package/lib/components/pisellEmail/PisellEmail.stories.js +532 -0
  361. package/lib/components/pisellEmail/components/DisabledView.d.ts +14 -0
  362. package/lib/components/pisellEmail/components/DisabledView.js +42 -0
  363. package/lib/components/pisellEmail/components/EditView.d.ts +15 -0
  364. package/lib/components/pisellEmail/components/EditView.js +123 -0
  365. package/lib/components/pisellEmail/components/ReadOnlyView.d.ts +15 -0
  366. package/lib/components/pisellEmail/components/ReadOnlyView.js +99 -0
  367. package/lib/components/pisellEmail/constants/emailDomains.d.ts +5 -0
  368. package/lib/components/pisellEmail/constants/emailDomains.js +49 -0
  369. package/lib/components/pisellEmail/constants/emailRegex.d.ts +13 -0
  370. package/lib/components/pisellEmail/constants/emailRegex.js +32 -0
  371. package/lib/components/pisellEmail/index.d.ts +5 -0
  372. package/lib/components/pisellEmail/index.js +40 -0
  373. package/lib/components/pisellEmail/types.d.ts +176 -0
  374. package/lib/components/pisellEmail/types.js +17 -0
  375. package/lib/components/pisellEmail/utils/domainSuggestions.d.ts +15 -0
  376. package/lib/components/pisellEmail/utils/domainSuggestions.js +42 -0
  377. package/lib/components/pisellEmail/utils/emailHelper.d.ts +66 -0
  378. package/lib/components/pisellEmail/utils/emailHelper.js +89 -0
  379. package/lib/components/pisellEmail/utils/emailValidator.d.ts +45 -0
  380. package/lib/components/pisellEmail/utils/emailValidator.js +97 -0
  381. package/lib/components/pisellEmail/utils/index.d.ts +6 -0
  382. package/lib/components/pisellEmail/utils/index.js +27 -0
  383. package/lib/components/pisellLayout/index.d.ts +1 -1
  384. package/lib/components/pisellLongText/PisellLongText.d.ts +39 -0
  385. package/lib/components/pisellLongText/PisellLongText.js +62 -0
  386. package/lib/components/pisellLongText/PisellLongText.less +60 -0
  387. package/lib/components/pisellLongText/PisellLongText.stories.d.ts +123 -0
  388. package/lib/components/pisellLongText/PisellLongText.stories.js +492 -0
  389. package/lib/components/pisellLongText/components/DisabledView.d.ts +16 -0
  390. package/lib/components/pisellLongText/components/DisabledView.js +51 -0
  391. package/lib/components/pisellLongText/components/EditView.d.ts +19 -0
  392. package/lib/components/pisellLongText/components/EditView.js +69 -0
  393. package/lib/components/pisellLongText/components/ReadOnlyView.d.ts +18 -0
  394. package/lib/components/pisellLongText/components/ReadOnlyView.js +86 -0
  395. package/lib/components/pisellLongText/index.d.ts +6 -0
  396. package/lib/components/pisellLongText/index.js +39 -0
  397. package/lib/components/pisellLongText/types.d.ts +147 -0
  398. package/lib/components/pisellLongText/types.js +17 -0
  399. package/lib/components/pisellMetricCard/PisellMetricCard.d.ts +35 -0
  400. package/lib/components/pisellMetricCard/PisellMetricCard.js +166 -0
  401. package/lib/components/pisellMetricCard/PisellMetricCard.less +74 -0
  402. package/lib/components/pisellMetricCard/PisellMetricCard.stories.d.ts +17 -0
  403. package/lib/components/pisellMetricCard/PisellMetricCard.stories.js +238 -0
  404. package/lib/components/pisellMetricCard/components/MetricComparison.d.ts +14 -0
  405. package/lib/components/pisellMetricCard/components/MetricComparison.js +86 -0
  406. package/lib/components/pisellMetricCard/components/MetricTitle.d.ts +12 -0
  407. package/lib/components/pisellMetricCard/components/MetricTitle.js +84 -0
  408. package/lib/components/pisellMetricCard/components/MetricValue.d.ts +12 -0
  409. package/lib/components/pisellMetricCard/components/MetricValue.js +56 -0
  410. package/lib/components/pisellMetricCard/components/TrendIcon.d.ts +14 -0
  411. package/lib/components/pisellMetricCard/components/TrendIcon.js +50 -0
  412. package/lib/components/pisellMetricCard/components/index.d.ts +7 -0
  413. package/lib/components/pisellMetricCard/components/index.js +48 -0
  414. package/lib/components/pisellMetricCard/index.d.ts +6 -0
  415. package/lib/components/pisellMetricCard/index.js +41 -0
  416. package/lib/components/pisellMetricCard/types.d.ts +201 -0
  417. package/lib/components/pisellMetricCard/types.js +17 -0
  418. package/lib/components/pisellMetricCard/utils/calculateTrend.d.ts +14 -0
  419. package/lib/components/pisellMetricCard/utils/calculateTrend.js +38 -0
  420. package/lib/components/pisellMetricCard/utils/formatMetricValue.d.ts +34 -0
  421. package/lib/components/pisellMetricCard/utils/formatMetricValue.js +52 -0
  422. package/lib/components/pisellMetricCard/utils/index.d.ts +5 -0
  423. package/lib/components/pisellMetricCard/utils/index.js +32 -0
  424. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.d.ts +9 -0
  425. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.js +97 -0
  426. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +231 -0
  427. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.d.ts +70 -0
  428. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +491 -0
  429. package/lib/components/pisellMultipleSelect/components/DisabledView.d.ts +8 -0
  430. package/lib/components/pisellMultipleSelect/components/DisabledView.js +82 -0
  431. package/lib/components/pisellMultipleSelect/components/EditView.d.ts +8 -0
  432. package/lib/components/pisellMultipleSelect/components/EditView.js +155 -0
  433. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +8 -0
  434. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +80 -0
  435. package/lib/components/pisellMultipleSelect/index.d.ts +6 -0
  436. package/lib/components/pisellMultipleSelect/index.js +39 -0
  437. package/lib/components/pisellMultipleSelect/types.d.ts +160 -0
  438. package/lib/components/pisellMultipleSelect/types.js +17 -0
  439. package/lib/components/pisellNumber/PisellNumber.d.ts +42 -0
  440. package/lib/components/pisellNumber/PisellNumber.js +63 -0
  441. package/lib/components/pisellNumber/PisellNumber.less +30 -0
  442. package/lib/components/pisellNumber/PisellNumber.stories.d.ts +66 -0
  443. package/lib/components/pisellNumber/PisellNumber.stories.js +341 -0
  444. package/lib/components/pisellNumber/components/DisabledView.d.ts +11 -0
  445. package/lib/components/pisellNumber/components/DisabledView.js +80 -0
  446. package/lib/components/pisellNumber/components/EditView.d.ts +18 -0
  447. package/lib/components/pisellNumber/components/EditView.js +97 -0
  448. package/lib/components/pisellNumber/components/ReadOnlyView.d.ts +16 -0
  449. package/lib/components/pisellNumber/components/ReadOnlyView.js +75 -0
  450. package/lib/components/pisellNumber/components/index.d.ts +6 -0
  451. package/lib/components/pisellNumber/components/index.js +45 -0
  452. package/lib/components/pisellNumber/index.d.ts +6 -0
  453. package/lib/components/pisellNumber/index.js +39 -0
  454. package/lib/components/pisellNumber/types.d.ts +168 -0
  455. package/lib/components/pisellNumber/types.js +17 -0
  456. package/lib/components/pisellPercent/PisellPercent.d.ts +38 -0
  457. package/lib/components/pisellPercent/PisellPercent.js +63 -0
  458. package/lib/components/pisellPercent/PisellPercent.less +54 -0
  459. package/lib/components/pisellPercent/PisellPercent.stories.d.ts +52 -0
  460. package/lib/components/pisellPercent/PisellPercent.stories.js +217 -0
  461. package/lib/components/pisellPercent/components/DisabledView.d.ts +11 -0
  462. package/lib/components/pisellPercent/components/DisabledView.js +74 -0
  463. package/lib/components/pisellPercent/components/EditView.d.ts +17 -0
  464. package/lib/components/pisellPercent/components/EditView.js +112 -0
  465. package/lib/components/pisellPercent/components/ReadOnlyView.d.ts +14 -0
  466. package/lib/components/pisellPercent/components/ReadOnlyView.js +109 -0
  467. package/lib/components/pisellPercent/components/index.d.ts +6 -0
  468. package/lib/components/pisellPercent/components/index.js +45 -0
  469. package/lib/components/pisellPercent/index.d.ts +6 -0
  470. package/lib/components/pisellPercent/index.js +39 -0
  471. package/lib/components/pisellPercent/types.d.ts +68 -0
  472. package/lib/components/pisellPercent/types.js +17 -0
  473. package/lib/components/pisellPercent/utils/index.d.ts +6 -0
  474. package/lib/components/pisellPercent/utils/index.js +34 -0
  475. package/lib/components/pisellPercent/utils/percentFormatter.d.ts +27 -0
  476. package/lib/components/pisellPercent/utils/percentFormatter.js +48 -0
  477. package/lib/components/pisellPercent/utils/rangeConverter.d.ts +36 -0
  478. package/lib/components/pisellPercent/utils/rangeConverter.js +59 -0
  479. package/lib/components/pisellPhone/PisellPhone.d.ts +36 -0
  480. package/lib/components/pisellPhone/PisellPhone.js +62 -0
  481. package/lib/components/pisellPhone/PisellPhone.less +85 -0
  482. package/lib/components/pisellPhone/PisellPhone.stories.d.ts +80 -0
  483. package/lib/components/pisellPhone/PisellPhone.stories.js +290 -0
  484. package/lib/components/pisellPhone/components/DisabledView.d.ts +16 -0
  485. package/lib/components/pisellPhone/components/DisabledView.js +51 -0
  486. package/lib/components/pisellPhone/components/EditView.d.ts +19 -0
  487. package/lib/components/pisellPhone/components/EditView.js +101 -0
  488. package/lib/components/pisellPhone/components/ReadOnlyView.d.ts +17 -0
  489. package/lib/components/pisellPhone/components/ReadOnlyView.js +79 -0
  490. package/lib/components/pisellPhone/constants/countryCodes.d.ts +20 -0
  491. package/lib/components/pisellPhone/constants/countryCodes.js +233 -0
  492. package/lib/components/pisellPhone/index.d.ts +7 -0
  493. package/lib/components/pisellPhone/index.js +46 -0
  494. package/lib/components/pisellPhone/types.d.ts +209 -0
  495. package/lib/components/pisellPhone/types.js +17 -0
  496. package/lib/components/pisellPhone/utils/countryCodeHelper.d.ts +35 -0
  497. package/lib/components/pisellPhone/utils/countryCodeHelper.js +64 -0
  498. package/lib/components/pisellPhone/utils/index.d.ts +6 -0
  499. package/lib/components/pisellPhone/utils/index.js +49 -0
  500. package/lib/components/pisellPhone/utils/phoneFormatter.d.ts +39 -0
  501. package/lib/components/pisellPhone/utils/phoneFormatter.js +103 -0
  502. package/lib/components/pisellPhone/utils/phoneValidator.d.ts +11 -0
  503. package/lib/components/pisellPhone/utils/phoneValidator.js +61 -0
  504. package/lib/components/pisellRating/PisellRating.d.ts +31 -0
  505. package/lib/components/pisellRating/PisellRating.js +110 -0
  506. package/lib/components/pisellRating/PisellRating.less +41 -0
  507. package/lib/components/pisellRating/PisellRating.stories.d.ts +53 -0
  508. package/lib/components/pisellRating/PisellRating.stories.js +199 -0
  509. package/lib/components/pisellRating/index.d.ts +6 -0
  510. package/lib/components/pisellRating/index.js +39 -0
  511. package/lib/components/pisellRating/types.d.ts +124 -0
  512. package/lib/components/pisellRating/types.js +17 -0
  513. package/lib/components/pisellRow/index.d.ts +1 -1
  514. package/lib/components/pisellSingleLineText/PisellSingleLineText.d.ts +40 -0
  515. package/lib/components/pisellSingleLineText/PisellSingleLineText.js +62 -0
  516. package/lib/components/pisellSingleLineText/PisellSingleLineText.less +62 -0
  517. package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.d.ts +102 -0
  518. package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.js +379 -0
  519. package/lib/components/pisellSingleLineText/components/DisabledView.d.ts +16 -0
  520. package/lib/components/pisellSingleLineText/components/DisabledView.js +51 -0
  521. package/lib/components/pisellSingleLineText/components/EditView.d.ts +19 -0
  522. package/lib/components/pisellSingleLineText/components/EditView.js +69 -0
  523. package/lib/components/pisellSingleLineText/components/ReadOnlyView.d.ts +20 -0
  524. package/lib/components/pisellSingleLineText/components/ReadOnlyView.js +164 -0
  525. package/lib/components/pisellSingleLineText/index.d.ts +6 -0
  526. package/lib/components/pisellSingleLineText/index.js +39 -0
  527. package/lib/components/pisellSingleLineText/types.d.ts +139 -0
  528. package/lib/components/pisellSingleLineText/types.js +17 -0
  529. package/lib/components/pisellSingleSelect/PisellSingleSelect.d.ts +9 -0
  530. package/lib/components/pisellSingleSelect/PisellSingleSelect.js +78 -0
  531. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +159 -0
  532. package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.d.ts +66 -0
  533. package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.js +444 -0
  534. package/lib/components/pisellSingleSelect/components/DisabledView.d.ts +8 -0
  535. package/lib/components/pisellSingleSelect/components/DisabledView.js +81 -0
  536. package/lib/components/pisellSingleSelect/components/EditView.d.ts +8 -0
  537. package/lib/components/pisellSingleSelect/components/EditView.js +141 -0
  538. package/lib/components/pisellSingleSelect/components/ReadOnlyView.d.ts +8 -0
  539. package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +74 -0
  540. package/lib/components/pisellSingleSelect/index.d.ts +6 -0
  541. package/lib/components/pisellSingleSelect/index.js +39 -0
  542. package/lib/components/pisellSingleSelect/types.d.ts +92 -0
  543. package/lib/components/pisellSingleSelect/types.js +17 -0
  544. package/lib/components/pisellUrl/PisellUrl.d.ts +37 -0
  545. package/lib/components/pisellUrl/PisellUrl.js +62 -0
  546. package/lib/components/pisellUrl/PisellUrl.less +46 -0
  547. package/lib/components/pisellUrl/PisellUrl.stories.d.ts +108 -0
  548. package/lib/components/pisellUrl/PisellUrl.stories.js +506 -0
  549. package/lib/components/pisellUrl/components/DisabledView.d.ts +14 -0
  550. package/lib/components/pisellUrl/components/DisabledView.js +42 -0
  551. package/lib/components/pisellUrl/components/EditView.d.ts +15 -0
  552. package/lib/components/pisellUrl/components/EditView.js +109 -0
  553. package/lib/components/pisellUrl/components/ReadOnlyView.d.ts +15 -0
  554. package/lib/components/pisellUrl/components/ReadOnlyView.js +98 -0
  555. package/lib/components/pisellUrl/index.d.ts +5 -0
  556. package/lib/components/pisellUrl/index.js +40 -0
  557. package/lib/components/pisellUrl/types.d.ts +160 -0
  558. package/lib/components/pisellUrl/types.js +17 -0
  559. package/lib/components/pisellUrl/utils/index.d.ts +6 -0
  560. package/lib/components/pisellUrl/utils/index.js +27 -0
  561. package/lib/components/pisellUrl/utils/urlFormatter.d.ts +38 -0
  562. package/lib/components/pisellUrl/utils/urlFormatter.js +66 -0
  563. package/lib/components/pisellUrl/utils/urlHelper.d.ts +63 -0
  564. package/lib/components/pisellUrl/utils/urlHelper.js +97 -0
  565. package/lib/components/pisellUrl/utils/urlValidator.d.ts +46 -0
  566. package/lib/components/pisellUrl/utils/urlValidator.js +77 -0
  567. package/lib/components/table/Table/fields/index.d.ts +2 -2
  568. package/lib/components/table/Table/utils.d.ts +1 -1
  569. package/lib/index.d.ts +103 -65
  570. package/lib/index.js +94 -46
  571. package/lib/theme/tokens.d.ts +22 -0
  572. package/lib/theme/tokens.js +277 -0
  573. package/lowcode/pisell-currency/index.ts +3 -0
  574. package/lowcode/pisell-currency/meta.ts +350 -0
  575. package/lowcode/pisell-currency/snippets.ts +52 -0
  576. package/lowcode/pisell-datetime-display/index.ts +3 -0
  577. package/lowcode/pisell-datetime-display/meta.ts +509 -0
  578. package/lowcode/pisell-datetime-display/snippets.ts +1 -0
  579. package/lowcode/pisell-email/index.ts +1 -0
  580. package/lowcode/pisell-email/meta.ts +484 -0
  581. package/lowcode/pisell-email/snippets.ts +63 -0
  582. package/lowcode/pisell-long-text/meta.ts +436 -0
  583. package/lowcode/pisell-long-text/snippets.ts +55 -0
  584. package/lowcode/pisell-metric-card/meta.ts +493 -0
  585. package/lowcode/pisell-metric-card/snippets.ts +54 -0
  586. package/lowcode/pisell-multiple-select/index.ts +3 -0
  587. package/lowcode/pisell-multiple-select/meta.ts +422 -0
  588. package/lowcode/pisell-multiple-select/snippets.ts +111 -0
  589. package/lowcode/pisell-number/index.ts +3 -0
  590. package/lowcode/pisell-number/meta.ts +497 -0
  591. package/lowcode/pisell-number/snippets.ts +68 -0
  592. package/lowcode/pisell-percent/index.ts +3 -0
  593. package/lowcode/pisell-percent/meta.ts +201 -0
  594. package/lowcode/pisell-percent/snippets.ts +61 -0
  595. package/lowcode/pisell-phone/meta.ts +389 -0
  596. package/lowcode/pisell-phone/snippets.ts +52 -0
  597. package/lowcode/pisell-rating/index.ts +3 -0
  598. package/lowcode/pisell-rating/meta.ts +130 -0
  599. package/lowcode/pisell-rating/snippets.ts +38 -0
  600. package/lowcode/pisell-single-line-text/meta.ts +525 -0
  601. package/lowcode/pisell-single-line-text/snippets.ts +41 -0
  602. package/lowcode/pisell-single-select/index.ts +3 -0
  603. package/lowcode/pisell-single-select/meta.ts +370 -0
  604. package/lowcode/pisell-single-select/snippets.ts +70 -0
  605. package/lowcode/pisell-url/index.ts +1 -0
  606. package/lowcode/pisell-url/meta.ts +512 -0
  607. package/lowcode/pisell-url/snippets.ts +75 -0
  608. package/package.json +4 -3
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import type { Dayjs } from 'dayjs';
3
+ import type { DateFormatConfig, TextStyleConfig } from '../types';
4
+ /**
5
+ * DateDisplay 组件 Props
6
+ */
7
+ export interface DateDisplayProps {
8
+ /**
9
+ * 日期对象
10
+ */
11
+ date: Dayjs;
12
+ /**
13
+ * 日期格式配置
14
+ */
15
+ format?: DateFormatConfig;
16
+ /**
17
+ * 文本样式
18
+ */
19
+ style?: TextStyleConfig;
20
+ /**
21
+ * 自定义类名
22
+ */
23
+ className?: string;
24
+ }
25
+ /**
26
+ * 日期展示组件
27
+ *
28
+ * @description
29
+ * - 格式化并展示日期
30
+ * - 支持不同的日期顺序(YMD/MDY/DMY)
31
+ * - 支持年月日字段显隐
32
+ * - 支持中文单位(年、月、日)
33
+ * - 支持英文月份格式(简写/完整/数字)
34
+ *
35
+ * @example
36
+ * <DateDisplay
37
+ * date={dayjs()}
38
+ * format={{ order: 'YMD', showYear: true, showChineseUnit: true }}
39
+ * style={{ fontSize: 18, fontWeight: 400, color: '#666' }}
40
+ * />
41
+ */
42
+ export declare const DateDisplay: React.FC<DateDisplayProps>;
43
+ export default DateDisplay;
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { formatDate } from "../utils";
3
+
4
+ /**
5
+ * DateDisplay 组件 Props
6
+ */
7
+
8
+ /**
9
+ * 日期展示组件
10
+ *
11
+ * @description
12
+ * - 格式化并展示日期
13
+ * - 支持不同的日期顺序(YMD/MDY/DMY)
14
+ * - 支持年月日字段显隐
15
+ * - 支持中文单位(年、月、日)
16
+ * - 支持英文月份格式(简写/完整/数字)
17
+ *
18
+ * @example
19
+ * <DateDisplay
20
+ * date={dayjs()}
21
+ * format={{ order: 'YMD', showYear: true, showChineseUnit: true }}
22
+ * style={{ fontSize: 18, fontWeight: 400, color: '#666' }}
23
+ * />
24
+ */
25
+ export var DateDisplay = function DateDisplay(_ref) {
26
+ var date = _ref.date,
27
+ format = _ref.format,
28
+ style = _ref.style,
29
+ className = _ref.className;
30
+ // 格式化日期
31
+ var formattedDate = formatDate(date, format);
32
+
33
+ // 如果没有要显示的内容,返回 null
34
+ if (!formattedDate) {
35
+ return null;
36
+ }
37
+
38
+ // 构建样式
39
+ var inlineStyle = {
40
+ fontSize: style === null || style === void 0 ? void 0 : style.fontSize,
41
+ fontWeight: style === null || style === void 0 ? void 0 : style.fontWeight,
42
+ color: style === null || style === void 0 ? void 0 : style.color,
43
+ lineHeight: style === null || style === void 0 ? void 0 : style.lineHeight
44
+ };
45
+ return /*#__PURE__*/React.createElement("span", {
46
+ className: "pisell-datetime-display-date ".concat(className || '').trim(),
47
+ style: inlineStyle
48
+ }, formattedDate);
49
+ };
50
+ export default DateDisplay;
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import type { Dayjs } from 'dayjs';
3
+ import type { TimeFormatConfig, TextStyleConfig } from '../types';
4
+ /**
5
+ * TimeDisplay 组件 Props
6
+ */
7
+ export interface TimeDisplayProps {
8
+ /**
9
+ * 时间对象
10
+ */
11
+ time: Dayjs;
12
+ /**
13
+ * 时间格式配置
14
+ */
15
+ format?: TimeFormatConfig;
16
+ /**
17
+ * 文本样式
18
+ */
19
+ style?: TextStyleConfig;
20
+ /**
21
+ * 自定义类名
22
+ */
23
+ className?: string;
24
+ }
25
+ /**
26
+ * 时间展示组件
27
+ *
28
+ * @description
29
+ * - 格式化并展示时间
30
+ * - 支持 12/24 小时制
31
+ * - 支持显示秒
32
+ * - 支持小时补零
33
+ *
34
+ * @example
35
+ * <TimeDisplay
36
+ * time={dayjs()}
37
+ * format={{ use12Hour: false, showSeconds: true }}
38
+ * style={{ fontSize: 24, fontWeight: 600, color: '#000' }}
39
+ * />
40
+ */
41
+ export declare const TimeDisplay: React.FC<TimeDisplayProps>;
42
+ export default TimeDisplay;
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import { formatTime } from "../utils";
3
+
4
+ /**
5
+ * TimeDisplay 组件 Props
6
+ */
7
+
8
+ /**
9
+ * 时间展示组件
10
+ *
11
+ * @description
12
+ * - 格式化并展示时间
13
+ * - 支持 12/24 小时制
14
+ * - 支持显示秒
15
+ * - 支持小时补零
16
+ *
17
+ * @example
18
+ * <TimeDisplay
19
+ * time={dayjs()}
20
+ * format={{ use12Hour: false, showSeconds: true }}
21
+ * style={{ fontSize: 24, fontWeight: 600, color: '#000' }}
22
+ * />
23
+ */
24
+ export var TimeDisplay = function TimeDisplay(_ref) {
25
+ var time = _ref.time,
26
+ format = _ref.format,
27
+ style = _ref.style,
28
+ className = _ref.className;
29
+ // 格式化时间
30
+ var formattedTime = formatTime(time, format);
31
+
32
+ // 构建样式
33
+ var inlineStyle = {
34
+ fontSize: style === null || style === void 0 ? void 0 : style.fontSize,
35
+ fontWeight: style === null || style === void 0 ? void 0 : style.fontWeight,
36
+ color: style === null || style === void 0 ? void 0 : style.color,
37
+ lineHeight: style === null || style === void 0 ? void 0 : style.lineHeight
38
+ };
39
+ return /*#__PURE__*/React.createElement("span", {
40
+ className: "pisell-datetime-display-time ".concat(className || '').trim(),
41
+ style: inlineStyle
42
+ }, formattedTime);
43
+ };
44
+ export default TimeDisplay;
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import type { Dayjs } from 'dayjs';
3
+ import type { WeekdayFormatConfig, TextStyleConfig } from '../types';
4
+ /**
5
+ * WeekdayDisplay 组件 Props
6
+ */
7
+ export interface WeekdayDisplayProps {
8
+ /**
9
+ * 日期对象(用于获取星期)
10
+ */
11
+ weekday: Dayjs;
12
+ /**
13
+ * 星期格式配置
14
+ */
15
+ format?: WeekdayFormatConfig;
16
+ /**
17
+ * 文本样式
18
+ */
19
+ style?: TextStyleConfig;
20
+ /**
21
+ * 自定义类名
22
+ */
23
+ className?: string;
24
+ }
25
+ /**
26
+ * 星期展示组件
27
+ *
28
+ * @description
29
+ * - 格式化并展示星期
30
+ * - 支持完整/缩写/单字母模式
31
+ * - 自动支持中英文
32
+ *
33
+ * @example
34
+ * // 默认(缩写)
35
+ * <WeekdayDisplay
36
+ * weekday={dayjs()}
37
+ * format={{ full: false, singleLetter: false }}
38
+ * style={{ fontSize: 18, fontWeight: 400, color: '#666' }}
39
+ * />
40
+ * // => "Sat" / "周六"
41
+ *
42
+ * // 完整
43
+ * <WeekdayDisplay
44
+ * weekday={dayjs()}
45
+ * format={{ full: true }}
46
+ * />
47
+ * // => "Saturday" / "星期六"
48
+ *
49
+ * // 单字母
50
+ * <WeekdayDisplay
51
+ * weekday={dayjs()}
52
+ * format={{ singleLetter: true }}
53
+ * />
54
+ * // => "S" / "六"
55
+ */
56
+ export declare const WeekdayDisplay: React.FC<WeekdayDisplayProps>;
57
+ export default WeekdayDisplay;
@@ -0,0 +1,59 @@
1
+ import React from 'react';
2
+ import { formatWeekday } from "../utils";
3
+
4
+ /**
5
+ * WeekdayDisplay 组件 Props
6
+ */
7
+
8
+ /**
9
+ * 星期展示组件
10
+ *
11
+ * @description
12
+ * - 格式化并展示星期
13
+ * - 支持完整/缩写/单字母模式
14
+ * - 自动支持中英文
15
+ *
16
+ * @example
17
+ * // 默认(缩写)
18
+ * <WeekdayDisplay
19
+ * weekday={dayjs()}
20
+ * format={{ full: false, singleLetter: false }}
21
+ * style={{ fontSize: 18, fontWeight: 400, color: '#666' }}
22
+ * />
23
+ * // => "Sat" / "周六"
24
+ *
25
+ * // 完整
26
+ * <WeekdayDisplay
27
+ * weekday={dayjs()}
28
+ * format={{ full: true }}
29
+ * />
30
+ * // => "Saturday" / "星期六"
31
+ *
32
+ * // 单字母
33
+ * <WeekdayDisplay
34
+ * weekday={dayjs()}
35
+ * format={{ singleLetter: true }}
36
+ * />
37
+ * // => "S" / "六"
38
+ */
39
+ export var WeekdayDisplay = function WeekdayDisplay(_ref) {
40
+ var weekday = _ref.weekday,
41
+ format = _ref.format,
42
+ style = _ref.style,
43
+ className = _ref.className;
44
+ // 格式化星期
45
+ var formattedWeekday = formatWeekday(weekday, format);
46
+
47
+ // 构建样式
48
+ var inlineStyle = {
49
+ fontSize: style === null || style === void 0 ? void 0 : style.fontSize,
50
+ fontWeight: style === null || style === void 0 ? void 0 : style.fontWeight,
51
+ color: style === null || style === void 0 ? void 0 : style.color,
52
+ lineHeight: style === null || style === void 0 ? void 0 : style.lineHeight
53
+ };
54
+ return /*#__PURE__*/React.createElement("span", {
55
+ className: "pisell-datetime-display-weekday ".concat(className || '').trim(),
56
+ style: inlineStyle
57
+ }, formattedWeekday);
58
+ };
59
+ export default WeekdayDisplay;
@@ -0,0 +1,6 @@
1
+ export { TimeDisplay } from './TimeDisplay';
2
+ export { DateDisplay } from './DateDisplay';
3
+ export { WeekdayDisplay } from './WeekdayDisplay';
4
+ export type { TimeDisplayProps } from './TimeDisplay';
5
+ export type { DateDisplayProps } from './DateDisplay';
6
+ export type { WeekdayDisplayProps } from './WeekdayDisplay';
@@ -0,0 +1,3 @@
1
+ export { TimeDisplay } from "./TimeDisplay";
2
+ export { DateDisplay } from "./DateDisplay";
3
+ export { WeekdayDisplay } from "./WeekdayDisplay";
@@ -0,0 +1,2 @@
1
+ export { useCurrentTime } from './useCurrentTime';
2
+ export type { UseCurrentTimeOptions } from './useCurrentTime';
@@ -0,0 +1 @@
1
+ export { useCurrentTime } from "./useCurrentTime";
@@ -0,0 +1,45 @@
1
+ import { Dayjs } from 'dayjs';
2
+ /**
3
+ * useCurrentTime Hook 配置项
4
+ */
5
+ export interface UseCurrentTimeOptions {
6
+ /**
7
+ * 刷新间隔(毫秒)
8
+ * @default 60000
9
+ */
10
+ refreshInterval?: number;
11
+ /**
12
+ * 是否禁用自动刷新
13
+ * @default false
14
+ */
15
+ disabled?: boolean;
16
+ /**
17
+ * dayjs locale
18
+ * @example 'zh-cn' | 'en' | 'ja'
19
+ */
20
+ locale?: string;
21
+ /**
22
+ * 时间更新回调
23
+ */
24
+ onUpdate?: (time: Dayjs) => void;
25
+ }
26
+ /**
27
+ * 管理当前时间状态的自定义 Hook
28
+ *
29
+ * @description
30
+ * - 自动创建定时器刷新时间
31
+ * - 支持自定义刷新间隔
32
+ * - 支持国际化(locale)
33
+ * - 组件卸载时自动清除定时器
34
+ *
35
+ * @example
36
+ * const currentTime = useCurrentTime({
37
+ * refreshInterval: 1000,
38
+ * locale: 'zh-cn',
39
+ * onUpdate: (time) => console.log(time.format())
40
+ * });
41
+ *
42
+ * @param options 配置项
43
+ * @returns 当前时间(Dayjs 对象)
44
+ */
45
+ export declare function useCurrentTime(options?: UseCurrentTimeOptions): Dayjs;
@@ -0,0 +1,79 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useState, useEffect } from 'react';
8
+ import dayjs from 'dayjs';
9
+
10
+ /**
11
+ * useCurrentTime Hook 配置项
12
+ */
13
+
14
+ /**
15
+ * 管理当前时间状态的自定义 Hook
16
+ *
17
+ * @description
18
+ * - 自动创建定时器刷新时间
19
+ * - 支持自定义刷新间隔
20
+ * - 支持国际化(locale)
21
+ * - 组件卸载时自动清除定时器
22
+ *
23
+ * @example
24
+ * const currentTime = useCurrentTime({
25
+ * refreshInterval: 1000,
26
+ * locale: 'zh-cn',
27
+ * onUpdate: (time) => console.log(time.format())
28
+ * });
29
+ *
30
+ * @param options 配置项
31
+ * @returns 当前时间(Dayjs 对象)
32
+ */
33
+ export function useCurrentTime(options) {
34
+ var _ref = options || {},
35
+ _ref$refreshInterval = _ref.refreshInterval,
36
+ refreshInterval = _ref$refreshInterval === void 0 ? 60000 : _ref$refreshInterval,
37
+ _ref$disabled = _ref.disabled,
38
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
39
+ locale = _ref.locale,
40
+ onUpdate = _ref.onUpdate;
41
+
42
+ // 初始化时间
43
+ var _useState = useState(function () {
44
+ var time = dayjs();
45
+ return locale ? time.locale(locale) : time;
46
+ }),
47
+ _useState2 = _slicedToArray(_useState, 2),
48
+ currentTime = _useState2[0],
49
+ setCurrentTime = _useState2[1];
50
+ useEffect(function () {
51
+ // 如果禁用自动刷新,只设置一次
52
+ if (disabled) {
53
+ return;
54
+ }
55
+
56
+ // 设置定时器
57
+ var timer = setInterval(function () {
58
+ var time = dayjs();
59
+ var localizedTime = locale ? time.locale(locale) : time;
60
+ setCurrentTime(localizedTime);
61
+ onUpdate === null || onUpdate === void 0 || onUpdate(localizedTime);
62
+ }, refreshInterval);
63
+
64
+ // 清除定时器
65
+ return function () {
66
+ clearInterval(timer);
67
+ };
68
+ }, [refreshInterval, disabled, locale, onUpdate]);
69
+
70
+ // 当 locale 改变时,立即更新时间的 locale
71
+ useEffect(function () {
72
+ if (locale) {
73
+ setCurrentTime(function (prevTime) {
74
+ return prevTime.locale(locale);
75
+ });
76
+ }
77
+ }, [locale]);
78
+ return currentTime;
79
+ }
@@ -0,0 +1,2 @@
1
+ export { default as PisellDateTimeDisplay } from './PisellDateTimeDisplay';
2
+ export type { PisellDateTimeDisplayProps, LayoutDirection, DateOrder, TextAlign, FieldType, TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, FieldConfig, TextStyleConfig, ContainerStyleConfig, } from './types';
@@ -0,0 +1 @@
1
+ export { default as PisellDateTimeDisplay } from "./PisellDateTimeDisplay";