huibo-ui 0.4.0 → 0.6.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 (661) hide show
  1. package/dist/cjs/{a11y-802de67a.js → a11y-4385c871.js} +17 -2
  2. package/dist/cjs/a11y-4385c871.js.map +1 -0
  3. package/dist/cjs/{date-helpers-1ffddc59.js → date-helpers-c05ef385.js} +5 -16
  4. package/dist/cjs/date-helpers-c05ef385.js.map +1 -0
  5. package/dist/cjs/hb-alert.cjs.entry.js +2 -1
  6. package/dist/cjs/hb-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/hb-calendar.cjs.entry.js +2 -2
  8. package/dist/cjs/hb-calendar.cjs.entry.js.map +1 -1
  9. package/dist/cjs/hb-cascader.cjs.entry.js +48 -12
  10. package/dist/cjs/hb-cascader.cjs.entry.js.map +1 -1
  11. package/dist/cjs/hb-checkbox-group.cjs.entry.js +12 -8
  12. package/dist/cjs/hb-checkbox-group.cjs.entry.js.map +1 -1
  13. package/dist/cjs/hb-checkbox.cjs.entry.js +9 -4
  14. package/dist/cjs/hb-checkbox.cjs.entry.js.map +1 -1
  15. package/dist/cjs/hb-collapse-item.cjs.entry.js +13 -4
  16. package/dist/cjs/hb-collapse-item.cjs.entry.js.map +1 -1
  17. package/dist/cjs/hb-collapse.cjs.entry.js +20 -15
  18. package/dist/cjs/hb-collapse.cjs.entry.js.map +1 -1
  19. package/dist/cjs/hb-color-picker.cjs.entry.js +22 -19
  20. package/dist/cjs/hb-color-picker.cjs.entry.js.map +1 -1
  21. package/dist/cjs/hb-date-picker-pane.cjs.entry.js +1 -1
  22. package/dist/cjs/hb-date-picker.cjs.entry.js +13 -10
  23. package/dist/cjs/hb-date-picker.cjs.entry.js.map +1 -1
  24. package/dist/cjs/hb-date-range-picker.cjs.entry.js +1 -1
  25. package/dist/cjs/hb-date-time-picker.cjs.entry.js +1 -1
  26. package/dist/cjs/hb-descriptions.cjs.entry.js.map +1 -1
  27. package/dist/cjs/hb-dialog.cjs.entry.js +51 -12
  28. package/dist/cjs/hb-dialog.cjs.entry.js.map +1 -1
  29. package/dist/cjs/hb-drawer.cjs.entry.js +34 -4
  30. package/dist/cjs/hb-drawer.cjs.entry.js.map +1 -1
  31. package/dist/cjs/hb-dropdown.cjs.entry.js +27 -15
  32. package/dist/cjs/hb-dropdown.cjs.entry.js.map +1 -1
  33. package/dist/cjs/hb-empty.cjs.entry.js +1 -1
  34. package/dist/cjs/hb-float-button.cjs.entry.js +2 -2
  35. package/dist/cjs/hb-form-item.cjs.entry.js +67 -16
  36. package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
  37. package/dist/cjs/hb-form.cjs.entry.js +115 -7
  38. package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
  39. package/dist/cjs/hb-image-preview.cjs.entry.js +1 -1
  40. package/dist/cjs/hb-image-preview.cjs.entry.js.map +1 -1
  41. package/dist/cjs/hb-image.cjs.entry.js +21 -3
  42. package/dist/cjs/hb-image.cjs.entry.js.map +1 -1
  43. package/dist/cjs/hb-input-number.cjs.entry.js +7 -7
  44. package/dist/cjs/hb-input-number.cjs.entry.js.map +1 -1
  45. package/dist/cjs/hb-input-tag.cjs.entry.js +2 -2
  46. package/dist/cjs/hb-input.cjs.entry.js +3 -2
  47. package/dist/cjs/hb-input.cjs.entry.js.map +1 -1
  48. package/dist/cjs/hb-layout.cjs.entry.js.map +1 -1
  49. package/dist/cjs/hb-link.cjs.entry.js +2 -2
  50. package/dist/cjs/hb-loading.cjs.entry.js +2 -2
  51. package/dist/cjs/hb-menu-item.cjs.entry.js +14 -5
  52. package/dist/cjs/hb-menu-item.cjs.entry.js.map +1 -1
  53. package/dist/cjs/hb-menu.cjs.entry.js +2 -2
  54. package/dist/cjs/hb-message.cjs.entry.js +13 -4
  55. package/dist/cjs/hb-message.cjs.entry.js.map +1 -1
  56. package/dist/cjs/hb-page-header.cjs.entry.js +1 -1
  57. package/dist/cjs/hb-pagination.cjs.entry.js +8 -5
  58. package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
  59. package/dist/cjs/hb-popconfirm.cjs.entry.js +27 -8
  60. package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
  61. package/dist/cjs/hb-popover.cjs.entry.js +26 -14
  62. package/dist/cjs/hb-popover.cjs.entry.js.map +1 -1
  63. package/dist/cjs/hb-progress.cjs.entry.js +1 -1
  64. package/dist/cjs/hb-radio.cjs.entry.js +8 -3
  65. package/dist/cjs/hb-radio.cjs.entry.js.map +1 -1
  66. package/dist/cjs/hb-rate.cjs.entry.js +3 -3
  67. package/dist/cjs/hb-rate.cjs.entry.js.map +1 -1
  68. package/dist/cjs/hb-row.cjs.entry.js +2 -2
  69. package/dist/cjs/hb-scrollbar.cjs.entry.js +5 -5
  70. package/dist/cjs/hb-scrollbar.cjs.entry.js.map +1 -1
  71. package/dist/cjs/hb-segmented.cjs.entry.js +13 -2
  72. package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
  73. package/dist/cjs/hb-select.cjs.entry.js +100 -19
  74. package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
  75. package/dist/cjs/hb-slider.cjs.entry.js +6 -12
  76. package/dist/cjs/hb-slider.cjs.entry.js.map +1 -1
  77. package/dist/cjs/hb-space.cjs.entry.js +2 -2
  78. package/dist/cjs/hb-statistic.cjs.entry.js +1 -1
  79. package/dist/cjs/hb-step.cjs.entry.js +1 -1
  80. package/dist/cjs/hb-steps.cjs.entry.js +3 -3
  81. package/dist/cjs/hb-steps.cjs.entry.js.map +1 -1
  82. package/dist/cjs/hb-sub-menu.cjs.entry.js +5 -5
  83. package/dist/cjs/hb-switch.cjs.entry.js +3 -3
  84. package/dist/cjs/hb-switch.cjs.entry.js.map +1 -1
  85. package/dist/cjs/hb-tab-pane.cjs.entry.js +1 -1
  86. package/dist/cjs/hb-table.cjs.entry.js +218 -41
  87. package/dist/cjs/hb-table.cjs.entry.js.map +1 -1
  88. package/dist/cjs/hb-tabs.cjs.entry.js +31 -10
  89. package/dist/cjs/hb-tabs.cjs.entry.js.map +1 -1
  90. package/dist/cjs/hb-tag.cjs.entry.js +3 -2
  91. package/dist/cjs/hb-tag.cjs.entry.js.map +1 -1
  92. package/dist/cjs/hb-text.cjs.entry.js +2 -2
  93. package/dist/cjs/hb-time-picker.cjs.entry.js +14 -9
  94. package/dist/cjs/hb-time-picker.cjs.entry.js.map +1 -1
  95. package/dist/cjs/hb-time-select.cjs.entry.js +13 -4
  96. package/dist/cjs/hb-time-select.cjs.entry.js.map +1 -1
  97. package/dist/cjs/hb-tooltip.cjs.entry.js +30 -10
  98. package/dist/cjs/hb-tooltip.cjs.entry.js.map +1 -1
  99. package/dist/cjs/hb-tree-select.cjs.entry.js +125 -10
  100. package/dist/cjs/hb-tree-select.cjs.entry.js.map +1 -1
  101. package/dist/cjs/hb-tree.cjs.entry.js +145 -12
  102. package/dist/cjs/hb-tree.cjs.entry.js.map +1 -1
  103. package/dist/cjs/hb-watermark.cjs.entry.js +19 -11
  104. package/dist/cjs/hb-watermark.cjs.entry.js.map +1 -1
  105. package/dist/cjs/huibo-ui.cjs.js +1 -1
  106. package/dist/cjs/loader.cjs.js +1 -1
  107. package/dist/cjs/transition-59f1da0f.js +34 -0
  108. package/dist/cjs/transition-59f1da0f.js.map +1 -0
  109. package/dist/collection/components/Alert/Alert.js +2 -1
  110. package/dist/collection/components/Alert/Alert.js.map +1 -1
  111. package/dist/collection/components/Calendar/Calendar.js +2 -2
  112. package/dist/collection/components/Calendar/Calendar.js.map +1 -1
  113. package/dist/collection/components/Cascader/Cascader.js +47 -11
  114. package/dist/collection/components/Cascader/Cascader.js.map +1 -1
  115. package/dist/collection/components/Checkbox/Checkbox.js +9 -4
  116. package/dist/collection/components/Checkbox/Checkbox.js.map +1 -1
  117. package/dist/collection/components/Checkbox/CheckboxGroup.js +12 -8
  118. package/dist/collection/components/Checkbox/CheckboxGroup.js.map +1 -1
  119. package/dist/collection/components/Collapse/Collapse.js +20 -15
  120. package/dist/collection/components/Collapse/Collapse.js.map +1 -1
  121. package/dist/collection/components/Collapse/CollapseItem.js +33 -4
  122. package/dist/collection/components/Collapse/CollapseItem.js.map +1 -1
  123. package/dist/collection/components/ColorPicker/ColorPicker.js +22 -19
  124. package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
  125. package/dist/collection/components/ColorPicker/color-picker.css +8 -3
  126. package/dist/collection/components/DatePicker/DatePicker.js +12 -9
  127. package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
  128. package/dist/collection/components/DatePicker/date-picker.css +3 -2
  129. package/dist/collection/components/Descriptions/descriptions.css +30 -10
  130. package/dist/collection/components/Dialog/Dialog.js +54 -10
  131. package/dist/collection/components/Dialog/Dialog.js.map +1 -1
  132. package/dist/collection/components/Dialog/dialog.css +57 -11
  133. package/dist/collection/components/Drawer/Drawer.js +34 -3
  134. package/dist/collection/components/Drawer/Drawer.js.map +1 -1
  135. package/dist/collection/components/Drawer/drawer.css +207 -17
  136. package/dist/collection/components/Dropdown/Dropdown.js +28 -13
  137. package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
  138. package/dist/collection/components/Dropdown/dropdown.css +24 -2
  139. package/dist/collection/components/Empty/Empty.js +1 -1
  140. package/dist/collection/components/FloatButton/FloatButton.js +2 -2
  141. package/dist/collection/components/Form/Form.js +217 -9
  142. package/dist/collection/components/Form/Form.js.map +1 -1
  143. package/dist/collection/components/Form/FormItem.js +126 -18
  144. package/dist/collection/components/Form/FormItem.js.map +1 -1
  145. package/dist/collection/components/Form/form-item.css +8 -2
  146. package/dist/collection/components/Image/Image.js +24 -3
  147. package/dist/collection/components/Image/Image.js.map +1 -1
  148. package/dist/collection/components/ImagePreview/ImagePreview.js +1 -1
  149. package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
  150. package/dist/collection/components/Input/Input.js +3 -2
  151. package/dist/collection/components/Input/Input.js.map +1 -1
  152. package/dist/collection/components/Input/input.css +1 -2
  153. package/dist/collection/components/InputNumber/InputNumber.js +6 -6
  154. package/dist/collection/components/InputNumber/InputNumber.js.map +1 -1
  155. package/dist/collection/components/InputNumber/input-number.css +11 -1
  156. package/dist/collection/components/InputTag/InputTag.js +2 -2
  157. package/dist/collection/components/Layout/Layout.js.map +1 -1
  158. package/dist/collection/components/Layout/Row.js +2 -2
  159. package/dist/collection/components/Layout/layout.css +1713 -576
  160. package/dist/collection/components/Link/Link.js +2 -2
  161. package/dist/collection/components/Loading/Loading.js +2 -2
  162. package/dist/collection/components/Menu/Menu.js +2 -2
  163. package/dist/collection/components/Menu/MenuItem.js +34 -5
  164. package/dist/collection/components/Menu/MenuItem.js.map +1 -1
  165. package/dist/collection/components/Menu/SubMenu.js +4 -4
  166. package/dist/collection/components/Message/Message.js +13 -4
  167. package/dist/collection/components/Message/Message.js.map +1 -1
  168. package/dist/collection/components/PageHeader/PageHeader.js +1 -1
  169. package/dist/collection/components/Pagination/Pagination.js +8 -5
  170. package/dist/collection/components/Pagination/Pagination.js.map +1 -1
  171. package/dist/collection/components/Popconfirm/Popconfirm.js +28 -6
  172. package/dist/collection/components/Popconfirm/Popconfirm.js.map +1 -1
  173. package/dist/collection/components/Popconfirm/popconfirm.css +80 -16
  174. package/dist/collection/components/Popover/Popover.js +27 -12
  175. package/dist/collection/components/Popover/Popover.js.map +1 -1
  176. package/dist/collection/components/Popover/popover.css +49 -8
  177. package/dist/collection/components/Progress/Progress.js +1 -1
  178. package/dist/collection/components/Radio/Radio.js +8 -3
  179. package/dist/collection/components/Radio/Radio.js.map +1 -1
  180. package/dist/collection/components/Rate/Rate.js +3 -3
  181. package/dist/collection/components/Rate/Rate.js.map +1 -1
  182. package/dist/collection/components/Scrollbar/Scrollbar.js +5 -5
  183. package/dist/collection/components/Scrollbar/Scrollbar.js.map +1 -1
  184. package/dist/collection/components/Segmented/Segmented.js +15 -1
  185. package/dist/collection/components/Segmented/Segmented.js.map +1 -1
  186. package/dist/collection/components/Select/Select.js +123 -19
  187. package/dist/collection/components/Select/Select.js.map +1 -1
  188. package/dist/collection/components/Select/select.css +0 -1
  189. package/dist/collection/components/Slider/Slider.js +6 -12
  190. package/dist/collection/components/Slider/Slider.js.map +1 -1
  191. package/dist/collection/components/Slider/slider.css +0 -1
  192. package/dist/collection/components/Space/Space.js +2 -2
  193. package/dist/collection/components/Statistic/Statistic.js +1 -1
  194. package/dist/collection/components/Steps/Step.js +1 -1
  195. package/dist/collection/components/Steps/Steps.js +2 -2
  196. package/dist/collection/components/Steps/Steps.js.map +1 -1
  197. package/dist/collection/components/Switch/Switch.js +3 -3
  198. package/dist/collection/components/Switch/Switch.js.map +1 -1
  199. package/dist/collection/components/Switch/switch.css +3 -2
  200. package/dist/collection/components/Table/Table.js +296 -41
  201. package/dist/collection/components/Table/Table.js.map +1 -1
  202. package/dist/collection/components/Table/table.css +6 -2
  203. package/dist/collection/components/Tabs/TabPane.js +1 -1
  204. package/dist/collection/components/Tabs/Tabs.js +31 -10
  205. package/dist/collection/components/Tabs/Tabs.js.map +1 -1
  206. package/dist/collection/components/Tag/Tag.js +3 -2
  207. package/dist/collection/components/Tag/Tag.js.map +1 -1
  208. package/dist/collection/components/Text/Text.js +2 -2
  209. package/dist/collection/components/TimePicker/TimePicker.js +14 -9
  210. package/dist/collection/components/TimePicker/TimePicker.js.map +1 -1
  211. package/dist/collection/components/TimeSelect/TimeSelect.js +13 -4
  212. package/dist/collection/components/TimeSelect/TimeSelect.js.map +1 -1
  213. package/dist/collection/components/Tooltip/Tooltip.js +31 -8
  214. package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
  215. package/dist/collection/components/Tooltip/tooltip.css +24 -2
  216. package/dist/collection/components/Tree/Tree.js +147 -13
  217. package/dist/collection/components/Tree/Tree.js.map +1 -1
  218. package/dist/collection/components/TreeSelect/TreeSelect.js +130 -11
  219. package/dist/collection/components/TreeSelect/TreeSelect.js.map +1 -1
  220. package/dist/collection/components/Watermark/Watermark.js +19 -11
  221. package/dist/collection/components/Watermark/Watermark.js.map +1 -1
  222. package/dist/collection/utils/a11y.js +15 -1
  223. package/dist/collection/utils/a11y.js.map +1 -1
  224. package/dist/collection/utils/date-helpers.js +4 -15
  225. package/dist/collection/utils/date-helpers.js.map +1 -1
  226. package/dist/collection/utils/transition.js +29 -0
  227. package/dist/collection/utils/transition.js.map +1 -0
  228. package/dist/collection/utils/virtual-scroll.js +39 -0
  229. package/dist/collection/utils/virtual-scroll.js.map +1 -0
  230. package/dist/components/hb-alert.js +2 -1
  231. package/dist/components/hb-alert.js.map +1 -1
  232. package/dist/components/hb-calendar.js +2 -2
  233. package/dist/components/hb-calendar.js.map +1 -1
  234. package/dist/components/hb-cascader.js +48 -12
  235. package/dist/components/hb-cascader.js.map +1 -1
  236. package/dist/components/hb-checkbox-group.js +12 -8
  237. package/dist/components/hb-checkbox-group.js.map +1 -1
  238. package/dist/components/hb-checkbox.js +9 -4
  239. package/dist/components/hb-checkbox.js.map +1 -1
  240. package/dist/components/hb-collapse-item.js +14 -4
  241. package/dist/components/hb-collapse-item.js.map +1 -1
  242. package/dist/components/hb-collapse.js +20 -15
  243. package/dist/components/hb-collapse.js.map +1 -1
  244. package/dist/components/hb-color-picker.js +22 -19
  245. package/dist/components/hb-color-picker.js.map +1 -1
  246. package/dist/components/hb-date-picker-pane.js +1 -1
  247. package/dist/components/hb-date-picker.js +13 -10
  248. package/dist/components/hb-date-picker.js.map +1 -1
  249. package/dist/components/hb-date-range-picker.js +1 -1
  250. package/dist/components/hb-date-time-picker.js +1 -1
  251. package/dist/components/hb-descriptions.js.map +1 -1
  252. package/dist/components/hb-dialog.js +53 -13
  253. package/dist/components/hb-dialog.js.map +1 -1
  254. package/dist/components/hb-drawer.js +36 -5
  255. package/dist/components/hb-drawer.js.map +1 -1
  256. package/dist/components/hb-dropdown.js +28 -15
  257. package/dist/components/hb-dropdown.js.map +1 -1
  258. package/dist/components/hb-empty.js +1 -1
  259. package/dist/components/hb-float-button.js +2 -2
  260. package/dist/components/hb-form-item.js +70 -16
  261. package/dist/components/hb-form-item.js.map +1 -1
  262. package/dist/components/hb-form.js +120 -7
  263. package/dist/components/hb-form.js.map +1 -1
  264. package/dist/components/hb-image-preview.js +1 -1
  265. package/dist/components/hb-image-preview.js.map +1 -1
  266. package/dist/components/hb-image.js +23 -3
  267. package/dist/components/hb-image.js.map +1 -1
  268. package/dist/components/hb-input-number.js +7 -7
  269. package/dist/components/hb-input-number.js.map +1 -1
  270. package/dist/components/hb-input-tag.js +2 -2
  271. package/dist/components/hb-input.js +3 -2
  272. package/dist/components/hb-input.js.map +1 -1
  273. package/dist/components/hb-layout.js.map +1 -1
  274. package/dist/components/hb-link.js +2 -2
  275. package/dist/components/hb-loading.js +2 -2
  276. package/dist/components/hb-menu-item.js +15 -5
  277. package/dist/components/hb-menu-item.js.map +1 -1
  278. package/dist/components/hb-menu.js +2 -2
  279. package/dist/components/hb-message.js +13 -4
  280. package/dist/components/hb-message.js.map +1 -1
  281. package/dist/components/hb-page-header.js +1 -1
  282. package/dist/components/hb-pagination.js +8 -5
  283. package/dist/components/hb-pagination.js.map +1 -1
  284. package/dist/components/hb-popconfirm.js +28 -8
  285. package/dist/components/hb-popconfirm.js.map +1 -1
  286. package/dist/components/hb-popover.js +27 -14
  287. package/dist/components/hb-popover.js.map +1 -1
  288. package/dist/components/hb-progress.js +1 -1
  289. package/dist/components/hb-radio.js +8 -3
  290. package/dist/components/hb-radio.js.map +1 -1
  291. package/dist/components/hb-rate.js +3 -3
  292. package/dist/components/hb-rate.js.map +1 -1
  293. package/dist/components/hb-row.js +2 -2
  294. package/dist/components/hb-scrollbar.js +5 -5
  295. package/dist/components/hb-scrollbar.js.map +1 -1
  296. package/dist/components/hb-segmented.js +15 -2
  297. package/dist/components/hb-segmented.js.map +1 -1
  298. package/dist/components/hb-select.js +105 -20
  299. package/dist/components/hb-select.js.map +1 -1
  300. package/dist/components/hb-slider.js +6 -12
  301. package/dist/components/hb-slider.js.map +1 -1
  302. package/dist/components/hb-space.js +2 -2
  303. package/dist/components/hb-statistic.js +1 -1
  304. package/dist/components/hb-step.js +1 -1
  305. package/dist/components/hb-steps.js +3 -3
  306. package/dist/components/hb-steps.js.map +1 -1
  307. package/dist/components/hb-sub-menu.js +5 -5
  308. package/dist/components/hb-switch.js +3 -3
  309. package/dist/components/hb-switch.js.map +1 -1
  310. package/dist/components/hb-tab-pane.js +1 -1
  311. package/dist/components/hb-table.js +226 -43
  312. package/dist/components/hb-table.js.map +1 -1
  313. package/dist/components/hb-tabs.js +31 -10
  314. package/dist/components/hb-tabs.js.map +1 -1
  315. package/dist/components/hb-tag.js +3 -2
  316. package/dist/components/hb-tag.js.map +1 -1
  317. package/dist/components/hb-text.js +2 -2
  318. package/dist/components/hb-time-picker.js +14 -9
  319. package/dist/components/hb-time-picker.js.map +1 -1
  320. package/dist/components/hb-time-select.js +13 -4
  321. package/dist/components/hb-time-select.js.map +1 -1
  322. package/dist/components/hb-tooltip.js +31 -10
  323. package/dist/components/hb-tooltip.js.map +1 -1
  324. package/dist/components/hb-tree-select.js +129 -11
  325. package/dist/components/hb-tree-select.js.map +1 -1
  326. package/dist/components/hb-tree.js +147 -13
  327. package/dist/components/hb-tree.js.map +1 -1
  328. package/dist/components/hb-watermark.js +19 -11
  329. package/dist/components/hb-watermark.js.map +1 -1
  330. package/dist/{esm/a11y-f9ab2964.js → components/p-00aa34c8.js} +17 -3
  331. package/dist/components/p-00aa34c8.js.map +1 -0
  332. package/dist/components/{p-08b4005c.js → p-e0876aca.js} +5 -16
  333. package/dist/components/p-e0876aca.js.map +1 -0
  334. package/dist/components/p-fad66d69.js +32 -0
  335. package/dist/components/p-fad66d69.js.map +1 -0
  336. package/dist/{components/p-cc0aeb50.js → esm/a11y-e4cde5b0.js} +17 -3
  337. package/dist/esm/a11y-e4cde5b0.js.map +1 -0
  338. package/dist/esm/{date-helpers-44507189.js → date-helpers-259ed2f1.js} +5 -16
  339. package/dist/esm/date-helpers-259ed2f1.js.map +1 -0
  340. package/dist/esm/hb-alert.entry.js +2 -1
  341. package/dist/esm/hb-alert.entry.js.map +1 -1
  342. package/dist/esm/hb-calendar.entry.js +2 -2
  343. package/dist/esm/hb-calendar.entry.js.map +1 -1
  344. package/dist/esm/hb-cascader.entry.js +48 -12
  345. package/dist/esm/hb-cascader.entry.js.map +1 -1
  346. package/dist/esm/hb-checkbox-group.entry.js +12 -8
  347. package/dist/esm/hb-checkbox-group.entry.js.map +1 -1
  348. package/dist/esm/hb-checkbox.entry.js +9 -4
  349. package/dist/esm/hb-checkbox.entry.js.map +1 -1
  350. package/dist/esm/hb-collapse-item.entry.js +13 -4
  351. package/dist/esm/hb-collapse-item.entry.js.map +1 -1
  352. package/dist/esm/hb-collapse.entry.js +20 -15
  353. package/dist/esm/hb-collapse.entry.js.map +1 -1
  354. package/dist/esm/hb-color-picker.entry.js +22 -19
  355. package/dist/esm/hb-color-picker.entry.js.map +1 -1
  356. package/dist/esm/hb-date-picker-pane.entry.js +1 -1
  357. package/dist/esm/hb-date-picker.entry.js +13 -10
  358. package/dist/esm/hb-date-picker.entry.js.map +1 -1
  359. package/dist/esm/hb-date-range-picker.entry.js +1 -1
  360. package/dist/esm/hb-date-time-picker.entry.js +1 -1
  361. package/dist/esm/hb-descriptions.entry.js.map +1 -1
  362. package/dist/esm/hb-dialog.entry.js +51 -12
  363. package/dist/esm/hb-dialog.entry.js.map +1 -1
  364. package/dist/esm/hb-drawer.entry.js +34 -4
  365. package/dist/esm/hb-drawer.entry.js.map +1 -1
  366. package/dist/esm/hb-dropdown.entry.js +27 -15
  367. package/dist/esm/hb-dropdown.entry.js.map +1 -1
  368. package/dist/esm/hb-empty.entry.js +1 -1
  369. package/dist/esm/hb-float-button.entry.js +2 -2
  370. package/dist/esm/hb-form-item.entry.js +67 -16
  371. package/dist/esm/hb-form-item.entry.js.map +1 -1
  372. package/dist/esm/hb-form.entry.js +115 -7
  373. package/dist/esm/hb-form.entry.js.map +1 -1
  374. package/dist/esm/hb-image-preview.entry.js +1 -1
  375. package/dist/esm/hb-image-preview.entry.js.map +1 -1
  376. package/dist/esm/hb-image.entry.js +21 -3
  377. package/dist/esm/hb-image.entry.js.map +1 -1
  378. package/dist/esm/hb-input-number.entry.js +7 -7
  379. package/dist/esm/hb-input-number.entry.js.map +1 -1
  380. package/dist/esm/hb-input-tag.entry.js +2 -2
  381. package/dist/esm/hb-input.entry.js +3 -2
  382. package/dist/esm/hb-input.entry.js.map +1 -1
  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-menu-item.entry.js +14 -5
  387. package/dist/esm/hb-menu-item.entry.js.map +1 -1
  388. package/dist/esm/hb-menu.entry.js +2 -2
  389. package/dist/esm/hb-message.entry.js +13 -4
  390. package/dist/esm/hb-message.entry.js.map +1 -1
  391. package/dist/esm/hb-page-header.entry.js +1 -1
  392. package/dist/esm/hb-pagination.entry.js +8 -5
  393. package/dist/esm/hb-pagination.entry.js.map +1 -1
  394. package/dist/esm/hb-popconfirm.entry.js +27 -8
  395. package/dist/esm/hb-popconfirm.entry.js.map +1 -1
  396. package/dist/esm/hb-popover.entry.js +26 -14
  397. package/dist/esm/hb-popover.entry.js.map +1 -1
  398. package/dist/esm/hb-progress.entry.js +1 -1
  399. package/dist/esm/hb-radio.entry.js +8 -3
  400. package/dist/esm/hb-radio.entry.js.map +1 -1
  401. package/dist/esm/hb-rate.entry.js +3 -3
  402. package/dist/esm/hb-rate.entry.js.map +1 -1
  403. package/dist/esm/hb-row.entry.js +2 -2
  404. package/dist/esm/hb-scrollbar.entry.js +5 -5
  405. package/dist/esm/hb-scrollbar.entry.js.map +1 -1
  406. package/dist/esm/hb-segmented.entry.js +13 -2
  407. package/dist/esm/hb-segmented.entry.js.map +1 -1
  408. package/dist/esm/hb-select.entry.js +100 -19
  409. package/dist/esm/hb-select.entry.js.map +1 -1
  410. package/dist/esm/hb-slider.entry.js +6 -12
  411. package/dist/esm/hb-slider.entry.js.map +1 -1
  412. package/dist/esm/hb-space.entry.js +2 -2
  413. package/dist/esm/hb-statistic.entry.js +1 -1
  414. package/dist/esm/hb-step.entry.js +1 -1
  415. package/dist/esm/hb-steps.entry.js +3 -3
  416. package/dist/esm/hb-steps.entry.js.map +1 -1
  417. package/dist/esm/hb-sub-menu.entry.js +5 -5
  418. package/dist/esm/hb-switch.entry.js +3 -3
  419. package/dist/esm/hb-switch.entry.js.map +1 -1
  420. package/dist/esm/hb-tab-pane.entry.js +1 -1
  421. package/dist/esm/hb-table.entry.js +218 -41
  422. package/dist/esm/hb-table.entry.js.map +1 -1
  423. package/dist/esm/hb-tabs.entry.js +31 -10
  424. package/dist/esm/hb-tabs.entry.js.map +1 -1
  425. package/dist/esm/hb-tag.entry.js +3 -2
  426. package/dist/esm/hb-tag.entry.js.map +1 -1
  427. package/dist/esm/hb-text.entry.js +2 -2
  428. package/dist/esm/hb-time-picker.entry.js +14 -9
  429. package/dist/esm/hb-time-picker.entry.js.map +1 -1
  430. package/dist/esm/hb-time-select.entry.js +13 -4
  431. package/dist/esm/hb-time-select.entry.js.map +1 -1
  432. package/dist/esm/hb-tooltip.entry.js +30 -10
  433. package/dist/esm/hb-tooltip.entry.js.map +1 -1
  434. package/dist/esm/hb-tree-select.entry.js +125 -10
  435. package/dist/esm/hb-tree-select.entry.js.map +1 -1
  436. package/dist/esm/hb-tree.entry.js +145 -12
  437. package/dist/esm/hb-tree.entry.js.map +1 -1
  438. package/dist/esm/hb-watermark.entry.js +19 -11
  439. package/dist/esm/hb-watermark.entry.js.map +1 -1
  440. package/dist/esm/huibo-ui.js +1 -1
  441. package/dist/esm/loader.js +1 -1
  442. package/dist/esm/transition-4295d789.js +32 -0
  443. package/dist/esm/transition-4295d789.js.map +1 -0
  444. package/dist/huibo-ui/huibo-ui.esm.js +1 -1
  445. package/dist/huibo-ui/huibo-ui.esm.js.map +1 -1
  446. package/dist/huibo-ui/p-00aa34c8.js +2 -0
  447. package/dist/huibo-ui/p-00aa34c8.js.map +1 -0
  448. package/dist/huibo-ui/p-0cc1e3f3.entry.js +2 -0
  449. package/dist/huibo-ui/p-0cc1e3f3.entry.js.map +1 -0
  450. package/dist/huibo-ui/{p-678b4212.entry.js → p-0ddae4e9.entry.js} +2 -2
  451. package/dist/huibo-ui/p-10f6c184.entry.js.map +1 -1
  452. package/dist/huibo-ui/{p-f4336be9.entry.js → p-14c3b47b.entry.js} +2 -2
  453. package/dist/huibo-ui/{p-c50ad398.entry.js → p-193efdc0.entry.js} +2 -2
  454. package/dist/huibo-ui/{p-735bceef.entry.js → p-1b98152b.entry.js} +2 -2
  455. package/dist/huibo-ui/p-1b98152b.entry.js.map +1 -0
  456. package/dist/huibo-ui/p-1f6d0adb.entry.js +2 -0
  457. package/dist/huibo-ui/p-1f6d0adb.entry.js.map +1 -0
  458. package/dist/huibo-ui/{p-0d4b2997.entry.js → p-2bcda1bb.entry.js} +2 -2
  459. package/dist/huibo-ui/{p-b8d87f7e.entry.js → p-2ca9796a.entry.js} +2 -2
  460. package/dist/huibo-ui/p-2ca9796a.entry.js.map +1 -0
  461. package/dist/huibo-ui/{p-c80f8ace.entry.js → p-2cf5bf20.entry.js} +2 -2
  462. package/dist/huibo-ui/p-2cf5bf20.entry.js.map +1 -0
  463. package/dist/huibo-ui/{p-7da14d7c.entry.js → p-3042f986.entry.js} +2 -2
  464. package/dist/huibo-ui/{p-e039155d.entry.js → p-3dacb26b.entry.js} +2 -2
  465. package/dist/huibo-ui/{p-a084b8e5.entry.js → p-412ff618.entry.js} +2 -2
  466. package/dist/huibo-ui/p-4148d875.entry.js +2 -0
  467. package/dist/huibo-ui/p-4148d875.entry.js.map +1 -0
  468. package/dist/huibo-ui/{p-6beb5b81.entry.js → p-415295f3.entry.js} +2 -2
  469. package/dist/huibo-ui/p-415295f3.entry.js.map +1 -0
  470. package/dist/huibo-ui/p-494e6c25.entry.js +2 -0
  471. package/dist/huibo-ui/p-494e6c25.entry.js.map +1 -0
  472. package/dist/huibo-ui/p-4d87d7f4.entry.js +2 -0
  473. package/dist/huibo-ui/p-4d87d7f4.entry.js.map +1 -0
  474. package/dist/huibo-ui/p-5e253c15.entry.js +2 -0
  475. package/dist/huibo-ui/p-5e253c15.entry.js.map +1 -0
  476. package/dist/huibo-ui/p-63d68c61.entry.js +2 -0
  477. package/dist/huibo-ui/p-63d68c61.entry.js.map +1 -0
  478. package/dist/huibo-ui/{p-ccd09d5a.entry.js → p-6518c435.entry.js} +2 -2
  479. package/dist/huibo-ui/{p-1f8db37a.entry.js → p-687d8dff.entry.js} +2 -2
  480. package/dist/huibo-ui/p-687d8dff.entry.js.map +1 -0
  481. package/dist/huibo-ui/p-688460ce.entry.js +2 -0
  482. package/dist/huibo-ui/p-688460ce.entry.js.map +1 -0
  483. package/dist/huibo-ui/p-69bb1dd9.entry.js +2 -0
  484. package/dist/huibo-ui/p-69bb1dd9.entry.js.map +1 -0
  485. package/dist/huibo-ui/{p-2811e603.entry.js → p-6bfe1954.entry.js} +2 -2
  486. package/dist/huibo-ui/p-6bfe1954.entry.js.map +1 -0
  487. package/dist/huibo-ui/{p-e5cbfa9e.entry.js → p-6c23fbd1.entry.js} +2 -2
  488. package/dist/huibo-ui/p-6c23fbd1.entry.js.map +1 -0
  489. package/dist/huibo-ui/p-6c8cf248.entry.js.map +1 -1
  490. package/dist/huibo-ui/p-6efed295.entry.js +2 -0
  491. package/dist/huibo-ui/p-6efed295.entry.js.map +1 -0
  492. package/dist/huibo-ui/p-7a38b3e2.entry.js +2 -0
  493. package/dist/huibo-ui/p-7a38b3e2.entry.js.map +1 -0
  494. package/dist/huibo-ui/{p-cad57c2d.entry.js → p-7a682c56.entry.js} +2 -2
  495. package/dist/huibo-ui/{p-a8996d22.entry.js → p-815fc943.entry.js} +2 -2
  496. package/dist/huibo-ui/{p-af74667d.entry.js → p-89be7973.entry.js} +2 -2
  497. package/dist/huibo-ui/p-8a202bc5.entry.js.map +1 -1
  498. package/dist/huibo-ui/{p-213b9de7.entry.js → p-8c4415ed.entry.js} +2 -2
  499. package/dist/huibo-ui/p-8c4415ed.entry.js.map +1 -0
  500. package/dist/huibo-ui/{p-8fdbd17c.entry.js → p-950e7465.entry.js} +2 -2
  501. package/dist/huibo-ui/{p-ab9cf0e4.entry.js → p-96cecd21.entry.js} +2 -2
  502. package/dist/huibo-ui/p-96cecd21.entry.js.map +1 -0
  503. package/dist/huibo-ui/{p-2b4556ff.entry.js → p-98b513cd.entry.js} +2 -2
  504. package/dist/huibo-ui/p-98b513cd.entry.js.map +1 -0
  505. package/dist/huibo-ui/{p-89ea1141.entry.js → p-ac45291c.entry.js} +2 -2
  506. package/dist/huibo-ui/{p-e10fcfbe.entry.js → p-b105cf76.entry.js} +2 -2
  507. package/dist/huibo-ui/p-b105cf76.entry.js.map +1 -0
  508. package/dist/huibo-ui/{p-9a5406f0.entry.js → p-b38802b0.entry.js} +2 -2
  509. package/dist/huibo-ui/{p-9a5406f0.entry.js.map → p-b38802b0.entry.js.map} +1 -1
  510. package/dist/huibo-ui/{p-ea74fcae.entry.js → p-b3fd12c7.entry.js} +2 -2
  511. package/dist/huibo-ui/p-b3fd12c7.entry.js.map +1 -0
  512. package/dist/huibo-ui/p-b5ea18ba.entry.js +2 -0
  513. package/dist/huibo-ui/p-b5ea18ba.entry.js.map +1 -0
  514. package/dist/huibo-ui/{p-41d9c846.entry.js → p-b6afe81e.entry.js} +2 -2
  515. package/dist/huibo-ui/p-b7900dee.entry.js +2 -0
  516. package/dist/huibo-ui/p-b7900dee.entry.js.map +1 -0
  517. package/dist/huibo-ui/p-b8c83751.entry.js +2 -0
  518. package/dist/huibo-ui/p-b8c83751.entry.js.map +1 -0
  519. package/dist/huibo-ui/p-c7713947.entry.js +2 -0
  520. package/dist/huibo-ui/p-c7713947.entry.js.map +1 -0
  521. package/dist/huibo-ui/{p-33de6878.entry.js → p-c869842c.entry.js} +2 -2
  522. package/dist/huibo-ui/p-c869842c.entry.js.map +1 -0
  523. package/dist/huibo-ui/p-c8e917db.entry.js.map +1 -1
  524. package/dist/huibo-ui/p-cb66dbef.entry.js +2 -0
  525. package/dist/huibo-ui/p-cb66dbef.entry.js.map +1 -0
  526. package/dist/huibo-ui/p-cde83f76.entry.js +2 -0
  527. package/dist/huibo-ui/p-cde83f76.entry.js.map +1 -0
  528. package/dist/huibo-ui/{p-f5969181.entry.js → p-dd9c6459.entry.js} +2 -2
  529. package/dist/huibo-ui/{p-08b4005c.js → p-e0876aca.js} +1 -1
  530. package/dist/huibo-ui/p-e0876aca.js.map +1 -0
  531. package/dist/huibo-ui/{p-aa5e5e02.entry.js → p-e1773c93.entry.js} +2 -2
  532. package/dist/huibo-ui/p-e1773c93.entry.js.map +1 -0
  533. package/dist/huibo-ui/{p-626b48f1.entry.js → p-e73c357f.entry.js} +2 -2
  534. package/dist/huibo-ui/p-e73c357f.entry.js.map +1 -0
  535. package/dist/huibo-ui/{p-60532a1f.entry.js → p-e7c73624.entry.js} +2 -2
  536. package/dist/huibo-ui/p-e7c73624.entry.js.map +1 -0
  537. package/dist/huibo-ui/{p-86bdc48a.entry.js → p-e8824b2c.entry.js} +2 -2
  538. package/dist/huibo-ui/p-e8824b2c.entry.js.map +1 -0
  539. package/dist/huibo-ui/{p-13010da2.entry.js → p-e9e7abca.entry.js} +2 -2
  540. package/dist/huibo-ui/{p-f6889710.entry.js → p-ea0823f3.entry.js} +2 -2
  541. package/dist/huibo-ui/p-ea0823f3.entry.js.map +1 -0
  542. package/dist/huibo-ui/{p-b468858e.entry.js → p-f1f2483f.entry.js} +2 -2
  543. package/dist/huibo-ui/p-f69599fa.entry.js +2 -0
  544. package/dist/huibo-ui/p-f69599fa.entry.js.map +1 -0
  545. package/dist/huibo-ui/p-fad66d69.js +2 -0
  546. package/dist/huibo-ui/p-fad66d69.js.map +1 -0
  547. package/dist/huibo-ui/{p-fd8301c6.entry.js → p-fd6831f9.entry.js} +2 -2
  548. package/dist/huibo-ui/p-ff6bc5cc.entry.js +2 -0
  549. package/dist/huibo-ui/p-ff6bc5cc.entry.js.map +1 -0
  550. package/dist/types/components/Cascader/Cascader.d.ts +12 -0
  551. package/dist/types/components/Checkbox/Checkbox.d.ts +5 -0
  552. package/dist/types/components/Checkbox/CheckboxGroup.d.ts +1 -0
  553. package/dist/types/components/Collapse/Collapse.d.ts +2 -0
  554. package/dist/types/components/Collapse/CollapseItem.d.ts +8 -1
  555. package/dist/types/components/Dialog/Dialog.d.ts +13 -1
  556. package/dist/types/components/Drawer/Drawer.d.ts +4 -0
  557. package/dist/types/components/Dropdown/Dropdown.d.ts +6 -2
  558. package/dist/types/components/Form/Form.d.ts +59 -0
  559. package/dist/types/components/Form/FormItem.d.ts +23 -0
  560. package/dist/types/components/Image/Image.d.ts +6 -0
  561. package/dist/types/components/Menu/MenuItem.d.ts +8 -1
  562. package/dist/types/components/Message/Message.d.ts +3 -0
  563. package/dist/types/components/Popconfirm/Popconfirm.d.ts +6 -2
  564. package/dist/types/components/Popover/Popover.d.ts +6 -1
  565. package/dist/types/components/Radio/Radio.d.ts +5 -0
  566. package/dist/types/components/Segmented/Segmented.d.ts +6 -0
  567. package/dist/types/components/Select/Select.d.ts +24 -0
  568. package/dist/types/components/Table/Table.d.ts +110 -9
  569. package/dist/types/components/Tabs/Tabs.d.ts +6 -0
  570. package/dist/types/components/Tooltip/Tooltip.d.ts +6 -0
  571. package/dist/types/components/Tree/Tree.d.ts +24 -0
  572. package/dist/types/components/TreeSelect/TreeSelect.d.ts +17 -0
  573. package/dist/types/components/Watermark/Watermark.d.ts +7 -1
  574. package/dist/types/components.d.ts +188 -6
  575. package/dist/types/utils/a11y.d.ts +9 -0
  576. package/dist/types/utils/transition.d.ts +27 -0
  577. package/dist/types/utils/virtual-scroll.d.ts +38 -0
  578. package/package.json +1 -1
  579. package/dist/cjs/a11y-802de67a.js.map +0 -1
  580. package/dist/cjs/date-helpers-1ffddc59.js.map +0 -1
  581. package/dist/components/p-08b4005c.js.map +0 -1
  582. package/dist/components/p-cc0aeb50.js.map +0 -1
  583. package/dist/esm/a11y-f9ab2964.js.map +0 -1
  584. package/dist/esm/date-helpers-44507189.js.map +0 -1
  585. package/dist/huibo-ui/p-08b4005c.js.map +0 -1
  586. package/dist/huibo-ui/p-1f8db37a.entry.js.map +0 -1
  587. package/dist/huibo-ui/p-213b9de7.entry.js.map +0 -1
  588. package/dist/huibo-ui/p-25fd7d5c.entry.js +0 -2
  589. package/dist/huibo-ui/p-25fd7d5c.entry.js.map +0 -1
  590. package/dist/huibo-ui/p-2811e603.entry.js.map +0 -1
  591. package/dist/huibo-ui/p-2943f5d0.entry.js +0 -2
  592. package/dist/huibo-ui/p-2943f5d0.entry.js.map +0 -1
  593. package/dist/huibo-ui/p-2b4556ff.entry.js.map +0 -1
  594. package/dist/huibo-ui/p-33de6878.entry.js.map +0 -1
  595. package/dist/huibo-ui/p-3807da71.entry.js +0 -2
  596. package/dist/huibo-ui/p-3807da71.entry.js.map +0 -1
  597. package/dist/huibo-ui/p-47ef7a86.entry.js +0 -2
  598. package/dist/huibo-ui/p-47ef7a86.entry.js.map +0 -1
  599. package/dist/huibo-ui/p-4d34e43e.entry.js +0 -2
  600. package/dist/huibo-ui/p-4d34e43e.entry.js.map +0 -1
  601. package/dist/huibo-ui/p-54aa2fd8.entry.js +0 -2
  602. package/dist/huibo-ui/p-54aa2fd8.entry.js.map +0 -1
  603. package/dist/huibo-ui/p-60532a1f.entry.js.map +0 -1
  604. package/dist/huibo-ui/p-626b48f1.entry.js.map +0 -1
  605. package/dist/huibo-ui/p-639f167d.entry.js +0 -2
  606. package/dist/huibo-ui/p-639f167d.entry.js.map +0 -1
  607. package/dist/huibo-ui/p-6beb5b81.entry.js.map +0 -1
  608. package/dist/huibo-ui/p-735bceef.entry.js.map +0 -1
  609. package/dist/huibo-ui/p-76519752.entry.js +0 -2
  610. package/dist/huibo-ui/p-76519752.entry.js.map +0 -1
  611. package/dist/huibo-ui/p-79af2efa.entry.js +0 -2
  612. package/dist/huibo-ui/p-79af2efa.entry.js.map +0 -1
  613. package/dist/huibo-ui/p-7f6975ad.entry.js +0 -2
  614. package/dist/huibo-ui/p-7f6975ad.entry.js.map +0 -1
  615. package/dist/huibo-ui/p-86bdc48a.entry.js.map +0 -1
  616. package/dist/huibo-ui/p-8a8443b8.entry.js +0 -2
  617. package/dist/huibo-ui/p-8a8443b8.entry.js.map +0 -1
  618. package/dist/huibo-ui/p-8fd788c9.entry.js +0 -2
  619. package/dist/huibo-ui/p-8fd788c9.entry.js.map +0 -1
  620. package/dist/huibo-ui/p-92521c31.entry.js +0 -2
  621. package/dist/huibo-ui/p-92521c31.entry.js.map +0 -1
  622. package/dist/huibo-ui/p-965d4d02.entry.js +0 -2
  623. package/dist/huibo-ui/p-965d4d02.entry.js.map +0 -1
  624. package/dist/huibo-ui/p-aa5e5e02.entry.js.map +0 -1
  625. package/dist/huibo-ui/p-ab9cf0e4.entry.js.map +0 -1
  626. package/dist/huibo-ui/p-b8d87f7e.entry.js.map +0 -1
  627. package/dist/huibo-ui/p-c6c91664.entry.js +0 -2
  628. package/dist/huibo-ui/p-c6c91664.entry.js.map +0 -1
  629. package/dist/huibo-ui/p-c80f8ace.entry.js.map +0 -1
  630. package/dist/huibo-ui/p-cc0aeb50.js +0 -2
  631. package/dist/huibo-ui/p-cc0aeb50.js.map +0 -1
  632. package/dist/huibo-ui/p-d79a15b1.entry.js +0 -2
  633. package/dist/huibo-ui/p-d79a15b1.entry.js.map +0 -1
  634. package/dist/huibo-ui/p-e10fcfbe.entry.js.map +0 -1
  635. package/dist/huibo-ui/p-e5cbfa9e.entry.js.map +0 -1
  636. package/dist/huibo-ui/p-ea74fcae.entry.js.map +0 -1
  637. package/dist/huibo-ui/p-edbda423.entry.js +0 -2
  638. package/dist/huibo-ui/p-edbda423.entry.js.map +0 -1
  639. package/dist/huibo-ui/p-f6889710.entry.js.map +0 -1
  640. package/dist/huibo-ui/p-f9bb5217.entry.js +0 -2
  641. package/dist/huibo-ui/p-f9bb5217.entry.js.map +0 -1
  642. package/dist/huibo-ui/p-fea20295.entry.js +0 -2
  643. package/dist/huibo-ui/p-fea20295.entry.js.map +0 -1
  644. /package/dist/huibo-ui/{p-678b4212.entry.js.map → p-0ddae4e9.entry.js.map} +0 -0
  645. /package/dist/huibo-ui/{p-f4336be9.entry.js.map → p-14c3b47b.entry.js.map} +0 -0
  646. /package/dist/huibo-ui/{p-c50ad398.entry.js.map → p-193efdc0.entry.js.map} +0 -0
  647. /package/dist/huibo-ui/{p-0d4b2997.entry.js.map → p-2bcda1bb.entry.js.map} +0 -0
  648. /package/dist/huibo-ui/{p-7da14d7c.entry.js.map → p-3042f986.entry.js.map} +0 -0
  649. /package/dist/huibo-ui/{p-e039155d.entry.js.map → p-3dacb26b.entry.js.map} +0 -0
  650. /package/dist/huibo-ui/{p-a084b8e5.entry.js.map → p-412ff618.entry.js.map} +0 -0
  651. /package/dist/huibo-ui/{p-ccd09d5a.entry.js.map → p-6518c435.entry.js.map} +0 -0
  652. /package/dist/huibo-ui/{p-cad57c2d.entry.js.map → p-7a682c56.entry.js.map} +0 -0
  653. /package/dist/huibo-ui/{p-a8996d22.entry.js.map → p-815fc943.entry.js.map} +0 -0
  654. /package/dist/huibo-ui/{p-af74667d.entry.js.map → p-89be7973.entry.js.map} +0 -0
  655. /package/dist/huibo-ui/{p-8fdbd17c.entry.js.map → p-950e7465.entry.js.map} +0 -0
  656. /package/dist/huibo-ui/{p-89ea1141.entry.js.map → p-ac45291c.entry.js.map} +0 -0
  657. /package/dist/huibo-ui/{p-41d9c846.entry.js.map → p-b6afe81e.entry.js.map} +0 -0
  658. /package/dist/huibo-ui/{p-f5969181.entry.js.map → p-dd9c6459.entry.js.map} +0 -0
  659. /package/dist/huibo-ui/{p-13010da2.entry.js.map → p-e9e7abca.entry.js.map} +0 -0
  660. /package/dist/huibo-ui/{p-b468858e.entry.js.map → p-f1f2483f.entry.js.map} +0 -0
  661. /package/dist/huibo-ui/{p-fd8301c6.entry.js.map → p-fd6831f9.entry.js.map} +0 -0
