@ticatec/uniface-element 5.0.5 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/README.md +4 -3
  2. package/README_CN.md +4 -3
  3. package/dist/app_layout/ColumnsLayout.svelte +14 -10
  4. package/dist/app_layout/ColumnsLayout.svelte.d.ts +8 -4
  5. package/dist/app_layout/README.md +14 -12
  6. package/dist/app_layout/README_CN.md +14 -12
  7. package/dist/app_layout/RowsLayout.svelte +14 -10
  8. package/dist/app_layout/RowsLayout.svelte.d.ts +8 -4
  9. package/dist/base-calendar/CalendarBase.svelte +4 -10
  10. package/dist/base-calendar/CalendarBase.svelte.d.ts +0 -4
  11. package/dist/base-calendar/MonthlyCalendar.svelte +11 -3
  12. package/dist/base-calendar/MonthlyCalendar.svelte.d.ts +1 -2
  13. package/dist/base-calendar/YearPickupPanel.svelte +5 -5
  14. package/dist/base-calendar/YearPickupPanel.svelte.d.ts +2 -2
  15. package/dist/base-calendar/dateUtils.js +9 -5
  16. package/dist/composite/pagination_panel/PaginationPanel.svelte +15 -12
  17. package/dist/composite/pagination_panel/PaginationPanel.svelte.d.ts +8 -5
  18. package/dist/composite/pagination_panel/README.md +3 -1
  19. package/dist/composite/pagination_panel/README_CN.md +3 -1
  20. package/dist/composite/transfer/Transfer.svelte +30 -15
  21. package/dist/composite/transfer/Transfer.svelte.d.ts +11 -4
  22. package/dist/composite/transfer/index.d.ts +2 -2
  23. package/dist/data_display/accordion/Accordion.svelte +10 -9
  24. package/dist/data_display/accordion/Accordion.svelte.d.ts +2 -1
  25. package/dist/data_display/accordion/AccordionItemView.svelte +6 -6
  26. package/dist/data_display/accordion/AccordionItemView.svelte.d.ts +1 -1
  27. package/dist/data_display/accordion/README.md +6 -4
  28. package/dist/data_display/accordion/README_CN.md +6 -4
  29. package/dist/data_display/card/Card.svelte +13 -11
  30. package/dist/data_display/card/Card.svelte.d.ts +5 -3
  31. package/dist/data_display/card/CardAction.d.ts +7 -2
  32. package/dist/data_display/card/CommonCardActionBar.svelte +2 -2
  33. package/dist/data_display/card/README.md +11 -9
  34. package/dist/data_display/card/README_CN.md +11 -9
  35. package/dist/data_display/card/index.d.ts +2 -1
  36. package/dist/data_display/concise_data_table/Column.d.ts +0 -6
  37. package/dist/data_display/concise_data_table/ConciseListTable.svelte +6 -5
  38. package/dist/data_display/concise_data_table/ConciseListTable.svelte.d.ts +4 -3
  39. package/dist/data_display/concise_data_table/DataCell.svelte +1 -1
  40. package/dist/data_display/concise_data_table/README.md +7 -5
  41. package/dist/data_display/concise_data_table/README_CN.md +7 -5
  42. package/dist/data_display/concise_data_table/TableOptions.d.ts +1 -1
  43. package/dist/data_display/list_box/ListBox.svelte +11 -15
  44. package/dist/data_display/list_box/ListBox.svelte.d.ts +6 -9
  45. package/dist/data_display/list_box/README.md +10 -8
  46. package/dist/data_display/list_box/README_CN.md +10 -8
  47. package/dist/data_display/list_box/index.d.ts +2 -3
  48. package/dist/data_display/tree_view/README.md +4 -2
  49. package/dist/data_display/tree_view/README_CN.md +4 -2
  50. package/dist/data_display/tree_view/TreeNodeView.svelte +15 -16
  51. package/dist/data_display/tree_view/TreeNodeView.svelte.d.ts +4 -5
  52. package/dist/data_display/tree_view/TreeView.svelte +27 -19
  53. package/dist/data_display/tree_view/TreeView.svelte.d.ts +12 -4
  54. package/dist/data_display/tree_view/index.d.ts +2 -3
  55. package/dist/data_table/DataTable.svelte +15 -14
  56. package/dist/data_table/DataTable.svelte.d.ts +2 -1
  57. package/dist/data_table/README.md +10 -8
  58. package/dist/data_table/README_CN.md +10 -8
  59. package/dist/data_table/UniDataTable.d.ts +4 -4
  60. package/dist/data_table/UniDataTable.js +2 -2
  61. package/dist/data_table/index.d.ts +5 -5
  62. package/dist/data_table/lib/CellAction.d.ts +9 -0
  63. package/dist/data_table/lib/CommonHeaderCell.d.ts +2 -2
  64. package/dist/data_table/lib/CompareFn.d.ts +3 -0
  65. package/dist/data_table/lib/DataColumn.d.ts +7 -12
  66. package/dist/data_table/lib/FormatCellFn.d.ts +2 -0
  67. package/dist/data_table/lib/HrefLink.d.ts +3 -3
  68. package/dist/data_table/lib/IndicatorColumn.d.ts +2 -1
  69. package/dist/data_table/lib/RowAction.d.ts +14 -20
  70. package/dist/data_table/parts/ActionCell.svelte +3 -3
  71. package/dist/data_table/parts/ActionCell.svelte.d.ts +1 -1
  72. package/dist/data_table/parts/ActionsRow.svelte +7 -5
  73. package/dist/data_table/parts/ContentPanel.svelte +14 -14
  74. package/dist/data_table/parts/ContentPanel.svelte.d.ts +5 -5
  75. package/dist/data_table/parts/FixedColumnsPanel.svelte +15 -15
  76. package/dist/data_table/parts/FixedColumnsPanel.svelte.d.ts +4 -4
  77. package/dist/data_table/parts/FixedHeaderPanel.svelte +13 -13
  78. package/dist/data_table/parts/FixedHeaderPanel.svelte.d.ts +4 -4
  79. package/dist/data_table/parts/FixedRow.svelte +9 -9
  80. package/dist/data_table/parts/FixedRow.svelte.d.ts +3 -3
  81. package/dist/data_table/parts/HrefCell.svelte +1 -1
  82. package/dist/data_table/parts/PopupMenu.svelte +3 -3
  83. package/dist/data_table/parts/PopupMenu.svelte.d.ts +1 -1
  84. package/dist/data_table/parts/TableHeaderPanel.svelte +14 -14
  85. package/dist/data_table/parts/TableHeaderPanel.svelte.d.ts +4 -4
  86. package/dist/data_table/parts/TextCell.svelte +1 -1
  87. package/dist/feedback/progress-bar/ProgressBar.svelte +13 -10
  88. package/dist/feedback/progress-bar/ProgressBar.svelte.d.ts +6 -3
  89. package/dist/form/FormEditor.svelte +2 -2
  90. package/dist/form/FormEditor.svelte.d.ts +1 -1
  91. package/dist/form/attachment_files/AttachmentEditor.svelte +407 -92
  92. package/dist/form/attachment_files/AttachmentEditor.svelte.d.ts +71 -15
  93. package/dist/form/attachment_files/AttachmentFile.d.ts +35 -8
  94. package/dist/form/attachment_files/AttachmentFile.js +54 -29
  95. package/dist/form/attachment_files/AttachmentListItem.svelte +208 -0
  96. package/dist/form/attachment_files/AttachmentListItem.svelte.d.ts +25 -0
  97. package/dist/form/attachment_files/AttachmentTile.svelte +296 -0
  98. package/dist/form/attachment_files/AttachmentTile.svelte.d.ts +25 -0
  99. package/dist/form/attachment_files/FileUpload.d.ts +2 -2
  100. package/dist/form/attachment_files/README.md +71 -452
  101. package/dist/form/attachment_files/README_CN.md +68 -449
  102. package/dist/form/attachment_files/UploadTask.d.ts +27 -0
  103. package/dist/form/attachment_files/index.d.ts +8 -5
  104. package/dist/form/attachment_files/index.js +4 -2
  105. package/dist/form/cascade_options_select/CascadeOptionSelect.svelte +16 -15
  106. package/dist/form/cascade_options_select/CascadeOptionSelect.svelte.d.ts +6 -5
  107. package/dist/form/cascade_options_select/IsLeaf.d.ts +4 -0
  108. package/dist/form/cascade_options_select/IsLeaf.js +1 -0
  109. package/dist/form/cascade_options_select/OptionsBox.svelte +4 -4
  110. package/dist/form/cascade_options_select/OptionsBox.svelte.d.ts +2 -2
  111. package/dist/form/color_picker/ColorPicker.svelte +3 -3
  112. package/dist/form/common_editor/BasePicker.svelte +7 -7
  113. package/dist/form/common_editor/BasePicker.svelte.d.ts +3 -3
  114. package/dist/form/common_editor/CommonEditor.svelte +8 -8
  115. package/dist/form/common_editor/CommonEditor.svelte.d.ts +2 -2
  116. package/dist/form/common_editor/CommonPicker.svelte +43 -31
  117. package/dist/form/common_editor/CommonPicker.svelte.d.ts +6 -6
  118. package/dist/form/common_editor/CommonPickerProps.d.ts +2 -2
  119. package/dist/form/common_editor/CommonPopupEditor.svelte +13 -13
  120. package/dist/form/common_editor/CommonPopupEditor.svelte.d.ts +3 -4
  121. package/dist/form/common_editor/NumberInput.svelte +10 -2
  122. package/dist/form/common_editor/NumberInput.svelte.d.ts +1 -1
  123. package/dist/form/common_range_editor/CommonRangeEditor.svelte +17 -17
  124. package/dist/form/common_range_editor/CommonRangeEditor.svelte.d.ts +5 -5
  125. package/dist/form/date_picker/DatePicker.svelte +5 -5
  126. package/dist/form/date_picker/DatePicker.svelte.d.ts +1 -1
  127. package/dist/form/date_picker/DateTimePicker.svelte +15 -5
  128. package/dist/form/date_picker/README.md +7 -5
  129. package/dist/form/date_picker/README_CN.md +7 -5
  130. package/dist/form/date_picker/ScrollBar.svelte +21 -20
  131. package/dist/form/date_picker/ScrollBar.svelte.d.ts +3 -3
  132. package/dist/form/date_range/DateRangeEditor.svelte +6 -6
  133. package/dist/form/events.d.ts +70 -0
  134. package/dist/form/events.js +6 -0
  135. package/dist/form/group_box/group-check-box/GroupCheckBox.svelte +9 -7
  136. package/dist/form/group_box/group-check-box/GroupCheckBox.svelte.d.ts +4 -3
  137. package/dist/form/group_box/group-check-box/README.md +5 -3
  138. package/dist/form/group_box/group-check-box/README_CN.md +5 -3
  139. package/dist/form/group_box/group-radio-box/GroupRadioBox.svelte +9 -7
  140. package/dist/form/group_box/group-radio-box/GroupRadioBox.svelte.d.ts +4 -3
  141. package/dist/form/group_box/group-radio-box/README.md +3 -1
  142. package/dist/form/group_box/group-radio-box/README_CN.md +3 -1
  143. package/dist/form/image_editor/ImageEditor.svelte +118 -0
  144. package/dist/form/image_editor/ImageEditor.svelte.d.ts +52 -0
  145. package/dist/form/image_editor/ImageFile.d.ts +11 -0
  146. package/dist/form/image_editor/ImageFile.js +1 -0
  147. package/dist/form/{image-files → image_editor}/ImagePreview.svelte +10 -2
  148. package/dist/form/image_editor/README.md +89 -0
  149. package/dist/form/image_editor/README_CN.md +89 -0
  150. package/dist/form/image_editor/index.d.ts +11 -0
  151. package/dist/form/image_editor/index.js +4 -0
  152. package/dist/form/input_options_select/InputOptionsSelect.svelte +11 -8
  153. package/dist/form/input_options_select/InputOptionsSelect.svelte.d.ts +2 -1
  154. package/dist/form/input_options_select/README.md +44 -218
  155. package/dist/form/input_options_select/README_CN.md +38 -211
  156. package/dist/form/lookup_editor/LookupEditor.svelte +7 -10
  157. package/dist/form/lookup_editor/LookupEditor.svelte.d.ts +2 -1
  158. package/dist/form/memo_editor/MemoEditor.svelte +2 -2
  159. package/dist/form/memo_editor/MemoEditor.svelte.d.ts +1 -1
  160. package/dist/form/number_editor/NumberEditor.svelte +13 -1
  161. package/dist/form/number_editor/NumberEditor.svelte.d.ts +1 -1
  162. package/dist/form/number_range/NumberRange.svelte +5 -5
  163. package/dist/form/options_multi_select/OptionsMultiSelect.svelte +13 -13
  164. package/dist/form/options_multi_select/OptionsMultiSelect.svelte.d.ts +3 -2
  165. package/dist/form/options_multi_select/README.md +5 -3
  166. package/dist/form/options_multi_select/README_CN.md +5 -3
  167. package/dist/form/options_select/OptionsSelect.svelte +17 -13
  168. package/dist/form/options_select/OptionsSelect.svelte.d.ts +2 -1
  169. package/dist/form/options_select/README.md +9 -7
  170. package/dist/form/options_select/README_CN.md +8 -6
  171. package/dist/form/prompts_text_editor/PromptsTextEditor.svelte +6 -5
  172. package/dist/form/prompts_text_editor/PromptsTextEditor.svelte.d.ts +2 -1
  173. package/dist/form/prompts_text_editor/README.md +16 -14
  174. package/dist/form/prompts_text_editor/README_CN.md +16 -14
  175. package/dist/form/search_box/SearchBox.svelte +3 -2
  176. package/dist/form/search_box/SearchBox.svelte.d.ts +1 -1
  177. package/dist/form/switch/README.md +7 -5
  178. package/dist/form/switch/README_CN.md +7 -5
  179. package/dist/form/switch/Switch.svelte +7 -5
  180. package/dist/form/switch/Switch.svelte.d.ts +4 -2
  181. package/dist/form/text_editor/PasswordEditor.svelte +2 -2
  182. package/dist/form/text_editor/PasswordEditor.svelte.d.ts +1 -1
  183. package/dist/form/text_editor/TextEditor.svelte +6 -4
  184. package/dist/form/text_editor/TextEditor.svelte.d.ts +1 -1
  185. package/dist/form/time_editor/README.md +4 -2
  186. package/dist/form/time_editor/README_CN.md +4 -2
  187. package/dist/form/time_editor/TimeEditor.svelte +10 -7
  188. package/dist/form/time_editor/TimeEditor.svelte.d.ts +2 -1
  189. package/dist/form/types.d.ts +5 -42
  190. package/dist/form/unit-number-editor/README.md +21 -19
  191. package/dist/form/unit-number-editor/README_CN.md +21 -19
  192. package/dist/form/unit-number-editor/UnitNumberEditor.svelte +12 -11
  193. package/dist/form/unit-number-editor/UnitNumberEditor.svelte.d.ts +4 -3
  194. package/dist/general/button/Button.svelte +4 -1
  195. package/dist/general/button/Button.svelte.d.ts +3 -1
  196. package/dist/general/button/IconButton.svelte +11 -5
  197. package/dist/general/button/IconButton.svelte.d.ts +5 -2
  198. package/dist/general/button/IconButton_README.md +9 -6
  199. package/dist/general/button/IconButton_README_CN.md +9 -6
  200. package/dist/general/button/TextButton.svelte +15 -5
  201. package/dist/general/button/TextButton.svelte.d.ts +6 -2
  202. package/dist/general/button/TextButton_README.md +10 -6
  203. package/dist/general/button/TextButton_README_CN.md +10 -6
  204. package/dist/general/icon/Icon.svelte +6 -4
  205. package/dist/general/icon/Icon.svelte.d.ts +3 -2
  206. package/dist/general/tag/Tag.svelte +8 -4
  207. package/dist/general/tag/Tag.svelte.d.ts +3 -1
  208. package/dist/i18nRes/i18nRes.d.ts +5 -1
  209. package/dist/i18nRes/i18nRes.js +5 -1
  210. package/dist/layouts/action_bar/ActionBar.svelte +5 -4
  211. package/dist/layouts/action_bar/ActionBar.svelte.d.ts +2 -1
  212. package/dist/layouts/action_bar/ButtonAction.d.ts +1 -23
  213. package/dist/layouts/action_bar/README.md +20 -18
  214. package/dist/layouts/action_bar/README_CN.md +19 -17
  215. package/dist/layouts/box/Box.svelte +4 -3
  216. package/dist/layouts/box/Box.svelte.d.ts +2 -1
  217. package/dist/layouts/box/README.md +13 -11
  218. package/dist/layouts/box/README_CN.md +13 -11
  219. package/dist/layouts/form_field/FormField.svelte +5 -4
  220. package/dist/layouts/form_field/FormField.svelte.d.ts +3 -2
  221. package/dist/layouts/form_field/README.md +11 -9
  222. package/dist/layouts/form_field/README_CN.md +9 -7
  223. package/dist/layouts/form_panel/flex_row_form/Cell.svelte +3 -1
  224. package/dist/layouts/form_panel/flex_row_form/Cell.svelte.d.ts +3 -1
  225. package/dist/layouts/form_panel/flex_row_form/Row.svelte +3 -1
  226. package/dist/layouts/form_panel/flex_row_form/Row.svelte.d.ts +3 -1
  227. package/dist/layouts/form_panel/grid_form/GridField.svelte +8 -4
  228. package/dist/layouts/form_panel/grid_form/GridField.svelte.d.ts +6 -2
  229. package/dist/layouts/form_panel/grid_form/GridForm.svelte +3 -1
  230. package/dist/layouts/form_panel/grid_form/GridForm.svelte.d.ts +3 -1
  231. package/dist/layouts/form_panel/grid_form/README.md +6 -4
  232. package/dist/layouts/form_panel/grid_form/README_CN.md +6 -4
  233. package/dist/layouts/page/Page.svelte +7 -7
  234. package/dist/layouts/page/Page.svelte.d.ts +2 -2
  235. package/dist/layouts/page/PageHeader.svelte +4 -4
  236. package/dist/layouts/page/PageHeader.svelte.d.ts +1 -1
  237. package/dist/layouts/page/README.md +18 -18
  238. package/dist/layouts/page/README_CN.md +18 -18
  239. package/dist/navigation/nav_menu/MenuItem.d.ts +1 -1
  240. package/dist/navigation/nav_menu/NavigatorMenu.svelte +16 -14
  241. package/dist/navigation/nav_menu/NavigatorMenu.svelte.d.ts +7 -5
  242. package/dist/navigation/nav_menu/NavigatorMenuItem.svelte +2 -2
  243. package/dist/navigation/nav_menu/NavigatorMenuItem.svelte.d.ts +2 -2
  244. package/dist/navigation/nav_menu/README.md +8 -6
  245. package/dist/navigation/nav_menu/README_CN.md +8 -6
  246. package/dist/navigation/nav_menu/index.d.ts +2 -2
  247. package/dist/navigation/navigator/Navigator.svelte +5 -4
  248. package/dist/navigation/navigator/Navigator.svelte.d.ts +3 -2
  249. package/dist/navigation/navigator/README.md +12 -10
  250. package/dist/navigation/navigator/README_CN.md +12 -10
  251. package/dist/navigation/pagination/Pagination.svelte +23 -15
  252. package/dist/navigation/pagination/Pagination.svelte.d.ts +6 -4
  253. package/dist/navigation/progress_step_bar/ProgressStep.d.ts +2 -1
  254. package/dist/navigation/progress_step_bar/ProgressStepBar.svelte +5 -4
  255. package/dist/navigation/progress_step_bar/ProgressStepBar.svelte.d.ts +2 -1
  256. package/dist/navigation/progress_step_bar/ProgressStepBlock.svelte +3 -3
  257. package/dist/navigation/progress_step_bar/ProgressStepBlock.svelte.d.ts +1 -1
  258. package/dist/navigation/progress_step_bar/README.md +37 -35
  259. package/dist/navigation/progress_step_bar/README_CN.md +36 -34
  260. package/dist/navigation/tabs/Tabs.svelte +14 -5
  261. package/dist/navigation/tabs/Tabs.svelte.d.ts +11 -4
  262. package/dist/navigation/tabs/index.d.ts +2 -2
  263. package/dist/overlay/common/ModalPopover.svelte +5 -4
  264. package/dist/overlay/common/ModalPopover.svelte.d.ts +2 -1
  265. package/dist/overlay/common/Popover.svelte +4 -3
  266. package/dist/overlay/common/Popover.svelte.d.ts +2 -1
  267. package/dist/overlay/context-menu/ContextMenuItem.d.ts +3 -3
  268. package/dist/overlay/context-menu/ContextMenuPanel.svelte +4 -4
  269. package/dist/overlay/context-menu/index.d.ts +2 -2
  270. package/dist/overlay/dialog/BeforeClose.d.ts +4 -0
  271. package/dist/overlay/dialog/BeforeClose.js +1 -0
  272. package/dist/overlay/dialog/CommonDialog.svelte +16 -12
  273. package/dist/overlay/dialog/CommonDialog.svelte.d.ts +9 -5
  274. package/dist/overlay/dialog/Dialog.svelte +25 -19
  275. package/dist/overlay/dialog/Dialog.svelte.d.ts +11 -5
  276. package/dist/overlay/dialog/DialogManager.svelte.js +2 -1
  277. package/dist/overlay/dialog/README.md +19 -17
  278. package/dist/overlay/dialog/README_CN.md +19 -17
  279. package/dist/overlay/dialog/index.d.ts +2 -2
  280. package/dist/overlay/message-box/IMessageBox.d.ts +4 -4
  281. package/dist/overlay/tooltip/README.md +16 -1
  282. package/dist/overlay/tooltip/README_CN.md +16 -1
  283. package/dist/overlay/tooltip/Tooltip.svelte +94 -19
  284. package/dist/ticatec-uniface-web.css +38 -12
  285. package/dist/types.d.ts +38 -46
  286. package/dist/unifaceContext.d.ts +2 -2
  287. package/dist/utils/prefixFilter.js +0 -1
  288. package/docs/NAMING.md +364 -0
  289. package/docs/NAMING_CN.md +364 -0
  290. package/docs/components/README.md +16 -14
  291. package/docs/components/accordion/README.md +13 -2
  292. package/docs/components/accordion/example.svelte +1 -0
  293. package/docs/components/action-bar/README.md +4 -4
  294. package/docs/components/attachment-editor/README.md +224 -0
  295. package/docs/components/attachment-editor/example.svelte +22 -0
  296. package/docs/components/box/README.md +1 -1
  297. package/docs/components/button/README.md +8 -1
  298. package/docs/components/button/example.svelte +1 -0
  299. package/docs/components/card/README.md +19 -5
  300. package/docs/components/cascade-options-select/README.md +11 -5
  301. package/docs/components/columns-layout/README.md +8 -4
  302. package/docs/components/columns-layout/example.svelte +4 -0
  303. package/docs/components/common-dialog/README.md +19 -10
  304. package/docs/components/common-dialog/example.svelte +2 -1
  305. package/docs/components/concise-data-table/README.md +18 -29
  306. package/docs/components/concise-data-table/example.svelte +1 -1
  307. package/docs/components/context-menu/README.md +5 -5
  308. package/docs/components/context-menu/example.svelte +1 -1
  309. package/docs/components/criteria-field/README.md +1 -0
  310. package/docs/components/criteria-field/example.svelte +1 -0
  311. package/docs/components/data-table/README.md +63 -40
  312. package/docs/components/data-table/example.svelte +2 -2
  313. package/docs/components/date-picker/README.md +1 -1
  314. package/docs/components/date-time-picker/README.md +1 -1
  315. package/docs/components/dialog/README.md +21 -14
  316. package/docs/components/dialog/example.svelte +1 -1
  317. package/docs/components/form-field/README.md +3 -3
  318. package/docs/components/grid-form/README.md +15 -5
  319. package/docs/components/grid-form/example.svelte +1 -1
  320. package/docs/components/group-check-box/README.md +3 -3
  321. package/docs/components/group-radio-box/README.md +3 -3
  322. package/docs/components/icon/README.md +6 -5
  323. package/docs/components/icon-button/README.md +10 -1
  324. package/docs/components/icon-button/example.svelte +1 -0
  325. package/docs/components/image-editor/README.md +262 -0
  326. package/docs/components/{image-files → image-editor}/example.svelte +5 -3
  327. package/docs/components/input-options-select/README.md +2 -2
  328. package/docs/components/list-box/README.md +12 -13
  329. package/docs/components/list-box/example.svelte +3 -3
  330. package/docs/components/lookup-editor/README.md +1 -1
  331. package/docs/components/navigator/README.md +2 -1
  332. package/docs/components/navigator/example.svelte +1 -0
  333. package/docs/components/navigator-menu/README.md +24 -21
  334. package/docs/components/navigator-menu/example.svelte +4 -2
  335. package/docs/components/options-multi-select/README.md +2 -2
  336. package/docs/components/options-select/README.md +4 -4
  337. package/docs/components/page/README.md +2 -2
  338. package/docs/components/page-stack/README.md +67 -0
  339. package/docs/components/page-stack/example.svelte +7 -0
  340. package/docs/components/pagination/README.md +24 -7
  341. package/docs/components/pagination/example.svelte +5 -2
  342. package/docs/components/pagination-panel/README.md +25 -10
  343. package/docs/components/pagination-panel/example.svelte +5 -4
  344. package/docs/components/password-editor/README.md +128 -0
  345. package/docs/components/{attachment-files → password-editor}/example.svelte +5 -5
  346. package/docs/components/progress-bar/README.md +14 -4
  347. package/docs/components/progress-bar/example.svelte +1 -1
  348. package/docs/components/progress-step-bar/README.md +16 -7
  349. package/docs/components/progress-step-bar/example.svelte +5 -1
  350. package/docs/components/prompts-text-editor/README.md +8 -6
  351. package/docs/components/prompts-text-editor/example.svelte +0 -1
  352. package/docs/components/rows-layout/README.md +8 -4
  353. package/docs/components/rows-layout/example.svelte +4 -0
  354. package/docs/components/switch/README.md +2 -2
  355. package/docs/components/tabs/README.md +24 -9
  356. package/docs/components/tag/README.md +13 -2
  357. package/docs/components/tag/example.svelte +1 -0
  358. package/docs/components/text-button/README.md +20 -1
  359. package/docs/components/text-button/example.svelte +2 -0
  360. package/docs/components/time-editor/README.md +1 -1
  361. package/docs/components/transfer/README.md +16 -9
  362. package/docs/components/tree-view/README.md +29 -13
  363. package/docs/components/tree-view/example.svelte +2 -1
  364. package/docs/components/unit-number-editor/README.md +11 -8
  365. package/docs/components/unit-number-editor/example.svelte +0 -1
  366. package/package.json +13 -7
  367. package/dist/data_table/lib/CompareFunction.d.ts +0 -3
  368. package/dist/data_table/lib/FormatCell.d.ts +0 -2
  369. package/dist/form/attachment_files/FileRender.svelte +0 -125
  370. package/dist/form/attachment_files/FileRender.svelte.d.ts +0 -9
  371. package/dist/form/attachment_files/FileUploadBar.svelte +0 -66
  372. package/dist/form/attachment_files/FileUploadBar.svelte.d.ts +0 -8
  373. package/dist/form/attachment_files/FileUploadPanel.svelte +0 -161
  374. package/dist/form/attachment_files/FileUploadPanel.svelte.d.ts +0 -14
  375. package/dist/form/attachment_files/UploadFile.d.ts +0 -43
  376. package/dist/form/attachment_files/UploadFile.js +0 -80
  377. package/dist/form/cascade_options_select/CascadePanel.svelte +0 -52
  378. package/dist/form/cascade_options_select/CascadePanel.svelte.d.ts +0 -26
  379. package/dist/form/cascade_options_select/isLeafDetermine.d.ts +0 -4
  380. package/dist/form/common_editor/EditorEvents.d.ts +0 -14
  381. package/dist/form/common_editor/EditorEvents.js +0 -2
  382. package/dist/form/image-files/ImageFile.d.ts +0 -12
  383. package/dist/form/image-files/ImageFilesField.svelte +0 -128
  384. package/dist/form/image-files/ImageFilesField.svelte.d.ts +0 -18
  385. package/dist/form/image-files/ImageRender.svelte +0 -95
  386. package/dist/form/image-files/ImageRender.svelte.d.ts +0 -10
  387. package/dist/form/image-files/README.md +0 -468
  388. package/dist/form/image-files/README_CN.md +0 -468
  389. package/dist/form/image-files/index.d.ts +0 -10
  390. package/dist/form/image-files/index.js +0 -2
  391. package/dist/overlay/dialog/DialogActions.d.ts +0 -16
  392. package/dist/overlay/dialog/DialogActions.js +0 -1
  393. package/dist/overlay/dialog/DialogCloseConfirm.d.ts +0 -1
  394. package/dist/overlay/dialog/DialogCloseConfirm.js +0 -1
  395. package/docs/components/attachment-files/README.md +0 -332
  396. package/docs/components/image-files/README.md +0 -174
  397. /package/dist/data_table/lib/{FormatCell.js → CellAction.js} +0 -0
  398. /package/dist/data_table/lib/{CompareFunction.js → CompareFn.js} +0 -0
  399. /package/dist/{form/cascade_options_select/isLeafDetermine.js → data_table/lib/FormatCellFn.js} +0 -0
  400. /package/dist/form/{image-files/ImageFile.js → attachment_files/UploadTask.js} +0 -0
  401. /package/dist/form/{image-files → image_editor}/ImagePreview.svelte.d.ts +0 -0
