naive-ui 2.21.2 → 2.22.0

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 (348) hide show
  1. package/es/_internal/close/src/styles/index.cssr.js +6 -5
  2. package/es/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
  3. package/es/_internal/scrollbar/src/ScrollBar.js +13 -7
  4. package/es/_internal/selection/src/Selection.js +11 -9
  5. package/es/_internal/selection/src/styles/index.cssr.js +6 -2
  6. package/es/alert/src/Alert.d.ts +20 -20
  7. package/es/alert/src/Alert.js +22 -22
  8. package/es/alert/src/styles/index.cssr.js +45 -45
  9. package/es/anchor/src/AnchorAdapter.js +12 -12
  10. package/es/anchor/src/styles/index.cssr.js +41 -41
  11. package/es/avatar/src/Avatar.d.ts +5 -3
  12. package/es/avatar/src/Avatar.js +7 -5
  13. package/es/avatar/src/styles/index.cssr.js +3 -5
  14. package/es/button/src/Button.d.ts +60 -60
  15. package/es/button/src/Button.js +107 -106
  16. package/es/button/src/styles/button.cssr.js +83 -80
  17. package/es/button/styles/dark.js +3 -3
  18. package/es/button/styles/light.d.ts +3 -3
  19. package/es/button/styles/light.js +1 -1
  20. package/es/calendar/src/Calendar.d.ts +37 -30
  21. package/es/calendar/styles/light.d.ts +3 -3
  22. package/es/cascader/src/Cascader.d.ts +135 -0
  23. package/es/cascader/src/Cascader.js +2 -4
  24. package/es/cascader/src/CascaderMenu.d.ts +345 -0
  25. package/es/cascader/src/CascaderMenu.js +6 -5
  26. package/es/cascader/src/CascaderOption.d.ts +18 -0
  27. package/es/cascader/src/CascaderSelectMenu.d.ts +18 -0
  28. package/es/cascader/src/CascaderSubmenu.d.ts +18 -0
  29. package/es/cascader/styles/dark.js +3 -1
  30. package/es/cascader/styles/light.d.ts +13 -0
  31. package/es/cascader/styles/light.js +3 -1
  32. package/es/color-picker/src/ColorInputUnit.d.ts +3 -3
  33. package/es/color-picker/src/ColorPicker.d.ts +27 -27
  34. package/es/color-picker/styles/light.d.ts +3 -3
  35. package/es/config-provider/src/ConfigProvider.d.ts +21 -0
  36. package/es/data-table/src/DataTable.d.ts +30 -30
  37. package/es/data-table/src/DataTable.js +7 -14
  38. package/es/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
  39. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
  40. package/es/data-table/src/MainTable.js +2 -3
  41. package/es/data-table/src/TableParts/Body.d.ts +18 -7
  42. package/es/data-table/src/TableParts/Body.js +80 -28
  43. package/es/data-table/src/TableParts/Cell.d.ts +6 -6
  44. package/es/data-table/src/TableParts/Header.d.ts +3 -3
  45. package/es/data-table/src/TableParts/Header.js +1 -1
  46. package/es/data-table/src/interface.d.ts +4 -1
  47. package/es/data-table/src/styles/index.cssr.js +9 -12
  48. package/es/data-table/src/use-check.js +6 -2
  49. package/es/data-table/src/use-scroll.d.ts +2 -0
  50. package/es/data-table/src/use-scroll.js +34 -4
  51. package/es/data-table/src/use-table-data.js +4 -1
  52. package/es/data-table/styles/_common.js +1 -1
  53. package/es/data-table/styles/light.d.ts +3 -3
  54. package/es/date-picker/src/DatePicker.d.ts +94 -69
  55. package/es/date-picker/src/DatePicker.js +47 -20
  56. package/es/date-picker/src/config.d.ts +1 -9
  57. package/es/date-picker/src/config.js +0 -8
  58. package/es/date-picker/src/interface.d.ts +2 -1
  59. package/es/date-picker/src/panel/date.d.ts +23 -10
  60. package/es/date-picker/src/panel/date.js +2 -2
  61. package/es/date-picker/src/panel/daterange.d.ts +21 -9
  62. package/es/date-picker/src/panel/daterange.js +2 -2
  63. package/es/date-picker/src/panel/datetime.d.ts +23 -16
  64. package/es/date-picker/src/panel/datetime.js +2 -2
  65. package/es/date-picker/src/panel/datetimerange.d.ts +21 -9
  66. package/es/date-picker/src/panel/datetimerange.js +2 -2
  67. package/es/date-picker/src/panel/month.d.ts +27 -20
  68. package/es/date-picker/src/panel/month.js +23 -12
  69. package/es/date-picker/src/panel/use-calendar.d.ts +25 -43
  70. package/es/date-picker/src/panel/use-calendar.js +35 -18
  71. package/es/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
  72. package/es/date-picker/src/panel/use-dual-calendar.js +23 -8
  73. package/es/date-picker/src/panel/use-panel-common.d.ts +21 -36
  74. package/es/date-picker/src/panel/use-panel-common.js +2 -2
  75. package/es/date-picker/src/utils.d.ts +19 -3
  76. package/es/date-picker/src/utils.js +40 -5
  77. package/es/date-picker/styles/_common.d.ts +2 -0
  78. package/es/date-picker/styles/_common.js +3 -1
  79. package/es/date-picker/styles/light.d.ts +10 -6
  80. package/es/dialog/src/Dialog.d.ts +21 -21
  81. package/es/dialog/src/styles/index.cssr.js +1 -0
  82. package/es/dialog/styles/light.d.ts +3 -3
  83. package/es/dynamic-input/src/DynamicInput.d.ts +30 -30
  84. package/es/dynamic-input/src/InputPreset.d.ts +3 -3
  85. package/es/dynamic-input/src/PairPreset.d.ts +3 -3
  86. package/es/dynamic-input/styles/light.d.ts +3 -3
  87. package/es/dynamic-tags/src/DynamicTags.d.ts +30 -30
  88. package/es/dynamic-tags/styles/light.d.ts +3 -3
  89. package/es/element/index.d.ts +1 -0
  90. package/es/element/index.js +1 -0
  91. package/es/form/src/interface.d.ts +5 -4
  92. package/es/image/src/Image.d.ts +25 -16
  93. package/es/image/src/Image.js +35 -11
  94. package/es/image/src/ImageGroup.js +2 -2
  95. package/es/image/src/styles/index.cssr.js +4 -3
  96. package/es/input/src/Input.js +2 -0
  97. package/es/input/src/styles/input.cssr.js +2 -1
  98. package/es/input-number/src/InputNumber.d.ts +30 -30
  99. package/es/input-number/src/InputNumber.js +10 -5
  100. package/es/input-number/src/utils.d.ts +1 -0
  101. package/es/input-number/src/utils.js +4 -0
  102. package/es/input-number/styles/light.d.ts +3 -3
  103. package/es/locales/common/deDE.js +8 -0
  104. package/es/locales/common/enUS.d.ts +7 -0
  105. package/es/locales/common/enUS.js +8 -1
  106. package/es/locales/common/frFR.d.ts +3 -0
  107. package/es/locales/common/frFR.js +101 -0
  108. package/es/locales/common/idID.d.ts +2 -93
  109. package/es/locales/common/idID.js +8 -0
  110. package/es/locales/common/jaJP.js +8 -0
  111. package/es/locales/common/nbNO.js +8 -0
  112. package/es/locales/common/ruRU.js +8 -0
  113. package/es/locales/common/ukUA.js +8 -0
  114. package/es/locales/common/zhCN.js +7 -0
  115. package/es/locales/common/zhTW.d.ts +3 -0
  116. package/es/locales/common/zhTW.js +100 -0
  117. package/es/locales/date/frFR.d.ts +3 -0
  118. package/es/locales/date/frFR.js +6 -0
  119. package/es/locales/date/idID.d.ts +1 -6
  120. package/es/locales/date/zhTW.d.ts +3 -0
  121. package/es/locales/date/zhTW.js +6 -0
  122. package/es/locales/index.d.ts +4 -0
  123. package/es/locales/index.js +4 -0
  124. package/es/modal/src/BodyWrapper.d.ts +6 -6
  125. package/es/modal/src/Modal.d.ts +36 -36
  126. package/es/modal/styles/light.d.ts +3 -3
  127. package/es/page-header/src/PageHeader.js +3 -3
  128. package/es/page-header/src/styles/index.cssr.js +2 -4
  129. package/es/popconfirm/src/Popconfirm.d.ts +30 -30
  130. package/es/popconfirm/styles/light.d.ts +3 -3
  131. package/es/popover/src/Popover.js +4 -1
  132. package/es/popover/src/PopoverBody.js +3 -3
  133. package/es/popselect/src/Popselect.d.ts +2 -11
  134. package/es/popselect/src/Popselect.js +2 -2
  135. package/es/popselect/src/PopselectPanel.d.ts +3 -11
  136. package/es/popselect/src/PopselectPanel.js +17 -11
  137. package/es/radio/src/Radio.js +3 -3
  138. package/es/radio/src/RadioButton.js +4 -5
  139. package/es/radio/src/styles/radio-group.cssr.js +8 -4
  140. package/es/radio/src/styles/radio.cssr.js +8 -4
  141. package/es/radio/src/use-radio.d.ts +0 -3
  142. package/es/radio/src/use-radio.js +1 -26
  143. package/es/switch/src/Switch.d.ts +16 -1
  144. package/es/switch/src/Switch.js +17 -4
  145. package/es/switch/src/styles/index.cssr.js +1 -1
  146. package/es/tabs/src/styles/index.cssr.js +1 -0
  147. package/es/tag/src/styles/index.cssr.js +1 -1
  148. package/es/theme-editor/src/ThemeEditor.js +9 -2
  149. package/es/time-picker/src/Panel.d.ts +3 -3
  150. package/es/time-picker/src/TimePicker.d.ts +30 -30
  151. package/es/time-picker/styles/light.d.ts +3 -3
  152. package/es/transfer/src/Transfer.d.ts +30 -30
  153. package/es/transfer/src/TransferFilter.d.ts +3 -3
  154. package/es/transfer/src/TransferList.d.ts +3 -3
  155. package/es/transfer/src/TransferListItem.d.ts +3 -3
  156. package/es/transfer/styles/light.d.ts +3 -3
  157. package/es/tree/src/Tree.d.ts +8 -4
  158. package/es/tree/src/Tree.js +32 -6
  159. package/es/tree-select/src/TreeSelect.d.ts +38 -1
  160. package/es/tree-select/src/TreeSelect.js +25 -10
  161. package/es/tree-select/src/styles/index.cssr.js +11 -2
  162. package/es/tree-select/styles/light.d.ts +6 -0
  163. package/es/tree-select/styles/light.js +5 -2
  164. package/es/upload/src/Upload.d.ts +41 -30
  165. package/es/upload/src/Upload.js +33 -23
  166. package/es/upload/src/UploadFile.d.ts +4 -4
  167. package/es/upload/src/UploadFileList.js +4 -2
  168. package/es/upload/src/UploadProgress.d.ts +3 -3
  169. package/es/upload/src/interface.d.ts +1 -0
  170. package/es/upload/src/styles/index.cssr.js +2 -3
  171. package/es/upload/styles/light.d.ts +3 -3
  172. package/es/version.d.ts +1 -1
  173. package/es/version.js +1 -1
  174. package/lib/_internal/close/src/styles/index.cssr.js +6 -5
  175. package/lib/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
  176. package/lib/_internal/scrollbar/src/ScrollBar.js +13 -7
  177. package/lib/_internal/selection/src/Selection.js +11 -9
  178. package/lib/_internal/selection/src/styles/index.cssr.js +6 -2
  179. package/lib/alert/src/Alert.d.ts +20 -20
  180. package/lib/alert/src/Alert.js +22 -22
  181. package/lib/alert/src/styles/index.cssr.js +45 -45
  182. package/lib/anchor/src/AnchorAdapter.js +12 -12
  183. package/lib/anchor/src/styles/index.cssr.js +41 -41
  184. package/lib/avatar/src/Avatar.d.ts +5 -3
  185. package/lib/avatar/src/Avatar.js +7 -5
  186. package/lib/avatar/src/styles/index.cssr.js +3 -5
  187. package/lib/button/src/Button.d.ts +60 -60
  188. package/lib/button/src/Button.js +107 -106
  189. package/lib/button/src/styles/button.cssr.js +83 -80
  190. package/lib/button/styles/dark.js +3 -3
  191. package/lib/button/styles/light.d.ts +3 -3
  192. package/lib/button/styles/light.js +1 -1
  193. package/lib/calendar/src/Calendar.d.ts +37 -30
  194. package/lib/calendar/styles/light.d.ts +3 -3
  195. package/lib/cascader/src/Cascader.d.ts +135 -0
  196. package/lib/cascader/src/Cascader.js +2 -4
  197. package/lib/cascader/src/CascaderMenu.d.ts +345 -0
  198. package/lib/cascader/src/CascaderMenu.js +6 -5
  199. package/lib/cascader/src/CascaderOption.d.ts +18 -0
  200. package/lib/cascader/src/CascaderSelectMenu.d.ts +18 -0
  201. package/lib/cascader/src/CascaderSubmenu.d.ts +18 -0
  202. package/lib/cascader/styles/dark.js +3 -1
  203. package/lib/cascader/styles/light.d.ts +13 -0
  204. package/lib/cascader/styles/light.js +3 -1
  205. package/lib/color-picker/src/ColorInputUnit.d.ts +3 -3
  206. package/lib/color-picker/src/ColorPicker.d.ts +27 -27
  207. package/lib/color-picker/styles/light.d.ts +3 -3
  208. package/lib/config-provider/src/ConfigProvider.d.ts +21 -0
  209. package/lib/data-table/src/DataTable.d.ts +30 -30
  210. package/lib/data-table/src/DataTable.js +6 -13
  211. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
  212. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
  213. package/lib/data-table/src/MainTable.js +1 -2
  214. package/lib/data-table/src/TableParts/Body.d.ts +18 -7
  215. package/lib/data-table/src/TableParts/Body.js +78 -26
  216. package/lib/data-table/src/TableParts/Cell.d.ts +6 -6
  217. package/lib/data-table/src/TableParts/Header.d.ts +3 -3
  218. package/lib/data-table/src/TableParts/Header.js +1 -1
  219. package/lib/data-table/src/interface.d.ts +4 -1
  220. package/lib/data-table/src/styles/index.cssr.js +9 -12
  221. package/lib/data-table/src/use-check.js +6 -2
  222. package/lib/data-table/src/use-scroll.d.ts +2 -0
  223. package/lib/data-table/src/use-scroll.js +34 -4
  224. package/lib/data-table/src/use-table-data.js +4 -1
  225. package/lib/data-table/styles/_common.js +1 -1
  226. package/lib/data-table/styles/light.d.ts +3 -3
  227. package/lib/date-picker/src/DatePicker.d.ts +94 -69
  228. package/lib/date-picker/src/DatePicker.js +46 -19
  229. package/lib/date-picker/src/config.d.ts +1 -9
  230. package/lib/date-picker/src/config.js +1 -9
  231. package/lib/date-picker/src/interface.d.ts +2 -1
  232. package/lib/date-picker/src/panel/date.d.ts +23 -10
  233. package/lib/date-picker/src/panel/date.js +1 -1
  234. package/lib/date-picker/src/panel/daterange.d.ts +21 -9
  235. package/lib/date-picker/src/panel/daterange.js +1 -1
  236. package/lib/date-picker/src/panel/datetime.d.ts +23 -16
  237. package/lib/date-picker/src/panel/datetime.js +1 -1
  238. package/lib/date-picker/src/panel/datetimerange.d.ts +21 -9
  239. package/lib/date-picker/src/panel/datetimerange.js +2 -2
  240. package/lib/date-picker/src/panel/month.d.ts +27 -20
  241. package/lib/date-picker/src/panel/month.js +23 -12
  242. package/lib/date-picker/src/panel/use-calendar.d.ts +25 -43
  243. package/lib/date-picker/src/panel/use-calendar.js +34 -16
  244. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
  245. package/lib/date-picker/src/panel/use-dual-calendar.js +22 -6
  246. package/lib/date-picker/src/panel/use-panel-common.d.ts +21 -36
  247. package/lib/date-picker/src/panel/use-panel-common.js +3 -2
  248. package/lib/date-picker/src/utils.d.ts +19 -3
  249. package/lib/date-picker/src/utils.js +41 -4
  250. package/lib/date-picker/styles/_common.d.ts +2 -0
  251. package/lib/date-picker/styles/_common.js +3 -1
  252. package/lib/date-picker/styles/light.d.ts +10 -6
  253. package/lib/dialog/src/Dialog.d.ts +21 -21
  254. package/lib/dialog/src/styles/index.cssr.js +1 -0
  255. package/lib/dialog/styles/light.d.ts +3 -3
  256. package/lib/dynamic-input/src/DynamicInput.d.ts +30 -30
  257. package/lib/dynamic-input/src/InputPreset.d.ts +3 -3
  258. package/lib/dynamic-input/src/PairPreset.d.ts +3 -3
  259. package/lib/dynamic-input/styles/light.d.ts +3 -3
  260. package/lib/dynamic-tags/src/DynamicTags.d.ts +30 -30
  261. package/lib/dynamic-tags/styles/light.d.ts +3 -3
  262. package/lib/element/index.d.ts +1 -0
  263. package/lib/element/index.js +3 -1
  264. package/lib/form/src/interface.d.ts +5 -4
  265. package/lib/image/src/Image.d.ts +25 -16
  266. package/lib/image/src/Image.js +34 -10
  267. package/lib/image/src/ImageGroup.js +2 -2
  268. package/lib/image/src/styles/index.cssr.js +3 -2
  269. package/lib/input/src/Input.js +2 -0
  270. package/lib/input/src/styles/input.cssr.js +2 -1
  271. package/lib/input-number/src/InputNumber.d.ts +30 -30
  272. package/lib/input-number/src/InputNumber.js +9 -4
  273. package/lib/input-number/src/utils.d.ts +1 -0
  274. package/lib/input-number/src/utils.js +6 -1
  275. package/lib/input-number/styles/light.d.ts +3 -3
  276. package/lib/locales/common/deDE.js +8 -0
  277. package/lib/locales/common/enUS.d.ts +7 -0
  278. package/lib/locales/common/enUS.js +8 -1
  279. package/lib/locales/common/frFR.d.ts +3 -0
  280. package/lib/locales/common/frFR.js +103 -0
  281. package/lib/locales/common/idID.d.ts +2 -93
  282. package/lib/locales/common/idID.js +8 -0
  283. package/lib/locales/common/jaJP.js +8 -0
  284. package/lib/locales/common/nbNO.js +8 -0
  285. package/lib/locales/common/ruRU.js +8 -0
  286. package/lib/locales/common/ukUA.js +8 -0
  287. package/lib/locales/common/zhCN.js +7 -0
  288. package/lib/locales/common/zhTW.d.ts +3 -0
  289. package/lib/locales/common/zhTW.js +102 -0
  290. package/lib/locales/date/frFR.d.ts +3 -0
  291. package/lib/locales/date/frFR.js +11 -0
  292. package/lib/locales/date/idID.d.ts +1 -6
  293. package/lib/locales/date/zhTW.d.ts +3 -0
  294. package/lib/locales/date/zhTW.js +11 -0
  295. package/lib/locales/index.d.ts +4 -0
  296. package/lib/locales/index.js +9 -1
  297. package/lib/modal/src/BodyWrapper.d.ts +6 -6
  298. package/lib/modal/src/Modal.d.ts +36 -36
  299. package/lib/modal/styles/light.d.ts +3 -3
  300. package/lib/page-header/src/PageHeader.js +3 -3
  301. package/lib/page-header/src/styles/index.cssr.js +2 -4
  302. package/lib/popconfirm/src/Popconfirm.d.ts +30 -30
  303. package/lib/popconfirm/styles/light.d.ts +3 -3
  304. package/lib/popover/src/Popover.js +4 -1
  305. package/lib/popover/src/PopoverBody.js +3 -3
  306. package/lib/popselect/src/Popselect.d.ts +2 -11
  307. package/lib/popselect/src/Popselect.js +2 -2
  308. package/lib/popselect/src/PopselectPanel.d.ts +3 -11
  309. package/lib/popselect/src/PopselectPanel.js +16 -10
  310. package/lib/radio/src/Radio.js +3 -3
  311. package/lib/radio/src/RadioButton.js +4 -5
  312. package/lib/radio/src/styles/radio-group.cssr.js +8 -4
  313. package/lib/radio/src/styles/radio.cssr.js +8 -4
  314. package/lib/radio/src/use-radio.d.ts +0 -3
  315. package/lib/radio/src/use-radio.js +1 -26
  316. package/lib/switch/src/Switch.d.ts +16 -1
  317. package/lib/switch/src/Switch.js +17 -4
  318. package/lib/switch/src/styles/index.cssr.js +1 -1
  319. package/lib/tabs/src/styles/index.cssr.js +1 -0
  320. package/lib/tag/src/styles/index.cssr.js +1 -1
  321. package/lib/theme-editor/src/ThemeEditor.js +9 -2
  322. package/lib/time-picker/src/Panel.d.ts +3 -3
  323. package/lib/time-picker/src/TimePicker.d.ts +30 -30
  324. package/lib/time-picker/styles/light.d.ts +3 -3
  325. package/lib/transfer/src/Transfer.d.ts +30 -30
  326. package/lib/transfer/src/TransferFilter.d.ts +3 -3
  327. package/lib/transfer/src/TransferList.d.ts +3 -3
  328. package/lib/transfer/src/TransferListItem.d.ts +3 -3
  329. package/lib/transfer/styles/light.d.ts +3 -3
  330. package/lib/tree/src/Tree.d.ts +8 -4
  331. package/lib/tree/src/Tree.js +32 -6
  332. package/lib/tree-select/src/TreeSelect.d.ts +38 -1
  333. package/lib/tree-select/src/TreeSelect.js +24 -9
  334. package/lib/tree-select/src/styles/index.cssr.js +11 -2
  335. package/lib/tree-select/styles/light.d.ts +6 -0
  336. package/lib/tree-select/styles/light.js +5 -2
  337. package/lib/upload/src/Upload.d.ts +41 -30
  338. package/lib/upload/src/Upload.js +33 -23
  339. package/lib/upload/src/UploadFile.d.ts +4 -4
  340. package/lib/upload/src/UploadFileList.js +4 -2
  341. package/lib/upload/src/UploadProgress.d.ts +3 -3
  342. package/lib/upload/src/interface.d.ts +1 -0
  343. package/lib/upload/src/styles/index.cssr.js +2 -3
  344. package/lib/upload/styles/light.d.ts +3 -3
  345. package/lib/version.d.ts +1 -1
  346. package/lib/version.js +1 -1
  347. package/package.json +5 -4
  348. package/web-types.json +99 -7