@@ -1,6 +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
- import { p as parseDate, f as formatDate, a as addMonths, g as getCalendarDays, M as MONTH_NAMES, W as WEEK_DAY_NAMES } from './p-08b4005c.js';
3
+ import { p as parseDate, f as formatDate, a as addMonths, g as getCalendarDays, M as MONTH_NAMES, W as WEEK_DAY_NAMES } from './p-e0876aca.js';
4
+ import { a as activationClickHandler } from './p-00aa34c8.js';
4
5
 
5
6
  const datePickerCss = "/*! 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{.grid{display:grid}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-date-picker-font-size:14px;--hb-date-picker-height:32px;--hb-date-picker-border-color:var(--hb-border-color,#dcdfe6);--hb-date-picker-border-color-hover:var(--hb-color-primary);--hb-date-picker-bg-color:var(--hb-color-white,#fff);display:inline-block;position:relative}.hb-date-picker{display:inline-block;position:relative;width:240px}.hb-date-picker__input-wrapper{cursor:pointer;display:inline-block;position:relative;width:100%}.hb-date-picker__input{background-color:var(--hb-date-picker-bg-color);border:1px solid var(--hb-date-picker-border-color);border-radius:4px;box-sizing:border-box;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:inline-block;font-size:var(--hb-date-picker-font-size);height:var(--hb-date-picker-height);line-height:var(--hb-date-picker-height);outline:none;padding:0 30px 0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}.hb-date-picker__input:focus,.hb-date-picker__input:hover:not(:disabled){border-color:var(--hb-date-picker-border-color-hover)}.hb-date-picker__suffix{align-items:center;display:flex;position:absolute;right:8px;top:50%;transform:translateY(-50%)}.hb-date-picker__clear{align-items:center;color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;display:inline-flex;height:14px;justify-content:center;margin-right:8px;transition:color .2s;width:14px}.hb-date-picker__clear svg{height:100%;width:100%}.hb-date-picker__clear:hover{color:var(--hb-color-text-regular,#606266)}.hb-date-picker__icon{align-items:center;color:var(--hb-color-text-placeholder,#c0c4cc);display:inline-flex;height:14px;justify-content:center;width:14px}.hb-date-picker__icon svg{height:100%;width:100%}.hb-date-picker__dropdown{background-color:var(--hb-date-picker-bg-color);border:1px solid var(--hb-date-picker-border-color);border-radius:4px;box-shadow:0 2px 12px #0000001a;left:0;margin-top:4px;min-width:280px;padding:12px;position:absolute;top:100%;z-index:1000}.hb-date-picker__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-date-picker__header-label{color:var(--hb-color-text-regular,#606266);font-size:14px;font-weight:600}.hb-date-picker__next-btn,.hb-date-picker__prev-btn{background:0 0;border:none;color:var(--hb-color-text-regular,#606266);cursor:pointer;font-size:18px;padding:4px 8px;transition:color .2s}.hb-date-picker__next-btn:hover,.hb-date-picker__prev-btn:hover{color:var(--hb-color-primary)}.hb-date-picker__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-date-picker__weekday{color:var(--hb-color-text-placeholder,#c0c4cc);font-size:12px;font-weight:500;text-align:center}.hb-date-picker__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-date-picker__day{align-items:center;aspect-ratio:1;border-radius:4px;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:flex;font-size:13px;justify-content:center;transition:all .2s}.hb-date-picker__day:hover:not(.hb-date-picker__day--other-month){background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-date-picker__day--other-month{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:default}.hb-date-picker__day--today{color:var(--hb-color-primary);font-weight:600}.hb-date-picker__day--selected{background-color:var(--hb-color-primary);color:var(--hb-color-white,#fff)}.hb-date-picker__day--disabled{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:not-allowed}.hb-date-picker__day--disabled:hover{background-color:#0000}.hb-date-picker--small{width:200px}.hb-date-picker--small .hb-date-picker__input{font-size:12px;height:24px;line-height:24px;padding:0 25px 0 12px}.hb-date-picker--large{width:280px}.hb-date-picker--large .hb-date-picker__input{font-size:16px;height:40px;line-height:40px;padding:0 35px 0 18px}.hb-date-picker--disabled{cursor:not-allowed}.hb-date-picker--disabled .hb-date-picker__input{background-color:var(--hb-fill-color-light,#f5f7fa);border-color:var(--hb-date-picker-border-color);color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}.hb-date-picker__month-grid,.hb-date-picker__year-grid{display:grid;gap:8px;grid-template-columns:repeat(3,1fr);padding:8px 12px}.hb-date-picker__month-cell,.hb-date-picker__year-cell{align-items:center;border-radius:4px;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:flex;font-size:var(--hb-cascader-font-size,14px);height:40px;justify-content:center;transition:background-color .2s,color .2s;-webkit-user-select:none;user-select:none}.hb-date-picker__month-cell:hover:not(.hb-date-picker__month-cell--disabled),.hb-date-picker__year-cell:hover:not(.hb-date-picker__year-cell--disabled){background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-date-picker__month-cell--selected,.hb-date-picker__year-cell--selected{background-color:var(--hb-color-primary-bg,#e6f4ff);color:var(--hb-color-primary,#1677ff);font-weight:600}.hb-date-picker__month-cell--disabled,.hb-date-picker__year-cell--disabled{color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
