@daisu-ui/ui 0.0.0-stage → 0.1.0-beta.4

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 (402) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/LICENSE +21 -0
  3. package/README.md +179 -2
  4. package/THIRD_PARTY_NOTICES.md +19 -0
  5. package/dist/ActionSheet.d.ts +45 -0
  6. package/dist/ActionSheet.jsx +37 -0
  7. package/dist/AnchoredBubble.d.ts +36 -0
  8. package/dist/AnchoredBubble.jsx +120 -0
  9. package/dist/Avatar.d.ts +35 -0
  10. package/dist/Avatar.jsx +29 -0
  11. package/dist/Backtop.d.ts +22 -0
  12. package/dist/Backtop.jsx +18 -0
  13. package/dist/Badge.d.ts +19 -0
  14. package/dist/Badge.jsx +11 -0
  15. package/dist/BarCode.d.ts +20 -0
  16. package/dist/BarCode.jsx +38 -0
  17. package/dist/Button.d.ts +21 -0
  18. package/dist/Button.jsx +19 -0
  19. package/dist/Calendar.d.ts +90 -0
  20. package/dist/Calendar.jsx +164 -0
  21. package/dist/CalendarView.d.ts +51 -0
  22. package/dist/CalendarView.jsx +136 -0
  23. package/dist/Card.d.ts +21 -0
  24. package/dist/Card.jsx +21 -0
  25. package/dist/Cascader.d.ts +75 -0
  26. package/dist/Cascader.jsx +212 -0
  27. package/dist/Cell.d.ts +34 -0
  28. package/dist/Cell.jsx +37 -0
  29. package/dist/Checkbox.d.ts +50 -0
  30. package/dist/Checkbox.jsx +74 -0
  31. package/dist/Circle.d.ts +19 -0
  32. package/dist/Circle.jsx +35 -0
  33. package/dist/Collapse.d.ts +31 -0
  34. package/dist/Collapse.jsx +61 -0
  35. package/dist/ConfigProvider.d.ts +15 -0
  36. package/dist/ConfigProvider.jsx +20 -0
  37. package/dist/CountDown.d.ts +20 -0
  38. package/dist/CountDown.jsx +15 -0
  39. package/dist/CountTo.d.ts +28 -0
  40. package/dist/CountTo.jsx +27 -0
  41. package/dist/Curtain.d.ts +29 -0
  42. package/dist/Curtain.jsx +51 -0
  43. package/dist/DatetimePicker.d.ts +46 -0
  44. package/dist/DatetimePicker.jsx +138 -0
  45. package/dist/DatetimePickerView.d.ts +38 -0
  46. package/dist/DatetimePickerView.jsx +36 -0
  47. package/dist/Dialog.d.ts +64 -0
  48. package/dist/Dialog.jsx +105 -0
  49. package/dist/Divider.d.ts +16 -0
  50. package/dist/Divider.jsx +9 -0
  51. package/dist/DropMenu.d.ts +55 -0
  52. package/dist/DropMenu.jsx +210 -0
  53. package/dist/Empty.d.ts +14 -0
  54. package/dist/Empty.jsx +14 -0
  55. package/dist/EmptyState.d.ts +6 -0
  56. package/dist/EmptyState.jsx +9 -0
  57. package/dist/Fab.d.ts +30 -0
  58. package/dist/Fab.jsx +127 -0
  59. package/dist/FloatingPanel.d.ts +21 -0
  60. package/dist/FloatingPanel.jsx +102 -0
  61. package/dist/Form.d.ts +63 -0
  62. package/dist/Form.jsx +108 -0
  63. package/dist/FormFieldRow.d.ts +56 -0
  64. package/dist/FormFieldRow.jsx +63 -0
  65. package/dist/Gap.d.ts +10 -0
  66. package/dist/Gap.jsx +14 -0
  67. package/dist/Grid.d.ts +47 -0
  68. package/dist/Grid.jsx +31 -0
  69. package/dist/Icon.d.ts +11 -0
  70. package/dist/Icon.jsx +12 -0
  71. package/dist/ImagePreview.d.ts +62 -0
  72. package/dist/ImagePreview.jsx +78 -0
  73. package/dist/Img.d.ts +28 -0
  74. package/dist/Img.jsx +59 -0
  75. package/dist/ImgCropper.d.ts +74 -0
  76. package/dist/ImgCropper.jsx +114 -0
  77. package/dist/IndexBar.d.ts +36 -0
  78. package/dist/IndexBar.jsx +149 -0
  79. package/dist/Input.d.ts +11 -0
  80. package/dist/Input.jsx +3 -0
  81. package/dist/InputNumber.d.ts +32 -0
  82. package/dist/InputNumber.jsx +165 -0
  83. package/dist/Keyboard.d.ts +37 -0
  84. package/dist/Keyboard.jsx +130 -0
  85. package/dist/Layout.d.ts +31 -0
  86. package/dist/Layout.jsx +14 -0
  87. package/dist/Loading.d.ts +18 -0
  88. package/dist/Loading.jsx +15 -0
  89. package/dist/Loadmore.d.ts +18 -0
  90. package/dist/Loadmore.jsx +16 -0
  91. package/dist/Navbar.d.ts +35 -0
  92. package/dist/Navbar.jsx +50 -0
  93. package/dist/NoticeBar.d.ts +30 -0
  94. package/dist/NoticeBar.jsx +86 -0
  95. package/dist/Notify.d.ts +34 -0
  96. package/dist/Notify.jsx +52 -0
  97. package/dist/NumberStepper.d.ts +11 -0
  98. package/dist/NumberStepper.jsx +41 -0
  99. package/dist/Overlay.d.ts +16 -0
  100. package/dist/Overlay.jsx +12 -0
  101. package/dist/PagedList.d.ts +13 -0
  102. package/dist/PagedList.jsx +36 -0
  103. package/dist/Pagination.d.ts +29 -0
  104. package/dist/Pagination.jsx +33 -0
  105. package/dist/PasswordInput.d.ts +16 -0
  106. package/dist/PasswordInput.jsx +20 -0
  107. package/dist/Picker.d.ts +61 -0
  108. package/dist/Picker.jsx +80 -0
  109. package/dist/PickerView.d.ts +43 -0
  110. package/dist/PickerView.jsx +142 -0
  111. package/dist/Popover.d.ts +23 -0
  112. package/dist/Popover.jsx +35 -0
  113. package/dist/Popup.d.ts +30 -0
  114. package/dist/Popup.jsx +32 -0
  115. package/dist/Progress.d.ts +17 -0
  116. package/dist/Progress.jsx +45 -0
  117. package/dist/QrCode.d.ts +46 -0
  118. package/dist/QrCode.jsx +67 -0
  119. package/dist/Radio.d.ts +21 -0
  120. package/dist/Radio.jsx +34 -0
  121. package/dist/Rate.d.ts +25 -0
  122. package/dist/Rate.jsx +39 -0
  123. package/dist/Resize.d.ts +17 -0
  124. package/dist/Resize.jsx +17 -0
  125. package/dist/RichText.d.ts +133 -0
  126. package/dist/RichText.jsx +288 -0
  127. package/dist/RootPortal.d.ts +11 -0
  128. package/dist/RootPortal.jsx +19 -0
  129. package/dist/Search.d.ts +39 -0
  130. package/dist/Search.jsx +94 -0
  131. package/dist/Segmented.d.ts +18 -0
  132. package/dist/Segmented.jsx +35 -0
  133. package/dist/SelectPicker.d.ts +54 -0
  134. package/dist/SelectPicker.jsx +136 -0
  135. package/dist/Sidebar.d.ts +34 -0
  136. package/dist/Sidebar.jsx +43 -0
  137. package/dist/Signature.d.ts +46 -0
  138. package/dist/Signature.jsx +203 -0
  139. package/dist/Skeleton.d.ts +27 -0
  140. package/dist/Skeleton.jsx +29 -0
  141. package/dist/SlideVerify.d.ts +27 -0
  142. package/dist/SlideVerify.jsx +138 -0
  143. package/dist/Slider.d.ts +21 -0
  144. package/dist/Slider.jsx +131 -0
  145. package/dist/SortButton.d.ts +16 -0
  146. package/dist/SortButton.jsx +19 -0
  147. package/dist/Steps.d.ts +23 -0
  148. package/dist/Steps.jsx +25 -0
  149. package/dist/Sticky.d.ts +17 -0
  150. package/dist/Sticky.jsx +69 -0
  151. package/dist/SwipeAction.d.ts +27 -0
  152. package/dist/SwipeAction.jsx +187 -0
  153. package/dist/Swiper.d.ts +54 -0
  154. package/dist/Swiper.jsx +94 -0
  155. package/dist/SwiperNav.d.ts +18 -0
  156. package/dist/SwiperNav.jsx +10 -0
  157. package/dist/Switch.d.ts +31 -0
  158. package/dist/Switch.jsx +46 -0
  159. package/dist/SyncedInput.d.ts +12 -0
  160. package/dist/SyncedInput.jsx +18 -0
  161. package/dist/SyncedTextarea.d.ts +11 -0
  162. package/dist/SyncedTextarea.jsx +18 -0
  163. package/dist/Tabbar.d.ts +37 -0
  164. package/dist/Tabbar.jsx +46 -0
  165. package/dist/Table.d.ts +51 -0
  166. package/dist/Table.jsx +125 -0
  167. package/dist/Tabs.d.ts +65 -0
  168. package/dist/Tabs.jsx +132 -0
  169. package/dist/Tag.d.ts +33 -0
  170. package/dist/Tag.jsx +63 -0
  171. package/dist/Text.d.ts +19 -0
  172. package/dist/Text.jsx +7 -0
  173. package/dist/TextField.d.ts +89 -0
  174. package/dist/TextField.jsx +149 -0
  175. package/dist/Textarea.d.ts +22 -0
  176. package/dist/Textarea.jsx +3 -0
  177. package/dist/Toast.d.ts +36 -0
  178. package/dist/Toast.jsx +30 -0
  179. package/dist/Tooltip.d.ts +8 -0
  180. package/dist/Tooltip.jsx +5 -0
  181. package/dist/Tour.d.ts +85 -0
  182. package/dist/Tour.jsx +150 -0
  183. package/dist/Transition.d.ts +32 -0
  184. package/dist/Transition.jsx +43 -0
  185. package/dist/Upload.d.ts +64 -0
  186. package/dist/Upload.jsx +163 -0
  187. package/dist/VideoPreview.d.ts +47 -0
  188. package/dist/VideoPreview.jsx +59 -0
  189. package/dist/Watermark.d.ts +36 -0
  190. package/dist/Watermark.jsx +18 -0
  191. package/dist/action-sheet.css +19 -0
  192. package/dist/avatar.css +23 -0
  193. package/dist/avatarModel.d.ts +8 -0
  194. package/dist/avatarModel.js +17 -0
  195. package/dist/backtop.css +6 -0
  196. package/dist/badge.css +15 -0
  197. package/dist/badgeModel.d.ts +2 -0
  198. package/dist/badgeModel.js +18 -0
  199. package/dist/bar-code.css +5 -0
  200. package/dist/barCodeModel.d.ts +80 -0
  201. package/dist/barCodeModel.js +99 -0
  202. package/dist/brand/logo.svg +8 -0
  203. package/dist/bubble.css +14 -0
  204. package/dist/bubblePosition.d.ts +19 -0
  205. package/dist/bubblePosition.js +41 -0
  206. package/dist/button.css +56 -0
  207. package/dist/calendar.css +56 -0
  208. package/dist/calendarModel.d.ts +62 -0
  209. package/dist/calendarModel.js +141 -0
  210. package/dist/card.css +8 -0
  211. package/dist/cascader.css +16 -0
  212. package/dist/cascaderModel.d.ts +21 -0
  213. package/dist/cascaderModel.js +32 -0
  214. package/dist/cell.css +41 -0
  215. package/dist/choice.css +27 -0
  216. package/dist/choice.d.ts +28 -0
  217. package/dist/choice.jsx +16 -0
  218. package/dist/circle.css +4 -0
  219. package/dist/circleModel.d.ts +15 -0
  220. package/dist/circleModel.js +31 -0
  221. package/dist/config-provider.css +2 -0
  222. package/dist/configContext.d.ts +23 -0
  223. package/dist/configContext.js +24 -0
  224. package/dist/configTheme.d.ts +3 -0
  225. package/dist/configTheme.js +22 -0
  226. package/dist/count-down.css +2 -0
  227. package/dist/count-to.css +8 -0
  228. package/dist/countDownModel.d.ts +11 -0
  229. package/dist/countDownModel.js +7 -0
  230. package/dist/countToModel.d.ts +3 -0
  231. package/dist/countToModel.js +3 -0
  232. package/dist/curtain.css +10 -0
  233. package/dist/datetime-picker.css +11 -0
  234. package/dist/datetimePickerModel.d.ts +47 -0
  235. package/dist/datetimePickerModel.js +128 -0
  236. package/dist/dialog.css +23 -0
  237. package/dist/divider.css +14 -0
  238. package/dist/drop-menu.css +28 -0
  239. package/dist/empty.css +7 -0
  240. package/dist/fab.css +23 -0
  241. package/dist/fabModel.d.ts +26 -0
  242. package/dist/fabModel.js +16 -0
  243. package/dist/floating-panel.css +6 -0
  244. package/dist/floatingPanelModel.d.ts +3 -0
  245. package/dist/floatingPanelModel.js +10 -0
  246. package/dist/form.css +10 -0
  247. package/dist/formContext.d.ts +7 -0
  248. package/dist/formContext.js +2 -0
  249. package/dist/formModel.d.ts +38 -0
  250. package/dist/formModel.js +16 -0
  251. package/dist/gap.css +1 -0
  252. package/dist/grid.css +17 -0
  253. package/dist/icon.css +8 -0
  254. package/dist/icons/LICENSE.tabler +21 -0
  255. package/dist/icons/paths.d.ts +309 -0
  256. package/dist/icons/paths.js +310 -0
  257. package/dist/icons/render.d.ts +2 -0
  258. package/dist/icons/render.js +5 -0
  259. package/dist/image-preview.css +8 -0
  260. package/dist/img-cropper.css +1 -0
  261. package/dist/img.css +5 -0
  262. package/dist/imgCropperModel.d.ts +55 -0
  263. package/dist/imgCropperModel.js +41 -0
  264. package/dist/imgModel.d.ts +13 -0
  265. package/dist/imgModel.js +22 -0
  266. package/dist/index-bar.css +12 -0
  267. package/dist/index.d.ts +200 -0
  268. package/dist/index.js +99 -0
  269. package/dist/indexBarModel.d.ts +19 -0
  270. package/dist/indexBarModel.js +37 -0
  271. package/dist/input-number.css +24 -0
  272. package/dist/inputNumberModel.d.ts +23 -0
  273. package/dist/inputNumberModel.js +40 -0
  274. package/dist/keyboard.css +26 -0
  275. package/dist/keyboardModel.d.ts +11 -0
  276. package/dist/keyboardModel.js +34 -0
  277. package/dist/layout.css +2 -0
  278. package/dist/legacy/RadioGroup.d.ts +13 -0
  279. package/dist/legacy/RadioGroup.jsx +13 -0
  280. package/dist/legacy-controls.css +87 -0
  281. package/dist/loading.css +31 -0
  282. package/dist/loadingModel.d.ts +2 -0
  283. package/dist/loadingModel.js +21 -0
  284. package/dist/loadmore.css +5 -0
  285. package/dist/navbar.css +16 -0
  286. package/dist/notice-bar.css +19 -0
  287. package/dist/notify.css +14 -0
  288. package/dist/overlay.css +2 -0
  289. package/dist/pagination.css +12 -0
  290. package/dist/paginationModel.d.ts +6 -0
  291. package/dist/paginationModel.js +7 -0
  292. package/dist/password-input.css +14 -0
  293. package/dist/passwordInputModel.d.ts +6 -0
  294. package/dist/passwordInputModel.js +11 -0
  295. package/dist/picker.css +42 -0
  296. package/dist/pickerModel.d.ts +32 -0
  297. package/dist/pickerModel.js +49 -0
  298. package/dist/popover.css +5 -0
  299. package/dist/popup.css +17 -0
  300. package/dist/progress.css +16 -0
  301. package/dist/progressModel.d.ts +12 -0
  302. package/dist/progressModel.js +19 -0
  303. package/dist/qr-code.css +4 -0
  304. package/dist/qrCodeModel.d.ts +36 -0
  305. package/dist/qrCodeModel.js +61 -0
  306. package/dist/rate.css +20 -0
  307. package/dist/rateModel.d.ts +4 -0
  308. package/dist/rateModel.js +38 -0
  309. package/dist/resize.css +2 -0
  310. package/dist/rich-text.css +19 -0
  311. package/dist/richTextMedia.d.ts +28 -0
  312. package/dist/richTextMedia.js +3 -0
  313. package/dist/richTextModel.d.ts +52 -0
  314. package/dist/richTextModel.js +195 -0
  315. package/dist/root-portal.css +1 -0
  316. package/dist/router/RouterView.d.ts +21 -0
  317. package/dist/router/RouterView.jsx +120 -0
  318. package/dist/router/core.d.ts +85 -0
  319. package/dist/router/core.js +255 -0
  320. package/dist/router/hooks.d.ts +17 -0
  321. package/dist/router/hooks.jsx +71 -0
  322. package/dist/router/index.d.ts +5 -0
  323. package/dist/router/index.js +3 -0
  324. package/dist/router/location.d.ts +8 -0
  325. package/dist/router/location.js +46 -0
  326. package/dist/router/router.css +7 -0
  327. package/dist/router/runtime.d.ts +1 -0
  328. package/dist/router/runtime.js +25 -0
  329. package/dist/search.css +23 -0
  330. package/dist/segmented.css +19 -0
  331. package/dist/segmentedModel.d.ts +10 -0
  332. package/dist/segmentedModel.js +8 -0
  333. package/dist/sidebar.css +18 -0
  334. package/dist/sidebarModel.d.ts +8 -0
  335. package/dist/sidebarModel.js +27 -0
  336. package/dist/signature.css +5 -0
  337. package/dist/signatureModel.d.ts +23 -0
  338. package/dist/signatureModel.js +80 -0
  339. package/dist/skeleton.css +16 -0
  340. package/dist/slide-verify.css +7 -0
  341. package/dist/slider.css +49 -0
  342. package/dist/sliderModel.d.ts +10 -0
  343. package/dist/sliderModel.js +27 -0
  344. package/dist/sort-button.css +12 -0
  345. package/dist/steps.css +35 -0
  346. package/dist/sticky.css +7 -0
  347. package/dist/styles.css +136 -0
  348. package/dist/styles.d.ts +1 -0
  349. package/dist/swipe-action.css +6 -0
  350. package/dist/swiper.css +27 -0
  351. package/dist/swiperAnimation.d.ts +3 -0
  352. package/dist/swiperAnimation.js +6 -0
  353. package/dist/swiperModel.d.ts +2 -0
  354. package/dist/swiperModel.js +3 -0
  355. package/dist/switch.css +12 -0
  356. package/dist/tabbar.css +17 -0
  357. package/dist/tabbarModel.d.ts +8 -0
  358. package/dist/tabbarModel.js +27 -0
  359. package/dist/table.css +21 -0
  360. package/dist/tableModel.d.ts +10 -0
  361. package/dist/tableModel.js +17 -0
  362. package/dist/tabs.css +31 -0
  363. package/dist/tabsModel.d.ts +7 -0
  364. package/dist/tabsModel.js +14 -0
  365. package/dist/tag.css +66 -0
  366. package/dist/text-field.css +15 -0
  367. package/dist/text.css +7 -0
  368. package/dist/textModel.d.ts +3 -0
  369. package/dist/textModel.js +24 -0
  370. package/dist/toast.css +13 -0
  371. package/dist/tokens.d.ts +34 -0
  372. package/dist/tokens.js +10 -0
  373. package/dist/tour.css +8 -0
  374. package/dist/transition.css +12 -0
  375. package/dist/upload.css +11 -0
  376. package/dist/useCountDown.d.ts +14 -0
  377. package/dist/useCountDown.js +73 -0
  378. package/dist/useDialog.d.ts +9 -0
  379. package/dist/useDialog.js +33 -0
  380. package/dist/useImagePreview.d.ts +7 -0
  381. package/dist/useImagePreview.js +17 -0
  382. package/dist/useNotify.d.ts +9 -0
  383. package/dist/useNotify.js +26 -0
  384. package/dist/usePressState.d.ts +6 -0
  385. package/dist/usePressState.js +17 -0
  386. package/dist/useToast.d.ts +11 -0
  387. package/dist/useToast.js +23 -0
  388. package/dist/useVideoPreview.d.ts +7 -0
  389. package/dist/useVideoPreview.js +17 -0
  390. package/dist/utils.d.ts +4 -0
  391. package/dist/utils.js +4 -0
  392. package/dist/video-preview.css +7 -0
  393. package/dist/watermark.css +6 -0
  394. package/dist/web/imgCropperElement.d.ts +2 -0
  395. package/dist/web/imgCropperElement.js +309 -0
  396. package/dist/web/index.d.ts +6 -0
  397. package/dist/web/index.js +6 -0
  398. package/dist/web/qrCodeExportElement.d.ts +4 -0
  399. package/dist/web/qrCodeExportElement.js +70 -0
  400. package/dist/web/richTextMediaElement.d.ts +2 -0
  401. package/dist/web/richTextMediaElement.js +276 -0
  402. package/package.json +98 -4
