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
@@ -122,12 +122,12 @@ const TimeSelect = /*@__PURE__*/ proxyCustomElement(class TimeSelect extends H {
122
122
  render() {
123
123
  const timeOptions = this.generateTimeOptions();
124
124
  const showClear = this.clearable && this.modelValue;
125
- return (h("div", { key: '763924d65773a88baf74f9a680887bb0f5f11915', class: {
125
+ return (h("div", { key: '80b6173862d1e0951ef347de5193caedcac932fe', class: {
126
126
  'hb-time-select': true,
127
127
  'hb-time-select--open': this.isOpen,
128
128
  'hb-time-select--disabled': this.disabled,
129
129
  [`hb-time-select--${this.size}`]: true,
130
- } }, h("div", { key: '4b11ea13620be04784c2fab4720829733ec4b192', class: "hb-time-select__input-wrapper", onClick: this.handleInputClick }, h("input", { key: '9c398769a1d886640b83e71f3b962dc56bc8e26a', type: "text", class: "hb-time-select__input", placeholder: this.placeholder, value: this.inputValue, disabled: this.disabled, readonly: true }), h("span", { key: '7258097816864a711ca573fc9276bcdf0cc3a99b', class: "hb-time-select__suffix" }, showClear && (h("span", { key: 'cf39db893b847f992075b15c4d80ea7a13af0a7f', class: "hb-time-select__clear", onClick: this.handleClear }, "\u00D7")), h("span", { key: '98b70c62d0443b93387de1204a816f8f5fd01629', class: "hb-time-select__arrow" }, "\u25BC"))), this.isOpen && (h("div", { key: '49e548e8674505db8d3bd426eb3a909c8f4861d7', class: "hb-time-select__dropdown" }, h("ul", { key: '72233e92a5b7384d7cce618a86b36a06f173ecd2', class: "hb-time-select__menu" }, timeOptions.map((time) => (h("li", { class: {
130
+ } }, h("div", { key: '1641232ea00cc0867c5b6bc654d803af01883607', class: "hb-time-select__input-wrapper", onClick: this.handleInputClick }, h("input", { key: 'b896fb8c57ad48d448b15b92eeee853c70d168d4', type: "text", class: "hb-time-select__input", placeholder: this.placeholder, value: this.inputValue, disabled: this.disabled, readonly: true }), h("span", { key: '5056a36aaa17a2d5c2b47db106f6c7ddff0607d0', class: "hb-time-select__suffix" }, showClear && (h("span", { key: '12b24a90b988d6f351547b351b35c03bc277c611', class: "hb-time-select__clear", onClick: this.handleClear }, "\u00D7")), h("span", { key: '2a3f3187510fb01428d429237ec2a8213f3cab2b', class: "hb-time-select__arrow" }, "\u25BC"))), this.isOpen && (h("div", { key: '3f8d01ce99076e93b672642fa0c40eed4df0bf12', class: "hb-time-select__dropdown" }, h("ul", { key: '50c21be3d365710617ce81f8411873ee3cecbc4b', class: "hb-time-select__menu" }, timeOptions.map((time) => (h("li", { class: {
131
131
  'hb-time-select__menu-item': true,
132
132
  'hb-time-select__menu-item--selected': time === this.modelValue,
133
133
  }, onClick: () => this.handleSelect(time) }, time))))))));
@@ -14,7 +14,7 @@ const Timeline = /*@__PURE__*/ proxyCustomElement(class Timeline extends H {
14
14
  /** 时间线节点数组 */
15
15
  items = [];
16
16
  render() {
17
- return (h("div", { key: 'ea2098bc94d05340618eb088badcaa2c18136cf1', class: { 'hb-timeline': true, [`hb-timeline--${this.mode}`]: true } }, this.items.map((item, i) => (h("div", { class: {
17
+ return (h("div", { key: 'cda60bc9ba145982063d2f6179446dff173de1d0', class: { 'hb-timeline': true, [`hb-timeline--${this.mode}`]: true } }, this.items.map((item, i) => (h("div", { class: {
18
18
  'hb-timeline__item': true,
19
19
  'hb-timeline__item--right': this.mode === 'alternate' && i % 2 === 1,
20
20
  'hb-timeline__item--left': this.mode === 'alternate' && i % 2 === 0,
@@ -1,5 +1,6 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-1407a5e8.js';
2
2
  import { c as computePosition, g as getNextZIndex } from './p-ecce2b5e.js';
3
+ import { i as isActivationKey } from './p-cc0aeb50.js';
3
4
 
4
5
  const tooltipCss = "/*! 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{.visible{visibility:visible}.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;.hb-tooltip__trigger,:host{display:inline-block}.hb-tooltip__popup{background-color:var(--hb-p-gray-800);border-radius:var(--hb-border-radius-sm);box-shadow:var(--hb-box-shadow);color:#fff;font-size:var(--hb-font-size-sm);pointer-events:auto;word-wrap:break-word;animation:hb-tooltip-fade-in .15s ease-out;line-height:1.4;max-width:300px;padding:6px 12px;position:fixed}.hb-tooltip__arrow{background-color:var(--hb-p-gray-800);height:8px;position:absolute;transform:rotate(45deg);width:8px}.hb-tooltip__content{position:relative;z-index:1}@keyframes hb-tooltip-fade-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@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}";
5
6
  const HbTooltipStyle0 = tooltipCss;
@@ -46,6 +47,20 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
46
47
  this.show();
47
48
  }
48
49
  };
50
+ /** 键盘:Esc 关闭;click 模式 Enter/Space 切换 */
51
+ handleKeydown = (e) => {
52
+ if (e.key === 'Escape' && this.visible) {
53
+ e.preventDefault();
54
+ // 立即关(不等延迟)
55
+ clearTimeout(this.hideTimer);
56
+ this.visible = false;
57
+ return;
58
+ }
59
+ if (this.trigger === 'click' && isActivationKey(e.key)) {
60
+ e.preventDefault();
61
+ this.toggle();
62
+ }
63
+ };
49
64
  updatePosition() {
50
65
  if (!this.triggerRef || !this.popupRef)
51
66
  return;
@@ -62,7 +77,9 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends H {
62
77
  const triggerEvents = this.trigger === 'hover'
63
78
  ? { onMouseEnter: this.show, onMouseLeave: this.hide }
64
79
  : { onClick: this.toggle };
65
- return (h("div", { key: 'e98d79b104fc92f63d77cbd87c490d84e0646c64', class: "hb-tooltip", ...triggerEvents }, h("div", { key: '74088a95833070259d447d57e03a894f20d0e044', ref: (el) => { this.triggerRef = el; }, class: "hb-tooltip__trigger" }, h("slot", { key: 'ce84437a1fedd763630764a5627763a4601d195e' })), this.visible && (h("div", { key: '1b5b74c439a5925c3cf10fc552369bd83354fcf4', ref: (el) => { this.popupRef = el; }, class: "hb-tooltip__popup", style: this.popupStyle, onMouseEnter: () => this.trigger === 'hover' && this.show(), onMouseLeave: () => this.trigger === 'hover' && this.hide() }, this.showArrow && h("div", { key: '73b08948dcc030a487a0d0f11afbb2fb4bcbdc51', class: "hb-tooltip__arrow" }), h("div", { key: '564f396c5eb5e3cb5bffe7dc8ec956c54bfc484d', class: "hb-tooltip__content" }, this.content)))));
80
+ return (h("div", { key: 'a3a485a0fc8b99e61ef0c4fd30208ac6f42af2e2', class: "hb-tooltip", ...triggerEvents, onKeyDown: this.handleKeydown }, h("div", { key: '24e68cfd99dc409e5a1f3a396b506fc97827da5f', ref: (el) => { this.triggerRef = el; }, class: "hb-tooltip__trigger", tabindex: this.disabled ? -1 : 0, "aria-describedby": this.visible ? 'hb-tooltip__popup' : undefined,
81
+ // hover 触发:focus 展开让键盘用户也能读到提示(对齐 antd 行为)
82
+ onFocus: this.trigger === 'hover' ? this.show : undefined, onBlur: this.trigger === 'hover' ? this.hide : undefined }, h("slot", { key: 'd947c801efabae564e012cbe7a19c938e2ae2f7c' })), this.visible && (h("div", { key: 'e88b4aad5403c495b0484aff6a2fcb56c32efb4c', id: "hb-tooltip__popup", ref: (el) => { this.popupRef = el; }, class: "hb-tooltip__popup", style: this.popupStyle, role: "tooltip", onMouseEnter: () => this.trigger === 'hover' && this.show(), onMouseLeave: () => this.trigger === 'hover' && this.hide() }, this.showArrow && h("div", { key: 'b16d5c23542c60f2ad398eb055c33cc995af89f7', class: "hb-tooltip__arrow" }), h("div", { key: '600a64459740e735a5d7b9487debd1e8ca590ea3', class: "hb-tooltip__content" }, this.content)))));
66
83
  }
67
84
  static get style() { return HbTooltipStyle0; }
68
85
  }, [1, "hb-tooltip", {
@@ -1 +1 @@
1
- {"file":"hb-tooltip.js","mappings":";;;AAAA,MAAM,UAAU,GAAG,qwMAAqwM,CAAC;AACzxM,wBAAe,UAAU;;MCWZ,OAAO;;;;;;;;IAIV,OAAO,GAAW,EAAE,CAAC;;IAGrB,SAAS,GAAc,KAAK,CAAC;;IAG7B,OAAO,GAAsB,OAAO,CAAC;;IAGrC,QAAQ,GAAY,KAAK,CAAC;;IAG1B,SAAS,GAAY,IAAI,CAAC;IAEzB,OAAO,GAAY,KAAK,CAAC;IACzB,UAAU,GAA2B,EAAE,CAAC;IAEzC,UAAU,CAAe;IACzB,QAAQ,CAAkB;IAC1B,SAAS,CAAiC;IAE1C,IAAI,GAAG;QACb,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,qBAAqB,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;KACpD,CAAC;IAEM,IAAI,GAAG;QACb,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,QAAQ,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC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C,QAAQ,GAAG,EAAE,CAAC,EAAE,EACzC,KAAK,EAAC,mBAAmB,EACzB,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,YAAY,EAAE,MAAM,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,EAC3D,YAAY,EAAE,MAAM,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,IAE1D,IAAI,CAAC,SAAS,IAAI,4DAAK,KAAK,EAAC,mBAAmB,GAAG,EACpD,4DAAK,KAAK,EAAC,qBAAqB,IAAE,IAAI,CAAC,OAAO,CAAO,CACjD,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/Tooltip/tooltip.css?tag=hb-tooltip&encapsulation=shadow","src/components/Tooltip/Tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.hb-tooltip__trigger {\n display: inline-block;\n}\n\n.hb-tooltip__popup {\n position: fixed;\n padding: 6px 12px;\n border-radius: var(--hb-border-radius-sm);\n background-color: var(--hb-p-gray-800);\n color: #fff;\n font-size: var(--hb-font-size-sm);\n line-height: 1.4;\n pointer-events: auto;\n box-shadow: var(--hb-box-shadow);\n animation: hb-tooltip-fade-in 0.15s ease-out;\n max-width: 300px;\n word-wrap: break-word;\n}\n\n.hb-tooltip__arrow {\n position: absolute;\n width: 8px;\n height: 8px;\n background-color: var(--hb-p-gray-800);\n transform: rotate(45deg);\n}\n\n.hb-tooltip__content {\n position: relative;\n z-index: 1;\n}\n\n@keyframes hb-tooltip-fade-in {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\nimport { computePosition, getNextZIndex, Placement } from '../../utils/popup-manager';\n\n/**\n * Tooltip 文字提示组件\n * 鼠标悬停或点击时显示提示文字\n */\n@Component({\n tag: 'hb-tooltip',\n styleUrl: 'tooltip.css',\n shadow: true,\n})\nexport class Tooltip {\n @Element() el: HTMLElement;\n\n /** 提示文字 */\n @Prop() content: string = '';\n\n /** 弹出位置 */\n @Prop() placement: Placement = 'top';\n\n /** 触发方式 */\n @Prop() trigger: 'hover' | 'click' = 'hover';\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n /** 是否显示箭头 */\n @Prop() showArrow: boolean = true;\n\n @State() visible: boolean = false;\n @State() popupStyle: Record<string, string> = {};\n\n private triggerRef?: HTMLElement;\n private popupRef?: HTMLDivElement;\n private hideTimer?: ReturnType<typeof setTimeout>;\n\n private show = () => {\n if (this.disabled) return;\n clearTimeout(this.hideTimer);\n this.visible = true;\n requestAnimationFrame(() => this.updatePosition());\n };\n\n private hide = () => {\n this.hideTimer = setTimeout(() => { this.visible = false; }, 100);\n };\n\n private toggle = () => {\n if (this.disabled) return;\n if (this.visible) {\n this.hide();\n } else {\n this.show();\n }\n };\n\n private updatePosition() {\n if (!this.triggerRef || !this.popupRef) return;\n const triggerRect = this.triggerRef.getBoundingClientRect();\n const { width, height } = this.popupRef.getBoundingClientRect();\n const pos = computePosition(triggerRect, width, height, this.placement, 8);\n this.popupStyle = {\n top: `${pos.top}px`,\n left: `${pos.left}px`,\n zIndex: String(getNextZIndex()),\n };\n }\n\n render() {\n const triggerEvents = this.trigger === 'hover'\n ? { onMouseEnter: this.show, onMouseLeave: this.hide }\n : { onClick: this.toggle };\n\n return (\n <div class=\"hb-tooltip\" {...triggerEvents}>\n <div\n ref={(el: any) => { this.triggerRef = el; }}\n class=\"hb-tooltip__trigger\"\n >\n <slot />\n </div>\n {this.visible && (\n <div\n ref={(el: any) => { this.popupRef = el; }}\n class=\"hb-tooltip__popup\"\n style={this.popupStyle}\n onMouseEnter={() => this.trigger === 'hover' && this.show()}\n onMouseLeave={() => this.trigger === 'hover' && this.hide()}\n >\n {this.showArrow && <div class=\"hb-tooltip__arrow\" />}\n <div class=\"hb-tooltip__content\">{this.content}</div>\n </div>\n )}\n </div>\n );\n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CAAC,OAAO,GAAG,mBAAmB,GAAG,SAAS;;YAEhE,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS,EACzD,MAAM,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS,IAExD,8DAAQ,CACJ,EACL,IAAI,CAAC,OAAO,KACX,4DACE,EAAE,EAAC,mBAAmB,EACtB,GAAG,EAAE,CAAC,EAAO,OAAO,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,EAAE,EACzC,KAAK,EAAC,mBAAmB,EACzB,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,IAAI,EAAC,SAAS,EACd,YAAY,EAAE,MAAM,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,EAC3D,YAAY,EAAE,MAAM,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,IAE1D,IAAI,CAAC,SAAS,IAAI,4DAAK,KAAK,EAAC,mBAAmB,GAAG,EACpD,4DAAK,KAAK,EAAC,qBAAqB,IAAE,IAAI,CAAC,OAAO,CAAO,CACjD,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/Tooltip/tooltip.css?tag=hb-tooltip&encapsulation=shadow","src/components/Tooltip/Tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.hb-tooltip__trigger {\n display: inline-block;\n}\n\n.hb-tooltip__popup {\n position: fixed;\n padding: 6px 12px;\n border-radius: var(--hb-border-radius-sm);\n background-color: var(--hb-p-gray-800);\n color: #fff;\n font-size: var(--hb-font-size-sm);\n line-height: 1.4;\n pointer-events: auto;\n box-shadow: var(--hb-box-shadow);\n animation: hb-tooltip-fade-in 0.15s ease-out;\n max-width: 300px;\n word-wrap: break-word;\n}\n\n.hb-tooltip__arrow {\n position: absolute;\n width: 8px;\n height: 8px;\n background-color: var(--hb-p-gray-800);\n transform: rotate(45deg);\n}\n\n.hb-tooltip__content {\n position: relative;\n z-index: 1;\n}\n\n@keyframes hb-tooltip-fade-in {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\nimport { computePosition, getNextZIndex, Placement } from '../../utils/popup-manager';\nimport { isActivationKey } from '../../utils/a11y';\n\n/**\n * Tooltip 文字提示组件\n * 鼠标悬停或点击时显示提示文字。\n *\n * 无障碍(对齐 antd / WAI-ARIA):\n * - 触发器 aria-describedby 关联浮层 id(屏幕阅读器读出 content)\n * - 浮层 role=tooltip\n * - hover 触发时:focus 也显示(键盘用户可见,关键修复)\n * - click 触发时:Enter/Space 切换;任意模式 Esc 关闭\n */\n@Component({\n tag: 'hb-tooltip',\n styleUrl: 'tooltip.css',\n shadow: true,\n})\nexport class Tooltip {\n @Element() el: HTMLElement;\n\n /** 提示文字 */\n @Prop() content: string = '';\n\n /** 弹出位置 */\n @Prop() placement: Placement = 'top';\n\n /** 触发方式 */\n @Prop() trigger: 'hover' | 'click' = 'hover';\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n /** 是否显示箭头 */\n @Prop() showArrow: boolean = true;\n\n @State() visible: boolean = false;\n @State() popupStyle: Record<string, string> = {};\n\n private triggerRef?: HTMLElement;\n private popupRef?: HTMLDivElement;\n private hideTimer?: ReturnType<typeof setTimeout>;\n\n private show = () => {\n if (this.disabled) return;\n clearTimeout(this.hideTimer);\n this.visible = true;\n requestAnimationFrame(() => this.updatePosition());\n };\n\n private hide = () => {\n this.hideTimer = setTimeout(() => { this.visible = false; }, 100);\n };\n\n private toggle = () => {\n if (this.disabled) return;\n if (this.visible) {\n this.hide();\n } else {\n this.show();\n }\n };\n\n /** 键盘:Esc 关闭;click 模式 Enter/Space 切换 */\n private handleKeydown = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && this.visible) {\n e.preventDefault();\n // 立即关(不等延迟)\n clearTimeout(this.hideTimer);\n this.visible = false;\n return;\n }\n if (this.trigger === 'click' && isActivationKey(e.key)) {\n e.preventDefault();\n this.toggle();\n }\n };\n\n private updatePosition() {\n if (!this.triggerRef || !this.popupRef) return;\n const triggerRect = this.triggerRef.getBoundingClientRect();\n const { width, height } = this.popupRef.getBoundingClientRect();\n const pos = computePosition(triggerRect, width, height, this.placement, 8);\n this.popupStyle = {\n top: `${pos.top}px`,\n left: `${pos.left}px`,\n zIndex: String(getNextZIndex()),\n };\n }\n\n render() {\n const triggerEvents = this.trigger === 'hover'\n ? { onMouseEnter: this.show, onMouseLeave: this.hide }\n : { onClick: this.toggle };\n\n return (\n <div class=\"hb-tooltip\" {...triggerEvents} onKeyDown={this.handleKeydown}>\n <div\n ref={(el: any) => { this.triggerRef = el; }}\n class=\"hb-tooltip__trigger\"\n tabindex={this.disabled ? -1 : 0}\n aria-describedby={this.visible ? 'hb-tooltip__popup' : undefined}\n // hover 触发:focus 展开让键盘用户也能读到提示(对齐 antd 行为)\n onFocus={this.trigger === 'hover' ? this.show : undefined}\n onBlur={this.trigger === 'hover' ? this.hide : undefined}\n >\n <slot />\n </div>\n {this.visible && (\n <div\n id=\"hb-tooltip__popup\"\n ref={(el: any) => { this.popupRef = el; }}\n class=\"hb-tooltip__popup\"\n style={this.popupStyle}\n role=\"tooltip\"\n onMouseEnter={() => this.trigger === 'hover' && this.show()}\n onMouseLeave={() => this.trigger === 'hover' && this.hide()}\n >\n {this.showArrow && <div class=\"hb-tooltip__arrow\" />}\n <div class=\"hb-tooltip__content\">{this.content}</div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -154,9 +154,9 @@ const Transfer = /*@__PURE__*/ proxyCustomElement(class Transfer extends H {
154
154
  render() {
155
155
  const leftCheckAllState = this.getCheckAllState(this.leftList);
156
156
  const rightCheckAllState = this.getCheckAllState(this.rightList);
157
- return (h("div", { key: 'e8b42f296636c208e67adb4dfd105f72ccd96406', class: { 'hb-transfer': true, 'hb-transfer--disabled': this.disabled } }, this.renderList(this.leftList, this.titles[0], this.leftFilter, (e) => {
157
+ return (h("div", { key: '95bda8468eaa29735aacaeb065c458dcf542491f', class: { 'hb-transfer': true, 'hb-transfer--disabled': this.disabled } }, this.renderList(this.leftList, this.titles[0], this.leftFilter, (e) => {
158
158
  this.leftFilter = e.target.value;
159
- }), h("div", { key: 'fbb9d1ab5a4782e2d7be4e5ba8b6d2378cf5dd4f', class: "hb-transfer__operations" }, h("button", { key: '8c598127a30fc7cc82711ccbc5ae695363f20eeb', type: "button", class: "hb-transfer__operation-btn", disabled: this.disabled || rightCheckAllState === 'none', onClick: this.moveToLeft, "aria-label": "\u5411\u5DE6\u79FB\u52A8" }, "\u2039"), h("button", { key: '95ab5ae8b686fc032a7e88e4d798d0190a7163ed', type: "button", class: "hb-transfer__operation-btn", disabled: this.disabled || leftCheckAllState === 'none', onClick: this.moveToRight, "aria-label": "\u5411\u53F3\u79FB\u52A8" }, "\u203A")), this.renderList(this.rightList, this.titles[1], this.rightFilter, (e) => {
159
+ }), h("div", { key: 'b193dc93b95de501db73b67fc5bf036bbabf0092', class: "hb-transfer__operations" }, h("button", { key: 'b9f7561b09a1362003f8b4b5cd835bc9e90a2214', type: "button", class: "hb-transfer__operation-btn", disabled: this.disabled || rightCheckAllState === 'none', onClick: this.moveToLeft, "aria-label": "\u5411\u5DE6\u79FB\u52A8" }, "\u2039"), h("button", { key: '8f54a97ee39d1209fb48bef40b025d7c53b2ac82', type: "button", class: "hb-transfer__operation-btn", disabled: this.disabled || leftCheckAllState === 'none', onClick: this.moveToRight, "aria-label": "\u5411\u53F3\u79FB\u52A8" }, "\u203A")), this.renderList(this.rightList, this.titles[1], this.rightFilter, (e) => {
160
160
  this.rightFilter = e.target.value;
161
161
  })));
162
162
  }
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h } from './p-1407a5e8.js';
2
2
  import { c as createClickOutsideHandler } from './p-4ef5a884.js';
3
3
 
4
- const treeSelectCss = "/*! 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-tree-select{box-sizing:border-box;color:var(--hb-color-text);font-size:var(--hb-font-size-base);position:relative;width:100%}.hb-tree-select__input-wrapper{align-items:center;background-color:var(--hb-color-bg-container);border:1px solid var(--hb-input-border-color,var(--hb-color-border));border-radius:var(--hb-input-radius,var(--hb-border-radius-sm));box-sizing:border-box;cursor:pointer;display:flex;height:var(--hb-size-default,32px);padding:0 var(--hb-spacing-sm);transition:border-color var(--hb-transition-duration,.2s)}.hb-tree-select__input-wrapper:hover{border-color:var(--hb-input-hover-border-color,var(--hb-color-primary))}.hb-tree-select--open .hb-tree-select__input-wrapper{border-color:var(--hb-input-focus-border-color,var(--hb-color-primary))}.hb-tree-select--disabled .hb-tree-select__input-wrapper{background-color:var(--hb-color-fill-tertiary);cursor:not-allowed;opacity:.6}.hb-tree-select__display{flex:1;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;white-space:nowrap}.hb-tree-select__display--placeholder{color:var(--hb-input-placeholder-color,var(--hb-color-text-placeholder))}.hb-tree-select__suffix{gap:var(--hb-spacing-xxs)}.hb-tree-select__clear,.hb-tree-select__suffix{align-items:center;color:var(--hb-color-text-tertiary);display:inline-flex}.hb-tree-select__clear{background-color:var(--hb-color-fill);border-radius:50%;cursor:pointer;font-size:12px;height:16px;justify-content:center;width:16px}.hb-tree-select__clear:hover{color:var(--hb-color-text-secondary)}.hb-tree-select__arrow-icon{font-size:10px;transition:transform var(--hb-transition-duration,.2s)}.hb-tree-select__arrow-icon--open{transform:rotate(180deg)}.hb-tree-select__dropdown{background-color:var(--hb-color-bg-elevated);border:1px solid var(--hb-color-border-secondary);border-radius:var(--hb-border-radius-sm);box-shadow:0 6px 16px #00000014;box-sizing:border-box;left:0;max-height:280px;overflow-y:auto;padding:var(--hb-spacing-xxs);position:absolute;top:calc(100% + 4px);width:100%;z-index:1050}.hb-tree-select__empty{color:var(--hb-color-text-tertiary);font-size:var(--hb-font-size-sm);padding:var(--hb-spacing-md);text-align:center}.hb-tree-select__children,.hb-tree-select__tree{list-style:none;margin:0;padding:0}.hb-tree-select__node{list-style:none;white-space:nowrap}.hb-tree-select__node-content{align-items:center;border-radius:var(--hb-border-radius-sm);box-sizing:border-box;cursor:pointer;display:flex;gap:var(--hb-spacing-xxs);height:28px;padding-right:var(--hb-spacing-xs);transition:background-color var(--hb-transition-duration,.2s)}.hb-tree-select__node-content:hover{background-color:var(--hb-color-fill-tertiary)}.hb-tree-select__node-content--selected{color:var(--hb-color-primary);font-weight:500}.hb-tree-select__node-content--checked,.hb-tree-select__node-content--selected{background-color:var(--hb-color-primary-bg)}.hb-tree-select__node--disabled>.hb-tree-select__node-content{cursor:not-allowed;opacity:.5}.hb-tree-select__node--disabled>.hb-tree-select__node-content:hover{background-color:#0000}.hb-tree-select__switcher{align-items:center;color:var(--hb-color-text-tertiary);display:inline-flex;flex-shrink:0;height:18px;justify-content:center;width:18px}.hb-tree-select__arrow{display:inline-block;font-size:10px;transition:transform var(--hb-transition-duration,.2s)}.hb-tree-select__arrow--expanded{transform:rotate(90deg)}.hb-tree-select__checkbox{align-items:center;background-color:var(--hb-color-bg-container);border:1px solid var(--hb-color-border);border-radius:var(--hb-border-radius-xs,2px);color:#fff;display:inline-flex;flex-shrink:0;font-size:11px;height:16px;justify-content:center;line-height:1;transition:all var(--hb-transition-duration,.2s);width:16px}.hb-tree-select__checkbox--checked,.hb-tree-select__checkbox:hover:not(.hb-tree-select__checkbox--disabled){border-color:var(--hb-color-primary)}.hb-tree-select__checkbox--checked{background-color:var(--hb-color-primary)}.hb-tree-select__checkbox--disabled{cursor:not-allowed}.hb-tree-select__title{flex:1;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}@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}";
4
+ const treeSelectCss = "/*! 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-tree-select{box-sizing:border-box;color:var(--hb-color-text);font-size:var(--hb-font-size-base);position:relative;width:100%}.hb-tree-select__input-wrapper{align-items:center;background-color:var(--hb-color-bg-container);border:1px solid var(--hb-input-border-color,var(--hb-color-border));border-radius:var(--hb-input-radius,var(--hb-border-radius-sm));box-sizing:border-box;cursor:pointer;display:flex;height:var(--hb-size-default,32px);padding:0 var(--hb-spacing-sm);transition:border-color var(--hb-transition-duration,.2s)}.hb-tree-select__input-wrapper:hover{border-color:var(--hb-input-hover-border-color,var(--hb-color-primary))}.hb-tree-select--open .hb-tree-select__input-wrapper{border-color:var(--hb-input-focus-border-color,var(--hb-color-primary))}.hb-tree-select--disabled .hb-tree-select__input-wrapper{background-color:var(--hb-color-fill-tertiary);cursor:not-allowed;opacity:.6}.hb-tree-select__display{flex:1;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;white-space:nowrap}.hb-tree-select__display--placeholder{color:var(--hb-input-placeholder-color,var(--hb-color-text-placeholder))}.hb-tree-select__suffix{gap:var(--hb-spacing-xxs)}.hb-tree-select__clear,.hb-tree-select__suffix{align-items:center;color:var(--hb-color-text-tertiary);display:inline-flex}.hb-tree-select__clear{background-color:var(--hb-color-fill);border-radius:50%;cursor:pointer;height:16px;justify-content:center;width:16px}.hb-tree-select__clear svg{height:10px;width:10px}.hb-tree-select__clear:hover{color:var(--hb-color-text-secondary)}.hb-tree-select__arrow-icon{align-items:center;color:var(--hb-color-text-tertiary);display:inline-flex;height:12px;transition:transform var(--hb-transition-duration,.2s);width:12px}.hb-tree-select__arrow-icon svg{height:100%;width:100%}.hb-tree-select__arrow-icon--open{transform:rotate(180deg)}.hb-tree-select__dropdown{background-color:var(--hb-color-bg-elevated);border:1px solid var(--hb-color-border-secondary);border-radius:var(--hb-border-radius-sm);box-shadow:0 6px 16px #00000014;box-sizing:border-box;left:0;max-height:280px;overflow-y:auto;padding:var(--hb-spacing-xxs);position:absolute;top:calc(100% + 4px);width:100%;z-index:1050}.hb-tree-select__empty{color:var(--hb-color-text-tertiary);font-size:var(--hb-font-size-sm);padding:var(--hb-spacing-md);text-align:center}.hb-tree-select__children,.hb-tree-select__tree{list-style:none;margin:0;padding:0}.hb-tree-select__node{list-style:none;white-space:nowrap}.hb-tree-select__node-content{align-items:center;border-radius:var(--hb-border-radius-sm);box-sizing:border-box;cursor:pointer;display:flex;gap:var(--hb-spacing-xxs);height:28px;padding-right:var(--hb-spacing-xs);transition:background-color var(--hb-transition-duration,.2s)}.hb-tree-select__node-content:hover{background-color:var(--hb-color-fill-tertiary)}.hb-tree-select__node-content--selected{color:var(--hb-color-primary);font-weight:500}.hb-tree-select__node-content--checked,.hb-tree-select__node-content--selected{background-color:var(--hb-color-primary-bg)}.hb-tree-select__node--disabled>.hb-tree-select__node-content{cursor:not-allowed;opacity:.5}.hb-tree-select__node--disabled>.hb-tree-select__node-content:hover{background-color:#0000}.hb-tree-select__switcher{flex-shrink:0;height:18px;width:18px}.hb-tree-select__arrow,.hb-tree-select__switcher{align-items:center;color:var(--hb-color-text-tertiary);display:inline-flex;justify-content:center}.hb-tree-select__arrow{height:12px;transition:transform var(--hb-transition-duration,.2s);width:12px}.hb-tree-select__arrow svg{height:100%;width:100%}.hb-tree-select__arrow--expanded{transform:rotate(90deg)}.hb-tree-select__checkbox{align-items:center;background-color:var(--hb-color-bg-container);border:1px solid var(--hb-color-border);border-radius:var(--hb-border-radius-xs,2px);color:#fff;display:inline-flex;flex-shrink:0;height:16px;justify-content:center;transition:all var(--hb-transition-duration,.2s);width:16px}.hb-tree-select__checkbox svg{height:12px;width:12px}.hb-tree-select__checkbox-dash{background-color:#fff;border-radius:1px;display:block;height:2px;width:10px}.hb-tree-select__checkbox:hover:not(.hb-tree-select__checkbox--disabled){border-color:var(--hb-color-primary)}.hb-tree-select__checkbox--checked,.hb-tree-select__checkbox--indeterminate{background-color:var(--hb-color-primary);border-color:var(--hb-color-primary)}.hb-tree-select__checkbox--disabled{cursor:not-allowed}.hb-tree-select__title{flex:1;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}@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}";
5
5
  const HbTreeSelectStyle0 = treeSelectCss;
6
6
 
7
7
  const TreeSelect = /*@__PURE__*/ proxyCustomElement(class TreeSelect extends H {
@@ -164,18 +164,92 @@ const TreeSelect = /*@__PURE__*/ proxyCustomElement(class TreeSelect extends H {
164
164
  this.closeDropdown();
165
165
  }
166
166
  };
167
- handleNodeCheck = (key) => {
168
- // TODO: 父子联动 —— 当前仅管理单个节点勾选状态。
169
- const current = [...this.internalChecked];
170
- const idx = current.indexOf(key);
171
- if (idx >= 0)
172
- current.splice(idx, 1);
173
- else
174
- current.push(key);
175
- this.internalChecked = current;
176
- this.modelValue = current;
177
- this.hbChange.emit(current);
167
+ handleNodeCheck = (node) => {
168
+ // 父子联动(对齐 Tree 组件算法):勾选/取消自身 + 级联后代 + 自底向上修正祖先
169
+ const next = new Set(this.internalChecked);
170
+ const wasChecked = next.has(node.key);
171
+ if (wasChecked) {
172
+ this.removeDescendantKeys(node, next);
173
+ next.delete(node.key);
174
+ }
175
+ else {
176
+ next.add(node.key);
177
+ this.collectCheckableDescendantKeys(node, next);
178
+ }
179
+ this.reconcileAncestors(node, next);
180
+ const result = Array.from(next);
181
+ this.internalChecked = result;
182
+ this.modelValue = result;
183
+ this.hbChange.emit(result);
178
184
  };
185
+ /** 取消父级时级联取消所有后代(含禁用项,因为它们是被父带选的) */
186
+ removeDescendantKeys(node, out) {
187
+ if (!node.children)
188
+ return;
189
+ for (const child of node.children) {
190
+ out.delete(child.key);
191
+ this.removeDescendantKeys(child, out);
192
+ }
193
+ }
194
+ /** 勾选父级时级联勾选所有非禁用后代 */
195
+ collectCheckableDescendantKeys(node, out) {
196
+ if (!node.children)
197
+ return;
198
+ for (const child of node.children) {
199
+ if (!child.disabled)
200
+ out.add(child.key);
201
+ this.collectCheckableDescendantKeys(child, out);
202
+ }
203
+ }
204
+ /** 自底向上修正祖先:所有非禁用子节点全选 → 父勾选;否则移出(部分选体现为 indeterminate) */
205
+ reconcileAncestors(node, next) {
206
+ const parents = this.findAncestors(this.data, node.key, []);
207
+ for (const parent of parents) {
208
+ if (parent.disabled || !parent.children || parent.children.length === 0)
209
+ continue;
210
+ const checkable = parent.children.filter(c => !c.disabled);
211
+ if (checkable.length === 0)
212
+ continue;
213
+ if (checkable.every(c => next.has(c.key)))
214
+ next.add(parent.key);
215
+ else
216
+ next.delete(parent.key);
217
+ }
218
+ }
219
+ findAncestors(nodes, key, acc) {
220
+ for (const node of nodes) {
221
+ if (node.key === key)
222
+ return acc;
223
+ if (node.children && node.children.length > 0) {
224
+ const found = this.findAncestors(node.children, key, [node, ...acc]);
225
+ if (found)
226
+ return found;
227
+ }
228
+ }
229
+ return null;
230
+ }
231
+ /** 计算当前 checked 集合下处于「部分选中」的节点(用于三方态渲染) */
232
+ computeIndeterminateKeys() {
233
+ const result = new Set();
234
+ const checked = new Set(this.internalChecked);
235
+ const walk = (node) => {
236
+ if (!node.children || node.children.length === 0)
237
+ return false;
238
+ let hasChecked = false;
239
+ for (const child of node.children) {
240
+ if (walk(child))
241
+ hasChecked = true;
242
+ if (checked.has(child.key))
243
+ hasChecked = true;
244
+ }
245
+ if (hasChecked && !checked.has(node.key))
246
+ result.add(node.key);
247
+ return hasChecked;
248
+ };
249
+ for (const root of this.data)
250
+ walk(root);
251
+ return result;
252
+ }
179
253
  handleToggleExpand = (node, e) => {
180
254
  e.stopPropagation();
181
255
  const current = [...this.internalExpanded];
@@ -195,36 +269,39 @@ const TreeSelect = /*@__PURE__*/ proxyCustomElement(class TreeSelect extends H {
195
269
  this.modelValue = this.multiple ? [] : '';
196
270
  this.hbChange.emit(this.modelValue);
197
271
  };
198
- renderNode = (node, level) => {
272
+ renderNode = (node, level, indeterminateKeys) => {
199
273
  const hasChildren = !!(node.children && node.children.length > 0);
200
274
  const expanded = this.internalExpanded.includes(node.key);
201
275
  const selected = this.internalSelected.includes(node.key);
202
276
  const checked = this.internalChecked.includes(node.key);
277
+ const indeterminate = indeterminateKeys.has(node.key);
203
278
  const disabled = !!node.disabled;
204
279
  return (h("li", { class: { 'hb-tree-select__node': true, 'hb-tree-select__node--disabled': disabled }, role: "treeitem" }, h("div", { class: {
205
280
  'hb-tree-select__node-content': true,
206
281
  'hb-tree-select__node-content--selected': selected,
207
282
  'hb-tree-select__node-content--checked': checked,
208
- }, style: { paddingLeft: `${level * 18 + 8}px` } }, h("span", { class: "hb-tree-select__switcher", onClick: (e) => hasChildren && this.handleToggleExpand(node, e) }, hasChildren ? (h("span", { class: { 'hb-tree-select__arrow': true, 'hb-tree-select__arrow--expanded': expanded } }, "\u25B6")) : null), this.checkable && (h("span", { class: {
283
+ }, style: { paddingLeft: `${level * 18 + 8}px` } }, h("span", { class: "hb-tree-select__switcher", onClick: (e) => hasChildren && this.handleToggleExpand(node, e) }, hasChildren ? (h("span", { class: { 'hb-tree-select__arrow': true, 'hb-tree-select__arrow--expanded': expanded }, "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M9 6l6 6-6 6" })))) : null), this.checkable && (h("span", { class: {
209
284
  'hb-tree-select__checkbox': true,
210
285
  'hb-tree-select__checkbox--checked': checked,
286
+ 'hb-tree-select__checkbox--indeterminate': indeterminate,
211
287
  'hb-tree-select__checkbox--disabled': disabled,
212
- }, onClick: () => !disabled && this.handleNodeCheck(node.key) }, checked ? '✓' : '')), h("span", { class: "hb-tree-select__title", onClick: () => !disabled && this.handleNodeSelect(node.key) }, node.title)), hasChildren && expanded && (h("ul", { class: "hb-tree-select__children", role: "group" }, node.children.map((child) => this.renderNode(child, level + 1))))));
288
+ }, role: "checkbox", "aria-checked": indeterminate ? 'mixed' : checked ? 'true' : 'false', onClick: () => !disabled && this.handleNodeCheck(node) }, checked ? (h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 3, "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M5 12l5 5L20 7" }))) : indeterminate ? (h("span", { class: "hb-tree-select__checkbox-dash" })) : null)), h("span", { class: "hb-tree-select__title", onClick: () => !disabled && this.handleNodeSelect(node.key) }, node.title)), hasChildren && expanded && (h("ul", { class: "hb-tree-select__children", role: "group" }, node.children.map((child) => this.renderNode(child, level + 1, indeterminateKeys))))));
213
289
  };
214
290
  render() {
215
291
  const displayText = this.getDisplayText();
216
292
  const hasValue = this.multiple
217
293
  ? Array.isArray(this.modelValue) && this.modelValue.length > 0
218
294
  : typeof this.modelValue === 'string' && this.modelValue !== '';
219
- return (h("div", { key: '38d8a150ce1436bbea77250dd0bb3a44b9722cbc', class: {
295
+ const indeterminateKeys = this.checkable ? this.computeIndeterminateKeys() : new Set();
296
+ return (h("div", { key: 'f79d67b1bb02e0d51a9fe2b35a36a156801e9584', class: {
220
297
  'hb-tree-select': true,
221
298
  'hb-tree-select--open': this.isOpen,
222
299
  'hb-tree-select--disabled': this.disabled,
223
300
  'hb-tree-select--multiple': this.multiple,
224
- } }, h("div", { key: '5928b61ce45dabece866b8de93a4353804ed05e4', class: "hb-tree-select__input-wrapper", onClick: this.toggleDropdown }, h("span", { key: 'af7b313ec51033487044aa3b9ef1620fbe292490', class: {
301
+ } }, h("div", { key: '59355a67c4316c98a682df3c27cd19387a8d4742', class: "hb-tree-select__input-wrapper", onClick: this.toggleDropdown }, h("span", { key: '7b4fd7b9a4c15193f687f1f579eb2e8268b975df', class: {
225
302
  'hb-tree-select__display': true,
226
303
  'hb-tree-select__display--placeholder': !hasValue,
227
- } }, hasValue ? displayText : this.placeholder), h("span", { key: 'ab26baf601b42f2e5d28768d70927a38afbf612f', class: "hb-tree-select__suffix" }, hasValue && (h("span", { key: '0095371d8cdb31f569e53117a36d93de1f09b304', class: "hb-tree-select__clear", onClick: this.handleClear }, "\u00D7")), h("span", { key: 'b824565183607eb6341223fcfc0110b224d9d156', class: { 'hb-tree-select__arrow-icon': true, 'hb-tree-select__arrow-icon--open': this.isOpen } }, "\u25BC"))), this.isOpen && (h("div", { key: 'e03726804631a7e69c86319f9f5ec81fecb60bf0', class: "hb-tree-select__dropdown" }, this.data.length === 0 ? (h("div", { class: "hb-tree-select__empty" }, "\u6682\u65E0\u6570\u636E")) : (h("ul", { class: "hb-tree-select__tree", role: "tree" }, this.data.map((node) => this.renderNode(node, 0))))))));
304
+ } }, hasValue ? displayText : this.placeholder), h("span", { key: '1640eacb50af399e02785b14d72c547afe8fcfcf', class: "hb-tree-select__suffix" }, hasValue && (h("span", { key: 'c16d5a458d3738bccb3c70cc985df43dcacb4220', class: "hb-tree-select__clear", onClick: this.handleClear, role: "button", "aria-label": "\u6E05\u7A7A" }, h("svg", { key: '757db41a4651d25df357d2c975810bbfdddcca22', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: 'a72adce81b2900cdf11faa663f92dbaa7053921e', d: "M6 6l12 12M18 6L6 18" })))), h("span", { key: '0b40c484fe2f7e23b04cfb26cb0018f050522fec', class: { 'hb-tree-select__arrow-icon': true, 'hb-tree-select__arrow-icon--open': this.isOpen }, "aria-hidden": "true" }, h("svg", { key: '30523c9183feaab984ff557e8c735b7a04423f0c', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: '15eae62246639d6e05071123e89ad31c82ea576a', d: "M6 9l6 6 6-6" }))))), this.isOpen && (h("div", { key: 'e6eb7b145fe8b71b09511e8e0c3a3a9073508397', class: "hb-tree-select__dropdown" }, this.data.length === 0 ? (h("div", { class: "hb-tree-select__empty" }, "\u6682\u65E0\u6570\u636E")) : (h("ul", { class: "hb-tree-select__tree", role: "tree" }, this.data.map((node) => this.renderNode(node, 0, indeterminateKeys))))))));
228
305
  }
229
306
  static get style() { return HbTreeSelectStyle0; }
230
307
  }, [1, "hb-tree-select", {
@@ -1 +1 @@
1
- {"file":"hb-tree-select.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,wqTAAwqT,CAAC;AAC/rT,2BAAe,aAAa;;MCYf,UAAU;;;;;;;;;;;;IAMb,IAAI,GAAe,EAAE,CAAC;;;;IAKL,UAAU,GAAsB,EAAE,CAAC;;;;;IAMpD,QAAQ,GAAY,KAAK,CAAC;;;;;IAM1B,WAAW,GAAW,KAAK,CAAC;;;;;IAM5B,QAAQ,GAAY,KAAK,CAAC;;;;;IAM1B,SAAS,GAAY,KAAK,CAAC;;;;;IAM3B,gBAAgB,GAAY,KAAK,CAAC;IAEjC,MAAM,GAAY,KAAK,CAAC;IACxB,gBAAgB,GAAa,EAAE,CAAC;IAChC,gBAAgB,GAAa,EAAE,CAAC;IAChC,eAAe,GAAa,EAAE,CAAC;;;;IAK/B,QAAQ,CAAkC;;;;IAK1C,eAAe,CAAwB;IAExC,YAAY,GAAG,yBAAyB,CAAC;QAC/C,IAAI,EAAE,IAAW;QACjB,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM;QACzB,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE;KACpC,CAAC,CAAC;IAEH,iBAAiB;QACf,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,MAAM,GAAG,GAAa,EAAE,CAAC;YACzB,IAAI,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AM,KAAK,EAAC,wBAAwB,IACjC,QAAQ,KACP,6DAAM,KAAK,EAAC,uBAAuB,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,aAEtD,CACR,EACD,6DAAM,KAAK,EAAE,EAAE,4BAA4B,EAAE,IAAI,EAAE,kCAAkC,EAAE,IAAI,CAAC,MAAM,EAAE,aAAU,CACzG,CACH,EAEL,IAAI,CAAC,MAAM,KACV,4DAAK,KAAK,EAAC,0BAA0B,IAClC,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,IACrB,WAAK,KAAK,EAAC,uBAAuB,+BAAW,KAE7C,UAAI,KAAK,EAAC,sBAAsB,EAAC,IAAI,EAAC,MAAM,IACzC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAC/C,CACN,CACG,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/TreeSelect/tree-select.css?tag=hb-tree-select&encapsulation=shadow","src/components/TreeSelect/TreeSelect.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-tree-select {\n position: relative;\n width: 100%;\n font-size: var(--hb-font-size-base);\n color: var(--hb-color-text);\n box-sizing: border-box;\n}\n\n.hb-tree-select__input-wrapper {\n display: flex;\n align-items: center;\n height: var(--hb-size-default, 32px);\n padding: 0 var(--hb-spacing-sm);\n border: 1px solid var(--hb-input-border-color, var(--hb-color-border));\n border-radius: var(--hb-input-radius, var(--hb-border-radius-sm));\n background-color: var(--hb-color-bg-container);\n cursor: pointer;\n transition: border-color var(--hb-transition-duration, 0.2s);\n box-sizing: border-box;\n}\n\n.hb-tree-select__input-wrapper:hover {\n border-color: var(--hb-input-hover-border-color, var(--hb-color-primary));\n}\n\n.hb-tree-select--open .hb-tree-select__input-wrapper {\n border-color: var(--hb-input-focus-border-color, var(--hb-color-primary));\n}\n\n.hb-tree-select--disabled .hb-tree-select__input-wrapper {\n background-color: var(--hb-color-fill-tertiary);\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.hb-tree-select__display {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: none;\n}\n\n.hb-tree-select__display--placeholder {\n color: var(--hb-input-placeholder-color, var(--hb-color-text-placeholder));\n}\n\n.hb-tree-select__suffix {\n display: inline-flex;\n align-items: center;\n gap: var(--hb-spacing-xxs);\n color: var(--hb-color-text-tertiary);\n}\n\n.hb-tree-select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n font-size: 12px;\n border-radius: 50%;\n color: var(--hb-color-text-tertiary);\n background-color: var(--hb-color-fill);\n cursor: pointer;\n}\n\n.hb-tree-select__clear:hover {\n color: var(--hb-color-text-secondary);\n}\n\n.hb-tree-select__arrow-icon {\n font-size: 10px;\n transition: transform var(--hb-transition-duration, 0.2s);\n}\n\n.hb-tree-select__arrow-icon--open {\n transform: rotate(180deg);\n}\n\n.hb-tree-select__dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n width: 100%;\n max-height: 280px;\n overflow-y: auto;\n padding: var(--hb-spacing-xxs);\n background-color: var(--hb-color-bg-elevated);\n border: 1px solid var(--hb-color-border-secondary);\n border-radius: var(--hb-border-radius-sm);\n box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n z-index: 1050;\n}\n\n.hb-tree-select__empty {\n padding: var(--hb-spacing-md);\n text-align: center;\n color: var(--hb-color-text-tertiary);\n font-size: var(--hb-font-size-sm);\n}\n\n.hb-tree-select__tree,\n.hb-tree-select__children {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.hb-tree-select__node {\n list-style: none;\n white-space: nowrap;\n}\n\n.hb-tree-select__node-content {\n display: flex;\n align-items: center;\n gap: var(--hb-spacing-xxs);\n height: 28px;\n padding-right: var(--hb-spacing-xs);\n border-radius: var(--hb-border-radius-sm);\n cursor: pointer;\n transition: background-color var(--hb-transition-duration, 0.2s);\n box-sizing: border-box;\n}\n\n.hb-tree-select__node-content:hover {\n background-color: var(--hb-color-fill-tertiary);\n}\n\n.hb-tree-select__node-content--selected {\n background-color: var(--hb-color-primary-bg);\n color: var(--hb-color-primary);\n font-weight: 500;\n}\n\n.hb-tree-select__node-content--checked {\n background-color: var(--hb-color-primary-bg);\n}\n\n.hb-tree-select__node--disabled > .hb-tree-select__node-content {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.hb-tree-select__node--disabled > .hb-tree-select__node-content:hover {\n background-color: transparent;\n}\n\n.hb-tree-select__switcher {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n flex-shrink: 0;\n color: var(--hb-color-text-tertiary);\n}\n\n.hb-tree-select__arrow {\n font-size: 10px;\n display: inline-block;\n transition: transform var(--hb-transition-duration, 0.2s);\n}\n\n.hb-tree-select__arrow--expanded {\n transform: rotate(90deg);\n}\n\n.hb-tree-select__checkbox {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n border: 1px solid var(--hb-color-border);\n border-radius: var(--hb-border-radius-xs, 2px);\n background-color: var(--hb-color-bg-container);\n color: #fff;\n font-size: 11px;\n line-height: 1;\n flex-shrink: 0;\n transition: all var(--hb-transition-duration, 0.2s);\n}\n\n.hb-tree-select__checkbox:hover:not(.hb-tree-select__checkbox--disabled) {\n border-color: var(--hb-color-primary);\n}\n\n.hb-tree-select__checkbox--checked {\n background-color: var(--hb-color-primary);\n border-color: var(--hb-color-primary);\n}\n\n.hb-tree-select__checkbox--disabled {\n cursor: not-allowed;\n}\n\n.hb-tree-select__title {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n user-select: none;\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Element } from '@stencil/core';\nimport { createClickOutsideHandler } from '../../utils/click-outside';\nimport type { TreeNode } from '../Tree/Tree';\n\n/**\n * TreeSelect 树形选择器\n * 类似 Select,但下拉选项以树形结构展示,支持单选与多选\n */\n@Component({\n tag: 'hb-tree-select',\n styleUrl: 'tree-select.css',\n shadow: true,\n})\nexport class TreeSelect {\n @Element() el: HTMLElement;\n\n /**\n * 可选项数据源(与 Tree 相同的递归树结构)\n */\n @Prop() data: TreeNode[] = [];\n\n /**\n * (受控)绑定值,单选为 string,多选为 string[]\n */\n @Prop({ mutable: true }) modelValue: string | string[] = '';\n\n /**\n * 是否多选\n * @default false\n */\n @Prop() multiple: boolean = false;\n\n /**\n * 占位文本\n * @default '请选择'\n */\n @Prop() placeholder: string = '请选择';\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否显示 checkbox(多选模式下推荐开启)\n * @default false\n */\n @Prop() checkable: boolean = false;\n\n /**\n * 是否默认展开全部节点\n * @default false\n */\n @Prop() defaultExpandAll: boolean = false;\n\n @State() isOpen: boolean = false;\n @State() internalExpanded: string[] = [];\n @State() internalSelected: string[] = [];\n @State() internalChecked: string[] = [];\n\n /**\n * 值变化事件(单选为 string,多选为 string[])\n */\n @Event() hbChange: EventEmitter<string | string[]>;\n\n /**\n * 下拉浮层显隐变化事件\n */\n @Event() hbVisibleChange: EventEmitter<boolean>;\n\n private clickOutside = createClickOutsideHandler({\n host: null as any,\n isOpen: () => this.isOpen,\n onClose: () => this.closeDropdown(),\n });\n\n componentWillLoad() {\n this.syncFromModelValue();\n if (this.defaultExpandAll) {\n const all: string[] = [];\n this.collectExpandableKeys(this.data, all);\n this.internalExpanded = all;\n }\n }\n\n componentDidLoad() {\n this.clickOutside = createClickOutsideHandler({\n host: this.el,\n isOpen: () => this.isOpen,\n onClose: () => this.closeDropdown(),\n });\n this.clickOutside.connect();\n }\n\n disconnectedCallback() {\n this.clickOutside.disconnect();\n }\n\n private syncFromModelValue() {\n if (this.multiple) {\n const arr = Array.isArray(this.modelValue) ? this.modelValue : [];\n this.internalSelected = [...arr];\n this.internalChecked = [...arr];\n } else {\n const single = typeof this.modelValue === 'string' ? this.modelValue : '';\n this.internalSelected = single ? [single] : [];\n this.internalChecked = single ? [single] : [];\n }\n }\n\n private collectExpandableKeys(nodes: TreeNode[], out: string[]) {\n for (const node of nodes) {\n if (node.children && node.children.length > 0) {\n out.push(node.key);\n this.collectExpandableKeys(node.children, out);\n }\n }\n }\n\n private findTitle(nodes: TreeNode[], key: string): string | null {\n for (const node of nodes) {\n if (node.key === key) return node.title;\n if (node.children) {\n const found = this.findTitle(node.children, key);\n if (found) return found;\n }\n }\n return null;\n }\n\n private getDisplayText(): string {\n if (this.multiple) {\n const arr = Array.isArray(this.modelValue) ? this.modelValue : [];\n if (arr.length === 0) return '';\n const titles = arr.map((k) => this.findTitle(this.data, k) || k);\n return titles.join(' / ');\n }\n const single = typeof this.modelValue === 'string' ? this.modelValue : '';\n return single ? this.findTitle(this.data, single) || single : '';\n }\n\n private openDropdown = () => {\n if (this.disabled || this.isOpen) return;\n this.isOpen = true;\n this.hbVisibleChange.emit(true);\n };\n\n private closeDropdown = () => {\n if (!this.isOpen) return;\n this.isOpen = false;\n this.hbVisibleChange.emit(false);\n };\n\n private toggleDropdown = () => {\n if (this.disabled) return;\n if (this.isOpen) this.closeDropdown();\n else this.openDropdown();\n };\n\n private handleNodeSelect = (key: string) => {\n if (this.multiple) {\n const current = [...this.internalSelected];\n const idx = current.indexOf(key);\n if (idx >= 0) current.splice(idx, 1);\n else current.push(key);\n this.internalSelected = current;\n this.modelValue = current;\n this.hbChange.emit(current);\n } else {\n this.internalSelected = [key];\n this.modelValue = key;\n this.hbChange.emit(key);\n this.closeDropdown();\n }\n };\n\n private handleNodeCheck = (key: string) => {\n // TODO: 父子联动 —— 当前仅管理单个节点勾选状态。\n const current = [...this.internalChecked];\n const idx = current.indexOf(key);\n if (idx >= 0) current.splice(idx, 1);\n else current.push(key);\n this.internalChecked = current;\n this.modelValue = current;\n this.hbChange.emit(current);\n };\n\n private handleToggleExpand = (node: TreeNode, e: Event) => {\n e.stopPropagation();\n const current = [...this.internalExpanded];\n const idx = current.indexOf(node.key);\n if (idx >= 0) current.splice(idx, 1);\n else current.push(node.key);\n this.internalExpanded = current;\n };\n\n private handleClear = (e: Event) => {\n e.stopPropagation();\n if (this.disabled) return;\n this.internalSelected = [];\n this.internalChecked = [];\n this.modelValue = this.multiple ? [] : '';\n this.hbChange.emit(this.modelValue);\n };\n\n private renderNode = (node: TreeNode, level: number): any => {\n const hasChildren = !!(node.children && node.children.length > 0);\n const expanded = this.internalExpanded.includes(node.key);\n const selected = this.internalSelected.includes(node.key);\n const checked = this.internalChecked.includes(node.key);\n const disabled = !!node.disabled;\n\n return (\n <li class={{ 'hb-tree-select__node': true, 'hb-tree-select__node--disabled': disabled }} role=\"treeitem\">\n <div\n class={{\n 'hb-tree-select__node-content': true,\n 'hb-tree-select__node-content--selected': selected,\n 'hb-tree-select__node-content--checked': checked,\n }}\n style={{ paddingLeft: `${level * 18 + 8}px` }}\n >\n <span class=\"hb-tree-select__switcher\" onClick={(e) => hasChildren && this.handleToggleExpand(node, e)}>\n {hasChildren ? (\n <span class={{ 'hb-tree-select__arrow': true, 'hb-tree-select__arrow--expanded': expanded }}>▶</span>\n ) : null}\n </span>\n\n {this.checkable && (\n <span\n class={{\n 'hb-tree-select__checkbox': true,\n 'hb-tree-select__checkbox--checked': checked,\n 'hb-tree-select__checkbox--disabled': disabled,\n }}\n onClick={() => !disabled && this.handleNodeCheck(node.key)}\n >\n {checked ? '✓' : ''}\n </span>\n )}\n\n <span class=\"hb-tree-select__title\" onClick={() => !disabled && this.handleNodeSelect(node.key)}>\n {node.title}\n </span>\n </div>\n\n {hasChildren && expanded && (\n <ul class=\"hb-tree-select__children\" role=\"group\">\n {node.children!.map((child) => this.renderNode(child, level + 1))}\n </ul>\n )}\n </li>\n );\n };\n\n render() {\n const displayText = this.getDisplayText();\n const hasValue = this.multiple\n ? Array.isArray(this.modelValue) && this.modelValue.length > 0\n : typeof this.modelValue === 'string' && this.modelValue !== '';\n\n return (\n <div\n class={{\n 'hb-tree-select': true,\n 'hb-tree-select--open': this.isOpen,\n 'hb-tree-select--disabled': this.disabled,\n 'hb-tree-select--multiple': this.multiple,\n }}\n >\n <div class=\"hb-tree-select__input-wrapper\" onClick={this.toggleDropdown}>\n <span\n class={{\n 'hb-tree-select__display': true,\n 'hb-tree-select__display--placeholder': !hasValue,\n }}\n >\n {hasValue ? displayText : this.placeholder}\n </span>\n <span class=\"hb-tree-select__suffix\">\n {hasValue && (\n <span class=\"hb-tree-select__clear\" onClick={this.handleClear}>\n ×\n </span>\n )}\n <span class={{ 'hb-tree-select__arrow-icon': true, 'hb-tree-select__arrow-icon--open': this.isOpen }}>▼</span>\n </span>\n </div>\n\n {this.isOpen && (\n <div class=\"hb-tree-select__dropdown\">\n {this.data.length === 0 ? (\n <div class=\"hb-tree-select__empty\">暂无数据</div>\n ) : (\n <ul class=\"hb-tree-select__tree\" role=\"tree\">\n {this.data.map((node) => this.renderNode(node, 0))}\n </ul>\n )}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"hb-tree-select.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,ylUAAylU,CAAC;AAChnU,2BAAe,aAAa;;MCYf,UAAU;;;;;;;;;;;;IAMb,IAAI,GAAe,EAAE,CAAC;;;;IAKL,UAAU,GAAsB,EAAE,CAAC;;;;;IAMpD,QAAQ,GAAY,KAAK,CAAC;;;;;IAM1B,WAAW,GAAW,KAAK,CAAC;;;;;IAM5B,QAAQ,GAAY,KAAK,CAAC;;;;;IAM1B,SAAS,GAAY,KAAK,CAAC;;;;;IAM3B,gBAAgB,GAAY,KAAK,CAAC;IAEjC,MAAM,GAAY,KAAK,CAAC;IACxB,gBAAgB,GAAa,EAAE,CAAC;IAChC,gBAAgB,GAAa,EAAE,CAAC;IAChC,eAAe,GAAa,EAAE,CAAC;;;;IAK/B,QAAQ,CAAkC;;;;IAK1C,eAAe,CAAwB;IAExC,YAAY,GAAG,yBAAyB,CAAC;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elect/tree-select.css?tag=hb-tree-select&encapsulation=shadow","src/components/TreeSelect/TreeSelect.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-tree-select {\n position: relative;\n width: 100%;\n font-size: var(--hb-font-size-base);\n color: var(--hb-color-text);\n box-sizing: border-box;\n}\n\n.hb-tree-select__input-wrapper {\n display: flex;\n align-items: center;\n height: var(--hb-size-default, 32px);\n padding: 0 var(--hb-spacing-sm);\n border: 1px solid var(--hb-input-border-color, var(--hb-color-border));\n border-radius: var(--hb-input-radius, var(--hb-border-radius-sm));\n background-color: var(--hb-color-bg-container);\n cursor: pointer;\n transition: border-color var(--hb-transition-duration, 0.2s);\n box-sizing: border-box;\n}\n\n.hb-tree-select__input-wrapper:hover {\n border-color: var(--hb-input-hover-border-color, var(--hb-color-primary));\n}\n\n.hb-tree-select--open .hb-tree-select__input-wrapper {\n border-color: var(--hb-input-focus-border-color, var(--hb-color-primary));\n}\n\n.hb-tree-select--disabled .hb-tree-select__input-wrapper {\n background-color: var(--hb-color-fill-tertiary);\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.hb-tree-select__display {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: none;\n}\n\n.hb-tree-select__display--placeholder {\n color: var(--hb-input-placeholder-color, var(--hb-color-text-placeholder));\n}\n\n.hb-tree-select__suffix {\n display: inline-flex;\n align-items: center;\n gap: var(--hb-spacing-xxs);\n color: var(--hb-color-text-tertiary);\n}\n\n.hb-tree-select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n color: var(--hb-color-text-tertiary);\n background-color: var(--hb-color-fill);\n cursor: pointer;\n}\n\n.hb-tree-select__clear svg {\n width: 10px;\n height: 10px;\n}\n\n.hb-tree-select__clear:hover {\n color: var(--hb-color-text-secondary);\n}\n\n.hb-tree-select__arrow-icon {\n display: inline-flex;\n align-items: center;\n width: 12px;\n height: 12px;\n color: var(--hb-color-text-tertiary);\n transition: transform var(--hb-transition-duration, 0.2s);\n}\n\n.hb-tree-select__arrow-icon svg {\n width: 100%;\n height: 100%;\n}\n\n.hb-tree-select__arrow-icon--open {\n transform: rotate(180deg);\n}\n\n.hb-tree-select__dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n width: 100%;\n max-height: 280px;\n overflow-y: auto;\n padding: var(--hb-spacing-xxs);\n background-color: var(--hb-color-bg-elevated);\n border: 1px solid var(--hb-color-border-secondary);\n border-radius: var(--hb-border-radius-sm);\n box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n z-index: 1050;\n}\n\n.hb-tree-select__empty {\n padding: var(--hb-spacing-md);\n text-align: center;\n color: var(--hb-color-text-tertiary);\n font-size: var(--hb-font-size-sm);\n}\n\n.hb-tree-select__tree,\n.hb-tree-select__children {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.hb-tree-select__node {\n list-style: none;\n white-space: nowrap;\n}\n\n.hb-tree-select__node-content {\n display: flex;\n align-items: center;\n gap: var(--hb-spacing-xxs);\n height: 28px;\n padding-right: var(--hb-spacing-xs);\n border-radius: var(--hb-border-radius-sm);\n cursor: pointer;\n transition: background-color var(--hb-transition-duration, 0.2s);\n box-sizing: border-box;\n}\n\n.hb-tree-select__node-content:hover {\n background-color: var(--hb-color-fill-tertiary);\n}\n\n.hb-tree-select__node-content--selected {\n background-color: var(--hb-color-primary-bg);\n color: var(--hb-color-primary);\n font-weight: 500;\n}\n\n.hb-tree-select__node-content--checked {\n background-color: var(--hb-color-primary-bg);\n}\n\n.hb-tree-select__node--disabled > .hb-tree-select__node-content {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.hb-tree-select__node--disabled > .hb-tree-select__node-content:hover {\n background-color: transparent;\n}\n\n.hb-tree-select__switcher {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n flex-shrink: 0;\n color: var(--hb-color-text-tertiary);\n}\n\n.hb-tree-select__arrow {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 12px;\n height: 12px;\n color: var(--hb-color-text-tertiary);\n transition: transform var(--hb-transition-duration, 0.2s);\n}\n\n.hb-tree-select__arrow svg {\n width: 100%;\n height: 100%;\n}\n\n.hb-tree-select__arrow--expanded {\n transform: rotate(90deg);\n}\n\n.hb-tree-select__checkbox {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n border: 1px solid var(--hb-color-border);\n border-radius: var(--hb-border-radius-xs, 2px);\n background-color: var(--hb-color-bg-container);\n color: #fff;\n flex-shrink: 0;\n transition: all var(--hb-transition-duration, 0.2s);\n}\n\n.hb-tree-select__checkbox svg {\n width: 12px;\n height: 12px;\n}\n\n.hb-tree-select__checkbox-dash {\n display: block;\n width: 10px;\n height: 2px;\n background-color: #fff;\n border-radius: 1px;\n}\n\n.hb-tree-select__checkbox:hover:not(.hb-tree-select__checkbox--disabled) {\n border-color: var(--hb-color-primary);\n}\n\n.hb-tree-select__checkbox--checked,\n.hb-tree-select__checkbox--indeterminate {\n background-color: var(--hb-color-primary);\n border-color: var(--hb-color-primary);\n}\n\n.hb-tree-select__checkbox--disabled {\n cursor: not-allowed;\n}\n\n.hb-tree-select__title {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n user-select: none;\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Element } from '@stencil/core';\nimport { createClickOutsideHandler } from '../../utils/click-outside';\nimport type { TreeNode } from '../Tree/Tree';\n\n/**\n * TreeSelect 树形选择器\n * 类似 Select,但下拉选项以树形结构展示,支持单选与多选\n */\n@Component({\n tag: 'hb-tree-select',\n styleUrl: 'tree-select.css',\n shadow: true,\n})\nexport class TreeSelect {\n @Element() el: HTMLElement;\n\n /**\n * 可选项数据源(与 Tree 相同的递归树结构)\n */\n @Prop() data: TreeNode[] = [];\n\n /**\n * (受控)绑定值,单选为 string,多选为 string[]\n */\n @Prop({ mutable: true }) modelValue: string | string[] = '';\n\n /**\n * 是否多选\n * @default false\n */\n @Prop() multiple: boolean = false;\n\n /**\n * 占位文本\n * @default '请选择'\n */\n @Prop() placeholder: string = '请选择';\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否显示 checkbox(多选模式下推荐开启)\n * @default false\n */\n @Prop() checkable: boolean = false;\n\n /**\n * 是否默认展开全部节点\n * @default false\n */\n @Prop() defaultExpandAll: boolean = false;\n\n @State() isOpen: boolean = false;\n @State() internalExpanded: string[] = [];\n @State() internalSelected: string[] = [];\n @State() internalChecked: string[] = [];\n\n /**\n * 值变化事件(单选为 string,多选为 string[])\n */\n @Event() hbChange: EventEmitter<string | string[]>;\n\n /**\n * 下拉浮层显隐变化事件\n */\n @Event() hbVisibleChange: EventEmitter<boolean>;\n\n private clickOutside = createClickOutsideHandler({\n host: null as any,\n isOpen: () => this.isOpen,\n onClose: () => this.closeDropdown(),\n });\n\n componentWillLoad() {\n this.syncFromModelValue();\n if (this.defaultExpandAll) {\n const all: string[] = [];\n this.collectExpandableKeys(this.data, all);\n this.internalExpanded = all;\n }\n }\n\n componentDidLoad() {\n this.clickOutside = createClickOutsideHandler({\n host: this.el,\n isOpen: () => this.isOpen,\n onClose: () => this.closeDropdown(),\n });\n this.clickOutside.connect();\n }\n\n disconnectedCallback() {\n this.clickOutside.disconnect();\n }\n\n private syncFromModelValue() {\n if (this.multiple) {\n const arr = Array.isArray(this.modelValue) ? this.modelValue : [];\n this.internalSelected = [...arr];\n this.internalChecked = [...arr];\n } else {\n const single = typeof this.modelValue === 'string' ? this.modelValue : '';\n this.internalSelected = single ? [single] : [];\n this.internalChecked = single ? [single] : [];\n }\n }\n\n private collectExpandableKeys(nodes: TreeNode[], out: string[]) {\n for (const node of nodes) {\n if (node.children && node.children.length > 0) {\n out.push(node.key);\n this.collectExpandableKeys(node.children, out);\n }\n }\n }\n\n private findTitle(nodes: TreeNode[], key: string): string | null {\n for (const node of nodes) {\n if (node.key === key) return node.title;\n if (node.children) {\n const found = this.findTitle(node.children, key);\n if (found) return found;\n }\n }\n return null;\n }\n\n private getDisplayText(): string {\n if (this.multiple) {\n const arr = Array.isArray(this.modelValue) ? this.modelValue : [];\n if (arr.length === 0) return '';\n const titles = arr.map((k) => this.findTitle(this.data, k) || k);\n return titles.join(' / ');\n }\n const single = typeof this.modelValue === 'string' ? this.modelValue : '';\n return single ? this.findTitle(this.data, single) || single : '';\n }\n\n private openDropdown = () => {\n if (this.disabled || this.isOpen) return;\n this.isOpen = true;\n this.hbVisibleChange.emit(true);\n };\n\n private closeDropdown = () => {\n if (!this.isOpen) return;\n this.isOpen = false;\n this.hbVisibleChange.emit(false);\n };\n\n private toggleDropdown = () => {\n if (this.disabled) return;\n if (this.isOpen) this.closeDropdown();\n else this.openDropdown();\n };\n\n private handleNodeSelect = (key: string) => {\n if (this.multiple) {\n const current = [...this.internalSelected];\n const idx = current.indexOf(key);\n if (idx >= 0) current.splice(idx, 1);\n else current.push(key);\n this.internalSelected = current;\n this.modelValue = current;\n this.hbChange.emit(current);\n } else {\n this.internalSelected = [key];\n this.modelValue = key;\n this.hbChange.emit(key);\n this.closeDropdown();\n }\n };\n\n private handleNodeCheck = (node: TreeNode) => {\n // 父子联动(对齐 Tree 组件算法):勾选/取消自身 + 级联后代 + 自底向上修正祖先\n const next = new Set(this.internalChecked);\n const wasChecked = next.has(node.key);\n if (wasChecked) {\n this.removeDescendantKeys(node, next);\n next.delete(node.key);\n } else {\n next.add(node.key);\n this.collectCheckableDescendantKeys(node, next);\n }\n this.reconcileAncestors(node, next);\n const result = Array.from(next);\n this.internalChecked = result;\n this.modelValue = result;\n this.hbChange.emit(result);\n };\n\n /** 取消父级时级联取消所有后代(含禁用项,因为它们是被父带选的) */\n private removeDescendantKeys(node: TreeNode, out: Set<string>) {\n if (!node.children) return;\n for (const child of node.children) {\n out.delete(child.key);\n this.removeDescendantKeys(child, out);\n }\n }\n\n /** 勾选父级时级联勾选所有非禁用后代 */\n private collectCheckableDescendantKeys(node: TreeNode, out: Set<string>) {\n if (!node.children) return;\n for (const child of node.children) {\n if (!child.disabled) out.add(child.key);\n this.collectCheckableDescendantKeys(child, out);\n }\n }\n\n /** 自底向上修正祖先:所有非禁用子节点全选 → 父勾选;否则移出(部分选体现为 indeterminate) */\n private reconcileAncestors(node: TreeNode, next: Set<string>) {\n const parents = this.findAncestors(this.data, node.key, []);\n for (const parent of parents) {\n if (parent.disabled || !parent.children || parent.children.length === 0) continue;\n const checkable = parent.children.filter(c => !c.disabled);\n if (checkable.length === 0) continue;\n if (checkable.every(c => next.has(c.key))) next.add(parent.key);\n else next.delete(parent.key);\n }\n }\n\n private findAncestors(nodes: TreeNode[], key: string, acc: TreeNode[]): TreeNode[] | null {\n for (const node of nodes) {\n if (node.key === key) return acc;\n if (node.children && node.children.length > 0) {\n const found = this.findAncestors(node.children, key, [node, ...acc]);\n if (found) return found;\n }\n }\n return null;\n }\n\n /** 计算当前 checked 集合下处于「部分选中」的节点(用于三方态渲染) */\n private computeIndeterminateKeys(): Set<string> {\n const result = new Set<string>();\n const checked = new Set(this.internalChecked);\n const walk = (node: TreeNode): boolean => {\n if (!node.children || node.children.length === 0) return false;\n let hasChecked = false;\n for (const child of node.children) {\n if (walk(child)) hasChecked = true;\n if (checked.has(child.key)) hasChecked = true;\n }\n if (hasChecked && !checked.has(node.key)) result.add(node.key);\n return hasChecked;\n };\n for (const root of this.data) walk(root);\n return result;\n }\n\n private handleToggleExpand = (node: TreeNode, e: Event) => {\n e.stopPropagation();\n const current = [...this.internalExpanded];\n const idx = current.indexOf(node.key);\n if (idx >= 0) current.splice(idx, 1);\n else current.push(node.key);\n this.internalExpanded = current;\n };\n\n private handleClear = (e: Event) => {\n e.stopPropagation();\n if (this.disabled) return;\n this.internalSelected = [];\n this.internalChecked = [];\n this.modelValue = this.multiple ? [] : '';\n this.hbChange.emit(this.modelValue);\n };\n\n private renderNode = (node: TreeNode, level: number, indeterminateKeys: Set<string>): any => {\n const hasChildren = !!(node.children && node.children.length > 0);\n const expanded = this.internalExpanded.includes(node.key);\n const selected = this.internalSelected.includes(node.key);\n const checked = this.internalChecked.includes(node.key);\n const indeterminate = indeterminateKeys.has(node.key);\n const disabled = !!node.disabled;\n\n return (\n <li class={{ 'hb-tree-select__node': true, 'hb-tree-select__node--disabled': disabled }} role=\"treeitem\">\n <div\n class={{\n 'hb-tree-select__node-content': true,\n 'hb-tree-select__node-content--selected': selected,\n 'hb-tree-select__node-content--checked': checked,\n }}\n style={{ paddingLeft: `${level * 18 + 8}px` }}\n >\n <span class=\"hb-tree-select__switcher\" onClick={(e) => hasChildren && this.handleToggleExpand(node, e)}>\n {hasChildren ? (\n <span class={{ 'hb-tree-select__arrow': true, 'hb-tree-select__arrow--expanded': expanded }} aria-hidden=\"true\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={2} stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M9 6l6 6-6 6\" />\n </svg>\n </span>\n ) : null}\n </span>\n\n {this.checkable && (\n <span\n class={{\n 'hb-tree-select__checkbox': true,\n 'hb-tree-select__checkbox--checked': checked,\n 'hb-tree-select__checkbox--indeterminate': indeterminate,\n 'hb-tree-select__checkbox--disabled': disabled,\n }}\n role=\"checkbox\"\n aria-checked={indeterminate ? 'mixed' : checked ? 'true' : 'false'}\n onClick={() => !disabled && this.handleNodeCheck(node)}\n >\n {checked ? (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={3} stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M5 12l5 5L20 7\" />\n </svg>\n ) : indeterminate ? (\n <span class=\"hb-tree-select__checkbox-dash\" />\n ) : null}\n </span>\n )}\n\n <span class=\"hb-tree-select__title\" onClick={() => !disabled && this.handleNodeSelect(node.key)}>\n {node.title}\n </span>\n </div>\n\n {hasChildren && expanded && (\n <ul class=\"hb-tree-select__children\" role=\"group\">\n {node.children!.map((child) => this.renderNode(child, level + 1, indeterminateKeys))}\n </ul>\n )}\n </li>\n );\n };\n\n render() {\n const displayText = this.getDisplayText();\n const hasValue = this.multiple\n ? Array.isArray(this.modelValue) && this.modelValue.length > 0\n : typeof this.modelValue === 'string' && this.modelValue !== '';\n const indeterminateKeys = this.checkable ? this.computeIndeterminateKeys() : new Set<string>();\n\n return (\n <div\n class={{\n 'hb-tree-select': true,\n 'hb-tree-select--open': this.isOpen,\n 'hb-tree-select--disabled': this.disabled,\n 'hb-tree-select--multiple': this.multiple,\n }}\n >\n <div class=\"hb-tree-select__input-wrapper\" onClick={this.toggleDropdown}>\n <span\n class={{\n 'hb-tree-select__display': true,\n 'hb-tree-select__display--placeholder': !hasValue,\n }}\n >\n {hasValue ? displayText : this.placeholder}\n </span>\n <span class=\"hb-tree-select__suffix\">\n {hasValue && (\n <span class=\"hb-tree-select__clear\" onClick={this.handleClear} role=\"button\" aria-label=\"清空\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={2} stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </svg>\n </span>\n )}\n <span class={{ 'hb-tree-select__arrow-icon': true, 'hb-tree-select__arrow-icon--open': this.isOpen }} aria-hidden=\"true\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={2} stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M6 9l6 6 6-6\" />\n </svg>\n </span>\n </span>\n </div>\n\n {this.isOpen && (\n <div class=\"hb-tree-select__dropdown\">\n {this.data.length === 0 ? (\n <div class=\"hb-tree-select__empty\">暂无数据</div>\n ) : (\n <ul class=\"hb-tree-select__tree\" role=\"tree\">\n {this.data.map((node) => this.renderNode(node, 0, indeterminateKeys))}\n </ul>\n )}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -295,7 +295,7 @@ const Tree = /*@__PURE__*/ proxyCustomElement(class Tree extends H {
295
295
  };
296
296
  render() {
297
297
  const indeterminateKeys = this.checkable ? this.computeIndeterminateKeys() : new Set();
298
- return (h("ul", { key: '6e40f05b44667fb23f0b6a74f647553fa518cca4', class: { 'hb-tree': true, 'hb-tree--show-line': this.showLine }, role: "tree" }, this.data.map((node) => this.renderNode(node, 0, indeterminateKeys))));
298
+ return (h("ul", { key: 'df5e7db490f2799102049a16b1ed63f944a9fe27', class: { 'hb-tree': true, 'hb-tree--show-line': this.showLine }, role: "tree" }, this.data.map((node) => this.renderNode(node, 0, indeterminateKeys))));
299
299
  }
300
300
  static get watchers() { return {
301
301
  "data": ["handleDataChange"],
@@ -165,14 +165,14 @@ const Upload = /*@__PURE__*/ proxyCustomElement(class Upload extends H {
165
165
  return null;
166
166
  }
167
167
  render() {
168
- return (h("div", { key: 'a83f9b8d0fd3a0cc618ff33bea2fd35d96b32071', class: "hb-upload" }, h("div", { key: '42f8ae299086ace94524529980d2acdff0abeb16', class: {
168
+ return (h("div", { key: 'f3d7afc72dbdef70156bab23467daaf538a98221', class: "hb-upload" }, h("div", { key: '04bbe9db8bc37125022550e309a14644a245166e', class: {
169
169
  'hb-upload__trigger': true,
170
170
  'hb-upload__trigger--drag': this.drag,
171
171
  'hb-upload__trigger--dragover': this.isDragover,
172
172
  'hb-upload__trigger--disabled': this.disabled,
173
- }, onClick: this.handleClick, onDrop: this.drag ? this.handleDrop : undefined, onDragOver: this.drag ? this.handleDragOver : undefined, onDragLeave: this.drag ? this.handleDragLeave : undefined }, this.drag ? h("span", null, "\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\uFF0C\u6216\u70B9\u51FB\u4E0A\u4F20") : h("slot", null, h("button", { type: "button", class: "hb-upload__btn" }, "\u70B9\u51FB\u4E0A\u4F20"))), h("input", { key: '65a98112cda506b0244451b6ca7b00a200306e00', type: "file", ref: (el) => {
173
+ }, onClick: this.handleClick, onDrop: this.drag ? this.handleDrop : undefined, onDragOver: this.drag ? this.handleDragOver : undefined, onDragLeave: this.drag ? this.handleDragLeave : undefined }, this.drag ? h("span", null, "\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\uFF0C\u6216\u70B9\u51FB\u4E0A\u4F20") : h("slot", null, h("button", { type: "button", class: "hb-upload__btn" }, "\u70B9\u51FB\u4E0A\u4F20"))), h("input", { key: '01315d2df66505338104d01b675775e197806d39', type: "file", ref: (el) => {
174
174
  this.inputRef = el;
175
- }, multiple: this.multiple, accept: this.accept, disabled: this.disabled, style: { display: 'none' }, onChange: this.handleChange }), this.fileList.length > 0 && (h("ul", { key: 'e8f768dc92d273dc81a7a62f08eefd1c3f185251', class: "hb-upload__list" }, this.fileList.map((file, i) => (h("li", { class: { 'hb-upload__item': true, [`hb-upload__item--${file.status}`]: true } }, h("span", { class: "hb-upload__item-name" }, file.name), h("span", { class: "hb-upload__item-size" }, this.formatSize(file.size)), this.renderStatus(file), h("span", { class: "hb-upload__item-remove", onClick: () => this.handleRemove(i) }, "\u00D7"))))))));
175
+ }, multiple: this.multiple, accept: this.accept, disabled: this.disabled, style: { display: 'none' }, onChange: this.handleChange }), this.fileList.length > 0 && (h("ul", { key: '9d30b8fce405c1cbcec9b27ff8f819a0d2cfede4', class: "hb-upload__list" }, this.fileList.map((file, i) => (h("li", { class: { 'hb-upload__item': true, [`hb-upload__item--${file.status}`]: true } }, h("span", { class: "hb-upload__item-name" }, file.name), h("span", { class: "hb-upload__item-size" }, this.formatSize(file.size)), this.renderStatus(file), h("span", { class: "hb-upload__item-remove", onClick: () => this.handleRemove(i) }, "\u00D7"))))))));
176
176
  }
177
177
  static get style() { return HbUploadStyle0; }
178
178
  }, [1, "hb-upload", {
@@ -47,7 +47,7 @@ const Watermark = /*@__PURE__*/ proxyCustomElement(class Watermark extends H {
47
47
  };
48
48
  }
49
49
  render() {
50
- return (h("div", { key: '558715dfd1fb81bab3dace29384aedaf21695cdf', class: "hb-watermark" }, h("div", { key: '26c580f3327e7018425c5e4556b19c9947212ae9', class: "hb-watermark__content" }, h("slot", { key: 'ff91c80742bd753daeef67c4b50b5d2cfec8d4b9' })), h("div", { key: 'c1dc15846f1e6ffa9d0ee968f87deb342bd13176', class: "hb-watermark__layer", style: this.layerStyle, "aria-hidden": "true" })));
50
+ return (h("div", { key: 'f87f4534f042780b2d9845d2433aaca2089dd123', class: "hb-watermark" }, h("div", { key: '15da20909c1eff4f2d2aa2d582e3e575e38839df', class: "hb-watermark__content" }, h("slot", { key: '44db3f4ae92cd8f19ddfb4fbd79962fc71dad1d6' })), h("div", { key: '15c1b61915ab1e6429503f19e93cc7631221a03a', class: "hb-watermark__layer", style: this.layerStyle, "aria-hidden": "true" })));
51
51
  }
52
52
  static get style() { return HbWatermarkStyle0; }
53
53
  }, [1, "hb-watermark", {
@@ -9,7 +9,7 @@ function isSameDay(date1, date2) {
9
9
  date1.getDate() === date2.getDate());
10
10
  }
11
11
  /** 生成 42 天(6 周)的日历网格数据 */
12
- function getCalendarDays(viewDate, selectedDate, today = new Date()) {
12
+ function getCalendarDays(viewDate, selectedDate, today = new Date(), firstDayOfWeek = 0) {
13
13
  const days = [];
14
14
  const year = viewDate.getFullYear();
15
15
  const month = viewDate.getMonth();
@@ -17,9 +17,13 @@ function getCalendarDays(viewDate, selectedDate, today = new Date()) {
17
17
  const lastDay = new Date(year, month + 1, 0);
18
18
  const firstDayWeek = firstDay.getDay();
19
19
  const daysInMonth = lastDay.getDate();
20
+ // 按 firstDayOfWeek 计算需要补多少上月天数。
21
+ // 默认 firstDayOfWeek=0(周日为首列)时,offset = firstDayWeek;
22
+ // firstDayOfWeek=1(周一为首列)时,周日的 offset 多 1、周一的 offset 为 0。
23
+ const offset = ((firstDayWeek - firstDayOfWeek) + 7) % 7;
20
24
  // 上月填充
21
25
  const prevMonth = new Date(year, month - 1, 0);
22
- for (let i = firstDayWeek - 1; i >= 0; i--) {
26
+ for (let i = offset - 1; i >= 0; i--) {
23
27
  const date = new Date(year, month - 1, prevMonth.getDate() - i);
24
28
  days.push({
25
29
  date,
@@ -120,4 +124,4 @@ const WEEK_DAY_NAMES = ['日', '一', '二', '三', '四', '五', '六'];
120
124
 
121
125
  export { MONTH_NAMES as M, WEEK_DAY_NAMES as W, addMonths as a, addYears as b, getYearRangeStart as c, getCalendarYears as d, formatDate as f, getCalendarDays as g, isSameDay as i, parseDate as p };
122
126
 
123
- //# sourceMappingURL=p-cf94cbf6.js.map
127
+ //# sourceMappingURL=p-08b4005c.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-08b4005c.js","mappings":"AAAA;;;;AAYA;SACgB,SAAS,CAAC,KAAW,EAAE,KAAW;IAChD,QACE,KAAK,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,WAAW,EAAE;QAC3C,KAAK,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,QAAQ,EAAE;QACrC,KAAK,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,OAAO,EAAE,EACnC;AACJ,CAAC;AAED;SACgB,eAAe,CAC7B,QAAc,EACd,YAAmB,EACnB,QAAc,IAAI,IAAI,EAAE,EACxB,iBAAyB,CAAC;IAE1B,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAElC,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;IACvC,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;;;;IAKtC,MAAM,MAAM,GAAG,CAAC,CAAC,YAAY,GAAG,cAAc,IAAI,CAAC,IAAI,CAAC,CAAC;;IAGzD,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,EA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AACf,CAAC;AAED;SACgB,iBAAiB,CAAC,QAAc;IAC9C,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACpC,OAAO,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED;MACa,WAAW,GAAG;IACzB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAClC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK;EACpC;AAEF;MACa,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;;;;","names":[],"sources":["src/utils/date-helpers.ts"],"sourcesContent":["/**\n * 日历和日期工具函数\n * 从 DatePicker / DateTimePicker / DatePickerPane 中提取的共享逻辑\n */\n\nexport interface CalendarDay {\n date: Date;\n isCurrentMonth: boolean;\n isToday: boolean;\n isSelected: boolean;\n}\n\n/** 判断两个日期是否为同一天 */\nexport function isSameDay(date1: Date, date2: Date): boolean {\n return (\n date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate()\n );\n}\n\n/** 生成 42 天(6 周)的日历网格数据 */\nexport function getCalendarDays(\n viewDate: Date,\n selectedDate?: Date,\n today: Date = new Date(),\n firstDayOfWeek: number = 0\n): CalendarDay[] {\n const days: CalendarDay[] = [];\n const year = viewDate.getFullYear();\n const month = viewDate.getMonth();\n\n const firstDay = new Date(year, month, 1);\n const lastDay = new Date(year, month + 1, 0);\n const firstDayWeek = firstDay.getDay();\n const daysInMonth = lastDay.getDate();\n\n // 按 firstDayOfWeek 计算需要补多少上月天数。\n // 默认 firstDayOfWeek=0(周日为首列)时,offset = firstDayWeek;\n // firstDayOfWeek=1(周一为首列)时,周日的 offset 多 1、周一的 offset 为 0。\n const offset = ((firstDayWeek - firstDayOfWeek) + 7) % 7;\n\n // 上月填充\n const prevMonth = new Date(year, month - 1, 0);\n for (let i = offset - 1; i >= 0; i--) {\n const date = new Date(year, month - 1, prevMonth.getDate() - i);\n days.push({\n date,\n isCurrentMonth: false,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n // 当月日期\n for (let i = 1; i <= daysInMonth; i++) {\n const date = new Date(year, month, i);\n days.push({\n date,\n isCurrentMonth: true,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n // 下月填充(补齐 42 天)\n const remainingDays = 42 - days.length;\n for (let i = 1; i <= remainingDays; i++) {\n const date = new Date(year, month + 1, i);\n days.push({\n date,\n isCurrentMonth: false,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n return days;\n}\n\n/**\n * 格式化日期为指定格式字符串\n * 支持:YYYY, MM, DD, HH, mm, ss\n */\nexport function formatDate(date: Date, format: string): string {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n\n return format\n .replace('YYYY', String(year))\n .replace('MM', month)\n .replace('DD', day)\n .replace('HH', hours)\n .replace('mm', minutes)\n .replace('ss', seconds);\n}\n\n/** 安全解析日期值 */\nexport function parseDate(value: string | Date | undefined): Date | undefined {\n if (!value) return undefined;\n const date = value instanceof Date ? value : new Date(value);\n if (isNaN(date.getTime())) return undefined;\n return date;\n}\n\n/** 月份偏移,返回新日期对象(不可变) */\nexport function addMonths(date: Date, delta: number): Date {\n const result = new Date(date);\n result.setMonth(result.getMonth() + delta);\n return result;\n}\n\n/** 年份偏移,返回新日期对象(不可变) */\nexport function addYears(date: Date, delta: number): Date {\n const result = new Date(date);\n result.setFullYear(result.getFullYear() + delta);\n return result;\n}\n\n/**\n * 生成 years 视图的 12 年档数据(每档 12 年)。\n * 以 viewDate 所在年份向下取整到 12 的倍数作为起点。\n */\nexport interface CalendarYear {\n year: number;\n isCurrentYearRange: boolean;\n isSelected: boolean;\n}\n\nexport function getCalendarYears(\n viewDate: Date,\n selectedDate?: Date,\n startYearBase?: number\n): CalendarYear[] {\n const year = viewDate.getFullYear();\n const rangeStart = startYearBase ?? year - (year % 12);\n const years: CalendarYear[] = [];\n for (let i = 0; i < 12; i++) {\n const y = rangeStart + i;\n years.push({\n year: y,\n isCurrentYearRange: y === year,\n isSelected: !!selectedDate && selectedDate.getFullYear() === y,\n });\n }\n return years;\n}\n\n/** 获取 years 视图标题所显示的年份档区间起点 */\nexport function getYearRangeStart(viewDate: Date): number {\n const year = viewDate.getFullYear();\n return year - (year % 12);\n}\n\n/** 中文月份名称 */\nexport const MONTH_NAMES = [\n '一月', '二月', '三月', '四月', '五月', '六月',\n '七月', '八月', '九月', '十月', '十一月', '十二月',\n];\n\n/** 中文星期名称 */\nexport const WEEK_DAY_NAMES = ['日', '一', '二', '三', '四', '五', '六'];\n"],"version":3}