@@ -8,6 +8,7 @@ export declare type FormItemRuleValidatorParams = Parameters<NonNullable<RuleIte
8
8
  export declare type FormItemRuleValidator = (...args: FormItemRuleValidatorParams) => boolean | Error | Error[] | Promise<void> | undefined;
9
9
  export declare type FormItemRuleAsyncValidator = (...args: FormItemRuleValidatorParams) => Promise<void> | undefined;
10
10
  export declare type FormItemRule = Omit<RuleItem, 'validator' | 'asyncValidator'> & {
11
+ key?: string;
11
12
  trigger?: ValidationTrigger | string | Array<ValidationTrigger | string>;
12
13
  validator?: FormItemRuleValidator;
13
14
  asyncValidator?: FormItemRuleAsyncValidator;
@@ -15,10 +16,10 @@ export declare type FormItemRule = Omit<RuleItem, 'validator' | 'asyncValidator'
15
16
  export interface FormItemValidateOptions {
16
17
  trigger?: ValidationTrigger | string;
17
18
  callback?: ValidateCallback;
18
- shouldRuleBeApplied?: ApplyRule;
19
+ shouldRuleBeApplied?: ShouldRuleBeApplied;
19
20
  options?: ValidateOption;
20
21
  }
21
- export declare type FormItemInternalValidate = (trigger: ValidationTrigger | string | null | undefined, shouldRuleBeApplied?: ApplyRule, options?: ValidateOption) => Promise<{
22
+ export declare type FormItemInternalValidate = (trigger: ValidationTrigger | string | null | undefined, shouldRuleBeApplied?: ShouldRuleBeApplied, options?: ValidateOption) => Promise<{
22
23
  valid: boolean;
23
24
  errors?: ValidateError[];
24
25
  }>;
@@ -38,10 +39,10 @@ export declare type LabelAlign = 'left' | 'center' | 'right';
38
39
  export declare type LabelPlacement = 'left' | 'top';
39
40
  export declare type Size = 'small' | 'medium' | 'large';
40
41
  export declare type ValidationTrigger = 'input' | 'change' | 'blur' | 'focus';
41
- export declare type ApplyRule = (rule: FormItemRule) => boolean;
42
+ export declare type ShouldRuleBeApplied = (rule: FormItemRule) => boolean;
42
43
  export declare type ValidateCallback = (errors?: ValidateError[]) => void;
43
44
  export declare type FormValidateCallback = (errors?: ValidateError[][]) => void;
44
- export declare type FormValidate = ((callback?: FormValidateCallback) => void) & (() => Promise<void>);
45
+ export declare type FormValidate = (callback?: FormValidateCallback, shouldRuleBeApplied?: ShouldRuleBeApplied) => Promise<void>;
45
46
  export declare type FormValidationError = ValidateError[];
46
47
  export interface FormInst {
47
48
  validate: FormValidate;
@@ -1,53 +1,50 @@
1
- import { PropType } from 'vue';
1
+ import { PropType, ImgHTMLAttributes } from 'vue';
2
2
  import { ExtractPublicPropTypes } from '../../_utils';
3
- interface imgProps {
4
- alt?: string;
5
- crossorigin?: 'anonymous' | 'use-credentials' | '';
6
- decoding?: 'async' | 'auto' | 'sync';
7
- height?: number;
8
- sizes?: string;
9
- src?: string;
10
- srcset?: string;
11
- usemap?: string;
12
- width?: number;
13
- }
14
3
  export interface ImageInst {
15
4
  click: () => void;
16
5
  }
17
6
  declare const imageProps: {
18
7
  alt: StringConstructor;
19
8
  height: PropType<string | number>;
20
- imgProps: PropType<imgProps>;
9
+ imgProps: PropType<ImgHTMLAttributes>;
21
10
  objectFit: {
22
11
  type: PropType<"fill" | "none" | "contain" | "cover" | "scale-down">;
23
12
  default: string;
24
13
  };
25
14
  previewSrc: StringConstructor;
15
+ fallbackSrc: StringConstructor;
26
16
  width: PropType<string | number>;
27
17
  src: StringConstructor;
28
18
  showToolbar: {
29
19
  type: BooleanConstructor;
30
20
  default: boolean;
31
21
  };
22
+ previewDisabled: BooleanConstructor;
23
+ loadDescription: StringConstructor;
32
24
  onError: PropType<(e: Event) => void>;
25
+ onLoad: PropType<(e: Event) => void>;
33
26
  };
34
27
  export declare type ImageProps = ExtractPublicPropTypes<typeof imageProps>;
35
28
  declare const _default: import("vue").DefineComponent<{
36
29
  alt: StringConstructor;
37
30
  height: PropType<string | number>;
38
- imgProps: PropType<imgProps>;
31
+ imgProps: PropType<ImgHTMLAttributes>;
39
32
  objectFit: {
40
33
  type: PropType<"fill" | "none" | "contain" | "cover" | "scale-down">;
41
34
  default: string;
42
35
  };
43
36
  previewSrc: StringConstructor;
37
+ fallbackSrc: StringConstructor;
44
38
  width: PropType<string | number>;
45
39
  src: StringConstructor;
46
40
  showToolbar: {
47
41
  type: BooleanConstructor;
48
42
  default: boolean;
49
43
  };
44
+ previewDisabled: BooleanConstructor;
45
+ loadDescription: StringConstructor;
50
46
  onError: PropType<(e: Event) => void>;
47
+ onLoad: PropType<(e: Event) => void>;
51
48
  }, {
52
49
  click: () => void;
53
50
  mergedClsPrefix: import("vue").Ref<string> | import("vue").ComputedRef<string>;
@@ -58,30 +55,42 @@ declare const _default: import("vue").DefineComponent<{
58
55
  toggleShow: () => void;
59
56
  } | null>;
60
57
  imageRef: import("vue").Ref<HTMLImageElement | null>;
61
- imgProps: import("vue").Ref<imgProps | undefined>;
58
+ imgProps: import("vue").Ref<ImgHTMLAttributes | undefined>;
59
+ showError: import("vue").Ref<boolean>;
60
+ mergedOnError: (e: Event) => void;
61
+ mergedOnLoad: (e: Event) => void;
62
62
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
63
63
  alt?: unknown;
64
64
  height?: unknown;
65
65
  imgProps?: unknown;
66
66
  objectFit?: unknown;
67
67
  previewSrc?: unknown;
68
+ fallbackSrc?: unknown;
68
69
  width?: unknown;
69
70
  src?: unknown;
70
71
  showToolbar?: unknown;
72
+ previewDisabled?: unknown;
73
+ loadDescription?: unknown;
71
74
  onError?: unknown;
75
+ onLoad?: unknown;
72
76
  } & {
73
77
  objectFit: "fill" | "none" | "contain" | "cover" | "scale-down";
74
78
  showToolbar: boolean;
79
+ previewDisabled: boolean;
75
80
  } & {
76
81
  onError?: ((e: Event) => void) | undefined;
77
82
  height?: string | number | undefined;
78
83
  width?: string | number | undefined;
84
+ onLoad?: ((e: Event) => void) | undefined;
79
85
  alt?: string | undefined;
80
86
  src?: string | undefined;
87
+ fallbackSrc?: string | undefined;
81
88
  previewSrc?: string | undefined;
82
- imgProps?: imgProps | undefined;
89
+ imgProps?: ImgHTMLAttributes | undefined;
90
+ loadDescription?: string | undefined;
83
91
  }>, {
84
92
  objectFit: "fill" | "none" | "contain" | "cover" | "scale-down";
85
93
  showToolbar: boolean;
94
+ previewDisabled: boolean;
86
95
  }>;
87
96
  export default _default;
@@ -16,10 +16,14 @@ const imageProps = {
16
16
  default: 'fill'
17
17
  },
18
18
  previewSrc: String,
19
+ fallbackSrc: String,
19
20
  width: [String, Number],
20
21
  src: String,
21
22
  showToolbar: { type: Boolean, default: true },
22
- onError: Function
23
+ previewDisabled: Boolean,
24
+ loadDescription: String,
25
+ onError: Function,
26
+ onLoad: Function
23
27
  };
24
28
  exports.default = (0, vue_1.defineComponent)({
25
29
  name: 'Image',
@@ -27,12 +31,15 @@ exports.default = (0, vue_1.defineComponent)({
27
31
  inheritAttrs: false,
28
32
  setup(props) {
29
33
  const imageRef = (0, vue_1.ref)(null);
34
+ const showErrorRef = (0, vue_1.ref)(false);
30
35
  const imgPropsRef = (0, vue_1.toRef)(props, 'imgProps');
31
36
  const previewInstRef = (0, vue_1.ref)(null);
32
37
  const imageGroupHandle = (0, vue_1.inject)(ImageGroup_1.imageGroupInjectionKey, null);
33
38
  const { mergedClsPrefixRef } = imageGroupHandle || (0, _mixins_1.useConfig)(props);
34
39
  const exposedMethods = {
35
40
  click: () => {
41
+ if (props.previewDisabled || showErrorRef.value)
42
+ return;
36
43
  const mergedPreviewSrc = props.previewSrc || props.src;
37
44
  if (imageGroupHandle) {
38
45
  imageGroupHandle.setPreviewSrc(mergedPreviewSrc);
@@ -48,17 +55,34 @@ exports.default = (0, vue_1.defineComponent)({
48
55
  previewInst.toggleShow();
49
56
  }
50
57
  };
58
+ (0, vue_1.watchEffect)(() => {
59
+ var _a;
60
+ void props.src;
61
+ void ((_a = props.imgProps) === null || _a === void 0 ? void 0 : _a.src);
62
+ showErrorRef.value = false;
63
+ });
51
64
  return Object.assign({ mergedClsPrefix: mergedClsPrefixRef, groupId: imageGroupHandle === null || imageGroupHandle === void 0 ? void 0 : imageGroupHandle.groupId, previewInstRef,
52
- imageRef, imgProps: imgPropsRef }, exposedMethods);
65
+ imageRef, imgProps: imgPropsRef, showError: showErrorRef, mergedOnError: (e) => {
66
+ showErrorRef.value = true;
67
+ const { onError, imgProps: { onError: imgPropsOnError } = {} } = props;
68
+ onError === null || onError === void 0 ? void 0 : onError(e);
69
+ imgPropsOnError === null || imgPropsOnError === void 0 ? void 0 : imgPropsOnError(e);
70
+ }, mergedOnLoad: (e) => {
71
+ const { onLoad, imgProps: { onLoad: imgPropsOnLoad } = {} } = props;
72
+ onLoad === null || onLoad === void 0 ? void 0 : onLoad(e);
73
+ imgPropsOnLoad === null || imgPropsOnLoad === void 0 ? void 0 : imgPropsOnLoad(e);
74
+ } }, exposedMethods);
53
75
  },
54
76
  render() {
55
- const { mergedClsPrefix, imgProps = {} } = this;
56
- const imgWrapperNode = (0, vue_1.h)('div', (0, vue_1.mergeProps)(this.$attrs, {
57
- role: 'none',
58
- class: `${mergedClsPrefix}-image`
59
- }), (0, vue_1.h)("img", Object.assign({}, imgProps, { class: this.groupId, ref: "imageRef", width: this.width || imgProps.width, height: this.height || imgProps.height, src: this.src || imgProps.src, alt: this.alt || imgProps.alt, "aria-label": this.alt || imgProps.alt, onClick: this.click, onError: this.onError, style: { objectFit: this.objectFit }, "data-preview-src": this.previewSrc || this.src })));
60
- return this.groupId ? (imgWrapperNode) : ((0, vue_1.h)(ImagePreview_1.default, { clsPrefix: mergedClsPrefix, ref: "previewInstRef", showToolbar: this.showToolbar }, {
61
- default: () => imgWrapperNode
62
- }));
77
+ const { mergedClsPrefix, imgProps = {}, $attrs } = this;
78
+ const imgNode = ((0, vue_1.h)("img", Object.assign({}, imgProps, { class: [this.groupId, imgProps.class], ref: "imageRef", width: this.width || imgProps.width, height: this.height || imgProps.height, src: this.showError ? this.fallbackSrc : this.src || imgProps.src, alt: this.alt || imgProps.alt, "aria-label": this.alt || imgProps.alt, onClick: this.click, onError: this.mergedOnError, onLoad: this.mergedOnLoad, style: [imgProps.style || '', { objectFit: this.objectFit }], "data-error": this.showError, "data-preview-src": this.previewSrc || this.src })));
79
+ return ((0, vue_1.h)("div", Object.assign({}, $attrs, { role: "none", class: [
80
+ $attrs.class,
81
+ `${mergedClsPrefix}-image`,
82
+ (this.previewDisabled || this.showError) &&
83
+ `${mergedClsPrefix}-image--preview-disabled`
84
+ ] }), this.groupId ? (imgNode) : ((0, vue_1.h)(ImagePreview_1.default, { clsPrefix: mergedClsPrefix, ref: "previewInstRef", showToolbar: this.showToolbar }, {
85
+ default: () => imgNode
86
+ }))));
63
87
  }
64
88
  });
@@ -18,7 +18,7 @@ exports.default = (0, vue_1.defineComponent)({
18
18
  setup(props) {
19
19
  let currentSrc;
20
20
  const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
21
- const groupId = (0, seemly_1.createId)();
21
+ const groupId = `c${(0, seemly_1.createId)()}`;
22
22
  const vm = (0, vue_1.getCurrentInstance)();
23
23
  const setPreviewSrc = (src) => {
24
24
  var _a;
@@ -30,7 +30,7 @@ exports.default = (0, vue_1.defineComponent)({
30
30
  return;
31
31
  const container = vm.proxy.$el.parentElement;
32
32
  // use dom api since we can't get the correct order before all children are rendered
33
- const imgs = container.getElementsByClassName(groupId);
33
+ const imgs = container.querySelectorAll(`.${groupId}:not([data-error=true])`);
34
34
  if (!imgs.length)
35
35
  return;
36
36
  const index = Array.from(imgs).findIndex((img) => img.dataset.previewSrc === currentSrc);
@@ -69,9 +69,10 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.c)('body >', [(0, cssr_1.cB)('image-
69
69
  transition: transform .3s var(--bezier);
70
70
  `), (0, cssr_1.cB)('image', `
71
71
  display: inline-flex;
72
- cursor: pointer;
73
72
  max-height: 100%;
74
73
  max-width: 100%;
75
- `, [(0, cssr_1.c)('img', `
74
+ `, [(0, cssr_1.cNotM)('preview-disabled', `
75
+ cursor: pointer;
76
+ `), (0, cssr_1.c)('img', `
76
77
  border-radius: inherit;
77
78
  `)])]);
@@ -395,9 +395,11 @@ exports.default = (0, vue_1.defineComponent)({
395
395
  doClear(e);
396
396
  if (props.pair) {
397
397
  doUpdateValue(['', '']);
398
+ doChange(['', '']);
398
399
  }
399
400
  else {
400
401
  doUpdateValue('');
402
+ doChange('');
401
403
  }
402
404
  }
403
405
  function handleMouseDown(e) {
@@ -79,6 +79,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('input', `
79
79
  text-decoration-color: var(--text-decoration-color);
80
80
  color: var(--text-color);
81
81
  caret-color: var(--caret-color);
82
+ background-color: transparent;
82
83
  `, [(0, cssr_1.c)('&::placeholder', {
83
84
  color: '#0000'
84
85
  })]), (0, cssr_1.cM)('round', [(0, cssr_1.cNotM)('textarea', {
@@ -208,7 +209,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('input', `
208
209
  border: 'var(--border-focus)',
209
210
  boxShadow: 'var(--box-shadow-focus)'
210
211
  })]), (0, cssr_1.c)('&:hover', [(0, cssr_1.cE)('state-border', {
211
- border: 'var(--border-focus)'
212
+ border: 'var(--border-hover)'
212
213
  })])]), (0, cssr_1.cE)('border, state-border', `
213
214
  box-sizing: border-box;
214
215
  position: absolute;
@@ -68,9 +68,9 @@ declare const inputNumberProps: {
68
68
  fontSizeMedium: string;
69
69
  fontSizeLarge: string;
70
70
  opacityDisabled: string;
71
- colorOpacitySecondary: number;
72
- colorOpacitySecondaryHover: number;
73
- colorOpacitySecondaryPressed: number;
71
+ colorOpacitySecondary: string;
72
+ colorOpacitySecondaryHover: string;
73
+ colorOpacitySecondaryPressed: string;
74
74
  colorSecondary: string;
75
75
  colorSecondaryHover: string;
76
76
  colorSecondaryPressed: string;
@@ -336,9 +336,9 @@ declare const inputNumberProps: {
336
336
  fontSizeMedium: string;
337
337
  fontSizeLarge: string;
338
338
  opacityDisabled: string;
339
- colorOpacitySecondary: number;
340
- colorOpacitySecondaryHover: number;
341
- colorOpacitySecondaryPressed: number;
339
+ colorOpacitySecondary: string;
340
+ colorOpacitySecondaryHover: string;
341
+ colorOpacitySecondaryPressed: string;
342
342
  colorSecondary: string;
343
343
  colorSecondaryHover: string;
344
344
  colorSecondaryPressed: string;
@@ -604,9 +604,9 @@ declare const inputNumberProps: {
604
604
  fontSizeMedium: string;
605
605
  fontSizeLarge: string;
606
606
  opacityDisabled: string;
607
- colorOpacitySecondary: number;
608
- colorOpacitySecondaryHover: number;
609
- colorOpacitySecondaryPressed: number;
607
+ colorOpacitySecondary: string;
608
+ colorOpacitySecondaryHover: string;
609
+ colorOpacitySecondaryPressed: string;
610
610
  colorSecondary: string;
611
611
  colorSecondaryHover: string;
612
612
  colorSecondaryPressed: string;
@@ -924,9 +924,9 @@ declare const _default: import("vue").DefineComponent<{
924
924
  fontSizeMedium: string;
925
925
  fontSizeLarge: string;
926
926
  opacityDisabled: string;
927
- colorOpacitySecondary: number;
928
- colorOpacitySecondaryHover: number;
929
- colorOpacitySecondaryPressed: number;
927
+ colorOpacitySecondary: string;
928
+ colorOpacitySecondaryHover: string;
929
+ colorOpacitySecondaryPressed: string;
930
930
  colorSecondary: string;
931
931
  colorSecondaryHover: string;
932
932
  colorSecondaryPressed: string;
@@ -1192,9 +1192,9 @@ declare const _default: import("vue").DefineComponent<{
1192
1192
  fontSizeMedium: string;
1193
1193
  fontSizeLarge: string;
1194
1194
  opacityDisabled: string;
1195
- colorOpacitySecondary: number;
1196
- colorOpacitySecondaryHover: number;
1197
- colorOpacitySecondaryPressed: number;
1195
+ colorOpacitySecondary: string;
1196
+ colorOpacitySecondaryHover: string;
1197
+ colorOpacitySecondaryPressed: string;
1198
1198
  colorSecondary: string;
1199
1199
  colorSecondaryHover: string;
1200
1200
  colorSecondaryPressed: string;
@@ -1460,9 +1460,9 @@ declare const _default: import("vue").DefineComponent<{
1460
1460
  fontSizeMedium: string;
1461
1461
  fontSizeLarge: string;
1462
1462
  opacityDisabled: string;
1463
- colorOpacitySecondary: number;
1464
- colorOpacitySecondaryHover: number;
1465
- colorOpacitySecondaryPressed: number;
1463
+ colorOpacitySecondary: string;
1464
+ colorOpacitySecondaryHover: string;
1465
+ colorOpacitySecondaryPressed: string;
1466
1466
  colorSecondary: string;
1467
1467
  colorSecondaryHover: string;
1468
1468
  colorSecondaryPressed: string;
@@ -1870,9 +1870,9 @@ declare const _default: import("vue").DefineComponent<{
1870
1870
  fontSizeMedium: string;
1871
1871
  fontSizeLarge: string;
1872
1872
  opacityDisabled: string;
1873
- colorOpacitySecondary: number;
1874
- colorOpacitySecondaryHover: number;
1875
- colorOpacitySecondaryPressed: number;
1873
+ colorOpacitySecondary: string;
1874
+ colorOpacitySecondaryHover: string;
1875
+ colorOpacitySecondaryPressed: string;
1876
1876
  colorSecondary: string;
1877
1877
  colorSecondaryHover: string;
1878
1878
  colorSecondaryPressed: string;
@@ -2208,9 +2208,9 @@ declare const _default: import("vue").DefineComponent<{
2208
2208
  fontSizeMedium: string;
2209
2209
  fontSizeLarge: string;
2210
2210
  opacityDisabled: string;
2211
- colorOpacitySecondary: number;
2212
- colorOpacitySecondaryHover: number;
2213
- colorOpacitySecondaryPressed: number;
2211
+ colorOpacitySecondary: string;
2212
+ colorOpacitySecondaryHover: string;
2213
+ colorOpacitySecondaryPressed: string;
2214
2214
  colorSecondary: string;
2215
2215
  colorSecondaryHover: string;
2216
2216
  colorSecondaryPressed: string;
@@ -2476,9 +2476,9 @@ declare const _default: import("vue").DefineComponent<{
2476
2476
  fontSizeMedium: string;
2477
2477
  fontSizeLarge: string;
2478
2478
  opacityDisabled: string;
2479
- colorOpacitySecondary: number;
2480
- colorOpacitySecondaryHover: number;
2481
- colorOpacitySecondaryPressed: number;
2479
+ colorOpacitySecondary: string;
2480
+ colorOpacitySecondaryHover: string;
2481
+ colorOpacitySecondaryPressed: string;
2482
2482
  colorSecondary: string;
2483
2483
  colorSecondaryHover: string;
2484
2484
  colorSecondaryPressed: string;
@@ -2744,9 +2744,9 @@ declare const _default: import("vue").DefineComponent<{
2744
2744
  fontSizeMedium: string;
2745
2745
  fontSizeLarge: string;
2746
2746
  opacityDisabled: string;
2747
- colorOpacitySecondary: number;
2748
- colorOpacitySecondaryHover: number;
2749
- colorOpacitySecondaryPressed: number;
2747
+ colorOpacitySecondary: string;
2748
+ colorOpacitySecondaryHover: string;
2749
+ colorOpacitySecondaryPressed: string;
2750
2750
  colorSecondary: string;
2751
2751
  colorSecondaryHover: string;
2752
2752
  colorSecondaryPressed: string;
@@ -118,8 +118,11 @@ exports.default = (0, vue_1.defineComponent)({
118
118
  nTriggerFormInput();
119
119
  nTriggerFormChange();
120
120
  };
121
- const deriveValueFromDisplayedValue = (offset = 0, doUpdateIfValid = true, applyMinMax = true) => {
121
+ const deriveValueFromDisplayedValue = (offset = 0, doUpdateIfValid = true, isInputing = false) => {
122
122
  const { value: displayedValue } = displayedValueRef;
123
+ if (isInputing && (0, utils_1.isWipValue)(displayedValue)) {
124
+ return false;
125
+ }
123
126
  const parsedValue = (0, utils_1.parse)(displayedValue);
124
127
  if (parsedValue === null) {
125
128
  if (doUpdateIfValid)
@@ -133,13 +136,13 @@ exports.default = (0, vue_1.defineComponent)({
133
136
  const { value: mergedMax } = mergedMaxRef;
134
137
  const { value: mergedMin } = mergedMinRef;
135
138
  if (mergedMax !== null && nextValue > mergedMax) {
136
- if (!doUpdateIfValid || !applyMinMax)
139
+ if (!doUpdateIfValid || isInputing)
137
140
  return false;
138
141
  // if doUpdateIfValid=true, we try to make it a valid value
139
142
  nextValue = mergedMax;
140
143
  }
141
144
  if (mergedMin !== null && nextValue < mergedMin) {
142
- if (!doUpdateIfValid || !applyMinMax)
145
+ if (!doUpdateIfValid || isInputing)
143
146
  return false;
144
147
  // if doUpdateIfValid=true, we try to make it a valid value
145
148
  nextValue = mergedMin;
@@ -311,6 +314,7 @@ exports.default = (0, vue_1.defineComponent)({
311
314
  else if (e.code === 'ArrowUp') {
312
315
  if (props.keyboard.ArrowUp === false)
313
316
  return;
317
+ e.preventDefault();
314
318
  const value = deriveValueFromDisplayedValue();
315
319
  if (value !== false) {
316
320
  doAdd();
@@ -319,6 +323,7 @@ exports.default = (0, vue_1.defineComponent)({
319
323
  else if (e.code === 'ArrowDown') {
320
324
  if (props.keyboard.ArrowDown === false)
321
325
  return;
326
+ e.preventDefault();
322
327
  const value = deriveValueFromDisplayedValue();
323
328
  if (value !== false) {
324
329
  doMinus();
@@ -328,7 +333,7 @@ exports.default = (0, vue_1.defineComponent)({
328
333
  function handleUpdateDisplayedValue(value) {
329
334
  displayedValueRef.value = value;
330
335
  if (props.updateValueOnInput) {
331
- deriveValueFromDisplayedValue(0, true, false);
336
+ deriveValueFromDisplayedValue(0, true, true);
332
337
  }
333
338
  }
334
339
  (0, vue_1.watch)(mergedValueRef, () => {
@@ -1,4 +1,5 @@
1
1
  export declare function parse(value: string): number | null;
2
+ export declare function isWipValue(value: string): boolean;
2
3
  export declare function validator(value: number | undefined | null): boolean;
3
4
  export declare function format(value: number | undefined | null): string;
4
5
  export declare function parseNumber(number: number | null | undefined | string): number | null;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseNumber = exports.format = exports.validator = exports.parse = void 0;
3
+ exports.parseNumber = exports.format = exports.validator = exports.isWipValue = exports.parse = void 0;
4
4
  // string => string (expected, not implemented)
5
5
  // string => number (legacy)
6
6
  function parse(value) {
@@ -12,6 +12,11 @@ function parse(value) {
12
12
  return Number(value);
13
13
  }
14
14
  exports.parse = parse;
15
+ // can be parsed to number but shouldn't be applied when inputing
16
+ function isWipValue(value) {
17
+ return /^\d+\.$/.test(value) || /^\.\d+$/.test(value);
18
+ }
19
+ exports.isWipValue = isWipValue;
15
20
  // string => boolean (expected, not implemented)
16
21
  // number => boolean (legacy)
17
22
  function validator(value) {
@@ -20,9 +20,9 @@ declare const inputNumberLight: import("../../_mixins").Theme<"InputNumber", {
20
20
  fontSizeMedium: string;
21
21
  fontSizeLarge: string;
22
22
  opacityDisabled: string;
23
- colorOpacitySecondary: number;
24
- colorOpacitySecondaryHover: number;
25
- colorOpacitySecondaryPressed: number;
23
+ colorOpacitySecondary: string;
24
+ colorOpacitySecondaryHover: string;
25
+ colorOpacitySecondaryPressed: string;
26
26
  colorSecondary: string;
27
27
  colorSecondaryHover: string;
28
28
  colorSecondaryPressed: string;
@@ -24,6 +24,11 @@ const deDE = {
24
24
  yearFormat: 'yyyy',
25
25
  monthFormat: 'MMM',
26
26
  dayFormat: 'eeeeee',
27
+ yearTypeFormat: 'yyyy',
28
+ monthTypeFormat: 'MM-yyyy',
29
+ dateFormat: 'dd-MM-yyyy',
30
+ dateTimeFormat: 'dd-MM-yyyy HH:mm:ss',
31
+ quarterFormat: 'yyyy-qqq',
27
32
  clear: 'Löschen',
28
33
  now: 'Jetzt',
29
34
  confirm: 'Bestätigen',
@@ -32,6 +37,9 @@ const deDE = {
32
37
  datePlaceholder: 'Datum auswählen',
33
38
  datetimePlaceholder: 'Datum und Uhrzeit auswählen',
34
39
  monthPlaceholder: 'Monat auswählen',
40
+ // FIXME: translation needed
41
+ yearPlaceholder: 'Select Year',
42
+ quarterPlaceholder: 'Select Quarter',
35
43
  startDatePlaceholder: 'Anfangsdatum',
36
44
  endDatePlaceholder: 'Enddatum',
37
45
  startDatetimePlaceholder: 'Anfangsdatum und Uhrzeit',
@@ -22,6 +22,11 @@ declare const enUS: {
22
22
  yearFormat: string;
23
23
  monthFormat: string;
24
24
  dayFormat: string;
25
+ yearTypeFormat: string;
26
+ monthTypeFormat: string;
27
+ dateFormat: string;
28
+ dateTimeFormat: string;
29
+ quarterFormat: string;
25
30
  clear: string;
26
31
  now: string;
27
32
  confirm: string;
@@ -30,6 +35,8 @@ declare const enUS: {
30
35
  datePlaceholder: string;
31
36
  datetimePlaceholder: string;
32
37
  monthPlaceholder: string;
38
+ yearPlaceholder: string;
39
+ quarterPlaceholder: string;
33
40
  startDatePlaceholder: string;
34
41
  endDatePlaceholder: string;
35
42
  startDatetimePlaceholder: string;
@@ -14,7 +14,7 @@ const enUS = {
14
14
  Cascader: {
15
15
  placeholder: 'Please Select',
16
16
  loading: 'Loading',
17
- loadingRequiredMessage: (label) => `Please load all ${label}'s descedants before checking it.`
17
+ loadingRequiredMessage: (label) => `Please load all ${label}'s descendants before checking it.`
18
18
  },
19
19
  Time: {
20
20
  dateFormat: 'yyyy-MM-dd',
@@ -24,6 +24,11 @@ const enUS = {
24
24
  yearFormat: 'yyyy',
25
25
  monthFormat: 'MMM',
26
26
  dayFormat: 'eeeeee',
27
+ yearTypeFormat: 'yyyy',
28
+ monthTypeFormat: 'yyyy-MM',
29
+ dateFormat: 'yyyy-MM-dd',
30
+ dateTimeFormat: 'yyyy-MM-dd HH:mm:ss',
31
+ quarterFormat: 'yyyy-qqq',
27
32
  clear: 'Clear',
28
33
  now: 'Now',
29
34
  confirm: 'Confirm',
@@ -32,6 +37,8 @@ const enUS = {
32
37
  datePlaceholder: 'Select Date',
33
38
  datetimePlaceholder: 'Select Date and Time',
34
39
  monthPlaceholder: 'Select Month',
40
+ yearPlaceholder: 'Select Year',
41
+ quarterPlaceholder: 'Select Quarter',
35
42
  startDatePlaceholder: 'Start Date',
36
43
  endDatePlaceholder: 'End Date',
37
44
  startDatetimePlaceholder: 'Start Date and Time',
@@ -0,0 +1,3 @@
1
+ import type { NLocale } from './enUS';
2
+ declare const frFR: NLocale;
3
+ export default frFR;