@@ -0,0 +1,26 @@
1
+ .ui-keyboard{width:100%;background-color:var(--cso-ui-surface-muted);}
2
+ .ui-keyboard-header{position:relative;display:flex;flex-direction:row;align-items:center;justify-content:center;height:40px;}
3
+ .ui-keyboard-title{display:flex;align-items:center;justify-content:center;}
4
+ .ui-keyboard-title text{font-size:14px;line-height:20px;font-weight:400;color:var(--cso-ui-text-muted);}
5
+ .ui-keyboard-close{position:absolute;right:0;top:0;bottom:0;padding:0 12px;display:flex;align-items:center;justify-content:center;}
6
+ .ui-keyboard-close text{font-size:14px;line-height:20px;color:var(--cso-ui-primary);}
7
+ .ui-keyboard-body{display:flex;flex-direction:row;padding-top:8px;padding-left:8px;}
8
+ .ui-keyboard-body-with-header{padding-top:0;}
9
+ .ui-keyboard-keys{display:flex;flex-direction:row;flex:3;flex-wrap:wrap;min-width:0;}
10
+ .ui-keyboard-key-wrap{position:relative;flex:1 0 33%;padding:0 8px 8px 0;}
11
+ .ui-keyboard-key-wider{flex:1 0 66%;}
12
+ .ui-keyboard-key{display:flex;flex-direction:row;align-items:center;justify-content:center;height:48px;min-width:0;border-radius:4px;background-color:var(--cso-ui-surface);}
13
+ .ui-keyboard-key text{font-size:24px;line-height:34px;font-weight:600;color:var(--cso-ui-text);}
14
+ .ui-keyboard-key-pressed{background-color:var(--cso-ui-line);}
15
+ .ui-keyboard-sidebar{display:flex;flex-direction:column;flex:1;min-width:0;}
16
+ .ui-keyboard-key-large-wrap{flex:1;flex-basis:auto;}
17
+ .ui-keyboard-key-large{position:absolute;top:0;left:0;right:8px;bottom:8px;height:auto;}
18
+ .ui-keyboard-key-delete text,.ui-keyboard-key-close text{font-size:18px;line-height:26px;}
19
+ .ui-keyboard-key-close{background-color:var(--cso-ui-primary);}
20
+ .ui-keyboard-key-close text{color:var(--cso-ui-on-primary);}
21
+ .ui-keyboard-key-close.ui-keyboard-key-pressed{background-color:var(--cso-ui-primary-pressed,var(--cso-ui-primary));opacity:.8;}
22
+ .ui-keyboard-car-keys{flex:10;}
23
+ .ui-keyboard-key-car-wrap{flex:1 0 10%;}
24
+ .ui-keyboard-key-car-wrap.ui-keyboard-key-wider{flex:1 0 20%;}
25
+ .ui-keyboard-key-car text{font-size:18px;line-height:26px;}
26
+ .ui-keyboard-disabled .ui-keyboard-key{opacity:.4;}
@@ -0,0 +1,11 @@
1
+ export type KeyboardMode = 'default' | 'custom' | 'car';
2
+ export type CarKeyboardLang = 'zh' | 'en';
3
+ export type KeyboardKey = {
4
+ text: string;
5
+ type?: 'input' | 'extra' | 'delete' | 'close' | 'blank';
6
+ wider?: boolean;
7
+ };
8
+ export declare const keyboardDigits: string[];
9
+ export declare function shuffleKeyboardDigits(random?: () => number): string[];
10
+ export declare function keyboardKeys(mode: KeyboardMode, digits: readonly string[], extraKey: string | readonly string[] | undefined, showDeleteKey: boolean, deleteText: string, lang: CarKeyboardLang): KeyboardKey[];
11
+ export declare function keyboardAppend(value: string, key: string, maxlength: number): string;
@@ -0,0 +1,34 @@
1
+ const provinces = ['京', '沪', '粤', '津', '冀', '豫', '云', '辽', '黑', '湘', '皖', '鲁', '苏', '浙', '赣', '鄂', '桂', '甘', '晋', '陕', '蒙', '吉', '闽', '贵', '渝', '川', '青', '琼', '宁', '挂', '藏', '港', '澳', '新', '使', '学'];
2
+ const letters = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 'X', 'C', 'V', 'B', 'N', 'M'];
3
+ export const keyboardDigits = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];
4
+ export function shuffleKeyboardDigits(random = Math.random) {
5
+ const result = [...keyboardDigits];
6
+ for (let index = result.length - 1; index > 0; index--) {
7
+ const target = Math.floor(random() * (index + 1));
8
+ [result[index], result[target]] = [result[target], result[index]];
9
+ }
10
+ return result;
11
+ }
12
+ export function keyboardKeys(mode, digits, extraKey, showDeleteKey, deleteText, lang) {
13
+ if (mode === 'car') {
14
+ const keys = (lang === 'zh' ? provinces : letters).map(text => ({ text }));
15
+ keys.splice(30, 0, { text: lang === 'zh' ? 'ABC' : '省份', type: 'extra', wider: true });
16
+ keys.push({ text: deleteText, type: 'delete', wider: true });
17
+ return keys;
18
+ }
19
+ const keys = digits.map(text => ({ text }));
20
+ const extras = Array.isArray(extraKey) ? extraKey.slice(0, 2) : [extraKey ?? ''];
21
+ if (mode === 'custom') {
22
+ if (extras.length > 1)
23
+ keys.push({ text: extras[0], type: 'extra' }, { text: '0' }, { text: extras[1], type: 'extra' });
24
+ else
25
+ keys.push({ text: '0', wider: true }, { text: extras[0] ?? '', type: 'extra' });
26
+ }
27
+ else
28
+ keys.push({ text: extras[0] ?? '', type: 'extra' }, { text: '0' }, { text: showDeleteKey ? deleteText : '', type: showDeleteKey ? 'delete' : 'blank' });
29
+ return keys;
30
+ }
31
+ export function keyboardAppend(value, key, maxlength) {
32
+ const remaining = Number.isFinite(maxlength) ? Math.max(0, Math.trunc(maxlength) - Array.from(value).length) : maxlength === Infinity ? Infinity : 0;
33
+ return value + Array.from(key).slice(0, remaining).join('');
34
+ }
@@ -0,0 +1,2 @@
1
+ .ui-row { display: flex; flex-direction: row; flex-wrap: wrap; }
2
+ .ui-col { box-sizing: border-box; flex-shrink: 0; min-width: 0; }
@@ -0,0 +1,13 @@
1
+ export type RadioOption = {
2
+ label: string;
3
+ value: string;
4
+ disabled?: boolean;
5
+ };
6
+ type RadioGroupProps = {
7
+ value: string;
8
+ options: RadioOption[];
9
+ onChange: (value: string) => void;
10
+ disabled?: boolean;
11
+ };
12
+ export declare function RadioGroup({ value, options, onChange, disabled }: RadioGroupProps): import("@lynx-js/react").JSX.Element;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ export function RadioGroup({ value, options, onChange, disabled = false }) {
2
+ return <view className={`radio-group ${disabled ? 'radio-group-disabled' : ''}`}>
3
+ {options.map(option => {
4
+ const active = value === option.value;
5
+ const optionDisabled = disabled || option.disabled;
6
+ return <view className={`radio-option ${active ? 'radio-option-active' : ''} ${optionDisabled ? 'radio-option-disabled' : ''}`} key={option.value} bindtap={() => { if (!optionDisabled)
7
+ onChange(option.value); }}>
8
+ <view className="radio-option-icon">{active ? <view className="radio-option-dot"/> : null}</view>
9
+ <text>{option.label}</text>
10
+ </view>;
11
+ })}
12
+ </view>;
13
+ }
@@ -0,0 +1,87 @@
1
+ .navbar{height:56px;flex-shrink:0;position:relative;}
2
+ .navbar-content{position:absolute;left:0;right:0;height:56px;}
3
+ .nav-center{flex-direction:column;position:absolute;left:76px;right:112px;top:0;bottom:0;display:flex;align-items:flex-start;justify-content:center;pointer-events:none;}
4
+ .nav-title{width:100%;overflow:hidden;text-overflow:ellipsis;text-align:left;}
5
+ .nav-action{position:absolute;top:0;bottom:0;display:flex;justify-content:center;}
6
+ .nav-left{left:0;width:76px;padding-left:16px;align-items:flex-start;flex-direction:column;}
7
+ .nav-right{right:0;width:112px;padding-right:12px;align-items:flex-end;flex-direction:column;}
8
+ .nav-right-button{min-width:80px;height:34px;padding:0 12px;border-radius:17px;background-color:#f86100;display:flex;align-items:center;justify-content:center;}
9
+ .nav-right-button-disabled{background-color:#f0f1f3;}
10
+ .nav-right-button-label{font-size:13px;color:#fff;font-weight:600;}
11
+ .nav-right-button-label-disabled{color:#b6bac2;}
12
+ .nav-title{font-size:16px;font-weight:600;color:#17212e;}
13
+ .nav-title{font-size:18px;}
14
+ .data-list-body{position:relative;flex:1;min-height:0;height:0px;width:100%;}
15
+ .native-refresh-header{width:100vw;height:50px;display:flex;flex-direction:row;align-items:center;justify-content:center;}
16
+ .native-refresh-spinner{width:50px;height:50px;}
17
+ .native-refresh-label{font-size:12px;color:#8a8f98;margin-left:2px;}
18
+ .nav-back-circle{width:44px;height:44px;border-radius:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;}
19
+ .nav-circle-button{background-color:rgba(48,49,51,.06);}
20
+ .navbar .action{color:#f86100;}
21
+ .theme-dark .nav-title{color:#f2f4f7;}
22
+ .theme-dark .nav-circle-button{background-color:#222730;}
23
+ .theme-dark .nav-right-button-disabled{background-color:#282d36;}
24
+ .theme-dark .nav-right-button-label-disabled{color:#737d8b;}
25
+ .theme-dark .native-refresh-label{color:#9aa4b2;}
26
+ .nav-icon-button{position:relative;width:44px;height:44px;margin-left:8px;border-radius:22px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
27
+ .nav-icon-button-active{background-color:rgba(248,97,0,.12);}
28
+ .form-field-row{position:relative;min-height:46px;display:flex;flex-direction:row;align-items:center;}
29
+ .form-field-divider{position:absolute;left:0;right:0;bottom:0;height:.5px;background-color:rgba(126,134,142,.16);}
30
+ .form-field-row-last .form-field-divider{display:none;}
31
+ .form-field-disabled .form-field-label,.form-field-disabled .form-field-body{opacity:.45;}
32
+ .form-field-label{width:132px;flex-shrink:0;display:flex;flex-direction:row;align-items:center;font-size:13px;line-height:19px;color:#5d6470;}
33
+ .form-field-required{margin-right:3px;color:#e5484d;}
34
+ .form-field-row-error .form-field-label{color:#e5484d;}
35
+ .form-field-body{flex:1;min-width:0;padding:2px 0;display:flex;flex-direction:column;}
36
+ .form-field-control{width:100%;min-width:0;height:42px;display:flex;flex-direction:row;align-items:center;}
37
+ .form-field-error{margin-top:-4px;padding-bottom:4px;font-size:11px;line-height:15px;color:#e5484d;text-align:right;}
38
+ .form-field-input{flex:1;min-width:0;height:40px;padding:0;border-width:0;background-color:transparent;color:#303133;font-size:13px;text-align:right;}
39
+ .form-field-select-control{justify-content:flex-end;}
40
+ .form-field-select-value{flex:1;min-width:0;height:46px;display:flex;align-items:center;justify-content:flex-end;}
41
+ .form-field-value,.form-field-placeholder{font-size:13px;line-height:19px;text-align:right;}
42
+ .form-field-value{color:#303133;}
43
+ .form-field-placeholder{color:#a0a5ad;}
44
+ .form-field-clear{width:28px;height:38px;margin-left:3px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
45
+ .form-field-clear text{width:17px;height:17px;border-radius:9px;background-color:#c7cbd1;font-size:14px;line-height:16px;color:#fff;text-align:center;}
46
+ .form-field-chevron{width:18px;height:38px;display:flex;align-items:center;justify-content:flex-end;flex-shrink:0;}
47
+ .form-field-chevron text{font-size:20px;color:#b5bac2;}
48
+ .form-textarea-row{position:relative;padding:13px 0 12px;display:flex;flex-direction:column;}
49
+ .form-textarea-row .form-field-label{width:100%;}
50
+ .form-textarea-box{position:relative;height:112px;margin-top:9px;padding:10px 10px 25px;border:.5px solid rgba(126,134,142,.24);border-radius:6px;background-color:#fff;}
51
+ .form-textarea-input{width:100%;height:100%;padding:0;border-width:0;background-color:transparent;color:#303133;font-size:13px;text-align:left;}
52
+ .form-textarea-count{position:absolute;right:10px;bottom:6px;font-size:11px;line-height:15px;color:#a0a5ad;}
53
+ .form-textarea-error{margin-top:4px;font-size:11px;line-height:15px;color:#e5484d;text-align:right;}
54
+ .radio-group{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;}
55
+ .radio-group-disabled{opacity:.45;}
56
+ .radio-option{height:40px;margin-left:22px;display:flex;flex-direction:row;align-items:center;justify-content:center;}
57
+ .radio-option-disabled{opacity:.45;}
58
+ .radio-option-icon{width:18px;height:18px;margin-right:7px;border:1px solid #b8bec7;border-radius:9px;display:flex;align-items:center;justify-content:center;}
59
+ .radio-option-dot{width:8px;height:8px;border-radius:4px;background-color:#f86100;}
60
+ .radio-option text{font-size:14px;line-height:20px;color:#303133;}
61
+ .radio-option-active .radio-option-icon{border-color:#f86100;}
62
+ .number-stepper{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;}
63
+ .number-stepper-disabled{opacity:.45;}
64
+ .number-stepper-button{width:32px;height:28px;border:1px solid rgba(126,134,142,.24);display:flex;align-items:center;justify-content:center;background-color:#f7f8fa;}
65
+ .number-stepper-button:first-child{border-radius:4px 0 0 4px;}
66
+ .number-stepper-button:last-child{border-radius:0 4px 4px 0;}
67
+ .number-stepper-button text{font-size:19px;line-height:22px;color:#303133;}
68
+ .number-stepper-button-disabled{background-color:#f2f3f5;}
69
+ .number-stepper-button-disabled text{color:#c2c6cc;}
70
+ .number-stepper-input{width:54px;height:28px;padding:0;border-width:1px 0;border-style:solid;border-color:rgba(126,134,142,.24);background-color:#fff;font-size:13px;color:#303133;text-align:center;}
71
+ .theme-dark .form-field-divider{background-color:rgba(126,134,142,.24);}
72
+ .theme-dark .form-field-label,.theme-dark .form-field-label text{color:#a5aeba;}
73
+ .theme-dark .form-field-required,.theme-dark .form-field-row-error .form-field-label,.theme-dark .form-field-row-error .form-field-label text{color:#e5484d;}
74
+ .theme-dark .form-field-input,.theme-dark .form-field-value{color:#f0f2f5;}
75
+ .theme-dark .form-field-clear text{background-color:#596270;}
76
+ .theme-dark .form-textarea-box{border-color:rgba(126,134,142,.32);background-color:#181c23;}
77
+ .theme-dark .form-textarea-input{color:#f0f2f5;}
78
+ .theme-dark .radio-option text{color:#f0f2f5;}
79
+ .theme-dark .radio-option-icon{border-color:#697382;}
80
+ .theme-dark .radio-option-active .radio-option-icon{border-color:#f86100;}
81
+ .theme-dark .number-stepper-button{border-color:rgba(126,134,142,.32);background-color:#292f38;}
82
+ .theme-dark .number-stepper-button text,.theme-dark .number-stepper-input{color:#f0f2f5;}
83
+ .theme-dark .number-stepper-button-disabled{background-color:#20252d;}
84
+ .theme-dark .number-stepper-button-disabled text{color:#697382;}
85
+ .theme-dark .number-stepper-input{border-color:rgba(126,134,142,.32);background-color:#181c23;}
86
+ .theme-dark .nav-icon-button{background-color:#222730;}
87
+ .theme-dark .nav-icon-button-active{background-color:#3a2a20;}
@@ -0,0 +1,31 @@
1
+ .ui-loading { display: flex; align-items: center; justify-content: center; align-self: flex-start; }
2
+ .ui-loading-vertical { flex-direction: column; }
3
+ .ui-loading-horizontal { flex-direction: row; }
4
+ .ui-loading-spinner { position: relative; flex-shrink: 0; padding: 2px; box-sizing: border-box; }
5
+ .ui-loading-spinner-circular { animation: ui-loading-rotate 800ms linear infinite; }
6
+ .ui-loading-spinner-spinner { animation: ui-loading-rotate 800ms steps(12, end) infinite; }
7
+ .ui-loading-circle, .ui-loading-inner { position: relative; width: 100%; height: 100%; }
8
+ .ui-loading-inner-dots { display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
9
+ .ui-loading-dot { width: 20%; height: 20%; border-radius: 9999px; animation: ui-loading-dotting 800ms linear infinite both; }
10
+ .ui-loading-spoke { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; }
11
+ .ui-loading-spoke-tip { width: 10%; height: 25%; border-radius: 9999px; }
12
+ .ui-loading-inner-wave { display: flex; flex-direction: row; align-items: center; justify-content: center; }
13
+ .ui-loading-wave-bar { width: 12.5%; height: 83.333333%; flex-shrink: 0; display: flex; align-items: center; }
14
+ .ui-loading-wave-bar + .ui-loading-wave-bar { margin-left: 6.25%; }
15
+ .ui-loading-wave-inner { width: 100%; height: 100%; border-radius: 9999px; animation-duration: 834ms; animation-timing-function: linear; animation-iteration-count: infinite; }
16
+ .ui-loading-wave-bar-1 .ui-loading-wave-inner { animation-name: ui-loading-wave-1; }
17
+ .ui-loading-wave-bar-2 .ui-loading-wave-inner { animation-name: ui-loading-wave-2; }
18
+ .ui-loading-wave-bar-3 .ui-loading-wave-inner { animation-name: ui-loading-wave-3; }
19
+ .ui-loading-wave-bar-4 .ui-loading-wave-inner { animation-name: ui-loading-wave-4; }
20
+ .ui-loading-label { font-size: 14px; line-height: 20px; color: inherit; }
21
+ .ui-loading-vertical .ui-loading-label { margin-top: 6px; }
22
+ .ui-loading-horizontal .ui-loading-label { margin-left: 6px; }
23
+ .ui-loading-legacy-label .ui-loading-label { font-size: 13px; line-height: 18px; color: var(--cso-ui-text-muted); }
24
+ .ui-loading-legacy-label.ui-loading-horizontal .ui-loading-label { margin-left: 8px; }
25
+ .ui-loading-custom-text { display: flex; flex-direction: row; }
26
+ @keyframes ui-loading-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
27
+ @keyframes ui-loading-dotting { 0% { opacity: .15; } 1%, 33% { opacity: .8; } 34%, 100% { opacity: .15; } }
28
+ @keyframes ui-loading-wave-1 { 0%, 100% { height: 20%; } 25.7794%, 87.8897% { height: 40%; } 37.8897%, 75.7794% { height: 70%; } 50% { height: 100%; } }
29
+ @keyframes ui-loading-wave-2 { 0%, 100% { height: 40%; } 25.7794%, 87.8897%, 50% { height: 70%; } 37.8897%, 75.7794% { height: 100%; } }
30
+ @keyframes ui-loading-wave-3 { 0%, 100%, 37.8897%, 75.7794% { height: 70%; } 25.7794%, 87.8897% { height: 100%; } 50% { height: 40%; } }
31
+ @keyframes ui-loading-wave-4 { 0%, 100% { height: 100%; } 25.7794%, 87.8897% { height: 70%; } 37.8897%, 75.7794% { height: 40%; } 50% { height: 20%; } }
@@ -0,0 +1,2 @@
1
+ export declare function loadingDimension(size?: number | string): string;
2
+ export declare function circularLoadingSvg(color: string): string;
@@ -0,0 +1,21 @@
1
+ const presets = { small: 14, medium: 20, large: 28 };
2
+ export function loadingDimension(size = 28) {
3
+ if (typeof size === 'string' && Object.hasOwn(presets, size))
4
+ return `${presets[size]}px`;
5
+ const match = /^(\d+(?:\.\d+)?)(px|rpx|rem|vw|vh)?$/.exec(String(size).trim());
6
+ if (!match || !Number.isFinite(Number(match[1])))
7
+ return '28px';
8
+ const value = Number(match[1]);
9
+ return match[2] === 'rpx' ? `${value / 7.5}vw` : `${value}${match[2] || 'px'}`;
10
+ }
11
+ // Match the conic ring with native SVG arcs; no CSS mask/conic-gradient dependency.
12
+ const arcs = Array.from({ length: 72 }, (_, index) => {
13
+ const start = (90 + index * 3.75) * Math.PI / 180;
14
+ const end = (90 + (index + 1) * 3.75 + .12) * Math.PI / 180;
15
+ const point = (angle) => `${(50 + 46.25 * Math.sin(angle)).toFixed(4)} ${(50 - 46.25 * Math.cos(angle)).toFixed(4)}`;
16
+ return `<path d="M${point(start)}A46.25 46.25 0 0 1 ${point(end)}" opacity="${Math.min(1, (index + .5) * 3.75 / 240).toFixed(4)}"/>`;
17
+ }).join('');
18
+ export function circularLoadingSvg(color) {
19
+ const escaped = color.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
20
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="none" stroke="${escaped}" stroke-width="7.5">${arcs}</g></svg>`;
21
+ }
@@ -0,0 +1,5 @@
1
+ .ui-loadmore { display: flex; flex-direction: row; justify-content: center; align-items: center; width: 100%; min-height: 48px; padding: 10px 12px; box-sizing: border-box; color: var(--cso-ui-text-muted); }
2
+ .ui-loadmore-text, .ui-loadmore-retry { font-size: 14px; line-height: 20px; color: inherit; }
3
+ .ui-loadmore-retry { margin: 0 6px; color: #1c64fd; }
4
+ .ui-loadmore .ui-loadmore-loading { margin-right: 8px; align-self: center; }
5
+ .ui-loadmore .ui-loadmore-divider { width: 100%; margin: 0; }
@@ -0,0 +1,16 @@
1
+ .ui-navbar-placeholder { width: 100%; flex-shrink: 0; }
2
+ .ui-navbar { position: relative; width: 100%; flex-shrink: 0; background-color: var(--cso-ui-surface); }
3
+ .ui-navbar-fixed { position: fixed; left: 0; top: 0; }
4
+ .ui-navbar-bordered { border-bottom: .5px solid var(--cso-ui-line); }
5
+ .ui-navbar-content { position: relative; width: 100%; height: 44px; }
6
+ .ui-navbar-title { position: absolute; left: 20%; top: 0; width: 60%; height: 44px; display: flex; align-items: center; justify-content: center; }
7
+ .ui-navbar-title text { font-size: 18px; line-height: 26px; font-weight: 500; color: var(--cso-ui-text); }
8
+ .ui-navbar-action { position: absolute; top: 0; height: 44px; padding: 0 12px; display: flex; flex-direction: row; align-items: center; }
9
+ .ui-navbar-left { left: 0; }
10
+ .ui-navbar-right { right: 0; }
11
+ .ui-navbar-action text { font-size: 16px; line-height: 24px; color: var(--cso-ui-text); }
12
+ .ui-navbar-disabled { opacity: .4; }
13
+ .ui-navbar-capsule-slot { position: absolute; top: 0; left: 12px; height: 44px; display: flex; flex-direction: row; align-items: center; }
14
+ .ui-navbar-capsule { width: 88px; height: 32px; display: flex; flex-direction: row; align-items: center; border: 1px solid var(--cso-ui-surface-muted); border-radius: 16px; }
15
+ .ui-navbar-capsule-button { flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; }
16
+ .ui-navbar-capsule-divider { width: 1px; height: 18px; background-color: var(--cso-ui-surface-muted); }
@@ -0,0 +1,19 @@
1
+ .ui-notice-bar{width:100%;display:flex;flex-direction:row;align-items:center;position:relative;box-sizing:border-box;padding:10px 12px;font-size:14px;line-height:20px;border-radius:var(--cso-ui-notice-bar-radius,0px);}
2
+ .ui-notice-bar-warning{background-color:var(--cso-ui-notice-bar-warning-bg,#fff6eb);}
3
+ .ui-notice-bar-info{background-color:var(--cso-ui-notice-bar-info-bg,#f5f8ff);}
4
+ .ui-notice-bar-danger{background-color:var(--cso-ui-notice-bar-danger-bg,#fff5f5);}
5
+ .theme-dark .ui-notice-bar-warning{background-color:var(--cso-ui-notice-bar-warning-bg,#2a2015);}
6
+ .theme-dark .ui-notice-bar-info{background-color:var(--cso-ui-notice-bar-info-bg,#1c2133);}
7
+ .theme-dark .ui-notice-bar-danger{background-color:var(--cso-ui-notice-bar-danger-bg,#2b1c1d);}
8
+ .ui-notice-bar-prefix{margin-right:8px;display:flex;flex-shrink:0;}
9
+ .ui-notice-bar-suffix{margin-left:8px;display:flex;flex-shrink:0;}
10
+ .ui-notice-bar-suffix text{color:inherit;font-size:14px;line-height:20px;}
11
+ .ui-notice-bar-viewport{position:relative;flex:1;min-width:0;height:20px;overflow:hidden;}
12
+ .ui-notice-bar-content{width:100%;color:inherit;}
13
+ .ui-notice-bar-marquee{position:absolute;left:0;top:0;width:max-content;}
14
+ .ui-notice-bar-label{font-size:14px;line-height:20px;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
15
+ .ui-notice-bar-marquee .ui-notice-bar-label{width:max-content;overflow:visible;text-overflow:clip;}
16
+ .ui-notice-bar-viewport-wrap{height:auto;}
17
+ .ui-notice-bar-wrap .ui-notice-bar-label{white-space:normal;}
18
+ .ui-notice-bar-vertical{display:flex;flex-direction:column;}
19
+ .ui-notice-bar-vertical .ui-notice-bar-label{height:20px;flex-shrink:0;}
@@ -0,0 +1,14 @@
1
+ .ui-notify-anchor{position:fixed;left:0;right:0;}
2
+ .ui-notify-anchor-floating{left:12px;right:12px;}
3
+ .ui-notify-anchor-floating.ui-notify-anchor-top{margin-top:12px;}
4
+ .ui-notify-anchor-floating.ui-notify-anchor-bottom{margin-bottom:12px;}
5
+ .ui-notify{width:100%;color:var(--cso-ui-danger);background-color:var(--cso-ui-danger-soft,#fff5f5);}
6
+ .ui-notify-primary{color:var(--cso-ui-primary);background-color:var(--cso-ui-primary-soft,#f5f8ff);}
7
+ .ui-notify-success{color:var(--cso-ui-success);background-color:var(--cso-ui-success-soft,#f3fbf9);}
8
+ .ui-notify-warning{color:var(--cso-ui-warning);background-color:var(--cso-ui-warning-soft,#fff6eb);}
9
+ .ui-notify-floating{color:var(--cso-ui-text);background-color:var(--cso-ui-surface);border-radius:8px;box-shadow:0 12px 48px 16px rgba(39,43,59,.03),0 9px 28px 8px rgba(39,43,59,.05),0 5px 12px 4px rgba(39,43,59,.06);}
10
+ .ui-notify-body{width:100%;display:flex;flex-direction:row;align-items:center;padding:8px 12px;font-size:15px;line-height:22px;color:inherit;}
11
+ .ui-notify-prefix{margin-right:8px;flex-shrink:0;}
12
+ .ui-notify-content{flex:1;min-width:0;overflow:hidden;}
13
+ .ui-notify-message{width:100%;font-size:15px;line-height:22px;white-space:nowrap;color:inherit;}
14
+ .ui-notify-close{margin-left:8px;flex-shrink:0;}
@@ -0,0 +1,2 @@
1
+ .ui-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(0, 0, 0, .55); }
2
+ .ui-overlay-content { width: 100%; height: 100%; }
@@ -0,0 +1,12 @@
1
+ .ui-pagination { width: 100%; padding: 12px; background-color: var(--cso-ui-surface); }
2
+ .ui-pagination-content { display: flex; flex-direction: row; align-items: center; justify-content: space-between; }
3
+ .ui-pagination .ui-pagination-nav { min-width: 64px; }
4
+ .ui-pagination .ui-pagination-icon-nav { min-width: 32px; width: 32px; padding: 0; }
5
+ .ui-pagination-arrow { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
6
+ .ui-pagination-arrow view { width: 7px; height: 7px; border-left: 1.5px solid var(--cso-ui-text); border-bottom: 1.5px solid var(--cso-ui-text); transform: rotate(45deg); }
7
+ .ui-pagination-arrow-right view { border-color: var(--cso-ui-primary); transform: rotate(225deg); }
8
+ .ui-pagination-size { flex: 1; display: flex; flex-direction: row; align-items: center; justify-content: center; }
9
+ .ui-pagination-size text { font-size: 18px; line-height: 26px; color: var(--cso-ui-text); }
10
+ .ui-pagination-size .ui-pagination-current { color: var(--cso-ui-primary); }
11
+ .ui-pagination-separator { margin: 0 4px; }
12
+ .ui-pagination-message { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--cso-ui-text-muted); text-align: center; }
@@ -0,0 +1,6 @@
1
+ export declare function paginationState(value: number, total?: number, totalPage?: number, pageSize?: number): {
2
+ page: number;
3
+ pages: number;
4
+ pageSize: number;
5
+ total: number | undefined;
6
+ };
@@ -0,0 +1,7 @@
1
+ export function paginationState(value, total, totalPage, pageSize = 10) {
2
+ const size = Number.isFinite(pageSize) && pageSize > 0 ? Math.max(1, Math.floor(pageSize)) : 10;
3
+ const count = total !== undefined ? Number.isFinite(total) ? Math.max(0, Math.floor(total)) : 0 : undefined;
4
+ const pages = count !== undefined ? Math.max(1, Math.ceil(count / size)) : Number.isFinite(totalPage) ? Math.max(1, Math.floor(totalPage)) : 1;
5
+ const page = Number.isFinite(value) ? Math.min(pages, Math.max(1, Math.floor(value))) : 1;
6
+ return { page, pages, pageSize: size, total: count };
7
+ }
@@ -0,0 +1,14 @@
1
+ .ui-password-input{position:relative;margin:0 16px;}
2
+ .ui-password-input-security{display:flex;flex-direction:row;width:100%;height:50px;}
3
+ /* Cells have a 50px content height; borders extend outside that height. */
4
+ .ui-password-input-item{position:relative;display:flex;flex:1;min-width:0;box-sizing:content-box;align-items:center;justify-content:center;height:100%;background-color:var(--cso-ui-surface);}
5
+ .ui-password-input-bordered{border:1px solid var(--cso-ui-line);border-right-width:0;}
6
+ .ui-password-input-bordered.ui-password-input-last{border-right-width:1px;border-top-right-radius:6px;border-bottom-right-radius:6px;}
7
+ .ui-password-input-bordered.ui-password-input-first{border-top-left-radius:6px;border-bottom-left-radius:6px;}
8
+ .ui-password-input-value{font-size:20px;line-height:28px;color:var(--cso-ui-text);}
9
+ .ui-password-input-dot{width:10px;height:10px;border-radius:9999px;background-color:var(--cso-ui-text);}
10
+ .ui-password-input-cursor{width:1px;height:40%;background-color:var(--cso-ui-text);animation:ui-password-cursor 1s ease infinite;}
11
+ @keyframes ui-password-cursor{0%,100%{opacity:0;}50%{opacity:1;}}
12
+ .ui-password-input-info{margin-top:16px;font-size:14px;line-height:20px;text-align:center;color:var(--cso-ui-text-auxiliary,var(--cso-ui-text-muted));}
13
+ .ui-password-input-error{color:var(--cso-ui-danger);}
14
+ .ui-password-input-disabled .ui-password-input-security{opacity:.4;}
@@ -0,0 +1,6 @@
1
+ export declare function passwordLength(length: number): number;
2
+ /** Numeric strings use px; convert rpx to viewport units for native/H5 parity. */
3
+ export declare function passwordGutter(gutter: number | string): {
4
+ value: string;
5
+ spaced: boolean;
6
+ };
@@ -0,0 +1,11 @@
1
+ export function passwordLength(length) {
2
+ return Number.isFinite(length) ? Math.max(0, Math.min(1000, Math.trunc(length))) : 6;
3
+ }
4
+ /** Numeric strings use px; convert rpx to viewport units for native/H5 parity. */
5
+ export function passwordGutter(gutter) {
6
+ const match = /^([+-]?(?:\d+\.?\d*|\.\d+))(px|rpx|rem|em|vw|vh|%)?$/.exec(String(gutter).trim());
7
+ const amount = match ? Number(match[1]) : 0;
8
+ if (!Number.isFinite(amount) || amount <= 0)
9
+ return { value: '0px', spaced: false };
10
+ return { value: match[2] === 'rpx' ? `${amount / 7.5}vw` : `${amount}${match[2] ?? 'px'}`, spaced: true };
11
+ }
@@ -0,0 +1,42 @@
1
+ .ui-picker-toolbar{height:44px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;}
2
+ .ui-picker-cancel,.ui-picker-confirm{padding:0 15px;font-size:16px;line-height:22px;color:var(--cso-ui-text-muted);}
3
+ .ui-picker-confirm text{font-size:16px;line-height:22px;color:var(--cso-ui-primary);}
4
+ .ui-picker-title{flex:1;min-width:0;display:flex;justify-content:center;align-items:center;}
5
+ .ui-picker-title text{font-size:18px;line-height:26px;font-weight:600;color:var(--cso-ui-text);}
6
+ .ui-picker-view{position:relative;width:100%;padding:0 12px;background-color:var(--cso-ui-surface);overflow:hidden;}
7
+ .ui-picker-columns{height:100%;display:flex;flex-direction:row;}
8
+ .ui-picker-column{flex:1;min-width:0;height:100%;}
9
+ .ui-picker-option{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:0 8px;}
10
+ .ui-picker-option text{font-size:16px;line-height:24px;color:var(--cso-ui-text);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;}
11
+ .ui-picker-option-selected text{color:var(--cso-ui-text);font-weight:600;}
12
+ .ui-picker-option-disabled text{color:var(--cso-ui-disabled-text,#c9cbd4);}
13
+ .ui-picker-indicator{position:absolute;left:12px;right:12px;border-radius:4px;background-color:var(--cso-ui-canvas);pointer-events:none;}
14
+ .ui-picker-fade{position:absolute;left:0;right:0;height:35%;pointer-events:none;}
15
+ .ui-picker-fade-top{top:0;background:var(--cso-ui-picker-fade-top,linear-gradient(0deg,rgba(255,255,255,.2),rgba(255,255,255,.85)));}
16
+ .ui-picker-fade-bottom{bottom:0;background:var(--cso-ui-picker-fade-bottom,linear-gradient(180deg,rgba(255,255,255,.2),rgba(255,255,255,.85)));}
17
+
18
+
19
+ .ui-picker-loading{position:absolute;top:44px;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:center;background-color:var(--cso-ui-surface);opacity:.8;}
20
+ .ui-picker-empty{text-align:center;font-size:14px;line-height:24px;padding:24px;color:var(--cso-ui-text-muted);}
21
+ .ui-select-picker-scroll{height:375px;padding:0 10px;}
22
+ .ui-select-picker-option{padding:16px 0;}
23
+ .ui-select-picker-footer{position:relative;padding:8px 12px;}
24
+
25
+ .ui-picker-view-loading{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:center;background-color:var(--cso-ui-surface);opacity:.8;}
26
+
27
+ .ui-popup.ui-picker{border-radius:8px 8px 0 0;}
28
+
29
+ .ui-select-picker-header .ui-action-sheet-title{font-size:18px;line-height:26px;font-weight:600;}
30
+ .ui-select-picker-content{position:relative;}
31
+ .ui-select-picker-loading{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:center;}
32
+ .ui-select-picker-is-loading .ui-choice-group{opacity:.4;}
33
+ .ui-select-picker-footer-line{position:absolute;left:0;right:0;top:0;height:1px;background-color:var(--cso-ui-line);}
34
+ .ui-select-picker-choice-label{overflow:hidden;flex-wrap:nowrap;}
35
+ .ui-select-picker-choice-label text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
36
+ .ui-select-picker-label{font-size:14px;line-height:20px;color:var(--cso-ui-text);}
37
+ .ui-select-picker-choice-label .ui-select-picker-text-active{color:var(--cso-ui-primary);}
38
+
39
+ .ui-select-picker-close-light{display:var(--cso-ui-light-display,flex);}
40
+ .ui-select-picker-close-dark{display:var(--cso-ui-dark-display,none);}
41
+
42
+ .ui-datetime-picker-view .ui-picker-option text{font-family:"San Francisco",Roboto,Arial,"PingFang SC","Microsoft YaHei",sans-serif;}
@@ -0,0 +1,32 @@
1
+ export type PickerValue = string | number;
2
+ export type PickerOption = {
3
+ value: PickerValue;
4
+ label: string;
5
+ disabled?: boolean;
6
+ children?: readonly PickerOption[];
7
+ };
8
+ export type PickerColumnItem = PickerValue | PickerOption | Readonly<Record<string, unknown>>;
9
+ export type PickerColumns = readonly PickerColumnItem[] | readonly (readonly PickerColumnItem[])[];
10
+ export type PickerFieldNames = {
11
+ valueKey?: string;
12
+ labelKey?: string;
13
+ childrenKey?: string;
14
+ };
15
+ export type PickerChange = {
16
+ value: PickerValue[];
17
+ selectedItems: PickerOption[];
18
+ selectedValues: PickerValue[];
19
+ selectedOptions: PickerOption[];
20
+ selectedLabels: string[];
21
+ selectedIndexes: number[];
22
+ columnIndex: number;
23
+ };
24
+ export declare function normalizePickerColumns(columns: PickerColumns, fields?: PickerFieldNames): readonly (readonly PickerOption[])[];
25
+ export declare function nearestPickerIndex(items: readonly PickerOption[], position: number): number;
26
+ export declare function pickerColumns(columns: PickerColumns, value: readonly PickerValue[], cascade?: boolean, fields?: PickerFieldNames): readonly (readonly PickerOption[])[];
27
+ export declare function resolvePickerColumns(normalized: readonly (readonly PickerOption[])[], value: readonly PickerValue[], cascade: boolean): readonly (readonly PickerOption[])[];
28
+ export declare function pickerSelection(props: PickerFieldNames & {
29
+ columns: PickerColumns;
30
+ value?: readonly PickerValue[];
31
+ cascade?: boolean;
32
+ }, columnIndex?: number): PickerChange;
@@ -0,0 +1,49 @@
1
+ export function normalizePickerColumns(columns, fields = {}) {
2
+ const { valueKey = 'value', labelKey = 'label', childrenKey = 'children' } = fields;
3
+ const normalize = (items) => items.flatMap(item => {
4
+ if (typeof item === 'string' || typeof item === 'number')
5
+ return [{ value: item, label: String(item) }];
6
+ const record = item, value = record[valueKey];
7
+ if (typeof value !== 'string' && typeof value !== 'number')
8
+ return [];
9
+ return [{ ...record, value, label: String(record[labelKey] ?? value), disabled: !!record.disabled, children: Array.isArray(record[childrenKey]) ? normalize(record[childrenKey]) : undefined }];
10
+ });
11
+ return Array.isArray(columns[0]) ? columns.map(normalize) : [normalize(columns)];
12
+ }
13
+ export function nearestPickerIndex(items, position) {
14
+ if (!items.length)
15
+ return -1;
16
+ const target = Math.max(0, Math.min(items.length - 1, Math.round(position)));
17
+ for (let distance = 0; distance < items.length; distance++) {
18
+ if (items[target + distance] && !items[target + distance].disabled)
19
+ return target + distance;
20
+ if (items[target - distance] && !items[target - distance].disabled)
21
+ return target - distance;
22
+ }
23
+ return -1;
24
+ }
25
+ export function pickerColumns(columns, value, cascade = false, fields = {}) {
26
+ return resolvePickerColumns(normalizePickerColumns(columns, fields), value, cascade);
27
+ }
28
+ export function resolvePickerColumns(normalized, value, cascade) {
29
+ if (!cascade)
30
+ return normalized;
31
+ const result = [];
32
+ let items = normalized[0] ?? [];
33
+ while (items.length) {
34
+ const index = items.findIndex(item => item.value === value[result.length] && !item.disabled);
35
+ result.push(items);
36
+ items = items[index < 0 ? nearestPickerIndex(items, 0) : index]?.children ?? [];
37
+ }
38
+ return result;
39
+ }
40
+ export function pickerSelection(props, columnIndex = -1) {
41
+ const columns = pickerColumns(props.columns, props.value ?? [], props.cascade, props);
42
+ const selectedIndexes = columns.map((items, index) => {
43
+ const found = items.findIndex(item => item.value === props.value?.[index] && !item.disabled);
44
+ return found < 0 ? nearestPickerIndex(items, 0) : found;
45
+ });
46
+ const selectedOptions = columns.flatMap((items, index) => items[selectedIndexes[index]] ? [items[selectedIndexes[index]]] : []);
47
+ const value = selectedOptions.map(item => item.value);
48
+ return { value, selectedItems: selectedOptions, selectedValues: value, selectedOptions, selectedLabels: selectedOptions.map(item => item.label), selectedIndexes, columnIndex };
49
+ }
@@ -0,0 +1,5 @@
1
+ .ui-popover-menu { padding: 0 12px; border-radius: 4px; background-color: var(--cso-ui-surface); display: flex; flex-direction: column; }
2
+ .ui-popover-menu-item { position: relative; padding: 12px 0; display: flex; flex-direction: row; align-items: center; }
3
+ .ui-popover-menu-line { position: absolute; top: 0; left: 0; right: 0; height: .5px; background-color: var(--cso-ui-line); }
4
+ .ui-popover-menu-text { font-size: 14px; line-height: 22px; color: var(--cso-ui-text); white-space: nowrap; }
5
+ .ui-popover-menu-icon { width: 14px; height: 14px; margin-right: 12px; flex-shrink: 0; }
package/dist/popup.css ADDED
@@ -0,0 +1,17 @@
1
+ .ui-popup-anchor { position: fixed; }
2
+ .ui-popup-anchor-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
3
+ .ui-popup-anchor-top { top: 0; left: 0; right: 0; }
4
+ .ui-popup-anchor-bottom { bottom: 0; left: 0; right: 0; }
5
+ .ui-popup-anchor-left { top: 0; bottom: 0; left: 0; }
6
+ .ui-popup-anchor-right { top: 0; bottom: 0; right: 0; }
7
+ .ui-popup { background-color: var(--cso-ui-surface); color: var(--cso-ui-text); }
8
+ .ui-popup-left, .ui-popup-right { height: 100%; }
9
+ .ui-popup-body { position: relative; width: 100%; flex: 1; }
10
+ .ui-popup-safe-area { width: 100%; flex-shrink: 0; }
11
+ .ui-popup-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--cso-ui-text-muted); }
12
+ .ui-popup-round { overflow: hidden; }
13
+ .ui-popup-center.ui-popup-round { border-radius: 16px; }
14
+ .ui-popup-bottom.ui-popup-round { border-radius: 16px 16px 0 0; }
15
+ .ui-popup-top.ui-popup-round { border-radius: 0 0 16px 16px; }
16
+ .ui-popup-left.ui-popup-round { border-radius: 0 16px 16px 0; }
17
+ .ui-popup-right.ui-popup-round { border-radius: 16px 0 0 16px; }
@@ -0,0 +1,16 @@
1
+ .ui-progress{width:100%;height:18px;display:flex;flex-direction:row;align-items:center;}
2
+ .ui-progress-track{position:relative;flex:1;min-width:0;height:8px;background-color:var(--cso-ui-surface-muted);overflow:hidden;border-radius:9999px;}
3
+ .ui-progress-fill{position:absolute;top:0;left:0;height:100%;border-radius:9999px;background-color:var(--cso-ui-primary);transition-property:width;transition-timing-function:linear;display:flex;flex-direction:row;align-items:center;}
4
+ .ui-progress-label{width:34px;margin-left:8px;font-size:14px;line-height:18px;color:var(--cso-ui-text);flex-shrink:0;white-space:nowrap;}
5
+ .ui-progress-icon{margin-left:8px;width:18px;height:18px;flex-shrink:0;}
6
+ .ui-progress-dark-icon{display:none;}
7
+ .theme-dark .ui-progress-light-icon{display:none;}
8
+ .theme-dark .ui-progress-dark-icon{display:flex;}
9
+ .ui-progress-inner .ui-progress-track{height:100%;}
10
+ .ui-progress-inner .ui-progress-label{width:auto;margin-left:0;padding:0 8px;color:#fff;}
11
+ .ui-progress-inner .ui-progress-icon{margin:0;padding:0 8px;width:34px;}
12
+ .ui-progress-align-left{justify-content:flex-start;}
13
+ .ui-progress-align-center{justify-content:center;}
14
+ .ui-progress-align-right{justify-content:flex-end;}
15
+ .ui-progress-zero.ui-progress-inner .ui-progress-fill{background-color:var(--cso-ui-primary-soft-pressed,#e5edff);}
16
+ .ui-progress-zero.ui-progress-inner .ui-progress-label{color:var(--cso-ui-text-muted);}
@@ -0,0 +1,12 @@
1
+ export type ProgressColorStop = {
2
+ color: string;
3
+ percentage: number;
4
+ };
5
+ export type ProgressColor = string | readonly string[] | readonly ProgressColorStop[];
6
+ export declare function progressPercentage(value: number): number;
7
+ export declare function progressStops(color?: ProgressColor): ProgressColorStop[];
8
+ /** Increasing values animate through crossed thresholds, then use the last color. */
9
+ export declare function progressSegments(from: number, to: number, stops: readonly ProgressColorStop[]): {
10
+ value: number;
11
+ color?: string;
12
+ }[];
@@ -0,0 +1,19 @@
1
+ export function progressPercentage(value) { return Number.isFinite(value) ? Math.max(0, Math.min(100, value)) : 0; }
2
+ export function progressStops(color) {
3
+ if (typeof color === 'string')
4
+ return color ? [{ color, percentage: 100 }] : [];
5
+ if (!color?.length)
6
+ return [];
7
+ return color.flatMap((item, index) => typeof item === 'string' ? [{ color: item, percentage: (index + 1) * 100 / color.length }] : Number.isFinite(item.percentage) ? [{ color: item.color, percentage: progressPercentage(item.percentage) }] : []).sort((a, b) => a.percentage - b.percentage);
8
+ }
9
+ /** Increasing values animate through crossed thresholds, then use the last color. */
10
+ export function progressSegments(from, to, stops) {
11
+ if (!stops.length)
12
+ return [{ value: to }];
13
+ if (to <= from)
14
+ return [{ value: to, color: (stops.find(stop => to <= stop.percentage) ?? stops[stops.length - 1])?.color }];
15
+ const crossed = stops.filter(stop => from < stop.percentage && stop.percentage <= to).map(stop => ({ value: stop.percentage, color: stop.color }));
16
+ if (crossed[crossed.length - 1]?.value !== to)
17
+ crossed.push({ value: to, color: stops[stops.length - 1].color });
18
+ return crossed;
19
+ }
@@ -0,0 +1,4 @@
1
+ .ui-qr-code { position: relative; flex-shrink: 0; }
2
+ .ui-qr-code-surface { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
3
+ .ui-qr-code-logo { position: absolute; border-style: solid; }
4
+ .ui-qr-code-export { position: absolute; width: 0; height: 0; overflow: hidden; }