@@ -1,33 +1,35 @@
1
1
  <script lang="ts">
2
2
 
3
3
 
4
- import type {OnPageChange} from "../../types";
4
+ import type {OnPageChange, Size} from "../../types";
5
5
 
6
6
  interface Props {
7
7
  pageCount: number;
8
8
  pageNo?: number;
9
- type?: 'plain' | 'round' | 'circle';
9
+ /** 形状:plain / round / circle */
10
+ variant?: 'plain' | 'round' | 'circle';
10
11
  style?: string;
11
- big?: boolean;
12
+ /** 尺寸档位;'large' 对应旧的 big */
13
+ size?: Size;
12
14
  theme?: string;
13
15
  onchange?: OnPageChange;
14
16
  }
15
17
 
16
18
  let {
17
19
  pageCount = 0,
18
- pageNo = 1,
19
- type = "round",
20
+ pageNo = $bindable(1),
21
+ variant = "round",
20
22
  style = '',
21
- big = false,
23
+ size = 'medium',
22
24
  theme,
23
25
  onchange
24
26
  }: Props = $props();
25
27
 
26
28
  let pagination = $state<Array<number | null>>([]);
27
29
 
28
- // Derived rather than mutating the pageNo prop directly: pageNo isn't
29
- // $bindable, so writing to it only ever changed a local copy for one
30
- // render and never reached the parent.
30
+ // Clamp the (bindable) pageNo into range without writing it back: the parent
31
+ // owns the value; user navigation goes through changePage() which updates the
32
+ // binding and then notifies via onchange.
31
33
  let normalizedPageNo = $derived.by(() => {
32
34
  if (pageCount <= 0) return 0;
33
35
  if (pageNo < 1) return 1;
@@ -67,9 +69,15 @@
67
69
  pagination = arr;
68
70
  }
69
71
 
72
+ // Single exit point for user navigation: update the two-way binding first, then notify.
73
+ const changePage = (value: number) => {
74
+ pageNo = value;
75
+ onchange?.(value);
76
+ };
77
+
70
78
  const selectPage = (value: number) => () => {
71
79
  if (normalizedPageNo != value) {
72
- onchange?.(value);
80
+ changePage(value);
73
81
  }
74
82
  };
75
83
 
@@ -84,11 +92,11 @@
84
92
  let hasNext = $derived(pageCount > 0 && normalizedPageNo < pageCount);
85
93
 
86
94
  const goPrev = () => {
87
- if (hasPrev) onchange?.(normalizedPageNo - 1);
95
+ if (hasPrev) changePage(normalizedPageNo - 1);
88
96
  };
89
97
 
90
98
  const goNext = () => {
91
- if (hasNext) onchange?.(normalizedPageNo + 1);
99
+ if (hasNext) changePage(normalizedPageNo + 1);
92
100
  };
93
101
 
94
102
  const handleNavKeyDown = (action: () => void) => (e: KeyboardEvent) => {
@@ -103,7 +111,7 @@
103
111
  });
