huibo-ui 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (668) hide show
  1. package/dist/cjs/{date-helpers-904747ff.js → date-helpers-1ffddc59.js} +7 -3
  2. package/dist/cjs/date-helpers-1ffddc59.js.map +1 -0
  3. package/dist/cjs/hb-affix.cjs.entry.js +1 -1
  4. package/dist/cjs/hb-aside.cjs.entry.js +1 -1
  5. package/dist/cjs/hb-avatar.cjs.entry.js +1 -1
  6. package/dist/cjs/hb-backtop.cjs.entry.js +2 -2
  7. package/dist/cjs/hb-badge.cjs.entry.js +1 -1
  8. package/dist/cjs/hb-breadcrumb-item.cjs.entry.js +1 -1
  9. package/dist/cjs/hb-breadcrumb.cjs.entry.js +1 -1
  10. package/dist/cjs/hb-button.cjs.entry.js +2 -2
  11. package/dist/cjs/hb-calendar.cjs.entry.js +78 -10
  12. package/dist/cjs/hb-calendar.cjs.entry.js.map +1 -1
  13. package/dist/cjs/hb-card.cjs.entry.js +1 -1
  14. package/dist/cjs/hb-cascader.cjs.entry.js +270 -146
  15. package/dist/cjs/hb-cascader.cjs.entry.js.map +1 -1
  16. package/dist/cjs/hb-checkbox-group.cjs.entry.js +2 -2
  17. package/dist/cjs/hb-checkbox.cjs.entry.js +3 -3
  18. package/dist/cjs/hb-collapse-item.cjs.entry.js +1 -1
  19. package/dist/cjs/hb-collapse.cjs.entry.js +1 -1
  20. package/dist/cjs/hb-color-picker-panel.cjs.entry.js +2 -2
  21. package/dist/cjs/hb-color-picker.cjs.entry.js +91 -14
  22. package/dist/cjs/hb-color-picker.cjs.entry.js.map +1 -1
  23. package/dist/cjs/hb-config-provider.cjs.entry.js +1 -1
  24. package/dist/cjs/hb-container.cjs.entry.js +2 -2
  25. package/dist/cjs/hb-date-picker-pane.cjs.entry.js +2 -2
  26. package/dist/cjs/hb-date-picker.cjs.entry.js +85 -7
  27. package/dist/cjs/hb-date-picker.cjs.entry.js.map +1 -1
  28. package/dist/cjs/hb-date-range-picker.cjs.entry.js +3 -3
  29. package/dist/cjs/hb-date-time-picker.cjs.entry.js +3 -3
  30. package/dist/cjs/hb-descriptions.cjs.entry.js +2 -2
  31. package/dist/cjs/hb-descriptions.cjs.entry.js.map +1 -1
  32. package/dist/cjs/hb-divider.cjs.entry.js +2 -2
  33. package/dist/cjs/hb-drawer.cjs.entry.js +1 -1
  34. package/dist/cjs/hb-dropdown.cjs.entry.js +74 -6
  35. package/dist/cjs/hb-dropdown.cjs.entry.js.map +1 -1
  36. package/dist/cjs/hb-empty.cjs.entry.js +1 -1
  37. package/dist/cjs/hb-float-button.cjs.entry.js +2 -2
  38. package/dist/cjs/hb-footer.cjs.entry.js +1 -1
  39. package/dist/cjs/hb-form-item.cjs.entry.js +59 -8
  40. package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
  41. package/dist/cjs/hb-form.cjs.entry.js +3 -3
  42. package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
  43. package/dist/cjs/hb-header.cjs.entry.js +1 -1
  44. package/dist/cjs/hb-image-preview.cjs.entry.js +12 -8
  45. package/dist/cjs/hb-image-preview.cjs.entry.js.map +1 -1
  46. package/dist/cjs/hb-image.cjs.entry.js +1 -1
  47. package/dist/cjs/hb-input-number.cjs.entry.js +5 -5
  48. package/dist/cjs/hb-input-tag.cjs.entry.js +2 -2
  49. package/dist/cjs/hb-input.cjs.entry.js +39 -3
  50. package/dist/cjs/hb-input.cjs.entry.js.map +1 -1
  51. package/dist/cjs/hb-layout.cjs.entry.js +36 -14
  52. package/dist/cjs/hb-layout.cjs.entry.js.map +1 -1
  53. package/dist/cjs/hb-link.cjs.entry.js +2 -2
  54. package/dist/cjs/hb-loading.cjs.entry.js +2 -2
  55. package/dist/cjs/hb-main.cjs.entry.js +1 -1
  56. package/dist/cjs/hb-menu-item.cjs.entry.js +2 -2
  57. package/dist/cjs/hb-menu.cjs.entry.js +3 -3
  58. package/dist/cjs/hb-menu.cjs.entry.js.map +1 -1
  59. package/dist/cjs/hb-message.cjs.entry.js +2 -2
  60. package/dist/cjs/hb-notification.cjs.entry.js +2 -2
  61. package/dist/cjs/hb-page-header.cjs.entry.js +1 -1
  62. package/dist/cjs/hb-pagination.cjs.entry.js +21 -8
  63. package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
  64. package/dist/cjs/hb-popconfirm.cjs.entry.js +37 -7
  65. package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
  66. package/dist/cjs/hb-popover.cjs.entry.js +22 -2
  67. package/dist/cjs/hb-popover.cjs.entry.js.map +1 -1
  68. package/dist/cjs/hb-progress.cjs.entry.js +1 -1
  69. package/dist/cjs/hb-radio.cjs.entry.js +2 -2
  70. package/dist/cjs/hb-rate.cjs.entry.js +45 -3
  71. package/dist/cjs/hb-rate.cjs.entry.js.map +1 -1
  72. package/dist/cjs/hb-result.cjs.entry.js +1 -1
  73. package/dist/cjs/hb-row.cjs.entry.js +2 -2
  74. package/dist/cjs/hb-segmented.cjs.entry.js +39 -5
  75. package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
  76. package/dist/cjs/hb-select.cjs.entry.js +47 -8
  77. package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
  78. package/dist/cjs/hb-slider.cjs.entry.js +189 -20
  79. package/dist/cjs/hb-slider.cjs.entry.js.map +1 -1
  80. package/dist/cjs/hb-space.cjs.entry.js +2 -2
  81. package/dist/cjs/hb-statistic.cjs.entry.js +1 -1
  82. package/dist/cjs/hb-step.cjs.entry.js +1 -1
  83. package/dist/cjs/hb-steps.cjs.entry.js +30 -9
  84. package/dist/cjs/hb-steps.cjs.entry.js.map +1 -1
  85. package/dist/cjs/hb-sub-menu.cjs.entry.js +4 -4
  86. package/dist/cjs/hb-switch.cjs.entry.js +9 -4
  87. package/dist/cjs/hb-switch.cjs.entry.js.map +1 -1
  88. package/dist/cjs/hb-tab-pane.cjs.entry.js +1 -1
  89. package/dist/cjs/hb-table.cjs.entry.js +1 -1
  90. package/dist/cjs/hb-table.cjs.entry.js.map +1 -1
  91. package/dist/cjs/hb-tabs.cjs.entry.js +2 -2
  92. package/dist/cjs/hb-tag.cjs.entry.js +2 -2
  93. package/dist/cjs/hb-text.cjs.entry.js +2 -2
  94. package/dist/cjs/hb-time-picker.cjs.entry.js +4 -4
  95. package/dist/cjs/hb-time-select.cjs.entry.js +2 -2
  96. package/dist/cjs/hb-timeline.cjs.entry.js +1 -1
  97. package/dist/cjs/hb-tooltip.cjs.entry.js +18 -1
  98. package/dist/cjs/hb-tooltip.cjs.entry.js.map +1 -1
  99. package/dist/cjs/hb-transfer.cjs.entry.js +2 -2
  100. package/dist/cjs/hb-tree-select.cjs.entry.js +95 -18
  101. package/dist/cjs/hb-tree-select.cjs.entry.js.map +1 -1
  102. package/dist/cjs/hb-tree.cjs.entry.js +1 -1
  103. package/dist/cjs/hb-upload.cjs.entry.js +3 -3
  104. package/dist/cjs/hb-watermark.cjs.entry.js +1 -1
  105. package/dist/cjs/huibo-ui.cjs.js +1 -1
  106. package/dist/cjs/loader.cjs.js +1 -1
  107. package/dist/collection/collection-manifest.json +3 -3
  108. package/dist/collection/components/Affix/Affix.js +1 -1
  109. package/dist/collection/components/Avatar/Avatar.js +1 -1
  110. package/dist/collection/components/Backtop/Backtop.js +2 -2
  111. package/dist/collection/components/Badge/Badge.js +1 -1
  112. package/dist/collection/components/Breadcrumb/Breadcrumb.js +1 -1
  113. package/dist/collection/components/Breadcrumb/BreadcrumbItem.js +1 -1
  114. package/dist/collection/components/Button/Button.js +2 -2
  115. package/dist/collection/components/Calendar/Calendar.js +84 -10
  116. package/dist/collection/components/Calendar/Calendar.js.map +1 -1
  117. package/dist/collection/components/Calendar/calendar.css +16 -0
  118. package/dist/collection/components/Card/Card.js +1 -1
  119. package/dist/collection/components/Cascader/Cascader.js +374 -194
  120. package/dist/collection/components/Cascader/Cascader.js.map +1 -1
  121. package/dist/collection/components/Cascader/cascader.css +170 -16
  122. package/dist/collection/components/Checkbox/Checkbox.js +3 -3
  123. package/dist/collection/components/Checkbox/CheckboxGroup.js +2 -2
  124. package/dist/collection/components/Collapse/Collapse.js +1 -1
  125. package/dist/collection/components/Collapse/CollapseItem.js +1 -1
  126. package/dist/collection/components/ColorPicker/ColorPicker.js +92 -14
  127. package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
  128. package/dist/collection/components/ColorPicker/color-picker.css +13 -0
  129. package/dist/collection/components/ColorPickerPanel/ColorPickerPanel.js +2 -2
  130. package/dist/collection/components/ConfigProvider/ConfigProvider.js +1 -1
  131. package/dist/collection/components/Container/Aside.js +1 -1
  132. package/dist/collection/components/Container/Container.js +2 -2
  133. package/dist/collection/components/Container/Footer.js +1 -1
  134. package/dist/collection/components/Container/Header.js +1 -1
  135. package/dist/collection/components/Container/Main.js +1 -1
  136. package/dist/collection/components/DatePicker/DatePicker.js +89 -10
  137. package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
  138. package/dist/collection/components/DatePicker/date-picker.css +62 -2
  139. package/dist/collection/components/DatePickerPane/DatePickerPane.js +1 -1
  140. package/dist/collection/components/DateRangePicker/DateRangePicker.js +2 -2
  141. package/dist/collection/components/DateTimePicker/DateTimePicker.js +2 -2
  142. package/dist/collection/components/Descriptions/Descriptions.js +1 -1
  143. package/dist/collection/components/Descriptions/descriptions.css +22 -0
  144. package/dist/collection/components/Divider/Divider.js +2 -2
  145. package/dist/collection/components/Drawer/Drawer.js +1 -1
  146. package/dist/collection/components/Dropdown/Dropdown.js +83 -7
  147. package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
  148. package/dist/collection/components/Dropdown/dropdown.css +2 -1
  149. package/dist/collection/components/Empty/Empty.js +1 -1
  150. package/dist/collection/components/FloatButton/FloatButton.js +2 -2
  151. package/dist/collection/components/Form/Form.js +2 -2
  152. package/dist/collection/components/Form/FormItem.js +60 -9
  153. package/dist/collection/components/Form/FormItem.js.map +1 -1
  154. package/dist/collection/components/Form/form-item.css +49 -4
  155. package/dist/collection/components/Form/form.css +1 -0
  156. package/dist/collection/components/Image/Image.js +1 -1
  157. package/dist/collection/components/ImagePreview/ImagePreview.js +12 -8
  158. package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
  159. package/dist/collection/components/Input/Input.js +38 -2
  160. package/dist/collection/components/Input/Input.js.map +1 -1
  161. package/dist/collection/components/Input/input.css +21 -2
  162. package/dist/collection/components/InputNumber/InputNumber.js +5 -5
  163. package/dist/collection/components/InputTag/InputTag.js +2 -2
  164. package/dist/collection/components/Layout/Layout.js +87 -34
  165. package/dist/collection/components/Layout/Layout.js.map +1 -1
  166. package/dist/collection/components/Layout/Row.js +2 -2
  167. package/dist/collection/components/Layout/layout.css +524 -0
  168. package/dist/collection/components/Link/Link.js +2 -2
  169. package/dist/collection/components/Loading/Loading.js +2 -2
  170. package/dist/collection/components/Menu/Menu.js +2 -2
  171. package/dist/collection/components/Menu/MenuItem.js +2 -2
  172. package/dist/collection/components/Menu/SubMenu.js +4 -4
  173. package/dist/collection/components/Menu/menu.css +25 -0
  174. package/dist/collection/components/Message/Message.js +2 -2
  175. package/dist/collection/components/Notification/Notification.js +2 -2
  176. package/dist/collection/components/PageHeader/PageHeader.js +1 -1
  177. package/dist/collection/components/Pagination/Pagination.js +23 -7
  178. package/dist/collection/components/Pagination/Pagination.js.map +1 -1
  179. package/dist/collection/components/Pagination/pagination.css +23 -0
  180. package/dist/collection/components/Popconfirm/Popconfirm.js +44 -7
  181. package/dist/collection/components/Popconfirm/Popconfirm.js.map +1 -1
  182. package/dist/collection/components/Popover/Popover.js +29 -2
  183. package/dist/collection/components/Popover/Popover.js.map +1 -1
  184. package/dist/collection/components/Progress/Progress.js +1 -1
  185. package/dist/collection/components/Radio/Radio.js +2 -2
  186. package/dist/collection/components/Rate/Rate.js +45 -3
  187. package/dist/collection/components/Rate/Rate.js.map +1 -1
  188. package/dist/collection/components/Result/Result.js +1 -1
  189. package/dist/collection/components/Segmented/Segmented.js +51 -6
  190. package/dist/collection/components/Segmented/Segmented.js.map +1 -1
  191. package/dist/collection/components/Select/Select.js +46 -7
  192. package/dist/collection/components/Select/Select.js.map +1 -1
  193. package/dist/collection/components/Select/select.css +50 -4
  194. package/dist/collection/components/Slider/Slider.js +221 -21
  195. package/dist/collection/components/Slider/Slider.js.map +1 -1
  196. package/dist/collection/components/Slider/slider.css +58 -7
  197. package/dist/collection/components/Space/Space.js +2 -2
  198. package/dist/collection/components/Statistic/Statistic.js +1 -1
  199. package/dist/collection/components/Steps/Step.js +1 -1
  200. package/dist/collection/components/Steps/Steps.js +35 -8
  201. package/dist/collection/components/Steps/Steps.js.map +1 -1
  202. package/dist/collection/components/Switch/Switch.js +8 -3
  203. package/dist/collection/components/Switch/Switch.js.map +1 -1
  204. package/dist/collection/components/Switch/switch.css +45 -0
  205. package/dist/collection/components/Table/table.css +20 -0
  206. package/dist/collection/components/Tabs/TabPane.js +1 -1
  207. package/dist/collection/components/Tabs/Tabs.js +2 -2
  208. package/dist/collection/components/Tag/Tag.js +2 -2
  209. package/dist/collection/components/Text/Text.js +2 -2
  210. package/dist/collection/components/TimePicker/TimePicker.js +4 -4
  211. package/dist/collection/components/TimeSelect/TimeSelect.js +2 -2
  212. package/dist/collection/components/Timeline/Timeline.js +1 -1
  213. package/dist/collection/components/Tooltip/Tooltip.js +25 -2
  214. package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
  215. package/dist/collection/components/Transfer/Transfer.js +2 -2
  216. package/dist/collection/components/Tree/Tree.js +1 -1
  217. package/dist/collection/components/TreeSelect/TreeSelect.js +94 -17
  218. package/dist/collection/components/TreeSelect/TreeSelect.js.map +1 -1
  219. package/dist/collection/components/TreeSelect/tree-select.css +41 -7
  220. package/dist/collection/components/Upload/Upload.js +3 -3
  221. package/dist/collection/components/Watermark/Watermark.js +1 -1
  222. package/dist/collection/utils/date-helpers.js +6 -2
  223. package/dist/collection/utils/date-helpers.js.map +1 -1
  224. package/dist/components/hb-affix.js +1 -1
  225. package/dist/components/hb-aside.js +1 -1
  226. package/dist/components/hb-avatar.js +1 -1
  227. package/dist/components/hb-backtop.js +2 -2
  228. package/dist/components/hb-badge.js +1 -1
  229. package/dist/components/hb-breadcrumb-item.js +1 -1
  230. package/dist/components/hb-breadcrumb.js +1 -1
  231. package/dist/components/hb-button.js +2 -2
  232. package/dist/components/hb-calendar.js +80 -11
  233. package/dist/components/hb-calendar.js.map +1 -1
  234. package/dist/components/hb-card.js +1 -1
  235. package/dist/components/hb-cascader.js +273 -146
  236. package/dist/components/hb-cascader.js.map +1 -1
  237. package/dist/components/hb-checkbox-group.js +2 -2
  238. package/dist/components/hb-checkbox.js +3 -3
  239. package/dist/components/hb-collapse-item.js +1 -1
  240. package/dist/components/hb-collapse.js +1 -1
  241. package/dist/components/hb-color-picker-panel.js +2 -2
  242. package/dist/components/hb-color-picker.js +93 -15
  243. package/dist/components/hb-color-picker.js.map +1 -1
  244. package/dist/components/hb-config-provider.js +1 -1
  245. package/dist/components/hb-container.js +2 -2
  246. package/dist/components/hb-date-picker-pane.js +2 -2
  247. package/dist/components/hb-date-picker.js +87 -8
  248. package/dist/components/hb-date-picker.js.map +1 -1
  249. package/dist/components/hb-date-range-picker.js +3 -3
  250. package/dist/components/hb-date-time-picker.js +3 -3
  251. package/dist/components/hb-descriptions.js +2 -2
  252. package/dist/components/hb-descriptions.js.map +1 -1
  253. package/dist/components/hb-divider.js +2 -2
  254. package/dist/components/hb-drawer.js +1 -1
  255. package/dist/components/hb-dropdown.js +76 -7
  256. package/dist/components/hb-dropdown.js.map +1 -1
  257. package/dist/components/hb-empty.js +1 -1
  258. package/dist/components/hb-float-button.js +2 -2
  259. package/dist/components/hb-footer.js +1 -1
  260. package/dist/components/hb-form-item.js +59 -8
  261. package/dist/components/hb-form-item.js.map +1 -1
  262. package/dist/components/hb-form.js +3 -3
  263. package/dist/components/hb-form.js.map +1 -1
  264. package/dist/components/hb-header.js +1 -1
  265. package/dist/components/hb-icon.js +1 -89
  266. package/dist/components/hb-icon.js.map +1 -1
  267. package/dist/components/hb-image-preview.js +12 -8
  268. package/dist/components/hb-image-preview.js.map +1 -1
  269. package/dist/components/hb-image.js +1 -1
  270. package/dist/components/hb-input-number.js +5 -5
  271. package/dist/components/hb-input-tag.js +2 -2
  272. package/dist/components/hb-input.js +39 -3
  273. package/dist/components/hb-input.js.map +1 -1
  274. package/dist/components/hb-layout.js +36 -14
  275. package/dist/components/hb-layout.js.map +1 -1
  276. package/dist/components/hb-link.js +2 -2
  277. package/dist/components/hb-loading.js +2 -2
  278. package/dist/components/hb-main.js +1 -1
  279. package/dist/components/hb-menu-item.js +2 -2
  280. package/dist/components/hb-menu.js +3 -3
  281. package/dist/components/hb-menu.js.map +1 -1
  282. package/dist/components/hb-message.js +2 -2
  283. package/dist/components/hb-notification.js +2 -2
  284. package/dist/components/hb-page-header.js +1 -1
  285. package/dist/components/hb-pagination.js +25 -10
  286. package/dist/components/hb-pagination.js.map +1 -1
  287. package/dist/components/hb-popconfirm.js +37 -7
  288. package/dist/components/hb-popconfirm.js.map +1 -1
  289. package/dist/components/hb-popover.js +22 -2
  290. package/dist/components/hb-popover.js.map +1 -1
  291. package/dist/components/hb-progress.js +1 -1
  292. package/dist/components/hb-radio.js +2 -2
  293. package/dist/components/hb-rate.js +45 -3
  294. package/dist/components/hb-rate.js.map +1 -1
  295. package/dist/components/hb-result.js +1 -1
  296. package/dist/components/hb-row.js +2 -2
  297. package/dist/components/hb-segmented.js +41 -6
  298. package/dist/components/hb-segmented.js.map +1 -1
  299. package/dist/components/hb-select.js +47 -8
  300. package/dist/components/hb-select.js.map +1 -1
  301. package/dist/components/hb-slider.js +194 -21
  302. package/dist/components/hb-slider.js.map +1 -1
  303. package/dist/components/hb-space.js +2 -2
  304. package/dist/components/hb-statistic.js +1 -1
  305. package/dist/components/hb-step.js +1 -1
  306. package/dist/components/hb-steps.js +35 -8
  307. package/dist/components/hb-steps.js.map +1 -1
  308. package/dist/components/hb-sub-menu.js +4 -4
  309. package/dist/components/hb-switch.js +9 -4
  310. package/dist/components/hb-switch.js.map +1 -1
  311. package/dist/components/hb-tab-pane.js +1 -1
  312. package/dist/components/hb-table.js +1 -1
  313. package/dist/components/hb-table.js.map +1 -1
  314. package/dist/components/hb-tabs.js +2 -2
  315. package/dist/components/hb-tag.js +2 -2
  316. package/dist/components/hb-text.js +2 -2
  317. package/dist/components/hb-time-picker.js +4 -4
  318. package/dist/components/hb-time-select.js +2 -2
  319. package/dist/components/hb-timeline.js +1 -1
  320. package/dist/components/hb-tooltip.js +18 -1
  321. package/dist/components/hb-tooltip.js.map +1 -1
  322. package/dist/components/hb-transfer.js +2 -2
  323. package/dist/components/hb-tree-select.js +95 -18
  324. package/dist/components/hb-tree-select.js.map +1 -1
  325. package/dist/components/hb-tree.js +1 -1
  326. package/dist/components/hb-upload.js +3 -3
  327. package/dist/components/hb-watermark.js +1 -1
  328. package/dist/components/{p-cf94cbf6.js → p-08b4005c.js} +7 -3
  329. package/dist/components/p-08b4005c.js.map +1 -0
  330. package/dist/components/p-86d92faf.js +93 -0
  331. package/dist/components/p-86d92faf.js.map +1 -0
  332. package/dist/esm/{date-helpers-e4d85a67.js → date-helpers-44507189.js} +7 -3
  333. package/dist/esm/date-helpers-44507189.js.map +1 -0
  334. package/dist/esm/hb-affix.entry.js +1 -1
  335. package/dist/esm/hb-aside.entry.js +1 -1
  336. package/dist/esm/hb-avatar.entry.js +1 -1
  337. package/dist/esm/hb-backtop.entry.js +2 -2
  338. package/dist/esm/hb-badge.entry.js +1 -1
  339. package/dist/esm/hb-breadcrumb-item.entry.js +1 -1
  340. package/dist/esm/hb-breadcrumb.entry.js +1 -1
  341. package/dist/esm/hb-button.entry.js +2 -2
  342. package/dist/esm/hb-calendar.entry.js +78 -10
  343. package/dist/esm/hb-calendar.entry.js.map +1 -1
  344. package/dist/esm/hb-card.entry.js +1 -1
  345. package/dist/esm/hb-cascader.entry.js +270 -146
  346. package/dist/esm/hb-cascader.entry.js.map +1 -1
  347. package/dist/esm/hb-checkbox-group.entry.js +2 -2
  348. package/dist/esm/hb-checkbox.entry.js +3 -3
  349. package/dist/esm/hb-collapse-item.entry.js +1 -1
  350. package/dist/esm/hb-collapse.entry.js +1 -1
  351. package/dist/esm/hb-color-picker-panel.entry.js +2 -2
  352. package/dist/esm/hb-color-picker.entry.js +91 -14
  353. package/dist/esm/hb-color-picker.entry.js.map +1 -1
  354. package/dist/esm/hb-config-provider.entry.js +1 -1
  355. package/dist/esm/hb-container.entry.js +2 -2
  356. package/dist/esm/hb-date-picker-pane.entry.js +2 -2
  357. package/dist/esm/hb-date-picker.entry.js +85 -7
  358. package/dist/esm/hb-date-picker.entry.js.map +1 -1
  359. package/dist/esm/hb-date-range-picker.entry.js +3 -3
  360. package/dist/esm/hb-date-time-picker.entry.js +3 -3
  361. package/dist/esm/hb-descriptions.entry.js +2 -2
  362. package/dist/esm/hb-descriptions.entry.js.map +1 -1
  363. package/dist/esm/hb-divider.entry.js +2 -2
  364. package/dist/esm/hb-drawer.entry.js +1 -1
  365. package/dist/esm/hb-dropdown.entry.js +74 -6
  366. package/dist/esm/hb-dropdown.entry.js.map +1 -1
  367. package/dist/esm/hb-empty.entry.js +1 -1
  368. package/dist/esm/hb-float-button.entry.js +2 -2
  369. package/dist/esm/hb-footer.entry.js +1 -1
  370. package/dist/esm/hb-form-item.entry.js +59 -8
  371. package/dist/esm/hb-form-item.entry.js.map +1 -1
  372. package/dist/esm/hb-form.entry.js +3 -3
  373. package/dist/esm/hb-form.entry.js.map +1 -1
  374. package/dist/esm/hb-header.entry.js +1 -1
  375. package/dist/esm/hb-image-preview.entry.js +12 -8
  376. package/dist/esm/hb-image-preview.entry.js.map +1 -1
  377. package/dist/esm/hb-image.entry.js +1 -1
  378. package/dist/esm/hb-input-number.entry.js +5 -5
  379. package/dist/esm/hb-input-tag.entry.js +2 -2
  380. package/dist/esm/hb-input.entry.js +39 -3
  381. package/dist/esm/hb-input.entry.js.map +1 -1
  382. package/dist/esm/hb-layout.entry.js +36 -14
  383. package/dist/esm/hb-layout.entry.js.map +1 -1
  384. package/dist/esm/hb-link.entry.js +2 -2
  385. package/dist/esm/hb-loading.entry.js +2 -2
  386. package/dist/esm/hb-main.entry.js +1 -1
  387. package/dist/esm/hb-menu-item.entry.js +2 -2
  388. package/dist/esm/hb-menu.entry.js +3 -3
  389. package/dist/esm/hb-menu.entry.js.map +1 -1
  390. package/dist/esm/hb-message.entry.js +2 -2
  391. package/dist/esm/hb-notification.entry.js +2 -2
  392. package/dist/esm/hb-page-header.entry.js +1 -1
  393. package/dist/esm/hb-pagination.entry.js +21 -8
  394. package/dist/esm/hb-pagination.entry.js.map +1 -1
  395. package/dist/esm/hb-popconfirm.entry.js +37 -7
  396. package/dist/esm/hb-popconfirm.entry.js.map +1 -1
  397. package/dist/esm/hb-popover.entry.js +22 -2
  398. package/dist/esm/hb-popover.entry.js.map +1 -1
  399. package/dist/esm/hb-progress.entry.js +1 -1
  400. package/dist/esm/hb-radio.entry.js +2 -2
  401. package/dist/esm/hb-rate.entry.js +45 -3
  402. package/dist/esm/hb-rate.entry.js.map +1 -1
  403. package/dist/esm/hb-result.entry.js +1 -1
  404. package/dist/esm/hb-row.entry.js +2 -2
  405. package/dist/esm/hb-segmented.entry.js +40 -6
  406. package/dist/esm/hb-segmented.entry.js.map +1 -1
  407. package/dist/esm/hb-select.entry.js +47 -8
  408. package/dist/esm/hb-select.entry.js.map +1 -1
  409. package/dist/esm/hb-slider.entry.js +189 -20
  410. package/dist/esm/hb-slider.entry.js.map +1 -1
  411. package/dist/esm/hb-space.entry.js +2 -2
  412. package/dist/esm/hb-statistic.entry.js +1 -1
  413. package/dist/esm/hb-step.entry.js +1 -1
  414. package/dist/esm/hb-steps.entry.js +28 -7
  415. package/dist/esm/hb-steps.entry.js.map +1 -1
  416. package/dist/esm/hb-sub-menu.entry.js +4 -4
  417. package/dist/esm/hb-switch.entry.js +9 -4
  418. package/dist/esm/hb-switch.entry.js.map +1 -1
  419. package/dist/esm/hb-tab-pane.entry.js +1 -1
  420. package/dist/esm/hb-table.entry.js +1 -1
  421. package/dist/esm/hb-table.entry.js.map +1 -1
  422. package/dist/esm/hb-tabs.entry.js +2 -2
  423. package/dist/esm/hb-tag.entry.js +2 -2
  424. package/dist/esm/hb-text.entry.js +2 -2
  425. package/dist/esm/hb-time-picker.entry.js +4 -4
  426. package/dist/esm/hb-time-select.entry.js +2 -2
  427. package/dist/esm/hb-timeline.entry.js +1 -1
  428. package/dist/esm/hb-tooltip.entry.js +18 -1
  429. package/dist/esm/hb-tooltip.entry.js.map +1 -1
  430. package/dist/esm/hb-transfer.entry.js +2 -2
  431. package/dist/esm/hb-tree-select.entry.js +95 -18
  432. package/dist/esm/hb-tree-select.entry.js.map +1 -1
  433. package/dist/esm/hb-tree.entry.js +1 -1
  434. package/dist/esm/hb-upload.entry.js +3 -3
  435. package/dist/esm/hb-watermark.entry.js +1 -1
  436. package/dist/esm/huibo-ui.js +1 -1
  437. package/dist/esm/loader.js +1 -1
  438. package/dist/huibo-ui/huibo-ui.css +1 -1
  439. package/dist/huibo-ui/huibo-ui.esm.js +1 -1
  440. package/dist/huibo-ui/huibo-ui.esm.js.map +1 -1
  441. package/dist/huibo-ui/p-02f15843.entry.js +2 -0
  442. package/dist/huibo-ui/p-08b4005c.js +2 -0
  443. package/dist/huibo-ui/p-08b4005c.js.map +1 -0
  444. package/dist/huibo-ui/{p-fd19813c.entry.js → p-0d4b2997.entry.js} +2 -2
  445. package/dist/huibo-ui/{p-672076c3.entry.js → p-10f6c184.entry.js} +2 -2
  446. package/dist/huibo-ui/p-10f6c184.entry.js.map +1 -0
  447. package/dist/huibo-ui/{p-d7815b4f.entry.js → p-13010da2.entry.js} +2 -2
  448. package/dist/huibo-ui/{p-8c80a765.entry.js → p-15db24e9.entry.js} +2 -2
  449. package/dist/huibo-ui/{p-8d925e3d.entry.js → p-1b0fbe69.entry.js} +2 -2
  450. package/dist/huibo-ui/p-1f8db37a.entry.js +2 -0
  451. package/dist/huibo-ui/p-1f8db37a.entry.js.map +1 -0
  452. package/dist/huibo-ui/{p-f374d5a3.entry.js → p-20632186.entry.js} +2 -2
  453. package/dist/huibo-ui/{p-e6f2d71d.entry.js → p-20fc554b.entry.js} +2 -2
  454. package/dist/huibo-ui/{p-315feadf.entry.js → p-213b9de7.entry.js} +2 -2
  455. package/dist/huibo-ui/p-25fd7d5c.entry.js +2 -0
  456. package/dist/huibo-ui/p-25fd7d5c.entry.js.map +1 -0
  457. package/dist/huibo-ui/p-2811e603.entry.js +2 -0
  458. package/dist/huibo-ui/p-2811e603.entry.js.map +1 -0
  459. package/dist/huibo-ui/{p-64ca0980.entry.js → p-2943f5d0.entry.js} +2 -2
  460. package/dist/huibo-ui/p-2943f5d0.entry.js.map +1 -0
  461. package/dist/huibo-ui/{p-710f38de.entry.js → p-2b4556ff.entry.js} +2 -2
  462. package/dist/huibo-ui/{p-e0ab9010.entry.js → p-33de6878.entry.js} +2 -2
  463. package/dist/huibo-ui/{p-ebd04656.entry.js → p-3807da71.entry.js} +2 -2
  464. package/dist/huibo-ui/{p-6a1ec3ff.entry.js → p-3deff48c.entry.js} +2 -2
  465. package/dist/huibo-ui/{p-e2a8a396.entry.js → p-41d9c846.entry.js} +2 -2
  466. package/dist/huibo-ui/{p-0a033738.entry.js → p-47ef7a86.entry.js} +2 -2
  467. package/dist/huibo-ui/p-4d34e43e.entry.js +2 -0
  468. package/dist/huibo-ui/p-4d34e43e.entry.js.map +1 -0
  469. package/dist/huibo-ui/p-54aa2fd8.entry.js +2 -0
  470. package/dist/huibo-ui/p-54aa2fd8.entry.js.map +1 -0
  471. package/dist/huibo-ui/{p-88127de1.entry.js → p-55cd13eb.entry.js} +2 -2
  472. package/dist/huibo-ui/{p-58ebb9b3.entry.js → p-5c839288.entry.js} +2 -2
  473. package/dist/huibo-ui/{p-c1b4eacb.entry.js → p-60532a1f.entry.js} +2 -2
  474. package/dist/huibo-ui/{p-59b2e61c.entry.js → p-626b48f1.entry.js} +2 -2
  475. package/dist/huibo-ui/p-626b48f1.entry.js.map +1 -0
  476. package/dist/huibo-ui/p-639f167d.entry.js +2 -0
  477. package/dist/huibo-ui/p-639f167d.entry.js.map +1 -0
  478. package/dist/huibo-ui/{p-f1c084c5.entry.js → p-678b4212.entry.js} +2 -2
  479. package/dist/huibo-ui/p-6beb5b81.entry.js +2 -0
  480. package/dist/huibo-ui/p-6beb5b81.entry.js.map +1 -0
  481. package/dist/huibo-ui/{p-a0015341.entry.js → p-6bfeab80.entry.js} +2 -2
  482. package/dist/huibo-ui/p-6c8cf248.entry.js +2 -0
  483. package/dist/huibo-ui/p-6c8cf248.entry.js.map +1 -0
  484. package/dist/huibo-ui/{p-85f68526.entry.js → p-735bceef.entry.js} +2 -2
  485. package/dist/huibo-ui/{p-8b1ae77e.entry.js → p-746a11a3.entry.js} +2 -2
  486. package/dist/huibo-ui/p-76519752.entry.js +2 -0
  487. package/dist/huibo-ui/{p-d3939d44.entry.js → p-79af2efa.entry.js} +2 -2
  488. package/dist/huibo-ui/{p-e0768565.entry.js → p-7da14d7c.entry.js} +2 -2
  489. package/dist/huibo-ui/{p-8c987d57.entry.js → p-7f65dc36.entry.js} +2 -2
  490. package/dist/huibo-ui/{p-0e65e1bd.entry.js → p-86bdc48a.entry.js} +2 -2
  491. package/dist/huibo-ui/p-86bdc48a.entry.js.map +1 -0
  492. package/dist/huibo-ui/{p-d87fc21a.entry.js → p-88a6c905.entry.js} +2 -2
  493. package/dist/huibo-ui/{p-d64b91ef.entry.js → p-89ea1141.entry.js} +2 -2
  494. package/dist/huibo-ui/p-89ea1141.entry.js.map +1 -0
  495. package/dist/huibo-ui/p-8a202bc5.entry.js +2 -0
  496. package/dist/huibo-ui/p-8a202bc5.entry.js.map +1 -0
  497. package/dist/huibo-ui/p-8a8443b8.entry.js +2 -0
  498. package/dist/huibo-ui/p-8a8443b8.entry.js.map +1 -0
  499. package/dist/huibo-ui/p-8fd788c9.entry.js +2 -0
  500. package/dist/huibo-ui/p-8fd788c9.entry.js.map +1 -0
  501. package/dist/huibo-ui/{p-9319c650.entry.js → p-8fdbd17c.entry.js} +2 -2
  502. package/dist/huibo-ui/p-92521c31.entry.js +2 -0
  503. package/dist/huibo-ui/p-92521c31.entry.js.map +1 -0
  504. package/dist/huibo-ui/{p-c3e665f6.entry.js → p-9a5406f0.entry.js} +2 -2
  505. package/dist/huibo-ui/p-9a5406f0.entry.js.map +1 -0
  506. package/dist/huibo-ui/{p-c321c4aa.entry.js → p-a084b8e5.entry.js} +2 -2
  507. package/dist/huibo-ui/{p-5df47135.entry.js → p-a190ca89.entry.js} +2 -2
  508. package/dist/huibo-ui/{p-463de26d.entry.js → p-a8996d22.entry.js} +2 -2
  509. package/dist/huibo-ui/p-aa5e5e02.entry.js +2 -0
  510. package/dist/huibo-ui/p-aa5e5e02.entry.js.map +1 -0
  511. package/dist/huibo-ui/{p-6b381d0e.entry.js → p-ab9cf0e4.entry.js} +2 -2
  512. package/dist/huibo-ui/{p-477d8568.entry.js → p-aeae83af.entry.js} +2 -2
  513. package/dist/huibo-ui/{p-77017274.entry.js → p-af74667d.entry.js} +2 -2
  514. package/dist/huibo-ui/{p-b489a526.entry.js → p-b06c8020.entry.js} +2 -2
  515. package/dist/huibo-ui/{p-2e6584ea.entry.js → p-b468858e.entry.js} +2 -2
  516. package/dist/huibo-ui/{p-2b286698.entry.js → p-b7885d4a.entry.js} +2 -2
  517. package/dist/huibo-ui/{p-231a7335.entry.js → p-b8d87f7e.entry.js} +2 -2
  518. package/dist/huibo-ui/{p-8b027491.entry.js → p-c50ad398.entry.js} +2 -2
  519. package/dist/huibo-ui/p-c6c91664.entry.js +2 -0
  520. package/dist/huibo-ui/{p-c3e8893d.entry.js → p-c80f8ace.entry.js} +2 -2
  521. package/dist/huibo-ui/p-c80f8ace.entry.js.map +1 -0
  522. package/dist/huibo-ui/{p-476527c1.entry.js → p-c8e917db.entry.js} +2 -2
  523. package/dist/huibo-ui/p-c8e917db.entry.js.map +1 -0
  524. package/dist/huibo-ui/{p-c922d672.entry.js → p-cad57c2d.entry.js} +2 -2
  525. package/dist/huibo-ui/{p-a042e3d0.entry.js → p-ccd09d5a.entry.js} +2 -2
  526. package/dist/huibo-ui/p-d79a15b1.entry.js +2 -0
  527. package/dist/huibo-ui/p-d79a15b1.entry.js.map +1 -0
  528. package/dist/huibo-ui/{p-10c088f3.entry.js → p-d9c7c378.entry.js} +2 -2
  529. package/dist/huibo-ui/{p-80aca641.entry.js → p-dfccc7aa.entry.js} +2 -2
  530. package/dist/huibo-ui/{p-21682e92.entry.js → p-dfd144d8.entry.js} +2 -2
  531. package/dist/huibo-ui/{p-be48d2aa.entry.js → p-e039155d.entry.js} +2 -2
  532. package/dist/huibo-ui/{p-dfaf7e37.entry.js → p-e10fcfbe.entry.js} +2 -2
  533. package/dist/huibo-ui/{p-079a4130.entry.js → p-e3155cd7.entry.js} +2 -2
  534. package/dist/huibo-ui/{p-4001c08d.entry.js → p-e5cbfa9e.entry.js} +2 -2
  535. package/dist/huibo-ui/p-e5cbfa9e.entry.js.map +1 -0
  536. package/dist/huibo-ui/p-edbda423.entry.js +2 -0
  537. package/dist/huibo-ui/p-edbda423.entry.js.map +1 -0
  538. package/dist/huibo-ui/{p-465dcb4c.entry.js → p-f2c78699.entry.js} +2 -2
  539. package/dist/huibo-ui/{p-6ac242fe.entry.js → p-f4336be9.entry.js} +2 -2
  540. package/dist/huibo-ui/{p-332c8877.entry.js → p-f5969181.entry.js} +2 -2
  541. package/dist/huibo-ui/{p-f81ec512.entry.js → p-f6889710.entry.js} +2 -2
  542. package/dist/huibo-ui/{p-24ad7eec.entry.js → p-f9bb5217.entry.js} +2 -2
  543. package/dist/huibo-ui/{p-4d8b1404.entry.js → p-fd8301c6.entry.js} +2 -2
  544. package/dist/huibo-ui/{p-dd05cb2c.entry.js → p-fea20295.entry.js} +2 -2
  545. package/dist/types/components/Calendar/Calendar.d.ts +13 -1
  546. package/dist/types/components/Cascader/Cascader.d.ts +68 -90
  547. package/dist/types/components/ColorPicker/ColorPicker.d.ts +11 -0
  548. package/dist/types/components/DatePicker/DatePicker.d.ts +14 -3
  549. package/dist/types/components/Dropdown/Dropdown.d.ts +14 -1
  550. package/dist/types/components/Form/FormItem.d.ts +10 -0
  551. package/dist/types/components/ImagePreview/ImagePreview.d.ts +5 -1
  552. package/dist/types/components/Input/Input.d.ts +9 -0
  553. package/dist/types/components/Layout/Layout.d.ts +20 -10
  554. package/dist/types/components/Pagination/Pagination.d.ts +3 -0
  555. package/dist/types/components/Popconfirm/Popconfirm.d.ts +12 -0
  556. package/dist/types/components/Popover/Popover.d.ts +9 -0
  557. package/dist/types/components/Rate/Rate.d.ts +7 -0
  558. package/dist/types/components/Segmented/Segmented.d.ts +12 -1
  559. package/dist/types/components/Select/Select.d.ts +6 -0
  560. package/dist/types/components/Slider/Slider.d.ts +27 -1
  561. package/dist/types/components/Steps/Steps.d.ts +14 -6
  562. package/dist/types/components/Tooltip/Tooltip.d.ts +9 -1
  563. package/dist/types/components/TreeSelect/TreeSelect.d.ts +9 -0
  564. package/dist/types/components.d.ts +250 -94
  565. package/dist/types/utils/date-helpers.d.ts +1 -1
  566. package/package.json +8 -2
  567. package/readme.md +88 -73
  568. package/dist/cjs/date-helpers-904747ff.js.map +0 -1
  569. package/dist/components/p-cf94cbf6.js.map +0 -1
  570. package/dist/esm/date-helpers-e4d85a67.js.map +0 -1
  571. package/dist/huibo-ui/p-003cee87.entry.js +0 -2
  572. package/dist/huibo-ui/p-003cee87.entry.js.map +0 -1
  573. package/dist/huibo-ui/p-0bef78ac.entry.js +0 -2
  574. package/dist/huibo-ui/p-0bef78ac.entry.js.map +0 -1
  575. package/dist/huibo-ui/p-0e65e1bd.entry.js.map +0 -1
  576. package/dist/huibo-ui/p-0f189251.entry.js +0 -2
  577. package/dist/huibo-ui/p-0f189251.entry.js.map +0 -1
  578. package/dist/huibo-ui/p-1b5acd6d.entry.js +0 -2
  579. package/dist/huibo-ui/p-1b5acd6d.entry.js.map +0 -1
  580. package/dist/huibo-ui/p-3c7f73c8.entry.js +0 -2
  581. package/dist/huibo-ui/p-3c7f73c8.entry.js.map +0 -1
  582. package/dist/huibo-ui/p-4001c08d.entry.js.map +0 -1
  583. package/dist/huibo-ui/p-44c48246.entry.js +0 -2
  584. package/dist/huibo-ui/p-44c48246.entry.js.map +0 -1
  585. package/dist/huibo-ui/p-476527c1.entry.js.map +0 -1
  586. package/dist/huibo-ui/p-4d0dff15.entry.js +0 -2
  587. package/dist/huibo-ui/p-58d20809.entry.js +0 -2
  588. package/dist/huibo-ui/p-58d20809.entry.js.map +0 -1
  589. package/dist/huibo-ui/p-59b2e61c.entry.js.map +0 -1
  590. package/dist/huibo-ui/p-64ca0980.entry.js.map +0 -1
  591. package/dist/huibo-ui/p-672076c3.entry.js.map +0 -1
  592. package/dist/huibo-ui/p-756acbdb.entry.js +0 -2
  593. package/dist/huibo-ui/p-756acbdb.entry.js.map +0 -1
  594. package/dist/huibo-ui/p-75a93de3.entry.js +0 -2
  595. package/dist/huibo-ui/p-75a93de3.entry.js.map +0 -1
  596. package/dist/huibo-ui/p-769960f4.entry.js +0 -2
  597. package/dist/huibo-ui/p-8d615521.entry.js +0 -2
  598. package/dist/huibo-ui/p-8d615521.entry.js.map +0 -1
  599. package/dist/huibo-ui/p-953b9514.entry.js +0 -2
  600. package/dist/huibo-ui/p-ad6b0c6e.entry.js +0 -2
  601. package/dist/huibo-ui/p-ad6b0c6e.entry.js.map +0 -1
  602. package/dist/huibo-ui/p-c1a059d9.entry.js +0 -2
  603. package/dist/huibo-ui/p-c1a059d9.entry.js.map +0 -1
  604. package/dist/huibo-ui/p-c3e665f6.entry.js.map +0 -1
  605. package/dist/huibo-ui/p-c3e8893d.entry.js.map +0 -1
  606. package/dist/huibo-ui/p-cf94cbf6.js +0 -2
  607. package/dist/huibo-ui/p-cf94cbf6.js.map +0 -1
  608. package/dist/huibo-ui/p-d64b91ef.entry.js.map +0 -1
  609. package/dist/huibo-ui/p-e9490259.entry.js +0 -2
  610. package/dist/huibo-ui/p-e9490259.entry.js.map +0 -1
  611. package/dist/huibo-ui/p-ed0ff857.entry.js +0 -2
  612. package/dist/huibo-ui/p-ed0ff857.entry.js.map +0 -1
  613. package/dist/huibo-ui/p-f0ac7db5.entry.js +0 -2
  614. package/dist/huibo-ui/p-f0ac7db5.entry.js.map +0 -1
  615. /package/dist/huibo-ui/{p-4d0dff15.entry.js.map → p-02f15843.entry.js.map} +0 -0
  616. /package/dist/huibo-ui/{p-fd19813c.entry.js.map → p-0d4b2997.entry.js.map} +0 -0
  617. /package/dist/huibo-ui/{p-d7815b4f.entry.js.map → p-13010da2.entry.js.map} +0 -0
  618. /package/dist/huibo-ui/{p-8c80a765.entry.js.map → p-15db24e9.entry.js.map} +0 -0
  619. /package/dist/huibo-ui/{p-8d925e3d.entry.js.map → p-1b0fbe69.entry.js.map} +0 -0
  620. /package/dist/huibo-ui/{p-f374d5a3.entry.js.map → p-20632186.entry.js.map} +0 -0
  621. /package/dist/huibo-ui/{p-e6f2d71d.entry.js.map → p-20fc554b.entry.js.map} +0 -0
  622. /package/dist/huibo-ui/{p-315feadf.entry.js.map → p-213b9de7.entry.js.map} +0 -0
  623. /package/dist/huibo-ui/{p-710f38de.entry.js.map → p-2b4556ff.entry.js.map} +0 -0
  624. /package/dist/huibo-ui/{p-e0ab9010.entry.js.map → p-33de6878.entry.js.map} +0 -0
  625. /package/dist/huibo-ui/{p-ebd04656.entry.js.map → p-3807da71.entry.js.map} +0 -0
  626. /package/dist/huibo-ui/{p-6a1ec3ff.entry.js.map → p-3deff48c.entry.js.map} +0 -0
  627. /package/dist/huibo-ui/{p-e2a8a396.entry.js.map → p-41d9c846.entry.js.map} +0 -0
  628. /package/dist/huibo-ui/{p-0a033738.entry.js.map → p-47ef7a86.entry.js.map} +0 -0
  629. /package/dist/huibo-ui/{p-88127de1.entry.js.map → p-55cd13eb.entry.js.map} +0 -0
  630. /package/dist/huibo-ui/{p-58ebb9b3.entry.js.map → p-5c839288.entry.js.map} +0 -0
  631. /package/dist/huibo-ui/{p-c1b4eacb.entry.js.map → p-60532a1f.entry.js.map} +0 -0
  632. /package/dist/huibo-ui/{p-f1c084c5.entry.js.map → p-678b4212.entry.js.map} +0 -0
  633. /package/dist/huibo-ui/{p-a0015341.entry.js.map → p-6bfeab80.entry.js.map} +0 -0
  634. /package/dist/huibo-ui/{p-85f68526.entry.js.map → p-735bceef.entry.js.map} +0 -0
  635. /package/dist/huibo-ui/{p-8b1ae77e.entry.js.map → p-746a11a3.entry.js.map} +0 -0
  636. /package/dist/huibo-ui/{p-953b9514.entry.js.map → p-76519752.entry.js.map} +0 -0
  637. /package/dist/huibo-ui/{p-d3939d44.entry.js.map → p-79af2efa.entry.js.map} +0 -0
  638. /package/dist/huibo-ui/{p-e0768565.entry.js.map → p-7da14d7c.entry.js.map} +0 -0
  639. /package/dist/huibo-ui/{p-8c987d57.entry.js.map → p-7f65dc36.entry.js.map} +0 -0
  640. /package/dist/huibo-ui/{p-d87fc21a.entry.js.map → p-88a6c905.entry.js.map} +0 -0
  641. /package/dist/huibo-ui/{p-9319c650.entry.js.map → p-8fdbd17c.entry.js.map} +0 -0
  642. /package/dist/huibo-ui/{p-c321c4aa.entry.js.map → p-a084b8e5.entry.js.map} +0 -0
  643. /package/dist/huibo-ui/{p-5df47135.entry.js.map → p-a190ca89.entry.js.map} +0 -0
  644. /package/dist/huibo-ui/{p-463de26d.entry.js.map → p-a8996d22.entry.js.map} +0 -0
  645. /package/dist/huibo-ui/{p-6b381d0e.entry.js.map → p-ab9cf0e4.entry.js.map} +0 -0
  646. /package/dist/huibo-ui/{p-477d8568.entry.js.map → p-aeae83af.entry.js.map} +0 -0
  647. /package/dist/huibo-ui/{p-77017274.entry.js.map → p-af74667d.entry.js.map} +0 -0
  648. /package/dist/huibo-ui/{p-b489a526.entry.js.map → p-b06c8020.entry.js.map} +0 -0
  649. /package/dist/huibo-ui/{p-2e6584ea.entry.js.map → p-b468858e.entry.js.map} +0 -0
  650. /package/dist/huibo-ui/{p-2b286698.entry.js.map → p-b7885d4a.entry.js.map} +0 -0
  651. /package/dist/huibo-ui/{p-231a7335.entry.js.map → p-b8d87f7e.entry.js.map} +0 -0
  652. /package/dist/huibo-ui/{p-8b027491.entry.js.map → p-c50ad398.entry.js.map} +0 -0
  653. /package/dist/huibo-ui/{p-769960f4.entry.js.map → p-c6c91664.entry.js.map} +0 -0
  654. /package/dist/huibo-ui/{p-c922d672.entry.js.map → p-cad57c2d.entry.js.map} +0 -0
  655. /package/dist/huibo-ui/{p-a042e3d0.entry.js.map → p-ccd09d5a.entry.js.map} +0 -0
  656. /package/dist/huibo-ui/{p-10c088f3.entry.js.map → p-d9c7c378.entry.js.map} +0 -0
  657. /package/dist/huibo-ui/{p-80aca641.entry.js.map → p-dfccc7aa.entry.js.map} +0 -0
  658. /package/dist/huibo-ui/{p-21682e92.entry.js.map → p-dfd144d8.entry.js.map} +0 -0
  659. /package/dist/huibo-ui/{p-be48d2aa.entry.js.map → p-e039155d.entry.js.map} +0 -0
  660. /package/dist/huibo-ui/{p-dfaf7e37.entry.js.map → p-e10fcfbe.entry.js.map} +0 -0
  661. /package/dist/huibo-ui/{p-079a4130.entry.js.map → p-e3155cd7.entry.js.map} +0 -0
  662. /package/dist/huibo-ui/{p-465dcb4c.entry.js.map → p-f2c78699.entry.js.map} +0 -0
  663. /package/dist/huibo-ui/{p-6ac242fe.entry.js.map → p-f4336be9.entry.js.map} +0 -0
  664. /package/dist/huibo-ui/{p-332c8877.entry.js.map → p-f5969181.entry.js.map} +0 -0
  665. /package/dist/huibo-ui/{p-f81ec512.entry.js.map → p-f6889710.entry.js.map} +0 -0
  666. /package/dist/huibo-ui/{p-24ad7eec.entry.js.map → p-f9bb5217.entry.js.map} +0 -0
  667. /package/dist/huibo-ui/{p-4d8b1404.entry.js.map → p-fd8301c6.entry.js.map} +0 -0
  668. /package/dist/huibo-ui/{p-dd05cb2c.entry.js.map → p-fea20295.entry.js.map} +0 -0
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5aa5c817.js');
6
6
 
