huibo-ui 0.3.0 → 0.5.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 (839) 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-904747ff.js → date-helpers-c05ef385.js} +10 -17
  4. package/dist/cjs/date-helpers-c05ef385.js.map +1 -0
  5. package/dist/cjs/hb-affix.cjs.entry.js +1 -1
  6. package/dist/cjs/hb-alert.cjs.entry.js +2 -1
  7. package/dist/cjs/hb-alert.cjs.entry.js.map +1 -1
  8. package/dist/cjs/hb-aside.cjs.entry.js +1 -1
  9. package/dist/cjs/hb-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/hb-backtop.cjs.entry.js +2 -2
  11. package/dist/cjs/hb-badge.cjs.entry.js +1 -1
  12. package/dist/cjs/hb-breadcrumb-item.cjs.entry.js +1 -1
  13. package/dist/cjs/hb-breadcrumb.cjs.entry.js +1 -1
  14. package/dist/cjs/hb-button.cjs.entry.js +2 -2
  15. package/dist/cjs/hb-calendar.cjs.entry.js +78 -10
  16. package/dist/cjs/hb-calendar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/hb-card.cjs.entry.js +1 -1
  18. package/dist/cjs/hb-cascader.cjs.entry.js +306 -146
  19. package/dist/cjs/hb-cascader.cjs.entry.js.map +1 -1
  20. package/dist/cjs/hb-checkbox-group.cjs.entry.js +12 -8
  21. package/dist/cjs/hb-checkbox-group.cjs.entry.js.map +1 -1
  22. package/dist/cjs/hb-checkbox.cjs.entry.js +9 -4
  23. package/dist/cjs/hb-checkbox.cjs.entry.js.map +1 -1
  24. package/dist/cjs/hb-collapse-item.cjs.entry.js +13 -4
  25. package/dist/cjs/hb-collapse-item.cjs.entry.js.map +1 -1
  26. package/dist/cjs/hb-collapse.cjs.entry.js +20 -15
  27. package/dist/cjs/hb-collapse.cjs.entry.js.map +1 -1
  28. package/dist/cjs/hb-color-picker-panel.cjs.entry.js +2 -2
  29. package/dist/cjs/hb-color-picker.cjs.entry.js +108 -28
  30. package/dist/cjs/hb-color-picker.cjs.entry.js.map +1 -1
  31. package/dist/cjs/hb-config-provider.cjs.entry.js +1 -1
  32. package/dist/cjs/hb-container.cjs.entry.js +2 -2
  33. package/dist/cjs/hb-date-picker-pane.cjs.entry.js +2 -2
  34. package/dist/cjs/hb-date-picker.cjs.entry.js +90 -9
  35. package/dist/cjs/hb-date-picker.cjs.entry.js.map +1 -1
  36. package/dist/cjs/hb-date-range-picker.cjs.entry.js +3 -3
  37. package/dist/cjs/hb-date-time-picker.cjs.entry.js +3 -3
  38. package/dist/cjs/hb-descriptions.cjs.entry.js +2 -2
  39. package/dist/cjs/hb-descriptions.cjs.entry.js.map +1 -1
  40. package/dist/cjs/hb-dialog.cjs.entry.js +51 -12
  41. package/dist/cjs/hb-dialog.cjs.entry.js.map +1 -1
  42. package/dist/cjs/hb-divider.cjs.entry.js +2 -2
  43. package/dist/cjs/hb-drawer.cjs.entry.js +34 -4
  44. package/dist/cjs/hb-drawer.cjs.entry.js.map +1 -1
  45. package/dist/cjs/hb-dropdown.cjs.entry.js +91 -11
  46. package/dist/cjs/hb-dropdown.cjs.entry.js.map +1 -1
  47. package/dist/cjs/hb-empty.cjs.entry.js +1 -1
  48. package/dist/cjs/hb-float-button.cjs.entry.js +2 -2
  49. package/dist/cjs/hb-footer.cjs.entry.js +1 -1
  50. package/dist/cjs/hb-form-item.cjs.entry.js +61 -9
  51. package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
  52. package/dist/cjs/hb-form.cjs.entry.js +13 -8
  53. package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
  54. package/dist/cjs/hb-header.cjs.entry.js +1 -1
  55. package/dist/cjs/hb-image-preview.cjs.entry.js +13 -9
  56. package/dist/cjs/hb-image-preview.cjs.entry.js.map +1 -1
  57. package/dist/cjs/hb-image.cjs.entry.js +21 -3
  58. package/dist/cjs/hb-image.cjs.entry.js.map +1 -1
  59. package/dist/cjs/hb-input-number.cjs.entry.js +7 -7
  60. package/dist/cjs/hb-input-number.cjs.entry.js.map +1 -1
  61. package/dist/cjs/hb-input-tag.cjs.entry.js +2 -2
  62. package/dist/cjs/hb-input.cjs.entry.js +40 -3
  63. package/dist/cjs/hb-input.cjs.entry.js.map +1 -1
  64. package/dist/cjs/hb-layout.cjs.entry.js +36 -14
  65. package/dist/cjs/hb-layout.cjs.entry.js.map +1 -1
  66. package/dist/cjs/hb-link.cjs.entry.js +2 -2
  67. package/dist/cjs/hb-loading.cjs.entry.js +2 -2
  68. package/dist/cjs/hb-main.cjs.entry.js +1 -1
  69. package/dist/cjs/hb-menu-item.cjs.entry.js +14 -5
  70. package/dist/cjs/hb-menu-item.cjs.entry.js.map +1 -1
  71. package/dist/cjs/hb-menu.cjs.entry.js +3 -3
  72. package/dist/cjs/hb-menu.cjs.entry.js.map +1 -1
  73. package/dist/cjs/hb-message.cjs.entry.js +13 -4
  74. package/dist/cjs/hb-message.cjs.entry.js.map +1 -1
  75. package/dist/cjs/hb-notification.cjs.entry.js +2 -2
  76. package/dist/cjs/hb-page-header.cjs.entry.js +1 -1
  77. package/dist/cjs/hb-pagination.cjs.entry.js +24 -8
  78. package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
  79. package/dist/cjs/hb-popconfirm.cjs.entry.js +57 -8
  80. package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
  81. package/dist/cjs/hb-popover.cjs.entry.js +37 -5
  82. package/dist/cjs/hb-popover.cjs.entry.js.map +1 -1
  83. package/dist/cjs/hb-progress.cjs.entry.js +1 -1
  84. package/dist/cjs/hb-radio.cjs.entry.js +8 -3
  85. package/dist/cjs/hb-radio.cjs.entry.js.map +1 -1
  86. package/dist/cjs/hb-rate.cjs.entry.js +46 -4
  87. package/dist/cjs/hb-rate.cjs.entry.js.map +1 -1
  88. package/dist/cjs/hb-result.cjs.entry.js +1 -1
  89. package/dist/cjs/hb-row.cjs.entry.js +2 -2
  90. package/dist/cjs/hb-scrollbar.cjs.entry.js +5 -5
  91. package/dist/cjs/hb-scrollbar.cjs.entry.js.map +1 -1
  92. package/dist/cjs/hb-segmented.cjs.entry.js +50 -5
  93. package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
  94. package/dist/cjs/hb-select.cjs.entry.js +64 -16
  95. package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
  96. package/dist/cjs/hb-slider.cjs.entry.js +186 -23
  97. package/dist/cjs/hb-slider.cjs.entry.js.map +1 -1
  98. package/dist/cjs/hb-space.cjs.entry.js +2 -2
  99. package/dist/cjs/hb-statistic.cjs.entry.js +1 -1
  100. package/dist/cjs/hb-step.cjs.entry.js +1 -1
  101. package/dist/cjs/hb-steps.cjs.entry.js +30 -9
  102. package/dist/cjs/hb-steps.cjs.entry.js.map +1 -1
  103. package/dist/cjs/hb-sub-menu.cjs.entry.js +5 -5
  104. package/dist/cjs/hb-switch.cjs.entry.js +9 -4
  105. package/dist/cjs/hb-switch.cjs.entry.js.map +1 -1
  106. package/dist/cjs/hb-tab-pane.cjs.entry.js +1 -1
  107. package/dist/cjs/hb-table.cjs.entry.js +26 -17
  108. package/dist/cjs/hb-table.cjs.entry.js.map +1 -1
  109. package/dist/cjs/hb-tabs.cjs.entry.js +31 -10
  110. package/dist/cjs/hb-tabs.cjs.entry.js.map +1 -1
  111. package/dist/cjs/hb-tag.cjs.entry.js +3 -2
  112. package/dist/cjs/hb-tag.cjs.entry.js.map +1 -1
  113. package/dist/cjs/hb-text.cjs.entry.js +2 -2
  114. package/dist/cjs/hb-time-picker.cjs.entry.js +14 -9
  115. package/dist/cjs/hb-time-picker.cjs.entry.js.map +1 -1
  116. package/dist/cjs/hb-time-select.cjs.entry.js +13 -4
  117. package/dist/cjs/hb-time-select.cjs.entry.js.map +1 -1
  118. package/dist/cjs/hb-timeline.cjs.entry.js +1 -1
  119. package/dist/cjs/hb-tooltip.cjs.entry.js +43 -6
  120. package/dist/cjs/hb-tooltip.cjs.entry.js.map +1 -1
  121. package/dist/cjs/hb-transfer.cjs.entry.js +2 -2
  122. package/dist/cjs/hb-tree-select.cjs.entry.js +215 -23
  123. package/dist/cjs/hb-tree-select.cjs.entry.js.map +1 -1
  124. package/dist/cjs/hb-tree.cjs.entry.js +145 -12
  125. package/dist/cjs/hb-tree.cjs.entry.js.map +1 -1
  126. package/dist/cjs/hb-upload.cjs.entry.js +3 -3
  127. package/dist/cjs/hb-watermark.cjs.entry.js +19 -11
  128. package/dist/cjs/hb-watermark.cjs.entry.js.map +1 -1
  129. package/dist/cjs/huibo-ui.cjs.js +1 -1
  130. package/dist/cjs/loader.cjs.js +1 -1
  131. package/dist/cjs/transition-59f1da0f.js +34 -0
  132. package/dist/cjs/transition-59f1da0f.js.map +1 -0
  133. package/dist/collection/collection-manifest.json +3 -3
  134. package/dist/collection/components/Affix/Affix.js +1 -1
  135. package/dist/collection/components/Alert/Alert.js +2 -1
  136. package/dist/collection/components/Alert/Alert.js.map +1 -1
  137. package/dist/collection/components/Avatar/Avatar.js +1 -1
  138. package/dist/collection/components/Backtop/Backtop.js +2 -2
  139. package/dist/collection/components/Badge/Badge.js +1 -1
  140. package/dist/collection/components/Breadcrumb/Breadcrumb.js +1 -1
  141. package/dist/collection/components/Breadcrumb/BreadcrumbItem.js +1 -1
  142. package/dist/collection/components/Button/Button.js +2 -2
  143. package/dist/collection/components/Calendar/Calendar.js +84 -10
  144. package/dist/collection/components/Calendar/Calendar.js.map +1 -1
  145. package/dist/collection/components/Calendar/calendar.css +16 -0
  146. package/dist/collection/components/Card/Card.js +1 -1
  147. package/dist/collection/components/Cascader/Cascader.js +410 -194
  148. package/dist/collection/components/Cascader/Cascader.js.map +1 -1
  149. package/dist/collection/components/Cascader/cascader.css +170 -16
  150. package/dist/collection/components/Checkbox/Checkbox.js +9 -4
  151. package/dist/collection/components/Checkbox/Checkbox.js.map +1 -1
  152. package/dist/collection/components/Checkbox/CheckboxGroup.js +12 -8
  153. package/dist/collection/components/Checkbox/CheckboxGroup.js.map +1 -1
  154. package/dist/collection/components/Collapse/Collapse.js +20 -15
  155. package/dist/collection/components/Collapse/Collapse.js.map +1 -1
  156. package/dist/collection/components/Collapse/CollapseItem.js +33 -4
  157. package/dist/collection/components/Collapse/CollapseItem.js.map +1 -1
  158. package/dist/collection/components/ColorPicker/ColorPicker.js +109 -28
  159. package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
  160. package/dist/collection/components/ColorPicker/color-picker.css +21 -3
  161. package/dist/collection/components/ColorPickerPanel/ColorPickerPanel.js +2 -2
  162. package/dist/collection/components/ConfigProvider/ConfigProvider.js +1 -1
  163. package/dist/collection/components/Container/Aside.js +1 -1
  164. package/dist/collection/components/Container/Container.js +2 -2
  165. package/dist/collection/components/Container/Footer.js +1 -1
  166. package/dist/collection/components/Container/Header.js +1 -1
  167. package/dist/collection/components/Container/Main.js +1 -1
  168. package/dist/collection/components/DatePicker/DatePicker.js +94 -12
  169. package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
  170. package/dist/collection/components/DatePicker/date-picker.css +63 -2
  171. package/dist/collection/components/DatePickerPane/DatePickerPane.js +1 -1
  172. package/dist/collection/components/DateRangePicker/DateRangePicker.js +2 -2
  173. package/dist/collection/components/DateTimePicker/DateTimePicker.js +2 -2
  174. package/dist/collection/components/Descriptions/Descriptions.js +1 -1
  175. package/dist/collection/components/Descriptions/descriptions.css +52 -10
  176. package/dist/collection/components/Dialog/Dialog.js +54 -10
  177. package/dist/collection/components/Dialog/Dialog.js.map +1 -1
  178. package/dist/collection/components/Dialog/dialog.css +57 -11
  179. package/dist/collection/components/Divider/Divider.js +2 -2
  180. package/dist/collection/components/Drawer/Drawer.js +34 -3
  181. package/dist/collection/components/Drawer/Drawer.js.map +1 -1
  182. package/dist/collection/components/Drawer/drawer.css +207 -17
  183. package/dist/collection/components/Dropdown/Dropdown.js +103 -12
  184. package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
  185. package/dist/collection/components/Dropdown/dropdown.css +26 -3
  186. package/dist/collection/components/Empty/Empty.js +1 -1
  187. package/dist/collection/components/FloatButton/FloatButton.js +2 -2
  188. package/dist/collection/components/Form/Form.js +14 -9
  189. package/dist/collection/components/Form/Form.js.map +1 -1
  190. package/dist/collection/components/Form/FormItem.js +62 -10
  191. package/dist/collection/components/Form/FormItem.js.map +1 -1
  192. package/dist/collection/components/Form/form-item.css +57 -6
  193. package/dist/collection/components/Form/form.css +1 -0
  194. package/dist/collection/components/Image/Image.js +24 -3
  195. package/dist/collection/components/Image/Image.js.map +1 -1
  196. package/dist/collection/components/ImagePreview/ImagePreview.js +13 -9
  197. package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
  198. package/dist/collection/components/Input/Input.js +39 -2
  199. package/dist/collection/components/Input/Input.js.map +1 -1
  200. package/dist/collection/components/Input/input.css +22 -4
  201. package/dist/collection/components/InputNumber/InputNumber.js +6 -6
  202. package/dist/collection/components/InputNumber/InputNumber.js.map +1 -1
  203. package/dist/collection/components/InputNumber/input-number.css +11 -1
  204. package/dist/collection/components/InputTag/InputTag.js +2 -2
  205. package/dist/collection/components/Layout/Layout.js +87 -34
  206. package/dist/collection/components/Layout/Layout.js.map +1 -1
  207. package/dist/collection/components/Layout/Row.js +2 -2
  208. package/dist/collection/components/Layout/layout.css +1732 -71
  209. package/dist/collection/components/Link/Link.js +2 -2
  210. package/dist/collection/components/Loading/Loading.js +2 -2
  211. package/dist/collection/components/Menu/Menu.js +2 -2
  212. package/dist/collection/components/Menu/MenuItem.js +34 -5
  213. package/dist/collection/components/Menu/MenuItem.js.map +1 -1
  214. package/dist/collection/components/Menu/SubMenu.js +4 -4
  215. package/dist/collection/components/Menu/menu.css +25 -0
  216. package/dist/collection/components/Message/Message.js +13 -4
  217. package/dist/collection/components/Message/Message.js.map +1 -1
  218. package/dist/collection/components/Notification/Notification.js +2 -2
  219. package/dist/collection/components/PageHeader/PageHeader.js +1 -1
  220. package/dist/collection/components/Pagination/Pagination.js +26 -7
  221. package/dist/collection/components/Pagination/Pagination.js.map +1 -1
  222. package/dist/collection/components/Pagination/pagination.css +23 -0
  223. package/dist/collection/components/Popconfirm/Popconfirm.js +66 -7
  224. package/dist/collection/components/Popconfirm/Popconfirm.js.map +1 -1
  225. package/dist/collection/components/Popconfirm/popconfirm.css +80 -16
  226. package/dist/collection/components/Popover/Popover.js +46 -4
  227. package/dist/collection/components/Popover/Popover.js.map +1 -1
  228. package/dist/collection/components/Popover/popover.css +49 -8
  229. package/dist/collection/components/Progress/Progress.js +1 -1
  230. package/dist/collection/components/Radio/Radio.js +8 -3
  231. package/dist/collection/components/Radio/Radio.js.map +1 -1
  232. package/dist/collection/components/Rate/Rate.js +46 -4
  233. package/dist/collection/components/Rate/Rate.js.map +1 -1
  234. package/dist/collection/components/Result/Result.js +1 -1
  235. package/dist/collection/components/Scrollbar/Scrollbar.js +5 -5
  236. package/dist/collection/components/Scrollbar/Scrollbar.js.map +1 -1
  237. package/dist/collection/components/Segmented/Segmented.js +65 -6
  238. package/dist/collection/components/Segmented/Segmented.js.map +1 -1
  239. package/dist/collection/components/Select/Select.js +63 -15
  240. package/dist/collection/components/Select/Select.js.map +1 -1
  241. package/dist/collection/components/Select/select.css +50 -5
  242. package/dist/collection/components/Slider/Slider.js +218 -24
  243. package/dist/collection/components/Slider/Slider.js.map +1 -1
  244. package/dist/collection/components/Slider/slider.css +57 -7
  245. package/dist/collection/components/Space/Space.js +2 -2
  246. package/dist/collection/components/Statistic/Statistic.js +1 -1
  247. package/dist/collection/components/Steps/Step.js +1 -1
  248. package/dist/collection/components/Steps/Steps.js +35 -8
  249. package/dist/collection/components/Steps/Steps.js.map +1 -1
  250. package/dist/collection/components/Switch/Switch.js +8 -3
  251. package/dist/collection/components/Switch/Switch.js.map +1 -1
  252. package/dist/collection/components/Switch/switch.css +47 -1
  253. package/dist/collection/components/Table/Table.js +25 -16
  254. package/dist/collection/components/Table/Table.js.map +1 -1
  255. package/dist/collection/components/Table/table.css +26 -2
  256. package/dist/collection/components/Tabs/TabPane.js +1 -1
  257. package/dist/collection/components/Tabs/Tabs.js +31 -10
  258. package/dist/collection/components/Tabs/Tabs.js.map +1 -1
  259. package/dist/collection/components/Tag/Tag.js +3 -2
  260. package/dist/collection/components/Tag/Tag.js.map +1 -1
  261. package/dist/collection/components/Text/Text.js +2 -2
  262. package/dist/collection/components/TimePicker/TimePicker.js +14 -9
  263. package/dist/collection/components/TimePicker/TimePicker.js.map +1 -1
  264. package/dist/collection/components/TimeSelect/TimeSelect.js +13 -4
  265. package/dist/collection/components/TimeSelect/TimeSelect.js.map +1 -1
  266. package/dist/collection/components/Timeline/Timeline.js +1 -1
  267. package/dist/collection/components/Tooltip/Tooltip.js +52 -6
  268. package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
  269. package/dist/collection/components/Tooltip/tooltip.css +24 -2
  270. package/dist/collection/components/Transfer/Transfer.js +2 -2
  271. package/dist/collection/components/Tree/Tree.js +147 -13
  272. package/dist/collection/components/Tree/Tree.js.map +1 -1
  273. package/dist/collection/components/TreeSelect/TreeSelect.js +219 -23
  274. package/dist/collection/components/TreeSelect/TreeSelect.js.map +1 -1
  275. package/dist/collection/components/TreeSelect/tree-select.css +41 -7
  276. package/dist/collection/components/Upload/Upload.js +3 -3
  277. package/dist/collection/components/Watermark/Watermark.js +19 -11
  278. package/dist/collection/components/Watermark/Watermark.js.map +1 -1
  279. package/dist/collection/utils/a11y.js +15 -1
  280. package/dist/collection/utils/a11y.js.map +1 -1
  281. package/dist/collection/utils/date-helpers.js +9 -16
  282. package/dist/collection/utils/date-helpers.js.map +1 -1
  283. package/dist/collection/utils/transition.js +29 -0
  284. package/dist/collection/utils/transition.js.map +1 -0
  285. package/dist/components/hb-affix.js +1 -1
  286. package/dist/components/hb-alert.js +2 -1
  287. package/dist/components/hb-alert.js.map +1 -1
  288. package/dist/components/hb-aside.js +1 -1
  289. package/dist/components/hb-avatar.js +1 -1
  290. package/dist/components/hb-backtop.js +2 -2
  291. package/dist/components/hb-badge.js +1 -1
  292. package/dist/components/hb-breadcrumb-item.js +1 -1
  293. package/dist/components/hb-breadcrumb.js +1 -1
  294. package/dist/components/hb-button.js +2 -2
  295. package/dist/components/hb-calendar.js +80 -11
  296. package/dist/components/hb-calendar.js.map +1 -1
  297. package/dist/components/hb-card.js +1 -1
  298. package/dist/components/hb-cascader.js +309 -146
  299. package/dist/components/hb-cascader.js.map +1 -1
  300. package/dist/components/hb-checkbox-group.js +12 -8
  301. package/dist/components/hb-checkbox-group.js.map +1 -1
  302. package/dist/components/hb-checkbox.js +9 -4
  303. package/dist/components/hb-checkbox.js.map +1 -1
  304. package/dist/components/hb-collapse-item.js +14 -4
  305. package/dist/components/hb-collapse-item.js.map +1 -1
  306. package/dist/components/hb-collapse.js +20 -15
  307. package/dist/components/hb-collapse.js.map +1 -1
  308. package/dist/components/hb-color-picker-panel.js +2 -2
  309. package/dist/components/hb-color-picker.js +110 -29
  310. package/dist/components/hb-color-picker.js.map +1 -1
  311. package/dist/components/hb-config-provider.js +1 -1
  312. package/dist/components/hb-container.js +2 -2
  313. package/dist/components/hb-date-picker-pane.js +2 -2
  314. package/dist/components/hb-date-picker.js +92 -10
  315. package/dist/components/hb-date-picker.js.map +1 -1
  316. package/dist/components/hb-date-range-picker.js +3 -3
  317. package/dist/components/hb-date-time-picker.js +3 -3
  318. package/dist/components/hb-descriptions.js +2 -2
  319. package/dist/components/hb-descriptions.js.map +1 -1
  320. package/dist/components/hb-dialog.js +53 -13
  321. package/dist/components/hb-dialog.js.map +1 -1
  322. package/dist/components/hb-divider.js +2 -2
  323. package/dist/components/hb-drawer.js +36 -5
  324. package/dist/components/hb-drawer.js.map +1 -1
  325. package/dist/components/hb-dropdown.js +94 -12
  326. package/dist/components/hb-dropdown.js.map +1 -1
  327. package/dist/components/hb-empty.js +1 -1
  328. package/dist/components/hb-float-button.js +2 -2
  329. package/dist/components/hb-footer.js +1 -1
  330. package/dist/components/hb-form-item.js +61 -9
  331. package/dist/components/hb-form-item.js.map +1 -1
  332. package/dist/components/hb-form.js +13 -8
  333. package/dist/components/hb-form.js.map +1 -1
  334. package/dist/components/hb-header.js +1 -1
  335. package/dist/components/hb-icon.js +1 -89
  336. package/dist/components/hb-icon.js.map +1 -1
  337. package/dist/components/hb-image-preview.js +13 -9
  338. package/dist/components/hb-image-preview.js.map +1 -1
  339. package/dist/components/hb-image.js +23 -3
  340. package/dist/components/hb-image.js.map +1 -1
  341. package/dist/components/hb-input-number.js +7 -7
  342. package/dist/components/hb-input-number.js.map +1 -1
  343. package/dist/components/hb-input-tag.js +2 -2
  344. package/dist/components/hb-input.js +40 -3
  345. package/dist/components/hb-input.js.map +1 -1
  346. package/dist/components/hb-layout.js +36 -14
  347. package/dist/components/hb-layout.js.map +1 -1
  348. package/dist/components/hb-link.js +2 -2
  349. package/dist/components/hb-loading.js +2 -2
  350. package/dist/components/hb-main.js +1 -1
  351. package/dist/components/hb-menu-item.js +15 -5
  352. package/dist/components/hb-menu-item.js.map +1 -1
  353. package/dist/components/hb-menu.js +3 -3
  354. package/dist/components/hb-menu.js.map +1 -1
  355. package/dist/components/hb-message.js +13 -4
  356. package/dist/components/hb-message.js.map +1 -1
  357. package/dist/components/hb-notification.js +2 -2
  358. package/dist/components/hb-page-header.js +1 -1
  359. package/dist/components/hb-pagination.js +28 -10
  360. package/dist/components/hb-pagination.js.map +1 -1
  361. package/dist/components/hb-popconfirm.js +58 -8
  362. package/dist/components/hb-popconfirm.js.map +1 -1
  363. package/dist/components/hb-popover.js +38 -5
  364. package/dist/components/hb-popover.js.map +1 -1
  365. package/dist/components/hb-progress.js +1 -1
  366. package/dist/components/hb-radio.js +8 -3
  367. package/dist/components/hb-radio.js.map +1 -1
  368. package/dist/components/hb-rate.js +46 -4
  369. package/dist/components/hb-rate.js.map +1 -1
  370. package/dist/components/hb-result.js +1 -1
  371. package/dist/components/hb-row.js +2 -2
  372. package/dist/components/hb-scrollbar.js +5 -5
  373. package/dist/components/hb-scrollbar.js.map +1 -1
  374. package/dist/components/hb-segmented.js +54 -6
  375. package/dist/components/hb-segmented.js.map +1 -1
  376. package/dist/components/hb-select.js +64 -16
  377. package/dist/components/hb-select.js.map +1 -1
  378. package/dist/components/hb-slider.js +191 -24
  379. package/dist/components/hb-slider.js.map +1 -1
  380. package/dist/components/hb-space.js +2 -2
  381. package/dist/components/hb-statistic.js +1 -1
  382. package/dist/components/hb-step.js +1 -1
  383. package/dist/components/hb-steps.js +35 -8
  384. package/dist/components/hb-steps.js.map +1 -1
  385. package/dist/components/hb-sub-menu.js +5 -5
  386. package/dist/components/hb-switch.js +9 -4
  387. package/dist/components/hb-switch.js.map +1 -1
  388. package/dist/components/hb-tab-pane.js +1 -1
  389. package/dist/components/hb-table.js +26 -17
  390. package/dist/components/hb-table.js.map +1 -1
  391. package/dist/components/hb-tabs.js +31 -10
  392. package/dist/components/hb-tabs.js.map +1 -1
  393. package/dist/components/hb-tag.js +3 -2
  394. package/dist/components/hb-tag.js.map +1 -1
  395. package/dist/components/hb-text.js +2 -2
  396. package/dist/components/hb-time-picker.js +14 -9
  397. package/dist/components/hb-time-picker.js.map +1 -1
  398. package/dist/components/hb-time-select.js +13 -4
  399. package/dist/components/hb-time-select.js.map +1 -1
  400. package/dist/components/hb-timeline.js +1 -1
  401. package/dist/components/hb-tooltip.js +44 -6
  402. package/dist/components/hb-tooltip.js.map +1 -1
  403. package/dist/components/hb-transfer.js +2 -2
  404. package/dist/components/hb-tree-select.js +219 -24
  405. package/dist/components/hb-tree-select.js.map +1 -1
  406. package/dist/components/hb-tree.js +147 -13
  407. package/dist/components/hb-tree.js.map +1 -1
  408. package/dist/components/hb-upload.js +3 -3
  409. package/dist/components/hb-watermark.js +19 -11
  410. package/dist/components/hb-watermark.js.map +1 -1
  411. package/dist/components/{p-cc0aeb50.js → p-00aa34c8.js} +17 -3
  412. package/dist/components/p-00aa34c8.js.map +1 -0
  413. package/dist/components/p-86d92faf.js +93 -0
  414. package/dist/components/p-86d92faf.js.map +1 -0
  415. package/dist/{esm/date-helpers-e4d85a67.js → components/p-e0876aca.js} +10 -17
  416. package/dist/components/p-e0876aca.js.map +1 -0
  417. package/dist/components/p-fad66d69.js +32 -0
  418. package/dist/components/p-fad66d69.js.map +1 -0
  419. package/dist/esm/{a11y-f9ab2964.js → a11y-e4cde5b0.js} +17 -3
  420. package/dist/esm/a11y-e4cde5b0.js.map +1 -0
  421. package/dist/{components/p-cf94cbf6.js → esm/date-helpers-259ed2f1.js} +10 -17
  422. package/dist/esm/date-helpers-259ed2f1.js.map +1 -0
  423. package/dist/esm/hb-affix.entry.js +1 -1
  424. package/dist/esm/hb-alert.entry.js +2 -1
  425. package/dist/esm/hb-alert.entry.js.map +1 -1
  426. package/dist/esm/hb-aside.entry.js +1 -1
  427. package/dist/esm/hb-avatar.entry.js +1 -1
  428. package/dist/esm/hb-backtop.entry.js +2 -2
  429. package/dist/esm/hb-badge.entry.js +1 -1
  430. package/dist/esm/hb-breadcrumb-item.entry.js +1 -1
  431. package/dist/esm/hb-breadcrumb.entry.js +1 -1
  432. package/dist/esm/hb-button.entry.js +2 -2
  433. package/dist/esm/hb-calendar.entry.js +78 -10
  434. package/dist/esm/hb-calendar.entry.js.map +1 -1
  435. package/dist/esm/hb-card.entry.js +1 -1
  436. package/dist/esm/hb-cascader.entry.js +306 -146
  437. package/dist/esm/hb-cascader.entry.js.map +1 -1
  438. package/dist/esm/hb-checkbox-group.entry.js +12 -8
  439. package/dist/esm/hb-checkbox-group.entry.js.map +1 -1
  440. package/dist/esm/hb-checkbox.entry.js +9 -4
  441. package/dist/esm/hb-checkbox.entry.js.map +1 -1
  442. package/dist/esm/hb-collapse-item.entry.js +13 -4
  443. package/dist/esm/hb-collapse-item.entry.js.map +1 -1
  444. package/dist/esm/hb-collapse.entry.js +20 -15
  445. package/dist/esm/hb-collapse.entry.js.map +1 -1
  446. package/dist/esm/hb-color-picker-panel.entry.js +2 -2
  447. package/dist/esm/hb-color-picker.entry.js +108 -28
  448. package/dist/esm/hb-color-picker.entry.js.map +1 -1
  449. package/dist/esm/hb-config-provider.entry.js +1 -1
  450. package/dist/esm/hb-container.entry.js +2 -2
  451. package/dist/esm/hb-date-picker-pane.entry.js +2 -2
  452. package/dist/esm/hb-date-picker.entry.js +90 -9
  453. package/dist/esm/hb-date-picker.entry.js.map +1 -1
  454. package/dist/esm/hb-date-range-picker.entry.js +3 -3
  455. package/dist/esm/hb-date-time-picker.entry.js +3 -3
  456. package/dist/esm/hb-descriptions.entry.js +2 -2
  457. package/dist/esm/hb-descriptions.entry.js.map +1 -1
  458. package/dist/esm/hb-dialog.entry.js +51 -12
  459. package/dist/esm/hb-dialog.entry.js.map +1 -1
  460. package/dist/esm/hb-divider.entry.js +2 -2
  461. package/dist/esm/hb-drawer.entry.js +34 -4
  462. package/dist/esm/hb-drawer.entry.js.map +1 -1
  463. package/dist/esm/hb-dropdown.entry.js +91 -11
  464. package/dist/esm/hb-dropdown.entry.js.map +1 -1
  465. package/dist/esm/hb-empty.entry.js +1 -1
  466. package/dist/esm/hb-float-button.entry.js +2 -2
  467. package/dist/esm/hb-footer.entry.js +1 -1
  468. package/dist/esm/hb-form-item.entry.js +61 -9
  469. package/dist/esm/hb-form-item.entry.js.map +1 -1
  470. package/dist/esm/hb-form.entry.js +13 -8
  471. package/dist/esm/hb-form.entry.js.map +1 -1
  472. package/dist/esm/hb-header.entry.js +1 -1
  473. package/dist/esm/hb-image-preview.entry.js +13 -9
  474. package/dist/esm/hb-image-preview.entry.js.map +1 -1
  475. package/dist/esm/hb-image.entry.js +21 -3
  476. package/dist/esm/hb-image.entry.js.map +1 -1
  477. package/dist/esm/hb-input-number.entry.js +7 -7
  478. package/dist/esm/hb-input-number.entry.js.map +1 -1
  479. package/dist/esm/hb-input-tag.entry.js +2 -2
  480. package/dist/esm/hb-input.entry.js +40 -3
  481. package/dist/esm/hb-input.entry.js.map +1 -1
  482. package/dist/esm/hb-layout.entry.js +36 -14
  483. package/dist/esm/hb-layout.entry.js.map +1 -1
  484. package/dist/esm/hb-link.entry.js +2 -2
  485. package/dist/esm/hb-loading.entry.js +2 -2
  486. package/dist/esm/hb-main.entry.js +1 -1
  487. package/dist/esm/hb-menu-item.entry.js +14 -5
  488. package/dist/esm/hb-menu-item.entry.js.map +1 -1
  489. package/dist/esm/hb-menu.entry.js +3 -3
  490. package/dist/esm/hb-menu.entry.js.map +1 -1
  491. package/dist/esm/hb-message.entry.js +13 -4
  492. package/dist/esm/hb-message.entry.js.map +1 -1
  493. package/dist/esm/hb-notification.entry.js +2 -2
  494. package/dist/esm/hb-page-header.entry.js +1 -1
  495. package/dist/esm/hb-pagination.entry.js +24 -8
  496. package/dist/esm/hb-pagination.entry.js.map +1 -1
  497. package/dist/esm/hb-popconfirm.entry.js +57 -8
  498. package/dist/esm/hb-popconfirm.entry.js.map +1 -1
  499. package/dist/esm/hb-popover.entry.js +37 -5
  500. package/dist/esm/hb-popover.entry.js.map +1 -1
  501. package/dist/esm/hb-progress.entry.js +1 -1
  502. package/dist/esm/hb-radio.entry.js +8 -3
  503. package/dist/esm/hb-radio.entry.js.map +1 -1
  504. package/dist/esm/hb-rate.entry.js +46 -4
  505. package/dist/esm/hb-rate.entry.js.map +1 -1
  506. package/dist/esm/hb-result.entry.js +1 -1
  507. package/dist/esm/hb-row.entry.js +2 -2
  508. package/dist/esm/hb-scrollbar.entry.js +5 -5
  509. package/dist/esm/hb-scrollbar.entry.js.map +1 -1
  510. package/dist/esm/hb-segmented.entry.js +51 -6
  511. package/dist/esm/hb-segmented.entry.js.map +1 -1
  512. package/dist/esm/hb-select.entry.js +64 -16
  513. package/dist/esm/hb-select.entry.js.map +1 -1
  514. package/dist/esm/hb-slider.entry.js +186 -23
  515. package/dist/esm/hb-slider.entry.js.map +1 -1
  516. package/dist/esm/hb-space.entry.js +2 -2
  517. package/dist/esm/hb-statistic.entry.js +1 -1
  518. package/dist/esm/hb-step.entry.js +1 -1
  519. package/dist/esm/hb-steps.entry.js +28 -7
  520. package/dist/esm/hb-steps.entry.js.map +1 -1
  521. package/dist/esm/hb-sub-menu.entry.js +5 -5
  522. package/dist/esm/hb-switch.entry.js +9 -4
  523. package/dist/esm/hb-switch.entry.js.map +1 -1
  524. package/dist/esm/hb-tab-pane.entry.js +1 -1
  525. package/dist/esm/hb-table.entry.js +26 -17
  526. package/dist/esm/hb-table.entry.js.map +1 -1
  527. package/dist/esm/hb-tabs.entry.js +31 -10
  528. package/dist/esm/hb-tabs.entry.js.map +1 -1
  529. package/dist/esm/hb-tag.entry.js +3 -2
  530. package/dist/esm/hb-tag.entry.js.map +1 -1
  531. package/dist/esm/hb-text.entry.js +2 -2
  532. package/dist/esm/hb-time-picker.entry.js +14 -9
  533. package/dist/esm/hb-time-picker.entry.js.map +1 -1
  534. package/dist/esm/hb-time-select.entry.js +13 -4
  535. package/dist/esm/hb-time-select.entry.js.map +1 -1
  536. package/dist/esm/hb-timeline.entry.js +1 -1
  537. package/dist/esm/hb-tooltip.entry.js +43 -6
  538. package/dist/esm/hb-tooltip.entry.js.map +1 -1
  539. package/dist/esm/hb-transfer.entry.js +2 -2
  540. package/dist/esm/hb-tree-select.entry.js +215 -23
  541. package/dist/esm/hb-tree-select.entry.js.map +1 -1
  542. package/dist/esm/hb-tree.entry.js +145 -12
  543. package/dist/esm/hb-tree.entry.js.map +1 -1
  544. package/dist/esm/hb-upload.entry.js +3 -3
  545. package/dist/esm/hb-watermark.entry.js +19 -11
  546. package/dist/esm/hb-watermark.entry.js.map +1 -1
  547. package/dist/esm/huibo-ui.js +1 -1
  548. package/dist/esm/loader.js +1 -1
  549. package/dist/esm/transition-4295d789.js +32 -0
  550. package/dist/esm/transition-4295d789.js.map +1 -0
  551. package/dist/huibo-ui/huibo-ui.css +1 -1
  552. package/dist/huibo-ui/huibo-ui.esm.js +1 -1
  553. package/dist/huibo-ui/huibo-ui.esm.js.map +1 -1
  554. package/dist/huibo-ui/p-00aa34c8.js +2 -0
  555. package/dist/huibo-ui/p-00aa34c8.js.map +1 -0
  556. package/dist/huibo-ui/p-02f15843.entry.js +2 -0
  557. package/dist/huibo-ui/p-0cc1e3f3.entry.js +2 -0
  558. package/dist/huibo-ui/p-0cc1e3f3.entry.js.map +1 -0
  559. package/dist/huibo-ui/{p-f1c084c5.entry.js → p-0ddae4e9.entry.js} +2 -2
  560. package/dist/huibo-ui/{p-672076c3.entry.js → p-10f6c184.entry.js} +2 -2
  561. package/dist/huibo-ui/p-10f6c184.entry.js.map +1 -0
  562. package/dist/huibo-ui/{p-6ac242fe.entry.js → p-14c3b47b.entry.js} +2 -2
  563. package/dist/huibo-ui/{p-8c80a765.entry.js → p-15db24e9.entry.js} +2 -2
  564. package/dist/huibo-ui/{p-8b027491.entry.js → p-193efdc0.entry.js} +2 -2
  565. package/dist/huibo-ui/{p-8d925e3d.entry.js → p-1b0fbe69.entry.js} +2 -2
  566. package/dist/huibo-ui/{p-85f68526.entry.js → p-1b98152b.entry.js} +2 -2
  567. package/dist/huibo-ui/p-1b98152b.entry.js.map +1 -0
  568. package/dist/huibo-ui/p-1f6d0adb.entry.js +2 -0
  569. package/dist/huibo-ui/p-1f6d0adb.entry.js.map +1 -0
  570. package/dist/huibo-ui/{p-f374d5a3.entry.js → p-20632186.entry.js} +2 -2
  571. package/dist/huibo-ui/{p-e6f2d71d.entry.js → p-20fc554b.entry.js} +2 -2
  572. package/dist/huibo-ui/{p-64ca0980.entry.js → p-29092b85.entry.js} +2 -2
  573. package/dist/huibo-ui/p-29092b85.entry.js.map +1 -0
  574. package/dist/huibo-ui/p-2bc30b1b.entry.js +2 -0
  575. package/dist/huibo-ui/p-2bc30b1b.entry.js.map +1 -0
  576. package/dist/huibo-ui/{p-fd19813c.entry.js → p-2bcda1bb.entry.js} +2 -2
  577. package/dist/huibo-ui/{p-231a7335.entry.js → p-2ca9796a.entry.js} +2 -2
  578. package/dist/huibo-ui/p-2ca9796a.entry.js.map +1 -0
  579. package/dist/huibo-ui/{p-e0768565.entry.js → p-3042f986.entry.js} +2 -2
  580. package/dist/huibo-ui/{p-be48d2aa.entry.js → p-3dacb26b.entry.js} +2 -2
  581. package/dist/huibo-ui/{p-6a1ec3ff.entry.js → p-3deff48c.entry.js} +2 -2
  582. package/dist/huibo-ui/{p-c321c4aa.entry.js → p-412ff618.entry.js} +2 -2
  583. package/dist/huibo-ui/p-415295f3.entry.js +2 -0
  584. package/dist/huibo-ui/p-415295f3.entry.js.map +1 -0
  585. package/dist/huibo-ui/p-494e6c25.entry.js +2 -0
  586. package/dist/huibo-ui/p-494e6c25.entry.js.map +1 -0
  587. package/dist/huibo-ui/p-4d87d7f4.entry.js +2 -0
  588. package/dist/huibo-ui/p-4d87d7f4.entry.js.map +1 -0
  589. package/dist/huibo-ui/p-54a28052.entry.js +2 -0
  590. package/dist/huibo-ui/p-54a28052.entry.js.map +1 -0
  591. package/dist/huibo-ui/{p-88127de1.entry.js → p-55cd13eb.entry.js} +2 -2
  592. package/dist/huibo-ui/{p-58ebb9b3.entry.js → p-5c839288.entry.js} +2 -2
  593. package/dist/huibo-ui/p-5e253c15.entry.js +2 -0
  594. package/dist/huibo-ui/p-5e253c15.entry.js.map +1 -0
  595. package/dist/huibo-ui/p-63d68c61.entry.js +2 -0
  596. package/dist/huibo-ui/p-63d68c61.entry.js.map +1 -0
  597. package/dist/huibo-ui/{p-a042e3d0.entry.js → p-6518c435.entry.js} +2 -2
  598. package/dist/huibo-ui/p-687d8dff.entry.js +2 -0
  599. package/dist/huibo-ui/p-687d8dff.entry.js.map +1 -0
  600. package/dist/huibo-ui/p-688460ce.entry.js +2 -0
  601. package/dist/huibo-ui/p-688460ce.entry.js.map +1 -0
  602. package/dist/huibo-ui/p-69bb1dd9.entry.js +2 -0
  603. package/dist/huibo-ui/p-69bb1dd9.entry.js.map +1 -0
  604. package/dist/huibo-ui/{p-a0015341.entry.js → p-6bfeab80.entry.js} +2 -2
  605. package/dist/huibo-ui/{p-4001c08d.entry.js → p-6c23fbd1.entry.js} +2 -2
  606. package/dist/huibo-ui/p-6c23fbd1.entry.js.map +1 -0
  607. package/dist/huibo-ui/p-6c8cf248.entry.js +2 -0
  608. package/dist/huibo-ui/p-6c8cf248.entry.js.map +1 -0
  609. package/dist/huibo-ui/p-6efed295.entry.js +2 -0
  610. package/dist/huibo-ui/p-6efed295.entry.js.map +1 -0
  611. package/dist/huibo-ui/{p-8b1ae77e.entry.js → p-746a11a3.entry.js} +2 -2
  612. package/dist/huibo-ui/{p-c3e8893d.entry.js → p-79b24b83.entry.js} +2 -2
  613. package/dist/huibo-ui/p-79b24b83.entry.js.map +1 -0
  614. package/dist/huibo-ui/p-7a38b3e2.entry.js +2 -0
  615. package/dist/huibo-ui/p-7a38b3e2.entry.js.map +1 -0
  616. package/dist/huibo-ui/{p-c922d672.entry.js → p-7a682c56.entry.js} +2 -2
  617. package/dist/huibo-ui/{p-8c987d57.entry.js → p-7f65dc36.entry.js} +2 -2
  618. package/dist/huibo-ui/{p-463de26d.entry.js → p-815fc943.entry.js} +2 -2
  619. package/dist/huibo-ui/{p-d87fc21a.entry.js → p-88a6c905.entry.js} +2 -2
  620. package/dist/huibo-ui/{p-77017274.entry.js → p-89be7973.entry.js} +2 -2
  621. package/dist/huibo-ui/p-8a202bc5.entry.js +2 -0
  622. package/dist/huibo-ui/p-8a202bc5.entry.js.map +1 -0
  623. package/dist/huibo-ui/{p-315feadf.entry.js → p-8c4415ed.entry.js} +2 -2
  624. package/dist/huibo-ui/p-8c4415ed.entry.js.map +1 -0
  625. package/dist/huibo-ui/{p-9319c650.entry.js → p-950e7465.entry.js} +2 -2
  626. package/dist/huibo-ui/{p-6b381d0e.entry.js → p-96cecd21.entry.js} +2 -2
  627. package/dist/huibo-ui/p-96cecd21.entry.js.map +1 -0
  628. package/dist/huibo-ui/{p-710f38de.entry.js → p-98b513cd.entry.js} +2 -2
  629. package/dist/huibo-ui/p-98b513cd.entry.js.map +1 -0
  630. package/dist/huibo-ui/{p-5df47135.entry.js → p-a190ca89.entry.js} +2 -2
  631. package/dist/huibo-ui/{p-0e65e1bd.entry.js → p-ac18c68b.entry.js} +2 -2
  632. package/dist/huibo-ui/p-ac18c68b.entry.js.map +1 -0
  633. package/dist/huibo-ui/{p-d64b91ef.entry.js → p-ac45291c.entry.js} +2 -2
  634. package/dist/huibo-ui/p-ac45291c.entry.js.map +1 -0
  635. package/dist/huibo-ui/{p-477d8568.entry.js → p-aeae83af.entry.js} +2 -2
  636. package/dist/huibo-ui/{p-b489a526.entry.js → p-b06c8020.entry.js} +2 -2
  637. package/dist/huibo-ui/{p-dfaf7e37.entry.js → p-b105cf76.entry.js} +2 -2
  638. package/dist/huibo-ui/p-b105cf76.entry.js.map +1 -0
  639. package/dist/huibo-ui/{p-c3e665f6.entry.js → p-b38802b0.entry.js} +2 -2
  640. package/dist/huibo-ui/p-b38802b0.entry.js.map +1 -0
  641. package/dist/huibo-ui/{p-ea74fcae.entry.js → p-b3fd12c7.entry.js} +2 -2
  642. package/dist/huibo-ui/p-b3fd12c7.entry.js.map +1 -0
  643. package/dist/huibo-ui/p-b5ea18ba.entry.js +2 -0
  644. package/dist/huibo-ui/p-b5ea18ba.entry.js.map +1 -0
  645. package/dist/huibo-ui/{p-e2a8a396.entry.js → p-b6afe81e.entry.js} +2 -2
  646. package/dist/huibo-ui/{p-2b286698.entry.js → p-b7885d4a.entry.js} +2 -2
  647. package/dist/huibo-ui/p-b7900dee.entry.js +2 -0
  648. package/dist/huibo-ui/p-b7900dee.entry.js.map +1 -0
  649. package/dist/huibo-ui/p-b8c83751.entry.js +2 -0
  650. package/dist/huibo-ui/p-b8c83751.entry.js.map +1 -0
  651. package/dist/huibo-ui/p-c7713947.entry.js +2 -0
  652. package/dist/huibo-ui/p-c7713947.entry.js.map +1 -0
  653. package/dist/huibo-ui/{p-e0ab9010.entry.js → p-c869842c.entry.js} +2 -2
  654. package/dist/huibo-ui/p-c869842c.entry.js.map +1 -0
  655. package/dist/huibo-ui/{p-476527c1.entry.js → p-c8e917db.entry.js} +2 -2
  656. package/dist/huibo-ui/p-c8e917db.entry.js.map +1 -0
  657. package/dist/huibo-ui/p-cb66dbef.entry.js +2 -0
  658. package/dist/huibo-ui/p-cb66dbef.entry.js.map +1 -0
  659. package/dist/huibo-ui/p-cde83f76.entry.js +2 -0
  660. package/dist/huibo-ui/p-cde83f76.entry.js.map +1 -0
  661. package/dist/huibo-ui/{p-10c088f3.entry.js → p-d9c7c378.entry.js} +2 -2
  662. package/dist/huibo-ui/{p-332c8877.entry.js → p-dd9c6459.entry.js} +2 -2
  663. package/dist/huibo-ui/{p-80aca641.entry.js → p-dfccc7aa.entry.js} +2 -2
  664. package/dist/huibo-ui/{p-21682e92.entry.js → p-dfd144d8.entry.js} +2 -2
  665. package/dist/huibo-ui/p-e0876aca.js +2 -0
  666. package/dist/huibo-ui/p-e0876aca.js.map +1 -0
  667. package/dist/huibo-ui/p-e1773c93.entry.js +2 -0
  668. package/dist/huibo-ui/p-e1773c93.entry.js.map +1 -0
  669. package/dist/huibo-ui/{p-079a4130.entry.js → p-e3155cd7.entry.js} +2 -2
  670. package/dist/huibo-ui/{p-59b2e61c.entry.js → p-e73c357f.entry.js} +2 -2
  671. package/dist/huibo-ui/p-e73c357f.entry.js.map +1 -0
  672. package/dist/huibo-ui/{p-c1b4eacb.entry.js → p-e7c73624.entry.js} +2 -2
  673. package/dist/huibo-ui/p-e7c73624.entry.js.map +1 -0
  674. package/dist/huibo-ui/{p-d7815b4f.entry.js → p-e9e7abca.entry.js} +2 -2
  675. package/dist/huibo-ui/{p-f81ec512.entry.js → p-ea0823f3.entry.js} +2 -2
  676. package/dist/huibo-ui/p-ea0823f3.entry.js.map +1 -0
  677. package/dist/huibo-ui/{p-2e6584ea.entry.js → p-f1f2483f.entry.js} +2 -2
  678. package/dist/huibo-ui/{p-465dcb4c.entry.js → p-f2c78699.entry.js} +2 -2
  679. package/dist/huibo-ui/p-fad66d69.js +2 -0
  680. package/dist/huibo-ui/p-fad66d69.js.map +1 -0
  681. package/dist/huibo-ui/{p-4d8b1404.entry.js → p-fd6831f9.entry.js} +2 -2
  682. package/dist/huibo-ui/p-ff6bc5cc.entry.js +2 -0
  683. package/dist/huibo-ui/p-ff6bc5cc.entry.js.map +1 -0
  684. package/dist/types/components/Calendar/Calendar.d.ts +13 -1
  685. package/dist/types/components/Cascader/Cascader.d.ts +80 -90
  686. package/dist/types/components/Checkbox/Checkbox.d.ts +5 -0
  687. package/dist/types/components/Checkbox/CheckboxGroup.d.ts +1 -0
  688. package/dist/types/components/Collapse/Collapse.d.ts +2 -0
  689. package/dist/types/components/Collapse/CollapseItem.d.ts +8 -1
  690. package/dist/types/components/ColorPicker/ColorPicker.d.ts +11 -0
  691. package/dist/types/components/DatePicker/DatePicker.d.ts +14 -3
  692. package/dist/types/components/Dialog/Dialog.d.ts +13 -1
  693. package/dist/types/components/Drawer/Drawer.d.ts +4 -0
  694. package/dist/types/components/Dropdown/Dropdown.d.ts +18 -1
  695. package/dist/types/components/Form/Form.d.ts +2 -0
  696. package/dist/types/components/Form/FormItem.d.ts +10 -0
  697. package/dist/types/components/Image/Image.d.ts +6 -0
  698. package/dist/types/components/ImagePreview/ImagePreview.d.ts +5 -1
  699. package/dist/types/components/Input/Input.d.ts +9 -0
  700. package/dist/types/components/Layout/Layout.d.ts +20 -10
  701. package/dist/types/components/Menu/MenuItem.d.ts +8 -1
  702. package/dist/types/components/Message/Message.d.ts +3 -0
  703. package/dist/types/components/Pagination/Pagination.d.ts +3 -0
  704. package/dist/types/components/Popconfirm/Popconfirm.d.ts +16 -0
  705. package/dist/types/components/Popover/Popover.d.ts +14 -0
  706. package/dist/types/components/Radio/Radio.d.ts +5 -0
  707. package/dist/types/components/Rate/Rate.d.ts +7 -0
  708. package/dist/types/components/Segmented/Segmented.d.ts +18 -1
  709. package/dist/types/components/Select/Select.d.ts +11 -0
  710. package/dist/types/components/Slider/Slider.d.ts +27 -1
  711. package/dist/types/components/Steps/Steps.d.ts +14 -6
  712. package/dist/types/components/Table/Table.d.ts +8 -2
  713. package/dist/types/components/Tabs/Tabs.d.ts +6 -0
  714. package/dist/types/components/Tooltip/Tooltip.d.ts +15 -1
  715. package/dist/types/components/Tree/Tree.d.ts +24 -0
  716. package/dist/types/components/TreeSelect/TreeSelect.d.ts +26 -0
  717. package/dist/types/components/Watermark/Watermark.d.ts +7 -1
  718. package/dist/types/components.d.ts +290 -98
  719. package/dist/types/utils/a11y.d.ts +9 -0
  720. package/dist/types/utils/date-helpers.d.ts +1 -1
  721. package/dist/types/utils/transition.d.ts +27 -0
  722. package/package.json +8 -2
  723. package/readme.md +88 -73
  724. package/dist/cjs/a11y-802de67a.js.map +0 -1
  725. package/dist/cjs/date-helpers-904747ff.js.map +0 -1
  726. package/dist/components/p-cc0aeb50.js.map +0 -1
  727. package/dist/components/p-cf94cbf6.js.map +0 -1
  728. package/dist/esm/a11y-f9ab2964.js.map +0 -1
  729. package/dist/esm/date-helpers-e4d85a67.js.map +0 -1
  730. package/dist/huibo-ui/p-003cee87.entry.js +0 -2
  731. package/dist/huibo-ui/p-003cee87.entry.js.map +0 -1
  732. package/dist/huibo-ui/p-0a033738.entry.js +0 -2
  733. package/dist/huibo-ui/p-0a033738.entry.js.map +0 -1
  734. package/dist/huibo-ui/p-0bef78ac.entry.js +0 -2
  735. package/dist/huibo-ui/p-0bef78ac.entry.js.map +0 -1
  736. package/dist/huibo-ui/p-0e65e1bd.entry.js.map +0 -1
  737. package/dist/huibo-ui/p-0f189251.entry.js +0 -2
  738. package/dist/huibo-ui/p-0f189251.entry.js.map +0 -1
  739. package/dist/huibo-ui/p-1b5acd6d.entry.js +0 -2
  740. package/dist/huibo-ui/p-1b5acd6d.entry.js.map +0 -1
  741. package/dist/huibo-ui/p-231a7335.entry.js.map +0 -1
  742. package/dist/huibo-ui/p-24ad7eec.entry.js +0 -2
  743. package/dist/huibo-ui/p-24ad7eec.entry.js.map +0 -1
  744. package/dist/huibo-ui/p-315feadf.entry.js.map +0 -1
  745. package/dist/huibo-ui/p-3c7f73c8.entry.js +0 -2
  746. package/dist/huibo-ui/p-3c7f73c8.entry.js.map +0 -1
  747. package/dist/huibo-ui/p-4001c08d.entry.js.map +0 -1
  748. package/dist/huibo-ui/p-44c48246.entry.js +0 -2
  749. package/dist/huibo-ui/p-44c48246.entry.js.map +0 -1
  750. package/dist/huibo-ui/p-476527c1.entry.js.map +0 -1
  751. package/dist/huibo-ui/p-4d0dff15.entry.js +0 -2
  752. package/dist/huibo-ui/p-58d20809.entry.js +0 -2
  753. package/dist/huibo-ui/p-58d20809.entry.js.map +0 -1
  754. package/dist/huibo-ui/p-59b2e61c.entry.js.map +0 -1
  755. package/dist/huibo-ui/p-64ca0980.entry.js.map +0 -1
  756. package/dist/huibo-ui/p-672076c3.entry.js.map +0 -1
  757. package/dist/huibo-ui/p-6b381d0e.entry.js.map +0 -1
  758. package/dist/huibo-ui/p-710f38de.entry.js.map +0 -1
  759. package/dist/huibo-ui/p-756acbdb.entry.js +0 -2
  760. package/dist/huibo-ui/p-756acbdb.entry.js.map +0 -1
  761. package/dist/huibo-ui/p-75a93de3.entry.js +0 -2
  762. package/dist/huibo-ui/p-75a93de3.entry.js.map +0 -1
  763. package/dist/huibo-ui/p-769960f4.entry.js +0 -2
  764. package/dist/huibo-ui/p-769960f4.entry.js.map +0 -1
  765. package/dist/huibo-ui/p-7f6975ad.entry.js +0 -2
  766. package/dist/huibo-ui/p-7f6975ad.entry.js.map +0 -1
  767. package/dist/huibo-ui/p-85f68526.entry.js.map +0 -1
  768. package/dist/huibo-ui/p-8d615521.entry.js +0 -2
  769. package/dist/huibo-ui/p-8d615521.entry.js.map +0 -1
  770. package/dist/huibo-ui/p-953b9514.entry.js +0 -2
  771. package/dist/huibo-ui/p-953b9514.entry.js.map +0 -1
  772. package/dist/huibo-ui/p-965d4d02.entry.js +0 -2
  773. package/dist/huibo-ui/p-965d4d02.entry.js.map +0 -1
  774. package/dist/huibo-ui/p-ad6b0c6e.entry.js +0 -2
  775. package/dist/huibo-ui/p-ad6b0c6e.entry.js.map +0 -1
  776. package/dist/huibo-ui/p-c1a059d9.entry.js +0 -2
  777. package/dist/huibo-ui/p-c1a059d9.entry.js.map +0 -1
  778. package/dist/huibo-ui/p-c1b4eacb.entry.js.map +0 -1
  779. package/dist/huibo-ui/p-c3e665f6.entry.js.map +0 -1
  780. package/dist/huibo-ui/p-c3e8893d.entry.js.map +0 -1
  781. package/dist/huibo-ui/p-cc0aeb50.js +0 -2
  782. package/dist/huibo-ui/p-cc0aeb50.js.map +0 -1
  783. package/dist/huibo-ui/p-cf94cbf6.js +0 -2
  784. package/dist/huibo-ui/p-cf94cbf6.js.map +0 -1
  785. package/dist/huibo-ui/p-d3939d44.entry.js +0 -2
  786. package/dist/huibo-ui/p-d3939d44.entry.js.map +0 -1
  787. package/dist/huibo-ui/p-d64b91ef.entry.js.map +0 -1
  788. package/dist/huibo-ui/p-dd05cb2c.entry.js +0 -2
  789. package/dist/huibo-ui/p-dd05cb2c.entry.js.map +0 -1
  790. package/dist/huibo-ui/p-dfaf7e37.entry.js.map +0 -1
  791. package/dist/huibo-ui/p-e0ab9010.entry.js.map +0 -1
  792. package/dist/huibo-ui/p-e9490259.entry.js +0 -2
  793. package/dist/huibo-ui/p-e9490259.entry.js.map +0 -1
  794. package/dist/huibo-ui/p-ea74fcae.entry.js.map +0 -1
  795. package/dist/huibo-ui/p-ebd04656.entry.js +0 -2
  796. package/dist/huibo-ui/p-ebd04656.entry.js.map +0 -1
  797. package/dist/huibo-ui/p-ed0ff857.entry.js +0 -2
  798. package/dist/huibo-ui/p-ed0ff857.entry.js.map +0 -1
  799. package/dist/huibo-ui/p-f0ac7db5.entry.js +0 -2
  800. package/dist/huibo-ui/p-f0ac7db5.entry.js.map +0 -1
  801. package/dist/huibo-ui/p-f81ec512.entry.js.map +0 -1
  802. /package/dist/huibo-ui/{p-4d0dff15.entry.js.map → p-02f15843.entry.js.map} +0 -0
  803. /package/dist/huibo-ui/{p-f1c084c5.entry.js.map → p-0ddae4e9.entry.js.map} +0 -0
  804. /package/dist/huibo-ui/{p-6ac242fe.entry.js.map → p-14c3b47b.entry.js.map} +0 -0
  805. /package/dist/huibo-ui/{p-8c80a765.entry.js.map → p-15db24e9.entry.js.map} +0 -0
  806. /package/dist/huibo-ui/{p-8b027491.entry.js.map → p-193efdc0.entry.js.map} +0 -0
  807. /package/dist/huibo-ui/{p-8d925e3d.entry.js.map → p-1b0fbe69.entry.js.map} +0 -0
  808. /package/dist/huibo-ui/{p-f374d5a3.entry.js.map → p-20632186.entry.js.map} +0 -0
  809. /package/dist/huibo-ui/{p-e6f2d71d.entry.js.map → p-20fc554b.entry.js.map} +0 -0
  810. /package/dist/huibo-ui/{p-fd19813c.entry.js.map → p-2bcda1bb.entry.js.map} +0 -0
  811. /package/dist/huibo-ui/{p-e0768565.entry.js.map → p-3042f986.entry.js.map} +0 -0
  812. /package/dist/huibo-ui/{p-be48d2aa.entry.js.map → p-3dacb26b.entry.js.map} +0 -0
  813. /package/dist/huibo-ui/{p-6a1ec3ff.entry.js.map → p-3deff48c.entry.js.map} +0 -0
  814. /package/dist/huibo-ui/{p-c321c4aa.entry.js.map → p-412ff618.entry.js.map} +0 -0
  815. /package/dist/huibo-ui/{p-88127de1.entry.js.map → p-55cd13eb.entry.js.map} +0 -0
  816. /package/dist/huibo-ui/{p-58ebb9b3.entry.js.map → p-5c839288.entry.js.map} +0 -0
  817. /package/dist/huibo-ui/{p-a042e3d0.entry.js.map → p-6518c435.entry.js.map} +0 -0
  818. /package/dist/huibo-ui/{p-a0015341.entry.js.map → p-6bfeab80.entry.js.map} +0 -0
  819. /package/dist/huibo-ui/{p-8b1ae77e.entry.js.map → p-746a11a3.entry.js.map} +0 -0
  820. /package/dist/huibo-ui/{p-c922d672.entry.js.map → p-7a682c56.entry.js.map} +0 -0
  821. /package/dist/huibo-ui/{p-8c987d57.entry.js.map → p-7f65dc36.entry.js.map} +0 -0
  822. /package/dist/huibo-ui/{p-463de26d.entry.js.map → p-815fc943.entry.js.map} +0 -0
  823. /package/dist/huibo-ui/{p-d87fc21a.entry.js.map → p-88a6c905.entry.js.map} +0 -0
  824. /package/dist/huibo-ui/{p-77017274.entry.js.map → p-89be7973.entry.js.map} +0 -0
  825. /package/dist/huibo-ui/{p-9319c650.entry.js.map → p-950e7465.entry.js.map} +0 -0
  826. /package/dist/huibo-ui/{p-5df47135.entry.js.map → p-a190ca89.entry.js.map} +0 -0
  827. /package/dist/huibo-ui/{p-477d8568.entry.js.map → p-aeae83af.entry.js.map} +0 -0
  828. /package/dist/huibo-ui/{p-b489a526.entry.js.map → p-b06c8020.entry.js.map} +0 -0
  829. /package/dist/huibo-ui/{p-e2a8a396.entry.js.map → p-b6afe81e.entry.js.map} +0 -0
  830. /package/dist/huibo-ui/{p-2b286698.entry.js.map → p-b7885d4a.entry.js.map} +0 -0
  831. /package/dist/huibo-ui/{p-10c088f3.entry.js.map → p-d9c7c378.entry.js.map} +0 -0
  832. /package/dist/huibo-ui/{p-332c8877.entry.js.map → p-dd9c6459.entry.js.map} +0 -0
  833. /package/dist/huibo-ui/{p-80aca641.entry.js.map → p-dfccc7aa.entry.js.map} +0 -0
  834. /package/dist/huibo-ui/{p-21682e92.entry.js.map → p-dfd144d8.entry.js.map} +0 -0
  835. /package/dist/huibo-ui/{p-079a4130.entry.js.map → p-e3155cd7.entry.js.map} +0 -0
  836. /package/dist/huibo-ui/{p-d7815b4f.entry.js.map → p-e9e7abca.entry.js.map} +0 -0
  837. /package/dist/huibo-ui/{p-2e6584ea.entry.js.map → p-f1f2483f.entry.js.map} +0 -0
  838. /package/dist/huibo-ui/{p-465dcb4c.entry.js.map → p-f2c78699.entry.js.map} +0 -0
  839. /package/dist/huibo-ui/{p-4d8b1404.entry.js.map → p-fd6831f9.entry.js.map} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, g as getElement, h } from './index-fdf7135e.js';