104
112
  </script>
105
113
 
106
- <div class="uniface-pagination-panel {type}" class:big {style} data-theme={theme} role="navigation" aria-label="Pagination">
114
+ <div class="uniface-pagination-panel {variant}" class:big={size === 'large'} {style} data-theme={theme} role="navigation" aria-label="Pagination">
107
115
  <div class="uniface-page-nav" class:disabled={!hasPrev} role="button" tabindex={hasPrev ? 0 : -1}
108
116
  aria-label="Previous page" aria-disabled={!hasPrev} onclick={goPrev} onkeydown={handleNavKeyDown(goPrev)}>
109
117
  <i class="icon_google_keyboard_arrow_left" aria-hidden="true"></i>
@@ -249,7 +257,7 @@
249
257
  height: 3em;
250
258
  }
251
259
 
252
- /* Plain type */
260
+ /* Plain variant */
253
261
  .uniface-pagination-panel.plain .uniface-page-no {
254
262
  background-color: inherit;
255
263
  border: none;
@@ -273,7 +281,7 @@
273
281
  color: var(--uniface-pagination-selected-background-color, #333333);
274
282
  }
275
283
 
276
- /* Circle type */
284
+ /* Circle variant */
277
285
  .uniface-pagination-panel.circle .uniface-page-no {
278
286
  border-radius: 50%;
279
287
  }
@@ -1,13 +1,15 @@
1
- import type { OnPageChange } from "../../types";
1
+ import type { OnPageChange, Size } from "../../types";
2
2
  interface Props {
3
3
  pageCount: number;
4
4
  pageNo?: number;
5
- type?: 'plain' | 'round' | 'circle';
5
+ /** 形状:plain / round / circle */
6
+ variant?: 'plain' | 'round' | 'circle';
6
7
  style?: string;
7
- big?: boolean;
8
+ /** 尺寸档位;'large' 对应旧的 big */
9
+ size?: Size;
8
10
  theme?: string;
9
11
  onchange?: OnPageChange;
10
12
  }
11
- declare const Pagination: import("svelte").Component<Props, {}, "">;
13
+ declare const Pagination: import("svelte").Component<Props, {}, "pageNo">;
12
14
  type Pagination = ReturnType<typeof Pagination>;
13
15
  export default Pagination;
@@ -7,7 +7,8 @@ export default interface ProgressStep {
7
7
  /**
8
8
  *
9
9
  */
10
- topic: string;
10
+ /** 步骤标题 */
11
+ title: string;
11
12
  /**
12
13
  *
13
14
  */
@@ -3,14 +3,15 @@
3
3
  import ProgressStepBlock from "./ProgressStepBlock.svelte";
4
4
 
5
5
  interface Props {
6
- steps: Array<ProgressStep>;
6
+ /** 步骤列表 */
7
+ items?: Array<ProgressStep>;
7
8
  direction?: 'vertical' | 'horizontal';
8
9
  style?: string;
9
10
  theme?: string;
10
11
  }
11
12
 
12
13
  let {
13
- steps,
14
+ items = [],
14
15
  direction = 'horizontal',
15
16
  style,
16
17
  theme
@@ -20,8 +21,8 @@
20
21
 
21
22
  <div class="uniface-progress-step-container {direction}" data-theme={theme} {style}>
22
23
  <div class="container-panel">
23
- {#each steps as step, idx}
24
- <ProgressStepBlock pos={idx+1} status={step.status} comment={step.comment} topic={step.topic} {direction}/>
24
+ {#each items as step, idx}
25
+ <ProgressStepBlock pos={idx+1} status={step.status} comment={step.comment} title={step.title} {direction}/>
25
26
  {/each}
26
27
  </div>
27
28
  </div>
@@ -1,6 +1,7 @@
1
1
  import type ProgressStep from "./ProgressStep";
2
2
  interface Props {
3
- steps: Array<ProgressStep>;
3
+ /** 步骤列表 */
4
+ items?: Array<ProgressStep>;
4
5
  direction?: 'vertical' | 'horizontal';
5
6
  style?: string;
6
7
  theme?: string;
@@ -4,7 +4,7 @@
4
4
  interface Props {
5
5
  status: ProgressStepStatus;
6
6
  pos?: number;
7
- topic: string;
7
+ title: string;
8
8
  comment?: string;
9
9
  style?: string;
10
10
  direction: 'vertical' | 'horizontal';
@@ -13,7 +13,7 @@
13
13
  let {
14
14
  status,
15
15
  pos = 1,
16
- topic,
16
+ title,
17
17
  comment = '',
18
18
  style = '',
19
19
  direction
@@ -34,7 +34,7 @@
34
34
  </div>
35
35
  <div class="step-text {status}">
36
36
  <div class="step-topic" >
37
- <span>{topic}</span>
37
+ <span>{title}</span>
38
38
  </div>
39
39
  {#if comment}
40
40
  <div class="step-comment">
@@ -2,7 +2,7 @@ import { ProgressStepStatus } from "./ProgressStep";
2
2
  interface Props {
3
3
  status: ProgressStepStatus;
4
4
  pos?: number;
5
- topic: string;
5
+ title: string;
6
6
  comment?: string;
7
7
  style?: string;
8
8
  direction: 'vertical' | 'horizontal';
@@ -1,5 +1,7 @@
1
1
  # ProgressStepBar Component
2
2
 
3
+ > **Renamed in 5.1.0**: this document uses the names from the [API Naming Guide](../../../docs/NAMING.md); the old names `steps`, `topic` were removed in 5.1.0 (no compatibility aliases are kept).
4
+
3
5
  A multi-step progress indicator showing sequential steps with their completion status. Renders numbered circles connected by a line; each step is `Pending`, `Processing`, or `Completed`. Supports horizontal (default) and vertical layouts. Pure display — no click handlers.
4
6
 
5
7
  ## Features
@@ -28,22 +30,22 @@ import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec
28
30
  <script lang="ts">
29
31
  import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec/uniface-element/ProgressStepBar';
30
32
 
31
- const steps: ProgressStep[] = [
32
- { topic: 'Registration', comment: 'Complete your profile', status: ProgressStepStatus.Completed },
33
- { topic: 'Verification', comment: 'Verify your email', status: ProgressStepStatus.Processing },
34
- { topic: 'Setup', comment: 'Configure preferences', status: ProgressStepStatus.Pending }
33
+ const items: ProgressStep[] = [
34
+ { title: 'Registration', comment: 'Complete your profile', status: ProgressStepStatus.Completed },
35
+ { title: 'Verification', comment: 'Verify your email', status: ProgressStepStatus.Processing },
36
+ { title: 'Setup', comment: 'Configure preferences', status: ProgressStepStatus.Pending }
35
37
  ];
36
38
  </script>
37
39
 
38
- <ProgressStepBar {steps} />
40
+ <ProgressStepBar {items} />
39
41
  ```
40
42
 
41
43
  ## Props
42
44
 
43
45
  | Prop | Type | Default | Description |
44
46
  |------|------|---------|-------------|
45
- | `steps` | `ProgressStep[]` | _(required)_ | Ordered list of steps. Each step's position in the array determines its number (`pos` displayed as `idx + 1`). |
46
- | `direction` | `'horizontal' \| 'vertical'` | `'horizontal'` | Layout direction. Horizontal = row of left-to-right steps; vertical = column of top-to-bottom steps. |
47
+ | `items` | `ProgressStep[]` | _(required)_ | Ordered list of items. Each step's position in the array determines its number (`pos` displayed as `idx + 1`). |
48
+ | `direction` | `'horizontal' \| 'vertical'` | `'horizontal'` | Layout direction. Horizontal = row of left-to-right items; vertical = column of top-to-bottom items. |
47
49
  | `style` | `string` | `''` | Inline CSS on the outer wrapper |
48
50
  | `theme` | `string \| undefined` | `undefined` | Set as `data-theme` on the outer wrapper |
49
51
 
@@ -51,8 +53,8 @@ import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec
51
53
 
52
54
  ```typescript
53
55
  interface ProgressStep {
54
- topic: string; // Step title (required)
55
- comment?: string; // Optional secondary text shown below the topic
56
+ title: string; // Step title (required)
57
+ comment?: string; // Optional secondary text shown below the title
56
58
  status: ProgressStepStatus; // Current status
57
59
  }
58
60
  ```
@@ -113,7 +115,7 @@ Rendered output:
113
115
  </div>
114
116
  </div>
115
117
  <div class="step-text {status}">
116
- <div class="step-topic"><span>{topic}</span></div>
118
+ <div class="step-topic"><span>{title}</span></div>
117
119
  <!-- only if comment provided -->
118
120
  <div class="step-comment"><span>{comment}</span></div>
119
121
  </div>
@@ -130,10 +132,10 @@ Rendered output:
130
132
  | `--uniface-progress-step-bar-color-surface` | Container background (also used as the "background behind the line" so the line appears to break around the circle) |
131
133
  | `--uniface-progress-step-bar-bg` | Foreground inside processing circle (default white) |
132
134
  | `--uniface-progress-step-pending-color` | Pending circle border + line + text (gray) |
133
- | `--uniface-progress-step-completed-color` | Completed topic/comment text (dark gray) |
135
+ | `--uniface-progress-step-completed-color` | Completed title/comment text (dark gray) |
134
136
  | `--uniface-progress-step-completed-icon-color` | Completed circle border + checkmark + line (blue) |
135
137
  | `--uniface-progress-step-completed-icon-bg` | Completed circle background (light blue tint) |
136
- | `--uniface-progress-step-processing-color` | Processing circle fill + topic text (blue) |
138
+ | `--uniface-progress-step-processing-color` | Processing circle fill + title text (blue) |
137
139
 
138
140
  ### How the connector line works
139
141
 
@@ -149,26 +151,26 @@ This is fragile — if you change `--uniface-progress-step-bar-color-surface` to
149
151
  <script lang="ts">
150
152
  import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec/uniface-element/ProgressStepBar';
151
153
 
152
- let steps = $state<ProgressStep[]>([
153
- { topic: 'Initialization', comment: 'Setting up...', status: ProgressStepStatus.Pending },
154
- { topic: 'Data Loading', comment: 'Fetching data...',status: ProgressStepStatus.Pending },
155
- { topic: 'Processing', comment: 'Analyzing...', status: ProgressStepStatus.Pending },
156
- { topic: 'Completion', comment: 'Finalizing...', status: ProgressStepStatus.Pending }
154
+ let items = $state<ProgressStep[]>([
155
+ { title: 'Initialization', comment: 'Setting up...', status: ProgressStepStatus.Pending },
156
+ { title: 'Data Loading', comment: 'Fetching data...',status: ProgressStepStatus.Pending },
157
+ { title: 'Processing', comment: 'Analyzing...', status: ProgressStepStatus.Pending },
158
+ { title: 'Completion', comment: 'Finalizing...', status: ProgressStepStatus.Pending }
157
159
  ]);
158
160
 
159
161
  let currentIdx = 0;
160
162
 
161
163
  function advance() {
162
- if (currentIdx >= steps.length) return;
164
+ if (currentIdx >= items.length) return;
163
165
 
164
- steps[currentIdx].status = ProgressStepStatus.Processing;
166
+ items[currentIdx].status = ProgressStepStatus.Processing;
165
167
 
166
168
  setTimeout(() => {
167
- steps[currentIdx].status = ProgressStepStatus.Completed;
169
+ items[currentIdx].status = ProgressStepStatus.Completed;
168
170
  currentIdx++;
169
171
 
170
- if (currentIdx < steps.length) {
171
- steps[currentIdx].status = ProgressStepStatus.Processing;
172
+ if (currentIdx < items.length) {
173
+ items[currentIdx].status = ProgressStepStatus.Processing;
172
174
  advance();
173
175
  }
174
176
  }, 1500);
@@ -177,14 +179,14 @@ This is fragile — if you change `--uniface-progress-step-bar-color-surface` to
177
179
  advance();
178
180
  </script>
179
181
 
180
- <ProgressStepBar {steps} />
182
+ <ProgressStepBar {items} />
181
183
  ```
182
184
 
183
185
  ### Vertical Layout
184
186
 
185
187
  ```svelte
186
188
  <div style="height: 480px;">
187
- <ProgressStepBar {steps} direction="vertical" />
189
+ <ProgressStepBar {items} direction="vertical" />
188
190
  </div>
189
191
  ```
190
192
 
@@ -199,22 +201,22 @@ For a "your order is at step N" type view:
199
201
  import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec/uniface-element/ProgressStepBar';
200
202
 
201
203
  const orderSteps: ProgressStep[] = [
202
- { topic: 'Order Placed', status: ProgressStepStatus.Completed },
203
- { topic: 'Payment Cleared', status: ProgressStepStatus.Completed },
204
- { topic: 'Shipped', status: ProgressStepStatus.Processing },
205
- { topic: 'Out for Delivery',status: ProgressStepStatus.Pending },
206
- { topic: 'Delivered', status: ProgressStepStatus.Pending }
204
+ { title: 'Order Placed', status: ProgressStepStatus.Completed },
205
+ { title: 'Payment Cleared', status: ProgressStepStatus.Completed },
206
+ { title: 'Shipped', status: ProgressStepStatus.Processing },
207
+ { title: 'Out for Delivery',status: ProgressStepStatus.Pending },
208
+ { title: 'Delivered', status: ProgressStepStatus.Pending }
207
209
  ];
208
210
  </script>
209
211
 
210
- <ProgressStepBar steps={orderSteps} />
212
+ <ProgressStepBar items={orderSteps} />
211
213
  ```
212
214
 
213
215
  ## Behavior Notes
214
216
 
215
217
  - **Pure display.** No click handlers — users can't jump between steps. Pair with [Navigator](../navigator/README.md) if you need interactive step navigation.
216
- - **Reactive.** Mutate `steps[i].status` (with `$state` array) and the UI updates. The component re-renders via Svelte 5 reactivity.
217
- - **`topic` truncates with `…`** (`white-space: nowrap; text-overflow: ellipsis`). Keep topics short.
218
+ - **Reactive.** Mutate `items[i].status` (with `$state` array) and the UI updates. The component re-renders via Svelte 5 reactivity.
219
+ - **`title` truncates with `…`** (`white-space: nowrap; text-overflow: ellipsis`). Keep topics short.
218
220
  - **`comment` is multi-line** but doesn't have its own truncation — long comments can break the layout.
219
221
  - **First step has no left margin**; subsequent steps use `margin-left: 8px` (horizontal) or no margin (vertical, since the line connects vertically).
220
222
  - **Last step keeps the line** for visual continuity — there's a `.progress-step-block:last-child` rule but it's empty in horizontal mode. In vertical mode, the line is unset on the last step.
@@ -223,7 +225,7 @@ For a "your order is at step N" type view:
223
225
 
224
226
  - **Purely visual.** No ARIA roles, no `aria-current` for the processing step, no `aria-label` on the indicators.
225
227
  - The checkmark `✔` is literal Unicode text — screen readers will read "check mark". Consider replacing with an icon font + `aria-hidden="true"` in a fork if it's noisy.
226
- - Step status (Pending / Processing / Completed) is conveyed by color + circle fill alone — no text alternative. Add `aria-label="Step N: {topic}, {status}"` on each block in a fork for screen-reader support.
228
+ - Step status (Pending / Processing / Completed) is conveyed by color + circle fill alone — no text alternative. Add `aria-label="Step N: {title}, {status}"` on each block in a fork for screen-reader support.
227
229
  - No keyboard interaction (purely display, so this is fine).
228
230
 
229
231
  ## Known Quirks
@@ -232,8 +234,8 @@ For a "your order is at step N" type view:
232
234
 
233
235
  ## Best Practices
234
236
 
235
- 1. **Use `$state` for the `steps` array** if you want live progress updates. Mutating `steps[i].status` re-renders.
236
- 2. **Keep `topic` short** — it truncates with `…`. Move detail to `comment`.
237
+ 1. **Use `$state` for the `items` array** if you want live progress updates. Mutating `items[i].status` re-renders.
238
+ 2. **Keep `title` short** — it truncates with `…`. Move detail to `comment`.
237
239
  3. **Use `direction="vertical"` only inside a height-constrained parent** (sidebar, drawer). Otherwise it collapses.
238
240
  4. **One `Processing` step at a time** — having multiple gives a confusing visual. Mark earlier steps `Completed`.
239
241
  5. **Override colors via CSS variables**, not by styling the inner classes — the structure is fragile (see connector line note).
@@ -1,5 +1,7 @@
1
1
  # ProgressStepBar 步骤进度条组件
2
2
 
3
+ > **5.1.0 重命名**:本文使用 [API 命名规范](../../../docs/NAMING_CN.md) 中的名字;旧名 `steps`, `topic` 已在 5.1.0 移除(5.1.0 不保留兼容别名)。
4
+
3
5
  多步骤进度指示器,按顺序显示各步骤的完成状态。渲染带编号的圆圈,圆圈之间用线连接;每步是 `Pending`、`Processing` 或 `Completed`。支持横向(默认)和纵向布局。纯展示组件 —— 无点击 handler。
4
6
 
5
7
  ## 功能特性
@@ -28,21 +30,21 @@ import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec
28
30
  <script lang="ts">
29
31
  import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec/uniface-element/ProgressStepBar';
30
32
 
31
- const steps: ProgressStep[] = [
32
- { topic: '注册', comment: '完善资料', status: ProgressStepStatus.Completed },
33
- { topic: '验证', comment: '验证邮箱', status: ProgressStepStatus.Processing },
34
- { topic: '设置', comment: '配置偏好', status: ProgressStepStatus.Pending }
33
+ const items: ProgressStep[] = [
34
+ { title: '注册', comment: '完善资料', status: ProgressStepStatus.Completed },
35
+ { title: '验证', comment: '验证邮箱', status: ProgressStepStatus.Processing },
36
+ { title: '设置', comment: '配置偏好', status: ProgressStepStatus.Pending }
35
37
  ];
36
38
  </script>
37
39
 
38
- <ProgressStepBar {steps} />
40
+ <ProgressStepBar {items} />
39
41
  ```
40
42
 
41
43
  ## 属性
42
44
 
43
45
  | 属性 | 类型 | 默认值 | 描述 |
44
46
  |------|------|---------|-------------|
45
- | `steps` | `ProgressStep[]` | _(必填)_ | 有序步骤列表。每项在数组中的位置决定其编号(显示为 `idx + 1`) |
47
+ | `items` | `ProgressStep[]` | _(必填)_ | 有序步骤列表。每项在数组中的位置决定其编号(显示为 `idx + 1`) |
46
48
  | `direction` | `'horizontal' \| 'vertical'` | `'horizontal'` | 布局方向。横向 = 从左到右一行;纵向 = 从上到下一列 |
47
49
  | `style` | `string`\| undefined` | `undefined` | 外层 wrapper 的内联 CSS |
48
50
  | `theme` | `string \| undefined` | `undefined` | 设为外层 wrapper 的 `data-theme` |
@@ -51,8 +53,8 @@ import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec
51
53
 
52
54
  ```typescript
53
55
  interface ProgressStep {
54
- topic: string; // 步骤标题(必填)
55
- comment?: string; // 可选的次要文字,显示在 topic 下方
56
+ title: string; // 步骤标题(必填)
57
+ comment?: string; // 可选的次要文字,显示在 title 下方
56
58
  status: ProgressStepStatus; // 当前状态
57
59
  }
58
60
  ```
@@ -113,7 +115,7 @@ enum ProgressStepStatus {
113
115
  </div>
114
116
  </div>
115
117
  <div class="step-text {status}">
116
- <div class="step-topic"><span>{topic}</span></div>
118
+ <div class="step-topic"><span>{title}</span></div>
117
119
  <!-- 仅提供 comment 时 -->
118
120
  <div class="step-comment"><span>{comment}</span></div>
119
121
  </div>
@@ -130,10 +132,10 @@ enum ProgressStepStatus {
130
132
  | `--uniface-progress-step-bar-color-surface` | 容器背景(也用作"线后面的背景",让线看起来在圆圈处中断) |
131
133
  | `--uniface-progress-step-bar-bg` | 进行中圆圈内的前景色(默认白) |
132
134
  | `--uniface-progress-step-pending-color` | 未开始圆圈边框 + 线 + 文字(灰) |
133
- | `--uniface-progress-step-completed-color` | 已完成 topic / comment 文字(深灰) |
135
+ | `--uniface-progress-step-completed-color` | 已完成 title / comment 文字(深灰) |
134
136
  | `--uniface-progress-step-completed-icon-color` | 已完成圆圈边框 + 对勾 + 线(蓝) |
135
137
  | `--uniface-progress-step-completed-icon-bg` | 已完成圆圈背景(淡蓝) |
136
- | `--uniface-progress-step-processing-color` | 进行中圆圈填充 + topic 文字(蓝) |
138
+ | `--uniface-progress-step-processing-color` | 进行中圆圈填充 + title 文字(蓝) |
137
139
 
138
140
  ### 连接线怎么画的
139
141
 
@@ -149,26 +151,26 @@ enum ProgressStepStatus {
149
151
  <script lang="ts">
150
152
  import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec/uniface-element/ProgressStepBar';
151
153
 
152
- let steps = $state<ProgressStep[]>([
153
- { topic: '初始化', comment: '正在设置...', status: ProgressStepStatus.Pending },
154
- { topic: '数据加载', comment: '正在获取...', status: ProgressStepStatus.Pending },
155
- { topic: '处理中', comment: '正在分析...', status: ProgressStepStatus.Pending },
156
- { topic: '完成', comment: '正在收尾...', status: ProgressStepStatus.Pending }
154
+ let items = $state<ProgressStep[]>([
155
+ { title: '初始化', comment: '正在设置...', status: ProgressStepStatus.Pending },
156
+ { title: '数据加载', comment: '正在获取...', status: ProgressStepStatus.Pending },
157
+ { title: '处理中', comment: '正在分析...', status: ProgressStepStatus.Pending },
158
+ { title: '完成', comment: '正在收尾...', status: ProgressStepStatus.Pending }
157
159
  ]);
158
160
 
159
161
  let currentIdx = 0;
160
162
 
161
163
  function advance() {
162
- if (currentIdx >= steps.length) return;
164
+ if (currentIdx >= items.length) return;
163
165
 
164
- steps[currentIdx].status = ProgressStepStatus.Processing;
166
+ items[currentIdx].status = ProgressStepStatus.Processing;
165
167
 
166
168
  setTimeout(() => {
167
- steps[currentIdx].status = ProgressStepStatus.Completed;
169
+ items[currentIdx].status = ProgressStepStatus.Completed;
168
170
  currentIdx++;
169
171
 
170
- if (currentIdx < steps.length) {
171
- steps[currentIdx].status = ProgressStepStatus.Processing;
172
+ if (currentIdx < items.length) {
173
+ items[currentIdx].status = ProgressStepStatus.Processing;
172
174
  advance();
173
175
  }
174
176
  }, 1500);
@@ -177,14 +179,14 @@ enum ProgressStepStatus {
177
179
  advance();
178
180
  </script>
179
181
 
180
- <ProgressStepBar {steps} />
182
+ <ProgressStepBar {items} />
181
183
  ```
182
184
 
183
185
  ### 纵向布局
184
186
 
185
187
  ```svelte
186
188
  <div style="height: 480px;">
187
- <ProgressStepBar {steps} direction="vertical" />
189
+ <ProgressStepBar {items} direction="vertical" />
188
190
  </div>
189
191
  ```
190
192
 
@@ -199,22 +201,22 @@ enum ProgressStepStatus {
199
201
  import ProgressStepBar, { ProgressStepStatus, type ProgressStep } from '@ticatec/uniface-element/ProgressStepBar';
200
202
 
201
203
  const orderSteps: ProgressStep[] = [
202
- { topic: '下单', status: ProgressStepStatus.Completed },
203
- { topic: '支付成功', status: ProgressStepStatus.Completed },
204
- { topic: '已发货', status: ProgressStepStatus.Processing },
205
- { topic: '派送中', status: ProgressStepStatus.Pending },
206
- { topic: '已签收', status: ProgressStepStatus.Pending }
204
+ { title: '下单', status: ProgressStepStatus.Completed },
205
+ { title: '支付成功', status: ProgressStepStatus.Completed },
206
+ { title: '已发货', status: ProgressStepStatus.Processing },
207
+ { title: '派送中', status: ProgressStepStatus.Pending },
208
+ { title: '已签收', status: ProgressStepStatus.Pending }
207
209
  ];
208
210
  </script>
209
211
 
210
- <ProgressStepBar steps={orderSteps} />
212
+ <ProgressStepBar items={orderSteps} />
211
213
  ```
212
214
 
213
215
  ## 行为说明
214
216
 
215
217
  - **纯展示。** 无点击 handler —— 用户不能在步骤间跳转。需要交互式步骤导航用 [Navigator](../navigator/README_CN.md)
216
- - **响应式。** 修改 `steps[i].status`(用 `$state` 数组)UI 就更新。组件通过 Svelte 5 响应式重渲染
217
- - **`topic` 用 `…` 截断**(`white-space: nowrap; text-overflow: ellipsis`)。保持 topic 简短
218
+ - **响应式。** 修改 `items[i].status`(用 `$state` 数组)UI 就更新。组件通过 Svelte 5 响应式重渲染
219
+ - **`title` 用 `…` 截断**(`white-space: nowrap; text-overflow: ellipsis`)。保持 topic 简短
218
220
  - **`comment` 可多行**,但本身不截断 —— 长注释可能破坏布局
219
221
  - **首步无左 margin**;后续步骤横向 `margin-left: 8px`,纵向无 margin(因为线是竖向连接的)
220
222
  - **末步保留线**为了视觉连续 —— 有 `.progress-step-block:last-child` 规则但横向模式下为空。纵向模式下末步的线被 unset
@@ -223,7 +225,7 @@ enum ProgressStepStatus {
223
225
 
224
226
  - **纯视觉。** 没有 ARIA role、processing 步骤没有 `aria-current`、指示器没有 `aria-label`
225
227
  - 对勾 `✔` 是字面 Unicode 文字 —— 屏幕阅读器会读成"对勾"。觉得吵的话在 fork 里换成图标字体 + `aria-hidden="true"`
226
- - 步骤状态(Pending / Processing / Completed)只靠颜色 + 圆圈填充传达 —— 没有文字替代。fork 时在每个块上加 `aria-label="第 N 步:{topic},{status}"` 支持屏幕阅读器
228
+ - 步骤状态(Pending / Processing / Completed)只靠颜色 + 圆圈填充传达 —— 没有文字替代。fork 时在每个块上加 `aria-label="第 N 步:{title},{status}"` 支持屏幕阅读器
227
229
  - 无键盘交互(纯展示,所以没问题)
228
230
 
229
231
  ## 已知怪异
@@ -232,8 +234,8 @@ enum ProgressStepStatus {
232
234
 
233
235
  ## 最佳实践
234
236
 
235
- 1. **`steps` 数组用 `$state`**,需要实时进度更新时。修改 `steps[i].status` 触发重渲染
236
- 2. **`topic` 保持简短** —— 会用 `…` 截断。详情移到 `comment`
237
+ 1. **`items` 数组用 `$state`**,需要实时进度更新时。修改 `items[i].status` 触发重渲染
238
+ 2. **`title` 保持简短** —— 会用 `…` 截断。详情移到 `comment`
237
239
  3. **`direction="vertical"` 只在高度受限的父容器里用**(侧边栏、抽屉)。否则会塌
238
240
  4. **同时只一个 `Processing` 步骤** —— 多了视觉混乱。把之前的标 `Completed`
239
241
  5. **颜色通过 CSS 变量覆盖**,不要改内部类样式 —— 结构脆弱(见连接线说明)
@@ -4,7 +4,7 @@
4
4
  import {Tween} from 'svelte/motion';
5
5
  import {cubicOut} from 'svelte/easing';
6
6
  import type {Snippet} from "svelte";
7
- import type {TabActionHandler, TabCloseHandler, TabRender} from "../../types";
7
+ import type {OnTabAction, BeforeTabClose, IsTabClosable, TabRender} from "../../types";
8
8
 
9
9
  interface Props {
10
10
  class?: string;
@@ -14,12 +14,19 @@
14
14
  style?: string;
15
15
  tabs: Array<any>;
16
16
  scrollStep?: number;
17
- closable?: boolean | TabActionHandler;
17
+ closable?: boolean | IsTabClosable;
18
18
  activeTab?: any;
19
19
  maxTabWidth?: number;
20
20
  tabRender?: TabRender;
21
- onrefresh?: TabActionHandler;
22
- onremove?: TabCloseHandler;
21
+ onrefresh?: OnTabAction;
22
+ /**
23
+ * 关闭标签前的否决钩子:返回 false 阻止关闭。
24
+ */
25
+ beforeRemove?: BeforeTabClose;
26
+ /**
27
+ * 标签被移除后的通知。
28
+ */
29
+ onremove?: OnTabAction;
23
30
  children?: Snippet;
24
31
  }
25
32
 
@@ -36,6 +43,7 @@
36
43
  maxTabWidth,
37
44
  tabRender,
38
45
  onrefresh,
46
+ beforeRemove,
39
47
  onremove,
40
48
  children
41
49
  }: Props = $props();
@@ -128,7 +136,7 @@
128
136
  const closeTab = (tab: any) => async (e: MouseEvent) => {
129
137
  let pos = tabs.indexOf(tab);
130
138
  if (pos > -1) {
131
- let canClose = onremove == null ? true : await onremove(tab);
139
+ const canClose = beforeRemove == null || (await beforeRemove(tab)) !== false;
132
140
  if (canClose) {
133
141
  tabs.splice(pos, 1);
134
142
  tabs = [...tabs];
@@ -140,6 +148,7 @@
140
148
  }
141
149
  await tick();
142
150
  checkOverflow();
151
+ onremove?.(tab);
143
152
  }
144
153
  }
145
154
  e.stopPropagation();
@@ -1,5 +1,5 @@
1
1
  import type { Snippet } from "svelte";
2
- import type { TabActionHandler, TabCloseHandler, TabRender } from "../../types";
2
+ import type { OnTabAction, BeforeTabClose, IsTabClosable, TabRender } from "../../types";
3
3
  interface Props {
4
4
  class?: string;
5
5
  simple?: boolean;
@@ -8,12 +8,19 @@ interface Props {
8
8
  style?: string;
9
9
  tabs: Array<any>;
10
10
  scrollStep?: number;
11
- closable?: boolean | TabActionHandler;
11
+ closable?: boolean | IsTabClosable;
12
12
  activeTab?: any;
13
13
  maxTabWidth?: number;
14
14
  tabRender?: TabRender;
15
- onrefresh?: TabActionHandler;
16
- onremove?: TabCloseHandler;
15
+ onrefresh?: OnTabAction;
16
+ /**
17
+ * 关闭标签前的否决钩子:返回 false 阻止关闭。
18
+ */
19
+ beforeRemove?: BeforeTabClose;
20
+ /**
21
+ * 标签被移除后的通知。
22
+ */
23
+ onremove?: OnTabAction;
17
24
  children?: Snippet;
18
25
  }
19
26
  declare const Tabs: import("svelte").Component<Props, {}, "tabs" | "activeTab">;
@@ -1,4 +1,4 @@
1
1
  import Tabs from "./Tabs.svelte";
2
- import type { TabActionHandler, TabCloseHandler, TabRender } from "../../types";
2
+ import type { OnTabAction, BeforeTabClose, IsTabClosable, TabRender } from "../../types";
3
3
  export default Tabs;
4
- export type { TabActionHandler, TabCloseHandler, TabRender };
4
+ export type { OnTabAction, BeforeTabClose, IsTabClosable, TabRender };