7
- const sliderCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-slider-main-bg-color:var(--hb-color-primary);--hb-slider-runway-bg-color:var(--hb-fill-color-light,#e4e7ed);--hb-slider-stop-bg-color:var(--hb-color-white,#fff);--hb-slider-button-size:20px;display:inline-block}.hb-slider{align-items:center;display:flex;height:40px;position:relative;width:100%}.hb-slider--vertical{flex-direction:column;height:100%;width:40px}.hb-slider__runway{background-color:var(--hb-slider-runway-bg-color);border-radius:3px;cursor:pointer;height:6px;margin:16px 0;position:relative;vertical-align:middle;width:100%}.hb-slider--vertical .hb-slider__runway{height:100%;margin:0 16px;width:6px}.hb-slider__bar{background-color:var(--hb-slider-main-bg-color);border-bottom-left-radius:3px;border-top-left-radius:3px;height:6px;left:0;position:absolute;top:0}.hb-slider--vertical .hb-slider__bar{border-bottom-left-radius:0;border-top-left-radius:3px;border-top-right-radius:3px;bottom:0;height:auto;top:auto;width:6px}.hb-slider__button-wrapper{background-color:#0000;margin-left:calc(var(--hb-slider-button-size)/-2);outline:none;position:absolute;text-align:center;top:50%;transform:translateY(-50%);-webkit-user-select:none;user-select:none;z-index:1001}.hb-slider--vertical .hb-slider__button-wrapper{bottom:0;left:50%;margin-bottom:calc(var(--hb-slider-button-size)/-2);margin-left:0;top:auto;transform:translate(-50%)}.hb-slider__button{background-color:var(--hb-color-white,#fff);border:2px solid var(--hb-slider-main-bg-color);border-radius:50%;cursor:grab;height:var(--hb-slider-button-size);transition:all .2s;-webkit-user-select:none;user-select:none;width:var(--hb-slider-button-size)}.hb-slider__button:active{cursor:grabbing}.hb-slider__button-wrapper--hover .hb-slider__button,.hb-slider__button-wrapper:hover .hb-slider__button{transform:scale(1.2)}.hb-slider__tooltip{background-color:#000000bf;border-radius:4px;bottom:calc(100% + 12px);color:var(--hb-color-white,#fff);font-size:12px;padding:6px 8px;white-space:nowrap}.hb-slider__tooltip,.hb-slider__tooltip:after{left:50%;position:absolute;transform:translate(-50%)}.hb-slider__tooltip:after{border:4px solid #0000;border-top-color:#000000bf;content:\"\";top:100%}.hb-slider--disabled{cursor:not-allowed}.hb-slider--disabled .hb-slider__runway{background-color:var(--hb-fill-color-light,#e4e7ed);cursor:not-allowed}.hb-slider--disabled .hb-slider__bar{background-color:var(--hb-color-text-disabled,#c0c4cc)}.hb-slider--disabled .hb-slider__button{border-color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
7
+ const sliderCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-slider-main-bg-color:var(--hb-color-primary);--hb-slider-runway-bg-color:var(--hb-fill-color-light,#e4e7ed);--hb-slider-stop-bg-color:var(--hb-color-white,#fff);--hb-slider-button-size:20px;display:inline-block}.hb-slider{align-items:center;display:flex;height:40px;position:relative;width:100%}.hb-slider--vertical{flex-direction:column;height:100%;width:40px}.hb-slider__runway{background-color:var(--hb-slider-runway-bg-color);border-radius:3px;cursor:pointer;height:6px;margin:16px 0;position:relative;vertical-align:middle;width:100%}.hb-slider--vertical .hb-slider__runway{height:100%;margin:0 16px;width:6px}.hb-slider__bar{background-color:var(--hb-slider-main-bg-color);border-bottom-left-radius:3px;border-top-left-radius:3px;height:6px;position:absolute;top:0}.hb-slider--vertical .hb-slider__bar{border-bottom-left-radius:0;border-top-left-radius:3px;border-top-right-radius:3px;bottom:0;height:auto;top:auto;width:6px}.hb-slider__button-wrapper{align-items:center;background-color:#0000;cursor:pointer;display:inline-flex;justify-content:center;outline:none;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);-webkit-user-select:none;user-select:none;z-index:1001}.hb-slider--vertical .hb-slider__button-wrapper{left:50%;top:auto;transform:translate(-50%,50%)}.hb-slider__button{background-color:var(--hb-color-white,#fff);border:2px solid var(--hb-slider-main-bg-color);border-radius:50%;cursor:grab;height:var(--hb-slider-button-size);transition:all .2s;-webkit-user-select:none;user-select:none;width:var(--hb-slider-button-size)}.hb-slider__button:active{cursor:grabbing}.hb-slider__button-wrapper--hover .hb-slider__button,.hb-slider__button-wrapper:hover .hb-slider__button{transform:scale(1.2)}.hb-slider__tooltip{background-color:#000000bf;border-radius:4px;bottom:calc(100% + 12px);color:var(--hb-color-white,#fff);font-size:12px;padding:6px 8px;white-space:nowrap}.hb-slider__tooltip,.hb-slider__tooltip:after{left:50%;position:absolute;transform:translate(-50%)}.hb-slider__tooltip:after{border:4px solid #0000;border-top-color:#000000bf;content:\"\";top:100%}.hb-slider--disabled{cursor:not-allowed}.hb-slider--disabled .hb-slider__runway{background-color:var(--hb-fill-color-light,#e4e7ed);cursor:not-allowed}.hb-slider--disabled .hb-slider__bar{background-color:var(--hb-color-text-disabled,#c0c4cc)}.hb-slider--disabled .hb-slider__button{border-color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}.hb-slider__mark{background-color:var(--hb-color-border,#dcdfe6);height:6px;pointer-events:none;top:0;width:2px}.hb-slider__mark,.hb-slider__mark-label{position:absolute;transform:translate(-50%)}.hb-slider__mark-label{color:var(--hb-color-text-secondary,#606266);font-size:var(--hb-font-size-xs,12px);left:50%;margin-top:var(--hb-spacing-xs,4px);top:100%;white-space:nowrap}.hb-slider--with-marks{padding-bottom:var(--hb-spacing-lg,16px)}.hb-slider--vertical .hb-slider__mark{height:2px;left:50%;top:auto;transform:translate(-50%,-50%);width:6px}.hb-slider--vertical .hb-slider__mark-label{left:100%;margin-left:var(--hb-spacing-xs,4px);margin-top:0;top:50%;transform:translateY(-50%)}.hb-slider__button-wrapper:focus{outline:none}.hb-slider__button-wrapper:focus-visible .hb-slider__button{box-shadow:0 0 0 4px var(--hb-color-primary-bg,#1677ff1f)}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
8
8
  const HbSliderStyle0 = sliderCss;
9
9
 
10
10
  const Slider = class {
@@ -61,12 +61,20 @@ const Slider = class {
61
61
  * 高度,竖向模式时必填
62
62
  */
63
63
  height;
64
+ /**
65
+ * 刻度标记(对齐 antd marks)
66
+ */
67
+ marks;
64
68
  dragging = false;
65
69
  currentValue = 0;
66
70
  tooltipVisible = false;
67
71
  tooltipValue = 0;
72
+ /** range 模式下当前拖动的是哪个手柄(0/1),用于 tooltip 定位与渲染 */
73
+ activeHandle = 0;
68
74
  sliderRef;
69
75
  isDragging = false;
76
+ /** 拖动期间锁定的手柄索引(鼠标按下时确定) */
77
+ dragHandle = null;
70
78
  /**
71
79
  * 值改变事件
72
80
  */
@@ -76,12 +84,28 @@ const Slider = class {
76
84
  */
77
85
  hbInput;
78
86
  componentDidLoad() {
79
- this.currentValue = this.modelValue;
87
+ this.currentValue = this.normalizeInitial(this.modelValue);
80
88
  this.addEventListeners();
81
89
  }
82
90
  disconnectedCallback() {
83
91
  this.removeEventListeners();
84
92
  }
93
+ /** 外部更新 modelValue 时同步内部 currentValue(对齐 antd 受控语义) */
94
+ handleModelChange() {
95
+ if (!this.isDragging) {
96
+ this.currentValue = this.normalizeInitial(this.modelValue);
97
+ }
98
+ }
99
+ /** range 模式下确保 currentValue 为 [min, max] 形状的有序数组 */
100
+ normalizeInitial(v) {
101
+ if (this.range) {
102
+ if (Array.isArray(v) && v.length === 2) {
103
+ return v[0] <= v[1] ? [v[0], v[1]] : [v[1], v[0]];
104
+ }
105
+ return [this.min, this.max];
106
+ }
107
+ return typeof v === 'number' ? v : (Array.isArray(v) ? v[0] ?? this.min : this.min);
108
+ }
85
109
  addEventListeners() {
86
110
  document.addEventListener('mousemove', this.handleMouseMove);
87
111
  document.addEventListener('mouseup', this.handleMouseUp);
@@ -91,18 +115,31 @@ const Slider = class {
91
115
  document.removeEventListener('mouseup', this.handleMouseUp);
92
116
  }
93
117
  getPercentage(value) {
118
+ if (this.max === this.min)
119
+ return 0;
94
120
  return ((value - this.min) / (this.max - this.min)) * 100;
95
121
  }
96
122
  getValueFromPercentage(percentage) {
97
123
  const value = this.min + (percentage / 100) * (this.max - this.min);
98
- return Math.round(value / this.step) * this.step;
124
+ const snapped = Math.round(value / this.step) * this.step;
125
+ return Math.max(this.min, Math.min(this.max, snapped));
126
+ }
127
+ /** 鼠标按下时根据落点决定拖哪个手柄(range:更近的那个) */
128
+ resolveHandle(percentage) {
129
+ if (!this.range)
130
+ return 0;
131
+ const vals = this.currentValue;
132
+ const leftPct = this.getPercentage(vals[0]);
133
+ const rightPct = this.getPercentage(vals[1]);
134
+ return Math.abs(percentage - leftPct) <= Math.abs(percentage - rightPct) ? 0 : 1;
99
135
  }
100
- handleMouseDown = (e) => {
136
+ handleMouseDown = (e, handle = null) => {
101
137
  if (this.disabled)
102
138
  return;
103
139
  e.preventDefault();
104
140
  this.isDragging = true;
105
141
  this.dragging = true;
142
+ this.dragHandle = handle;
106
143
  this.handleDrag(e);
107
144
  };
108
145
  handleMouseMove = (e) => {
@@ -116,6 +153,7 @@ const Slider = class {
116
153
  this.isDragging = false;
117
154
  this.dragging = false;
118
155
  this.tooltipVisible = false;
156
+ this.dragHandle = null;
119
157
  this.hbChange.emit(this.currentValue);
120
158
  };
121
159
  handleDrag(e) {
@@ -128,11 +166,23 @@ const Slider = class {
128
166
  const clampedPercentage = Math.max(0, Math.min(100, percentage * 100));
129
167
  const value = this.getValueFromPercentage(clampedPercentage);
130
168
  if (this.range) {
131
- const values = this.currentValue;
132
- // 简化处理:更新第一个值
133
- this.currentValue = [value, values[1] || this.max];
169
+ const vals = this.currentValue;
170
+ // 优先用 mousedown 时锁定的手柄;未锁定(点击 runway)则按落点就近
171
+ const handle = this.dragHandle !== null ? this.dragHandle : this.resolveHandle(clampedPercentage);
172
+ this.activeHandle = handle;
173
+ let [lo, hi] = [vals[0], vals[1]];
174
+ if (handle === 0) {
175
+ lo = Math.min(value, hi);
176
+ }
177
+ else {
178
+ hi = Math.max(value, lo);
179
+ }
180
+ this.currentValue = [lo, hi];
181
+ this.tooltipValue = handle === 0 ? lo : hi;
182
+ this.tooltipVisible = true;
134
183
  }
135
184
  else {
185
+ this.activeHandle = 0;
136
186
  this.currentValue = value;
137
187
  this.tooltipValue = value;
138
188
  this.tooltipVisible = true;
@@ -140,30 +190,149 @@ const Slider = class {
140
190
  this.modelValue = this.currentValue;
141
191
  this.hbInput.emit(this.currentValue);
142
192
  }
193
+ /** 键盘可访问:方向键调整当前手柄,对齐 WAI-ARIA slider pattern */
194
+ handleKeyDown = (e) => {
195
+ if (this.disabled)
196
+ return;
197
+ const { key } = e;
198
+ const isDecrease = key === 'ArrowLeft' || key === 'ArrowDown';
199
+ const isIncrease = key === 'ArrowRight' || key === 'ArrowUp';
200
+ const isBigDecrease = key === 'PageDown' || key === 'Home';
201
+ const isBigIncrease = key === 'PageUp' || key === 'End';
202
+ if (!isDecrease && !isIncrease && !isBigDecrease && !isBigIncrease)
203
+ return;
204
+ e.preventDefault();
205
+ const delta = isBigDecrease ? -this.max :
206
+ isBigIncrease ? this.max :
207
+ (isDecrease ? -1 : 1) * this.step;
208
+ if (this.range) {
209
+ const vals = this.currentValue;
210
+ let [lo, hi] = [vals[0], vals[1]];
211
+ if (this.activeHandle === 0) {
212
+ lo = Math.max(this.min, Math.min(lo + delta, hi));
213
+ }
214
+ else {
215
+ hi = Math.min(this.max, Math.max(hi + delta, lo));
216
+ }
217
+ this.currentValue = [lo, hi];
218
+ this.tooltipValue = this.activeHandle === 0 ? lo : hi;
219
+ this.tooltipVisible = true;
220
+ }
221
+ else {
222
+ const next = Math.max(this.min, Math.min(this.currentValue + delta, this.max));
223
+ this.currentValue = next;
224
+ this.tooltipValue = next;
225
+ this.tooltipVisible = true;
226
+ }
227
+ this.modelValue = this.currentValue;
228
+ this.hbChange.emit(this.currentValue);
229
+ this.hbInput.emit(this.currentValue);
230
+ };
143
231
  formatValue(value) {
144
232
  if (this.formatTooltip) {
145
233
  return this.formatTooltip(value);
146
234
  }
147
235
  return String(value);
148
236
  }
237
+ /** 规范化 marks 为 [{value,label}] 数组 */
238
+ get markList() {
239
+ if (!this.marks)
240
+ return [];
241
+ if (Array.isArray(this.marks))
242
+ return this.marks;
243
+ return Object.entries(this.marks).map(([k, v]) => ({ value: Number(k), label: v }));
244
+ }
149
245
  render() {
150
- const percentage = this.range
151
- ? this.getPercentage(this.currentValue[0])
152
- : this.getPercentage(this.currentValue);
153
- return (index.h("div", { key: 'b8ee15c3375f6786c252e6755ff6dd5d4ab0023f', class: {
246
+ const range = this.range;
247
+ const singlePct = this.getPercentage(this.currentValue);
248
+ const rangeVals = range ? this.currentValue : [0, 0];
249
+ const leftPct = range ? this.getPercentage(rangeVals[0]) : 0;
250
+ const rightPct = range ? this.getPercentage(rangeVals[1]) : singlePct;
251
+ // bar:单滑块从 min 到 value;range 从 lo 到 hi
252
+ const barStart = range ? leftPct : 0;
253
+ const barSize = range ? rightPct - leftPct : singlePct;
254
+ const posProp = this.vertical ? 'bottom' : 'left';
255
+ const sizeProp = this.vertical ? 'height' : 'width';
256
+ const renderHandle = (handle, pct) => {
257
+ const tooltipVal = range ? rangeVals[handle] : this.currentValue;
258
+ const isActive = this.tooltipVisible && (range ? this.activeHandle === handle : true);
259
+ return (index.h("div", { class: {
260
+ 'hb-slider__button-wrapper': true,
261
+ 'hb-slider__button-wrapper--hover': isActive,
262
+ }, style: { [posProp]: `${pct}%` }, onMouseDown: (e) => this.handleMouseDown(e, handle), onTouchStart: (e) => this.handleTouchStart(e, handle), role: "slider", tabindex: this.disabled ? -1 : 0, "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": tooltipVal, "aria-valuetext": this.formatValue(tooltipVal), "aria-orientation": this.vertical ? 'vertical' : 'horizontal', "aria-disabled": this.disabled ? 'true' : 'false', onKeyDown: this.handleKeyDown }, this.showTooltip && isActive && (index.h("div", { class: "hb-slider__tooltip" }, this.formatValue(this.tooltipValue))), index.h("div", { class: "hb-slider__button" })));
263
+ };
264
+ return (index.h("div", { class: {
154
265
  'hb-slider': true,
155
266
  'hb-slider--vertical': this.vertical,
156
267
  'hb-slider--disabled': this.disabled,
157
- }, style: this.vertical && this.height ? { height: this.height } : undefined }, index.h("div", { key: 'c75f1194e3a8a630d4ffa0cb82579fddc42e2461', class: "hb-slider__runway", ref: (el) => (this.sliderRef = el), onMouseDown: this.handleMouseDown }, index.h("div", { key: '5dcf4d4807e85cd4a96fd919d4b9d999f0d837d7', class: "hb-slider__bar", style: {
158
- [this.vertical ? 'height' : 'width']: `${percentage}%`,
159
- [this.vertical ? 'bottom' : 'left']: '0',
160
- } }), index.h("div", { key: 'e10dc431c839183de585debfd9991a2d75922cc9', class: {
161
- 'hb-slider__button-wrapper': true,
162
- 'hb-slider__button-wrapper--hover': this.tooltipVisible,
163
- }, style: {
164
- [this.vertical ? 'bottom' : 'left']: `${percentage}%`,
165
- } }, this.showTooltip && this.tooltipVisible && (index.h("div", { key: '270c0d8dd46b03fac7b4b8e62265a14158de18b7', class: "hb-slider__tooltip" }, this.formatValue(this.tooltipValue))), index.h("div", { key: '20772f2a08bed8c009c119b1c148ff0448c9a288', class: "hb-slider__button" })))));
268
+ 'hb-slider--with-marks': this.markList.length > 0,
269
+ }, style: this.vertical && this.height ? { height: this.height } : undefined }, index.h("div", { class: "hb-slider__runway", ref: (el) => (this.sliderRef = el), onMouseDown: (e) => this.handleMouseDown(e, null), onTouchStart: (e) => this.handleTouchStart(e, null) }, index.h("div", { class: "hb-slider__bar", style: {
270
+ [sizeProp]: `${Math.max(0, barSize)}%`,
271
+ [posProp]: `${barStart}%`,
272
+ } }), this.markList.map(m => {
273
+ const pct = this.getPercentage(m.value);
274
+ return (index.h("div", { class: "hb-slider__mark", style: { [posProp]: `${pct}%` }, "aria-hidden": "true" }, m.label && index.h("span", { class: "hb-slider__mark-label" }, m.label)));
275
+ }), range ? renderHandle(0, leftPct) : null, renderHandle(range ? 1 : 0, range ? rightPct : singlePct))));
276
+ }
277
+ /** 触屏支持:把 touch 事件映射到 mouse 同等逻辑(移动端可用) */
278
+ handleTouchStart = (e, handle) => {
279
+ if (this.disabled)
280
+ return;
281
+ e.preventDefault();
282
+ const touch = e.touches[0];
283
+ this.isDragging = true;
284
+ this.dragging = true;
285
+ this.dragHandle = handle;
286
+ this.dragFromTouch(touch.clientX, touch.clientY);
287
+ const move = (ev) => {
288
+ const t = ev.touches[0];
289
+ this.dragFromTouch(t.clientX, t.clientY);
290
+ };
291
+ const end = () => {
292
+ this.isDragging = false;
293
+ this.dragging = false;
294
+ this.tooltipVisible = false;
295
+ this.dragHandle = null;
296
+ this.hbChange.emit(this.currentValue);
297
+ document.removeEventListener('touchmove', move);
298
+ document.removeEventListener('touchend', end);
299
+ };
300
+ document.addEventListener('touchmove', move, { passive: false });
301
+ document.addEventListener('touchend', end);
302
+ };
303
+ dragFromTouch(clientX, clientY) {
304
+ if (!this.sliderRef)
305
+ return;
306
+ const rect = this.sliderRef.getBoundingClientRect();
307
+ const percentage = this.vertical
308
+ ? 1 - (clientY - rect.top) / rect.height
309
+ : (clientX - rect.left) / rect.width;
310
+ const clamped = Math.max(0, Math.min(100, percentage * 100));
311
+ const value = this.getValueFromPercentage(clamped);
312
+ if (this.range) {
313
+ const vals = this.currentValue;
314
+ const handle = this.dragHandle !== null ? this.dragHandle : this.resolveHandle(clamped);
315
+ this.activeHandle = handle;
316
+ let [lo, hi] = [vals[0], vals[1]];
317
+ if (handle === 0)
318
+ lo = Math.min(value, hi);
319
+ else
320
+ hi = Math.max(value, lo);
321
+ this.currentValue = [lo, hi];
322
+ this.tooltipValue = handle === 0 ? lo : hi;
323
+ this.tooltipVisible = true;
324
+ }
325
+ else {
326
+ this.currentValue = value;
327
+ this.tooltipValue = value;
328
+ this.tooltipVisible = true;
329
+ }
330
+ this.modelValue = this.currentValue;
331
+ this.hbInput.emit(this.currentValue);
166
332
  }
333
+ static get watchers() { return {
334
+ "modelValue": ["handleModelChange"]
335
+ }; }
167
336
  };
168
337
  Slider.style = HbSliderStyle0;
169
338
 
@@ -1 +1 @@
1
- {"file":"hb-slider.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,SAAS,GAAG,okQAAokQ,CAAC;AACvlQ,uBAAe,SAAS;;MCUX,MAAM;;;;;;;;;;IAMQ,UAAU,GAAsB,CAAC,CAAC;;;;;IAMnD,GAAG,GAAW,CAAC,CAAC;;;;;IAMhB,GAAG,GAAW,GAAG,CAAC;;;;;IAMlB,IAAI,GAAW,CAAC,CAAC;;;;;IAMjB,WAAW,GAAY,IAAI,CAAC;;;;IAK5B,aAAa,CAA6B;;;;;IAM1C,QAAQ,GAAY,KAAK,CAAC;;;;;IAM1B,KAAK,GAAY,KAAK,CAAC;;;;;IAMvB,QAAQ,GAAY,KAAK,CAAC;;;;IAK1B,MAAM,CAAU;IAEf,QAAQ,GAAY,KAAK,CAAC;IAC1B,YAAY,GAAsB,CAAC,CAAC;IACpC,cAAc,GAAY,KAAK,CAAC;IAChC,YAAY,GAAW,CAAC,CAAC;IAE1B,SAAS,CAAkB;IAC3B,UAAU,GAAY,KAAK,CAAC;;;;IAK3B,QAAQ,CAAkC;;;;IAK1C,OAAO,CAAkC;IAElD,gBAAgB;QACd,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAED,oBAAoB;QAClB,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC7B;IAEO,iBAAiB;QACvB,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,C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WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAChC,CACP,EACDA,kEAAK,KAAK,EAAC,mBAAmB,GAAO,CACjC,CACF,CACF,EACN;KACH;;;;;;","names":["h"],"sources":["src/components/Slider/slider.css?tag=hb-slider&encapsulation=shadow","src/components/Slider/Slider.tsx"],"sourcesContent":[":host {\n display: inline-block;\n --hb-slider-main-bg-color: var(--hb-color-primary);\n --hb-slider-runway-bg-color: var(--hb-fill-color-light, #e4e7ed);\n --hb-slider-stop-bg-color: var(--hb-color-white, #ffffff);\n --hb-slider-button-size: 20px;\n}\n\n.hb-slider {\n width: 100%;\n height: 40px;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.hb-slider--vertical {\n width: 40px;\n height: 100%;\n flex-direction: column;\n}\n\n.hb-slider__runway {\n width: 100%;\n height: 6px;\n margin: 16px 0;\n background-color: var(--hb-slider-runway-bg-color);\n border-radius: 3px;\n position: relative;\n cursor: pointer;\n vertical-align: middle;\n}\n\n.hb-slider--vertical .hb-slider__runway {\n width: 6px;\n height: 100%;\n margin: 0 16px;\n}\n\n.hb-slider__bar {\n height: 6px;\n background-color: var(--hb-slider-main-bg-color);\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.hb-slider--vertical .hb-slider__bar {\n width: 6px;\n height: auto;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n border-bottom-left-radius: 0;\n bottom: 0;\n top: auto;\n}\n\n.hb-slider__button-wrapper {\n position: absolute;\n z-index: 1001;\n top: 50%;\n transform: translateY(-50%);\n background-color: transparent;\n text-align: center;\n user-select: none;\n outline: none;\n margin-left: calc(var(--hb-slider-button-size) / -2);\n}\n\n.hb-slider--vertical .hb-slider__button-wrapper {\n left: 50%;\n top: auto;\n bottom: 0;\n transform: translateX(-50%);\n margin-left: 0;\n margin-bottom: calc(var(--hb-slider-button-size) / -2);\n}\n\n.hb-slider__button {\n width: var(--hb-slider-button-size);\n height: var(--hb-slider-button-size);\n background-color: var(--hb-color-white, #ffffff);\n border: 2px solid var(--hb-slider-main-bg-color);\n border-radius: 50%;\n transition: 0.2s;\n user-select: none;\n cursor: grab;\n}\n\n.hb-slider__button:active {\n cursor: grabbing;\n}\n\n.hb-slider__button-wrapper:hover .hb-slider__button,\n.hb-slider__button-wrapper--hover .hb-slider__button {\n transform: scale(1.2);\n}\n\n.hb-slider__tooltip {\n position: absolute;\n bottom: calc(100% + 12px);\n left: 50%;\n transform: translateX(-50%);\n padding: 6px 8px;\n background-color: rgba(0, 0, 0, 0.75);\n color: var(--hb-color-white, #ffffff);\n border-radius: 4px;\n font-size: 12px;\n white-space: nowrap;\n}\n\n.hb-slider__tooltip::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n border: 4px solid transparent;\n border-top-color: rgba(0, 0, 0, 0.75);\n}\n\n.hb-slider--disabled {\n cursor: not-allowed;\n}\n\n.hb-slider--disabled .hb-slider__runway {\n cursor: not-allowed;\n background-color: var(--hb-fill-color-light, #e4e7ed);\n}\n\n.hb-slider--disabled .hb-slider__bar {\n background-color: var(--hb-color-text-disabled, #c0c4cc);\n}\n\n.hb-slider--disabled .hb-slider__button {\n border-color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n\n","import { Component, h, Prop, Event, EventEmitter, State, Element } from '@stencil/core';\n\n/**\n * Slider 滑块组件\n * 通过拖动滑块在一个固定区间内进行选择\n */\n@Component({\n tag: 'hb-slider',\n styleUrl: 'slider.css',\n shadow: true,\n})\nexport class Slider {\n @Element() el: HTMLElement;\n\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue: number | number[] = 0;\n\n /**\n * 最小值\n * @default 0\n */\n @Prop() min: number = 0;\n\n /**\n * 最大值\n * @default 100\n */\n @Prop() max: number = 100;\n\n /**\n * 步长\n * @default 1\n */\n @Prop() step: number = 1;\n\n /**\n * 是否显示工具提示\n * @default true\n */\n @Prop() showTooltip: boolean = true;\n\n /**\n * 格式化 tooltip message\n */\n @Prop() formatTooltip?: (value: number) => string;\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否为范围选择\n * @default false\n */\n @Prop() range: boolean = false;\n\n /**\n * 是否竖向模式\n * @default false\n */\n @Prop() vertical: boolean = false;\n\n /**\n * 高度,竖向模式时必填\n */\n @Prop() height?: string;\n\n @State() dragging: boolean = false;\n @State() currentValue: number | number[] = 0;\n @State() tooltipVisible: boolean = false;\n @State() tooltipValue: number = 0;\n\n private sliderRef?: HTMLDivElement;\n private isDragging: boolean = false;\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<number | number[]>;\n\n /**\n * 值改变事件(拖拽时实时触发)\n */\n @Event() hbInput: EventEmitter<number | number[]>;\n\n componentDidLoad() {\n this.currentValue = this.modelValue;\n this.addEventListeners();\n }\n\n disconnectedCallback() {\n this.removeEventListeners();\n }\n\n private addEventListeners() {\n document.addEventListener('mousemove', this.handleMouseMove);\n document.addEventListener('mouseup', this.handleMouseUp);\n }\n\n private removeEventListeners() {\n document.removeEventListener('mousemove', this.handleMouseMove);\n document.removeEventListener('mouseup', this.handleMouseUp);\n }\n\n private getPercentage(value: number): number {\n return ((value - this.min) / (this.max - this.min)) * 100;\n }\n\n private getValueFromPercentage(percentage: number): number {\n const value = this.min + (percentage / 100) * (this.max - this.min);\n return Math.round(value / this.step) * this.step;\n }\n\n private handleMouseDown = (e: MouseEvent) => {\n if (this.disabled) return;\n e.preventDefault();\n this.isDragging = true;\n this.dragging = true;\n this.handleDrag(e);\n };\n\n private handleMouseMove = (e: MouseEvent) => {\n if (!this.isDragging) return;\n this.handleDrag(e);\n };\n\n private handleMouseUp = () => {\n if (!this.isDragging) return;\n this.isDragging = false;\n this.dragging = false;\n this.tooltipVisible = false;\n this.hbChange.emit(this.currentValue);\n };\n\n private handleDrag(e: MouseEvent) {\n if (!this.sliderRef) return;\n\n const rect = this.sliderRef.getBoundingClientRect();\n const percentage = this.vertical\n ? 1 - (e.clientY - rect.top) / rect.height\n : (e.clientX - rect.left) / rect.width;\n \n const clampedPercentage = Math.max(0, Math.min(100, percentage * 100));\n const value = this.getValueFromPercentage(clampedPercentage);\n\n if (this.range) {\n const values = this.currentValue as number[];\n // 简化处理:更新第一个值\n this.currentValue = [value, values[1] || this.max];\n } else {\n this.currentValue = value;\n this.tooltipValue = value;\n this.tooltipVisible = true;\n }\n\n this.modelValue = this.currentValue;\n this.hbInput.emit(this.currentValue);\n }\n\n private formatValue(value: number): string {\n if (this.formatTooltip) {\n return this.formatTooltip(value);\n }\n return String(value);\n }\n\n render() {\n const percentage = this.range\n ? this.getPercentage((this.currentValue as number[])[0])\n : this.getPercentage(this.currentValue as number);\n\n return (\n <div\n class={{\n 'hb-slider': true,\n 'hb-slider--vertical': this.vertical,\n 'hb-slider--disabled': this.disabled,\n }}\n style={this.vertical && this.height ? { height: this.height } : undefined}\n >\n <div\n class=\"hb-slider__runway\"\n ref={(el) => (this.sliderRef = el)}\n onMouseDown={this.handleMouseDown}\n >\n <div\n class=\"hb-slider__bar\"\n style={{\n [this.vertical ? 'height' : 'width']: `${percentage}%`,\n [this.vertical ? 'bottom' : 'left']: '0',\n }}\n ></div>\n <div\n class={{\n 'hb-slider__button-wrapper': true,\n 'hb-slider__button-wrapper--hover': this.tooltipVisible,\n }}\n style={{\n [this.vertical ? 'bottom' : 'left']: `${percentage}%`,\n }}\n >\n {this.showTooltip && this.tooltipVisible && (\n <div class=\"hb-slider__tooltip\">\n {this.formatValue(this.tooltipValue)}\n </div>\n )}\n <div class=\"hb-slider__button\"></div>\n </div>\n </div>\n </div>\n );\n }\n}\n\n"],"version":3}
1
+ {"file":"hb-slider.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,SAAS,GAAG,u2RAAu2R,CAAC;AAC13R,uBAAe,SAAS;;MCgBX,MAAM;;;;;;;;;;IAMQ,UAAU,GAAsB,CAAC,CAAC;;;;;IAMnD,GAAG,GAAW,CAAC,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E,CAAC,CAAC;YAC9B,IAAI,CAAC,YAAY,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YAC7B,IAAI,CAAC,YAAY,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;YAC3C,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;SAC5B;aAAM;YACL,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;YAC1B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;YAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;SAC5B;QACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC;QACpC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KACtC;;;;;;;;;","names":["h"],"sources":["src/components/Slider/slider.css?tag=hb-slider&encapsulation=shadow","src/components/Slider/Slider.tsx"],"sourcesContent":[":host {\n display: inline-block;\n --hb-slider-main-bg-color: var(--hb-color-primary);\n --hb-slider-runway-bg-color: var(--hb-fill-color-light, #e4e7ed);\n --hb-slider-stop-bg-color: var(--hb-color-white, #ffffff);\n --hb-slider-button-size: 20px;\n}\n\n.hb-slider {\n width: 100%;\n height: 40px;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.hb-slider--vertical {\n width: 40px;\n height: 100%;\n flex-direction: column;\n}\n\n.hb-slider__runway {\n width: 100%;\n height: 6px;\n margin: 16px 0;\n background-color: var(--hb-slider-runway-bg-color);\n border-radius: 3px;\n position: relative;\n cursor: pointer;\n vertical-align: middle;\n}\n\n.hb-slider--vertical .hb-slider__runway {\n width: 6px;\n height: 100%;\n margin: 0 16px;\n}\n\n.hb-slider__bar {\n height: 6px;\n background-color: var(--hb-slider-main-bg-color);\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n position: absolute;\n top: 0;\n}\n\n.hb-slider--vertical .hb-slider__bar {\n width: 6px;\n height: auto;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n border-bottom-left-radius: 0;\n bottom: 0;\n top: auto;\n}\n\n.hb-slider__button-wrapper {\n position: absolute;\n z-index: 1001;\n top: 50%;\n transform: translate(-50%, -50%);\n background-color: transparent;\n text-align: center;\n user-select: none;\n outline: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n\n.hb-slider--vertical .hb-slider__button-wrapper {\n left: 50%;\n top: auto;\n transform: translate(-50%, 50%);\n}\n\n.hb-slider__button {\n width: var(--hb-slider-button-size);\n height: var(--hb-slider-button-size);\n background-color: var(--hb-color-white, #ffffff);\n border: 2px solid var(--hb-slider-main-bg-color);\n border-radius: 50%;\n transition: 0.2s;\n user-select: none;\n cursor: grab;\n}\n\n.hb-slider__button:active {\n cursor: grabbing;\n}\n\n.hb-slider__button-wrapper:hover .hb-slider__button,\n.hb-slider__button-wrapper--hover .hb-slider__button {\n transform: scale(1.2);\n}\n\n.hb-slider__tooltip {\n position: absolute;\n bottom: calc(100% + 12px);\n left: 50%;\n transform: translateX(-50%);\n padding: 6px 8px;\n background-color: rgba(0, 0, 0, 0.75);\n color: var(--hb-color-white, #ffffff);\n border-radius: 4px;\n font-size: 12px;\n white-space: nowrap;\n}\n\n.hb-slider__tooltip::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n border: 4px solid transparent;\n border-top-color: rgba(0, 0, 0, 0.75);\n}\n\n.hb-slider--disabled {\n cursor: not-allowed;\n}\n\n.hb-slider--disabled .hb-slider__runway {\n cursor: not-allowed;\n background-color: var(--hb-fill-color-light, #e4e7ed);\n}\n\n.hb-slider--disabled .hb-slider__bar {\n background-color: var(--hb-color-text-disabled, #c0c4cc);\n}\n\n.hb-slider--disabled .hb-slider__button {\n border-color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n\n/* ---- 刻度标记(marks)---- */\n.hb-slider__mark {\n position: absolute;\n top: 0;\n width: 2px;\n height: 6px;\n transform: translateX(-50%);\n background-color: var(--hb-color-border, #dcdfe6);\n pointer-events: none;\n}\n\n.hb-slider__mark-label {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: var(--hb-spacing-xs, 4px);\n font-size: var(--hb-font-size-xs, 12px);\n color: var(--hb-color-text-secondary, #606266);\n white-space: nowrap;\n}\n\n/* 有刻度时给底部留出标签空间 */\n.hb-slider--with-marks {\n padding-bottom: var(--hb-spacing-lg, 16px);\n}\n\n.hb-slider--vertical .hb-slider__mark {\n top: auto;\n left: 50%;\n width: 6px;\n height: 2px;\n transform: translate(-50%, -50%);\n}\n\n.hb-slider--vertical .hb-slider__mark-label {\n top: 50%;\n left: 100%;\n transform: translateY(-50%);\n margin-top: 0;\n margin-left: var(--hb-spacing-xs, 4px);\n}\n\n/* 聚焦态:对齐 antd 的蓝色外圈 */\n.hb-slider__button-wrapper:focus {\n outline: none;\n}\n\n.hb-slider__button-wrapper:focus-visible .hb-slider__button {\n box-shadow: 0 0 0 4px var(--hb-color-primary-bg, rgba(22, 119, 255, 0.12));\n}\n\n","import { Component, h, Prop, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\n\n/** 刻度定义:值 →(可选)标签 */\nexport interface SliderMark {\n value: number;\n label?: string;\n}\n\n/**\n * Slider 滑块组件\n * 通过拖动滑块在一个固定区间内进行选择,支持单滑块/双滑块(range)/竖向/刻度。\n */\n@Component({\n tag: 'hb-slider',\n styleUrl: 'slider.css',\n shadow: true,\n})\nexport class Slider {\n @Element() el: HTMLElement;\n\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue: number | number[] = 0;\n\n /**\n * 最小值\n * @default 0\n */\n @Prop() min: number = 0;\n\n /**\n * 最大值\n * @default 100\n */\n @Prop() max: number = 100;\n\n /**\n * 步长\n * @default 1\n */\n @Prop() step: number = 1;\n\n /**\n * 是否显示工具提示\n * @default true\n */\n @Prop() showTooltip: boolean = true;\n\n /**\n * 格式化 tooltip message\n */\n @Prop() formatTooltip?: (value: number) => string;\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否为范围选择\n * @default false\n */\n @Prop() range: boolean = false;\n\n /**\n * 是否竖向模式\n * @default false\n */\n @Prop() vertical: boolean = false;\n\n /**\n * 高度,竖向模式时必填\n */\n @Prop() height?: string;\n\n /**\n * 刻度标记(对齐 antd marks)\n */\n @Prop() marks?: SliderMark[] | Record<number, string>;\n\n @State() dragging: boolean = false;\n @State() currentValue: number | number[] = 0;\n @State() tooltipVisible: boolean = false;\n @State() tooltipValue: number = 0;\n /** range 模式下当前拖动的是哪个手柄(0/1),用于 tooltip 定位与渲染 */\n @State() activeHandle: 0 | 1 = 0;\n\n private sliderRef?: HTMLDivElement;\n private isDragging: boolean = false;\n /** 拖动期间锁定的手柄索引(鼠标按下时确定) */\n private dragHandle: 0 | 1 | null = null;\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<number | number[]>;\n\n /**\n * 值改变事件(拖拽时实时触发)\n */\n @Event() hbInput: EventEmitter<number | number[]>;\n\n componentDidLoad() {\n this.currentValue = this.normalizeInitial(this.modelValue);\n this.addEventListeners();\n }\n\n disconnectedCallback() {\n this.removeEventListeners();\n }\n\n /** 外部更新 modelValue 时同步内部 currentValue(对齐 antd 受控语义) */\n @Watch('modelValue')\n handleModelChange() {\n if (!this.isDragging) {\n this.currentValue = this.normalizeInitial(this.modelValue);\n }\n }\n\n /** range 模式下确保 currentValue 为 [min, max] 形状的有序数组 */\n private normalizeInitial(v: number | number[]): number | number[] {\n if (this.range) {\n if (Array.isArray(v) && v.length === 2) {\n return v[0] <= v[1] ? [v[0], v[1]] : [v[1], v[0]];\n }\n return [this.min, this.max];\n }\n return typeof v === 'number' ? v : (Array.isArray(v) ? v[0] ?? this.min : this.min);\n }\n\n private addEventListeners() {\n document.addEventListener('mousemove', this.handleMouseMove);\n document.addEventListener('mouseup', this.handleMouseUp);\n }\n\n private removeEventListeners() {\n document.removeEventListener('mousemove', this.handleMouseMove);\n document.removeEventListener('mouseup', this.handleMouseUp);\n }\n\n private getPercentage(value: number): number {\n if (this.max === this.min) return 0;\n return ((value - this.min) / (this.max - this.min)) * 100;\n }\n\n private getValueFromPercentage(percentage: number): number {\n const value = this.min + (percentage / 100) * (this.max - this.min);\n const snapped = Math.round(value / this.step) * this.step;\n return Math.max(this.min, Math.min(this.max, snapped));\n }\n\n /** 鼠标按下时根据落点决定拖哪个手柄(range:更近的那个) */\n private resolveHandle(percentage: number): 0 | 1 {\n if (!this.range) return 0;\n const vals = this.currentValue as number[];\n const leftPct = this.getPercentage(vals[0]);\n const rightPct = this.getPercentage(vals[1]);\n return Math.abs(percentage - leftPct) <= Math.abs(percentage - rightPct) ? 0 : 1;\n }\n\n private handleMouseDown = (e: MouseEvent, handle: 0 | 1 | null = null) => {\n if (this.disabled) return;\n e.preventDefault();\n this.isDragging = true;\n this.dragging = true;\n this.dragHandle = handle;\n this.handleDrag(e);\n };\n\n private handleMouseMove = (e: MouseEvent) => {\n if (!this.isDragging) return;\n this.handleDrag(e);\n };\n\n private handleMouseUp = () => {\n if (!this.isDragging) return;\n this.isDragging = false;\n this.dragging = false;\n this.tooltipVisible = false;\n this.dragHandle = null;\n this.hbChange.emit(this.currentValue);\n };\n\n private handleDrag(e: MouseEvent) {\n if (!this.sliderRef) return;\n\n const rect = this.sliderRef.getBoundingClientRect();\n const percentage = this.vertical\n ? 1 - (e.clientY - rect.top) / rect.height\n : (e.clientX - rect.left) / rect.width;\n\n const clampedPercentage = Math.max(0, Math.min(100, percentage * 100));\n const value = this.getValueFromPercentage(clampedPercentage);\n\n if (this.range) {\n const vals = this.currentValue as number[];\n // 优先用 mousedown 时锁定的手柄;未锁定(点击 runway)则按落点就近\n const handle = this.dragHandle !== null ? this.dragHandle : this.resolveHandle(clampedPercentage);\n this.activeHandle = handle;\n let [lo, hi] = [vals[0], vals[1]];\n if (handle === 0) {\n lo = Math.min(value, hi);\n } else {\n hi = Math.max(value, lo);\n }\n this.currentValue = [lo, hi];\n this.tooltipValue = handle === 0 ? lo : hi;\n this.tooltipVisible = true;\n } else {\n this.activeHandle = 0;\n this.currentValue = value;\n this.tooltipValue = value;\n this.tooltipVisible = true;\n }\n\n this.modelValue = this.currentValue;\n this.hbInput.emit(this.currentValue);\n }\n\n /** 键盘可访问:方向键调整当前手柄,对齐 WAI-ARIA slider pattern */\n private handleKeyDown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n const { key } = e;\n const isDecrease = key === 'ArrowLeft' || key === 'ArrowDown';\n const isIncrease = key === 'ArrowRight' || key === 'ArrowUp';\n const isBigDecrease = key === 'PageDown' || key === 'Home';\n const isBigIncrease = key === 'PageUp' || key === 'End';\n if (!isDecrease && !isIncrease && !isBigDecrease && !isBigIncrease) return;\n\n e.preventDefault();\n const delta =\n isBigDecrease ? -this.max :\n isBigIncrease ? this.max :\n (isDecrease ? -1 : 1) * this.step;\n\n if (this.range) {\n const vals = this.currentValue as number[];\n let [lo, hi] = [vals[0], vals[1]];\n if (this.activeHandle === 0) {\n lo = Math.max(this.min, Math.min(lo + delta, hi));\n } else {\n hi = Math.min(this.max, Math.max(hi + delta, lo));\n }\n this.currentValue = [lo, hi];\n this.tooltipValue = this.activeHandle === 0 ? lo : hi;\n this.tooltipVisible = true;\n } else {\n const next = Math.max(this.min, Math.min((this.currentValue as number) + delta, this.max));\n this.currentValue = next;\n this.tooltipValue = next;\n this.tooltipVisible = true;\n }\n this.modelValue = this.currentValue;\n this.hbChange.emit(this.currentValue);\n this.hbInput.emit(this.currentValue);\n };\n\n private formatValue(value: number): string {\n if (this.formatTooltip) {\n return this.formatTooltip(value);\n }\n return String(value);\n }\n\n /** 规范化 marks 为 [{value,label}] 数组 */\n private get markList(): { value: number; label?: string }[] {\n if (!this.marks) return [];\n if (Array.isArray(this.marks)) return this.marks;\n return Object.entries(this.marks).map(([k, v]) => ({ value: Number(k), label: v as string }));\n }\n\n render() {\n const range = this.range;\n const singlePct = this.getPercentage(this.currentValue as number);\n const rangeVals = range ? (this.currentValue as number[]) : [0, 0];\n const leftPct = range ? this.getPercentage(rangeVals[0]) : 0;\n const rightPct = range ? this.getPercentage(rangeVals[1]) : singlePct;\n // bar:单滑块从 min 到 value;range 从 lo 到 hi\n const barStart = range ? leftPct : 0;\n const barSize = range ? rightPct - leftPct : singlePct;\n const posProp = this.vertical ? 'bottom' : 'left';\n const sizeProp = this.vertical ? 'height' : 'width';\n\n const renderHandle = (handle: 0 | 1, pct: number) => {\n const tooltipVal = range ? rangeVals[handle] : (this.currentValue as number);\n const isActive = this.tooltipVisible && (range ? this.activeHandle === handle : true);\n return (\n <div\n class={{\n 'hb-slider__button-wrapper': true,\n 'hb-slider__button-wrapper--hover': isActive,\n }}\n style={{ [posProp]: `${pct}%` }}\n onMouseDown={(e: MouseEvent) => this.handleMouseDown(e, handle)}\n onTouchStart={(e: TouchEvent) => this.handleTouchStart(e, handle)}\n role=\"slider\"\n tabindex={this.disabled ? -1 : 0}\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n aria-valuenow={tooltipVal}\n aria-valuetext={this.formatValue(tooltipVal)}\n aria-orientation={this.vertical ? 'vertical' : 'horizontal'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onKeyDown={this.handleKeyDown}\n >\n {this.showTooltip && isActive && (\n <div class=\"hb-slider__tooltip\">{this.formatValue(this.tooltipValue)}</div>\n )}\n <div class=\"hb-slider__button\"></div>\n </div>\n );\n };\n\n return (\n <div\n class={{\n 'hb-slider': true,\n 'hb-slider--vertical': this.vertical,\n 'hb-slider--disabled': this.disabled,\n 'hb-slider--with-marks': this.markList.length > 0,\n }}\n style={this.vertical && this.height ? { height: this.height } : undefined}\n >\n <div\n class=\"hb-slider__runway\"\n ref={(el) => (this.sliderRef = el as HTMLDivElement)}\n onMouseDown={(e: MouseEvent) => this.handleMouseDown(e, null)}\n onTouchStart={(e: TouchEvent) => this.handleTouchStart(e, null)}\n >\n <div\n class=\"hb-slider__bar\"\n style={{\n [sizeProp]: `${Math.max(0, barSize)}%`,\n [posProp]: `${barStart}%`,\n }}\n ></div>\n {this.markList.map(m => {\n const pct = this.getPercentage(m.value);\n return (\n <div\n class=\"hb-slider__mark\"\n style={{ [posProp]: `${pct}%` }}\n aria-hidden=\"true\"\n >\n {m.label && <span class=\"hb-slider__mark-label\">{m.label}</span>}\n </div>\n );\n })}\n {range ? renderHandle(0, leftPct) : null}\n {renderHandle(range ? 1 : 0, range ? rightPct : singlePct)}\n </div>\n </div>\n );\n }\n\n /** 触屏支持:把 touch 事件映射到 mouse 同等逻辑(移动端可用) */\n private handleTouchStart = (e: TouchEvent, handle: 0 | 1 | null) => {\n if (this.disabled) return;\n e.preventDefault();\n const touch = e.touches[0];\n this.isDragging = true;\n this.dragging = true;\n this.dragHandle = handle;\n this.dragFromTouch(touch.clientX, touch.clientY);\n const move = (ev: TouchEvent) => {\n const t = ev.touches[0];\n this.dragFromTouch(t.clientX, t.clientY);\n };\n const end = () => {\n this.isDragging = false;\n this.dragging = false;\n this.tooltipVisible = false;\n this.dragHandle = null;\n this.hbChange.emit(this.currentValue);\n document.removeEventListener('touchmove', move);\n document.removeEventListener('touchend', end);\n };\n document.addEventListener('touchmove', move, { passive: false });\n document.addEventListener('touchend', end);\n };\n\n private dragFromTouch(clientX: number, clientY: number) {\n if (!this.sliderRef) return;\n const rect = this.sliderRef.getBoundingClientRect();\n const percentage = this.vertical\n ? 1 - (clientY - rect.top) / rect.height\n : (clientX - rect.left) / rect.width;\n const clamped = Math.max(0, Math.min(100, percentage * 100));\n const value = this.getValueFromPercentage(clamped);\n if (this.range) {\n const vals = this.currentValue as number[];\n const handle = this.dragHandle !== null ? this.dragHandle : this.resolveHandle(clamped);\n this.activeHandle = handle;\n let [lo, hi] = [vals[0], vals[1]];\n if (handle === 0) lo = Math.min(value, hi);\n else hi = Math.max(value, lo);\n this.currentValue = [lo, hi];\n this.tooltipValue = handle === 0 ? lo : hi;\n this.tooltipVisible = true;\n } else {\n this.currentValue = value;\n this.tooltipValue = value;\n this.tooltipVisible = true;\n }\n this.modelValue = this.currentValue;\n this.hbInput.emit(this.currentValue);\n }\n}\n\n"],"version":3}
@@ -53,7 +53,7 @@ const Space = class {
53
53
  }
54
54
  render() {
55
55
  const sizeValue = this.getSizeValue();
56
- return (index.h("div", { key: 'c6a3c89f29c25988b47aa100c8d3ac45c44f550e', class: {
56
+ return (index.h("div", { key: '23205a0d926148969e1dc0c98dee9b81f52e921e', class: {
57
57
  'hb-space': true,
58
58
  [`hb-space--${this.direction}`]: true,
59
59
  'hb-space--wrap': this.wrap && this.direction === 'horizontal',
@@ -62,7 +62,7 @@ const Space = class {
62
62
  '--hb-space-size': sizeValue,
63
63
  '--hb-space-alignment': this.alignment,
64
64
  '--hb-space-fill-ratio': `${this.fillRatio}%`,
65
- } }, index.h("slot", { key: '638d65e135eb572d71d3220183031cb0b18b1078' })));
65
+ } }, index.h("slot", { key: 'b313162f92bf63bc8926b15af1a7f0bbe3d0295d' })));
66
66
  }
67
67
  };
68
68
  Space.style = HbSpaceStyle0;
@@ -56,7 +56,7 @@ const Statistic = class {
56
56
  return decPart !== undefined ? `${grouped}.${decPart}` : grouped;
57
57
  }
58
58
  render() {
59
- return (index.h("div", { key: 'e38db3c8ae83480a933a7a9fd03d4ecb8e3cb07d', class: "hb-statistic" }, this.title && index.h("div", { key: '2d4af905f79558e98b6db498db1d251d10b64151', class: "hb-statistic__title" }, this.title), index.h("div", { key: 'f60f0263f6f22ca95d863c1fcd7f94556b351cea', class: "hb-statistic__content", style: this.valueStyle ? { cssText: this.valueStyle } : undefined }, this.valuePrefix && index.h("span", { key: '4dd5f92066507ad0abf5c5bbeca64001d425b83a', class: "hb-statistic__prefix" }, this.valuePrefix), index.h("span", { key: '746806287e5f0752263ce913a4b81fa221b0fb3b', class: "hb-statistic__value" }, this.getFormattedValue()), this.suffix !== undefined && index.h("span", { key: 'a93c66aeb111922903214884e664b425279cc5ac', class: "hb-statistic__suffix" }, this.suffix))));
59
+ return (index.h("div", { key: 'e695e8811255eace58725623ad9ac4fc32fe9815', class: "hb-statistic" }, this.title && index.h("div", { key: '0ca9e8bae28815d841fd04f0ec0aeb6d3147cfb7', class: "hb-statistic__title" }, this.title), index.h("div", { key: 'f4b4dce8ceded1700b7bd2f50b97d886452571d9', class: "hb-statistic__content", style: this.valueStyle ? { cssText: this.valueStyle } : undefined }, this.valuePrefix && index.h("span", { key: '7b6f19358ee7ab45b18fab4230cc0cae56161398', class: "hb-statistic__prefix" }, this.valuePrefix), index.h("span", { key: 'ba7c49912cd4d0d4a81349d8584801291075966f', class: "hb-statistic__value" }, this.getFormattedValue()), this.suffix !== undefined && index.h("span", { key: '87619124453f9e49eba5e22ccc6c6123b059c61b', class: "hb-statistic__suffix" }, this.suffix))));
60
60
  }
61
61
  };
62
62
  Statistic.style = HbStatisticStyle0;
@@ -13,7 +13,7 @@ const Step = class {
13
13
  icon;
14
14
  status = "wait";
15
15
  render() {
16
- return index.h("div", { key: "8a42e9bcdb6ab736095af526989a331edc76f0bb", class: "hb-step" }, index.h("slot", { key: "cff737be2d6690f6edee1b0996c2d49e9621ffaa" }));
16
+ return index.h("div", { key: "63f299b0fda78da0625d0d33af185af098512986", class: "hb-step" }, index.h("slot", { key: "7d8193df46de7452dee4df28246552fd9bae9cee" }));
17
17
  }
18
18
  };
19
19
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-5aa5c817.js');
6
6
 
7
- const stepsCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-steps{display:flex}.hb-steps--vertical,.hb-steps__item{flex-direction:column}.hb-steps__item{align-items:center;display:flex;flex:1;position:relative}.hb-steps--vertical .hb-steps__item{align-items:flex-start;flex-direction:row;gap:var(--hb-spacing-sm);padding-bottom:var(--hb-spacing-md)}.hb-steps__head{align-items:center;display:flex;width:100%}.hb-steps__icon{align-items:center;background:var(--hb-color-fill);border-radius:50%;color:var(--hb-color-text-secondary);display:flex;flex-shrink:0;font-size:var(--hb-font-size-sm);font-weight:600;height:28px;justify-content:center;transition:all .3s;width:28px}.hb-steps__item--finish .hb-steps__icon,.hb-steps__item--process .hb-steps__icon{background:var(--hb-color-primary);color:#fff}.hb-steps__item--error .hb-steps__icon{background:var(--hb-color-danger);color:#fff}.hb-steps__line{background:var(--hb-color-border-secondary);flex:1;height:2px;margin:0 var(--hb-spacing-xs)}.hb-steps__item--finish .hb-steps__line{background:var(--hb-color-primary)}.hb-steps__main{margin-top:var(--hb-spacing-xs);text-align:center}.hb-steps--vertical .hb-steps__main{text-align:left}.hb-steps:not(.hb-steps--align-center) .hb-steps__item{align-items:flex-start}.hb-steps:not(.hb-steps--align-center) .hb-steps__main{text-align:left}.hb-steps__title{font-size:var(--hb-font-size-sm);font-weight:600}.hb-steps__item--process .hb-steps__title{color:var(--hb-color-primary)}.hb-steps__description{color:var(--hb-color-text-secondary);font-size:var(--hb-font-size-xs);margin-top:2px}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
7
+ const stepsCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components; /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-steps{display:flex}.hb-steps--vertical,.hb-steps__item{flex-direction:column}.hb-steps__item{align-items:center;display:flex;flex:1;position:relative}.hb-steps--vertical .hb-steps__item{align-items:flex-start;flex-direction:row;gap:var(--hb-spacing-sm);padding-bottom:var(--hb-spacing-md)}.hb-steps__head{align-items:center;display:flex;width:100%}.hb-steps__icon{align-items:center;background:var(--hb-color-fill);border-radius:50%;color:var(--hb-color-text-secondary);display:flex;flex-shrink:0;font-size:var(--hb-font-size-sm);font-weight:600;height:28px;justify-content:center;transition:all .3s;width:28px}.hb-steps__item--finish .hb-steps__icon,.hb-steps__item--process .hb-steps__icon{background:var(--hb-color-primary);color:#fff}.hb-steps__item--error .hb-steps__icon{background:var(--hb-color-danger);color:#fff}.hb-steps__line{background:var(--hb-color-border-secondary);flex:1;height:2px;margin:0 var(--hb-spacing-xs)}.hb-steps__item--finish .hb-steps__line{background:var(--hb-color-primary)}.hb-steps__main{margin-top:var(--hb-spacing-xs);text-align:center}.hb-steps--vertical .hb-steps__main{text-align:left}.hb-steps:not(.hb-steps--align-center) .hb-steps__item{align-items:flex-start}.hb-steps:not(.hb-steps--align-center) .hb-steps__main{text-align:left}.hb-steps__title{font-size:var(--hb-font-size-sm);font-weight:600}.hb-steps__item--process .hb-steps__title{color:var(--hb-color-primary)}.hb-steps__description{color:var(--hb-color-text-secondary);font-size:var(--hb-font-size-xs);margin-top:2px}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
8
8
  const HbStepsStyle0 = stepsCss;
9
9
 
10
10
  const Steps = class {
@@ -19,28 +19,49 @@ const Steps = class {
19
19
  steps = [];
20
20
  componentDidLoad() {
21
21
  const items = this.el.querySelectorAll('hb-step');
22
- this.steps = Array.from(items).map((item) => ({
23
- title: item.getAttribute('title') || '',
24
- description: item.getAttribute('description') || undefined,
25
- }));
22
+ this.steps = Array.from(items).map((item) => {
23
+ const node = item;
24
+ // 仅用 getAttribute:hb-step 的 @Prop() status 默认值为 'wait',
25
+ // 若读 (node as any).status 会拿到默认值,从而错误地覆盖 active 推导。
26
+ // 用户显式在 HTML 上写 status="xxx" 时 getAttribute 才有值。
27
+ return {
28
+ title: node.getAttribute('title') || '',
29
+ description: node.getAttribute('description') || undefined,
30
+ icon: node.getAttribute('icon') || undefined,
31
+ status: (node.getAttribute('status') || undefined),
32
+ };
33
+ });
26
34
  }
27
35
  getStatus(index) {
36
+ const meta = this.steps[index];
37
+ // 子项显式 status 优先(仅当用户在 HTML 上写了 status 属性)
38
+ if (meta && meta.status)
39
+ return meta.status;
28
40
  if (index < this.active)
29
41
  return 'finish';
30
42
  if (index === this.active)
31
43
  return this.processStatus;
32
44
  return 'wait';
33
45
  }
34
- getIcon(index) {
35
- const status = this.getStatus(index);
46
+ /** 渲染图标:子项自定义 icon 优先;否则按状态(finish=✓、error=✕、其余=序号) */
47
+ renderIcon(index$1) {
48
+ const meta = this.steps[index$1];
49
+ if (meta && meta.icon) {
50
+ // 自定义图标名:若与 hb-icon 内置图标同名则渲染 hb-icon,否则按文本渲染
51
+ return index.h("hb-icon", { name: meta.icon, size: 16, "aria-hidden": "true" });
52
+ }
53
+ const status = this.getStatus(index$1);
36
54
  if (status === 'finish')
37
55
  return '✓';
38
56
  if (status === 'error')
39
57
  return '✕';
40
- return String(index + 1);
58
+ return String(index$1 + 1);
41
59
  }
42
60
  render() {
43
- return (index.h("div", { key: '3bb957ec22b3943e8dccdd609838adcac9aa0766', class: { 'hb-steps': true, [`hb-steps--${this.direction}`]: true, 'hb-steps--align-center': this.alignCenter } }, this.steps.map((step, i) => (index.h("div", { class: { 'hb-steps__item': true, [`hb-steps__item--${this.getStatus(i)}`]: true } }, index.h("div", { class: "hb-steps__head" }, index.h("span", { class: "hb-steps__icon" }, this.getIcon(i)), i < this.steps.length - 1 && index.h("div", { class: "hb-steps__line" })), index.h("div", { class: "hb-steps__main" }, index.h("div", { class: "hb-steps__title" }, step.title), step.description && index.h("div", { class: "hb-steps__description" }, step.description)))))));
61
+ return (index.h("ol", { key: 'f69b42d787de6ee114ed9ebef2e8d1a8fae60363', class: { 'hb-steps': true, [`hb-steps--${this.direction}`]: true, 'hb-steps--align-center': this.alignCenter }, role: "list" }, this.steps.map((step, i) => {
62
+ const status = this.getStatus(i);
63
+ return (index.h("li", { class: { 'hb-steps__item': true, [`hb-steps__item--${status}`]: true }, role: "listitem", "aria-current": status === 'process' ? 'step' : undefined, "aria-disabled": step.status === 'wait' && i > this.active ? 'true' : undefined }, index.h("div", { class: "hb-steps__head" }, index.h("span", { class: "hb-steps__icon", "aria-hidden": "true" }, this.renderIcon(i)), i < this.steps.length - 1 && index.h("div", { class: "hb-steps__line" })), index.h("div", { class: "hb-steps__main" }, index.h("div", { class: "hb-steps__title" }, step.title), step.description && index.h("div", { class: "hb-steps__description" }, step.description))));
64
+ })));
44
65
  }
45
66
  };
46
67
  Steps.style = HbStepsStyle0;
@@ -1 +1 @@
1
- {"file":"hb-steps.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,mnOAAmnO,CAAC;AACroO,sBAAe,QAAQ;;MCEV,KAAK;;;;;IAER,MAAM,GAAW,CAAC,CAAC;IACnB,aAAa,GAA4C,SAAS,CAAC;IACnE,WAAW,GAAY,KAAK,CAAC;IAC7B,SAAS,GAA8B,YAAY,CAAC;IAEnD,KAAK,GAA8C,EAAE,CAAC;IAE/D,gBAAgB;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM;YAC5C,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE;YACvC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,SAAS;SAC3D,CAAC,CAAC,CAAC;KACL;IAEO,SAAS,CAAC,KAAa;QAC7B,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM;YAAE,OAAO,QAAQ,CAAC;QACzC,IAAI,KAAK,KAAK,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,aAAa,CAAC;QACrD,OAAO,MAAM,CAAC;KACf;IAEO,OAAO,CAAC,KAAa;QAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,MAAM,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAC;QACpC,IAAI,MAAM,KAAK,OAAO;YAAE,OAAO,GAAG,CAAC;QACnC,OAAO,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;KAC1B;IAED,MAAM;QACJ,QACEA,kEAAK,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,aAAa,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,EAAE,wBAAwB,EAAE,IAAI,CAAC,WAAW,EAAE,IAChH,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,MACtBA,iBAAK,KAAK,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,mBAAmB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,IACpFA,iBAAK,KAAK,EAAC,gBAAgB,IACzBA,kBAAM,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAQ,EACpD,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAIA,iBAAK,KAAK,EAAC,gBAAgB,GAAO,CAC5D,EACNA,iBAAK,KAAK,EAAC,gBAAgB,IACzBA,iBAAK,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,KAAK,CAAO,EAC9C,IAAI,CAAC,WAAW,IAAIA,iBAAK,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,WAAW,CAAO,CAC5E,CACF,CACP,CAAC,CACE,EACN;KACH;;;;;;","names":["h"],"sources":["src/components/Steps/steps.css?tag=hb-steps&encapsulation=shadow","src/components/Steps/Steps.tsx"],"sourcesContent":[":host { display: block; }\n.hb-steps { display: flex; }\n.hb-steps--vertical { flex-direction: column; }\n.hb-steps__item { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }\n.hb-steps--vertical .hb-steps__item { flex-direction: row; align-items: flex-start; gap: var(--hb-spacing-sm); padding-bottom: var(--hb-spacing-md); }\n.hb-steps__head { display: flex; align-items: center; width: 100%; }\n.hb-steps__icon {\n width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;\n font-size: var(--hb-font-size-sm); font-weight: 600; flex-shrink: 0;\n background: var(--hb-color-fill); color: var(--hb-color-text-secondary); transition: all 0.3s;\n}\n.hb-steps__item--process .hb-steps__icon { background: var(--hb-color-primary); color: #fff; }\n.hb-steps__item--finish .hb-steps__icon { background: var(--hb-color-primary); color: #fff; }\n.hb-steps__item--error .hb-steps__icon { background: var(--hb-color-danger); color: #fff; }\n.hb-steps__line { flex: 1; height: 2px; background: var(--hb-color-border-secondary); margin: 0 var(--hb-spacing-xs); }\n.hb-steps__item--finish .hb-steps__line { background: var(--hb-color-primary); }\n.hb-steps__main { text-align: center; margin-top: var(--hb-spacing-xs); }\n.hb-steps--vertical .hb-steps__main { text-align: left; }\n\n/* 对齐方式(alignCenter prop):默认 false 时图标与文字左对齐,true 时居中 */\n.hb-steps:not(.hb-steps--align-center) .hb-steps__item { align-items: flex-start; }\n.hb-steps:not(.hb-steps--align-center) .hb-steps__main { text-align: left; }\n.hb-steps__title { font-size: var(--hb-font-size-sm); font-weight: 600; }\n.hb-steps__item--process .hb-steps__title { color: var(--hb-color-primary); }\n.hb-steps__description { font-size: var(--hb-font-size-xs); color: var(--hb-color-text-secondary); margin-top: 2px; }\n","import { Component, h, Prop, State, Element } from '@stencil/core';\n\n@Component({ tag: 'hb-steps', styleUrl: 'steps.css', shadow: true })\nexport class Steps {\n @Element() el: HTMLElement;\n @Prop() active: number = 0;\n @Prop() processStatus: 'wait' | 'process' | 'finish' | 'error' = 'process';\n @Prop() alignCenter: boolean = false;\n @Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n @State() steps: { title: string; description?: string }[] = [];\n\n componentDidLoad() {\n const items = this.el.querySelectorAll('hb-step');\n this.steps = Array.from(items).map((item) => ({\n title: item.getAttribute('title') || '',\n description: item.getAttribute('description') || undefined,\n }));\n }\n\n private getStatus(index: number): string {\n if (index < this.active) return 'finish';\n if (index === this.active) return this.processStatus;\n return 'wait';\n }\n\n private getIcon(index: number): string {\n const status = this.getStatus(index);\n if (status === 'finish') return '✓';\n if (status === 'error') return '✕';\n return String(index + 1);\n }\n\n render() {\n return (\n <div class={{ 'hb-steps': true, [`hb-steps--${this.direction}`]: true, 'hb-steps--align-center': this.alignCenter }}>\n {this.steps.map((step, i) => (\n <div class={{ 'hb-steps__item': true, [`hb-steps__item--${this.getStatus(i)}`]: true }}>\n <div class=\"hb-steps__head\">\n <span class=\"hb-steps__icon\">{this.getIcon(i)}</span>\n {i < this.steps.length - 1 && <div class=\"hb-steps__line\"></div>}\n </div>\n <div class=\"hb-steps__main\">\n <div class=\"hb-steps__title\">{step.title}</div>\n {step.description && <div class=\"hb-steps__description\">{step.description}</div>}\n </div>\n </div>\n ))}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"hb-steps.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,wuOAAwuO,CAAC;AAC1vO,sBAAe,QAAQ;;MCaV,KAAK;;;;;IAER,MAAM,GAAW,CAAC,CAAC;IACnB,aAAa,GAAe,SAAS,CAAC;IACtC,WAAW,GAAY,KAAK,CAAC;IAC7B,SAAS,GAA8B,YAAY,CAAC;IAEnD,KAAK,GAAe,EAAE,CAAC;IAEhC,gBAAgB;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI;YACtC,MAAM,IAAI,GAAG,IAAmB,CAAC;;;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,CAAC,aAAa,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,EAAE,wBAAwB,EAAE,IAAI,CAAC,WAAW,EAAE,EAC9G,IAAI,EAAC,MAAM,IAEV,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;YACtB,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACjC,QACEA,gBACE,KAAK,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,mBAAmB,MAAM,EAAE,GAAG,IAAI,EAAE,EACtE,IAAI,EAAC,UAAU,kBACD,MAAM,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,mBACxC,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,IAE7EA,iBAAK,KAAK,EAAC,gBAAgB,IACzBA,kBAAM,KAAK,EAAC,gBAAgB,iBAAa,MAAM,IAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAQ,EAC1E,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAIA,iBAAK,KAAK,EAAC,gBAAgB,GAAO,CAC5D,EACNA,iBAAK,KAAK,EAAC,gBAAgB,IACzBA,iBAAK,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,KAAK,CAAO,EAC9C,IAAI,CAAC,WAAW,IAAIA,iBAAK,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,WAAW,CAAO,CAC5E,CACH,EACL;SACH,CAAC,CACC,EACL;KACH;;;;;;","names":["index","h"],"sources":["src/components/Steps/steps.css?tag=hb-steps&encapsulation=shadow","src/components/Steps/Steps.tsx"],"sourcesContent":[":host { display: block; }\n.hb-steps { display: flex; }\n.hb-steps--vertical { flex-direction: column; }\n.hb-steps__item { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }\n.hb-steps--vertical .hb-steps__item { flex-direction: row; align-items: flex-start; gap: var(--hb-spacing-sm); padding-bottom: var(--hb-spacing-md); }\n.hb-steps__head { display: flex; align-items: center; width: 100%; }\n.hb-steps__icon {\n width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;\n font-size: var(--hb-font-size-sm); font-weight: 600; flex-shrink: 0;\n background: var(--hb-color-fill); color: var(--hb-color-text-secondary); transition: all 0.3s;\n}\n.hb-steps__item--process .hb-steps__icon { background: var(--hb-color-primary); color: #fff; }\n.hb-steps__item--finish .hb-steps__icon { background: var(--hb-color-primary); color: #fff; }\n.hb-steps__item--error .hb-steps__icon { background: var(--hb-color-danger); color: #fff; }\n.hb-steps__line { flex: 1; height: 2px; background: var(--hb-color-border-secondary); margin: 0 var(--hb-spacing-xs); }\n.hb-steps__item--finish .hb-steps__line { background: var(--hb-color-primary); }\n.hb-steps__main { text-align: center; margin-top: var(--hb-spacing-xs); }\n.hb-steps--vertical .hb-steps__main { text-align: left; }\n\n/* 对齐方式(alignCenter prop):默认 false 时图标与文字左对齐,true 时居中 */\n.hb-steps:not(.hb-steps--align-center) .hb-steps__item { align-items: flex-start; }\n.hb-steps:not(.hb-steps--align-center) .hb-steps__main { text-align: left; }\n.hb-steps__title { font-size: var(--hb-font-size-sm); font-weight: 600; }\n.hb-steps__item--process .hb-steps__title { color: var(--hb-color-primary); }\n.hb-steps__description { font-size: var(--hb-font-size-xs); color: var(--hb-color-text-secondary); margin-top: 2px; }\n","import { Component, h, Prop, State, Element } from '@stencil/core';\n\nexport type StepStatus = 'wait' | 'process' | 'finish' | 'error';\n\ninterface StepMeta {\n title: string;\n description?: string;\n /** 自定义图标名/标记('hb-icon' name 或文本)。undefined 表示用默认序号/状态图标 */\n icon?: string;\n /** 子项显式状态覆盖(不指定则按 active 自动推导) */\n status?: StepStatus;\n}\n\n@Component({ tag: 'hb-steps', styleUrl: 'steps.css', shadow: true })\nexport class Steps {\n @Element() el: HTMLElement;\n @Prop() active: number = 0;\n @Prop() processStatus: StepStatus = 'process';\n @Prop() alignCenter: boolean = false;\n @Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n @State() steps: StepMeta[] = [];\n\n componentDidLoad() {\n const items = this.el.querySelectorAll('hb-step');\n this.steps = Array.from(items).map((item) => {\n const node = item as HTMLElement;\n // 仅用 getAttribute:hb-step 的 @Prop() status 默认值为 'wait',\n // 若读 (node as any).status 会拿到默认值,从而错误地覆盖 active 推导。\n // 用户显式在 HTML 上写 status=\"xxx\" 时 getAttribute 才有值。\n return {\n title: node.getAttribute('title') || '',\n description: node.getAttribute('description') || undefined,\n icon: node.getAttribute('icon') || undefined,\n status: (node.getAttribute('status') || undefined) as StepStatus | undefined,\n };\n });\n }\n\n private getStatus(index: number): StepStatus {\n const meta = this.steps[index];\n // 子项显式 status 优先(仅当用户在 HTML 上写了 status 属性)\n if (meta && meta.status) return meta.status;\n if (index < this.active) return 'finish';\n if (index === this.active) return this.processStatus;\n return 'wait';\n }\n\n /** 渲染图标:子项自定义 icon 优先;否则按状态(finish=✓、error=✕、其余=序号) */\n private renderIcon(index: number): any {\n const meta = this.steps[index];\n if (meta && meta.icon) {\n // 自定义图标名:若与 hb-icon 内置图标同名则渲染 hb-icon,否则按文本渲染\n return <hb-icon name={meta.icon} size={16} aria-hidden=\"true\" />;\n }\n const status = this.getStatus(index);\n if (status === 'finish') return '✓';\n if (status === 'error') return '✕';\n return String(index + 1);\n }\n\n render() {\n return (\n <ol\n class={{ 'hb-steps': true, [`hb-steps--${this.direction}`]: true, 'hb-steps--align-center': this.alignCenter }}\n role=\"list\"\n >\n {this.steps.map((step, i) => {\n const status = this.getStatus(i);\n return (\n <li\n class={{ 'hb-steps__item': true, [`hb-steps__item--${status}`]: true }}\n role=\"listitem\"\n aria-current={status === 'process' ? 'step' : undefined}\n aria-disabled={step.status === 'wait' && i > this.active ? 'true' : undefined}\n >\n <div class=\"hb-steps__head\">\n <span class=\"hb-steps__icon\" aria-hidden=\"true\">{this.renderIcon(i)}</span>\n {i < this.steps.length - 1 && <div class=\"hb-steps__line\"></div>}\n </div>\n <div class=\"hb-steps__main\">\n <div class=\"hb-steps__title\">{step.title}</div>\n {step.description && <div class=\"hb-steps__description\">{step.description}</div>}\n </div>\n </li>\n );\n })}\n </ol>\n );\n }\n}\n"],"version":3}