2
2
  import { g as getNextZIndex, l as lockScroll, u as unlockScroll } from './popup-manager-128cc685.js';
3
- import { c as createFocusTrap } from './a11y-f9ab2964.js';
3
+ import { c as createFocusTrap } from './a11y-e4cde5b0.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 = class {
@@ -40,18 +40,28 @@ const Dialog = class {
40
40
  zIndex = 0;
41
41
  panelRef;
42
42
  trap;
43
- handleVisibleChange(newVal) {
43
+ /** 离场动画期间保留渲染(避免 display:none 打断 transition) */
44
+ leaving = false;
45
+ leaveTimer;
46
+ handleVisibleChange(newVal, oldVal) {
44
47
  if (newVal) {
48
+ // 打开:清掉可能残留的离场定时器,重置 leaving
49
+ if (this.leaveTimer) {
50
+ clearTimeout(this.leaveTimer);
51
+ this.leaveTimer = undefined;
52
+ }
53
+ this.leaving = false;
45
54
  this.zIndex = getNextZIndex();
46
55
  if (this.modal)
47
56
  lockScroll();
48
57
  this.hbOpen.emit();
49
58
  document.addEventListener('keydown', this.handleKeyDown);
50
59
  }
51
- else {
52
- if (this.modal)
53
- unlockScroll();
54
- document.removeEventListener('keydown', this.handleKeyDown);
60
+ else if (oldVal) {
61
+ // 关闭(受控或内部触发统一走这里):进入离场动画期,
62
+ // 动画结束(300ms)后才 emit closed + 真正卸载。
63
+ // 仅在「从打开→关闭」时执行,避免已关闭时重复 emit。
64
+ this.startLeave();
55
65
  }
56
66
  }
57
67
  disconnectedCallback() {
@@ -59,6 +69,8 @@ const Dialog = class {
59
69
  unlockScroll();
60
70
  document.removeEventListener('keydown', this.handleKeyDown);
61
71
  this.trap?.disconnect();
72
+ if (this.leaveTimer)
73
+ clearTimeout(this.leaveTimer);
62
74
  }
63
75
  componentDidRender() {
64
76
  if (!this.panelRef)
@@ -80,24 +92,51 @@ const Dialog = class {
80
92
  };
81
93
  close = () => {
82
94
  this.modelValue = false;
83
- this.hbClose.emit();
84
- setTimeout(() => this.hbClosed.emit(), 300);
95
+ this.startLeave();
85
96
  };
97
+ /**
98
+ * 进入离场动画期:解锁滚动、移除监听、保留 DOM 播放动画,
99
+ * 结束(300ms)后重置 leaving 并 emit hbClosed。
100
+ * 受控关闭(父组件直接设 modelValue=false 经 @Watch)与内部关闭(ESC/遮罩/关闭按钮)
101
+ * 统一走这里,保证两者行为一致(都有动画 + 都 emit hbClose/hbClosed)。
102
+ */
103
+ startLeave() {
104
+ if (this.modal)
105
+ unlockScroll();
106
+ document.removeEventListener('keydown', this.handleKeyDown);
107
+ this.hbClose.emit();
108
+ this.leaving = true;
109
+ if (this.leaveTimer)
110
+ clearTimeout(this.leaveTimer);
111
+ this.leaveTimer = setTimeout(() => {
112
+ this.leaving = false;
113
+ this.hbClosed.emit();
114
+ }, 300);
115
+ }
86
116
  handleOverlayClick = () => {
87
117
  if (this.closeOnClickModal)
88
118
  this.close();
89
119
  };
120
+ /** 是否应渲染弹层 DOM:打开中 或 离场动画期内 */
121
+ get shouldRender() {
122
+ return this.modelValue || this.leaving;
123
+ }
90
124
  render() {
91
- if (this.destroyOnClose && !this.modelValue)
125
+ if (this.destroyOnClose && !this.shouldRender)
92
126
  return null;
93
- 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: {
127
+ return (h("div", { class: { 'hb-dialog-wrapper': true, 'hb-dialog-wrapper--hidden': !this.shouldRender } }, this.modal && (h("div", { class: {
128
+ 'hb-dialog__overlay': true,
129
+ 'hb-dialog__overlay--visible': this.modelValue,
130
+ 'hb-dialog__overlay--leaving': this.leaving,
131
+ }, style: { zIndex: String(this.zIndex) }, onClick: this.handleOverlayClick })), h("div", { ref: el => (this.panelRef = el), class: {
94
132
  'hb-dialog': true,
95
133
  'hb-dialog--fullscreen': this.fullscreen,
96
134
  'hb-dialog--visible': this.modelValue,
135
+ 'hb-dialog--leaving': this.leaving,
97
136
  }, style: {
98
137
  zIndex: String(this.zIndex + 1),
99
138
  width: this.fullscreen ? '100%' : this.width,
100
- }, 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" })))));
139
+ }, 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" })))));
101
140
  }
102
141
  static get watchers() { return {
103
142
  "modelValue": ["handleVisibleChange"]
@@ -1 +1 @@
1
- {"file":"hb-dialog.entry.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,quPAAquP,CAAC;AACxvP,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;IAGzB,mBAAmB,CAAC,MAAe;QACjC,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,MAAM,GAAG,aAAa,EAAE,CAAC;YAC9B,IAAI,IAAI,CAAC,KAAK;gBAAE,UAAU,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACnB,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SAC1D;aAAM;YACL,IAAI,IAAI,CAAC,KAAK;gBAAE,YAAY,EAAE,CA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AAI,CAAC;QAEzD,QACE,WAAK,KAAK,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,IACrF,IAAI,CAAC,KAAK,KACT,WACE,KAAK,EAAC,oBAAoB,EAC1B,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EACtC,OAAO,EAAE,IAAI,CAAC,kBAAkB,GAChC,CACH,EACD,WACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,QAAQ,GAAG,EAAiB,CAAC,EAChD,KAAK,EAAE;gBACL,WAAW,EAAE,IAAI;gBACjB,uBAAuB,EAAE,IAAI,CAAC,UAAU;gBACxC,oBAAoB,EAAE,IAAI,CAAC,UAAU;aACtC,EACD,KAAK,EAAE;gBACL,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.entry.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,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,QAAQ,EAAC,KAAK,EAAC,kBAAkB,gBAAY,cAAI,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,IAChF,WAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,kBAAe,CAAC,oBAAiB,OAAO,qBAAiB,OAAO,iBAAa,MAAM,IAC3I,YAAM,CAAC,EAAC,sBAAsB,GAAG,CAC7B,CACC,CACV,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 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}
@@ -16,13 +16,13 @@ const Divider = class {
16
16
  dashed = false;
17
17
  render() {
18
18
  const hasContent = this.el.childNodes.length > 0;
19
- return (h("div", { key: '9c92e52f27cf63f9eb08f76204c0380df1f70762', class: {
19
+ return (h("div", { key: '72f2e4f0e52b38799b0c292e99565c683a2b455c', class: {
20
20
  'hb-divider': true,
21
21
  [`hb-divider--${this.direction}`]: true,
22
22
  'hb-divider--dashed': this.dashed,
23
23
  'hb-divider--with-text': hasContent,
24
24
  [`hb-divider--with-text-${this.contentPosition}`]: hasContent,
25
- } }, h("div", { key: 'be7ed538cb7c11ecd5228456c70064b7a1134c22', class: "hb-divider__line hb-divider__line--before" }), h("div", { key: '381b60a6d74c9d595d23ba931f4de73a1479d45c', class: "hb-divider__text" }, h("slot", { key: '0bd08b0d41a9d2d4dad651e0c37a7e7fc10eab4c' })), h("div", { key: 'dd0774049f2b68b47f21c7171532f830d766c276', class: "hb-divider__line hb-divider__line--after" })));
25
+ } }, h("div", { key: 'afe16a81dee380655eaa42090dd1b760e9403e8c', class: "hb-divider__line hb-divider__line--before" }), h("div", { key: '9b64b270790df8794ae9bbbe13783fc1b77367f1', class: "hb-divider__text" }, h("slot", { key: '9e9a5a024fa6212026cca8e9e8d76e84af6523cb' })), h("div", { key: '6277539ebf37f4e295e8b9d9a8ce912de15efa71', class: "hb-divider__line hb-divider__line--after" })));
26
26
  }
27
27
  };
28
28
  Divider.style = HbDividerStyle0;
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-fdf7135e.js';
2
2
  import { g as getNextZIndex, l as lockScroll, u as unlockScroll } from './popup-manager-128cc685.js';
3
- import { c as createFocusTrap } from './a11y-f9ab2964.js';
3
+ import { c as createFocusTrap } from './a11y-e4cde5b0.js';
4
4
 
5
- const drawerCss = "/*! 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%}.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-drawer-wrapper{inset:0;pointer-events:none;position:fixed;z-index:1000}.hb-drawer__overlay{background:var(--hb-color-bg-mask);inset:0;transition:opacity .3s}.hb-drawer,.hb-drawer__overlay{pointer-events:auto;position:fixed}.hb-drawer{background:var(--hb-color-bg-elevated);box-shadow:var(--hb-box-shadow-lg);display:flex;flex-direction:column;transition:transform .3s}.hb-drawer--rtl{bottom:0;right:0;top:0;transform:translate(100%)}.hb-drawer--ltr{bottom:0;left:0;top:0;transform:translate(-100%)}.hb-drawer--ttb{left:0;right:0;top:0;transform:translateY(-100%)}.hb-drawer--btt{bottom:0;left:0;right:0;transform:translateY(100%)}.hb-drawer--visible.hb-drawer--ltr,.hb-drawer--visible.hb-drawer--rtl{transform:translate(0)}.hb-drawer--visible.hb-drawer--btt,.hb-drawer--visible.hb-drawer--ttb{transform:translateY(0)}.hb-drawer__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-drawer__title{font-size:var(--hb-font-size-lg);font-weight:600}.hb-drawer__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:flex;font-size:18px;height:28px;justify-content:center;width:28px}.hb-drawer__close:hover{background:var(--hb-color-fill-tertiary)}.hb-drawer__body{flex:1;overflow-y:auto;padding: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 drawerCss = "/*! 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%}.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-drawer-wrapper{inset:0;pointer-events:none;position:fixed;z-index:1000}.hb-drawer-wrapper:not(.hb-drawer-wrapper--visible){display:none}.hb-drawer__overlay{animation:hb-drawer-overlay-in .3s both;background:var(--hb-color-bg-mask);inset:0;pointer-events:auto;position:fixed}.hb-drawer__overlay--leaving{animation:hb-drawer-overlay-out .3s both}@keyframes hb-drawer-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes hb-drawer-overlay-out{0%{opacity:1}to{opacity:0}}.hb-drawer{background:var(--hb-color-bg-elevated);box-shadow:var(--hb-box-shadow-lg);display:flex;flex-direction:column;pointer-events:auto;position:fixed}.hb-drawer--rtl{bottom:0;right:0;top:0}.hb-drawer--ltr{bottom:0;left:0;top:0}.hb-drawer--ttb{left:0;right:0;top:0}.hb-drawer--btt{bottom:0;left:0;right:0}.hb-drawer--visible.hb-drawer--rtl{animation:hb-drawer-in-rtl .3s cubic-bezier(.16,1,.3,1) both}.hb-drawer--visible.hb-drawer--ltr{animation:hb-drawer-in-ltr .3s cubic-bezier(.16,1,.3,1) both}.hb-drawer--visible.hb-drawer--ttb{animation:hb-drawer-in-ttb .3s cubic-bezier(.16,1,.3,1) both}.hb-drawer--visible.hb-drawer--btt{animation:hb-drawer-in-btt .3s cubic-bezier(.16,1,.3,1) both}.hb-drawer--leaving.hb-drawer--rtl{animation:hb-drawer-out-rtl .3s cubic-bezier(.5,0,.75,0) both}.hb-drawer--leaving.hb-drawer--ltr{animation:hb-drawer-out-ltr .3s cubic-bezier(.5,0,.75,0) both}.hb-drawer--leaving.hb-drawer--ttb{animation:hb-drawer-out-ttb .3s cubic-bezier(.5,0,.75,0) both}.hb-drawer--leaving.hb-drawer--btt{animation:hb-drawer-out-btt .3s cubic-bezier(.5,0,.75,0) both}@keyframes hb-drawer-in-rtl{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes hb-drawer-out-rtl{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes hb-drawer-in-ltr{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes hb-drawer-out-ltr{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes hb-drawer-in-ttb{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes hb-drawer-out-ttb{0%{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes hb-drawer-in-btt{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes hb-drawer-out-btt{0%{transform:translateY(0)}to{transform:translateY(100%)}}.hb-drawer__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-drawer__title{font-size:var(--hb-font-size-lg);font-weight:600}.hb-drawer__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:flex;height:28px;justify-content:center;padding:0;transition:all var(--hb-transition-duration);width:28px}.hb-drawer__close svg{height:16px;width:16px}.hb-drawer__close:hover{background:var(--hb-color-fill-tertiary);color:var(--hb-color-text-primary)}.hb-drawer__body{flex:1;overflow-y:auto;padding: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 HbDrawerStyle0 = drawerCss;
7
7
 
8
8
  const Drawer = class {
@@ -24,10 +24,18 @@ const Drawer = class {
24
24
  zIndex = 0;
25
25
  panelRef;
26
26
  trap;
27
+ /** 离场动画期内保留渲染 */
28
+ leaving = false;
29
+ leaveTimer;
27
30
  hbOpen;
28
31
  hbClose;
29
32
  handleVisible(val) {
30
33
  if (val) {
34
+ if (this.leaveTimer) {
35
+ clearTimeout(this.leaveTimer);
36
+ this.leaveTimer = undefined;
37
+ }
38
+ this.leaving = false;
31
39
  this.zIndex = getNextZIndex();
32
40
  this.zIndexState = this.zIndex;
33
41
  if (this.modal)
@@ -40,6 +48,13 @@ const Drawer = class {
40
48
  unlockScroll();
41
49
  this.hbClose.emit();
42
50
  document.removeEventListener('keydown', this.handleKeyDown);
51
+ // 进入离场动画期,结束后真正卸载
52
+ this.leaving = true;
53
+ if (this.leaveTimer)
54
+ clearTimeout(this.leaveTimer);
55
+ this.leaveTimer = setTimeout(() => {
56
+ this.leaving = false;
57
+ }, 300);
43
58
  }
44
59
  }
45
60
  componentDidRender() {
@@ -60,19 +75,34 @@ const Drawer = class {
60
75
  unlockScroll();
61
76
  document.removeEventListener('keydown', this.handleKeyDown);
62
77
  this.trap?.disconnect();
78
+ if (this.leaveTimer)
79
+ clearTimeout(this.leaveTimer);
63
80
  }
64
81
  handleKeyDown = (e) => {
65
82
  if (this.closeOnPressEscape && e.key === 'Escape') {
66
83
  this.close();
67
84
  }
68
85
  };
69
- close = () => { this.modelValue = false; };
86
+ close = () => {
87
+ this.modelValue = false;
88
+ };
89
+ get shouldRender() {
90
+ return this.modelValue || this.leaving;
91
+ }
70
92
  render() {
71
93
  const dir = this.direction;
72
94
  const isVertical = dir === 'ttb' || dir === 'btt';
73
95
  const sizeStyle = isVertical ? { height: this.size } : { width: this.size };
74
96
  const translateClass = `hb-drawer--${dir}`;
75
- return (h("div", { key: 'fdcae509a34a2de7ba9405106b217fda8ce765fa', class: { 'hb-drawer-wrapper': true, 'hb-drawer-wrapper--visible': this.modelValue } }, this.modal && h("div", { key: '439a2a35c0936bc0e347e7826f801dbf87d1047b', class: "hb-drawer__overlay", style: { zIndex: String(this.zIndexState) }, onClick: () => this.closeOnClickModal && this.close() }), h("div", { key: '924fc27dc43f9d7b466b81a7b70cbfb1a6ba199e', ref: (el) => (this.panelRef = el), class: { 'hb-drawer': true, [translateClass]: true, 'hb-drawer--visible': this.modelValue }, style: { ...sizeStyle, zIndex: String(this.zIndexState + 1) }, role: "dialog", "aria-modal": "true", "aria-label": this.title || undefined }, h("div", { key: '6c0c1e6e4938ad96c51add0e4be93de8ef72a056', class: "hb-drawer__header" }, h("span", { key: 'bc061a418b7358364b19190cc6b042fb5a049c95', class: "hb-drawer__title" }, this.title), this.showClose && h("button", { key: '52ceeac26c55f0e89c8c4410959c25b13ab2e28b', type: "button", class: "hb-drawer__close", "aria-label": "\u5173\u95ED", onClick: this.close }, "\u00D7")), h("div", { key: 'ca916f681e9c7e4fb33d1d0b7cee03a20f42f7eb', class: "hb-drawer__body" }, h("slot", { key: 'f8a3fb1d251d5c16c98257bb8896c081623f321e' })))));
97
+ return (h("div", { key: '1b19a23690272c043ad80a8f4ad01470ef1f6627', class: { 'hb-drawer-wrapper': true, 'hb-drawer-wrapper--visible': this.shouldRender } }, this.modal && (h("div", { key: '6f1492a485eeb634e59a50300be5ad8af6ebfdcb', class: {
98
+ 'hb-drawer__overlay': true,
99
+ 'hb-drawer__overlay--leaving': this.leaving,
100
+ }, style: { zIndex: String(this.zIndexState) }, onClick: () => this.closeOnClickModal && this.close() })), h("div", { key: '4276468b6d5c2bc8628ccefeafc0de7acf372931', ref: el => (this.panelRef = el), class: {
101
+ 'hb-drawer': true,
102
+ [translateClass]: true,
103
+ 'hb-drawer--visible': this.modelValue,
104
+ 'hb-drawer--leaving': this.leaving,
105
+ }, style: { ...sizeStyle, zIndex: String(this.zIndexState + 1) }, role: "dialog", "aria-modal": "true", "aria-label": this.title || undefined, "aria-hidden": this.modelValue ? 'false' : 'true' }, h("div", { key: '66c7aa0843425292845c3a3c5841abaca233efd4', class: "hb-drawer__header" }, h("span", { key: '07226dc7437adb12e0d08ccf2259c6e470d4eea3', class: "hb-drawer__title" }, this.title), this.showClose && (h("button", { key: '2658edb09e334c02fa0218b414c354b4cbb20220', type: "button", class: "hb-drawer__close", "aria-label": "\u5173\u95ED", onClick: this.close }, h("svg", { key: '8ad5e5558c02fdb0271fa93d6fa279dee949d9f0', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { key: 'ff3585922cdeb73e68dbf1755092ade914579506', d: "M6 6l12 12M18 6L6 18" }))))), h("div", { key: 'b64ddf86b2f5a0344b80e7fb729c19a2d6d6fe5c', class: "hb-drawer__body" }, h("slot", { key: '3e3904d5d149a765130eb5f59ac1d268d48c39f6' })))));
76
106
  }
77
107
  static get watchers() { return {
78
108
  "modelValue": ["handleVisible"]
@@ -1 +1 @@
1
- {"file":"hb-dr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KAAK,EAAE,GAAI,EACrJ,4DACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,QAAQ,GAAG,EAAiB,CAAC,EAChD,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,cAAc,GAAG,IAAI,EAAE,oBAAoB,EAAE,IAAI,CAAC,UAAU,EAAE,EAC3F,KAAK,EAAE,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE,EAC7D,IAAI,EAAC,QAAQ,gBACF,MAAM,gBACL,IAAI,CAAC,KAAK,IAAI,SAAS,IAEnC,4DAAK,KAAK,EAAC,mBAAmB,IAC5B,6DAAM,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,KAAK,CAAQ,EACjD,IAAI,CAAC,SAAS,IAAI,+DAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,kBAAkB,gBAAY,cAAI,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,aAAY,CAC7G,EACN,4DAAK,KAAK,EAAC,iBAAiB,IAAC,8DAAQ,CAAM,CACvC,CACF,EACN;KACH;;;;;;;;;","names":[],"sources":["src/components/Drawer/drawer.css?tag=hb-drawer&encapsulation=shadow","src/components/Drawer/Drawer.tsx"],"sourcesContent":[":host { display: contents; }\n.hb-drawer-wrapper { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 1000; }\n.hb-drawer__overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--hb-color-bg-mask); pointer-events: auto; transition: opacity 0.3s; }\n.hb-drawer {\n position: fixed; background: var(--hb-color-bg-elevated); box-shadow: var(--hb-box-shadow-lg);\n display: flex; flex-direction: column; pointer-events: auto; transition: transform 0.3s ease;\n}\n.hb-drawer--rtl { top: 0; right: 0; bottom: 0; transform: translateX(100%); }\n.hb-drawer--ltr { top: 0; left: 0; bottom: 0; transform: translateX(-100%); }\n.hb-drawer--ttb { left: 0; right: 0; top: 0; transform: translateY(-100%); }\n.hb-drawer--btt { left: 0; right: 0; bottom: 0; transform: translateY(100%); }\n.hb-drawer--visible.hb-drawer--rtl, .hb-drawer--visible.hb-drawer--ltr { transform: translateX(0); }\n.hb-drawer--visible.hb-drawer--ttb, .hb-drawer--visible.hb-drawer--btt { transform: translateY(0); }\n.hb-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: var(--hb-spacing-md) var(--hb-spacing-lg); border-bottom: 1px solid var(--hb-color-border-secondary); }\n.hb-drawer__title { font-size: var(--hb-font-size-lg); font-weight: 600; }\n.hb-drawer__close { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--hb-color-text-secondary); width: 28px; height: 28px; border-radius: var(--hb-border-radius-sm); display: flex; align-items: center; justify-content: center; }\n.hb-drawer__close:hover { background: var(--hb-color-fill-tertiary); }\n.hb-drawer__body { flex: 1; padding: var(--hb-spacing-lg); overflow-y: auto; }\n","import { Component, h, Prop, Event, EventEmitter, Watch, State } from '@stencil/core';\nimport { lockScroll, unlockScroll, getNextZIndex } from '../../utils/popup-manager';\nimport { createFocusTrap, FocusTrap } from '../../utils/a11y';\n\n@Component({ tag: 'hb-drawer', styleUrl: 'drawer.css', shadow: true })\nexport class Drawer {\n @Prop({ mutable: true }) modelValue: boolean = false;\n @Prop() title: string = '';\n @Prop() size: string = '30%';\n @Prop() direction: 'ltr' | 'rtl' | 'ttb' | 'btt' = 'rtl';\n @Prop() closeOnClickModal: boolean = true;\n @Prop() showClose: boolean = true;\n @Prop() modal: boolean = true;\n /** 是否按 ESC 关闭 */\n @Prop() closeOnPressEscape: boolean = true;\n @State() private zIndexState: number = 0;\n private zIndex: number = 0;\n private panelRef?: HTMLElement;\n private trap?: FocusTrap;\n\n @Event() hbOpen: EventEmitter<void>;\n @Event() hbClose: EventEmitter<void>;\n\n @Watch('modelValue')\n handleVisible(val: boolean) {\n if (val) {\n this.zIndex = getNextZIndex();\n this.zIndexState = this.zIndex;\n if (this.modal) lockScroll();\n this.hbOpen.emit();\n document.addEventListener('keydown', this.handleKeyDown);\n } else {\n if (this.modal) unlockScroll();\n this.hbClose.emit();\n document.removeEventListener('keydown', this.handleKeyDown);\n }\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 disconnectedCallback() {\n if (this.modelValue && this.modal) unlockScroll();\n document.removeEventListener('keydown', this.handleKeyDown);\n this.trap?.disconnect();\n }\n\n private handleKeyDown = (e: KeyboardEvent) => {\n if (this.closeOnPressEscape && e.key === 'Escape') {\n this.close();\n }\n };\n\n private close = () => { this.modelValue = false; };\n\n render() {\n const dir = this.direction;\n const isVertical = dir === 'ttb' || dir === 'btt';\n const sizeStyle = isVertical ? { height: this.size } : { width: this.size };\n const translateClass = `hb-drawer--${dir}`;\n\n return (\n <div class={{ 'hb-drawer-wrapper': true, 'hb-drawer-wrapper--visible': this.modelValue }}>\n {this.modal && <div class=\"hb-drawer__overlay\" style={{ zIndex: String(this.zIndexState) }} onClick={() => this.closeOnClickModal && this.close()} />}\n <div\n ref={(el) => (this.panelRef = el as HTMLElement)}\n class={{ 'hb-drawer': true, [translateClass]: true, 'hb-drawer--visible': this.modelValue }}\n style={{ ...sizeStyle, zIndex: String(this.zIndexState + 1) }}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={this.title || undefined}\n >\n <div class=\"hb-drawer__header\">\n <span class=\"hb-drawer__title\">{this.title}</span>\n {this.showClose && <button type=\"button\" class=\"hb-drawer__close\" aria-label=\"关闭\" onClick={this.close}>×</button>}\n </div>\n <div class=\"hb-drawer__body\"><slot /></div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"hb-drawer.entry.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,81RAA81R,CAAC;AACj3R,uBAAe,SAAS;;MCIX,MAAM;;;;;;IACQ,UAAU,GA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AC,kBAAkB,gBAAY,cAAI,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,IAChF,4DAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,kBAAe,CAAC,oBAAiB,OAAO,qBAAiB,OAAO,iBAAa,MAAM,IAC3I,6DAAM,CAAC,EAAC,sBAAsB,GAAG,CAC7B,CACC,CACV,CACG,EACN,4DAAK,KAAK,EAAC,iBAAiB,IAC1B,8DAAQ,CACJ,CACF,CACF,EACN;KACH;;;;;;;;;","names":[],"sources":["src/components/Drawer/drawer.css?tag=hb-drawer&encapsulation=shadow","src/components/Drawer/Drawer.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n.hb-drawer-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n z-index: 1000;\n}\n\n/* wrapper 默认不显示(modelValue=false 且离场结束时);打开/离场期都可见 */\n.hb-drawer-wrapper:not(.hb-drawer-wrapper--visible) {\n display: none;\n}\n\n.hb-drawer__overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--hb-color-bg-mask);\n pointer-events: auto;\n animation: hb-drawer-overlay-in 0.3s ease both;\n}\n.hb-drawer__overlay--leaving {\n animation: hb-drawer-overlay-out 0.3s ease both;\n}\n@keyframes hb-drawer-overlay-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes hb-drawer-overlay-out {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.hb-drawer {\n position: fixed;\n background: var(--hb-color-bg-elevated);\n box-shadow: var(--hb-box-shadow-lg);\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n}\n\n/* 四方向进场动画(从屏外滑入)。visible 时播放 in;leaving 时播放 out */\n.hb-drawer--rtl {\n top: 0;\n right: 0;\n bottom: 0;\n}\n.hb-drawer--ltr {\n top: 0;\n left: 0;\n bottom: 0;\n}\n.hb-drawer--ttb {\n left: 0;\n right: 0;\n top: 0;\n}\n.hb-drawer--btt {\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.hb-drawer--visible.hb-drawer--rtl {\n animation: hb-drawer-in-rtl 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n.hb-drawer--visible.hb-drawer--ltr {\n animation: hb-drawer-in-ltr 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n.hb-drawer--visible.hb-drawer--ttb {\n animation: hb-drawer-in-ttb 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n.hb-drawer--visible.hb-drawer--btt {\n animation: hb-drawer-in-btt 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n\n.hb-drawer--leaving.hb-drawer--rtl {\n animation: hb-drawer-out-rtl 0.3s cubic-bezier(0.5, 0, 0.75, 0) both;\n}\n.hb-drawer--leaving.hb-drawer--ltr {\n animation: hb-drawer-out-ltr 0.3s cubic-bezier(0.5, 0, 0.75, 0) both;\n}\n.hb-drawer--leaving.hb-drawer--ttb {\n animation: hb-drawer-out-ttb 0.3s cubic-bezier(0.5, 0, 0.75, 0) both;\n}\n.hb-drawer--leaving.hb-drawer--btt {\n animation: hb-drawer-out-btt 0.3s cubic-bezier(0.5, 0, 0.75, 0) both;\n}\n\n@keyframes hb-drawer-in-rtl {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes hb-drawer-out-rtl {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes hb-drawer-in-ltr {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes hb-drawer-out-ltr {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(-100%);\n }\n}\n@keyframes hb-drawer-in-ttb {\n from {\n transform: translateY(-100%);\n }\n to {\n transform: translateY(0);\n }\n}\n@keyframes hb-drawer-out-ttb {\n from {\n transform: translateY(0);\n }\n to {\n transform: translateY(-100%);\n }\n}\n@keyframes hb-drawer-in-btt {\n from {\n transform: translateY(100%);\n }\n to {\n transform: translateY(0);\n }\n}\n@keyframes hb-drawer-out-btt {\n from {\n transform: translateY(0);\n }\n to {\n transform: translateY(100%);\n }\n}\n\n.hb-drawer__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.hb-drawer__title {\n font-size: var(--hb-font-size-lg);\n font-weight: 600;\n}\n.hb-drawer__close {\n border: none;\n background: none;\n cursor: pointer;\n color: var(--hb-color-text-secondary);\n width: 28px;\n height: 28px;\n border-radius: var(--hb-border-radius-sm);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n transition: all var(--hb-transition-duration);\n}\n.hb-drawer__close svg {\n width: 16px;\n height: 16px;\n}\n.hb-drawer__close:hover {\n background: var(--hb-color-fill-tertiary);\n color: var(--hb-color-text-primary);\n}\n.hb-drawer__body {\n flex: 1;\n padding: var(--hb-spacing-lg);\n overflow-y: auto;\n}\n","import { Component, h, Prop, Event, EventEmitter, Watch, State } from '@stencil/core';\nimport { lockScroll, unlockScroll, getNextZIndex } from '../../utils/popup-manager';\nimport { createFocusTrap, FocusTrap } from '../../utils/a11y';\n\n@Component({ tag: 'hb-drawer', styleUrl: 'drawer.css', shadow: true })\nexport class Drawer {\n @Prop({ mutable: true }) modelValue: boolean = false;\n @Prop() title: string = '';\n @Prop() size: string = '30%';\n @Prop() direction: 'ltr' | 'rtl' | 'ttb' | 'btt' = 'rtl';\n @Prop() closeOnClickModal: boolean = true;\n @Prop() showClose: boolean = true;\n @Prop() modal: boolean = true;\n /** 是否按 ESC 关闭 */\n @Prop() closeOnPressEscape: boolean = true;\n @State() private zIndexState: number = 0;\n private zIndex: number = 0;\n private panelRef?: HTMLElement;\n private trap?: FocusTrap;\n /** 离场动画期内保留渲染 */\n @State() private leaving: boolean = false;\n private leaveTimer?: ReturnType<typeof setTimeout>;\n\n @Event() hbOpen: EventEmitter<void>;\n @Event() hbClose: EventEmitter<void>;\n\n @Watch('modelValue')\n handleVisible(val: boolean) {\n if (val) {\n if (this.leaveTimer) {\n clearTimeout(this.leaveTimer);\n this.leaveTimer = undefined;\n }\n this.leaving = false;\n this.zIndex = getNextZIndex();\n this.zIndexState = this.zIndex;\n if (this.modal) lockScroll();\n this.hbOpen.emit();\n document.addEventListener('keydown', this.handleKeyDown);\n } else {\n if (this.modal) unlockScroll();\n this.hbClose.emit();\n document.removeEventListener('keydown', this.handleKeyDown);\n // 进入离场动画期,结束后真正卸载\n this.leaving = true;\n if (this.leaveTimer) clearTimeout(this.leaveTimer);\n this.leaveTimer = setTimeout(() => {\n this.leaving = false;\n }, 300);\n }\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 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 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 };\n\n private get shouldRender(): boolean {\n return this.modelValue || this.leaving;\n }\n\n render() {\n const dir = this.direction;\n const isVertical = dir === 'ttb' || dir === 'btt';\n const sizeStyle = isVertical ? { height: this.size } : { width: this.size };\n const translateClass = `hb-drawer--${dir}`;\n\n return (\n <div class={{ 'hb-drawer-wrapper': true, 'hb-drawer-wrapper--visible': this.shouldRender }}>\n {this.modal && (\n <div\n class={{\n 'hb-drawer__overlay': true,\n 'hb-drawer__overlay--leaving': this.leaving,\n }}\n style={{ zIndex: String(this.zIndexState) }}\n onClick={() => this.closeOnClickModal && this.close()}\n />\n )}\n <div\n ref={el => (this.panelRef = el as HTMLElement)}\n class={{\n 'hb-drawer': true,\n [translateClass]: true,\n 'hb-drawer--visible': this.modelValue,\n 'hb-drawer--leaving': this.leaving,\n }}\n style={{ ...sizeStyle, zIndex: String(this.zIndexState + 1) }}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={this.title || undefined}\n aria-hidden={this.modelValue ? 'false' : 'true'}\n >\n <div class=\"hb-drawer__header\">\n <span class=\"hb-drawer__title\">{this.title}</span>\n {this.showClose && (\n <button type=\"button\" class=\"hb-drawer__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-drawer__body\">\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,8 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, g as getElement, h } from './index-fdf7135e.js';
2
2
  import { c as createClickOutsideHandler } from './click-outside-291294f9.js';
3
3
  import { g as getNextZIndex } from './popup-manager-128cc685.js';
4
+ import { i as isActivationKey, h as handleListKeyboard } from './a11y-e4cde5b0.js';
5
+ import { c as createLeaveScheduler } from './transition-4295d789.js';
4
6
 
5
- const dropdownCss = "/*! 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;position:relative}.hb-dropdown__trigger{cursor:pointer;display:inline-block}.hb-dropdown__menu{animation:hb-dropdown-fade-in .15s ease-out;background-color:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);left:0;margin-top:4px;min-width:120px;padding:4px 0;position:absolute;top:100%}.hb-dropdown__item{align-items:center;color:var(--hb-color-text);cursor:pointer;display:flex;font-size:var(--hb-font-size-sm);padding:6px 16px;transition:background-color var(--hb-transition-duration);white-space:nowrap}.hb-dropdown__item:hover:not(.hb-dropdown__item--disabled){background-color:var(--hb-color-fill-tertiary);color:var(--hb-color-primary)}.hb-dropdown__item--disabled{color:var(--hb-color-text-disabled);cursor:not-allowed}.hb-dropdown__item--divided{border-top:1px solid var(--hb-color-border-secondary);margin-top:4px;padding-top:8px}.hb-dropdown__item--danger{color:var(--hb-color-danger)}.hb-dropdown__item--danger:hover:not(.hb-dropdown__item--disabled){background-color:var(--hb-color-danger-bg);color:var(--hb-color-danger)}@keyframes hb-dropdown-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
7
+ const dropdownCss = "/*! 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;position:relative}.hb-dropdown__trigger{cursor:pointer;display:inline-block}.hb-dropdown__menu{animation:hb-dropdown-fade-in .15s ease-out;background-color:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);left:0;margin-top:4px;min-width:120px;padding:4px 0;position:absolute;top:100%}.hb-dropdown__item{align-items:center;color:var(--hb-color-text);cursor:pointer;display:flex;font-size:var(--hb-font-size-sm);padding:6px 16px;transition:background-color var(--hb-transition-duration);white-space:nowrap}.hb-dropdown__item--active:not(.hb-dropdown__item--disabled),.hb-dropdown__item:hover:not(.hb-dropdown__item--disabled){background-color:var(--hb-color-fill-tertiary);color:var(--hb-color-primary)}.hb-dropdown__item--disabled{color:var(--hb-color-text-disabled);cursor:not-allowed}.hb-dropdown__item--divided{border-top:1px solid var(--hb-color-border-secondary);margin-top:4px;padding-top:8px}.hb-dropdown__item--danger{color:var(--hb-color-danger)}.hb-dropdown__item--danger:hover:not(.hb-dropdown__item--disabled){background-color:var(--hb-color-danger-bg);color:var(--hb-color-danger)}@keyframes hb-dropdown-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.hb-dropdown__menu--leaving{animation:hb-dropdown-fade-out .15s ease-in forwards}@keyframes hb-dropdown-fade-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@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
8
  const HbDropdownStyle0 = dropdownCss;
7
9
 
8
10
  const Dropdown = class {
@@ -18,18 +20,27 @@ const Dropdown = class {
18
20
  /** 是否禁用 */
19
21
  disabled = false;
20
22
  isOpen = false;
23
+ /** 离场动画期(保留 DOM 让 fade-out 播完) */
24
+ leaving = false;
25
+ /** 键盘高亮项索引(-1 表示无) */
26
+ activeIndex = -1;
21
27
  /** 命令事件 */
22
28
  hbCommand;
29
+ leave = createLeaveScheduler(() => this.leaving, v => (this.leaving = v), 150);
23
30
  clickOutside = createClickOutsideHandler({
24
31
  host: null,
25
32
  isOpen: () => this.isOpen,
26
- onClose: () => { this.isOpen = false; },
33
+ onClose: () => {
34
+ this.close();
35
+ },
27
36
  });
28
37
  componentDidLoad() {
29
38
  this.clickOutside = createClickOutsideHandler({
30
39
  host: this.el,
31
40
  isOpen: () => this.isOpen,
32
- onClose: () => { this.isOpen = false; },
41
+ onClose: () => {
42
+ this.close();
43
+ },
33
44
  });
34
45
  if (this.trigger === 'click') {
35
46
  this.clickOutside.connect();
@@ -37,35 +48,104 @@ const Dropdown = class {
37
48
  }
38
49
  disconnectedCallback() {
39
50
  this.clickOutside.disconnect();
51
+ this.leave.dispose();
40
52
  }
41
- show = () => {
53
+ open = () => {
42
54
  if (this.disabled)
43
55
  return;
56
+ this.leave.cancel(); // 中途又打开:取消挂起的离场
44
57
  this.isOpen = true;
58
+ this.activeIndex = this.items.findIndex(i => !i.disabled);
45
59
  };
46
- hide = () => {
60
+ close = () => {
61
+ if (!this.isOpen && !this.leaving)
62
+ return;
47
63
  this.isOpen = false;
64
+ this.activeIndex = -1;
65
+ this.leave.start();
66
+ };
67
+ show = () => {
68
+ if (this.disabled)
69
+ return;
70
+ this.open();
71
+ };
72
+ hide = () => {
73
+ this.close();
48
74
  };
49
75
  toggle = () => {
50
76
  if (this.disabled)
51
77
  return;
52
- this.isOpen = !this.isOpen;
78
+ if (this.isOpen)
79
+ this.close();
80
+ else
81
+ this.open();
53
82
  };
54
83
  handleSelect = (item) => {
55
84
  if (item.disabled)
56
85
  return;
57
- this.isOpen = false;
86
+ this.close();
58
87
  this.hbCommand.emit(item.key);
59
88
  };
89
+ handleTriggerKeydown = (e) => {
90
+ if (this.disabled)
91
+ return;
92
+ if (this.trigger === 'hover')
93
+ return;
94
+ if (isActivationKey(e.key) || e.key === 'ArrowDown') {
95
+ e.preventDefault();
96
+ this.open();
97
+ }
98
+ };
99
+ handleMenuKeydown = (e) => {
100
+ const enabledCount = this.items.length;
101
+ const action = handleListKeyboard(e, {
102
+ activeIndex: this.activeIndex,
103
+ itemCount: enabledCount,
104
+ loop: true,
105
+ });
106
+ switch (action.type) {
107
+ case 'navigate':
108
+ e.preventDefault();
109
+ {
110
+ let idx = action.index;
111
+ for (let i = 0; i < enabledCount; i++) {
112
+ if (!this.items[idx]?.disabled)
113
+ break;
114
+ idx = (idx + 1) % enabledCount;
115
+ }
116
+ this.activeIndex = idx;
117
+ }
118
+ break;
119
+ case 'select': {
120
+ e.preventDefault();
121
+ const item = this.items[action.index];
122
+ if (item && !item.disabled)
123
+ this.handleSelect(item);
124
+ break;
125
+ }
126
+ case 'close':
127
+ e.preventDefault();
128
+ this.close();
129
+ break;
130
+ }
131
+ };
132
+ get shouldRender() {
133
+ return this.isOpen || this.leaving;
134
+ }
60
135
  render() {
61
- const triggerEvents = this.trigger === 'hover'
62
- ? { onMouseEnter: this.show, onMouseLeave: this.hide }
63
- : { onClick: this.toggle };
64
- return (h("div", { key: '65db176398a94c702f6c3fcdc4128ed0e6afc376', class: "hb-dropdown", ...triggerEvents }, h("div", { key: '2c96f9af4f69d1a1c52195546b5b777e5a2d54b8', class: "hb-dropdown__trigger" }, h("slot", { key: 'cd007dcd7d357cc1d041472a72faa0a3a025bda2' })), this.isOpen && (h("div", { key: 'a3bdebbc0a701e01df36b701bc13de130c4e8d24', class: "hb-dropdown__menu", style: { zIndex: String(getNextZIndex()) } }, this.items.map(item => (h("div", { class: {
136
+ const triggerEvents = this.trigger === 'hover' ? { onMouseEnter: this.show, onMouseLeave: this.hide } : { onClick: this.toggle };
137
+ return (h("div", { key: '8855aa67978f0180ee22fa57d47d8a8530fcff59', class: "hb-dropdown", ...triggerEvents, onKeyDown: this.handleTriggerKeydown }, h("div", { key: 'f07514869b6c2fed33be57a882afbe3aad221f79', class: "hb-dropdown__trigger", role: "button", tabindex: this.disabled ? -1 : 0, "aria-haspopup": "menu", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", { key: '077a8fdd63295eaeadda3124764dd51090a7019d' })), this.shouldRender && (h("div", { key: 'f17eba6ead1c841fdc97db4fc88c62937e6b7344', class: {
138
+ 'hb-dropdown__menu': true,
139
+ 'hb-dropdown__menu--leaving': this.leaving,
140
+ }, style: { zIndex: String(getNextZIndex()) }, role: "menu", onKeyDown: this.handleMenuKeydown }, this.items.map((item, index) => (h("div", { class: {
65
141
  'hb-dropdown__item': true,
66
142
  'hb-dropdown__item--disabled': item.disabled,
67
143
  'hb-dropdown__item--divided': item.divided,
68
144
  'hb-dropdown__item--danger': item.danger,
145
+ 'hb-dropdown__item--active': index === this.activeIndex,
146
+ }, role: "menuitem", tabindex: -1, "aria-disabled": item.disabled ? 'true' : undefined, onMouseEnter: () => {
147
+ if (!item.disabled)
148
+ this.activeIndex = index;
69
149
  }, onClick: () => this.handleSelect(item) }, item.label)))))));
70
150
  }
71
151
  };