6
7
  const HbDatePickerStyle0 = datePickerCss;
@@ -54,13 +55,17 @@ const DatePicker = /*@__PURE__*/ proxyCustomElement(class DatePicker extends H {
54
55
  clickOutside = createClickOutsideHandler({
55
56
  host: null,
56
57
  isOpen: () => this.isOpen,
57
- onClose: () => { this.isOpen = false; },
58
+ onClose: () => {
59
+ this.isOpen = false;
60
+ },
58
61
  });
59
62
  componentDidLoad() {
60
63
  this.clickOutside = createClickOutsideHandler({
61
64
  host: this.el,
62
65
  isOpen: () => this.isOpen,
63
- onClose: () => { this.isOpen = false; },
66
+ onClose: () => {
67
+ this.isOpen = false;
68
+ },
64
69
  });
65
70
  this.clickOutside.connect();
66
71
  this.updateInputValue();
@@ -160,13 +165,13 @@ const DatePicker = /*@__PURE__*/ proxyCustomElement(class DatePicker extends H {
160
165
  : this.type === 'year'
161
166
  ? `${Math.floor(panelAnchor.getFullYear() / 12) * 12} - ${Math.floor(panelAnchor.getFullYear() / 12) * 12 + 11}`
162
167
  : `${current.getFullYear()}年 ${MONTH_NAMES[current.getMonth()]}`;
163
- return (h("div", { key: '2d4d4082eee095d506d8450a7f58685cbd4bb1a9', class: {
168
+ return (h("div", { key: '0568629a899d16bd00cf0acdc06c8bf12a50b21d', class: {
164
169
  'hb-date-picker': true,
165
170
  'hb-date-picker--open': this.isOpen,
166
171
  'hb-date-picker--disabled': this.disabled,
167
172
  [`hb-date-picker--${this.size}`]: true,
168
173
  [`hb-date-picker--${this.type}`]: true,
169
- } }, h("div", { key: '6b740a744a4f1d24d1d1b8d65d44a0ca6d69b3fb', class: "hb-date-picker__input-wrapper", onClick: this.handleInputClick }, h("input", { key: '7eeee5862662040a0f2858b04fa4ca96f01e3eb9', type: "text", id: this.inputId, name: this.name, class: "hb-date-picker__input", placeholder: this.placeholder, value: this.inputValue, disabled: this.disabled, readonly: true, role: "combobox", "aria-haspopup": "dialog", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-label": this.placeholder }), h("span", { key: '754144e78db34c6f674469e2c95a51c39828c965', class: "hb-date-picker__suffix" }, this.clearable && this.modelValue && (h("span", { key: '7766158871f0d0b5288b4320f10976704879f680', class: "hb-date-picker__clear", role: "button", "aria-label": "\u6E05\u7A7A", onClick: this.handleClear }, h("svg", { key: '64ec132282290456ec08306f2219eae1fa420377', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { key: 'f1a41eedee2964a1fd92672f90591b2afdd7f0ca', d: "M6 6l12 12M18 6L6 18" })))), h("span", { key: '6c1972309c18139b1cd310f26855dbe846e03982', class: "hb-date-picker__icon", "aria-hidden": "true" }, h("svg", { key: 'e15ef729755d5629fbe16d356a9723ea0ebda9ad', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" }, h("rect", { key: 'db3dd7a69499a878ccd000eae533cbe9485b9d13', x: "3", y: "5", width: "18", height: "16", rx: "2" }), h("path", { key: 'dec2aa31cdf761b591e462d8c9dedb061a73ed63', d: "M3 9h18M8 3v4M16 3v4" }))))), this.isOpen && (h("div", { key: '626c192f0e2d45e7b5efbd53dd02241af51119be', class: "hb-date-picker__dropdown", role: "dialog", "aria-label": this.type === 'month' ? '选择月份' : this.type === 'year' ? '选择年份' : '选择日期' }, h("div", { key: 'a88b651f2defcee8a88ac07a4ce8a2e8a1857854', class: "hb-date-picker__header" }, h("button", { key: 'c47b93061818e710090959432b9e89f9281edb4e', type: "button", class: "hb-date-picker__prev-btn", "aria-label": this.type === 'date' ? '上一月' : '上一年', onClick: () => (this.type === 'date' ? this.changeMonth(-1) : this.changePanelView(-1)) }, "\u2039"), h("span", { key: 'ae85952f2be4f5cd1cb075c3cd9ea69503a0362e', class: "hb-date-picker__header-label", "aria-live": "polite" }, headerLabel), h("button", { key: '0114d37baea55623d2fc65680ae7d73749a1ef24', type: "button", class: "hb-date-picker__next-btn", "aria-label": this.type === 'date' ? '下一月' : '下一年', onClick: () => (this.type === 'date' ? this.changeMonth(1) : this.changePanelView(1)) }, "\u203A")), this.type === 'date' && (h("div", { key: '754807f77924d8a74ff4b5fc26b6f4794f3fcf3b', class: "hb-date-picker__body", role: "grid" }, h("div", { key: '80e7acb304dde0dd8dd256add20b5997c3d8311c', class: "hb-date-picker__weekdays", role: "row" }, WEEK_DAY_NAMES.map(day => (h("div", { class: "hb-date-picker__weekday", role: "columnheader", "aria-disabled": "true" }, day)))), h("div", { key: 'c8dce0eb806e015292e4841d4fe3dd349bc2a52b', class: "hb-date-picker__days", role: "row" }, days.map((day, index) => {
174
+ } }, h("div", { key: 'd37d7631b2c16fb6f52c63aa96ce9752c348ceca', class: "hb-date-picker__input-wrapper", onClick: this.handleInputClick }, h("input", { key: 'b8c2381f26b88bce3032a58cbb74ae05fdb54b7c', type: "text", id: this.inputId, name: this.name, class: "hb-date-picker__input", placeholder: this.placeholder, value: this.inputValue, disabled: this.disabled, readonly: true, role: "combobox", "aria-haspopup": "dialog", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-label": this.placeholder }), h("span", { key: 'df5059ba445476a946f9efc902da4f965c1f5eca', class: "hb-date-picker__suffix" }, this.clearable && this.modelValue && (h("span", { key: 'cab3328768cab68676ccece71bf12161449e52c2', class: "hb-date-picker__clear", role: "button", "aria-label": "\u6E05\u7A7A", tabIndex: 0, onClick: this.handleClear, onKeyDown: activationClickHandler }, h("svg", { key: 'e5970e157bf707bb49f39e800274927c73a79a82', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { key: '6fbe208a529abe7c01822d164f90d6ed80e1071d', d: "M6 6l12 12M18 6L6 18" })))), h("span", { key: 'ab1db32eccdf2e0c507e29de61cc30deaf0d3b9e', class: "hb-date-picker__icon", "aria-hidden": "true" }, h("svg", { key: 'd3439b59946891a511049d955e0d7362b2cca591', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" }, h("rect", { key: '9d6037217b01ff42357346ac092f6bd197414fb7', x: "3", y: "5", width: "18", height: "16", rx: "2" }), h("path", { key: '391e0d2b637622483036325d9c16187e3f2020bd', d: "M3 9h18M8 3v4M16 3v4" }))))), this.isOpen && (h("div", { key: 'b4985a01eadf9109127d599697485de875056be7', class: "hb-date-picker__dropdown", role: "dialog", "aria-label": this.type === 'month' ? '选择月份' : this.type === 'year' ? '选择年份' : '选择日期' }, h("div", { key: '369fae3c69f41c6c23e41598edb728510b41e73e', class: "hb-date-picker__header" }, h("button", { key: '9369433f5827e0bfbaa36ce4b3f06e4fc6d644c0', type: "button", class: "hb-date-picker__prev-btn", "aria-label": this.type === 'date' ? '上一月' : '上一年', onClick: () => (this.type === 'date' ? this.changeMonth(-1) : this.changePanelView(-1)) }, "\u2039"), h("span", { key: 'a7f946f76e088387784a8f5e49c38c8e47938c95', class: "hb-date-picker__header-label", "aria-live": "polite" }, headerLabel), h("button", { key: '2f5e2aca8db2fd8b9350334d3b211f4537b60277', type: "button", class: "hb-date-picker__next-btn", "aria-label": this.type === 'date' ? '下一月' : '下一年', onClick: () => (this.type === 'date' ? this.changeMonth(1) : this.changePanelView(1)) }, "\u203A")), this.type === 'date' && (h("div", { key: 'a8f0c0418770fedced9596685cec4d40c66350d1', class: "hb-date-picker__body", role: "grid" }, h("div", { key: '7b9c1d486b30408007024a6036a7813fcff982de', class: "hb-date-picker__weekdays", role: "row" }, WEEK_DAY_NAMES.map(day => (h("div", { class: "hb-date-picker__weekday", role: "columnheader", "aria-disabled": "true" }, day)))), h("div", { key: '63a5f9b115f2c3b2424064843bc36fe7b79d1ca3', class: "hb-date-picker__days", role: "row" }, days.map((day, index) => {
170
175
  const dayDisabled = day.isCurrentMonth && this.isDateDisabled(day.date);
171
176
  return (h("div", { key: index, class: {
172
177
  'hb-date-picker__day': true,
@@ -175,18 +180,16 @@ const DatePicker = /*@__PURE__*/ proxyCustomElement(class DatePicker extends H {
175
180
  'hb-date-picker__day--selected': day.isSelected,
176
181
  'hb-date-picker__day--disabled': dayDisabled,
177
182
  }, role: "gridcell", "aria-selected": day.isSelected ? 'true' : 'false', "aria-disabled": !day.isCurrentMonth || dayDisabled ? 'true' : undefined, "aria-label": formatDate(day.date, this.format), onClick: () => day.isCurrentMonth && !dayDisabled && this.handleDateSelect(day.date) }, day.date.getDate()));
178
- })))), this.type === 'month' && (h("div", { key: 'ebf1c3935e7c868153823113622e5c08ee0bdffd', class: "hb-date-picker__body hb-date-picker__month-grid", role: "grid" }, MONTH_NAMES.map((name, idx) => {
183
+ })))), this.type === 'month' && (h("div", { key: 'b62f03edcdca73c71ddded45079344778e65abb6', class: "hb-date-picker__body hb-date-picker__month-grid", role: "grid" }, MONTH_NAMES.map((name, idx) => {
179
184
  const probe = new Date(panelAnchor.getFullYear(), idx, 1);
180
185
  const monthDisabled = !!this.disabledDate && this.disabledDate(probe);
181
- const isSelected = !!this.selectedDate &&
182
- this.selectedDate.getFullYear() === panelAnchor.getFullYear() &&
183
- this.selectedDate.getMonth() === idx;
186
+ const isSelected = !!this.selectedDate && this.selectedDate.getFullYear() === panelAnchor.getFullYear() && this.selectedDate.getMonth() === idx;
184
187
  return (h("div", { class: {
185
188
  'hb-date-picker__month-cell': true,
186
189
  'hb-date-picker__month-cell--selected': isSelected,
187
190
  'hb-date-picker__month-cell--disabled': monthDisabled,
188
191
  }, role: "gridcell", "aria-selected": isSelected ? 'true' : 'false', "aria-disabled": monthDisabled ? 'true' : undefined, onClick: () => !monthDisabled && this.handleMonthSelect(idx) }, name));
189
- }))), this.type === 'year' && (h("div", { key: '1cf9555cc9c65d5a723528948cf5e63cc0e416f5', class: "hb-date-picker__body hb-date-picker__year-grid", role: "grid" }, (() => {
192
+ }))), this.type === 'year' && (h("div", { key: 'fb01386b11594c2b1bc14b1eae38f2fd51a5e20b', class: "hb-date-picker__body hb-date-picker__year-grid", role: "grid" }, (() => {
190
193
  const startYear = Math.floor(panelAnchor.getFullYear() / 12) * 12;
191
194
  const years = [];
192
195
  for (let i = 0; i < 12; i++)
@@ -1 +1 @@
1
- {"file":"hb-date-picker.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,oiVAAoiV,CAAC;AAC3jV,2BAAe,aAAa;;MCYf,UAAU;;;;;;;;;IAII,UAAU,CAAiB;;IAG5C,WAAW,GAAW,OAAO,CAAC;;IAG9B,QAAQ,GAAY,KAAK,CAAC;;IAG1B,IAAI,GAAkC,SAAS,CAAC;;IAGhD,SAAS,GAAY,KAAK,CAAC;;IAG3B,MAAM,GAAW,YAAY,CAAC;;IAG9B,WAAW,CAAU;;;;;;;;IASrB,IAAI,GAA8B,MAAM,CAAC;;;;;IAMzC,YAAY,CAA2B;;IAGvC,IAAI,CAAU;;IAGd,OAAO,CAAU;IAEhB,MAAM,GAAY,KAAK,CAAC;IACxB,UAAU,GAAW,EAAE,CAAC;IACxB,YAAY,CAAQ;;IAEpB,aAAa,GAAS,IAAI,IAAI,EAAE,CAAC;;IAGjC,QAAQ,CAA8B;IAEvC,YAAY,GAAG,yBAAyB,CAAC;QAC/C,IAAI,EAAE,IAAW;QACjB,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM;QACzB,OAAO,EAAE,QAAQ,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE;KACxC,CAAC,CAAC;IAEH,gBAAgB;QACd,IAAI,CAAC,YAAY,GAAG,yBAAyB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G,CACA,CACP,CACG,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/DatePicker/date-picker.css?tag=hb-date-picker&encapsulation=shadow","src/components/DatePicker/DatePicker.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n --hb-date-picker-font-size: 14px;\n --hb-date-picker-height: 32px;\n --hb-date-picker-border-color: var(--hb-border-color, #dcdfe6);\n --hb-date-picker-border-color-hover: var(--hb-color-primary);\n --hb-date-picker-bg-color: var(--hb-color-white, #ffffff);\n}\n\n.hb-date-picker {\n display: inline-block;\n position: relative;\n width: 240px;\n}\n\n.hb-date-picker__input-wrapper {\n position: relative;\n display: inline-block;\n width: 100%;\n cursor: pointer;\n}\n\n.hb-date-picker__input {\n display: inline-block;\n width: 100%;\n height: var(--hb-date-picker-height);\n line-height: var(--hb-date-picker-height);\n padding: 0 30px 0 15px;\n font-size: var(--hb-date-picker-font-size);\n color: var(--hb-color-text-regular, #606266);\n background-color: var(--hb-date-picker-bg-color);\n border: 1px solid var(--hb-date-picker-border-color);\n border-radius: 4px;\n box-sizing: border-box;\n cursor: pointer;\n outline: none;\n transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n}\n\n.hb-date-picker__input:hover:not(:disabled) {\n border-color: var(--hb-date-picker-border-color-hover);\n}\n\n.hb-date-picker__input:focus {\n border-color: var(--hb-date-picker-border-color-hover);\n}\n\n.hb-date-picker__suffix {\n position: absolute;\n right: 8px;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n}\n\n.hb-date-picker__clear {\n margin-right: 8px;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n transition: color 0.2s;\n}\n\n.hb-date-picker__clear svg {\n width: 100%;\n height: 100%;\n}\n\n.hb-date-picker__clear:hover {\n color: var(--hb-color-text-regular, #606266);\n}\n\n.hb-date-picker__icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n}\n\n.hb-date-picker__icon svg {\n width: 100%;\n height: 100%;\n}\n\n.hb-date-picker__dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n margin-top: 4px;\n background-color: var(--hb-date-picker-bg-color);\n border: 1px solid var(--hb-date-picker-border-color);\n border-radius: 4px;\n box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);\n z-index: 1000;\n min-width: 280px;\n padding: 12px;\n}\n\n.hb-date-picker__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n}\n\n.hb-date-picker__header-label {\n font-weight: 600;\n font-size: 14px;\n color: var(--hb-color-text-regular, #606266);\n}\n\n.hb-date-picker__prev-btn,\n.hb-date-picker__next-btn {\n background: none;\n border: none;\n font-size: 18px;\n cursor: pointer;\n color: var(--hb-color-text-regular, #606266);\n padding: 4px 8px;\n transition: color 0.2s;\n}\n\n.hb-date-picker__prev-btn:hover,\n.hb-date-picker__next-btn:hover {\n color: var(--hb-color-primary);\n}\n\n.hb-date-picker__weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n margin-bottom: 8px;\n}\n\n.hb-date-picker__weekday {\n text-align: center;\n font-size: 12px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n font-weight: 500;\n}\n\n.hb-date-picker__days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n}\n\n.hb-date-picker__day {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n color: var(--hb-color-text-regular, #606266);\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s;\n}\n\n.hb-date-picker__day:hover:not(.hb-date-picker__day--other-month) {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n}\n\n.hb-date-picker__day--other-month {\n color: var(--hb-color-text-placeholder, #c0c4cc);\n cursor: default;\n}\n\n.hb-date-picker__day--today {\n color: var(--hb-color-primary);\n font-weight: 600;\n}\n\n.hb-date-picker__day--selected {\n background-color: var(--hb-color-primary);\n color: var(--hb-color-white, #ffffff);\n}\n\n.hb-date-picker__day--disabled {\n color: var(--hb-color-text-placeholder, #c0c4cc);\n cursor: not-allowed;\n}\n\n.hb-date-picker__day--disabled:hover {\n background-color: transparent;\n}\n\n.hb-date-picker--small {\n width: 200px;\n}\n\n.hb-date-picker--small .hb-date-picker__input {\n height: 24px;\n line-height: 24px;\n font-size: 12px;\n padding: 0 25px 0 12px;\n}\n\n.hb-date-picker--large {\n width: 280px;\n}\n\n.hb-date-picker--large .hb-date-picker__input {\n height: 40px;\n line-height: 40px;\n font-size: 16px;\n padding: 0 35px 0 18px;\n}\n\n.hb-date-picker--disabled {\n cursor: not-allowed;\n}\n\n.hb-date-picker--disabled .hb-date-picker__input {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n border-color: var(--hb-date-picker-border-color);\n color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n\n\n/* ---- type=month / type=year 选择网格 ---- */\n.hb-date-picker__month-grid,\n.hb-date-picker__year-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding: 8px 12px;\n}\n\n.hb-date-picker__month-cell,\n.hb-date-picker__year-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40px;\n font-size: var(--hb-cascader-font-size, 14px);\n color: var(--hb-color-text-regular, #606266);\n border-radius: 4px;\n cursor: pointer;\n transition: background-color 0.2s, color 0.2s;\n user-select: none;\n}\n\n.hb-date-picker__month-cell:hover:not(.hb-date-picker__month-cell--disabled),\n.hb-date-picker__year-cell:hover:not(.hb-date-picker__year-cell--disabled) {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n}\n\n.hb-date-picker__month-cell--selected,\n.hb-date-picker__year-cell--selected {\n color: var(--hb-color-primary, #1677ff);\n font-weight: 600;\n background-color: var(--hb-color-primary-bg, #e6f4ff);\n}\n\n.hb-date-picker__month-cell--disabled,\n.hb-date-picker__year-cell--disabled {\n color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\nimport { createClickOutsideHandler } from '../../utils/click-outside';\nimport { getCalendarDays, formatDate, parseDate, addMonths, MONTH_NAMES, WEEK_DAY_NAMES } from '../../utils/date-helpers';\n\n/**\n * DatePicker 日期选择器组件\n * 用于选择或输入日期\n */\n@Component({\n tag: 'hb-date-picker',\n styleUrl: 'date-picker.css',\n shadow: true,\n})\nexport class DatePicker {\n @Element() el: HTMLElement;\n\n /** 绑定值 */\n @Prop({ mutable: true }) modelValue?: string | Date;\n\n /** 输入框占位文本 */\n @Prop() placeholder: string = '请选择日期';\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n /** 输入框尺寸 */\n @Prop() size: 'large' | 'default' | 'small' = 'default';\n\n /** 是否可清空 */\n @Prop() clearable: boolean = false;\n\n /** 日期格式 */\n @Prop() format: string = 'YYYY-MM-DD';\n\n /** 显示在输入框中的格式 */\n @Prop() valueFormat?: string;\n\n /**\n * 日期选择器类型:\n * - 'date':日选择(默认)\n * - 'month':月选择(month 视图网格,emit YYYY-MM)\n * - 'year':年选择(year 视图网格,emit YYYY)\n * 注:'datetime'/'week' 请用独立的 DateTimePicker 组件 / 后续补全。\n */\n @Prop() type: 'date' | 'month' | 'year' = 'date';\n\n /**\n * 禁用日期判定函数。返回 true 的日期在日历中不可选(加 disabled 态、不可点击、aria-disabled)。\n * @param date 当前日期格子的 Date 对象\n */\n @Prop() disabledDate?: (date: Date) => boolean;\n\n /** 原生 name 属性 */\n @Prop() name?: string;\n\n /** 原生 id 属性 */\n @Prop() inputId?: string;\n\n @State() isOpen: boolean = false;\n @State() inputValue: string = '';\n @State() selectedDate?: Date;\n /** month/year 模式的面板锚点(不随选择改变,仅导航用) */\n @State() panelViewDate: Date = new Date();\n\n /** 值改变事件 */\n @Event() hbChange: EventEmitter<string | Date>;\n\n private clickOutside = createClickOutsideHandler({\n host: null as any,\n isOpen: () => this.isOpen,\n onClose: () => { this.isOpen = false; },\n });\n\n componentDidLoad() {\n this.clickOutside = createClickOutsideHandler({\n host: this.el,\n isOpen: () => this.isOpen,\n onClose: () => { this.isOpen = false; },\n });\n this.clickOutside.connect();\n this.updateInputValue();\n }\n\n disconnectedCallback() {\n this.clickOutside.disconnect();\n }\n\n @Watch('modelValue')\n handleValueChange() {\n this.updateInputValue();\n }\n\n private updateInputValue() {\n const date = parseDate(this.modelValue);\n if (!date) {\n this.inputValue = '';\n this.selectedDate = undefined;\n return;\n }\n this.selectedDate = date;\n this.inputValue = formatDate(date, this.format);\n }\n\n private handleInputClick = () => {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n // month/year 模式打开时,从已选值或今天初始化面板锚点\n if (this.isOpen && (this.type === 'month' || this.type === 'year')) {\n this.panelViewDate = this.selectedDate ? new Date(this.selectedDate) : new Date();\n }\n };\n\n private handleClear = (e: Event) => {\n e.stopPropagation();\n this.modelValue = undefined;\n this.inputValue = '';\n this.selectedDate = undefined;\n this.isOpen = false;\n this.hbChange.emit(undefined);\n };\n\n private handleDateSelect = (date: Date) => {\n // disabledDate 返回 true 的日期不可选\n if (this.disabledDate && this.disabledDate(date)) return;\n this.selectedDate = date;\n this.modelValue = this.valueFormat ? formatDate(date, this.format) : date;\n this.updateInputValue();\n this.isOpen = false;\n this.hbChange.emit(this.modelValue);\n };\n\n /** type='month':选某月 → 锚定到该月 1 号,emit YYYY-MM */\n private handleMonthSelect = (monthIndex: number) => {\n const next = new Date(this.panelViewDate.getFullYear(), monthIndex, 1);\n if (this.disabledDate && this.disabledDate(next)) return;\n this.selectedDate = next;\n this.panelViewDate = new Date(next);\n const iso = `${next.getFullYear()}-${String(monthIndex + 1).padStart(2, '0')}`;\n this.inputValue = iso;\n this.modelValue = iso;\n this.isOpen = false;\n this.hbChange.emit(iso);\n };\n\n /** type='year':选某年 → 锚定到该年 1 月 1 日,emit YYYY */\n private handleYearSelect = (year: number) => {\n const next = new Date(year, 0, 1);\n if (this.disabledDate && this.disabledDate(next)) return;\n this.selectedDate = next;\n this.panelViewDate = new Date(next);\n const iso = String(year);\n this.inputValue = iso;\n this.modelValue = iso;\n this.isOpen = false;\n this.hbChange.emit(iso);\n };\n\n private changeMonth(delta: number) {\n this.selectedDate = addMonths(this.selectedDate || new Date(), delta);\n }\n\n /** month/year 面板导航:month ±1 年、year ±12 年 */\n private changePanelView(delta: number) {\n const next = new Date(this.panelViewDate);\n if (this.type === 'month') next.setFullYear(next.getFullYear() + delta);\n else next.setFullYear(next.getFullYear() + delta * 12);\n this.panelViewDate = next;\n }\n\n /** 判断某日期是否被 disabledDate 禁用 */\n private isDateDisabled = (date: Date): boolean => {\n return !!this.disabledDate && this.disabledDate(date);\n };\n\n render() {\n const days = getCalendarDays(this.selectedDate || new Date(), this.selectedDate);\n const current = this.selectedDate || new Date();\n\n // month/year 面板锚点:默认用 panelViewDate,未打开时回退到 selectedDate/today\n const panelAnchor = this.panelViewDate || current;\n const headerLabel =\n this.type === 'month'\n ? `${panelAnchor.getFullYear()} 年`\n : this.type === 'year'\n ? `${Math.floor(panelAnchor.getFullYear() / 12) * 12} - ${Math.floor(panelAnchor.getFullYear() / 12) * 12 + 11}`\n : `${current.getFullYear()}年 ${MONTH_NAMES[current.getMonth()]}`;\n\n return (\n <div\n class={{\n 'hb-date-picker': true,\n 'hb-date-picker--open': this.isOpen,\n 'hb-date-picker--disabled': this.disabled,\n [`hb-date-picker--${this.size}`]: true,\n [`hb-date-picker--${this.type}`]: true,\n }}\n >\n <div class=\"hb-date-picker__input-wrapper\" onClick={this.handleInputClick}>\n <input\n type=\"text\"\n id={this.inputId}\n name={this.name}\n class=\"hb-date-picker__input\"\n placeholder={this.placeholder}\n value={this.inputValue}\n disabled={this.disabled}\n readonly\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={this.isOpen ? 'true' : 'false'}\n aria-label={this.placeholder}\n />\n <span class=\"hb-date-picker__suffix\">\n {this.clearable && this.modelValue && (\n <span class=\"hb-date-picker__clear\" role=\"button\" aria-label=\"清空\" onClick={this.handleClear}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={2} stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </svg>\n </span>\n )}\n <span class=\"hb-date-picker__icon\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={2} stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 9h18M8 3v4M16 3v4\" />\n </svg>\n </span>\n </span>\n </div>\n {this.isOpen && (\n <div class=\"hb-date-picker__dropdown\" role=\"dialog\" aria-label={this.type === 'month' ? '选择月份' : this.type === 'year' ? '选择年份' : '选择日期'}>\n <div class=\"hb-date-picker__header\">\n <button\n type=\"button\"\n class=\"hb-date-picker__prev-btn\"\n aria-label={this.type === 'date' ? '上一月' : '上一年'}\n onClick={() => (this.type === 'date' ? this.changeMonth(-1) : this.changePanelView(-1))}\n >\n ‹\n </button>\n <span class=\"hb-date-picker__header-label\" aria-live=\"polite\">{headerLabel}</span>\n <button\n type=\"button\"\n class=\"hb-date-picker__next-btn\"\n aria-label={this.type === 'date' ? '下一月' : '下一年'}\n onClick={() => (this.type === 'date' ? this.changeMonth(1) : this.changePanelView(1))}\n >\n ›\n </button>\n </div>\n {this.type === 'date' && (\n <div class=\"hb-date-picker__body\" role=\"grid\">\n <div class=\"hb-date-picker__weekdays\" role=\"row\">\n {WEEK_DAY_NAMES.map(day => (\n <div class=\"hb-date-picker__weekday\" role=\"columnheader\" aria-disabled=\"true\">{day}</div>\n ))}\n </div>\n <div class=\"hb-date-picker__days\" role=\"row\">\n {days.map((day, index) => {\n const dayDisabled = day.isCurrentMonth && this.isDateDisabled(day.date);\n return (\n <div\n key={index}\n class={{\n 'hb-date-picker__day': true,\n 'hb-date-picker__day--other-month': !day.isCurrentMonth,\n 'hb-date-picker__day--today': day.isToday,\n 'hb-date-picker__day--selected': day.isSelected,\n 'hb-date-picker__day--disabled': dayDisabled,\n }}\n role=\"gridcell\"\n aria-selected={day.isSelected ? 'true' : 'false'}\n aria-disabled={!day.isCurrentMonth || dayDisabled ? 'true' : undefined}\n aria-label={formatDate(day.date, this.format)}\n onClick={() => day.isCurrentMonth && !dayDisabled && this.handleDateSelect(day.date)}\n >\n {day.date.getDate()}\n </div>\n );\n })}\n </div>\n </div>\n )}\n {this.type === 'month' && (\n <div class=\"hb-date-picker__body hb-date-picker__month-grid\" role=\"grid\">\n {MONTH_NAMES.map((name, idx) => {\n const probe = new Date(panelAnchor.getFullYear(), idx, 1);\n const monthDisabled = !!this.disabledDate && this.disabledDate(probe);\n const isSelected =\n !!this.selectedDate &&\n this.selectedDate.getFullYear() === panelAnchor.getFullYear() &&\n this.selectedDate.getMonth() === idx;\n return (\n <div\n class={{\n 'hb-date-picker__month-cell': true,\n 'hb-date-picker__month-cell--selected': isSelected,\n 'hb-date-picker__month-cell--disabled': monthDisabled,\n }}\n role=\"gridcell\"\n aria-selected={isSelected ? 'true' : 'false'}\n aria-disabled={monthDisabled ? 'true' : undefined}\n onClick={() => !monthDisabled && this.handleMonthSelect(idx)}\n >\n {name}\n </div>\n );\n })}\n </div>\n )}\n {this.type === 'year' && (\n <div class=\"hb-date-picker__body hb-date-picker__year-grid\" role=\"grid\">\n {(() => {\n const startYear = Math.floor(panelAnchor.getFullYear() / 12) * 12;\n const years: number[] = [];\n for (let i = 0; i < 12; i++) years.push(startYear + i);\n return years.map(y => {\n const probe = new Date(y, 0, 1);\n const yearDisabled = !!this.disabledDate && this.disabledDate(probe);\n const isSelected = !!this.selectedDate && this.selectedDate.getFullYear() === y;\n return (\n <div\n class={{\n 'hb-date-picker__year-cell': true,\n 'hb-date-picker__year-cell--selected': isSelected,\n 'hb-date-picker__year-cell--disabled': yearDisabled,\n }}\n role=\"gridcell\"\n aria-selected={isSelected ? 'true' : 'false'}\n aria-disabled={yearDisabled ? 'true' : undefined}\n onClick={() => !yearDisabled && this.handleYearSelect(y)}\n >\n {y}\n </div>\n );\n });\n })()}\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n}\n\n"],"version":3}
1
+ {"file":"hb-date-picker.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,oiVAAoiV,CAAC;AAC3jV,2BAAe,aAAa;;MCaf,UAAU;;;;;;;;;IAII,UAAU,CAAiB;;IAG5C,WAAW,GAAW,OAAO,CAAC;;IAG9B,QAAQ,GAAY,KAAK,CAAC;;IAG1B,IAAI,GAAkC,SAAS,CAAC;;IAGhD,SAAS,GAAY,KAAK,CAAC;;IAG3B,MAAM,GAAW,YAAY,CAAC;;IAG9B,WAAW,CAAU;;;;;;;;IASrB,IAAI,GAA8B,MAAM,CAAC;;;;;IAMzC,YAAY,CAA2B;;IAGvC,IAAI,CAAU;;IAGd,OAAO,CAAU;IAEhB,MAAM,GAAY,KAAK,CAAC;IACxB,UAAU,GAAW,EAAE,CAAC;IACxB,YAAY,CAAQ;;IAEpB,aAAa,GAAS,IAAI,IAAI,EAAE,CAAC;;IAGjC,QAAQ,CAA8B;IAEvC,YAAY,GAAG,yBAAyB,CAAC;QAC/C,IAAI,EAAE,IAAW;QACjB,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM;QACzB,OAAO,EAAE;YACP,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB;KACF,CAAC,CAAC;IAEH,gBAAgB;QACd,IAAI,CAAC,YAAY,GAAG,yBAAyB,CAAC;YAC5C,IAAI,EAAE,IAAI,CAAC,EAAE;YACb,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM;YACzB,OAAO,EAAE;gBACP,IAAI,CAAC,MAAM,GAAG,KAAK,CA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":["src/components/DatePicker/date-picker.css?tag=hb-date-picker&encapsulation=shadow","src/components/DatePicker/DatePicker.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n --hb-date-picker-font-size: 14px;\n --hb-date-picker-height: 32px;\n --hb-date-picker-border-color: var(--hb-border-color, #dcdfe6);\n --hb-date-picker-border-color-hover: var(--hb-color-primary);\n --hb-date-picker-bg-color: var(--hb-color-white, #ffffff);\n}\n\n.hb-date-picker {\n display: inline-block;\n position: relative;\n width: 240px;\n}\n\n.hb-date-picker__input-wrapper {\n position: relative;\n display: inline-block;\n width: 100%;\n cursor: pointer;\n}\n\n.hb-date-picker__input {\n display: inline-block;\n width: 100%;\n height: var(--hb-date-picker-height);\n line-height: var(--hb-date-picker-height);\n padding: 0 30px 0 15px;\n font-size: var(--hb-date-picker-font-size);\n color: var(--hb-color-text-regular, #606266);\n background-color: var(--hb-date-picker-bg-color);\n border: 1px solid var(--hb-date-picker-border-color);\n border-radius: 4px;\n box-sizing: border-box;\n cursor: pointer;\n outline: none;\n transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n}\n\n.hb-date-picker__input:hover:not(:disabled) {\n border-color: var(--hb-date-picker-border-color-hover);\n}\n\n.hb-date-picker__input:focus {\n border-color: var(--hb-date-picker-border-color-hover);\n}\n\n.hb-date-picker__suffix {\n position: absolute;\n right: 8px;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n}\n\n.hb-date-picker__clear {\n margin-right: 8px;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n transition: color 0.2s;\n}\n\n.hb-date-picker__clear svg {\n width: 100%;\n height: 100%;\n}\n\n.hb-date-picker__clear:hover {\n color: var(--hb-color-text-regular, #606266);\n}\n\n.hb-date-picker__icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n}\n\n.hb-date-picker__icon svg {\n width: 100%;\n height: 100%;\n}\n\n.hb-date-picker__dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n margin-top: 4px;\n background-color: var(--hb-date-picker-bg-color);\n border: 1px solid var(--hb-date-picker-border-color);\n border-radius: 4px;\n box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);\n z-index: 1000;\n min-width: 280px;\n padding: 12px;\n}\n\n.hb-date-picker__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n}\n\n.hb-date-picker__header-label {\n font-weight: 600;\n font-size: 14px;\n color: var(--hb-color-text-regular, #606266);\n}\n\n.hb-date-picker__prev-btn,\n.hb-date-picker__next-btn {\n background: none;\n border: none;\n font-size: 18px;\n cursor: pointer;\n color: var(--hb-color-text-regular, #606266);\n padding: 4px 8px;\n transition: color 0.2s;\n}\n\n.hb-date-picker__prev-btn:hover,\n.hb-date-picker__next-btn:hover {\n color: var(--hb-color-primary);\n}\n\n.hb-date-picker__weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n margin-bottom: 8px;\n}\n\n.hb-date-picker__weekday {\n text-align: center;\n font-size: 12px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n font-weight: 500;\n}\n\n.hb-date-picker__days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n}\n\n.hb-date-picker__day {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n color: var(--hb-color-text-regular, #606266);\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s;\n}\n\n.hb-date-picker__day:hover:not(.hb-date-picker__day--other-month) {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n}\n\n.hb-date-picker__day--other-month {\n color: var(--hb-color-text-placeholder, #c0c4cc);\n cursor: default;\n}\n\n.hb-date-picker__day--today {\n color: var(--hb-color-primary);\n font-weight: 600;\n}\n\n.hb-date-picker__day--selected {\n background-color: var(--hb-color-primary);\n color: var(--hb-color-white, #ffffff);\n}\n\n.hb-date-picker__day--disabled {\n color: var(--hb-color-text-placeholder, #c0c4cc);\n cursor: not-allowed;\n}\n\n.hb-date-picker__day--disabled:hover {\n background-color: transparent;\n}\n\n.hb-date-picker--small {\n width: 200px;\n}\n\n.hb-date-picker--small .hb-date-picker__input {\n height: 24px;\n line-height: 24px;\n font-size: 12px;\n padding: 0 25px 0 12px;\n}\n\n.hb-date-picker--large {\n width: 280px;\n}\n\n.hb-date-picker--large .hb-date-picker__input {\n height: 40px;\n line-height: 40px;\n font-size: 16px;\n padding: 0 35px 0 18px;\n}\n\n.hb-date-picker--disabled {\n cursor: not-allowed;\n}\n\n.hb-date-picker--disabled .hb-date-picker__input {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n border-color: var(--hb-date-picker-border-color);\n color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n\n/* ---- type=month / type=year 选择网格 ---- */\n.hb-date-picker__month-grid,\n.hb-date-picker__year-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding: 8px 12px;\n}\n\n.hb-date-picker__month-cell,\n.hb-date-picker__year-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40px;\n font-size: var(--hb-cascader-font-size, 14px);\n color: var(--hb-color-text-regular, #606266);\n border-radius: 4px;\n cursor: pointer;\n transition:\n background-color 0.2s,\n color 0.2s;\n user-select: none;\n}\n\n.hb-date-picker__month-cell:hover:not(.hb-date-picker__month-cell--disabled),\n.hb-date-picker__year-cell:hover:not(.hb-date-picker__year-cell--disabled) {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n}\n\n.hb-date-picker__month-cell--selected,\n.hb-date-picker__year-cell--selected {\n color: var(--hb-color-primary, #1677ff);\n font-weight: 600;\n background-color: var(--hb-color-primary-bg, #e6f4ff);\n}\n\n.hb-date-picker__month-cell--disabled,\n.hb-date-picker__year-cell--disabled {\n color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\nimport { createClickOutsideHandler } from '../../utils/click-outside';\nimport { getCalendarDays, formatDate, parseDate, addMonths, MONTH_NAMES, WEEK_DAY_NAMES } from '../../utils/date-helpers';\nimport { activationClickHandler } from '../../utils/a11y';\n\n/**\n * DatePicker 日期选择器组件\n * 用于选择或输入日期\n */\n@Component({\n tag: 'hb-date-picker',\n styleUrl: 'date-picker.css',\n shadow: true,\n})\nexport class DatePicker {\n @Element() el: HTMLElement;\n\n /** 绑定值 */\n @Prop({ mutable: true }) modelValue?: string | Date;\n\n /** 输入框占位文本 */\n @Prop() placeholder: string = '请选择日期';\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n /** 输入框尺寸 */\n @Prop() size: 'large' | 'default' | 'small' = 'default';\n\n /** 是否可清空 */\n @Prop() clearable: boolean = false;\n\n /** 日期格式 */\n @Prop() format: string = 'YYYY-MM-DD';\n\n /** 显示在输入框中的格式 */\n @Prop() valueFormat?: string;\n\n /**\n * 日期选择器类型:\n * - 'date':日选择(默认)\n * - 'month':月选择(month 视图网格,emit YYYY-MM)\n * - 'year':年选择(year 视图网格,emit YYYY)\n * 注:'datetime'/'week' 请用独立的 DateTimePicker 组件 / 后续补全。\n */\n @Prop() type: 'date' | 'month' | 'year' = 'date';\n\n /**\n * 禁用日期判定函数。返回 true 的日期在日历中不可选(加 disabled 态、不可点击、aria-disabled)。\n * @param date 当前日期格子的 Date 对象\n */\n @Prop() disabledDate?: (date: Date) => boolean;\n\n /** 原生 name 属性 */\n @Prop() name?: string;\n\n /** 原生 id 属性 */\n @Prop() inputId?: string;\n\n @State() isOpen: boolean = false;\n @State() inputValue: string = '';\n @State() selectedDate?: Date;\n /** month/year 模式的面板锚点(不随选择改变,仅导航用) */\n @State() panelViewDate: Date = new Date();\n\n /** 值改变事件 */\n @Event() hbChange: EventEmitter<string | Date>;\n\n private clickOutside = createClickOutsideHandler({\n host: null as any,\n isOpen: () => this.isOpen,\n onClose: () => {\n this.isOpen = false;\n },\n });\n\n componentDidLoad() {\n this.clickOutside = createClickOutsideHandler({\n host: this.el,\n isOpen: () => this.isOpen,\n onClose: () => {\n this.isOpen = false;\n },\n });\n this.clickOutside.connect();\n this.updateInputValue();\n }\n\n disconnectedCallback() {\n this.clickOutside.disconnect();\n }\n\n @Watch('modelValue')\n handleValueChange() {\n this.updateInputValue();\n }\n\n private updateInputValue() {\n const date = parseDate(this.modelValue);\n if (!date) {\n this.inputValue = '';\n this.selectedDate = undefined;\n return;\n }\n this.selectedDate = date;\n this.inputValue = formatDate(date, this.format);\n }\n\n private handleInputClick = () => {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n // month/year 模式打开时,从已选值或今天初始化面板锚点\n if (this.isOpen && (this.type === 'month' || this.type === 'year')) {\n this.panelViewDate = this.selectedDate ? new Date(this.selectedDate) : new Date();\n }\n };\n\n private handleClear = (e: Event) => {\n e.stopPropagation();\n this.modelValue = undefined;\n this.inputValue = '';\n this.selectedDate = undefined;\n this.isOpen = false;\n this.hbChange.emit(undefined);\n };\n\n private handleDateSelect = (date: Date) => {\n // disabledDate 返回 true 的日期不可选\n if (this.disabledDate && this.disabledDate(date)) return;\n this.selectedDate = date;\n this.modelValue = this.valueFormat ? formatDate(date, this.format) : date;\n this.updateInputValue();\n this.isOpen = false;\n this.hbChange.emit(this.modelValue);\n };\n\n /** type='month':选某月 → 锚定到该月 1 号,emit YYYY-MM */\n private handleMonthSelect = (monthIndex: number) => {\n const next = new Date(this.panelViewDate.getFullYear(), monthIndex, 1);\n if (this.disabledDate && this.disabledDate(next)) return;\n this.selectedDate = next;\n this.panelViewDate = new Date(next);\n const iso = `${next.getFullYear()}-${String(monthIndex + 1).padStart(2, '0')}`;\n this.inputValue = iso;\n this.modelValue = iso;\n this.isOpen = false;\n this.hbChange.emit(iso);\n };\n\n /** type='year':选某年 → 锚定到该年 1 月 1 日,emit YYYY */\n private handleYearSelect = (year: number) => {\n const next = new Date(year, 0, 1);\n if (this.disabledDate && this.disabledDate(next)) return;\n this.selectedDate = next;\n this.panelViewDate = new Date(next);\n const iso = String(year);\n this.inputValue = iso;\n this.modelValue = iso;\n this.isOpen = false;\n this.hbChange.emit(iso);\n };\n\n private changeMonth(delta: number) {\n this.selectedDate = addMonths(this.selectedDate || new Date(), delta);\n }\n\n /** month/year 面板导航:month ±1 年、year ±12 年 */\n private changePanelView(delta: number) {\n const next = new Date(this.panelViewDate);\n if (this.type === 'month') next.setFullYear(next.getFullYear() + delta);\n else next.setFullYear(next.getFullYear() + delta * 12);\n this.panelViewDate = next;\n }\n\n /** 判断某日期是否被 disabledDate 禁用 */\n private isDateDisabled = (date: Date): boolean => {\n return !!this.disabledDate && this.disabledDate(date);\n };\n\n render() {\n const days = getCalendarDays(this.selectedDate || new Date(), this.selectedDate);\n const current = this.selectedDate || new Date();\n\n // month/year 面板锚点:默认用 panelViewDate,未打开时回退到 selectedDate/today\n const panelAnchor = this.panelViewDate || current;\n const headerLabel =\n this.type === 'month'\n ? `${panelAnchor.getFullYear()} 年`\n : this.type === 'year'\n ? `${Math.floor(panelAnchor.getFullYear() / 12) * 12} - ${Math.floor(panelAnchor.getFullYear() / 12) * 12 + 11}`\n : `${current.getFullYear()}年 ${MONTH_NAMES[current.getMonth()]}`;\n\n return (\n <div\n class={{\n 'hb-date-picker': true,\n 'hb-date-picker--open': this.isOpen,\n 'hb-date-picker--disabled': this.disabled,\n [`hb-date-picker--${this.size}`]: true,\n [`hb-date-picker--${this.type}`]: true,\n }}\n >\n <div class=\"hb-date-picker__input-wrapper\" onClick={this.handleInputClick}>\n <input\n type=\"text\"\n id={this.inputId}\n name={this.name}\n class=\"hb-date-picker__input\"\n placeholder={this.placeholder}\n value={this.inputValue}\n disabled={this.disabled}\n readonly\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={this.isOpen ? 'true' : 'false'}\n aria-label={this.placeholder}\n />\n <span class=\"hb-date-picker__suffix\">\n {this.clearable && this.modelValue && (\n <span class=\"hb-date-picker__clear\" role=\"button\" aria-label=\"清空\" tabIndex={0} onClick={this.handleClear} onKeyDown={activationClickHandler}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={2} stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </svg>\n </span>\n )}\n <span class=\"hb-date-picker__icon\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={2} stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 9h18M8 3v4M16 3v4\" />\n </svg>\n </span>\n </span>\n </div>\n {this.isOpen && (\n <div class=\"hb-date-picker__dropdown\" role=\"dialog\" aria-label={this.type === 'month' ? '选择月份' : this.type === 'year' ? '选择年份' : '选择日期'}>\n <div class=\"hb-date-picker__header\">\n <button\n type=\"button\"\n class=\"hb-date-picker__prev-btn\"\n aria-label={this.type === 'date' ? '上一月' : '上一年'}\n onClick={() => (this.type === 'date' ? this.changeMonth(-1) : this.changePanelView(-1))}\n >\n ‹\n </button>\n <span class=\"hb-date-picker__header-label\" aria-live=\"polite\">\n {headerLabel}\n </span>\n <button\n type=\"button\"\n class=\"hb-date-picker__next-btn\"\n aria-label={this.type === 'date' ? '下一月' : '下一年'}\n onClick={() => (this.type === 'date' ? this.changeMonth(1) : this.changePanelView(1))}\n >\n ›\n </button>\n </div>\n {this.type === 'date' && (\n <div class=\"hb-date-picker__body\" role=\"grid\">\n <div class=\"hb-date-picker__weekdays\" role=\"row\">\n {WEEK_DAY_NAMES.map(day => (\n <div class=\"hb-date-picker__weekday\" role=\"columnheader\" aria-disabled=\"true\">\n {day}\n </div>\n ))}\n </div>\n <div class=\"hb-date-picker__days\" role=\"row\">\n {days.map((day, index) => {\n const dayDisabled = day.isCurrentMonth && this.isDateDisabled(day.date);\n return (\n <div\n key={index}\n class={{\n 'hb-date-picker__day': true,\n 'hb-date-picker__day--other-month': !day.isCurrentMonth,\n 'hb-date-picker__day--today': day.isToday,\n 'hb-date-picker__day--selected': day.isSelected,\n 'hb-date-picker__day--disabled': dayDisabled,\n }}\n role=\"gridcell\"\n aria-selected={day.isSelected ? 'true' : 'false'}\n aria-disabled={!day.isCurrentMonth || dayDisabled ? 'true' : undefined}\n aria-label={formatDate(day.date, this.format)}\n onClick={() => day.isCurrentMonth && !dayDisabled && this.handleDateSelect(day.date)}\n >\n {day.date.getDate()}\n </div>\n );\n })}\n </div>\n </div>\n )}\n {this.type === 'month' && (\n <div class=\"hb-date-picker__body hb-date-picker__month-grid\" role=\"grid\">\n {MONTH_NAMES.map((name, idx) => {\n const probe = new Date(panelAnchor.getFullYear(), idx, 1);\n const monthDisabled = !!this.disabledDate && this.disabledDate(probe);\n const isSelected = !!this.selectedDate && this.selectedDate.getFullYear() === panelAnchor.getFullYear() && this.selectedDate.getMonth() === idx;\n return (\n <div\n class={{\n 'hb-date-picker__month-cell': true,\n 'hb-date-picker__month-cell--selected': isSelected,\n 'hb-date-picker__month-cell--disabled': monthDisabled,\n }}\n role=\"gridcell\"\n aria-selected={isSelected ? 'true' : 'false'}\n aria-disabled={monthDisabled ? 'true' : undefined}\n onClick={() => !monthDisabled && this.handleMonthSelect(idx)}\n >\n {name}\n </div>\n );\n })}\n </div>\n )}\n {this.type === 'year' && (\n <div class=\"hb-date-picker__body hb-date-picker__year-grid\" role=\"grid\">\n {(() => {\n const startYear = Math.floor(panelAnchor.getFullYear() / 12) * 12;\n const years: number[] = [];\n for (let i = 0; i < 12; i++) years.push(startYear + i);\n return years.map(y => {\n const probe = new Date(y, 0, 1);\n const yearDisabled = !!this.disabledDate && this.disabledDate(probe);\n const isSelected = !!this.selectedDate && this.selectedDate.getFullYear() === y;\n return (\n <div\n class={{\n 'hb-date-picker__year-cell': true,\n 'hb-date-picker__year-cell--selected': isSelected,\n 'hb-date-picker__year-cell--disabled': yearDisabled,\n }}\n role=\"gridcell\"\n aria-selected={isSelected ? 'true' : 'false'}\n aria-disabled={yearDisabled ? 'true' : undefined}\n onClick={() => !yearDisabled && this.handleYearSelect(y)}\n >\n {y}\n </div>\n );\n });\n })()}\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h } from './p-1407a5e8.js';
2
- import { p as parseDate, f as formatDate, a as addMonths, i as isSameDay, g as getCalendarDays, W as WEEK_DAY_NAMES, M as MONTH_NAMES } from './p-08b4005c.js';
2
+ import { p as parseDate, f as formatDate, a as addMonths, i as isSameDay, g as getCalendarDays, W as WEEK_DAY_NAMES, M as MONTH_NAMES } from './p-e0876aca.js';
3
3
  import { c as createClickOutsideHandler } from './p-4ef5a884.js';
4
4
 
5
5
  const dateRangePickerCss = "/*! 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:inline-block}.hb-date-range-picker{display:inline-block;position:relative}.hb-date-range-picker__input-wrapper{align-items:center;cursor:pointer;display:inline-flex;gap:4px}.hb-date-range-picker__input{background-color:var(--hb-color-bg-container,#fff);border:1px solid var(--hb-color-border,#dcdfe6);border-radius:var(--hb-border-radius-base,4px);box-sizing:border-box;color:var(--hb-color-text,#606266);cursor:pointer;font-size:var(--hb-font-size-base,14px);height:var(--hb-size-default,32px);line-height:var(--hb-size-default,32px);outline:none;padding:0 8px;transition:border-color var(--hb-transition-duration,.2s)ease;width:140px}.hb-date-range-picker__input:hover:not(:disabled){border-color:var(--hb-color-primary,#1677ff)}.hb-date-range-picker__separator{color:var(--hb-color-text-secondary,#909399);font-size:var(--hb-font-size-base,14px)}.hb-date-range-picker__suffix{align-items:center;display:inline-flex;margin-left:-28px;pointer-events:none}.hb-date-range-picker__clear{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:16px;pointer-events:auto;transition:color var(--hb-transition-duration,.2s)ease}.hb-date-range-picker__clear:hover{color:var(--hb-color-text,#606266)}.hb-date-range-picker__icon{font-size:14px}.hb-date-range-picker__dropdown{background-color:var(--hb-color-bg-container,#fff);border:1px solid var(--hb-color-border,#dcdfe6);border-radius:var(--hb-border-radius-base,4px);box-shadow:var(--hb-box-shadow-lg,0 2px 12px 0 #0000001a);display:flex;gap:8px;left:0;margin-top:4px;padding:8px;position:absolute;top:100%;z-index:var(--hb-z-index-dropdown,1050)}.hb-date-range-picker__pane{min-width:280px;padding:12px}.hb-date-range-picker__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-date-range-picker__header-label{color:var(--hb-color-text,#606266);font-size:var(--hb-font-size-base,14px);font-weight:600}.hb-date-range-picker__next-btn,.hb-date-range-picker__prev-btn{background:0 0;border:none;color:var(--hb-color-text,#606266);cursor:pointer;font-size:18px;padding:4px 8px;transition:color var(--hb-transition-duration,.2s)ease}.hb-date-range-picker__next-btn:hover,.hb-date-range-picker__prev-btn:hover{color:var(--hb-color-primary,#1677ff)}.hb-date-range-picker__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-date-range-picker__weekday{color:var(--hb-color-text-tertiary,#909399);font-size:var(--hb-font-size-sm,12px);font-weight:500;text-align:center}.hb-date-range-picker__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-date-range-picker__day{align-items:center;aspect-ratio:1;border-radius:var(--hb-border-radius-base,4px);color:var(--hb-color-text,#606266);cursor:pointer;display:flex;font-size:13px;justify-content:center;transition:all var(--hb-transition-duration,.2s)ease}.hb-date-range-picker__day:hover:not(.hb-date-range-picker__day--other-month){background-color:var(--hb-color-fill-tertiary,#f5f7fa)}.hb-date-range-picker__day--other-month{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:default}.hb-date-range-picker__day--disabled{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:not-allowed}.hb-date-range-picker__day--disabled:hover{background-color:#0000}.hb-date-range-picker__day--today{color:var(--hb-color-primary,#1677ff);font-weight:600}.hb-date-range-picker__day--in-range{background-color:var(--hb-color-primary-bg,#e6f4ff);border-radius:0}.hb-date-range-picker__day--end,.hb-date-range-picker__day--start{background-color:var(--hb-color-primary,#1677ff);color:var(--hb-color-text-inverse,#fff)}.hb-date-range-picker--small .hb-date-range-picker__input{font-size:var(--hb-font-size-sm,12px);height:var(--hb-size-sm,24px);line-height:var(--hb-size-sm,24px)}.hb-date-range-picker--large .hb-date-range-picker__input{font-size:var(--hb-font-size-lg,16px);height:var(--hb-size-lg,40px);line-height:var(--hb-size-lg,40px)}.hb-date-range-picker--disabled{cursor:not-allowed}.hb-date-range-picker--disabled .hb-date-range-picker__input{background-color:var(--hb-color-fill-tertiary,#f5f7fa);color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
@@ -1,6 +1,6 @@
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
- import { p as parseDate, f as formatDate, a as addMonths, g as getCalendarDays, M as MONTH_NAMES, W as WEEK_DAY_NAMES } from './p-08b4005c.js';
3
+ import { p as parseDate, f as formatDate, a as addMonths, g as getCalendarDays, M as MONTH_NAMES, W as WEEK_DAY_NAMES } from './p-e0876aca.js';
4
4
 
5
5
  const dateTimePickerCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-date-time-picker-font-size:14px;--hb-date-time-picker-height:32px;--hb-date-time-picker-border-color:var(--hb-border-color,#dcdfe6);--hb-date-time-picker-border-color-hover:var(--hb-color-primary);--hb-date-time-picker-bg-color:var(--hb-color-white,#fff);display:inline-block;position:relative}.hb-date-time-picker{display:inline-block;position:relative;width:280px}.hb-date-time-picker__input-wrapper{cursor:pointer;display:inline-block;position:relative;width:100%}.hb-date-time-picker__input{background-color:var(--hb-date-time-picker-bg-color);border:1px solid var(--hb-date-time-picker-border-color);border-radius:4px;box-sizing:border-box;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:inline-block;font-size:var(--hb-date-time-picker-font-size);height:var(--hb-date-time-picker-height);line-height:var(--hb-date-time-picker-height);outline:none;padding:0 30px 0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}.hb-date-time-picker__suffix{align-items:center;display:flex;position:absolute;right:8px;top:50%;transform:translateY(-50%)}.hb-date-time-picker__clear{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:16px;margin-right:8px}.hb-date-time-picker__dropdown{background-color:var(--hb-date-time-picker-bg-color);border:1px solid var(--hb-date-time-picker-border-color);border-radius:4px;box-shadow:0 2px 12px #0000001a;left:0;margin-top:4px;min-width:320px;padding:12px;position:absolute;top:100%;z-index:1000}.hb-date-time-picker__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-date-time-picker__header-label{font-size:14px;font-weight:600}.hb-date-time-picker__next-btn,.hb-date-time-picker__prev-btn{background:0 0;border:none;cursor:pointer;font-size:18px;padding:4px 8px}.hb-date-time-picker__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-date-time-picker__weekday{color:var(--hb-color-text-placeholder,#c0c4cc);font-size:12px;text-align:center}.hb-date-time-picker__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-date-time-picker__day{align-items:center;aspect-ratio:1;border-radius:4px;cursor:pointer;display:flex;font-size:13px;justify-content:center}.hb-date-time-picker__day:hover:not(.hb-date-time-picker__day--other-month){background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-date-time-picker__day--selected{background-color:var(--hb-color-primary);color:var(--hb-color-white,#fff)}.hb-date-time-picker__time-body{display:flex;padding:8px}.hb-date-time-picker__time-list{flex:1;max-height:280px;overflow-y:auto}.hb-date-time-picker__time-title{border-bottom:1px solid var(--hb-border-color-lighter,#e4e7ed);font-size:12px;padding:8px 0;text-align:center}.hb-date-time-picker__time-content{padding:4px 0}.hb-date-time-picker__time-item{cursor:pointer;font-size:13px;padding:8px 16px;text-align:center}.hb-date-time-picker__time-item:hover{background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-date-time-picker__time-item--selected{background-color:var(--hb-color-primary-light-9,#ecf5ff);color:var(--hb-color-primary);font-weight:600}@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}";
6
6
  const HbDateTimePickerStyle0 = dateTimePickerCss;
@@ -1 +1 @@
1
- {"file":"hb-descriptions.js","mappings":";;AAAA,MAAM,eAAe,GAAG,89OAA89O,CAAC;AACv/O,6BAAe,eAAe;;MCMjB,YAAY;;;;;;;IAEf,KAAK,GAAW,EAAE,CAAC;;IAGnB,MAAM,GAAY,KAAK,CAAC;;IAGxB,MAAM,GAAW,CAAC,CAAC;;IAGnB,KAAK,GAAY,IAAI,CAAC;;IAGtB,KAAK,GAAsB,EAAE,CAAC;IAEtC,MAAM;QACJ,QACE,4DAAK,KAAK,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,2BAA2B,EAAE,IAAI,CAAC,MAAM,EAAE,IAC9E,IAAI,CAAC,KAAK,IAAI,4DAAK,KAAK,EAAC,wBAAwB,IAAE,IAAI,CAAC,KAAK,CAAO,EACrE,4DAAK,KAAK,EAAC,uBAAuB,IAChC,4DAAK,KAAK,EAAC,sBAAsB,EAAC,KAAK,EAAE,EAAE,mBAAmB,EAAE,UAAU,IAAI,CAAC,MAAM,mBAAmB,EAAE,IACvG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,MACnB,WACE,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,IAAI,CAAC,IAAI,GAAG,EAAE,UAAU,EAAE,QAAQ,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,SAAS,IAElE,YAAM,KAAK,EAAC,wBAAwB,IACjC,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,wBAAwB,aAAS,CACvD,EACP,YAAM,KAAK,EAAC,wBAAwB,IAAE,IAAI,CAAC,KAAK,CAAQ,CACpD,CACP,CAAC,CACE,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/Descriptions/descriptions.css?tag=hb-descriptions&encapsulation=shadow","src/components/Descriptions/Descriptions.tsx"],"sourcesContent":[":host { display: block; }\n.hb-descriptions {\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n background: var(--hb-color-bg-container);\n border-radius: var(--hb-border-radius-sm);\n}\n.hb-descriptions__title {\n font-size: var(--hb-font-size-lg);\n font-weight: 600;\n color: var(--hb-color-text-primary);\n margin-bottom: var(--hb-spacing-sm);\n}\n.hb-descriptions__view { width: 100%; }\n.hb-descriptions__row {\n display: grid;\n gap: 0;\n width: 100%;\n}\n.hb-descriptions__item {\n display: flex;\n padding: var(--hb-spacing-sm) var(--hb-spacing-md);\n border-bottom: 1px solid var(--hb-color-border-secondary);\n}\n.hb-descriptions__row .hb-descriptions__item:nth-last-child(-n+3):not(:nth-last-child(1)) {\n /* 保留默认下边框,最后一项由下方规则移除 */\n}\n/* 简化:最后一个 item 无下边框 */\n.hb-descriptions__row .hb-descriptions__item:last-child { border-bottom: none; }\n\n.hb-descriptions__label {\n color: var(--hb-color-text-secondary);\n white-space: nowrap;\n margin-right: var(--hb-spacing-sm);\n flex-shrink: 0;\n}\n.hb-descriptions__colon { margin-left: 0; }\n.hb-descriptions__value {\n color: var(--hb-color-text);\n word-break: break-all;\n}\n\n/* 带边框样式 */\n.hb-descriptions--bordered {\n border: 1px solid var(--hb-color-border-secondary);\n overflow: hidden;\n}\n.hb-descriptions--bordered .hb-descriptions__title { padding: var(--hb-spacing-sm) var(--hb-spacing-md); margin-bottom: 0; border-bottom: 1px solid var(--hb-color-border-secondary); }\n.hb-descriptions--bordered .hb-descriptions__item { border-right: 1px solid var(--hb-color-border-secondary); }\n.hb-descriptions--bordered .hb-descriptions__item:nth-child(3n) { border-right: none; }\n.hb-descriptions--bordered .hb-descriptions__item { padding: var(--hb-spacing-sm) var(--hb-spacing-md); }\n.hb-descriptions--bordered .hb-descriptions__item:last-child { border-bottom: none; }\n\n/* ============================================================\n * 响应式(移动端):小屏 descriptions 改为单列纵向堆叠,\n * label 与 value 上下排列,避免横向挤压。\n * ============================================================ */\n@media (max-width: 575.98px) {\n .hb-descriptions__row {\n grid-template-columns: 1fr !important;\n }\n\n .hb-descriptions__item {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--hb-spacing-xxs, 2px);\n }\n\n .hb-descriptions__label {\n margin-right: 0;\n margin-bottom: var(--hb-spacing-xxs, 2px);\n font-weight: 500;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Descriptions 描述列表组件\n * 成组展示多个描述字段,支持列数、边框、冒号、跨列 span\n */\n@Component({ tag: 'hb-descriptions', styleUrl: 'descriptions.css', shadow: true })\nexport class Descriptions {\n /** 标题 */\n @Prop() title: string = '';\n\n /** 是否带边框 */\n @Prop() border: boolean = false;\n\n /** 每行列数 */\n @Prop() column: number = 3;\n\n /** 是否显示冒号 */\n @Prop() colon: boolean = true;\n\n /** 描述项数组 */\n @Prop() items: DescriptionItem[] = [];\n\n render() {\n return (\n <div class={{ 'hb-descriptions': true, 'hb-descriptions--bordered': this.border }}>\n {this.title && <div class=\"hb-descriptions__title\">{this.title}</div>}\n <div class=\"hb-descriptions__view\">\n <div class=\"hb-descriptions__row\" style={{ gridTemplateColumns: `repeat(${this.column}, minmax(0, 1fr))` }}>\n {this.items.map((item) => (\n <div\n class=\"hb-descriptions__item\"\n style={item.span ? { gridColumn: `span ${item.span}` } : undefined}\n >\n <span class=\"hb-descriptions__label\">\n {item.label}\n {this.colon && <span class=\"hb-descriptions__colon\">:</span>}\n </span>\n <span class=\"hb-descriptions__value\">{item.value}</span>\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport interface DescriptionItem {\n label: string;\n value: string;\n span?: number;\n}\n"],"version":3}
1
+ {"file":"hb-descriptions.js","mappings":";;AAAA,MAAM,eAAe,GAAG,89OAA89O,CAAC;AACv/O,6BAAe,eAAe;;MCMjB,YAAY;;;;;;;IAEf,KAAK,GAAW,EAAE,CAAC;;IAGnB,MAAM,GAAY,KAAK,CAAC;;IAGxB,MAAM,GAAW,CAAC,CAAC;;IAGnB,KAAK,GAAY,IAAI,CAAC;;IAGtB,KAAK,GAAsB,EAAE,CAAC;IAEtC,MAAM;QACJ,QACE,4DAAK,KAAK,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,2BAA2B,EAAE,IAAI,CAAC,MAAM,EAAE,IAC9E,IAAI,CAAC,KAAK,IAAI,4DAAK,KAAK,EAAC,wBAAwB,IAAE,IAAI,CAAC,KAAK,CAAO,EACrE,4DAAK,KAAK,EAAC,uBAAuB,IAChC,4DAAK,KAAK,EAAC,sBAAsB,EAAC,KAAK,EAAE,EAAE,mBAAmB,EAAE,UAAU,IAAI,CAAC,MAAM,mBAAmB,EAAE,IACvG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,MACnB,WACE,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,IAAI,CAAC,IAAI,GAAG,EAAE,UAAU,EAAE,QAAQ,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,SAAS,IAElE,YAAM,KAAK,EAAC,wBAAwB,IACjC,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,wBAAwB,aAAS,CACvD,EACP,YAAM,KAAK,EAAC,wBAAwB,IAAE,IAAI,CAAC,KAAK,CAAQ,CACpD,CACP,CAAC,CACE,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/Descriptions/descriptions.css?tag=hb-descriptions&encapsulation=shadow","src/components/Descriptions/Descriptions.tsx"],"sourcesContent":[":host {\n display: block;\n}\n.hb-descriptions {\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n background: var(--hb-color-bg-container);\n border-radius: var(--hb-border-radius-sm);\n}\n.hb-descriptions__title {\n font-size: var(--hb-font-size-lg);\n font-weight: 600;\n color: var(--hb-color-text-primary);\n margin-bottom: var(--hb-spacing-sm);\n}\n.hb-descriptions__view {\n width: 100%;\n}\n.hb-descriptions__row {\n display: grid;\n gap: 0;\n width: 100%;\n}\n.hb-descriptions__item {\n display: flex;\n padding: var(--hb-spacing-sm) var(--hb-spacing-md);\n border-bottom: 1px solid var(--hb-color-border-secondary);\n}\n.hb-descriptions__row .hb-descriptions__item:nth-last-child(-n + 3):not(:nth-last-child(1)) {\n /* 保留默认下边框,最后一项由下方规则移除 */\n}\n/* 简化:最后一个 item 无下边框 */\n.hb-descriptions__row .hb-descriptions__item:last-child {\n border-bottom: none;\n}\n\n.hb-descriptions__label {\n color: var(--hb-color-text-secondary);\n white-space: nowrap;\n margin-right: var(--hb-spacing-sm);\n flex-shrink: 0;\n}\n.hb-descriptions__colon {\n margin-left: 0;\n}\n.hb-descriptions__value {\n color: var(--hb-color-text);\n word-break: break-all;\n}\n\n/* 带边框样式 */\n.hb-descriptions--bordered {\n border: 1px solid var(--hb-color-border-secondary);\n overflow: hidden;\n}\n.hb-descriptions--bordered .hb-descriptions__title {\n padding: var(--hb-spacing-sm) var(--hb-spacing-md);\n margin-bottom: 0;\n border-bottom: 1px solid var(--hb-color-border-secondary);\n}\n.hb-descriptions--bordered .hb-descriptions__item {\n border-right: 1px solid var(--hb-color-border-secondary);\n}\n.hb-descriptions--bordered .hb-descriptions__item:nth-child(3n) {\n border-right: none;\n}\n.hb-descriptions--bordered .hb-descriptions__item {\n padding: var(--hb-spacing-sm) var(--hb-spacing-md);\n}\n.hb-descriptions--bordered .hb-descriptions__item:last-child {\n border-bottom: none;\n}\n\n/* ============================================================\n * 响应式(移动端):小屏 descriptions 改为单列纵向堆叠,\n * label 与 value 上下排列,避免横向挤压。\n * ============================================================ */\n@media (max-width: 575.98px) {\n .hb-descriptions__row {\n grid-template-columns: 1fr !important;\n }\n\n .hb-descriptions__item {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--hb-spacing-xxs, 2px);\n }\n\n .hb-descriptions__label {\n margin-right: 0;\n margin-bottom: var(--hb-spacing-xxs, 2px);\n font-weight: 500;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Descriptions 描述列表组件\n * 成组展示多个描述字段,支持列数、边框、冒号、跨列 span\n */\n@Component({ tag: 'hb-descriptions', styleUrl: 'descriptions.css', shadow: true })\nexport class Descriptions {\n /** 标题 */\n @Prop() title: string = '';\n\n /** 是否带边框 */\n @Prop() border: boolean = false;\n\n /** 每行列数 */\n @Prop() column: number = 3;\n\n /** 是否显示冒号 */\n @Prop() colon: boolean = true;\n\n /** 描述项数组 */\n @Prop() items: DescriptionItem[] = [];\n\n render() {\n return (\n <div class={{ 'hb-descriptions': true, 'hb-descriptions--bordered': this.border }}>\n {this.title && <div class=\"hb-descriptions__title\">{this.title}</div>}\n <div class=\"hb-descriptions__view\">\n <div class=\"hb-descriptions__row\" style={{ gridTemplateColumns: `repeat(${this.column}, minmax(0, 1fr))` }}>\n {this.items.map((item) => (\n <div\n class=\"hb-descriptions__item\"\n style={item.span ? { gridColumn: `span ${item.span}` } : undefined}\n >\n <span class=\"hb-descriptions__label\">\n {item.label}\n {this.colon && <span class=\"hb-descriptions__colon\">:</span>}\n </span>\n <span class=\"hb-descriptions__value\">{item.value}</span>\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport interface DescriptionItem {\n label: string;\n value: string;\n span?: number;\n}\n"],"version":3}
@@ -1,8 +1,8 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h } from './p-1407a5e8.js';
2
2
  import { g as getNextZIndex, l as lockScroll, u as unlockScroll } from './p-ecce2b5e.js';
3
- import { c as createFocusTrap } from './p-cc0aeb50.js';
3
+ import { c as createFocusTrap } from './p-00aa34c8.js';
4
4
 
5
- const dialogCss = "/*! 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}.container{width:100%}.hidden{display:none}.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:contents}.hb-dialog-wrapper{inset:0;pointer-events:none;position:fixed}.hb-dialog-wrapper--hidden{display:none}.hb-dialog__overlay{background-color:var(--hb-color-bg-mask);inset:0;transition:opacity .3s}.hb-dialog,.hb-dialog__overlay{pointer-events:auto;position:fixed}.hb-dialog{background-color:var(--hb-dialog-bg);border-radius:var(--hb-dialog-radius);box-shadow:var(--hb-dialog-shadow);display:flex;flex-direction:column;left:50%;max-height:90vh;opacity:0;overflow:hidden;top:50%;transform:translate(-50%,-50%)scale(.9);transition:opacity .3s,transform .3s}.hb-dialog--visible{opacity:1;transform:translate(-50%,-50%)scale(1)}.hb-dialog--fullscreen{border-radius:0;height:100vh;left:0;max-height:100vh;top:0;transform:none;width:100%!important}.hb-dialog--fullscreen.hb-dialog--visible{transform:none}.hb-dialog__header{align-items:center;border-bottom:1px solid var(--hb-color-border-secondary);display:flex;justify-content:space-between;padding:var(--hb-spacing-md)var(--hb-spacing-lg)}.hb-dialog__title{color:var(--hb-color-text-primary);font-size:var(--hb-font-size-lg);font-weight:600}.hb-dialog__close{align-items:center;background:0 0;border:none;border-radius:var(--hb-border-radius-sm);color:var(--hb-color-text-secondary);cursor:pointer;display:inline-flex;font-size:18px;height:28px;justify-content:center;transition:all var(--hb-transition-duration);width:28px}.hb-dialog__close:hover{background-color:var(--hb-color-fill-tertiary);color:var(--hb-color-text-primary)}.hb-dialog__body{color:var(--hb-color-text);flex:1;font-size:var(--hb-font-size-base);overflow-y:auto;padding:var(--hb-spacing-lg)}.hb-dialog__footer{align-items:center;border-top:1px solid var(--hb-color-border-secondary);display:flex;gap:var(--hb-spacing-xs);justify-content:flex-end;padding:var(--hb-spacing-sm)var(--hb-spacing-lg)}@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}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}";
5
+ const dialogCss = "/*! 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}.container{width:100%}.hidden{display:none}.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:contents}.hb-dialog-wrapper{inset:0;pointer-events:none;position:fixed}.hb-dialog-wrapper--hidden{display:none}.hb-dialog__overlay{animation:hb-dialog-overlay-in .3s both;background-color:var(--hb-color-bg-mask);inset:0;pointer-events:auto;position:fixed}.hb-dialog__overlay--leaving{animation:hb-dialog-overlay-out .3s both}@keyframes hb-dialog-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes hb-dialog-overlay-out{0%{opacity:1}to{opacity:0}}.hb-dialog{animation:hb-dialog-in .3s cubic-bezier(.16,1,.3,1) both;background-color:var(--hb-dialog-bg);border-radius:var(--hb-dialog-radius);box-shadow:var(--hb-dialog-shadow);display:flex;flex-direction:column;left:50%;max-height:90vh;overflow:hidden;pointer-events:auto;position:fixed;top:50%}.hb-dialog--leaving{animation:hb-dialog-out .3s cubic-bezier(.5,0,.75,0) both}@keyframes hb-dialog-in{0%{opacity:0;transform:translate(-50%,-50%)scale(.9)}to{opacity:1;transform:translate(-50%,-50%)scale(1)}}@keyframes hb-dialog-out{0%{opacity:1;transform:translate(-50%,-50%)scale(1)}to{opacity:0;transform:translate(-50%,-50%)scale(.95)}}.hb-dialog--fullscreen{border-radius:0;height:100vh;left:0;max-height:100vh;top:0;width:100%!important}.hb-dialog--fullscreen,.hb-dialog--fullscreen.hb-dialog--leaving{animation:none}.hb-dialog__header{align-items:center;border-bottom:1px solid var(--hb-color-border-secondary);display:flex;justify-content:space-between;padding:var(--hb-spacing-md)var(--hb-spacing-lg)}.hb-dialog__title{color:var(--hb-color-text-primary);font-size:var(--hb-font-size-lg);font-weight:600}.hb-dialog__close{align-items:center;background:0 0;border:none;border-radius:var(--hb-border-radius-sm);color:var(--hb-color-text-secondary);cursor:pointer;display:inline-flex;height:28px;justify-content:center;padding:0;transition:all var(--hb-transition-duration);width:28px}.hb-dialog__close svg{height:16px;width:16px}.hb-dialog__close:hover{background-color:var(--hb-color-fill-tertiary);color:var(--hb-color-text-primary)}.hb-dialog__body{color:var(--hb-color-text);flex:1;font-size:var(--hb-font-size-base);overflow-y:auto;padding:var(--hb-spacing-lg)}.hb-dialog__footer{align-items:center;border-top:1px solid var(--hb-color-border-secondary);display:flex;gap:var(--hb-spacing-xs);justify-content:flex-end;padding:var(--hb-spacing-sm)var(--hb-spacing-lg)}@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}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}";
6
6
  const HbDialogStyle0 = dialogCss;
7
7
 
8
8
  const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends H {
@@ -42,18 +42,28 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends H {
42
42
  zIndex = 0;
43
43
  panelRef;
44
44
  trap;
45
- handleVisibleChange(newVal) {
45
+ /** 离场动画期间保留渲染(避免 display:none 打断 transition) */
46
+ leaving = false;
47
+ leaveTimer;
48
+ handleVisibleChange(newVal, oldVal) {
46
49
  if (newVal) {
50
+ // 打开:清掉可能残留的离场定时器,重置 leaving
51
+ if (this.leaveTimer) {
52
+ clearTimeout(this.leaveTimer);
53
+ this.leaveTimer = undefined;
54
+ }
55
+ this.leaving = false;
47
56
  this.zIndex = getNextZIndex();
48
57
  if (this.modal)
49
58
  lockScroll();
50
59
  this.hbOpen.emit();
51
60
  document.addEventListener('keydown', this.handleKeyDown);
52
61
  }
53
- else {
54
- if (this.modal)
55
- unlockScroll();
56
- document.removeEventListener('keydown', this.handleKeyDown);
62
+ else if (oldVal) {
63
+ // 关闭(受控或内部触发统一走这里):进入离场动画期,
64
+ // 动画结束(300ms)后才 emit closed + 真正卸载。
65
+ // 仅在「从打开→关闭」时执行,避免已关闭时重复 emit。
66
+ this.startLeave();
57
67
  }
58
68
  }
59
69
  disconnectedCallback() {
@@ -61,6 +71,8 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends H {
61
71
  unlockScroll();
62
72
  document.removeEventListener('keydown', this.handleKeyDown);
63
73
  this.trap?.disconnect();
74
+ if (this.leaveTimer)
75
+ clearTimeout(this.leaveTimer);
64
76
  }
65
77
  componentDidRender() {
66
78
  if (!this.panelRef)
@@ -82,24 +94,51 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends H {
82
94
  };
83
95
  close = () => {
84
96
  this.modelValue = false;
85
- this.hbClose.emit();
86
- setTimeout(() => this.hbClosed.emit(), 300);
97
+ this.startLeave();
87
98
  };
99
+ /**
100
+ * 进入离场动画期:解锁滚动、移除监听、保留 DOM 播放动画,
101
+ * 结束(300ms)后重置 leaving 并 emit hbClosed。
102
+ * 受控关闭(父组件直接设 modelValue=false 经 @Watch)与内部关闭(ESC/遮罩/关闭按钮)
103
+ * 统一走这里,保证两者行为一致(都有动画 + 都 emit hbClose/hbClosed)。
104
+ */
105
+ startLeave() {
106
+ if (this.modal)
107
+ unlockScroll();
108
+ document.removeEventListener('keydown', this.handleKeyDown);
109
+ this.hbClose.emit();
110
+ this.leaving = true;
111
+ if (this.leaveTimer)
112
+ clearTimeout(this.leaveTimer);
113
+ this.leaveTimer = setTimeout(() => {
114
+ this.leaving = false;
115
+ this.hbClosed.emit();
116
+ }, 300);
117
+ }
88
118
  handleOverlayClick = () => {
89
119
  if (this.closeOnClickModal)
90
120
  this.close();
91
121
  };
122
+ /** 是否应渲染弹层 DOM:打开中 或 离场动画期内 */
123
+ get shouldRender() {
124
+ return this.modelValue || this.leaving;
125
+ }
92
126
  render() {
93
- if (this.destroyOnClose && !this.modelValue)
127
+ if (this.destroyOnClose && !this.shouldRender)
94
128
  return null;
95
- return (h("div", { class: { 'hb-dialog-wrapper': true, 'hb-dialog-wrapper--hidden': !this.modelValue } }, this.modal && (h("div", { class: "hb-dialog__overlay", style: { zIndex: String(this.zIndex) }, onClick: this.handleOverlayClick })), h("div", { ref: (el) => (this.panelRef = el), class: {
129
+ return (h("div", { class: { 'hb-dialog-wrapper': true, 'hb-dialog-wrapper--hidden': !this.shouldRender } }, this.modal && (h("div", { class: {
130
+ 'hb-dialog__overlay': true,
131
+ 'hb-dialog__overlay--visible': this.modelValue,
132
+ 'hb-dialog__overlay--leaving': this.leaving,
133
+ }, style: { zIndex: String(this.zIndex) }, onClick: this.handleOverlayClick })), h("div", { ref: el => (this.panelRef = el), class: {
96
134
  'hb-dialog': true,
97
135
  'hb-dialog--fullscreen': this.fullscreen,
98
136
  'hb-dialog--visible': this.modelValue,
137
+ 'hb-dialog--leaving': this.leaving,
99
138
  }, style: {
100
139
  zIndex: String(this.zIndex + 1),
101
140
  width: this.fullscreen ? '100%' : this.width,
102
- }, role: "dialog", "aria-modal": "true" }, h("div", { class: "hb-dialog__header" }, h("span", { class: "hb-dialog__title" }, this.title), this.showClose && (h("button", { type: "button", class: "hb-dialog__close", "aria-label": "\u5173\u95ED", onClick: this.close }, "\u00D7"))), h("div", { class: "hb-dialog__body" }, h("slot", null)), h("div", { class: "hb-dialog__footer" }, h("slot", { name: "footer" })))));
141
+ }, role: "dialog", "aria-modal": "true", "aria-hidden": this.modelValue ? 'false' : 'true' }, h("div", { class: "hb-dialog__header" }, h("span", { class: "hb-dialog__title" }, this.title), this.showClose && (h("button", { type: "button", class: "hb-dialog__close", "aria-label": "\u5173\u95ED", onClick: this.close }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M6 6l12 12M18 6L6 18" }))))), h("div", { class: "hb-dialog__body" }, h("slot", null)), h("div", { class: "hb-dialog__footer" }, h("slot", { name: "footer" })))));
103
142
  }
104
143
  static get watchers() { return {
105
144
  "modelValue": ["handleVisibleChange"]
@@ -114,7 +153,8 @@ const Dialog = /*@__PURE__*/ proxyCustomElement(class Dialog extends H {
114
153
  "closeOnClickModal": [4, "close-on-click-modal"],
115
154
  "closeOnPressEscape": [4, "close-on-press-escape"],
116
155
  "showClose": [4, "show-close"],
117
- "destroyOnClose": [4, "destroy-on-close"]
156
+ "destroyOnClose": [4, "destroy-on-close"],
157
+ "leaving": [32]
118
158
  }, undefined, {
119
159
  "modelValue": ["handleVisibleChange"]
120
160
  }]);
@@ -1 +1 @@
1
- {"file":"hb-dialog.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,quPAAquP,CAAC;AACxvP,uBAAe,SAAS;;MCYX,MAAM;;;;;;;;;;;IAIQ,UAAU,GAAY,KAAK,CAAC;;IAG7C,KAAK,GAAW,EAAE,CAAC;;IA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BACL,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;gBAC/B,KAAK,EAAE,IAAI,CAAC,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC,KAAK;aAC7C,EACD,IAAI,EAAC,QAAQ,gBACF,MAAM,IAEjB,WAAK,KAAK,EAAC,mBAAmB,IAC5B,YAAM,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,KAAK,CAAQ,EACjD,IAAI,CAAC,SAAS,KACb,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,kBAAkB,gBAAY,cAAI,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,aAAY,CAC/F,CACG,EACN,WAAK,KAAK,EAAC,iBAAiB,IAC1B,eAAQ,CACJ,EACN,WAAK,KAAK,EAAC,mBAAmB,IAC5B,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/Dialog/dialog.css?tag=hb-dialog&encapsulation=shadow","src/components/Dialog/Dialog.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n\n.hb-dialog-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.hb-dialog-wrapper--hidden {\n display: none;\n}\n\n.hb-dialog__overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: var(--hb-color-bg-mask);\n transition: opacity 0.3s;\n pointer-events: auto;\n}\n\n.hb-dialog {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0.9);\n background-color: var(--hb-dialog-bg);\n border-radius: var(--hb-dialog-radius);\n box-shadow: var(--hb-dialog-shadow);\n pointer-events: auto;\n opacity: 0;\n transition: opacity 0.3s, transform 0.3s;\n display: flex;\n flex-direction: column;\n max-height: 90vh;\n overflow: hidden;\n}\n\n.hb-dialog--visible {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n}\n\n.hb-dialog--fullscreen {\n width: 100% !important;\n height: 100vh;\n top: 0;\n left: 0;\n transform: none;\n border-radius: 0;\n max-height: 100vh;\n}\n.hb-dialog--fullscreen.hb-dialog--visible {\n transform: none;\n}\n\n.hb-dialog__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--hb-spacing-md) var(--hb-spacing-lg);\n border-bottom: 1px solid var(--hb-color-border-secondary);\n}\n\n.hb-dialog__title {\n font-size: var(--hb-font-size-lg);\n font-weight: 600;\n color: var(--hb-color-text-primary);\n}\n\n.hb-dialog__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: none;\n font-size: 18px;\n color: var(--hb-color-text-secondary);\n cursor: pointer;\n border-radius: var(--hb-border-radius-sm);\n transition: all var(--hb-transition-duration);\n}\n\n.hb-dialog__close:hover {\n background-color: var(--hb-color-fill-tertiary);\n color: var(--hb-color-text-primary);\n}\n\n.hb-dialog__body {\n flex: 1;\n padding: var(--hb-spacing-lg);\n overflow-y: auto;\n color: var(--hb-color-text);\n font-size: var(--hb-font-size-base);\n}\n\n.hb-dialog__footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--hb-spacing-xs);\n padding: var(--hb-spacing-sm) var(--hb-spacing-lg);\n border-top: 1px solid var(--hb-color-border-secondary);\n}\n","import { Component, h, Prop, Event, EventEmitter, Watch, Element } from '@stencil/core';\nimport { lockScroll, unlockScroll, getNextZIndex } from '../../utils/popup-manager';\nimport { createFocusTrap, FocusTrap } from '../../utils/a11y';\n\n/**\n * Dialog 对话框组件\n * 在保留当前页面状态的情况下,告知用户并承载相关操作\n */\n@Component({\n tag: 'hb-dialog',\n styleUrl: 'dialog.css',\n shadow: true,\n})\nexport class Dialog {\n @Element() el: HTMLElement;\n\n /** 是否显示 */\n @Prop({ mutable: true }) modelValue: boolean = false;\n\n /** 标题 */\n @Prop() title: string = '';\n\n /** 宽度 */\n @Prop() width: string = '50%';\n\n /** 是否全屏 */\n @Prop() fullscreen: boolean = false;\n\n /** 是否显示遮罩 */\n @Prop() modal: boolean = true;\n\n /** 是否点击遮罩关闭 */\n @Prop() closeOnClickModal: boolean = true;\n\n /** 是否按 ESC 关闭 */\n @Prop() closeOnPressEscape: boolean = true;\n\n /** 是否显示关闭按钮 */\n @Prop() showClose: boolean = true;\n\n /** 关闭时销毁 */\n @Prop() destroyOnClose: boolean = false;\n\n /** 打开事件 */\n @Event() hbOpen: EventEmitter<void>;\n\n /** 关闭事件 */\n @Event() hbClose: EventEmitter<void>;\n\n /** 已关闭动画结束事件 */\n @Event() hbClosed: EventEmitter<void>;\n\n private zIndex: number = 0;\n private panelRef?: HTMLElement;\n private trap?: FocusTrap;\n\n @Watch('modelValue')\n handleVisibleChange(newVal: boolean) {\n if (newVal) {\n this.zIndex = getNextZIndex();\n if (this.modal) lockScroll();\n this.hbOpen.emit();\n document.addEventListener('keydown', this.handleKeyDown);\n } else {\n if (this.modal) unlockScroll();\n document.removeEventListener('keydown', this.handleKeyDown);\n }\n }\n\n disconnectedCallback() {\n if (this.modelValue && this.modal) unlockScroll();\n document.removeEventListener('keydown', this.handleKeyDown);\n this.trap?.disconnect();\n }\n\n componentDidRender() {\n if (!this.panelRef) return;\n if (this.modelValue) {\n if (!this.trap) {\n this.trap = createFocusTrap({ container: this.panelRef });\n }\n this.trap.connect();\n } else {\n this.trap?.disconnect();\n }\n }\n\n private handleKeyDown = (e: KeyboardEvent) => {\n if (this.closeOnPressEscape && e.key === 'Escape') {\n this.close();\n }\n };\n\n private close = () => {\n this.modelValue = false;\n this.hbClose.emit();\n setTimeout(() => this.hbClosed.emit(), 300);\n };\n\n private handleOverlayClick = () => {\n if (this.closeOnClickModal) this.close();\n };\n\n render() {\n if (this.destroyOnClose && !this.modelValue) return null;\n\n return (\n <div class={{ 'hb-dialog-wrapper': true, 'hb-dialog-wrapper--hidden': !this.modelValue }}>\n {this.modal && (\n <div\n class=\"hb-dialog__overlay\"\n style={{ zIndex: String(this.zIndex) }}\n onClick={this.handleOverlayClick}\n />\n )}\n <div\n ref={(el) => (this.panelRef = el as HTMLElement)}\n class={{\n 'hb-dialog': true,\n 'hb-dialog--fullscreen': this.fullscreen,\n 'hb-dialog--visible': this.modelValue,\n }}\n style={{\n zIndex: String(this.zIndex + 1),\n width: this.fullscreen ? '100%' : this.width,\n }}\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <div class=\"hb-dialog__header\">\n <span class=\"hb-dialog__title\">{this.title}</span>\n {this.showClose && (\n <button type=\"button\" class=\"hb-dialog__close\" aria-label=\"关闭\" onClick={this.close}>×</button>\n )}\n </div>\n <div class=\"hb-dialog__body\">\n <slot />\n </div>\n <div class=\"hb-dialog__footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"hb-dialog.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,wtQAAwtQ,CAAC;AAC3uQ,uBAAe,SAAS;;MCYX,MAAM;;;;;;;;;;;IAIQ,UAAU,GAAY,KAAK,CAAC;;IAG7C,KAAK,GAAW,EAAE,CAAC;;IAGnB,KAAK,GAAW,KAAK,CAAC;;IAGtB,UAAU,GAAY,KAAK,CAAC;;IAG5B,KAAK,GAAY,IAAI,CAAC;;IAGtB,iBAAiB,GAAY,IAAI,CAAC;;IAGlC,kBAAkB,GAAY,IAAI,CAAC;;IAGnC,SAAS,GAAY,IAAI,CAAC;;IAG1B,cAAc,GAAY,KAAK,CAAC;;IAG/B,MAAM,CAAqB;;IAG3B,OAAO,CAAqB;;IAG5B,QAAQ,CAAqB;IAE9B,MAAM,GAAW,CAAC,CAAC;IACnB,QAAQ,CAAe;IACvB,IAAI,CAAa;;IAEhB,OAAO,GAAY,KAAK,CAAC;IAC1B,UAAU,CAAiC;IAGnD,mBAAmB,CAAC,MAAe,EAAE,MAAe;QAClD,IAAI,MAAM,EAAE;;YAEV,IAAI,IAAI,CA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ialog/dialog.css?tag=hb-dialog&encapsulation=shadow","src/components/Dialog/Dialog.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n\n.hb-dialog-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.hb-dialog-wrapper--hidden {\n display: none;\n}\n\n.hb-dialog__overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: var(--hb-color-bg-mask);\n pointer-events: auto;\n /* 进场:opacity 0 → 1;离场由 --leaving class 反向播放 */\n animation: hb-dialog-overlay-in 0.3s ease both;\n}\n\n.hb-dialog__overlay--leaving {\n animation: hb-dialog-overlay-out 0.3s ease both;\n}\n\n@keyframes hb-dialog-overlay-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes hb-dialog-overlay-out {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.hb-dialog {\n position: fixed;\n top: 50%;\n left: 50%;\n background-color: var(--hb-dialog-bg);\n border-radius: var(--hb-dialog-radius);\n box-shadow: var(--hb-dialog-shadow);\n pointer-events: auto;\n display: flex;\n flex-direction: column;\n max-height: 90vh;\n overflow: hidden;\n /* 进场:opacity + scale(对齐 antd Modal 的 fade+zoom) */\n animation: hb-dialog-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n\n.hb-dialog--leaving {\n animation: hb-dialog-out 0.3s cubic-bezier(0.5, 0, 0.75, 0) both;\n}\n\n@keyframes hb-dialog-in {\n from {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.9);\n }\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n@keyframes hb-dialog-out {\n from {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n to {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.95);\n }\n}\n\n.hb-dialog--fullscreen {\n width: 100% !important;\n height: 100vh;\n top: 0;\n left: 0;\n border-radius: 0;\n max-height: 100vh;\n}\n.hb-dialog--fullscreen,\n.hb-dialog--fullscreen.hb-dialog--leaving {\n animation: none;\n}\n\n.hb-dialog__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--hb-spacing-md) var(--hb-spacing-lg);\n border-bottom: 1px solid var(--hb-color-border-secondary);\n}\n\n.hb-dialog__title {\n font-size: var(--hb-font-size-lg);\n font-weight: 600;\n color: var(--hb-color-text-primary);\n}\n\n.hb-dialog__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n background: none;\n color: var(--hb-color-text-secondary);\n cursor: pointer;\n border-radius: var(--hb-border-radius-sm);\n transition: all var(--hb-transition-duration);\n padding: 0;\n}\n\n.hb-dialog__close svg {\n width: 16px;\n height: 16px;\n}\n\n.hb-dialog__close:hover {\n background-color: var(--hb-color-fill-tertiary);\n color: var(--hb-color-text-primary);\n}\n\n.hb-dialog__body {\n flex: 1;\n padding: var(--hb-spacing-lg);\n overflow-y: auto;\n color: var(--hb-color-text);\n font-size: var(--hb-font-size-base);\n}\n\n.hb-dialog__footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--hb-spacing-xs);\n padding: var(--hb-spacing-sm) var(--hb-spacing-lg);\n border-top: 1px solid var(--hb-color-border-secondary);\n}\n","import { Component, h, Prop, Event, EventEmitter, Watch, Element, State } from '@stencil/core';\nimport { lockScroll, unlockScroll, getNextZIndex } from '../../utils/popup-manager';\nimport { createFocusTrap, FocusTrap } from '../../utils/a11y';\n\n/**\n * Dialog 对话框组件\n * 在保留当前页面状态的情况下,告知用户并承载相关操作\n */\n@Component({\n tag: 'hb-dialog',\n styleUrl: 'dialog.css',\n shadow: true,\n})\nexport class Dialog {\n @Element() el: HTMLElement;\n\n /** 是否显示 */\n @Prop({ mutable: true }) modelValue: boolean = false;\n\n /** 标题 */\n @Prop() title: string = '';\n\n /** 宽度 */\n @Prop() width: string = '50%';\n\n /** 是否全屏 */\n @Prop() fullscreen: boolean = false;\n\n /** 是否显示遮罩 */\n @Prop() modal: boolean = true;\n\n /** 是否点击遮罩关闭 */\n @Prop() closeOnClickModal: boolean = true;\n\n /** 是否按 ESC 关闭 */\n @Prop() closeOnPressEscape: boolean = true;\n\n /** 是否显示关闭按钮 */\n @Prop() showClose: boolean = true;\n\n /** 关闭时销毁 */\n @Prop() destroyOnClose: boolean = false;\n\n /** 打开事件 */\n @Event() hbOpen: EventEmitter<void>;\n\n /** 关闭事件 */\n @Event() hbClose: EventEmitter<void>;\n\n /** 已关闭动画结束事件 */\n @Event() hbClosed: EventEmitter<void>;\n\n private zIndex: number = 0;\n private panelRef?: HTMLElement;\n private trap?: FocusTrap;\n /** 离场动画期间保留渲染(避免 display:none 打断 transition) */\n @State() leaving: boolean = false;\n private leaveTimer?: ReturnType<typeof setTimeout>;\n\n @Watch('modelValue')\n handleVisibleChange(newVal: boolean, oldVal: boolean) {\n if (newVal) {\n // 打开:清掉可能残留的离场定时器,重置 leaving\n if (this.leaveTimer) {\n clearTimeout(this.leaveTimer);\n this.leaveTimer = undefined;\n }\n this.leaving = false;\n this.zIndex = getNextZIndex();\n if (this.modal) lockScroll();\n this.hbOpen.emit();\n document.addEventListener('keydown', this.handleKeyDown);\n } else if (oldVal) {\n // 关闭(受控或内部触发统一走这里):进入离场动画期,\n // 动画结束(300ms)后才 emit closed + 真正卸载。\n // 仅在「从打开→关闭」时执行,避免已关闭时重复 emit。\n this.startLeave();\n }\n }\n\n disconnectedCallback() {\n if (this.modelValue && this.modal) unlockScroll();\n document.removeEventListener('keydown', this.handleKeyDown);\n this.trap?.disconnect();\n if (this.leaveTimer) clearTimeout(this.leaveTimer);\n }\n\n componentDidRender() {\n if (!this.panelRef) return;\n if (this.modelValue) {\n if (!this.trap) {\n this.trap = createFocusTrap({ container: this.panelRef });\n }\n this.trap.connect();\n } else {\n this.trap?.disconnect();\n }\n }\n\n private handleKeyDown = (e: KeyboardEvent) => {\n if (this.closeOnPressEscape && e.key === 'Escape') {\n this.close();\n }\n };\n\n private close = () => {\n this.modelValue = false;\n this.startLeave();\n };\n\n /**\n * 进入离场动画期:解锁滚动、移除监听、保留 DOM 播放动画,\n * 结束(300ms)后重置 leaving 并 emit hbClosed。\n * 受控关闭(父组件直接设 modelValue=false 经 @Watch)与内部关闭(ESC/遮罩/关闭按钮)\n * 统一走这里,保证两者行为一致(都有动画 + 都 emit hbClose/hbClosed)。\n */\n private startLeave() {\n if (this.modal) unlockScroll();\n document.removeEventListener('keydown', this.handleKeyDown);\n this.hbClose.emit();\n this.leaving = true;\n if (this.leaveTimer) clearTimeout(this.leaveTimer);\n this.leaveTimer = setTimeout(() => {\n this.leaving = false;\n this.hbClosed.emit();\n }, 300);\n }\n\n private handleOverlayClick = () => {\n if (this.closeOnClickModal) this.close();\n };\n\n /** 是否应渲染弹层 DOM:打开中 或 离场动画期内 */\n private get shouldRender(): boolean {\n return this.modelValue || this.leaving;\n }\n\n render() {\n if (this.destroyOnClose && !this.shouldRender) return null;\n\n return (\n <div class={{ 'hb-dialog-wrapper': true, 'hb-dialog-wrapper--hidden': !this.shouldRender }}>\n {this.modal && (\n <div\n class={{\n 'hb-dialog__overlay': true,\n 'hb-dialog__overlay--visible': this.modelValue,\n 'hb-dialog__overlay--leaving': this.leaving,\n }}\n style={{ zIndex: String(this.zIndex) }}\n onClick={this.handleOverlayClick}\n />\n )}\n <div\n ref={el => (this.panelRef = el as HTMLElement)}\n class={{\n 'hb-dialog': true,\n 'hb-dialog--fullscreen': this.fullscreen,\n 'hb-dialog--visible': this.modelValue,\n 'hb-dialog--leaving': this.leaving,\n }}\n style={{\n zIndex: String(this.zIndex + 1),\n width: this.fullscreen ? '100%' : this.width,\n }}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden={this.modelValue ? 'false' : 'true'}\n >\n <div class=\"hb-dialog__header\">\n <span class=\"hb-dialog__title\">{this.title}</span>\n {this.showClose && (\n <button type=\"button\" class=\"hb-dialog__close\" aria-label=\"关闭\" onClick={this.close}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={2} stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </svg>\n </button>\n )}\n </div>\n <div class=\"hb-dialog__body\">\n <slot />\n </div>\n <div class=\"hb-dialog__footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}