huibo-ui 0.4.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 (656) hide show
  1. package/dist/cjs/{a11y-802de67a.js → a11y-4385c871.js} +17 -2
  2. package/dist/cjs/a11y-4385c871.js.map +1 -0
  3. package/dist/cjs/{date-helpers-1ffddc59.js → date-helpers-c05ef385.js} +5 -16
  4. package/dist/cjs/date-helpers-c05ef385.js.map +1 -0
  5. package/dist/cjs/hb-alert.cjs.entry.js +2 -1
  6. package/dist/cjs/hb-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/hb-calendar.cjs.entry.js +2 -2
  8. package/dist/cjs/hb-calendar.cjs.entry.js.map +1 -1
  9. package/dist/cjs/hb-cascader.cjs.entry.js +48 -12
  10. package/dist/cjs/hb-cascader.cjs.entry.js.map +1 -1
  11. package/dist/cjs/hb-checkbox-group.cjs.entry.js +12 -8
  12. package/dist/cjs/hb-checkbox-group.cjs.entry.js.map +1 -1
  13. package/dist/cjs/hb-checkbox.cjs.entry.js +9 -4
  14. package/dist/cjs/hb-checkbox.cjs.entry.js.map +1 -1
  15. package/dist/cjs/hb-collapse-item.cjs.entry.js +13 -4
  16. package/dist/cjs/hb-collapse-item.cjs.entry.js.map +1 -1
  17. package/dist/cjs/hb-collapse.cjs.entry.js +20 -15
  18. package/dist/cjs/hb-collapse.cjs.entry.js.map +1 -1
  19. package/dist/cjs/hb-color-picker.cjs.entry.js +22 -19
  20. package/dist/cjs/hb-color-picker.cjs.entry.js.map +1 -1
  21. package/dist/cjs/hb-date-picker-pane.cjs.entry.js +1 -1
  22. package/dist/cjs/hb-date-picker.cjs.entry.js +13 -10
  23. package/dist/cjs/hb-date-picker.cjs.entry.js.map +1 -1
  24. package/dist/cjs/hb-date-range-picker.cjs.entry.js +1 -1
  25. package/dist/cjs/hb-date-time-picker.cjs.entry.js +1 -1
  26. package/dist/cjs/hb-descriptions.cjs.entry.js.map +1 -1
  27. package/dist/cjs/hb-dialog.cjs.entry.js +51 -12
  28. package/dist/cjs/hb-dialog.cjs.entry.js.map +1 -1
  29. package/dist/cjs/hb-drawer.cjs.entry.js +34 -4
  30. package/dist/cjs/hb-drawer.cjs.entry.js.map +1 -1
  31. package/dist/cjs/hb-dropdown.cjs.entry.js +27 -15
  32. package/dist/cjs/hb-dropdown.cjs.entry.js.map +1 -1
  33. package/dist/cjs/hb-empty.cjs.entry.js +1 -1
  34. package/dist/cjs/hb-float-button.cjs.entry.js +2 -2
  35. package/dist/cjs/hb-form-item.cjs.entry.js +11 -10
  36. package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
  37. package/dist/cjs/hb-form.cjs.entry.js +12 -7
  38. package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
  39. package/dist/cjs/hb-image-preview.cjs.entry.js +1 -1
  40. package/dist/cjs/hb-image-preview.cjs.entry.js.map +1 -1
  41. package/dist/cjs/hb-image.cjs.entry.js +21 -3
  42. package/dist/cjs/hb-image.cjs.entry.js.map +1 -1
  43. package/dist/cjs/hb-input-number.cjs.entry.js +7 -7
  44. package/dist/cjs/hb-input-number.cjs.entry.js.map +1 -1
  45. package/dist/cjs/hb-input-tag.cjs.entry.js +2 -2
  46. package/dist/cjs/hb-input.cjs.entry.js +3 -2
  47. package/dist/cjs/hb-input.cjs.entry.js.map +1 -1
  48. package/dist/cjs/hb-layout.cjs.entry.js.map +1 -1
  49. package/dist/cjs/hb-link.cjs.entry.js +2 -2
  50. package/dist/cjs/hb-loading.cjs.entry.js +2 -2
  51. package/dist/cjs/hb-menu-item.cjs.entry.js +14 -5
  52. package/dist/cjs/hb-menu-item.cjs.entry.js.map +1 -1
  53. package/dist/cjs/hb-menu.cjs.entry.js +2 -2
  54. package/dist/cjs/hb-message.cjs.entry.js +13 -4
  55. package/dist/cjs/hb-message.cjs.entry.js.map +1 -1
  56. package/dist/cjs/hb-page-header.cjs.entry.js +1 -1
  57. package/dist/cjs/hb-pagination.cjs.entry.js +8 -5
  58. package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
  59. package/dist/cjs/hb-popconfirm.cjs.entry.js +27 -8
  60. package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
  61. package/dist/cjs/hb-popover.cjs.entry.js +26 -14
  62. package/dist/cjs/hb-popover.cjs.entry.js.map +1 -1
  63. package/dist/cjs/hb-progress.cjs.entry.js +1 -1
  64. package/dist/cjs/hb-radio.cjs.entry.js +8 -3
  65. package/dist/cjs/hb-radio.cjs.entry.js.map +1 -1
  66. package/dist/cjs/hb-rate.cjs.entry.js +3 -3
  67. package/dist/cjs/hb-rate.cjs.entry.js.map +1 -1
  68. package/dist/cjs/hb-row.cjs.entry.js +2 -2
  69. package/dist/cjs/hb-scrollbar.cjs.entry.js +5 -5
  70. package/dist/cjs/hb-scrollbar.cjs.entry.js.map +1 -1
  71. package/dist/cjs/hb-segmented.cjs.entry.js +13 -2
  72. package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
  73. package/dist/cjs/hb-select.cjs.entry.js +21 -12
  74. package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
  75. package/dist/cjs/hb-slider.cjs.entry.js +6 -12
  76. package/dist/cjs/hb-slider.cjs.entry.js.map +1 -1
  77. package/dist/cjs/hb-space.cjs.entry.js +2 -2
  78. package/dist/cjs/hb-statistic.cjs.entry.js +1 -1
  79. package/dist/cjs/hb-step.cjs.entry.js +1 -1
  80. package/dist/cjs/hb-steps.cjs.entry.js +2 -2
  81. package/dist/cjs/hb-steps.cjs.entry.js.map +1 -1
  82. package/dist/cjs/hb-sub-menu.cjs.entry.js +5 -5
  83. package/dist/cjs/hb-switch.cjs.entry.js +3 -3
  84. package/dist/cjs/hb-switch.cjs.entry.js.map +1 -1
  85. package/dist/cjs/hb-tab-pane.cjs.entry.js +1 -1
  86. package/dist/cjs/hb-table.cjs.entry.js +25 -16
  87. package/dist/cjs/hb-table.cjs.entry.js.map +1 -1
  88. package/dist/cjs/hb-tabs.cjs.entry.js +31 -10
  89. package/dist/cjs/hb-tabs.cjs.entry.js.map +1 -1
  90. package/dist/cjs/hb-tag.cjs.entry.js +3 -2
  91. package/dist/cjs/hb-tag.cjs.entry.js.map +1 -1
  92. package/dist/cjs/hb-text.cjs.entry.js +2 -2
  93. package/dist/cjs/hb-time-picker.cjs.entry.js +14 -9
  94. package/dist/cjs/hb-time-picker.cjs.entry.js.map +1 -1
  95. package/dist/cjs/hb-time-select.cjs.entry.js +13 -4
  96. package/dist/cjs/hb-time-select.cjs.entry.js.map +1 -1
  97. package/dist/cjs/hb-tooltip.cjs.entry.js +30 -10
  98. package/dist/cjs/hb-tooltip.cjs.entry.js.map +1 -1
  99. package/dist/cjs/hb-tree-select.cjs.entry.js +125 -10
  100. package/dist/cjs/hb-tree-select.cjs.entry.js.map +1 -1
  101. package/dist/cjs/hb-tree.cjs.entry.js +145 -12
  102. package/dist/cjs/hb-tree.cjs.entry.js.map +1 -1
  103. package/dist/cjs/hb-watermark.cjs.entry.js +19 -11
  104. package/dist/cjs/hb-watermark.cjs.entry.js.map +1 -1
  105. package/dist/cjs/huibo-ui.cjs.js +1 -1
  106. package/dist/cjs/loader.cjs.js +1 -1
  107. package/dist/cjs/transition-59f1da0f.js +34 -0
  108. package/dist/cjs/transition-59f1da0f.js.map +1 -0
  109. package/dist/collection/components/Alert/Alert.js +2 -1
  110. package/dist/collection/components/Alert/Alert.js.map +1 -1
  111. package/dist/collection/components/Calendar/Calendar.js +2 -2
  112. package/dist/collection/components/Calendar/Calendar.js.map +1 -1
  113. package/dist/collection/components/Cascader/Cascader.js +47 -11
  114. package/dist/collection/components/Cascader/Cascader.js.map +1 -1
  115. package/dist/collection/components/Checkbox/Checkbox.js +9 -4
  116. package/dist/collection/components/Checkbox/Checkbox.js.map +1 -1
  117. package/dist/collection/components/Checkbox/CheckboxGroup.js +12 -8
  118. package/dist/collection/components/Checkbox/CheckboxGroup.js.map +1 -1
  119. package/dist/collection/components/Collapse/Collapse.js +20 -15
  120. package/dist/collection/components/Collapse/Collapse.js.map +1 -1
  121. package/dist/collection/components/Collapse/CollapseItem.js +33 -4
  122. package/dist/collection/components/Collapse/CollapseItem.js.map +1 -1
  123. package/dist/collection/components/ColorPicker/ColorPicker.js +22 -19
  124. package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
  125. package/dist/collection/components/ColorPicker/color-picker.css +8 -3
  126. package/dist/collection/components/DatePicker/DatePicker.js +12 -9
  127. package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
  128. package/dist/collection/components/DatePicker/date-picker.css +3 -2
  129. package/dist/collection/components/Descriptions/descriptions.css +30 -10
  130. package/dist/collection/components/Dialog/Dialog.js +54 -10
  131. package/dist/collection/components/Dialog/Dialog.js.map +1 -1
  132. package/dist/collection/components/Dialog/dialog.css +57 -11
  133. package/dist/collection/components/Drawer/Drawer.js +34 -3
  134. package/dist/collection/components/Drawer/Drawer.js.map +1 -1
  135. package/dist/collection/components/Drawer/drawer.css +207 -17
  136. package/dist/collection/components/Dropdown/Dropdown.js +28 -13
  137. package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
  138. package/dist/collection/components/Dropdown/dropdown.css +24 -2
  139. package/dist/collection/components/Empty/Empty.js +1 -1
  140. package/dist/collection/components/FloatButton/FloatButton.js +2 -2
  141. package/dist/collection/components/Form/Form.js +14 -9
  142. package/dist/collection/components/Form/Form.js.map +1 -1
  143. package/dist/collection/components/Form/FormItem.js +13 -12
  144. package/dist/collection/components/Form/FormItem.js.map +1 -1
  145. package/dist/collection/components/Form/form-item.css +8 -2
  146. package/dist/collection/components/Image/Image.js +24 -3
  147. package/dist/collection/components/Image/Image.js.map +1 -1
  148. package/dist/collection/components/ImagePreview/ImagePreview.js +1 -1
  149. package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
  150. package/dist/collection/components/Input/Input.js +3 -2
  151. package/dist/collection/components/Input/Input.js.map +1 -1
  152. package/dist/collection/components/Input/input.css +1 -2
  153. package/dist/collection/components/InputNumber/InputNumber.js +6 -6
  154. package/dist/collection/components/InputNumber/InputNumber.js.map +1 -1
  155. package/dist/collection/components/InputNumber/input-number.css +11 -1
  156. package/dist/collection/components/InputTag/InputTag.js +2 -2
  157. package/dist/collection/components/Layout/Layout.js.map +1 -1
  158. package/dist/collection/components/Layout/Row.js +2 -2
  159. package/dist/collection/components/Layout/layout.css +1713 -576
  160. package/dist/collection/components/Link/Link.js +2 -2
  161. package/dist/collection/components/Loading/Loading.js +2 -2
  162. package/dist/collection/components/Menu/Menu.js +2 -2
  163. package/dist/collection/components/Menu/MenuItem.js +34 -5
  164. package/dist/collection/components/Menu/MenuItem.js.map +1 -1
  165. package/dist/collection/components/Menu/SubMenu.js +4 -4
  166. package/dist/collection/components/Message/Message.js +13 -4
  167. package/dist/collection/components/Message/Message.js.map +1 -1
  168. package/dist/collection/components/PageHeader/PageHeader.js +1 -1
  169. package/dist/collection/components/Pagination/Pagination.js +8 -5
  170. package/dist/collection/components/Pagination/Pagination.js.map +1 -1
  171. package/dist/collection/components/Popconfirm/Popconfirm.js +28 -6
  172. package/dist/collection/components/Popconfirm/Popconfirm.js.map +1 -1
  173. package/dist/collection/components/Popconfirm/popconfirm.css +80 -16
  174. package/dist/collection/components/Popover/Popover.js +27 -12
  175. package/dist/collection/components/Popover/Popover.js.map +1 -1
  176. package/dist/collection/components/Popover/popover.css +49 -8
  177. package/dist/collection/components/Progress/Progress.js +1 -1
  178. package/dist/collection/components/Radio/Radio.js +8 -3
  179. package/dist/collection/components/Radio/Radio.js.map +1 -1
  180. package/dist/collection/components/Rate/Rate.js +3 -3
  181. package/dist/collection/components/Rate/Rate.js.map +1 -1
  182. package/dist/collection/components/Scrollbar/Scrollbar.js +5 -5
  183. package/dist/collection/components/Scrollbar/Scrollbar.js.map +1 -1
  184. package/dist/collection/components/Segmented/Segmented.js +15 -1
  185. package/dist/collection/components/Segmented/Segmented.js.map +1 -1
  186. package/dist/collection/components/Select/Select.js +21 -12
  187. package/dist/collection/components/Select/Select.js.map +1 -1
  188. package/dist/collection/components/Select/select.css +0 -1
  189. package/dist/collection/components/Slider/Slider.js +6 -12
  190. package/dist/collection/components/Slider/Slider.js.map +1 -1
  191. package/dist/collection/components/Slider/slider.css +0 -1
  192. package/dist/collection/components/Space/Space.js +2 -2
  193. package/dist/collection/components/Statistic/Statistic.js +1 -1
  194. package/dist/collection/components/Steps/Step.js +1 -1
  195. package/dist/collection/components/Steps/Steps.js +2 -2
  196. package/dist/collection/components/Steps/Steps.js.map +1 -1
  197. package/dist/collection/components/Switch/Switch.js +3 -3
  198. package/dist/collection/components/Switch/Switch.js.map +1 -1
  199. package/dist/collection/components/Switch/switch.css +3 -2
  200. package/dist/collection/components/Table/Table.js +25 -16
  201. package/dist/collection/components/Table/Table.js.map +1 -1
  202. package/dist/collection/components/Table/table.css +6 -2
  203. package/dist/collection/components/Tabs/TabPane.js +1 -1
  204. package/dist/collection/components/Tabs/Tabs.js +31 -10
  205. package/dist/collection/components/Tabs/Tabs.js.map +1 -1
  206. package/dist/collection/components/Tag/Tag.js +3 -2
  207. package/dist/collection/components/Tag/Tag.js.map +1 -1
  208. package/dist/collection/components/Text/Text.js +2 -2
  209. package/dist/collection/components/TimePicker/TimePicker.js +14 -9
  210. package/dist/collection/components/TimePicker/TimePicker.js.map +1 -1
  211. package/dist/collection/components/TimeSelect/TimeSelect.js +13 -4
  212. package/dist/collection/components/TimeSelect/TimeSelect.js.map +1 -1
  213. package/dist/collection/components/Tooltip/Tooltip.js +31 -8
  214. package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
  215. package/dist/collection/components/Tooltip/tooltip.css +24 -2
  216. package/dist/collection/components/Tree/Tree.js +147 -13
  217. package/dist/collection/components/Tree/Tree.js.map +1 -1
  218. package/dist/collection/components/TreeSelect/TreeSelect.js +130 -11
  219. package/dist/collection/components/TreeSelect/TreeSelect.js.map +1 -1
  220. package/dist/collection/components/Watermark/Watermark.js +19 -11
  221. package/dist/collection/components/Watermark/Watermark.js.map +1 -1
  222. package/dist/collection/utils/a11y.js +15 -1
  223. package/dist/collection/utils/a11y.js.map +1 -1
  224. package/dist/collection/utils/date-helpers.js +4 -15
  225. package/dist/collection/utils/date-helpers.js.map +1 -1
  226. package/dist/collection/utils/transition.js +29 -0
  227. package/dist/collection/utils/transition.js.map +1 -0
  228. package/dist/components/hb-alert.js +2 -1
  229. package/dist/components/hb-alert.js.map +1 -1
  230. package/dist/components/hb-calendar.js +2 -2
  231. package/dist/components/hb-calendar.js.map +1 -1
  232. package/dist/components/hb-cascader.js +48 -12
  233. package/dist/components/hb-cascader.js.map +1 -1
  234. package/dist/components/hb-checkbox-group.js +12 -8
  235. package/dist/components/hb-checkbox-group.js.map +1 -1
  236. package/dist/components/hb-checkbox.js +9 -4
  237. package/dist/components/hb-checkbox.js.map +1 -1
  238. package/dist/components/hb-collapse-item.js +14 -4
  239. package/dist/components/hb-collapse-item.js.map +1 -1
  240. package/dist/components/hb-collapse.js +20 -15
  241. package/dist/components/hb-collapse.js.map +1 -1
  242. package/dist/components/hb-color-picker.js +22 -19
  243. package/dist/components/hb-color-picker.js.map +1 -1
  244. package/dist/components/hb-date-picker-pane.js +1 -1
  245. package/dist/components/hb-date-picker.js +13 -10
  246. package/dist/components/hb-date-picker.js.map +1 -1
  247. package/dist/components/hb-date-range-picker.js +1 -1
  248. package/dist/components/hb-date-time-picker.js +1 -1
  249. package/dist/components/hb-descriptions.js.map +1 -1
  250. package/dist/components/hb-dialog.js +53 -13
  251. package/dist/components/hb-dialog.js.map +1 -1
  252. package/dist/components/hb-drawer.js +36 -5
  253. package/dist/components/hb-drawer.js.map +1 -1
  254. package/dist/components/hb-dropdown.js +28 -15
  255. package/dist/components/hb-dropdown.js.map +1 -1
  256. package/dist/components/hb-empty.js +1 -1
  257. package/dist/components/hb-float-button.js +2 -2
  258. package/dist/components/hb-form-item.js +11 -10
  259. package/dist/components/hb-form-item.js.map +1 -1
  260. package/dist/components/hb-form.js +12 -7
  261. package/dist/components/hb-form.js.map +1 -1
  262. package/dist/components/hb-image-preview.js +1 -1
  263. package/dist/components/hb-image-preview.js.map +1 -1
  264. package/dist/components/hb-image.js +23 -3
  265. package/dist/components/hb-image.js.map +1 -1
  266. package/dist/components/hb-input-number.js +7 -7
  267. package/dist/components/hb-input-number.js.map +1 -1
  268. package/dist/components/hb-input-tag.js +2 -2
  269. package/dist/components/hb-input.js +3 -2
  270. package/dist/components/hb-input.js.map +1 -1
  271. package/dist/components/hb-layout.js.map +1 -1
  272. package/dist/components/hb-link.js +2 -2
  273. package/dist/components/hb-loading.js +2 -2
  274. package/dist/components/hb-menu-item.js +15 -5
  275. package/dist/components/hb-menu-item.js.map +1 -1
  276. package/dist/components/hb-menu.js +2 -2
  277. package/dist/components/hb-message.js +13 -4
  278. package/dist/components/hb-message.js.map +1 -1
  279. package/dist/components/hb-page-header.js +1 -1
  280. package/dist/components/hb-pagination.js +8 -5
  281. package/dist/components/hb-pagination.js.map +1 -1
  282. package/dist/components/hb-popconfirm.js +28 -8
  283. package/dist/components/hb-popconfirm.js.map +1 -1
  284. package/dist/components/hb-popover.js +27 -14
  285. package/dist/components/hb-popover.js.map +1 -1
  286. package/dist/components/hb-progress.js +1 -1
  287. package/dist/components/hb-radio.js +8 -3
  288. package/dist/components/hb-radio.js.map +1 -1
  289. package/dist/components/hb-rate.js +3 -3
  290. package/dist/components/hb-rate.js.map +1 -1
  291. package/dist/components/hb-row.js +2 -2
  292. package/dist/components/hb-scrollbar.js +5 -5
  293. package/dist/components/hb-scrollbar.js.map +1 -1
  294. package/dist/components/hb-segmented.js +15 -2
  295. package/dist/components/hb-segmented.js.map +1 -1
  296. package/dist/components/hb-select.js +21 -12
  297. package/dist/components/hb-select.js.map +1 -1
  298. package/dist/components/hb-slider.js +6 -12
  299. package/dist/components/hb-slider.js.map +1 -1
  300. package/dist/components/hb-space.js +2 -2
  301. package/dist/components/hb-statistic.js +1 -1
  302. package/dist/components/hb-step.js +1 -1
  303. package/dist/components/hb-steps.js +2 -2
  304. package/dist/components/hb-steps.js.map +1 -1
  305. package/dist/components/hb-sub-menu.js +5 -5
  306. package/dist/components/hb-switch.js +3 -3
  307. package/dist/components/hb-switch.js.map +1 -1
  308. package/dist/components/hb-tab-pane.js +1 -1
  309. package/dist/components/hb-table.js +25 -16
  310. package/dist/components/hb-table.js.map +1 -1
  311. package/dist/components/hb-tabs.js +31 -10
  312. package/dist/components/hb-tabs.js.map +1 -1
  313. package/dist/components/hb-tag.js +3 -2
  314. package/dist/components/hb-tag.js.map +1 -1
  315. package/dist/components/hb-text.js +2 -2
  316. package/dist/components/hb-time-picker.js +14 -9
  317. package/dist/components/hb-time-picker.js.map +1 -1
  318. package/dist/components/hb-time-select.js +13 -4
  319. package/dist/components/hb-time-select.js.map +1 -1
  320. package/dist/components/hb-tooltip.js +31 -10
  321. package/dist/components/hb-tooltip.js.map +1 -1
  322. package/dist/components/hb-tree-select.js +129 -11
  323. package/dist/components/hb-tree-select.js.map +1 -1
  324. package/dist/components/hb-tree.js +147 -13
  325. package/dist/components/hb-tree.js.map +1 -1
  326. package/dist/components/hb-watermark.js +19 -11
  327. package/dist/components/hb-watermark.js.map +1 -1
  328. package/dist/{esm/a11y-f9ab2964.js → components/p-00aa34c8.js} +17 -3
  329. package/dist/components/p-00aa34c8.js.map +1 -0
  330. package/dist/components/{p-08b4005c.js → p-e0876aca.js} +5 -16
  331. package/dist/components/p-e0876aca.js.map +1 -0
  332. package/dist/components/p-fad66d69.js +32 -0
  333. package/dist/components/p-fad66d69.js.map +1 -0
  334. package/dist/{components/p-cc0aeb50.js → esm/a11y-e4cde5b0.js} +17 -3
  335. package/dist/esm/a11y-e4cde5b0.js.map +1 -0
  336. package/dist/esm/{date-helpers-44507189.js → date-helpers-259ed2f1.js} +5 -16
  337. package/dist/esm/date-helpers-259ed2f1.js.map +1 -0
  338. package/dist/esm/hb-alert.entry.js +2 -1
  339. package/dist/esm/hb-alert.entry.js.map +1 -1
  340. package/dist/esm/hb-calendar.entry.js +2 -2
  341. package/dist/esm/hb-calendar.entry.js.map +1 -1
  342. package/dist/esm/hb-cascader.entry.js +48 -12
  343. package/dist/esm/hb-cascader.entry.js.map +1 -1
  344. package/dist/esm/hb-checkbox-group.entry.js +12 -8
  345. package/dist/esm/hb-checkbox-group.entry.js.map +1 -1
  346. package/dist/esm/hb-checkbox.entry.js +9 -4
  347. package/dist/esm/hb-checkbox.entry.js.map +1 -1
  348. package/dist/esm/hb-collapse-item.entry.js +13 -4
  349. package/dist/esm/hb-collapse-item.entry.js.map +1 -1
  350. package/dist/esm/hb-collapse.entry.js +20 -15
  351. package/dist/esm/hb-collapse.entry.js.map +1 -1
  352. package/dist/esm/hb-color-picker.entry.js +22 -19
  353. package/dist/esm/hb-color-picker.entry.js.map +1 -1
  354. package/dist/esm/hb-date-picker-pane.entry.js +1 -1
  355. package/dist/esm/hb-date-picker.entry.js +13 -10
  356. package/dist/esm/hb-date-picker.entry.js.map +1 -1
  357. package/dist/esm/hb-date-range-picker.entry.js +1 -1
  358. package/dist/esm/hb-date-time-picker.entry.js +1 -1
  359. package/dist/esm/hb-descriptions.entry.js.map +1 -1
  360. package/dist/esm/hb-dialog.entry.js +51 -12
  361. package/dist/esm/hb-dialog.entry.js.map +1 -1
  362. package/dist/esm/hb-drawer.entry.js +34 -4
  363. package/dist/esm/hb-drawer.entry.js.map +1 -1
  364. package/dist/esm/hb-dropdown.entry.js +27 -15
  365. package/dist/esm/hb-dropdown.entry.js.map +1 -1
  366. package/dist/esm/hb-empty.entry.js +1 -1
  367. package/dist/esm/hb-float-button.entry.js +2 -2
  368. package/dist/esm/hb-form-item.entry.js +11 -10
  369. package/dist/esm/hb-form-item.entry.js.map +1 -1
  370. package/dist/esm/hb-form.entry.js +12 -7
  371. package/dist/esm/hb-form.entry.js.map +1 -1
  372. package/dist/esm/hb-image-preview.entry.js +1 -1
  373. package/dist/esm/hb-image-preview.entry.js.map +1 -1
  374. package/dist/esm/hb-image.entry.js +21 -3
  375. package/dist/esm/hb-image.entry.js.map +1 -1
  376. package/dist/esm/hb-input-number.entry.js +7 -7
  377. package/dist/esm/hb-input-number.entry.js.map +1 -1
  378. package/dist/esm/hb-input-tag.entry.js +2 -2
  379. package/dist/esm/hb-input.entry.js +3 -2
  380. package/dist/esm/hb-input.entry.js.map +1 -1
  381. package/dist/esm/hb-layout.entry.js.map +1 -1
  382. package/dist/esm/hb-link.entry.js +2 -2
  383. package/dist/esm/hb-loading.entry.js +2 -2
  384. package/dist/esm/hb-menu-item.entry.js +14 -5
  385. package/dist/esm/hb-menu-item.entry.js.map +1 -1
  386. package/dist/esm/hb-menu.entry.js +2 -2
  387. package/dist/esm/hb-message.entry.js +13 -4
  388. package/dist/esm/hb-message.entry.js.map +1 -1
  389. package/dist/esm/hb-page-header.entry.js +1 -1
  390. package/dist/esm/hb-pagination.entry.js +8 -5
  391. package/dist/esm/hb-pagination.entry.js.map +1 -1
  392. package/dist/esm/hb-popconfirm.entry.js +27 -8
  393. package/dist/esm/hb-popconfirm.entry.js.map +1 -1
  394. package/dist/esm/hb-popover.entry.js +26 -14
  395. package/dist/esm/hb-popover.entry.js.map +1 -1
  396. package/dist/esm/hb-progress.entry.js +1 -1
  397. package/dist/esm/hb-radio.entry.js +8 -3
  398. package/dist/esm/hb-radio.entry.js.map +1 -1
  399. package/dist/esm/hb-rate.entry.js +3 -3
  400. package/dist/esm/hb-rate.entry.js.map +1 -1
  401. package/dist/esm/hb-row.entry.js +2 -2
  402. package/dist/esm/hb-scrollbar.entry.js +5 -5
  403. package/dist/esm/hb-scrollbar.entry.js.map +1 -1
  404. package/dist/esm/hb-segmented.entry.js +13 -2
  405. package/dist/esm/hb-segmented.entry.js.map +1 -1
  406. package/dist/esm/hb-select.entry.js +21 -12
  407. package/dist/esm/hb-select.entry.js.map +1 -1
  408. package/dist/esm/hb-slider.entry.js +6 -12
  409. package/dist/esm/hb-slider.entry.js.map +1 -1
  410. package/dist/esm/hb-space.entry.js +2 -2
  411. package/dist/esm/hb-statistic.entry.js +1 -1
  412. package/dist/esm/hb-step.entry.js +1 -1
  413. package/dist/esm/hb-steps.entry.js +2 -2
  414. package/dist/esm/hb-steps.entry.js.map +1 -1
  415. package/dist/esm/hb-sub-menu.entry.js +5 -5
  416. package/dist/esm/hb-switch.entry.js +3 -3
  417. package/dist/esm/hb-switch.entry.js.map +1 -1
  418. package/dist/esm/hb-tab-pane.entry.js +1 -1
  419. package/dist/esm/hb-table.entry.js +25 -16
  420. package/dist/esm/hb-table.entry.js.map +1 -1
  421. package/dist/esm/hb-tabs.entry.js +31 -10
  422. package/dist/esm/hb-tabs.entry.js.map +1 -1
  423. package/dist/esm/hb-tag.entry.js +3 -2
  424. package/dist/esm/hb-tag.entry.js.map +1 -1
  425. package/dist/esm/hb-text.entry.js +2 -2
  426. package/dist/esm/hb-time-picker.entry.js +14 -9
  427. package/dist/esm/hb-time-picker.entry.js.map +1 -1
  428. package/dist/esm/hb-time-select.entry.js +13 -4
  429. package/dist/esm/hb-time-select.entry.js.map +1 -1
  430. package/dist/esm/hb-tooltip.entry.js +30 -10
  431. package/dist/esm/hb-tooltip.entry.js.map +1 -1
  432. package/dist/esm/hb-tree-select.entry.js +125 -10
  433. package/dist/esm/hb-tree-select.entry.js.map +1 -1
  434. package/dist/esm/hb-tree.entry.js +145 -12
  435. package/dist/esm/hb-tree.entry.js.map +1 -1
  436. package/dist/esm/hb-watermark.entry.js +19 -11
  437. package/dist/esm/hb-watermark.entry.js.map +1 -1
  438. package/dist/esm/huibo-ui.js +1 -1
  439. package/dist/esm/loader.js +1 -1
  440. package/dist/esm/transition-4295d789.js +32 -0
  441. package/dist/esm/transition-4295d789.js.map +1 -0
  442. package/dist/huibo-ui/huibo-ui.esm.js +1 -1
  443. package/dist/huibo-ui/huibo-ui.esm.js.map +1 -1
  444. package/dist/huibo-ui/p-00aa34c8.js +2 -0
  445. package/dist/huibo-ui/p-00aa34c8.js.map +1 -0
  446. package/dist/huibo-ui/p-0cc1e3f3.entry.js +2 -0
  447. package/dist/huibo-ui/p-0cc1e3f3.entry.js.map +1 -0
  448. package/dist/huibo-ui/{p-678b4212.entry.js → p-0ddae4e9.entry.js} +2 -2
  449. package/dist/huibo-ui/p-10f6c184.entry.js.map +1 -1
  450. package/dist/huibo-ui/{p-f4336be9.entry.js → p-14c3b47b.entry.js} +2 -2
  451. package/dist/huibo-ui/{p-c50ad398.entry.js → p-193efdc0.entry.js} +2 -2
  452. package/dist/huibo-ui/{p-735bceef.entry.js → p-1b98152b.entry.js} +2 -2
  453. package/dist/huibo-ui/p-1b98152b.entry.js.map +1 -0
  454. package/dist/huibo-ui/p-1f6d0adb.entry.js +2 -0
  455. package/dist/huibo-ui/p-1f6d0adb.entry.js.map +1 -0
  456. package/dist/huibo-ui/{p-2943f5d0.entry.js → p-29092b85.entry.js} +2 -2
  457. package/dist/huibo-ui/p-29092b85.entry.js.map +1 -0
  458. package/dist/huibo-ui/p-2bc30b1b.entry.js +2 -0
  459. package/dist/huibo-ui/p-2bc30b1b.entry.js.map +1 -0
  460. package/dist/huibo-ui/{p-0d4b2997.entry.js → p-2bcda1bb.entry.js} +2 -2
  461. package/dist/huibo-ui/{p-b8d87f7e.entry.js → p-2ca9796a.entry.js} +2 -2
  462. package/dist/huibo-ui/p-2ca9796a.entry.js.map +1 -0
  463. package/dist/huibo-ui/{p-7da14d7c.entry.js → p-3042f986.entry.js} +2 -2
  464. package/dist/huibo-ui/{p-e039155d.entry.js → p-3dacb26b.entry.js} +2 -2
  465. package/dist/huibo-ui/{p-a084b8e5.entry.js → p-412ff618.entry.js} +2 -2
  466. package/dist/huibo-ui/{p-6beb5b81.entry.js → p-415295f3.entry.js} +2 -2
  467. package/dist/huibo-ui/p-415295f3.entry.js.map +1 -0
  468. package/dist/huibo-ui/p-494e6c25.entry.js +2 -0
  469. package/dist/huibo-ui/p-494e6c25.entry.js.map +1 -0
  470. package/dist/huibo-ui/p-4d87d7f4.entry.js +2 -0
  471. package/dist/huibo-ui/p-4d87d7f4.entry.js.map +1 -0
  472. package/dist/huibo-ui/{p-2811e603.entry.js → p-54a28052.entry.js} +2 -2
  473. package/dist/huibo-ui/p-54a28052.entry.js.map +1 -0
  474. package/dist/huibo-ui/p-5e253c15.entry.js +2 -0
  475. package/dist/huibo-ui/p-5e253c15.entry.js.map +1 -0
  476. package/dist/huibo-ui/p-63d68c61.entry.js +2 -0
  477. package/dist/huibo-ui/p-63d68c61.entry.js.map +1 -0
  478. package/dist/huibo-ui/{p-ccd09d5a.entry.js → p-6518c435.entry.js} +2 -2
  479. package/dist/huibo-ui/{p-1f8db37a.entry.js → p-687d8dff.entry.js} +2 -2
  480. package/dist/huibo-ui/p-687d8dff.entry.js.map +1 -0
  481. package/dist/huibo-ui/p-688460ce.entry.js +2 -0
  482. package/dist/huibo-ui/p-688460ce.entry.js.map +1 -0
  483. package/dist/huibo-ui/p-69bb1dd9.entry.js +2 -0
  484. package/dist/huibo-ui/p-69bb1dd9.entry.js.map +1 -0
  485. package/dist/huibo-ui/{p-e5cbfa9e.entry.js → p-6c23fbd1.entry.js} +2 -2
  486. package/dist/huibo-ui/p-6c23fbd1.entry.js.map +1 -0
  487. package/dist/huibo-ui/p-6c8cf248.entry.js.map +1 -1
  488. package/dist/huibo-ui/p-6efed295.entry.js +2 -0
  489. package/dist/huibo-ui/p-6efed295.entry.js.map +1 -0
  490. package/dist/huibo-ui/{p-c80f8ace.entry.js → p-79b24b83.entry.js} +2 -2
  491. package/dist/huibo-ui/p-79b24b83.entry.js.map +1 -0
  492. package/dist/huibo-ui/p-7a38b3e2.entry.js +2 -0
  493. package/dist/huibo-ui/p-7a38b3e2.entry.js.map +1 -0
  494. package/dist/huibo-ui/{p-cad57c2d.entry.js → p-7a682c56.entry.js} +2 -2
  495. package/dist/huibo-ui/{p-a8996d22.entry.js → p-815fc943.entry.js} +2 -2
  496. package/dist/huibo-ui/{p-af74667d.entry.js → p-89be7973.entry.js} +2 -2
  497. package/dist/huibo-ui/p-8a202bc5.entry.js.map +1 -1
  498. package/dist/huibo-ui/{p-213b9de7.entry.js → p-8c4415ed.entry.js} +2 -2
  499. package/dist/huibo-ui/p-8c4415ed.entry.js.map +1 -0
  500. package/dist/huibo-ui/{p-8fdbd17c.entry.js → p-950e7465.entry.js} +2 -2
  501. package/dist/huibo-ui/{p-ab9cf0e4.entry.js → p-96cecd21.entry.js} +2 -2
  502. package/dist/huibo-ui/p-96cecd21.entry.js.map +1 -0
  503. package/dist/huibo-ui/{p-2b4556ff.entry.js → p-98b513cd.entry.js} +2 -2
  504. package/dist/huibo-ui/p-98b513cd.entry.js.map +1 -0
  505. package/dist/huibo-ui/{p-86bdc48a.entry.js → p-ac18c68b.entry.js} +2 -2
  506. package/dist/huibo-ui/p-ac18c68b.entry.js.map +1 -0
  507. package/dist/huibo-ui/{p-89ea1141.entry.js → p-ac45291c.entry.js} +2 -2
  508. package/dist/huibo-ui/{p-e10fcfbe.entry.js → p-b105cf76.entry.js} +2 -2
  509. package/dist/huibo-ui/p-b105cf76.entry.js.map +1 -0
  510. package/dist/huibo-ui/{p-9a5406f0.entry.js → p-b38802b0.entry.js} +2 -2
  511. package/dist/huibo-ui/{p-9a5406f0.entry.js.map → p-b38802b0.entry.js.map} +1 -1
  512. package/dist/huibo-ui/{p-ea74fcae.entry.js → p-b3fd12c7.entry.js} +2 -2
  513. package/dist/huibo-ui/p-b3fd12c7.entry.js.map +1 -0
  514. package/dist/huibo-ui/p-b5ea18ba.entry.js +2 -0
  515. package/dist/huibo-ui/p-b5ea18ba.entry.js.map +1 -0
  516. package/dist/huibo-ui/{p-41d9c846.entry.js → p-b6afe81e.entry.js} +2 -2
  517. package/dist/huibo-ui/p-b7900dee.entry.js +2 -0
  518. package/dist/huibo-ui/p-b7900dee.entry.js.map +1 -0
  519. package/dist/huibo-ui/p-b8c83751.entry.js +2 -0
  520. package/dist/huibo-ui/p-b8c83751.entry.js.map +1 -0
  521. package/dist/huibo-ui/p-c7713947.entry.js +2 -0
  522. package/dist/huibo-ui/p-c7713947.entry.js.map +1 -0
  523. package/dist/huibo-ui/{p-33de6878.entry.js → p-c869842c.entry.js} +2 -2
  524. package/dist/huibo-ui/p-c869842c.entry.js.map +1 -0
  525. package/dist/huibo-ui/p-c8e917db.entry.js.map +1 -1
  526. package/dist/huibo-ui/p-cb66dbef.entry.js +2 -0
  527. package/dist/huibo-ui/p-cb66dbef.entry.js.map +1 -0
  528. package/dist/huibo-ui/p-cde83f76.entry.js +2 -0
  529. package/dist/huibo-ui/p-cde83f76.entry.js.map +1 -0
  530. package/dist/huibo-ui/{p-f5969181.entry.js → p-dd9c6459.entry.js} +2 -2
  531. package/dist/huibo-ui/{p-08b4005c.js → p-e0876aca.js} +1 -1
  532. package/dist/huibo-ui/p-e0876aca.js.map +1 -0
  533. package/dist/huibo-ui/{p-aa5e5e02.entry.js → p-e1773c93.entry.js} +2 -2
  534. package/dist/huibo-ui/p-e1773c93.entry.js.map +1 -0
  535. package/dist/huibo-ui/{p-626b48f1.entry.js → p-e73c357f.entry.js} +2 -2
  536. package/dist/huibo-ui/p-e73c357f.entry.js.map +1 -0
  537. package/dist/huibo-ui/{p-60532a1f.entry.js → p-e7c73624.entry.js} +2 -2
  538. package/dist/huibo-ui/p-e7c73624.entry.js.map +1 -0
  539. package/dist/huibo-ui/{p-13010da2.entry.js → p-e9e7abca.entry.js} +2 -2
  540. package/dist/huibo-ui/{p-f6889710.entry.js → p-ea0823f3.entry.js} +2 -2
  541. package/dist/huibo-ui/p-ea0823f3.entry.js.map +1 -0
  542. package/dist/huibo-ui/{p-b468858e.entry.js → p-f1f2483f.entry.js} +2 -2
  543. package/dist/huibo-ui/p-fad66d69.js +2 -0
  544. package/dist/huibo-ui/p-fad66d69.js.map +1 -0
  545. package/dist/huibo-ui/{p-fd8301c6.entry.js → p-fd6831f9.entry.js} +2 -2
  546. package/dist/huibo-ui/p-ff6bc5cc.entry.js +2 -0
  547. package/dist/huibo-ui/p-ff6bc5cc.entry.js.map +1 -0
  548. package/dist/types/components/Cascader/Cascader.d.ts +12 -0
  549. package/dist/types/components/Checkbox/Checkbox.d.ts +5 -0
  550. package/dist/types/components/Checkbox/CheckboxGroup.d.ts +1 -0
  551. package/dist/types/components/Collapse/Collapse.d.ts +2 -0
  552. package/dist/types/components/Collapse/CollapseItem.d.ts +8 -1
  553. package/dist/types/components/Dialog/Dialog.d.ts +13 -1
  554. package/dist/types/components/Drawer/Drawer.d.ts +4 -0
  555. package/dist/types/components/Dropdown/Dropdown.d.ts +6 -2
  556. package/dist/types/components/Form/Form.d.ts +2 -0
  557. package/dist/types/components/Image/Image.d.ts +6 -0
  558. package/dist/types/components/Menu/MenuItem.d.ts +8 -1
  559. package/dist/types/components/Message/Message.d.ts +3 -0
  560. package/dist/types/components/Popconfirm/Popconfirm.d.ts +6 -2
  561. package/dist/types/components/Popover/Popover.d.ts +6 -1
  562. package/dist/types/components/Radio/Radio.d.ts +5 -0
  563. package/dist/types/components/Segmented/Segmented.d.ts +6 -0
  564. package/dist/types/components/Select/Select.d.ts +5 -0
  565. package/dist/types/components/Table/Table.d.ts +8 -2
  566. package/dist/types/components/Tabs/Tabs.d.ts +6 -0
  567. package/dist/types/components/Tooltip/Tooltip.d.ts +6 -0
  568. package/dist/types/components/Tree/Tree.d.ts +24 -0
  569. package/dist/types/components/TreeSelect/TreeSelect.d.ts +17 -0
  570. package/dist/types/components/Watermark/Watermark.d.ts +7 -1
  571. package/dist/types/components.d.ts +40 -4
  572. package/dist/types/utils/a11y.d.ts +9 -0
  573. package/dist/types/utils/transition.d.ts +27 -0
  574. package/package.json +1 -1
  575. package/dist/cjs/a11y-802de67a.js.map +0 -1
  576. package/dist/cjs/date-helpers-1ffddc59.js.map +0 -1
  577. package/dist/components/p-08b4005c.js.map +0 -1
  578. package/dist/components/p-cc0aeb50.js.map +0 -1
  579. package/dist/esm/a11y-f9ab2964.js.map +0 -1
  580. package/dist/esm/date-helpers-44507189.js.map +0 -1
  581. package/dist/huibo-ui/p-08b4005c.js.map +0 -1
  582. package/dist/huibo-ui/p-1f8db37a.entry.js.map +0 -1
  583. package/dist/huibo-ui/p-213b9de7.entry.js.map +0 -1
  584. package/dist/huibo-ui/p-25fd7d5c.entry.js +0 -2
  585. package/dist/huibo-ui/p-25fd7d5c.entry.js.map +0 -1
  586. package/dist/huibo-ui/p-2811e603.entry.js.map +0 -1
  587. package/dist/huibo-ui/p-2943f5d0.entry.js.map +0 -1
  588. package/dist/huibo-ui/p-2b4556ff.entry.js.map +0 -1
  589. package/dist/huibo-ui/p-33de6878.entry.js.map +0 -1
  590. package/dist/huibo-ui/p-3807da71.entry.js +0 -2
  591. package/dist/huibo-ui/p-3807da71.entry.js.map +0 -1
  592. package/dist/huibo-ui/p-47ef7a86.entry.js +0 -2
  593. package/dist/huibo-ui/p-47ef7a86.entry.js.map +0 -1
  594. package/dist/huibo-ui/p-4d34e43e.entry.js +0 -2
  595. package/dist/huibo-ui/p-4d34e43e.entry.js.map +0 -1
  596. package/dist/huibo-ui/p-54aa2fd8.entry.js +0 -2
  597. package/dist/huibo-ui/p-54aa2fd8.entry.js.map +0 -1
  598. package/dist/huibo-ui/p-60532a1f.entry.js.map +0 -1
  599. package/dist/huibo-ui/p-626b48f1.entry.js.map +0 -1
  600. package/dist/huibo-ui/p-639f167d.entry.js +0 -2
  601. package/dist/huibo-ui/p-639f167d.entry.js.map +0 -1
  602. package/dist/huibo-ui/p-6beb5b81.entry.js.map +0 -1
  603. package/dist/huibo-ui/p-735bceef.entry.js.map +0 -1
  604. package/dist/huibo-ui/p-76519752.entry.js +0 -2
  605. package/dist/huibo-ui/p-76519752.entry.js.map +0 -1
  606. package/dist/huibo-ui/p-79af2efa.entry.js +0 -2
  607. package/dist/huibo-ui/p-79af2efa.entry.js.map +0 -1
  608. package/dist/huibo-ui/p-7f6975ad.entry.js +0 -2
  609. package/dist/huibo-ui/p-7f6975ad.entry.js.map +0 -1
  610. package/dist/huibo-ui/p-86bdc48a.entry.js.map +0 -1
  611. package/dist/huibo-ui/p-8a8443b8.entry.js +0 -2
  612. package/dist/huibo-ui/p-8a8443b8.entry.js.map +0 -1
  613. package/dist/huibo-ui/p-8fd788c9.entry.js +0 -2
  614. package/dist/huibo-ui/p-8fd788c9.entry.js.map +0 -1
  615. package/dist/huibo-ui/p-92521c31.entry.js +0 -2
  616. package/dist/huibo-ui/p-92521c31.entry.js.map +0 -1
  617. package/dist/huibo-ui/p-965d4d02.entry.js +0 -2
  618. package/dist/huibo-ui/p-965d4d02.entry.js.map +0 -1
  619. package/dist/huibo-ui/p-aa5e5e02.entry.js.map +0 -1
  620. package/dist/huibo-ui/p-ab9cf0e4.entry.js.map +0 -1
  621. package/dist/huibo-ui/p-b8d87f7e.entry.js.map +0 -1
  622. package/dist/huibo-ui/p-c6c91664.entry.js +0 -2
  623. package/dist/huibo-ui/p-c6c91664.entry.js.map +0 -1
  624. package/dist/huibo-ui/p-c80f8ace.entry.js.map +0 -1
  625. package/dist/huibo-ui/p-cc0aeb50.js +0 -2
  626. package/dist/huibo-ui/p-cc0aeb50.js.map +0 -1
  627. package/dist/huibo-ui/p-d79a15b1.entry.js +0 -2
  628. package/dist/huibo-ui/p-d79a15b1.entry.js.map +0 -1
  629. package/dist/huibo-ui/p-e10fcfbe.entry.js.map +0 -1
  630. package/dist/huibo-ui/p-e5cbfa9e.entry.js.map +0 -1
  631. package/dist/huibo-ui/p-ea74fcae.entry.js.map +0 -1
  632. package/dist/huibo-ui/p-edbda423.entry.js +0 -2
  633. package/dist/huibo-ui/p-edbda423.entry.js.map +0 -1
  634. package/dist/huibo-ui/p-f6889710.entry.js.map +0 -1
  635. package/dist/huibo-ui/p-f9bb5217.entry.js +0 -2
  636. package/dist/huibo-ui/p-f9bb5217.entry.js.map +0 -1
  637. package/dist/huibo-ui/p-fea20295.entry.js +0 -2
  638. package/dist/huibo-ui/p-fea20295.entry.js.map +0 -1
  639. /package/dist/huibo-ui/{p-678b4212.entry.js.map → p-0ddae4e9.entry.js.map} +0 -0
  640. /package/dist/huibo-ui/{p-f4336be9.entry.js.map → p-14c3b47b.entry.js.map} +0 -0
  641. /package/dist/huibo-ui/{p-c50ad398.entry.js.map → p-193efdc0.entry.js.map} +0 -0
  642. /package/dist/huibo-ui/{p-0d4b2997.entry.js.map → p-2bcda1bb.entry.js.map} +0 -0
  643. /package/dist/huibo-ui/{p-7da14d7c.entry.js.map → p-3042f986.entry.js.map} +0 -0
  644. /package/dist/huibo-ui/{p-e039155d.entry.js.map → p-3dacb26b.entry.js.map} +0 -0
  645. /package/dist/huibo-ui/{p-a084b8e5.entry.js.map → p-412ff618.entry.js.map} +0 -0
  646. /package/dist/huibo-ui/{p-ccd09d5a.entry.js.map → p-6518c435.entry.js.map} +0 -0
  647. /package/dist/huibo-ui/{p-cad57c2d.entry.js.map → p-7a682c56.entry.js.map} +0 -0
  648. /package/dist/huibo-ui/{p-a8996d22.entry.js.map → p-815fc943.entry.js.map} +0 -0
  649. /package/dist/huibo-ui/{p-af74667d.entry.js.map → p-89be7973.entry.js.map} +0 -0
  650. /package/dist/huibo-ui/{p-8fdbd17c.entry.js.map → p-950e7465.entry.js.map} +0 -0
  651. /package/dist/huibo-ui/{p-89ea1141.entry.js.map → p-ac45291c.entry.js.map} +0 -0
  652. /package/dist/huibo-ui/{p-41d9c846.entry.js.map → p-b6afe81e.entry.js.map} +0 -0
  653. /package/dist/huibo-ui/{p-f5969181.entry.js.map → p-dd9c6459.entry.js.map} +0 -0
  654. /package/dist/huibo-ui/{p-13010da2.entry.js.map → p-e9e7abca.entry.js.map} +0 -0
  655. /package/dist/huibo-ui/{p-b468858e.entry.js.map → p-f1f2483f.entry.js.map} +0 -0
  656. /package/dist/huibo-ui/{p-fd8301c6.entry.js.map → p-fd6831f9.entry.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,g as i,h as n}from"./p-e42dfa95.js";import{a as o}from"./p-00aa34c8.js";const r=["large","default","small"];function a(t,e){const i=e&&r.includes(e)?e:"default";return`${t}--${i}`}function s(t){return Boolean(t.clearable&&!t.disabled&&!t.readonly&&t.hasValue)}function l(t){if(t===null||t===undefined)return false;if(typeof t==="string")return t.length>0;if(typeof t==="number")return!Number.isNaN(t);if(Array.isArray(t))return t.length>0;return true}function h(t,e){return{[t]:true,[a(t,e)]:true}}const d='/*! 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{.hidden{display:none}.resize{resize:both}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-input-font-size:14px;--hb-input-font-size-large:16px;--hb-input-font-size-small:12px;--hb-input-height:32px;--hb-input-height-large:40px;--hb-input-height-small:24px;--hb-input-border-color:var(--hb-border-color,#dcdfe6);--hb-input-border-color-hover:var(--hb-color-primary);--hb-input-bg-color:var(--hb-color-white,#fff);--hb-input-text-color:var(--hb-color-text-regular,#606266);--hb-input-placeholder-color:var(--hb-color-text-placeholder,#c0c4cc);--hb-input-disabled-color:var(--hb-color-text-disabled,#c0c4cc);--hb-input-disabled-bg-color:var(--hb-fill-color-light,#f5f7fa);display:inline-block;position:relative}.hb-input{font-size:var(--hb-input-font-size);position:relative}.hb-input,.hb-input__inner{display:inline-block;width:100%}.hb-input__inner{-webkit-appearance:none;background-color:var(--hb-input-bg-color);background-image:none;border:1px solid var(--hb-input-border-color);border-radius:4px;box-sizing:border-box;color:var(--hb-input-text-color);font-size:inherit;height:var(--hb-input-height);line-height:var(--hb-input-height);outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1)}.hb-input__inner::placeholder{color:var(--hb-input-placeholder-color)}.hb-input__inner:focus,.hb-input__inner:hover:not(:disabled){border-color:var(--hb-input-border-color-hover)}.hb-input__inner:disabled{background-color:var(--hb-input-disabled-bg-color);border-color:var(--hb-input-border-color);color:var(--hb-input-disabled-color);cursor:not-allowed}.hb-input__inner[readonly]{background-color:var(--hb-input-disabled-bg-color);cursor:default}.hb-input--small .hb-input__inner{font-size:var(--hb-input-font-size-small);height:var(--hb-input-height-small);line-height:var(--hb-input-height-small);padding:0 12px}.hb-input--large .hb-input__inner{font-size:var(--hb-input-font-size-large);height:var(--hb-input-height-large);line-height:var(--hb-input-height-large);padding:0 18px}.hb-input__prefix,.hb-input__suffix{align-items:center;color:var(--hb-input-placeholder-color);display:flex;height:100%;position:absolute;text-align:center;top:0;transition:all .3s}.hb-input__prefix{left:5px}.hb-input__suffix{right:5px}.hb-input__suffix-inner{align-items:center;cursor:pointer;display:flex;-webkit-user-select:none;user-select:none}.hb-input__clear{align-items:center;color:var(--hb-input-placeholder-color);display:inline-flex;height:16px;justify-content:center;transition:color .2s;width:16px}.hb-input__clear svg{height:100%;width:100%}.hb-input__clear:hover,.hb-input__password{color:var(--hb-input-text-color)}.hb-input__password{align-items:center;cursor:pointer;display:inline-flex;height:16px;justify-content:center;width:16px}.hb-input__password svg{height:100%;width:100%}.hb-input__inner[type=textarea]{line-height:1.5;min-height:60px;padding:5px 15px;resize:vertical;vertical-align:bottom}.hb-input__count{bottom:5px;color:var(--hb-input-placeholder-color);font-size:12px;position:absolute;right:10px}.hb-input__count-inner{background-color:var(--hb-input-bg-color);padding:0 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}';const p=d;const c=class{constructor(i){t(this,i);this.hbChange=e(this,"hbChange",7);this.hbInput=e(this,"hbInput",7);this.hbFocus=e(this,"hbFocus",7);this.hbBlur=e(this,"hbBlur",7);this.hbClear=e(this,"hbClear",7)}get el(){return i(this)}modelValue="";type="text";size="default";disabled=false;readonly=false;placeholder;clearable=false;showPassword=false;showWordLimit=false;maxlength;minlength;name;inputId;autocomplete;autofocus=false;prefixIcon;suffixIcon;rows=2;autosize=false;resize;isFocused=false;showClear=false;passwordVisible=false;inputValue="";inputRef;hbChange;hbInput;hbFocus;hbBlur;hbClear;handleValueChange(){this.inputValue=this.modelValue;this.updateClearVisible();this.resizeTextarea()}componentDidLoad(){this.inputValue=this.modelValue;this.updateClearVisible();this.resizeTextarea()}updateClearVisible(){this.showClear=s({clearable:this.clearable,disabled:this.disabled,readonly:this.readonly,hasValue:l(this.inputValue)})}resizeTextarea(){if(this.type!=="textarea"||!this.autosize)return;const t=this.inputRef;if(!t)return;const e=typeof window!=="undefined"?window.getComputedStyle(t):null;const i=e&&parseFloat(e.lineHeight)?parseFloat(e.lineHeight):22;const n=e?parseFloat(e.paddingTop)||0:0;const o=e?parseFloat(e.paddingBottom)||0:0;const r=typeof this.autosize==="object"?this.autosize:{};const a=r.minRows??1;const s=r.maxRows??Infinity;const l=a*i+n+o;const h=s===Infinity?Infinity:s*i+n+o;t.style.height="auto";const d=t.scrollHeight;const p=Math.max(l,Math.min(d,h===Infinity?d:h));t.style.height=`${p}px`;t.style.overflowY=d>p?"auto":"hidden"}handleInput=t=>{const e=t.target;this.inputValue=e.value;this.modelValue=e.value;this.updateClearVisible();this.hbInput.emit(e.value);this.resizeTextarea()};handleChange=t=>{const e=t.target;this.hbChange.emit(e.value)};handleFocus=t=>{this.isFocused=true;this.updateClearVisible();this.hbFocus.emit(t)};handleBlur=t=>{this.isFocused=false;this.updateClearVisible();this.hbBlur.emit(t)};handleClear=t=>{t.stopPropagation();this.inputValue="";this.modelValue="";this.updateClearVisible();this.hbClear.emit();this.hbChange.emit("");if(this.inputRef){this.inputRef.focus()}};togglePasswordVisible=()=>{this.passwordVisible=!this.passwordVisible};getInputType(){if(this.type==="password"&&this.showPassword){return this.passwordVisible?"text":"password"}return this.type}render(){const t=this.type==="textarea";const e=t?"textarea":"input";return n("div",{key:"541681cbcc3f5bc9f0d6ed4e8b5d5d41e498f2a1",class:{...h("hb-input",this.size),"hb-input--disabled":this.disabled,"hb-input--focused":this.isFocused}},this.prefixIcon&&n("span",{key:"5dc6ad6f39d472528e900654de37e13e42e7ea19",class:"hb-input__prefix"},n("i",{key:"2f28864c2a8d60281eacbfe7c8d65b72e75744f9",class:this.prefixIcon})),n(e,{key:"2945de32bd65b0eb22849338aa0f4f966ccd0ad5",ref:t=>this.inputRef=t,type:t?undefined:this.getInputType(),id:this.inputId,name:this.name,class:"hb-input__inner",placeholder:this.placeholder,value:this.inputValue,disabled:this.disabled,readonly:this.readonly,autocomplete:this.autocomplete,autofocus:this.autofocus,maxlength:this.maxlength,minlength:this.minlength,rows:t?this.rows:undefined,style:t?{resize:this.autosize?"none":this.resize||"none"}:undefined,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur}),(this.showClear||this.suffixIcon||this.type==="password"&&this.showPassword)&&n("span",{key:"0b416f3f55c1b195bcfc7584eb96de3a47373b49",class:"hb-input__suffix"},this.showClear&&n("span",{key:"4bd40fa20686602e0049f46bfe3a4ba1eedd704c",class:"hb-input__suffix-inner hb-input__clear",role:"button","aria-label":"清空",tabIndex:0,onClick:this.handleClear,onKeyDown:o},n("svg",{key:"b4494db539d933d0686fad6744589955669ec402",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},n("path",{key:"02fde0709695629e71d90104f58d2926ae77ce8b",d:"M6 6l12 12M18 6L6 18"}))),this.type==="password"&&this.showPassword&&n("span",{key:"fed9e94f2f0491d97a06b2ca4faeb86d4d0b4d79",class:"hb-input__suffix-inner hb-input__password",role:"button","aria-label":this.passwordVisible?"隐藏密码":"显示密码",tabIndex:0,onClick:this.togglePasswordVisible,onKeyDown:o},this.passwordVisible?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:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"}),n("circle",{cx:"12",cy:"12",r:"3"})):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:"M3 3l18 18M10.6 10.6a3 3 0 0 0 4.2 4.2M9.9 5.1A10.6 10.6 0 0 1 12 5c6.5 0 10 7 10 7a17.8 17.8 0 0 1-2.2 3.2M6.1 6.1A17.7 17.7 0 0 0 2 12s3.5 7 10 7a10.5 10.5 0 0 0 4-.8"}))),this.suffixIcon&&n("span",{key:"b7c39885d1c3528746855cd852fed3274d055b0f",class:"hb-input__suffix-inner"},n("i",{key:"e6952c4362150d3140feffaa51d9c0ac7f00a4b8",class:this.suffixIcon}))),this.showWordLimit&&this.maxlength&&n("span",{key:"a6d207cc284a30911e3d17cd44bac5e061c20fac",class:"hb-input__count"},n("span",{key:"52fa6d789528a8079d34fc4082b0532f52ce43ef",class:"hb-input__count-inner"},this.inputValue.length," / ",this.maxlength)))}static get watchers(){return{modelValue:["handleValueChange"]}}};c.style=p;export{c as hb_input};
2
+ //# sourceMappingURL=p-4d87d7f4.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["COMPONENT_SIZES","buildSizeClass","base","size","normalized","includes","isClearVisible","options","Boolean","clearable","disabled","readonly","hasValue","hasInputValue","value","undefined","length","Number","isNaN","Array","isArray","sizeClassMap","inputCss","HbInputStyle0","Input","modelValue","type","placeholder","showPassword","showWordLimit","maxlength","minlength","name","inputId","autocomplete","autofocus","prefixIcon","suffixIcon","rows","autosize","resize","isFocused","showClear","passwordVisible","inputValue","inputRef","hbChange","hbInput","hbFocus","hbBlur","hbClear","handleValueChange","this","updateClearVisible","resizeTextarea","componentDidLoad","ta","computed","window","getComputedStyle","lineHeight","parseFloat","paddingTop","paddingBottom","opts","minRows","maxRows","Infinity","minH","maxH","style","height","scrollH","scrollHeight","clamped","Math","max","min","overflowY","handleInput","e","target","emit","handleChange","handleFocus","handleBlur","handleClear","stopPropagation","focus","togglePasswordVisible","getInputType","render","isTextarea","InputTag","h","key","class","ref","el","id","onInput","onChange","onFocus","onBlur","role","tabIndex","onClick","onKeyDown","activationClickHandler","viewBox","fill","stroke","d","cx","cy","r"],"sources":["src/utils/form-input-base.ts","src/components/Input/input.css?tag=hb-input&encapsulation=shadow","src/components/Input/Input.tsx"],"sourcesContent":["/**\n * 表单输入组件共享基础\n * 统一 size / disabled / clearable / modelValue 这一组在 Input / Select / Cascader /\n * DatePicker / InputNumber / TimePicker 等组件中重复出现的包装模式。\n *\n * 设计原则:纯函数 + 类型导出,不引入基类继承,避免 Stencil 装饰器在继承链上的隐式行为。\n * 组件按需 import 对应工具,渲染时调用即可。\n */\n\n/** 组件尺寸(与 Ant Design 对齐,便于迁移) */\nexport type ComponentSize = 'large' | 'default' | 'small';\n\n/** 全部合法尺寸,用于运行期校验 */\nexport const COMPONENT_SIZES: readonly ComponentSize[] = ['large', 'default', 'small'] as const;\n\n/**\n * 表单输入组件共享的 prop 契约。\n * 跨框架消费方(React / Vue / 原生)可据此推断任一表单输入组件的通用能力,\n * 各组件在此基础上扩展自身特有 prop。\n */\nexport interface FormInputProps {\n /** 绑定值(双向,配合 hbChange 事件) */\n modelValue: unknown;\n /** 尺寸 */\n size?: ComponentSize;\n /** 是否禁用 */\n disabled?: boolean;\n /** 是否只读 */\n readonly?: boolean;\n /** 是否可清空 */\n clearable?: boolean;\n /** 占位文本 */\n placeholder?: string;\n}\n\n/**\n * 生成尺寸 class 名:buildSizeClass('hb-input', 'large') -> 'hb-input--large'\n * 用于替代各组件 render 中重复的 `[`hb-input--${this.size}`]: true` 模板字面量。\n */\nexport function buildSizeClass(base: string, size: ComponentSize | undefined): string {\n const normalized = size && COMPONENT_SIZES.includes(size) ? size : 'default';\n return `${base}--${normalized}`;\n}\n\n/** 清空按钮可见性判定参数 */\nexport interface ClearVisibleOptions {\n /** 是否声明了 clearable */\n clearable: boolean;\n /** 是否禁用(禁用时不显示) */\n disabled?: boolean;\n /** 是否只读(只读时不显示) */\n readonly?: boolean;\n /** 当前是否有值(无值时不显示) */\n hasValue: boolean;\n}\n\n/**\n * 判定清空按钮是否应显示。\n * 抽取自 Input/Select/Cascader 中重复的 `clearable && !disabled && !readonly && hasValue`。\n */\nexport function isClearVisible(options: ClearVisibleOptions): boolean {\n return Boolean(options.clearable && !options.disabled && !options.readonly && options.hasValue);\n}\n\n/**\n * 判定一个值是否「非空」(用于清空按钮显隐)。\n * 兼容字符串、数字、数组(多选)。\n */\nexport function hasInputValue(value: unknown): boolean {\n if (value === null || value === undefined) return false;\n if (typeof value === 'string') return value.length > 0;\n if (typeof value === 'number') return !Number.isNaN(value);\n if (Array.isArray(value)) return value.length > 0;\n return true;\n}\n\n/**\n * 尺寸 class 集合生成器:返回包含 base 与 size class 的对象,可直接展开进 JSX class 绑定。\n * 例:sizeClassMap('hb-input', 'large', this.size) -> { 'hb-input': true, 'hb-input--large': true }\n */\nexport function sizeClassMap(base: string, size: ComponentSize | undefined): Record<string, boolean> {\n return { [base]: true, [buildSizeClass(base, size)]: true };\n}\n",":host {\n display: inline-block;\n position: relative;\n --hb-input-font-size: 14px;\n --hb-input-font-size-large: 16px;\n --hb-input-font-size-small: 12px;\n --hb-input-height: 32px;\n --hb-input-height-large: 40px;\n --hb-input-height-small: 24px;\n --hb-input-border-color: var(--hb-border-color, #dcdfe6);\n --hb-input-border-color-hover: var(--hb-color-primary);\n --hb-input-bg-color: var(--hb-color-white, #ffffff);\n --hb-input-text-color: var(--hb-color-text-regular, #606266);\n --hb-input-placeholder-color: var(--hb-color-text-placeholder, #c0c4cc);\n --hb-input-disabled-color: var(--hb-color-text-disabled, #c0c4cc);\n --hb-input-disabled-bg-color: var(--hb-fill-color-light, #f5f7fa);\n}\n\n.hb-input {\n position: relative;\n font-size: var(--hb-input-font-size);\n display: inline-block;\n width: 100%;\n}\n\n.hb-input__inner {\n -webkit-appearance: none;\n background-color: var(--hb-input-bg-color);\n background-image: none;\n border-radius: 4px;\n border: 1px solid var(--hb-input-border-color);\n box-sizing: border-box;\n color: var(--hb-input-text-color);\n display: inline-block;\n font-size: inherit;\n height: var(--hb-input-height);\n line-height: var(--hb-input-height);\n outline: none;\n padding: 0 15px;\n transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n width: 100%;\n}\n\n.hb-input__inner::placeholder {\n color: var(--hb-input-placeholder-color);\n}\n\n.hb-input__inner:hover:not(:disabled) {\n border-color: var(--hb-input-border-color-hover);\n}\n\n.hb-input__inner:focus {\n border-color: var(--hb-input-border-color-hover);\n}\n\n.hb-input__inner:disabled {\n background-color: var(--hb-input-disabled-bg-color);\n border-color: var(--hb-input-border-color);\n color: var(--hb-input-disabled-color);\n cursor: not-allowed;\n}\n\n.hb-input__inner[readonly] {\n background-color: var(--hb-input-disabled-bg-color);\n cursor: default;\n}\n\n.hb-input--small .hb-input__inner {\n height: var(--hb-input-height-small);\n line-height: var(--hb-input-height-small);\n font-size: var(--hb-input-font-size-small);\n padding: 0 12px;\n}\n\n.hb-input--large .hb-input__inner {\n height: var(--hb-input-height-large);\n line-height: var(--hb-input-height-large);\n font-size: var(--hb-input-font-size-large);\n padding: 0 18px;\n}\n\n.hb-input__prefix,\n.hb-input__suffix {\n position: absolute;\n top: 0;\n height: 100%;\n text-align: center;\n color: var(--hb-input-placeholder-color);\n transition: all 0.3s;\n display: flex;\n align-items: center;\n}\n\n.hb-input__prefix {\n left: 5px;\n}\n\n.hb-input__suffix {\n right: 5px;\n}\n\n.hb-input__suffix-inner {\n display: flex;\n align-items: center;\n cursor: pointer;\n user-select: none;\n}\n\n.hb-input__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--hb-input-placeholder-color);\n transition: color 0.2s;\n}\n\n.hb-input__clear svg {\n width: 100%;\n height: 100%;\n}\n\n.hb-input__clear:hover {\n color: var(--hb-input-text-color);\n}\n\n.hb-input__password {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--hb-input-text-color);\n cursor: pointer;\n}\n\n.hb-input__password svg {\n width: 100%;\n height: 100%;\n}\n\n.hb-input__inner[type='textarea'] {\n min-height: 60px;\n padding: 5px 15px;\n line-height: 1.5;\n vertical-align: bottom;\n resize: vertical;\n}\n\n.hb-input__count {\n position: absolute;\n bottom: 5px;\n right: 10px;\n font-size: 12px;\n color: var(--hb-input-placeholder-color);\n}\n\n.hb-input__count-inner {\n background-color: var(--hb-input-bg-color);\n padding: 0 4px;\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Watch, Element } from '@stencil/core';\nimport { ComponentSize, hasInputValue, isClearVisible, sizeClassMap } from '../../utils/form-input-base';\nimport { activationClickHandler } from '../../utils/a11y';\n\n/**\n * Input 输入框组件\n * 通过鼠标或键盘输入字符\n */\n@Component({\n tag: 'hb-input',\n styleUrl: 'input.css',\n shadow: true,\n})\nexport class Input {\n @Element() el: HTMLElement;\n\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue: string = '';\n\n /**\n * 输入框类型\n */\n @Prop() type: string = 'text';\n\n /**\n * 输入框尺寸\n */\n @Prop() size: ComponentSize = 'default';\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否只读\n * @default false\n */\n @Prop() readonly: boolean = false;\n\n /**\n * 输入框占位文本\n */\n @Prop() placeholder?: string;\n\n /**\n * 是否可清空\n * @default false\n */\n @Prop() clearable: boolean = false;\n\n /**\n * 是否显示密码可见性切换\n * @default false\n */\n @Prop() showPassword: boolean = false;\n\n /**\n * 是否显示字数统计\n * @default false\n */\n @Prop() showWordLimit: boolean = false;\n\n /**\n * 最大输入长度\n */\n @Prop() maxlength?: number;\n\n /**\n * 最小输入长度\n */\n @Prop() minlength?: number;\n\n /**\n * 原生 name 属性\n */\n @Prop() name?: string;\n\n /**\n * 原生 id 属性\n */\n @Prop() inputId?: string;\n\n /**\n * 原生 autocomplete 属性\n */\n @Prop() autocomplete?: string;\n\n /**\n * 原生 autofocus 属性\n */\n @Prop() autofocus: boolean = false;\n\n /**\n * 输入框头部图标\n */\n @Prop() prefixIcon?: string;\n\n /**\n * 输入框尾部图标\n */\n @Prop() suffixIcon?: string;\n\n /**\n * 输入框行数,仅 type 为 'textarea' 时有效\n */\n @Prop() rows: number = 2;\n\n /**\n * 是否自适应内容高度,仅 type 为 'textarea' 时有效\n */\n @Prop() autosize: boolean | { minRows?: number; maxRows?: number } = false;\n\n /**\n * 是否调整 textarea 大小\n */\n @Prop() resize?: 'none' | 'both' | 'horizontal' | 'vertical';\n\n @State() isFocused: boolean = false;\n @State() showClear: boolean = false;\n @State() passwordVisible: boolean = false;\n @State() inputValue: string = '';\n\n private inputRef?: HTMLInputElement | HTMLTextAreaElement;\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<string>;\n\n /**\n * 输入事件\n */\n @Event() hbInput: EventEmitter<string>;\n\n /**\n * 聚焦事件\n */\n @Event() hbFocus: EventEmitter<FocusEvent>;\n\n /**\n * 失焦事件\n */\n @Event() hbBlur: EventEmitter<FocusEvent>;\n\n /**\n * 清空事件\n */\n @Event() hbClear: EventEmitter<void>;\n\n @Watch('modelValue')\n handleValueChange() {\n this.inputValue = this.modelValue;\n this.updateClearVisible();\n // textarea autosize:外部改值也要重算高度\n this.resizeTextarea();\n }\n\n componentDidLoad() {\n this.inputValue = this.modelValue;\n this.updateClearVisible();\n this.resizeTextarea();\n }\n\n private updateClearVisible() {\n this.showClear = isClearVisible({\n clearable: this.clearable,\n disabled: this.disabled,\n readonly: this.readonly,\n hasValue: hasInputValue(this.inputValue),\n });\n }\n\n /**\n * textarea 自适应高度(autosize)。\n * - autosize=false 或非 textarea:跳过。\n * - autosize=true:按内容自适应。\n * - autosize={minRows,maxRows}:在最小/最大行数间夹取。\n * 算法:先把 height 置 auto 让浏览器按内容重排,再读 scrollHeight,\n * 减去 padding 后按行高换算成行数,最后按 min/max 夹取并写回 height。\n */\n private resizeTextarea() {\n if (this.type !== 'textarea' || !this.autosize) return;\n const ta = this.inputRef as HTMLTextAreaElement | undefined;\n if (!ta) return;\n\n // 行高:优先取计算样式,兜底 22px\n const computed = typeof window !== 'undefined' ? window.getComputedStyle(ta) : null;\n const lineHeight = computed && parseFloat(computed.lineHeight) ? parseFloat(computed.lineHeight) : 22;\n const paddingTop = computed ? parseFloat(computed.paddingTop) || 0 : 0;\n const paddingBottom = computed ? parseFloat(computed.paddingBottom) || 0 : 0;\n\n const opts = typeof this.autosize === 'object' ? this.autosize : {};\n const minRows = opts.minRows ?? 1;\n const maxRows = opts.maxRows ?? Infinity;\n\n const minH = minRows * lineHeight + paddingTop + paddingBottom;\n const maxH = maxRows === Infinity ? Infinity : maxRows * lineHeight + paddingTop + paddingBottom;\n\n // 先 reset 高度以读取真实内容高度\n ta.style.height = 'auto';\n const scrollH = ta.scrollHeight;\n const clamped = Math.max(minH, Math.min(scrollH, maxH === Infinity ? scrollH : maxH));\n ta.style.height = `${clamped}px`;\n // overflow:能滚动时才显示滚动条\n ta.style.overflowY = scrollH > clamped ? 'auto' : 'hidden';\n }\n\n private handleInput = (e: Event) => {\n const target = e.target as HTMLInputElement | HTMLTextAreaElement;\n this.inputValue = target.value;\n this.modelValue = target.value;\n this.updateClearVisible();\n this.hbInput.emit(target.value);\n this.resizeTextarea();\n };\n\n private handleChange = (e: Event) => {\n const target = e.target as HTMLInputElement | HTMLTextAreaElement;\n this.hbChange.emit(target.value);\n };\n\n private handleFocus = (e: FocusEvent) => {\n this.isFocused = true;\n this.updateClearVisible();\n this.hbFocus.emit(e);\n };\n\n private handleBlur = (e: FocusEvent) => {\n this.isFocused = false;\n this.updateClearVisible();\n this.hbBlur.emit(e);\n };\n\n private handleClear = (e: Event) => {\n e.stopPropagation();\n this.inputValue = '';\n this.modelValue = '';\n this.updateClearVisible();\n this.hbClear.emit();\n this.hbChange.emit('');\n if (this.inputRef) {\n this.inputRef.focus();\n }\n };\n\n private togglePasswordVisible = () => {\n this.passwordVisible = !this.passwordVisible;\n };\n\n private getInputType(): string {\n if (this.type === 'password' && this.showPassword) {\n return this.passwordVisible ? 'text' : 'password';\n }\n return this.type;\n }\n\n render() {\n const isTextarea = this.type === 'textarea';\n const InputTag = isTextarea ? 'textarea' : 'input';\n\n return (\n <div\n class={{\n ...sizeClassMap('hb-input', this.size),\n 'hb-input--disabled': this.disabled,\n 'hb-input--focused': this.isFocused,\n }}\n >\n {this.prefixIcon && (\n <span class=\"hb-input__prefix\">\n <i class={this.prefixIcon}></i>\n </span>\n )}\n <InputTag\n ref={el => (this.inputRef = el)}\n type={isTextarea ? undefined : this.getInputType()}\n id={this.inputId}\n name={this.name}\n class=\"hb-input__inner\"\n placeholder={this.placeholder}\n value={this.inputValue}\n disabled={this.disabled}\n readonly={this.readonly}\n autocomplete={this.autocomplete}\n autofocus={this.autofocus}\n maxlength={this.maxlength}\n minlength={this.minlength}\n rows={isTextarea ? this.rows : undefined}\n style={isTextarea ? { resize: this.autosize ? 'none' : this.resize || 'none' } : undefined}\n onInput={this.handleInput}\n onChange={this.handleChange}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n {(this.showClear || this.suffixIcon || (this.type === 'password' && this.showPassword)) && (\n <span class=\"hb-input__suffix\">\n {this.showClear && (\n <span class=\"hb-input__suffix-inner hb-input__clear\" role=\"button\" aria-label=\"清空\" tabIndex={0} onClick={this.handleClear} onKeyDown={activationClickHandler}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width={2} stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </svg>\n </span>\n )}\n {this.type === 'password' && this.showPassword && (\n <span\n class=\"hb-input__suffix-inner hb-input__password\"\n role=\"button\"\n aria-label={this.passwordVisible ? '隐藏密码' : '显示密码'}\n tabIndex={0}\n onClick={this.togglePasswordVisible}\n onKeyDown={activationClickHandler}\n >\n {this.passwordVisible ? (\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=\"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n ) : (\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=\"M3 3l18 18M10.6 10.6a3 3 0 0 0 4.2 4.2M9.9 5.1A10.6 10.6 0 0 1 12 5c6.5 0 10 7 10 7a17.8 17.8 0 0 1-2.2 3.2M6.1 6.1A17.7 17.7 0 0 0 2 12s3.5 7 10 7a10.5 10.5 0 0 0 4-.8\" />\n </svg>\n )}\n </span>\n )}\n {this.suffixIcon && (\n <span class=\"hb-input__suffix-inner\">\n <i class={this.suffixIcon}></i>\n </span>\n )}\n </span>\n )}\n {this.showWordLimit && this.maxlength && (\n <span class=\"hb-input__count\">\n <span class=\"hb-input__count-inner\">\n {this.inputValue.length} / {this.maxlength}\n </span>\n </span>\n )}\n </div>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,g as e,h as i}from"./p-e42dfa95.js";const o='/*! 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{.inline{display:inline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-form-item{align-items:flex-start;display:flex;gap:var(--hb-spacing-sm)}.hb-form-item--label-top,:host([data-label-top]) .hb-form-item{align-items:stretch;flex-direction:column;gap:var(--hb-spacing-xs)}.hb-form-item__label{align-items:center;color:var(--hb-color-text);display:inline-flex;flex-shrink:0;font-size:var(--hb-font-size-sm,14px);height:var(--hb-size-default,32px);justify-content:flex-end;white-space:nowrap}.hb-form-item--label-top .hb-form-item__label,:host([data-label-top]) .hb-form-item__label{height:auto;justify-content:flex-start;padding-bottom:var(--hb-spacing-xxs,2px)}.hb-form-item--label-left .hb-form-item__label{justify-content:flex-start}.hb-form-item__required{color:var(--hb-color-danger);font-family:SimSun,sans-serif;font-size:var(--hb-font-size-sm,14px);margin-right:4px}.hb-form-item__content{flex:1;min-width:0;position:relative}.hb-form-item__error{animation:hb-form-error-fade-in .2s ease-out;color:var(--hb-color-danger);font-size:var(--hb-font-size-xs,12px);line-height:1.5;margin-top:4px;min-height:0}@keyframes hb-form-error-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}@media (max-width:575.98px){.hb-form-item{align-items:stretch!important;flex-direction:column!important;gap:var(--hb-spacing-xs)!important}.hb-form-item__label{height:auto!important;justify-content:flex-start!important;padding-bottom:var(--hb-spacing-xxs,2px)!important}}';const r=o;const n=class{constructor(e){t(this,e)}get el(){return e(this)}prop="";label="";labelWidth;required=false;rules=[];size="default";errors=[];isvalidating=false;componentDidLoad(){this.el.dispatchEvent(new CustomEvent("hbFormFieldRegister",{detail:{prop:this.prop,validate:this.validate,resetValue:this.resetValue,getValue:this.getValue},bubbles:true,composed:true}));this.el.addEventListener("hbChange",this.handleChildChange)}disconnectedCallback(){this.el.removeEventListener("hbChange",this.handleChildChange)}handleChildChange=()=>{if(this.errors.length>0){void this.validate()}};get formRules(){const t=this.el.closest("hb-form");const e=t?t.rules?.[this.prop]||[]:[];return[...e,...this.rules]}get isRequired(){if(this.required)return true;return this.formRules.some((t=>t&&t.required))}get resolvedLabelPosition(){const t=this.el.closest("hb-form");return t&&t.labelPosition||"right"}validate=async()=>{const t=this.getValue();const e=this.formRules;if(e.length===0){this.errors=[];return[]}this.isvalidating=true;const i=[];for(const o of e){const e=t===undefined||t===null||t===""||Array.isArray(t)&&t.length===0;if(o.required&&e){i.push(o.message||`${this.label||this.prop}不能为空`);continue}if(e)continue;if(o.pattern){const e=typeof o.pattern==="string"?new RegExp(o.pattern).test(String(t)):o.pattern.test(String(t));if(!e){i.push(o.message||`${this.label||this.prop}格式不正确`);continue}}if(o.type==="email"){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t))){i.push(o.message||`${this.label||this.prop}格式不正确`);continue}}if(o.min!==undefined&&typeof t==="string"&&t.length<o.min){i.push(o.message||`${this.label||this.prop}最少${o.min}个字符`);continue}if(o.max!==undefined&&typeof t==="string"&&t.length>o.max){i.push(o.message||`${this.label||this.prop}最多${o.max}个字符`);continue}if(o.validator){try{await o.validator(t,this.formRules)}catch(t){i.push(t.message||o.message||`${this.label||this.prop}验证失败`)}}}this.errors=i;this.isvalidating=false;return i};resetValue=()=>{this.errors=[]};getValue=()=>{const t=this.el.querySelector("hb-input, hb-select, hb-cascader, hb-date-picker, hb-date-time-picker, hb-date-range-picker, "+"hb-input-number, hb-textarea, hb-checkbox, hb-checkbox-group, hb-radio-group, hb-switch, "+"hb-slider, hb-color-picker, hb-rate, hb-time-picker, hb-time-select");if(t){return t.modelValue}return undefined};render(){const t=this.resolvedLabelPosition==="top";return i("div",{key:"5819f09264a5823f5130f1ce3ff34915da8c7e41",class:{"hb-form-item":true,"hb-form-item--error":this.errors.length>0,"hb-form-item--validating":this.isvalidating,"hb-form-item--required":this.isRequired,"hb-form-item--label-top":t,"hb-form-item--label-left":this.resolvedLabelPosition==="left"}},this.label&&i("label",{key:"0a1881ea32b5a7a403e9fdfbcc886bdbc682abfa",class:"hb-form-item__label",style:this.labelWidth?{width:this.labelWidth}:undefined,title:this.label},this.isRequired&&i("span",{key:"46543df749b05021d867904d968dc60bf062ee41",class:"hb-form-item__required","aria-hidden":"true"},"*"),this.label),i("div",{key:"5ce3712dc8ebcb70cb3688a4546f0dd1ee3e5cd4",class:"hb-form-item__content"},i("slot",{key:"26e5c4a39560aca1796545b2f3679b042ef7d771"}),this.errors.length>0&&i("div",{key:"79e79d4bc52fe02c0735333cfbbb9b912a206c77",class:"hb-form-item__error",role:"alert"},this.errors[0])))}};n.style=r;export{n as hb_form_item};
2
- //# sourceMappingURL=p-2811e603.entry.js.map
1
+ import{r as t,g as e,h as i}from"./p-e42dfa95.js";const o='/*! 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{.inline{display:inline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-form-item{align-items:flex-start;display:flex;gap:var(--hb-spacing-sm)}.hb-form-item--label-top,:host([data-label-top]) .hb-form-item{align-items:stretch;flex-direction:column;gap:var(--hb-spacing-xs)}.hb-form-item__label{align-items:center;color:var(--hb-color-text);display:inline-flex;flex-shrink:0;font-size:var(--hb-font-size-sm,14px);height:var(--hb-size-default,32px);justify-content:flex-end;white-space:nowrap}.hb-form-item--label-top .hb-form-item__label,:host([data-label-top]) .hb-form-item__label{height:auto;justify-content:flex-start;padding-bottom:var(--hb-spacing-xxs,2px)}.hb-form-item--label-left .hb-form-item__label{justify-content:flex-start}.hb-form-item__required{color:var(--hb-color-danger);font-family:SimSun,sans-serif;font-size:var(--hb-font-size-sm,14px);margin-right:4px}.hb-form-item__content{flex:1;min-width:0;position:relative}.hb-form-item__error{animation:hb-form-error-fade-in .2s ease-out;color:var(--hb-color-danger);font-size:var(--hb-font-size-xs,12px);line-height:1.5;margin-top:4px;min-height:0}@keyframes hb-form-error-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}@media (max-width:575.98px){.hb-form-item{align-items:stretch!important;flex-direction:column!important;gap:var(--hb-spacing-xs)!important}.hb-form-item__label{height:auto!important;justify-content:flex-start!important;padding-bottom:var(--hb-spacing-xxs,2px)!important}}';const r=o;const a=class{constructor(e){t(this,e)}get el(){return e(this)}prop="";label="";labelWidth;required=false;rules=[];size="default";errors=[];isvalidating=false;componentDidLoad(){this.el.dispatchEvent(new CustomEvent("hbFormFieldRegister",{detail:{prop:this.prop,validate:this.validate,resetValue:this.resetValue,getValue:this.getValue},bubbles:true,composed:true}));this.el.addEventListener("hbChange",this.handleChildChange)}disconnectedCallback(){this.el.removeEventListener("hbChange",this.handleChildChange)}handleChildChange=()=>{if(this.errors.length>0){void this.validate()}};get formRules(){const t=this.el.closest("hb-form");const e=t?t.rules?.[this.prop]||[]:[];return[...e,...this.rules]}get isRequired(){if(this.required)return true;return this.formRules.some((t=>t&&t.required))}get resolvedLabelPosition(){const t=this.el.closest("hb-form");return t&&t.labelPosition||"right"}validate=async()=>{const t=this.getValue();const e=this.formRules;if(e.length===0){this.errors=[];return[]}this.isvalidating=true;const i=[];for(const o of e){const e=t===undefined||t===null||t===""||Array.isArray(t)&&t.length===0;if(o.required&&e){i.push(o.message||`${this.label||this.prop}不能为空`);continue}if(e)continue;if(o.pattern){const e=typeof o.pattern==="string"?new RegExp(o.pattern).test(String(t)):o.pattern.test(String(t));if(!e){i.push(o.message||`${this.label||this.prop}格式不正确`);continue}}if(o.type==="email"){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t))){i.push(o.message||`${this.label||this.prop}格式不正确`);continue}}if(o.min!==undefined&&typeof t==="string"&&t.length<o.min){i.push(o.message||`${this.label||this.prop}最少${o.min}个字符`);continue}if(o.max!==undefined&&typeof t==="string"&&t.length>o.max){i.push(o.message||`${this.label||this.prop}最多${o.max}个字符`);continue}if(o.validator){try{await o.validator(t,this.formRules)}catch(t){i.push(t.message||o.message||`${this.label||this.prop}验证失败`)}}}this.errors=i;this.isvalidating=false;return i};resetValue=()=>{this.errors=[]};getValue=()=>{const t=this.el.querySelector("hb-input, hb-select, hb-cascader, hb-date-picker, hb-date-time-picker, hb-date-range-picker, "+"hb-input-number, hb-textarea, hb-checkbox, hb-checkbox-group, hb-radio-group, hb-switch, "+"hb-slider, hb-color-picker, hb-rate, hb-time-picker, hb-time-select");if(t){return t.modelValue}return undefined};render(){const t=this.resolvedLabelPosition==="top";const e=this.errors.length>0;const o=this.label?`hb-form-item__label-${this.prop||"x"}`:undefined;return i("div",{key:"ad51782227c637557a1cc0a4be2397b20f63b2e2",class:{"hb-form-item":true,"hb-form-item--error":e,"hb-form-item--validating":this.isvalidating,"hb-form-item--required":this.isRequired,"hb-form-item--label-top":t,"hb-form-item--label-left":this.resolvedLabelPosition==="left"}},this.label&&i("label",{key:"22b4830775644a315a797c91ca77045015632cf5",id:o,class:"hb-form-item__label",style:this.labelWidth?{width:this.labelWidth}:undefined,title:this.label},this.isRequired&&i("span",{key:"43c4db5f65f68f8a9db2362c8cdf724069895238",class:"hb-form-item__required","aria-hidden":"true"},"*"),this.label),i("div",{key:"0fe8dda2a5b0363c55ca6e19d1c2b0e3a44e503f",class:"hb-form-item__content",role:"group","aria-labelledby":o,"aria-required":this.isRequired?"true":undefined,"aria-invalid":e?"true":undefined},i("slot",{key:"6b714ffde9c6a0f9112aef9a28519ba42df0fa96"}),e&&i("div",{key:"41a97ac3f7f0dccd9938d9dbf844852c085d0b72",class:"hb-form-item__error",role:"alert"},this.errors[0])))}};a.style=r;export{a as hb_form_item};
2
+ //# sourceMappingURL=p-54a28052.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["formItemCss","HbFormItemStyle0","FormItem","prop","label","labelWidth","required","rules","size","errors","isvalidating","componentDidLoad","this","el","dispatchEvent","CustomEvent","detail","validate","resetValue","getValue","bubbles","composed","addEventListener","handleChildChange","disconnectedCallback","removeEventListener","length","formRules","form","closest","formLevelRules","isRequired","some","r","resolvedLabelPosition","labelPosition","async","value","rule","isEmpty","undefined","Array","isArray","push","message","pattern","ok","RegExp","test","String","type","min","max","validator","err","input","querySelector","modelValue","render","labelTop","hasError","labelId","h","key","class","id","style","width","title","role"],"sources":["src/components/Form/form-item.css?tag=hb-form-item&encapsulation=shadow","src/components/Form/FormItem.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-form-item {\n display: flex;\n align-items: flex-start;\n gap: var(--hb-spacing-sm);\n}\n\n/* label 位置:顶部(对齐 antd label-position=\"top\")——\n 需要 Form 通过 class 下发,但 FormItem 在独立使用时也支持自身包装。\n 这里用 :host([data-label-position=\"top\"]) 兜底,Form 可通过 setting attribute 生效。 */\n:host([data-label-top]) .hb-form-item,\n.hb-form-item--label-top {\n flex-direction: column;\n align-items: stretch;\n gap: var(--hb-spacing-xs);\n}\n\n.hb-form-item__label {\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n height: var(--hb-size-default, 32px);\n font-size: var(--hb-font-size-sm, 14px);\n color: var(--hb-color-text);\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n/* label-position=top 时标签左对齐 */\n:host([data-label-top]) .hb-form-item__label,\n.hb-form-item--label-top .hb-form-item__label {\n justify-content: flex-start;\n height: auto;\n padding-bottom: var(--hb-spacing-xxs, 2px);\n}\n\n/* label-position=left 时标签左对齐 */\n.hb-form-item--label-left .hb-form-item__label {\n justify-content: flex-start;\n}\n\n.hb-form-item__required {\n color: var(--hb-color-danger);\n margin-right: 4px;\n font-size: var(--hb-font-size-sm, 14px);\n font-family: SimSun, sans-serif;\n}\n\n.hb-form-item__content {\n flex: 1;\n position: relative;\n min-width: 0;\n}\n\n.hb-form-item__error {\n font-size: var(--hb-font-size-xs, 12px);\n color: var(--hb-color-danger);\n margin-top: 4px;\n line-height: 1.5;\n min-height: 0;\n animation: hb-form-error-fade-in 0.2s ease-out;\n}\n\n@keyframes hb-form-error-fade-in {\n from {\n opacity: 0;\n transform: translateY(-4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* ============================================================\n * 响应式(移动端):小屏强制 label 顶部布局,\n * 避免标签列在窄屏被挤压。覆盖 hb-form-item--label-left/right。\n * ============================================================ */\n@media (max-width: 575.98px) {\n .hb-form-item {\n flex-direction: column !important;\n align-items: stretch !important;\n gap: var(--hb-spacing-xs) !important;\n }\n\n .hb-form-item__label {\n justify-content: flex-start !important;\n height: auto !important;\n padding-bottom: var(--hb-spacing-xxs, 2px) !important;\n }\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\n\n/**\n * FormItem 表单项组件\n * 表单中的每一项\n */\n@Component({\n tag: 'hb-form-item',\n styleUrl: 'form-item.css',\n shadow: true,\n})\nexport class FormItem {\n @Element() el: HTMLElement;\n\n /** 字段名 */\n @Prop() prop: string = '';\n\n /** 标签文本 */\n @Prop() label: string = '';\n\n /** 标签宽度 */\n @Prop() labelWidth?: string;\n\n /** 是否必填 */\n @Prop() required: boolean = false;\n\n /** 该表单项的验证规则 */\n @Prop() rules: any[] = [];\n\n /** 表单尺寸 */\n @Prop() size: 'large' | 'default' | 'small' = 'default';\n\n @State() errors: string[] = [];\n @State() isvalidating: boolean = false;\n\n /** hb-form 在 componentWillLoad 注册的事件监听;FormItem 在 componentDidLoad 派发,\n * 但 componentWillLoad 早于子组件的 componentDidLoad,因此注册一定先到。\n * 这里还监听 hbFieldReset,便于 Form.resetFields 主动广播。 */\n\n componentDidLoad() {\n // 向父级 hb-form 注册\n this.el.dispatchEvent(\n new CustomEvent('hbFormFieldRegister', {\n detail: {\n prop: this.prop,\n validate: this.validate,\n resetValue: this.resetValue,\n getValue: this.getValue,\n },\n bubbles: true,\n composed: true, // 穿越 Shadow DOM 边界(FormItem 自身 shadow -> Form host)\n }),\n );\n\n // 子控件值变化时清错(对齐 antd:合法输入即移除错误提示)\n this.el.addEventListener('hbChange', this.handleChildChange);\n }\n\n disconnectedCallback() {\n this.el.removeEventListener('hbChange', this.handleChildChange);\n }\n\n /** 子控件 hbChange 时,若当前有错误则重新校验以尽早清除错误提示 */\n private handleChildChange = () => {\n if (this.errors.length > 0) {\n void this.validate();\n }\n };\n\n private get formRules(): any[] {\n // 合并 prop 对应的 form rules 和自身 rules\n const form = this.el.closest('hb-form');\n const formLevelRules = form ? (form as any).rules?.[this.prop] || [] : [];\n return [...formLevelRules, ...this.rules];\n }\n\n /** 是否渲染必填星号:显式 required 或任一规则带 required(对齐 antd 自动推断) */\n private get isRequired(): boolean {\n if (this.required) return true;\n return this.formRules.some(r => r && r.required);\n }\n\n /** 继承父 hb-form 的 labelPosition(FormItem 自身无此 prop,避免与 Form 冲突时以 Form 为准) */\n private get resolvedLabelPosition(): 'left' | 'right' | 'top' {\n const form = this.el.closest('hb-form') as any;\n return (form && form.labelPosition) || 'right';\n }\n\n /**\n * 验证此字段\n */\n @Prop() validate = async (): Promise<string[]> => {\n const value = this.getValue();\n const rules = this.formRules;\n\n if (rules.length === 0) {\n this.errors = [];\n return [];\n }\n\n this.isvalidating = true;\n const errors: string[] = [];\n\n for (const rule of rules) {\n // 必填校验:空字符串 / null / undefined / 空数组均视为\"未填\"\n const isEmpty = value === undefined || value === null || value === '' || (Array.isArray(value) && value.length === 0);\n if (rule.required && isEmpty) {\n errors.push(rule.message || `${this.label || this.prop}不能为空`);\n continue;\n }\n // 非必填且为空时,跳过后续格式校验(与 antd 行为一致)\n if (isEmpty) continue;\n if (rule.pattern) {\n const ok = typeof rule.pattern === 'string' ? new RegExp(rule.pattern).test(String(value)) : rule.pattern.test(String(value));\n if (!ok) {\n errors.push(rule.message || `${this.label || this.prop}格式不正确`);\n continue;\n }\n }\n if (rule.type === 'email') {\n if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(String(value))) {\n errors.push(rule.message || `${this.label || this.prop}格式不正确`);\n continue;\n }\n }\n if (rule.min !== undefined && typeof value === 'string' && value.length < rule.min) {\n errors.push(rule.message || `${this.label || this.prop}最少${rule.min}个字符`);\n continue;\n }\n if (rule.max !== undefined && typeof value === 'string' && value.length > rule.max) {\n errors.push(rule.message || `${this.label || this.prop}最多${rule.max}个字符`);\n continue;\n }\n if (rule.validator) {\n try {\n await rule.validator(value, this.formRules);\n } catch (err: any) {\n errors.push(err.message || rule.message || `${this.label || this.prop}验证失败`);\n }\n }\n }\n\n this.errors = errors;\n this.isvalidating = false;\n return errors;\n };\n\n @Prop() resetValue = () => {\n this.errors = [];\n };\n\n @Prop() getValue = (): any => {\n // 覆盖所有表单控件:input/select/cascader/date 系列/数字/checkbox/radio/switch/slider/color-picker/rate/upload\n const input = this.el.querySelector(\n 'hb-input, hb-select, hb-cascader, hb-date-picker, hb-date-time-picker, hb-date-range-picker, ' +\n 'hb-input-number, hb-textarea, hb-checkbox, hb-checkbox-group, hb-radio-group, hb-switch, ' +\n 'hb-slider, hb-color-picker, hb-rate, hb-time-picker, hb-time-select',\n );\n if (input) {\n return (input as any).modelValue;\n }\n return undefined;\n };\n\n render() {\n const labelTop = this.resolvedLabelPosition === 'top';\n const hasError = this.errors.length > 0;\n // A4:label 与内容关联。子控件是 slot(id 未知),无法用 label.for;\n // 改用 content 容器 role=group + aria-labelledby 指向 label id,\n // 把 label 语义绑到整组;并用 aria-required / aria-invalid 暴露必填与校验态(读屏可感知,\n // 不再仅靠红色 + 隐藏星号)。\n const labelId = this.label ? `hb-form-item__label-${this.prop || 'x'}` : undefined;\n return (\n <div\n class={{\n 'hb-form-item': true,\n 'hb-form-item--error': hasError,\n 'hb-form-item--validating': this.isvalidating,\n 'hb-form-item--required': this.isRequired,\n 'hb-form-item--label-top': labelTop,\n 'hb-form-item--label-left': this.resolvedLabelPosition === 'left',\n }}\n >\n {this.label && (\n <label id={labelId} class=\"hb-form-item__label\" style={this.labelWidth ? { width: this.labelWidth } : undefined} title={this.label}>\n {this.isRequired && (\n <span class=\"hb-form-item__required\" aria-hidden=\"true\">\n *\n </span>\n )}\n {this.label}\n </label>\n )}\n <div class=\"hb-form-item__content\" role=\"group\" aria-labelledby={labelId} aria-required={this.isRequired ? 'true' : undefined} aria-invalid={hasError ? 'true' : undefined}>\n <slot />\n {hasError && (\n <div class=\"hb-form-item__error\" role=\"alert\">\n {this.errors[0]}\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,g as e,h as i}from"./p-e42dfa95.js";import{c as o,g as a}from"./p-ecce2b5e.js";import{i as n}from"./p-00aa34c8.js";import{c as r}from"./p-fad66d69.js";const s='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;.hb-tooltip__trigger,:host{display:inline-block}.hb-tooltip__popup{background-color:var(--hb-p-gray-800);border-radius:var(--hb-border-radius-sm);box-shadow:var(--hb-box-shadow);color:#fff;font-size:var(--hb-font-size-sm);pointer-events:auto;word-wrap:break-word;animation:hb-tooltip-fade-in .15s ease-out;line-height:1.4;max-width:300px;padding:6px 12px;position:fixed}.hb-tooltip__arrow{background-color:var(--hb-p-gray-800);height:8px;position:absolute;transform:rotate(45deg);width:8px}.hb-tooltip__content{position:relative;z-index:1}@keyframes hb-tooltip-fade-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.hb-tooltip__popup--leaving{animation:hb-tooltip-fade-out .15s ease-in forwards}@keyframes hb-tooltip-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@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}';const l=s;const d=class{constructor(e){t(this,e)}get el(){return e(this)}content="";placement="top";trigger="hover";disabled=false;showArrow=true;visible=false;leaving=false;popupStyle={};triggerRef;popupRef;hideTimer;leave=r((()=>this.leaving),(t=>this.leaving=t),150);show=()=>{if(this.disabled)return;clearTimeout(this.hideTimer);this.leave.cancel();this.visible=true;requestAnimationFrame((()=>this.updatePosition()))};hide=()=>{this.hideTimer=setTimeout((()=>{this.visible=false;this.leave.start()}),100)};toggle=()=>{if(this.disabled)return;if(this.visible){this.hide()}else{this.show()}};disconnectedCallback(){clearTimeout(this.hideTimer);this.leave.dispose()}handleKeydown=t=>{if(t.key==="Escape"&&(this.visible||this.leaving)){t.preventDefault();clearTimeout(this.hideTimer);this.visible=false;this.leave.start();return}if(this.trigger==="click"&&n(t.key)){t.preventDefault();this.toggle()}};updatePosition(){if(!this.triggerRef||!this.popupRef)return;const t=this.triggerRef.getBoundingClientRect();const{width:e,height:i}=this.popupRef.getBoundingClientRect();const n=o(t,e,i,this.placement,8);this.popupStyle={top:`${n.top}px`,left:`${n.left}px`,zIndex:String(a())}}get shouldRender(){return this.visible||this.leaving}render(){const t=this.trigger==="hover"?{onMouseEnter:this.show,onMouseLeave:this.hide}:{onClick:this.toggle};return i("div",{key:"27f941dba6404552eae2a84e231e5549d5542863",class:"hb-tooltip",...t,onKeyDown:this.handleKeydown},i("div",{key:"3705c79e383098b8d44360d178de43e89612857e",ref:t=>{this.triggerRef=t},class:"hb-tooltip__trigger",tabindex:this.disabled?-1:0,"aria-describedby":this.shouldRender?"hb-tooltip__popup":undefined,onFocus:this.trigger==="hover"?this.show:undefined,onBlur:this.trigger==="hover"?this.hide:undefined},i("slot",{key:"ba8916663ed4866bd59747eab9c00300282df193"})),this.shouldRender&&i("div",{key:"8b6510eb948a19352c67fa7996d37e010e9c7b6b",id:"hb-tooltip__popup",ref:t=>{this.popupRef=t},class:{"hb-tooltip__popup":true,"hb-tooltip__popup--leaving":this.leaving},style:this.popupStyle,role:"tooltip",onMouseEnter:()=>this.trigger==="hover"&&this.show(),onMouseLeave:()=>this.trigger==="hover"&&this.hide()},this.showArrow&&i("div",{key:"6e26a2e2ce3e7d89c8c918c32aab375b12ac9351",class:"hb-tooltip__arrow"}),i("div",{key:"68b39d002a53094a34c8583137a74bd27edd4e23",class:"hb-tooltip__content"},this.content)))}};d.style=l;export{d as hb_tooltip};
2
+ //# sourceMappingURL=p-5e253c15.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["tooltipCss","HbTooltipStyle0","Tooltip","content","placement","trigger","disabled","showArrow","visible","leaving","popupStyle","triggerRef","popupRef","hideTimer","leave","createLeaveScheduler","this","v","show","clearTimeout","cancel","requestAnimationFrame","updatePosition","hide","setTimeout","start","toggle","disconnectedCallback","dispose","handleKeydown","e","key","preventDefault","isActivationKey","triggerRect","getBoundingClientRect","width","height","pos","computePosition","top","left","zIndex","String","getNextZIndex","shouldRender","render","triggerEvents","onMouseEnter","onMouseLeave","onClick","h","class","onKeyDown","ref","el","tabindex","undefined","onFocus","onBlur","id","style","role"],"sources":["src/components/Tooltip/tooltip.css?tag=hb-tooltip&encapsulation=shadow","src/components/Tooltip/Tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.hb-tooltip__trigger {\n display: inline-block;\n}\n\n.hb-tooltip__popup {\n position: fixed;\n padding: 6px 12px;\n border-radius: var(--hb-border-radius-sm);\n background-color: var(--hb-p-gray-800);\n color: #fff;\n font-size: var(--hb-font-size-sm);\n line-height: 1.4;\n pointer-events: auto;\n box-shadow: var(--hb-box-shadow);\n animation: hb-tooltip-fade-in 0.15s ease-out;\n max-width: 300px;\n word-wrap: break-word;\n}\n\n.hb-tooltip__arrow {\n position: absolute;\n width: 8px;\n height: 8px;\n background-color: var(--hb-p-gray-800);\n transform: rotate(45deg);\n}\n\n.hb-tooltip__content {\n position: relative;\n z-index: 1;\n}\n\n@keyframes hb-tooltip-fade-in {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n/* 离场动画:leaving class 触发 fade-out,播完后由 shouldRender=false 卸载 */\n.hb-tooltip__popup--leaving {\n animation: hb-tooltip-fade-out 0.15s ease-in forwards;\n}\n\n@keyframes hb-tooltip-fade-out {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\nimport { computePosition, getNextZIndex, Placement } from '../../utils/popup-manager';\nimport { isActivationKey } from '../../utils/a11y';\nimport { createLeaveScheduler } from '../../utils/transition';\n\n/**\n * Tooltip 文字提示组件\n * 鼠标悬停或点击时显示提示文字。\n *\n * 无障碍(对齐 antd / WAI-ARIA):\n * - 触发器 aria-describedby 关联浮层 id(屏幕阅读器读出 content)\n * - 浮层 role=tooltip\n * - hover 触发时:focus 也显示(键盘用户可见,关键修复)\n * - click 触发时:Enter/Space 切换;任意模式 Esc 关闭\n *\n * 进出场动画:用 leaving state 延迟卸载,让 fade-out 有机会播放。\n */\n@Component({\n tag: 'hb-tooltip',\n styleUrl: 'tooltip.css',\n shadow: true,\n})\nexport class Tooltip {\n @Element() el: HTMLElement;\n\n /** 提示文字 */\n @Prop() content: string = '';\n\n /** 弹出位置 */\n @Prop() placement: Placement = 'top';\n\n /** 触发方式 */\n @Prop() trigger: 'hover' | 'click' = 'hover';\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n /** 是否显示箭头 */\n @Prop() showArrow: boolean = true;\n\n @State() visible: boolean = false;\n @State() leaving: boolean = false;\n @State() popupStyle: Record<string, string> = {};\n\n private triggerRef?: HTMLElement;\n private popupRef?: HTMLDivElement;\n private hideTimer?: ReturnType<typeof setTimeout>;\n private leave = createLeaveScheduler(\n () => this.leaving,\n v => (this.leaving = v),\n 150,\n );\n\n private show = () => {\n if (this.disabled) return;\n clearTimeout(this.hideTimer);\n this.leave.cancel(); // 中途又打开:取消挂起的离场\n this.visible = true;\n requestAnimationFrame(() => this.updatePosition());\n };\n\n private hide = () => {\n this.hideTimer = setTimeout(() => {\n this.visible = false;\n this.leave.start();\n }, 100);\n };\n\n private toggle = () => {\n if (this.disabled) return;\n if (this.visible) {\n this.hide();\n } else {\n this.show();\n }\n };\n\n disconnectedCallback() {\n // L6:清掉挂起的 hideTimer,避免卸载后 100ms 内触发 detached 实例\n clearTimeout(this.hideTimer);\n this.leave.dispose();\n }\n\n /** 键盘:Esc 关闭;click 模式 Enter/Space 切换 */\n private handleKeydown = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && (this.visible || this.leaving)) {\n e.preventDefault();\n clearTimeout(this.hideTimer);\n this.visible = false;\n this.leave.start();\n return;\n }\n if (this.trigger === 'click' && isActivationKey(e.key)) {\n e.preventDefault();\n this.toggle();\n }\n };\n\n private updatePosition() {\n if (!this.triggerRef || !this.popupRef) return;\n const triggerRect = this.triggerRef.getBoundingClientRect();\n const { width, height } = this.popupRef.getBoundingClientRect();\n const pos = computePosition(triggerRect, width, height, this.placement, 8);\n this.popupStyle = {\n top: `${pos.top}px`,\n left: `${pos.left}px`,\n zIndex: String(getNextZIndex()),\n };\n }\n\n private get shouldRender(): boolean {\n return this.visible || this.leaving;\n }\n\n render() {\n const triggerEvents = this.trigger === 'hover' ? { onMouseEnter: this.show, onMouseLeave: this.hide } : { onClick: this.toggle };\n\n return (\n <div class=\"hb-tooltip\" {...triggerEvents} onKeyDown={this.handleKeydown}>\n <div\n ref={(el: any) => {\n this.triggerRef = el;\n }}\n class=\"hb-tooltip__trigger\"\n tabindex={this.disabled ? -1 : 0}\n aria-describedby={this.shouldRender ? 'hb-tooltip__popup' : undefined}\n // hover 触发:focus 展开让键盘用户也能读到提示(对齐 antd 行为)\n onFocus={this.trigger === 'hover' ? this.show : undefined}\n onBlur={this.trigger === 'hover' ? this.hide : undefined}\n >\n <slot />\n </div>\n {this.shouldRender && (\n <div\n id=\"hb-tooltip__popup\"\n ref={(el: any) => {\n this.popupRef = el;\n }}\n class={{\n 'hb-tooltip__popup': true,\n 'hb-tooltip__popup--leaving': this.leaving,\n }}\n style={this.popupStyle}\n role=\"tooltip\"\n onMouseEnter={() => this.trigger === 'hover' && this.show()}\n onMouseLeave={() => this.trigger === 'hover' && this.hide()}\n >\n {this.showArrow && <div class=\"hb-tooltip__arrow\" />}\n <div class=\"hb-tooltip__content\">{this.content}</div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"mappings":"qKAAA,MAAMA,EAAa,o4MACnB,MAAAC,EAAeD,E,MCqBFE,EAAO,M,iDAIVC,QAAkB,GAGlBC,UAAuB,MAGvBC,QAA6B,QAG7BC,SAAoB,MAGpBC,UAAqB,KAEpBC,QAAmB,MACnBC,QAAmB,MACnBC,WAAqC,GAEtCC,WACAC,SACAC,UACAC,MAAQC,GACd,IAAMC,KAAKP,UACXQ,GAAMD,KAAKP,QAAUQ,GACrB,KAGMC,KAAO,KACb,GAAIF,KAAKV,SAAU,OACnBa,aAAaH,KAAKH,WAClBG,KAAKF,MAAMM,SACXJ,KAAKR,QAAU,KACfa,uBAAsB,IAAML,KAAKM,kBAAiB,EAG5CC,KAAO,KACbP,KAAKH,UAAYW,YAAW,KAC1BR,KAAKR,QAAU,MACfQ,KAAKF,MAAMW,OAAO,GACjB,IAAI,EAGDC,OAAS,KACf,GAAIV,KAAKV,SAAU,OACnB,GAAIU,KAAKR,QAAS,CAChBQ,KAAKO,M,KACA,CACLP,KAAKE,M,GAIT,oBAAAS,GAEER,aAAaH,KAAKH,WAClBG,KAAKF,MAAMc,S,CAILC,cAAiBC,IACvB,GAAIA,EAAEC,MAAQ,WAAaf,KAAKR,SAAWQ,KAAKP,SAAU,CACxDqB,EAAEE,iBACFb,aAAaH,KAAKH,WAClBG,KAAKR,QAAU,MACfQ,KAAKF,MAAMW,QACX,M,CAEF,GAAIT,KAAKX,UAAY,SAAW4B,EAAgBH,EAAEC,KAAM,CACtDD,EAAEE,iBACFhB,KAAKU,Q,GAID,cAAAJ,GACN,IAAKN,KAAKL,aAAeK,KAAKJ,SAAU,OACxC,MAAMsB,EAAclB,KAAKL,WAAWwB,wBACpC,MAAMC,MAAEA,EAAKC,OAAEA,GAAWrB,KAAKJ,SAASuB,wBACxC,MAAMG,EAAMC,EAAgBL,EAAaE,EAAOC,EAAQrB,KAAKZ,UAAW,GACxEY,KAAKN,WAAa,CAChB8B,IAAK,GAAGF,EAAIE,QACZC,KAAM,GAAGH,EAAIG,SACbC,OAAQC,OAAOC,K,CAInB,gBAAYC,GACV,OAAO7B,KAAKR,SAAWQ,KAAKP,O,CAG9B,MAAAqC,GACE,MAAMC,EAAgB/B,KAAKX,UAAY,QAAU,CAAE2C,aAAchC,KAAKE,KAAM+B,aAAcjC,KAAKO,MAAS,CAAE2B,QAASlC,KAAKU,QAExH,OACEyB,EAAA,OAAApB,IAAA,2CAAKqB,MAAM,gBAAiBL,EAAeM,UAAWrC,KAAKa,eACzDsB,EAAA,OAAApB,IAAA,2CACEuB,IAAMC,IACJvC,KAAKL,WAAa4C,CAAE,EAEtBH,MAAM,sBACNI,SAAUxC,KAAKV,UAAY,EAAI,EAAC,mBACdU,KAAK6B,aAAe,oBAAsBY,UAE5DC,QAAS1C,KAAKX,UAAY,QAAUW,KAAKE,KAAOuC,UAChDE,OAAQ3C,KAAKX,UAAY,QAAUW,KAAKO,KAAOkC,WAE/CN,EAAA,QAAApB,IAAA,8CAEDf,KAAK6B,cACJM,EAAA,OAAApB,IAAA,2CACE6B,GAAG,oBACHN,IAAMC,IACJvC,KAAKJ,SAAW2C,CAAE,EAEpBH,MAAO,CACL,oBAAqB,KACrB,6BAA8BpC,KAAKP,SAErCoD,MAAO7C,KAAKN,WACZoD,KAAK,UACLd,aAAc,IAAMhC,KAAKX,UAAY,SAAWW,KAAKE,OACrD+B,aAAc,IAAMjC,KAAKX,UAAY,SAAWW,KAAKO,QAEpDP,KAAKT,WAAa4C,EAAA,OAAApB,IAAA,2CAAKqB,MAAM,sBAC9BD,EAAA,OAAApB,IAAA,2CAAKqB,MAAM,uBAAuBpC,KAAKb,U","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as e,g as i,h as t}from"./p-e42dfa95.js";import{c as o,g as a}from"./p-ecce2b5e.js";import{i as r}from"./p-00aa34c8.js";import{c as n}from"./p-fad66d69.js";const s='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:inline-block}.hb-popconfirm__trigger{cursor:pointer;display:inline-block}.hb-popconfirm__popup{animation:hb-popconfirm-fade .15s ease-out;background:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);min-width:200px;padding:var(--hb-spacing-md);pointer-events:auto;position:fixed}.hb-popconfirm__main{align-items:flex-start;display:flex;gap:var(--hb-spacing-xs);margin-bottom:var(--hb-spacing-sm)}.hb-popconfirm__icon{color:var(--hb-color-warning);flex-shrink:0;font-size:16px}.hb-popconfirm__title{color:var(--hb-color-text);font-size:var(--hb-font-size-sm);line-height:1.5}.hb-popconfirm__action{display:flex;gap:var(--hb-spacing-xs);justify-content:flex-end}.hb-popconfirm__btn{background:var(--hb-color-bg);border:1px solid var(--hb-color-border);border-radius:var(--hb-border-radius-sm);cursor:pointer;font-size:var(--hb-font-size-xs);padding:4px 12px;transition:all var(--hb-transition-duration)}.hb-popconfirm__btn--cancel:hover{border-color:var(--hb-color-primary);color:var(--hb-color-primary)}.hb-popconfirm__btn--confirm{background:var(--hb-color-primary);border-color:var(--hb-color-primary);color:#fff}.hb-popconfirm__btn--confirm:hover{background:var(--hb-color-primary-hover)}@keyframes hb-popconfirm-fade{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.hb-popconfirm__popup--leaving{animation:hb-popconfirm-fade-out .2s ease-in forwards}@keyframes hb-popconfirm-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.98)}}@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}';const l=s;const p=class{constructor(i){e(this,i)}get el(){return i(this)}title="确定执行此操作?";confirmButtonText="确定";cancelButtonText="取消";placement="top";disabled=false;icon="⚠";visible=false;leaving=false;popupStyle={};triggerRef;popupRef;confirmBtnRef;leave=n((()=>this.leaving),(e=>this.leaving=e),200);show=()=>{if(this.disabled)return;this.leave.cancel();this.visible=true;requestAnimationFrame((()=>{this.updatePosition();this.confirmBtnRef?.focus()}))};hide=()=>{this.visible=false;this.leave.start()};disconnectedCallback(){this.leave.dispose()}handleKeydown=e=>{if(e.key==="Escape"&&(this.visible||this.leaving)){e.preventDefault();this.handleCancel(e)}};handleTriggerKeydown=e=>{if(this.disabled)return;if(r(e.key)){e.preventDefault();this.show()}};updatePosition(){if(!this.triggerRef||!this.popupRef)return;const e=this.triggerRef.getBoundingClientRect();const{width:i,height:t}=this.popupRef.getBoundingClientRect();const r=o(e,i,t,this.placement,8);this.popupStyle={top:`${r.top}px`,left:`${r.left}px`,zIndex:String(a())}}handleConfirm=e=>{e.stopPropagation();this.hide();this.el.dispatchEvent(new CustomEvent("hbConfirm",{bubbles:true}))};handleCancel=e=>{e.stopPropagation();this.hide();this.el.dispatchEvent(new CustomEvent("hbCancel",{bubbles:true}))};get shouldRender(){return this.visible||this.leaving}render(){return t("div",{key:"226619c96a2db6ccaebb74ad82945fa412a12ac1",class:"hb-popconfirm",onClick:this.show,onKeyDown:this.handleKeydown},t("div",{key:"fa33a01af716ef727ab4e1bb5ab936e6a9831baa",ref:e=>{this.triggerRef=e},class:"hb-popconfirm__trigger",role:"button",tabindex:this.disabled?-1:0,"aria-haspopup":"dialog","aria-expanded":this.visible?"true":"false","aria-disabled":this.disabled?"true":"false",onKeyDown:this.handleTriggerKeydown},t("slot",{key:"bb7ce2a124bcfdb45138d62e548954af35115f44"})),this.shouldRender&&t("div",{key:"706762852f8cfdcbc4afdb33ef7ea33263cb5e5f",ref:e=>{this.popupRef=e},class:{"hb-popconfirm__popup":true,"hb-popconfirm__popup--leaving":this.leaving},style:this.popupStyle,role:"dialog","aria-live":"polite","aria-labelledby":"hb-popconfirm__title"},t("div",{key:"543120f1621f1d1d48c11d9c0981def93f48d052",class:"hb-popconfirm__main"},t("span",{key:"fb9289e719296fb6dd41180f9f04fbfcd00cb308",class:"hb-popconfirm__icon","aria-hidden":"true"},this.icon),t("span",{key:"337236e625fa0153dede32b2806e3bab936e322c",id:"hb-popconfirm__title",class:"hb-popconfirm__title"},this.title)),t("div",{key:"00ec4666bbc3b3d313af8a02a0da73609eed5584",class:"hb-popconfirm__action"},t("button",{key:"ee50356e14f2c81f8aeab193f99530b77bc15f6c",type:"button",class:"hb-popconfirm__btn hb-popconfirm__btn--cancel",onClick:this.handleCancel},this.cancelButtonText),t("button",{key:"719717991db63b57000c9d93ba2e254e8bf7045f",type:"button",ref:e=>{this.confirmBtnRef=e},class:"hb-popconfirm__btn hb-popconfirm__btn--confirm",onClick:this.handleConfirm},this.confirmButtonText))))}};p.style=l;export{p as hb_popconfirm};
2
+ //# sourceMappingURL=p-63d68c61.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["popconfirmCss","HbPopconfirmStyle0","Popconfirm","title","confirmButtonText","cancelButtonText","placement","disabled","icon","visible","leaving","popupStyle","triggerRef","popupRef","confirmBtnRef","leave","createLeaveScheduler","this","v","show","cancel","requestAnimationFrame","updatePosition","focus","hide","start","disconnectedCallback","dispose","handleKeydown","e","key","preventDefault","handleCancel","handleTriggerKeydown","isActivationKey","rect","getBoundingClientRect","width","pw","height","ph","pos","computePosition","top","left","zIndex","String","getNextZIndex","handleConfirm","stopPropagation","el","dispatchEvent","CustomEvent","bubbles","shouldRender","render","h","class","onClick","onKeyDown","ref","role","tabindex","style","id","type"],"sources":["src/components/Popconfirm/popconfirm.css?tag=hb-popconfirm&encapsulation=shadow","src/components/Popconfirm/Popconfirm.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n.hb-popconfirm__trigger {\n display: inline-block;\n cursor: pointer;\n}\n.hb-popconfirm__popup {\n position: fixed;\n background: var(--hb-color-bg-elevated);\n border-radius: var(--hb-border-radius-base);\n box-shadow: var(--hb-box-shadow);\n padding: var(--hb-spacing-md);\n min-width: 200px;\n animation: hb-popconfirm-fade 0.15s ease-out;\n pointer-events: auto;\n}\n.hb-popconfirm__main {\n display: flex;\n align-items: flex-start;\n gap: var(--hb-spacing-xs);\n margin-bottom: var(--hb-spacing-sm);\n}\n.hb-popconfirm__icon {\n color: var(--hb-color-warning);\n font-size: 16px;\n flex-shrink: 0;\n}\n.hb-popconfirm__title {\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n line-height: 1.5;\n}\n.hb-popconfirm__action {\n display: flex;\n justify-content: flex-end;\n gap: var(--hb-spacing-xs);\n}\n.hb-popconfirm__btn {\n padding: 4px 12px;\n font-size: var(--hb-font-size-xs);\n border-radius: var(--hb-border-radius-sm);\n cursor: pointer;\n border: 1px solid var(--hb-color-border);\n background: var(--hb-color-bg);\n transition: all var(--hb-transition-duration);\n}\n.hb-popconfirm__btn--cancel:hover {\n color: var(--hb-color-primary);\n border-color: var(--hb-color-primary);\n}\n.hb-popconfirm__btn--confirm {\n background: var(--hb-color-primary);\n color: #fff;\n border-color: var(--hb-color-primary);\n}\n.hb-popconfirm__btn--confirm:hover {\n background: var(--hb-color-primary-hover);\n}\n@keyframes hb-popconfirm-fade {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n/* 离场动画 */\n.hb-popconfirm__popup--leaving {\n animation: hb-popconfirm-fade-out 0.2s ease-in forwards;\n}\n@keyframes hb-popconfirm-fade-out {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.98);\n }\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\nimport { computePosition, getNextZIndex, Placement } from '../../utils/popup-manager';\nimport { isActivationKey } from '../../utils/a11y';\nimport { createLeaveScheduler } from '../../utils/transition';\n\n/**\n * Popconfirm 气泡确认框\n * 无障碍(对齐 antd / WAI-ARIA):\n * - 触发器 role=button + aria-haspopup=dialog + aria-expanded + aria-describedby\n * - 浮层 role=dialog + aria-live=polite(确认文屏幕阅读器实时播报)\n * - 键盘:trigger Enter/Space 打开;Esc=取消关闭;打开时自动聚焦确认按钮\n *\n * 进出场动画:用 leaving state 延迟卸载。\n */\n@Component({ tag: 'hb-popconfirm', styleUrl: 'popconfirm.css', shadow: true })\nexport class Popconfirm {\n @Element() el: HTMLElement;\n @Prop() title: string = '确定执行此操作?';\n @Prop() confirmButtonText: string = '确定';\n @Prop() cancelButtonText: string = '取消';\n @Prop() placement: Placement = 'top';\n @Prop() disabled: boolean = false;\n @Prop() icon: string = '⚠';\n @State() visible: boolean = false;\n @State() leaving: boolean = false;\n @State() popupStyle: Record<string, string> = {};\n\n private triggerRef?: HTMLElement;\n private popupRef?: HTMLDivElement;\n private confirmBtnRef?: HTMLButtonElement;\n private leave = createLeaveScheduler(\n () => this.leaving,\n v => (this.leaving = v),\n 200,\n );\n\n private show = () => {\n if (this.disabled) return;\n this.leave.cancel();\n this.visible = true;\n requestAnimationFrame(() => {\n this.updatePosition();\n this.confirmBtnRef?.focus();\n });\n };\n private hide = () => {\n this.visible = false;\n this.leave.start();\n };\n\n disconnectedCallback() {\n this.leave.dispose();\n }\n\n private handleKeydown = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && (this.visible || this.leaving)) {\n e.preventDefault();\n this.handleCancel(e);\n }\n };\n\n private handleTriggerKeydown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n if (isActivationKey(e.key)) {\n e.preventDefault();\n this.show();\n }\n };\n\n private updatePosition() {\n if (!this.triggerRef || !this.popupRef) return;\n const rect = this.triggerRef.getBoundingClientRect();\n const { width: pw, height: ph } = this.popupRef.getBoundingClientRect();\n const pos = computePosition(rect, pw, ph, this.placement, 8);\n this.popupStyle = { top: `${pos.top}px`, left: `${pos.left}px`, zIndex: String(getNextZIndex()) };\n }\n\n private handleConfirm = (e: Event) => {\n e.stopPropagation();\n this.hide();\n this.el.dispatchEvent(new CustomEvent('hbConfirm', { bubbles: true }));\n };\n private handleCancel = (e: Event) => {\n e.stopPropagation();\n this.hide();\n this.el.dispatchEvent(new CustomEvent('hbCancel', { bubbles: true }));\n };\n\n private get shouldRender(): boolean {\n return this.visible || this.leaving;\n }\n\n render() {\n return (\n <div class=\"hb-popconfirm\" onClick={this.show} onKeyDown={this.handleKeydown}>\n <div\n ref={(el: any) => {\n this.triggerRef = el;\n }}\n class=\"hb-popconfirm__trigger\"\n role=\"button\"\n tabindex={this.disabled ? -1 : 0}\n aria-haspopup=\"dialog\"\n aria-expanded={this.visible ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onKeyDown={this.handleTriggerKeydown}\n >\n <slot />\n </div>\n {this.shouldRender && (\n <div\n ref={(el: any) => {\n this.popupRef = el;\n }}\n class={{\n 'hb-popconfirm__popup': true,\n 'hb-popconfirm__popup--leaving': this.leaving,\n }}\n style={this.popupStyle}\n role=\"dialog\"\n aria-live=\"polite\"\n aria-labelledby=\"hb-popconfirm__title\"\n >\n <div class=\"hb-popconfirm__main\">\n <span class=\"hb-popconfirm__icon\" aria-hidden=\"true\">\n {this.icon}\n </span>\n <span id=\"hb-popconfirm__title\" class=\"hb-popconfirm__title\">\n {this.title}\n </span>\n </div>\n <div class=\"hb-popconfirm__action\">\n <button type=\"button\" class=\"hb-popconfirm__btn hb-popconfirm__btn--cancel\" onClick={this.handleCancel}>\n {this.cancelButtonText}\n </button>\n <button\n type=\"button\"\n ref={(el: any) => {\n this.confirmBtnRef = el;\n }}\n class=\"hb-popconfirm__btn hb-popconfirm__btn--confirm\"\n onClick={this.handleConfirm}\n >\n {this.confirmButtonText}\n </button>\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"mappings":"qKAAA,MAAMA,EAAgB,0lOACtB,MAAAC,EAAeD,E,MCcFE,EAAU,M,iDAEbC,MAAgB,WAChBC,kBAA4B,KAC5BC,iBAA2B,KAC3BC,UAAuB,MACvBC,SAAoB,MACpBC,KAAe,IACdC,QAAmB,MACnBC,QAAmB,MACnBC,WAAqC,GAEtCC,WACAC,SACAC,cACAC,MAAQC,GACd,IAAMC,KAAKP,UACXQ,GAAMD,KAAKP,QAAUQ,GACrB,KAGMC,KAAO,KACb,GAAIF,KAAKV,SAAU,OACnBU,KAAKF,MAAMK,SACXH,KAAKR,QAAU,KACfY,uBAAsB,KACpBJ,KAAKK,iBACLL,KAAKH,eAAeS,OAAO,GAC3B,EAEIC,KAAO,KACbP,KAAKR,QAAU,MACfQ,KAAKF,MAAMU,OAAO,EAGpB,oBAAAC,GACET,KAAKF,MAAMY,S,CAGLC,cAAiBC,IACvB,GAAIA,EAAEC,MAAQ,WAAab,KAAKR,SAAWQ,KAAKP,SAAU,CACxDmB,EAAEE,iBACFd,KAAKe,aAAaH,E,GAIdI,qBAAwBJ,IAC9B,GAAIZ,KAAKV,SAAU,OACnB,GAAI2B,EAAgBL,EAAEC,KAAM,CAC1BD,EAAEE,iBACFd,KAAKE,M,GAID,cAAAG,GACN,IAAKL,KAAKL,aAAeK,KAAKJ,SAAU,OACxC,MAAMsB,EAAOlB,KAAKL,WAAWwB,wBAC7B,MAAQC,MAAOC,EAAIC,OAAQC,GAAOvB,KAAKJ,SAASuB,wBAChD,MAAMK,EAAMC,EAAgBP,EAAMG,EAAIE,EAAIvB,KAAKX,UAAW,GAC1DW,KAAKN,WAAa,CAAEgC,IAAK,GAAGF,EAAIE,QAASC,KAAM,GAAGH,EAAIG,SAAUC,OAAQC,OAAOC,K,CAGzEC,cAAiBnB,IACvBA,EAAEoB,kBACFhC,KAAKO,OACLP,KAAKiC,GAAGC,cAAc,IAAIC,YAAY,YAAa,CAAEC,QAAS,OAAQ,EAEhErB,aAAgBH,IACtBA,EAAEoB,kBACFhC,KAAKO,OACLP,KAAKiC,GAAGC,cAAc,IAAIC,YAAY,WAAY,CAAEC,QAAS,OAAQ,EAGvE,gBAAYC,GACV,OAAOrC,KAAKR,SAAWQ,KAAKP,O,CAG9B,MAAA6C,GACE,OACEC,EAAA,OAAA1B,IAAA,2CAAK2B,MAAM,gBAAgBC,QAASzC,KAAKE,KAAMwC,UAAW1C,KAAKW,eAC7D4B,EAAA,OAAA1B,IAAA,2CACE8B,IAAMV,IACJjC,KAAKL,WAAasC,CAAE,EAEtBO,MAAM,yBACNI,KAAK,SACLC,SAAU7C,KAAKV,UAAY,EAAI,EAAC,gBAClB,SAAQ,gBACPU,KAAKR,QAAU,OAAS,QAAO,gBAC/BQ,KAAKV,SAAW,OAAS,QACxCoD,UAAW1C,KAAKgB,sBAEhBuB,EAAA,QAAA1B,IAAA,8CAEDb,KAAKqC,cACJE,EAAA,OAAA1B,IAAA,2CACE8B,IAAMV,IACJjC,KAAKJ,SAAWqC,CAAE,EAEpBO,MAAO,CACL,uBAAwB,KACxB,gCAAiCxC,KAAKP,SAExCqD,MAAO9C,KAAKN,WACZkD,KAAK,SAAQ,YACH,SAAQ,kBACF,wBAEhBL,EAAA,OAAA1B,IAAA,2CAAK2B,MAAM,uBACTD,EAAA,QAAA1B,IAAA,2CAAM2B,MAAM,sBAAqB,cAAa,QAC3CxC,KAAKT,MAERgD,EAAA,QAAA1B,IAAA,2CAAMkC,GAAG,uBAAuBP,MAAM,wBACnCxC,KAAKd,QAGVqD,EAAA,OAAA1B,IAAA,2CAAK2B,MAAM,yBACTD,EAAA,UAAA1B,IAAA,2CAAQmC,KAAK,SAASR,MAAM,gDAAgDC,QAASzC,KAAKe,cACvFf,KAAKZ,kBAERmD,EAAA,UAAA1B,IAAA,2CACEmC,KAAK,SACLL,IAAMV,IACJjC,KAAKH,cAAgBoC,CAAE,EAEzBO,MAAM,iDACNC,QAASzC,KAAK+B,eAEb/B,KAAKb,qB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,g as e,h as o}from"./p-e42dfa95.js";const a='/*! 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;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@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)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-input-tag-font-size:14px;--hb-input-tag-height:32px;--hb-input-tag-border-color:var(--hb-border-color,#dcdfe6);--hb-input-tag-border-color-hover:var(--hb-color-primary);--hb-input-tag-bg-color:var(--hb-color-white,#fff);display:inline-block}.hb-input-tag{align-items:center;background-color:var(--hb-input-tag-bg-color);border:1px solid var(--hb-input-tag-border-color);border-radius:4px;box-sizing:border-box;display:inline-flex;flex-wrap:wrap;min-height:var(--hb-input-tag-height);padding:0 8px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}.hb-input-tag--focused,.hb-input-tag:hover:not(.hb-input-tag--disabled){border-color:var(--hb-input-tag-border-color-hover)}.hb-input-tag__tag{align-items:center;background-color:var(--hb-fill-color-light,#f0f2f5);border:1px solid var(--hb-border-color-lighter,#e4e7ed);border-radius:4px;color:var(--hb-color-text-regular,#606266);display:inline-flex;font-size:12px;height:24px;margin:2px 4px 2px 0;padding:0 8px}.hb-input-tag__tag--success{background-color:var(--hb-color-success-light-9,#f0f9ff);border-color:var(--hb-color-success-light-7,#b3e19d);color:var(--hb-color-success,#67c23a)}.hb-input-tag__tag--info{background-color:var(--hb-color-info-light-9,#f4f4f5);border-color:var(--hb-color-info-light-7,#c8c9cc);color:var(--hb-color-info,#909399)}.hb-input-tag__tag--warning{background-color:var(--hb-color-warning-light-9,#fdf6ec);border-color:var(--hb-color-warning-light-7,#f5dab1);color:var(--hb-color-warning,#e6a23c)}.hb-input-tag__tag--danger{background-color:var(--hb-color-danger-light-9,#fef0f0);border-color:var(--hb-color-danger-light-7,#fbc4c4);color:var(--hb-color-danger,#f56c6c)}.hb-input-tag__tag-text{margin-right:4px}.hb-input-tag__tag-close{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:14px;transition:color .2s}.hb-input-tag__tag-close:hover{color:var(--hb-color-text-regular,#606266)}.hb-input-tag__clear{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:14px;margin-left:4px;padding:0 2px;transition:color .2s}.hb-input-tag__clear:hover,.hb-input-tag__input{color:var(--hb-color-text-regular,#606266)}.hb-input-tag__input{background:0 0;border:none;flex:1;font-size:var(--hb-input-tag-font-size);height:24px;line-height:24px;margin:2px 0;min-width:60px;outline:none;padding:0}.hb-input-tag__input::placeholder{color:var(--hb-color-text-placeholder,#c0c4cc)}.hb-input-tag--small{min-height:24px;padding:0 6px}.hb-input-tag--small .hb-input-tag__tag{font-size:11px;height:20px;padding:0 6px}.hb-input-tag--small .hb-input-tag__input{font-size:12px;height:20px;line-height:20px}.hb-input-tag--large{min-height:40px;padding:0 10px}.hb-input-tag--large .hb-input-tag__tag{font-size:13px;height:28px;padding:0 10px}.hb-input-tag--large .hb-input-tag__input{font-size:16px;height:28px;line-height:28px}.hb-input-tag--disabled{background-color:var(--hb-fill-color-light,#f5f7fa);border-color:var(--hb-input-tag-border-color);cursor:not-allowed}.hb-input-tag--disabled .hb-input-tag__input{color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}';const r=a;const n=class{constructor(e){t(this,e);this.hbChange=i(this,"hbChange",7);this.hbRemove=i(this,"hbRemove",7);this.hbInput=i(this,"hbInput",7)}get el(){return e(this)}modelValue=[];size="default";disabled=false;placeholder;maxlength;max;clearable=false;width;type;closable=true;inputVisible=true;inputValue="";isFocused=false;inputRef;hbChange;hbRemove;hbInput;handleInput=t=>{const i=t.target;this.inputValue=i.value;this.hbInput.emit(i.value)};handleKeyDown=t=>{if(t.key==="Enter"&&this.inputValue.trim()){t.preventDefault();this.addTag(this.inputValue.trim())}else if(t.key==="Backspace"&&!this.inputValue&&this.modelValue.length>0){this.removeTag(this.modelValue[this.modelValue.length-1])}};handleFocus=()=>{this.isFocused=true};handleBlur=()=>{this.isFocused=false;if(this.inputValue.trim()){this.addTag(this.inputValue.trim())}};addTag(t){if(this.max&&this.modelValue.length>=this.max){return}if(!this.modelValue.includes(t)){const i=[...this.modelValue,t];this.modelValue=i;this.inputValue="";this.hbChange.emit(i);if(this.inputRef){this.inputRef.value=""}}}removeTag(t){const i=this.modelValue.filter((i=>i!==t));this.modelValue=i;this.hbChange.emit(i);this.hbRemove.emit(t)}handleClearAll=t=>{t.stopPropagation();this.modelValue=[];this.hbChange.emit([])};render(){return o("div",{key:"8ce158419ad7a38a870ec04ff67b97fc68884bb3",class:{"hb-input-tag":true,[`hb-input-tag--${this.size}`]:true,"hb-input-tag--disabled":this.disabled,"hb-input-tag--focused":this.isFocused},style:this.width?{width:this.width}:undefined},this.modelValue.map((t=>o("span",{class:{"hb-input-tag__tag":true,[`hb-input-tag__tag--${this.type}`]:!!this.type}},o("span",{class:"hb-input-tag__tag-text"},t),this.closable&&o("span",{class:"hb-input-tag__tag-close",onClick:()=>this.removeTag(t)},"×")))),this.inputVisible&&(!this.max||this.modelValue.length<this.max)&&o("input",{key:"8f52afba7e2271936afcd89bfcafd0319eb765bc",ref:t=>this.inputRef=t,type:"text",class:"hb-input-tag__input",placeholder:this.placeholder,value:this.inputValue,disabled:this.disabled,maxlength:this.maxlength,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur}),this.clearable&&this.modelValue.length>0&&!this.disabled&&o("span",{key:"5c37d7a9db6c535de62498b4f0a0be1a70846c46",class:"hb-input-tag__clear",onClick:this.handleClearAll},"×"))}};n.style=r;export{n as hb_input_tag};
2
- //# sourceMappingURL=p-ccd09d5a.entry.js.map
1
+ import{r as t,c as i,g as e,h as o}from"./p-e42dfa95.js";const a='/*! 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;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@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)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-input-tag-font-size:14px;--hb-input-tag-height:32px;--hb-input-tag-border-color:var(--hb-border-color,#dcdfe6);--hb-input-tag-border-color-hover:var(--hb-color-primary);--hb-input-tag-bg-color:var(--hb-color-white,#fff);display:inline-block}.hb-input-tag{align-items:center;background-color:var(--hb-input-tag-bg-color);border:1px solid var(--hb-input-tag-border-color);border-radius:4px;box-sizing:border-box;display:inline-flex;flex-wrap:wrap;min-height:var(--hb-input-tag-height);padding:0 8px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}.hb-input-tag--focused,.hb-input-tag:hover:not(.hb-input-tag--disabled){border-color:var(--hb-input-tag-border-color-hover)}.hb-input-tag__tag{align-items:center;background-color:var(--hb-fill-color-light,#f0f2f5);border:1px solid var(--hb-border-color-lighter,#e4e7ed);border-radius:4px;color:var(--hb-color-text-regular,#606266);display:inline-flex;font-size:12px;height:24px;margin:2px 4px 2px 0;padding:0 8px}.hb-input-tag__tag--success{background-color:var(--hb-color-success-light-9,#f0f9ff);border-color:var(--hb-color-success-light-7,#b3e19d);color:var(--hb-color-success,#67c23a)}.hb-input-tag__tag--info{background-color:var(--hb-color-info-light-9,#f4f4f5);border-color:var(--hb-color-info-light-7,#c8c9cc);color:var(--hb-color-info,#909399)}.hb-input-tag__tag--warning{background-color:var(--hb-color-warning-light-9,#fdf6ec);border-color:var(--hb-color-warning-light-7,#f5dab1);color:var(--hb-color-warning,#e6a23c)}.hb-input-tag__tag--danger{background-color:var(--hb-color-danger-light-9,#fef0f0);border-color:var(--hb-color-danger-light-7,#fbc4c4);color:var(--hb-color-danger,#f56c6c)}.hb-input-tag__tag-text{margin-right:4px}.hb-input-tag__tag-close{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:14px;transition:color .2s}.hb-input-tag__tag-close:hover{color:var(--hb-color-text-regular,#606266)}.hb-input-tag__clear{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:14px;margin-left:4px;padding:0 2px;transition:color .2s}.hb-input-tag__clear:hover,.hb-input-tag__input{color:var(--hb-color-text-regular,#606266)}.hb-input-tag__input{background:0 0;border:none;flex:1;font-size:var(--hb-input-tag-font-size);height:24px;line-height:24px;margin:2px 0;min-width:60px;outline:none;padding:0}.hb-input-tag__input::placeholder{color:var(--hb-color-text-placeholder,#c0c4cc)}.hb-input-tag--small{min-height:24px;padding:0 6px}.hb-input-tag--small .hb-input-tag__tag{font-size:11px;height:20px;padding:0 6px}.hb-input-tag--small .hb-input-tag__input{font-size:12px;height:20px;line-height:20px}.hb-input-tag--large{min-height:40px;padding:0 10px}.hb-input-tag--large .hb-input-tag__tag{font-size:13px;height:28px;padding:0 10px}.hb-input-tag--large .hb-input-tag__input{font-size:16px;height:28px;line-height:28px}.hb-input-tag--disabled{background-color:var(--hb-fill-color-light,#f5f7fa);border-color:var(--hb-input-tag-border-color);cursor:not-allowed}.hb-input-tag--disabled .hb-input-tag__input{color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}';const r=a;const n=class{constructor(e){t(this,e);this.hbChange=i(this,"hbChange",7);this.hbRemove=i(this,"hbRemove",7);this.hbInput=i(this,"hbInput",7)}get el(){return e(this)}modelValue=[];size="default";disabled=false;placeholder;maxlength;max;clearable=false;width;type;closable=true;inputVisible=true;inputValue="";isFocused=false;inputRef;hbChange;hbRemove;hbInput;handleInput=t=>{const i=t.target;this.inputValue=i.value;this.hbInput.emit(i.value)};handleKeyDown=t=>{if(t.key==="Enter"&&this.inputValue.trim()){t.preventDefault();this.addTag(this.inputValue.trim())}else if(t.key==="Backspace"&&!this.inputValue&&this.modelValue.length>0){this.removeTag(this.modelValue[this.modelValue.length-1])}};handleFocus=()=>{this.isFocused=true};handleBlur=()=>{this.isFocused=false;if(this.inputValue.trim()){this.addTag(this.inputValue.trim())}};addTag(t){if(this.max&&this.modelValue.length>=this.max){return}if(!this.modelValue.includes(t)){const i=[...this.modelValue,t];this.modelValue=i;this.inputValue="";this.hbChange.emit(i);if(this.inputRef){this.inputRef.value=""}}}removeTag(t){const i=this.modelValue.filter((i=>i!==t));this.modelValue=i;this.hbChange.emit(i);this.hbRemove.emit(t)}handleClearAll=t=>{t.stopPropagation();this.modelValue=[];this.hbChange.emit([])};render(){return o("div",{key:"eb9c7afe898b95d3b08c068921f50b4848d78ada",class:{"hb-input-tag":true,[`hb-input-tag--${this.size}`]:true,"hb-input-tag--disabled":this.disabled,"hb-input-tag--focused":this.isFocused},style:this.width?{width:this.width}:undefined},this.modelValue.map((t=>o("span",{class:{"hb-input-tag__tag":true,[`hb-input-tag__tag--${this.type}`]:!!this.type}},o("span",{class:"hb-input-tag__tag-text"},t),this.closable&&o("span",{class:"hb-input-tag__tag-close",onClick:()=>this.removeTag(t)},"×")))),this.inputVisible&&(!this.max||this.modelValue.length<this.max)&&o("input",{key:"4f26ff131300b6afbb6278a8066e33c16197990f",ref:t=>this.inputRef=t,type:"text",class:"hb-input-tag__input",placeholder:this.placeholder,value:this.inputValue,disabled:this.disabled,maxlength:this.maxlength,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur}),this.clearable&&this.modelValue.length>0&&!this.disabled&&o("span",{key:"2d0156cd68a9d9a11e1e8b78160edfa271bcb188",class:"hb-input-tag__clear",onClick:this.handleClearAll},"×"))}};n.style=r;export{n as hb_input_tag};
2
+ //# sourceMappingURL=p-6518c435.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as a}from"./p-e42dfa95.js";import{p as i,a as o,W as r,g as n,i as s,M as l}from"./p-08b4005c.js";const d='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.grid{display:grid}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-calendar{background-color:var(--hb-color-white,#fff);border-radius:4px;box-sizing:border-box;padding:12px;width:100%}.hb-calendar__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-calendar__header-label{color:var(--hb-color-text-regular,#606266);font-size:14px;font-weight:600}.hb-calendar__next-btn,.hb-calendar__prev-btn{background:0 0;border:none;color:var(--hb-color-text-regular,#606266);cursor:pointer;font-size:18px;line-height:1;padding:4px 8px;transition:color .2s}.hb-calendar__next-btn:hover,.hb-calendar__prev-btn:hover{color:var(--hb-color-primary)}.hb-calendar__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-calendar__weekday{color:var(--hb-color-text-placeholder,#c0c4cc);font-size:12px;font-weight:500;padding:4px 0;text-align:center}.hb-calendar__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-calendar__day{align-items:center;aspect-ratio:1;border-radius:4px;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:flex;font-size:13px;justify-content:center;transition:all .2s;-webkit-user-select:none;user-select:none}.hb-calendar__day:hover:not(.hb-calendar__day--other-month){background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-calendar__day--other-month{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:default}.hb-calendar__day--today{color:var(--hb-color-primary);font-weight:600}.hb-calendar__day--selected{color:var(--hb-color-white,#fff)}.hb-calendar__day--selected,.hb-calendar__day--selected:hover{background-color:var(--hb-color-primary)}.hb-calendar__day--focused{outline:2px solid var(--hb-color-primary,#1677ff);outline-offset:-2px}.hb-calendar__day--disabled{color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed;opacity:.5}.hb-calendar__day--disabled:hover{background-color:#0000}@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}';const c=d;const h=class{constructor(a){e(this,a);this.hbChange=t(this,"hbChange",7)}modelValue;firstDayOfWeek=0;disabledDate;hbChange;viewDate=new Date;selectedDate;focusDate=new Date;componentDidLoad(){this.initFromModelValue()}handleModelValueChange(){this.initFromModelValue()}initFromModelValue(){const e=i(this.modelValue);this.selectedDate=e;if(e){this.viewDate=new Date(e.getFullYear(),e.getMonth(),1);this.focusDate=new Date(e)}else{this.focusDate=new Date}}handleSelect=e=>{if(!e.isCurrentMonth)return;if(this.disabledDate&&this.disabledDate(e.date))return;this.selectedDate=e.date;this.focusDate=new Date(e.date);const t=this.toISODate(e.date);this.modelValue=t;this.hbChange.emit(t)};handleGridKeydown=e=>{const t=new Date(this.focusDate);switch(e.key){case"ArrowRight":t.setDate(t.getDate()+1);break;case"ArrowLeft":t.setDate(t.getDate()-1);break;case"ArrowDown":t.setDate(t.getDate()+7);break;case"ArrowUp":t.setDate(t.getDate()-7);break;case"Home":{const e=t.getDay();t.setDate(t.getDate()-e);break}case"End":{const e=6-t.getDay();t.setDate(t.getDate()+e);break}case"PageDown":t.setMonth(t.getMonth()+1);break;case"PageUp":t.setMonth(t.getMonth()-1);break;case"Enter":e.preventDefault();this.handleSelect({date:this.focusDate,isCurrentMonth:true});return;default:return}e.preventDefault();if(t.getMonth()!==this.viewDate.getMonth()||t.getFullYear()!==this.viewDate.getFullYear()){this.viewDate=new Date(t.getFullYear(),t.getMonth(),1)}this.focusDate=t};toISODate(e){const t=e.getFullYear();const a=String(e.getMonth()+1).padStart(2,"0");const i=String(e.getDate()).padStart(2,"0");return`${t}-${a}-${i}`}changeMonth(e){this.viewDate=o(this.viewDate,e)}get orderedWeekNames(){const e=(this.firstDayOfWeek%7+7)%7;return[...r.slice(e),...r.slice(0,e)]}render(){const e=n(this.viewDate,this.selectedDate,new Date,this.firstDayOfWeek);const t=this.viewDate;return a("div",{key:"9c18ef6f549973316bcfe0343290e442f72dfdb8",class:"hb-calendar"},a("div",{key:"ab177ab7cd14aec0c52a3806ed098e7abc245283",class:"hb-calendar__header"},a("button",{key:"5e7c773130c63479f806c33a085e5a82ba5c2fe7",type:"button",class:"hb-calendar__prev-btn",onClick:()=>this.changeMonth(-1),"aria-label":"上一月"},"‹"),a("span",{key:"bfcd78f5119f461878e7a8c8fbfc260e97b58458",class:"hb-calendar__header-label","aria-live":"polite"},t.getFullYear(),"年 ",l[t.getMonth()]),a("button",{key:"4eb5cf7d57c0288f895b35b889bd5016b8c78075",type:"button",class:"hb-calendar__next-btn",onClick:()=>this.changeMonth(1),"aria-label":"下一月"},"›")),a("div",{key:"2b643cc4f0a121c349018e502745212adae5dfe9",class:"hb-calendar__body",role:"grid","aria-label":`${t.getFullYear()}年${t.getMonth()+1}月日历`},a("div",{key:"546e2f58e40732ee2cc270152d4e69bb044fdef6",class:"hb-calendar__weekdays",role:"row"},this.orderedWeekNames.map((e=>a("div",{class:"hb-calendar__weekday",role:"columnheader","aria-disabled":"true"},e)))),a("div",{key:"36178be8edbf59348396b7355066f45aa1adcc81",class:"hb-calendar__days",role:"row",onKeyDown:this.handleGridKeydown},e.map(((e,t)=>{const i=s(e.date,this.focusDate);const o=e.isCurrentMonth&&!!this.disabledDate&&this.disabledDate(e.date);return a("div",{key:t,class:{"hb-calendar__day":true,"hb-calendar__day--other-month":!e.isCurrentMonth,"hb-calendar__day--today":e.isToday,"hb-calendar__day--selected":e.isSelected,"hb-calendar__day--focused":i,"hb-calendar__day--disabled":o},role:"gridcell",tabindex:i?0:-1,"aria-selected":e.isSelected?"true":"false","aria-current":e.isToday?"date":undefined,"aria-disabled":!e.isCurrentMonth||o?"true":undefined,"aria-label":this.toISODate(e.date),onClick:()=>this.handleSelect(e)},e.date.getDate())})))))}static get watchers(){return{modelValue:["handleModelValueChange"]}}};h.style=c;export{h as hb_calendar};
2
- //# sourceMappingURL=p-1f8db37a.entry.js.map
1
+ import{r as e,c as t,h as a}from"./p-e42dfa95.js";import{p as i,a as o,W as r,g as n,i as s,M as l}from"./p-e0876aca.js";const d='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.grid{display:grid}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-calendar{background-color:var(--hb-color-white,#fff);border-radius:4px;box-sizing:border-box;padding:12px;width:100%}.hb-calendar__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-calendar__header-label{color:var(--hb-color-text-regular,#606266);font-size:14px;font-weight:600}.hb-calendar__next-btn,.hb-calendar__prev-btn{background:0 0;border:none;color:var(--hb-color-text-regular,#606266);cursor:pointer;font-size:18px;line-height:1;padding:4px 8px;transition:color .2s}.hb-calendar__next-btn:hover,.hb-calendar__prev-btn:hover{color:var(--hb-color-primary)}.hb-calendar__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-calendar__weekday{color:var(--hb-color-text-placeholder,#c0c4cc);font-size:12px;font-weight:500;padding:4px 0;text-align:center}.hb-calendar__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-calendar__day{align-items:center;aspect-ratio:1;border-radius:4px;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:flex;font-size:13px;justify-content:center;transition:all .2s;-webkit-user-select:none;user-select:none}.hb-calendar__day:hover:not(.hb-calendar__day--other-month){background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-calendar__day--other-month{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:default}.hb-calendar__day--today{color:var(--hb-color-primary);font-weight:600}.hb-calendar__day--selected{color:var(--hb-color-white,#fff)}.hb-calendar__day--selected,.hb-calendar__day--selected:hover{background-color:var(--hb-color-primary)}.hb-calendar__day--focused{outline:2px solid var(--hb-color-primary,#1677ff);outline-offset:-2px}.hb-calendar__day--disabled{color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed;opacity:.5}.hb-calendar__day--disabled:hover{background-color:#0000}@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}';const c=d;const h=class{constructor(a){e(this,a);this.hbChange=t(this,"hbChange",7)}modelValue;firstDayOfWeek=0;disabledDate;hbChange;viewDate=new Date;selectedDate;focusDate=new Date;componentDidLoad(){this.initFromModelValue()}handleModelValueChange(){this.initFromModelValue()}initFromModelValue(){const e=i(this.modelValue);this.selectedDate=e;if(e){this.viewDate=new Date(e.getFullYear(),e.getMonth(),1);this.focusDate=new Date(e)}else{this.focusDate=new Date}}handleSelect=e=>{if(!e.isCurrentMonth)return;if(this.disabledDate&&this.disabledDate(e.date))return;this.selectedDate=e.date;this.focusDate=new Date(e.date);const t=this.toISODate(e.date);this.modelValue=t;this.hbChange.emit(t)};handleGridKeydown=e=>{const t=new Date(this.focusDate);switch(e.key){case"ArrowRight":t.setDate(t.getDate()+1);break;case"ArrowLeft":t.setDate(t.getDate()-1);break;case"ArrowDown":t.setDate(t.getDate()+7);break;case"ArrowUp":t.setDate(t.getDate()-7);break;case"Home":{const e=t.getDay();t.setDate(t.getDate()-e);break}case"End":{const e=6-t.getDay();t.setDate(t.getDate()+e);break}case"PageDown":t.setMonth(t.getMonth()+1);break;case"PageUp":t.setMonth(t.getMonth()-1);break;case"Enter":e.preventDefault();this.handleSelect({date:this.focusDate,isCurrentMonth:true});return;default:return}e.preventDefault();if(t.getMonth()!==this.viewDate.getMonth()||t.getFullYear()!==this.viewDate.getFullYear()){this.viewDate=new Date(t.getFullYear(),t.getMonth(),1)}this.focusDate=t};toISODate(e){const t=e.getFullYear();const a=String(e.getMonth()+1).padStart(2,"0");const i=String(e.getDate()).padStart(2,"0");return`${t}-${a}-${i}`}changeMonth(e){this.viewDate=o(this.viewDate,e)}get orderedWeekNames(){const e=(this.firstDayOfWeek%7+7)%7;return[...r.slice(e),...r.slice(0,e)]}render(){const e=n(this.viewDate,this.selectedDate,new Date,this.firstDayOfWeek);const t=this.viewDate;return a("div",{key:"93d05f6bffa7431d3e957d4e99113faeaa4c3314",class:"hb-calendar"},a("div",{key:"27d4364c5d5302a284fa14b9a72421548808cd1d",class:"hb-calendar__header"},a("button",{key:"0665e23eb52ceb41d89e79d3eea8f4de70085dd5",type:"button",class:"hb-calendar__prev-btn",onClick:()=>this.changeMonth(-1),"aria-label":"上一月"},"‹"),a("span",{key:"40620771f91edb847d4979d47a7bf35f6ccc3c8f",class:"hb-calendar__header-label","aria-live":"polite"},t.getFullYear(),"年 ",l[t.getMonth()]),a("button",{key:"0707cec8950af171a6eabe1bf8872e5b6681109a",type:"button",class:"hb-calendar__next-btn",onClick:()=>this.changeMonth(1),"aria-label":"下一月"},"›")),a("div",{key:"2637f3cbdf27e4a1883ec91421287129b16ed849",class:"hb-calendar__body",role:"grid","aria-label":`${t.getFullYear()}年${t.getMonth()+1}月日历`},a("div",{key:"19123fefb853bf7c3cd64a7f47159406a8e36806",class:"hb-calendar__weekdays",role:"row"},this.orderedWeekNames.map((e=>a("div",{class:"hb-calendar__weekday",role:"columnheader","aria-disabled":"true"},e)))),a("div",{key:"7eeee10f18915e83d3f9e7d5127768e6d67b5496",class:"hb-calendar__days",role:"row",onKeyDown:this.handleGridKeydown},e.map(((e,t)=>{const i=s(e.date,this.focusDate);const o=e.isCurrentMonth&&!!this.disabledDate&&this.disabledDate(e.date);return a("div",{key:t,class:{"hb-calendar__day":true,"hb-calendar__day--other-month":!e.isCurrentMonth,"hb-calendar__day--today":e.isToday,"hb-calendar__day--selected":e.isSelected,"hb-calendar__day--focused":i,"hb-calendar__day--disabled":o},role:"gridcell",tabindex:i?0:-1,"aria-selected":e.isSelected?"true":"false","aria-current":e.isToday?"date":undefined,"aria-disabled":!e.isCurrentMonth||o?"true":undefined,"aria-label":this.toISODate(e.date),onClick:()=>this.handleSelect(e)},e.date.getDate())})))))}static get watchers(){return{modelValue:["handleModelValueChange"]}}};h.style=c;export{h as hb_calendar};
2
+ //# sourceMappingURL=p-687d8dff.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["calendarCss","HbCalendarStyle0","Calendar","modelValue","firstDayOfWeek","disabledDate","hbChange","viewDate","Date","selectedDate","focusDate","componentDidLoad","this","initFromModelValue","handleModelValueChange","parsed","parseDate","getFullYear","getMonth","handleSelect","day","isCurrentMonth","date","iso","toISODate","emit","handleGridKeydown","e","next","key","setDate","getDate","d","getDay","setMonth","preventDefault","y","m","String","padStart","changeMonth","delta","addMonths","orderedWeekNames","offset","WEEK_DAY_NAMES","slice","render","days","getCalendarDays","current","h","class","type","onClick","MONTH_NAMES","role","map","onKeyDown","index","isFocused","isSameDay","dayDisabled","isToday","isSelected","tabindex","undefined"],"sources":["src/components/Calendar/calendar.css?tag=hb-calendar&encapsulation=shadow","src/components/Calendar/Calendar.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-calendar {\n width: 100%;\n padding: 12px;\n box-sizing: border-box;\n background-color: var(--hb-color-white, #ffffff);\n border-radius: 4px;\n}\n\n/* 头部:年月 + 上下月按钮 */\n.hb-calendar__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n}\n\n.hb-calendar__header-label {\n font-weight: 600;\n font-size: 14px;\n color: var(--hb-color-text-regular, #606266);\n}\n\n.hb-calendar__prev-btn,\n.hb-calendar__next-btn {\n background: none;\n border: none;\n font-size: 18px;\n cursor: pointer;\n color: var(--hb-color-text-regular, #606266);\n padding: 4px 8px;\n line-height: 1;\n transition: color 0.2s;\n}\n\n.hb-calendar__prev-btn:hover,\n.hb-calendar__next-btn:hover {\n color: var(--hb-color-primary);\n}\n\n/* 星期行 */\n.hb-calendar__weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n margin-bottom: 8px;\n}\n\n.hb-calendar__weekday {\n text-align: center;\n font-size: 12px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n font-weight: 500;\n padding: 4px 0;\n}\n\n/* 日期网格 */\n.hb-calendar__days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n}\n\n.hb-calendar__day {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n color: var(--hb-color-text-regular, #606266);\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s;\n user-select: none;\n}\n\n.hb-calendar__day:hover:not(.hb-calendar__day--other-month) {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n}\n\n.hb-calendar__day--other-month {\n color: var(--hb-color-text-placeholder, #c0c4cc);\n cursor: default;\n}\n\n.hb-calendar__day--today {\n color: var(--hb-color-primary);\n font-weight: 600;\n}\n\n.hb-calendar__day--selected {\n background-color: var(--hb-color-primary);\n color: var(--hb-color-white, #ffffff);\n}\n\n.hb-calendar__day--selected:hover {\n background-color: var(--hb-color-primary);\n}\n\n/* 键盘焦点日(roving tabindex 的可见焦点态) */\n.hb-calendar__day--focused {\n outline: 2px solid var(--hb-color-primary, #1677ff);\n outline-offset: -2px;\n}\n\n.hb-calendar__day--disabled {\n color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.hb-calendar__day--disabled:hover {\n background-color: transparent;\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Watch } from '@stencil/core';\nimport { getCalendarDays, parseDate, addMonths, isSameDay, MONTH_NAMES, WEEK_DAY_NAMES } from '../../utils/date-helpers';\n\n/**\n * Calendar 日历组件\n * 月份视图日历,支持选中日期与月份切换\n */\n@Component({\n tag: 'hb-calendar',\n styleUrl: 'calendar.css',\n shadow: true,\n})\nexport class Calendar {\n /**\n * 绑定值(ISO 日期字符串)\n */\n @Prop({ mutable: true }) modelValue?: string;\n\n /**\n * 每周第一天(0=周日,1=周一 …)\n * @default 0\n */\n @Prop() firstDayOfWeek: number = 0;\n\n /**\n * 禁用日期判定(声明预留,暂不强求实现)\n */\n @Prop() disabledDate?: (date: Date) => boolean;\n\n /**\n * 值改变事件,detail 为 ISO 日期字符串\n */\n @Event() hbChange: EventEmitter<string>;\n\n @State() viewDate: Date = new Date();\n @State() selectedDate?: Date;\n /** 键盘导航的焦点日期(用于 role=gridcell 的 roving tabindex) */\n @State() focusDate: Date = new Date();\n\n componentDidLoad() {\n this.initFromModelValue();\n }\n\n @Watch('modelValue')\n handleModelValueChange() {\n this.initFromModelValue();\n }\n\n private initFromModelValue() {\n const parsed = parseDate(this.modelValue);\n this.selectedDate = parsed;\n if (parsed) {\n this.viewDate = new Date(parsed.getFullYear(), parsed.getMonth(), 1);\n this.focusDate = new Date(parsed);\n } else {\n // 无选中值时焦点默认到今天\n this.focusDate = new Date();\n }\n }\n\n private handleSelect = (day: { date: Date; isCurrentMonth: boolean }) => {\n if (!day.isCurrentMonth) return;\n if (this.disabledDate && this.disabledDate(day.date)) return;\n this.selectedDate = day.date;\n this.focusDate = new Date(day.date);\n const iso = this.toISODate(day.date);\n this.modelValue = iso;\n this.hbChange.emit(iso);\n };\n\n /**\n * 日期网格键盘导航(对齐 WAI-ARIA grid / antd Calendar):\n * - ArrowRight/Left:±1 天\n * - ArrowDown/Up:±7 天\n * - Home/End:当周首/末日\n * - PageDown/Up:±1 月\n * - Enter:选中焦点日\n * 焦点日跨月时同步滚动 viewDate。\n */\n private handleGridKeydown = (e: KeyboardEvent) => {\n const next = new Date(this.focusDate);\n let monthDelta = 0;\n switch (e.key) {\n case 'ArrowRight':\n next.setDate(next.getDate() + 1);\n break;\n case 'ArrowLeft':\n next.setDate(next.getDate() - 1);\n break;\n case 'ArrowDown':\n next.setDate(next.getDate() + 7);\n break;\n case 'ArrowUp':\n next.setDate(next.getDate() - 7);\n break;\n case 'Home': {\n const d = next.getDay();\n next.setDate(next.getDate() - d);\n break;\n }\n case 'End': {\n const d = 6 - next.getDay();\n next.setDate(next.getDate() + d);\n break;\n }\n case 'PageDown':\n next.setMonth(next.getMonth() + 1);\n monthDelta = 1;\n break;\n case 'PageUp':\n next.setMonth(next.getMonth() - 1);\n monthDelta = -1;\n break;\n case 'Enter':\n e.preventDefault();\n this.handleSelect({ date: this.focusDate, isCurrentMonth: true });\n return;\n default:\n return;\n }\n e.preventDefault();\n // 焦点跨月:viewDate 跟随(PageUp/Down 或方向键滑出)\n if (next.getMonth() !== this.viewDate.getMonth() || next.getFullYear() !== this.viewDate.getFullYear()) {\n this.viewDate = new Date(next.getFullYear(), next.getMonth(), 1);\n }\n if (monthDelta) void monthDelta;\n this.focusDate = next;\n };\n\n private toISODate(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, '0');\n const d = String(date.getDate()).padStart(2, '0');\n return `${y}-${m}-${d}`;\n }\n\n private changeMonth(delta: number) {\n this.viewDate = addMonths(this.viewDate, delta);\n }\n\n /** 按 firstDayOfWeek 重排星期标题;getCalendarDays 也按同一 firstDayOfWeek 对齐网格 */\n private get orderedWeekNames(): string[] {\n const offset = ((this.firstDayOfWeek % 7) + 7) % 7;\n return [...WEEK_DAY_NAMES.slice(offset), ...WEEK_DAY_NAMES.slice(0, offset)];\n }\n\n render() {\n const days = getCalendarDays(this.viewDate, this.selectedDate, new Date(), this.firstDayOfWeek);\n const current = this.viewDate;\n\n return (\n <div class=\"hb-calendar\">\n <div class=\"hb-calendar__header\">\n <button type=\"button\" class=\"hb-calendar__prev-btn\" onClick={() => this.changeMonth(-1)} aria-label=\"上一月\">\n ‹\n </button>\n <span class=\"hb-calendar__header-label\" aria-live=\"polite\">\n {current.getFullYear()}年 {MONTH_NAMES[current.getMonth()]}\n </span>\n <button type=\"button\" class=\"hb-calendar__next-btn\" onClick={() => this.changeMonth(1)} aria-label=\"下一月\">\n ›\n </button>\n </div>\n <div class=\"hb-calendar__body\" role=\"grid\" aria-label={`${current.getFullYear()}年${current.getMonth() + 1}月日历`}>\n <div class=\"hb-calendar__weekdays\" role=\"row\">\n {this.orderedWeekNames.map(day => (\n <div class=\"hb-calendar__weekday\" role=\"columnheader\" aria-disabled=\"true\">\n {day}\n </div>\n ))}\n </div>\n <div class=\"hb-calendar__days\" role=\"row\" onKeyDown={this.handleGridKeydown}>\n {days.map((day, index) => {\n const isFocused = isSameDay(day.date, this.focusDate);\n const dayDisabled = day.isCurrentMonth && !!this.disabledDate && this.disabledDate(day.date);\n return (\n <div\n key={index}\n class={{\n 'hb-calendar__day': true,\n 'hb-calendar__day--other-month': !day.isCurrentMonth,\n 'hb-calendar__day--today': day.isToday,\n 'hb-calendar__day--selected': day.isSelected,\n 'hb-calendar__day--focused': isFocused,\n 'hb-calendar__day--disabled': dayDisabled,\n }}\n role=\"gridcell\"\n tabindex={isFocused ? 0 : -1}\n aria-selected={day.isSelected ? 'true' : 'false'}\n aria-current={day.isToday ? 'date' : undefined}\n aria-disabled={!day.isCurrentMonth || dayDisabled ? 'true' : undefined}\n aria-label={this.toISODate(day.date)}\n onClick={() => this.handleSelect(day)}\n >\n {day.date.getDate()}\n </div>\n );\n })}\n </div>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as o}from"./p-e42dfa95.js";import{a}from"./p-00aa34c8.js";const r='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:inline-block}.hb-tag{border:1px solid #0000;border-radius:var(--hb-tag-radius);box-sizing:border-box;font-size:var(--hb-font-size-xs);gap:var(--hb-spacing-xxs);height:22px;line-height:1;padding:0 var(--hb-spacing-xs);vertical-align:middle;white-space:nowrap}.hb-tag,.hb-tag__close,.hb-tag__content{align-items:center;display:inline-flex}.hb-tag__close{border-radius:50%;cursor:pointer;font-size:12px;height:14px;justify-content:center;line-height:1;transition:background-color var(--hb-transition-duration);width:14px}.hb-tag__close:hover{background-color:#0000001a}.hb-tag--small{font-size:11px;height:18px;padding:0 6px}.hb-tag--large{font-size:var(--hb-font-size-sm);height:28px;padding:0 var(--hb-spacing-sm)}.hb-tag--round{border-radius:999px}.hb-tag--default.hb-tag--light{background:var(--hb-tag-default-bg);color:var(--hb-tag-default-color)}.hb-tag--primary.hb-tag--light{background:var(--hb-tag-primary-bg);color:var(--hb-tag-primary-color)}.hb-tag--success.hb-tag--light{background:var(--hb-tag-success-bg);color:var(--hb-tag-success-color)}.hb-tag--warning.hb-tag--light{background:var(--hb-tag-warning-bg);color:var(--hb-tag-warning-color)}.hb-tag--danger.hb-tag--light{background:var(--hb-tag-danger-bg);color:var(--hb-tag-danger-color)}.hb-tag--info.hb-tag--light{background:var(--hb-tag-primary-bg);color:var(--hb-tag-primary-color)}.hb-tag--default.hb-tag--dark{background:var(--hb-color-text-quaternary);color:#fff}.hb-tag--primary.hb-tag--dark{background:var(--hb-color-primary);color:#fff}.hb-tag--success.hb-tag--dark{background:var(--hb-color-success);color:#fff}.hb-tag--warning.hb-tag--dark{background:var(--hb-color-warning);color:#fff}.hb-tag--danger.hb-tag--dark{background:var(--hb-color-danger);color:#fff}.hb-tag--info.hb-tag--dark{background:var(--hb-color-info);color:#fff}.hb-tag--default.hb-tag--plain{background:#fff;border-color:var(--hb-color-border);color:var(--hb-color-text)}.hb-tag--primary.hb-tag--plain{background:#fff;border-color:var(--hb-color-primary-border);color:var(--hb-color-primary)}.hb-tag--success.hb-tag--plain{background:#fff;border-color:var(--hb-color-success-border);color:var(--hb-color-success)}.hb-tag--warning.hb-tag--plain{background:#fff;border-color:var(--hb-color-warning-border);color:var(--hb-color-warning)}.hb-tag--danger.hb-tag--plain{background:#fff;border-color:var(--hb-color-danger-border);color:var(--hb-color-danger)}.hb-tag--info.hb-tag--plain{background:#fff;border-color:var(--hb-color-primary-border);color:var(--hb-color-primary)}@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}';const i=r;const n=class{constructor(o){t(this,o);this.hbClose=e(this,"hbClose",7)}type="default";closable=false;effect="light";round=false;size="default";hbClose;handleClose=t=>{t.stopPropagation();this.hbClose.emit()};render(){return o("span",{key:"cbb47210448d6131ab9c5a214aff96bb5d15fbd3",class:{"hb-tag":true,[`hb-tag--${this.type}`]:true,[`hb-tag--${this.effect}`]:true,"hb-tag--round":this.round,[`hb-tag--${this.size}`]:true}},o("span",{key:"25343f0399c94c25bfd7e567346a47305c7ed879",class:"hb-tag__content"},o("slot",{key:"74f43e4cf97f89f379809d14392122f9c0aa784c"})),this.closable&&o("span",{key:"4b5172b9f4446f99e542f87f071ac17412ffd93f",class:"hb-tag__close",role:"button","aria-label":"移除标签",tabIndex:0,onClick:this.handleClose,onKeyDown:a},"×"))}};n.style=i;export{n as hb_tag};
2
+ //# sourceMappingURL=p-688460ce.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["tagCss","HbTagStyle0","Tag","type","closable","effect","round","size","hbClose","handleClose","e","stopPropagation","this","emit","render","h","key","class","role","tabIndex","onClick","onKeyDown","activationClickHandler"],"sources":["src/components/Tag/tag.css?tag=hb-tag&encapsulation=shadow","src/components/Tag/Tag.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.hb-tag {\n display: inline-flex;\n align-items: center;\n gap: var(--hb-spacing-xxs);\n padding: 0 var(--hb-spacing-xs);\n height: 22px;\n font-size: var(--hb-font-size-xs);\n line-height: 1;\n border-radius: var(--hb-tag-radius);\n border: 1px solid transparent;\n box-sizing: border-box;\n white-space: nowrap;\n vertical-align: middle;\n}\n\n.hb-tag__content {\n display: inline-flex;\n align-items: center;\n}\n\n.hb-tag__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n cursor: pointer;\n font-size: 12px;\n line-height: 1;\n transition: background-color var(--hb-transition-duration);\n}\n\n.hb-tag__close:hover {\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n/* ---- 尺寸 ---- */\n.hb-tag--small { height: 18px; font-size: 11px; padding: 0 6px; }\n.hb-tag--large { height: 28px; font-size: var(--hb-font-size-sm); padding: 0 var(--hb-spacing-sm); }\n\n/* ---- 圆角 ---- */\n.hb-tag--round { border-radius: 999px; }\n\n/* ---- 类型:light(默认) ---- */\n.hb-tag--default.hb-tag--light { background: var(--hb-tag-default-bg); color: var(--hb-tag-default-color); }\n.hb-tag--primary.hb-tag--light { background: var(--hb-tag-primary-bg); color: var(--hb-tag-primary-color); }\n.hb-tag--success.hb-tag--light { background: var(--hb-tag-success-bg); color: var(--hb-tag-success-color); }\n.hb-tag--warning.hb-tag--light { background: var(--hb-tag-warning-bg); color: var(--hb-tag-warning-color); }\n.hb-tag--danger.hb-tag--light { background: var(--hb-tag-danger-bg); color: var(--hb-tag-danger-color); }\n.hb-tag--info.hb-tag--light { background: var(--hb-tag-primary-bg); color: var(--hb-tag-primary-color); }\n\n/* ---- 类型:dark ---- */\n.hb-tag--default.hb-tag--dark { background: var(--hb-color-text-quaternary); color: #fff; }\n.hb-tag--primary.hb-tag--dark { background: var(--hb-color-primary); color: #fff; }\n.hb-tag--success.hb-tag--dark { background: var(--hb-color-success); color: #fff; }\n.hb-tag--warning.hb-tag--dark { background: var(--hb-color-warning); color: #fff; }\n.hb-tag--danger.hb-tag--dark { background: var(--hb-color-danger); color: #fff; }\n.hb-tag--info.hb-tag--dark { background: var(--hb-color-info); color: #fff; }\n\n/* ---- 类型:plain ---- */\n.hb-tag--default.hb-tag--plain { background: #fff; color: var(--hb-color-text); border-color: var(--hb-color-border); }\n.hb-tag--primary.hb-tag--plain { background: #fff; color: var(--hb-color-primary); border-color: var(--hb-color-primary-border); }\n.hb-tag--success.hb-tag--plain { background: #fff; color: var(--hb-color-success); border-color: var(--hb-color-success-border); }\n.hb-tag--warning.hb-tag--plain { background: #fff; color: var(--hb-color-warning); border-color: var(--hb-color-warning-border); }\n.hb-tag--danger.hb-tag--plain { background: #fff; color: var(--hb-color-danger); border-color: var(--hb-color-danger-border); }\n.hb-tag--info.hb-tag--plain { background: #fff; color: var(--hb-color-primary); border-color: var(--hb-color-primary-border); }\n","import { Component, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport { activationClickHandler } from '../../utils/a11y';\n\n/**\n * Tag 标签组件\n * 用于标记和选择\n */\n@Component({\n tag: 'hb-tag',\n styleUrl: 'tag.css',\n shadow: true,\n})\nexport class Tag {\n /** 标签类型 */\n @Prop() type: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default' = 'default';\n\n /** 是否可关闭 */\n @Prop() closable: boolean = false;\n\n /** 主题效果 */\n @Prop() effect: 'dark' | 'light' | 'plain' = 'light';\n\n /** 是否圆角 */\n @Prop() round: boolean = false;\n\n /** 标签尺寸 */\n @Prop() size: 'small' | 'default' | 'large' = 'default';\n\n /** 关闭事件 */\n @Event() hbClose: EventEmitter<void>;\n\n private handleClose = (e: Event) => {\n e.stopPropagation();\n this.hbClose.emit();\n };\n\n render() {\n return (\n <span\n class={{\n 'hb-tag': true,\n [`hb-tag--${this.type}`]: true,\n [`hb-tag--${this.effect}`]: true,\n 'hb-tag--round': this.round,\n [`hb-tag--${this.size}`]: true,\n }}\n >\n <span class=\"hb-tag__content\">\n <slot />\n </span>\n {this.closable && (\n <span class=\"hb-tag__close\" role=\"button\" aria-label=\"移除标签\" tabIndex={0} onClick={this.handleClose} onKeyDown={activationClickHandler}>\n ×\n </span>\n )}\n </span>\n );\n }\n}\n"],"mappings":"iFAAA,MAAMA,EAAS,yhQACf,MAAAC,EAAeD,E,MCWFE,EAAG,M,0DAENC,KAA0E,UAG1EC,SAAoB,MAGpBC,OAAqC,QAGrCC,MAAiB,MAGjBC,KAAsC,UAGrCC,QAEDC,YAAeC,IACrBA,EAAEC,kBACFC,KAAKJ,QAAQK,MAAM,EAGrB,MAAAC,GACE,OACEC,EAAA,QAAAC,IAAA,2CACEC,MAAO,CACL,SAAU,KACV,CAAC,WAAWL,KAAKT,QAAS,KAC1B,CAAC,WAAWS,KAAKP,UAAW,KAC5B,gBAAiBO,KAAKN,MACtB,CAAC,WAAWM,KAAKL,QAAS,OAG5BQ,EAAA,QAAAC,IAAA,2CAAMC,MAAM,mBACVF,EAAA,QAAAC,IAAA,8CAEDJ,KAAKR,UACJW,EAAA,QAAAC,IAAA,2CAAMC,MAAM,gBAAgBC,KAAK,SAAQ,aAAY,OAAOC,SAAU,EAAGC,QAASR,KAAKH,YAAaY,UAAWC,GAAsB,K","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as e,g as t,h as i}from"./p-e42dfa95.js";import{c as o,g as a}from"./p-ecce2b5e.js";import{i as r}from"./p-00aa34c8.js";import{c as n}from"./p-fad66d69.js";const s='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;.hb-popover__trigger,:host{display:inline-block}.hb-popover__popup{animation:hb-popover-fade .15s ease-out;background:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);padding:var(--hb-spacing-sm)0;pointer-events:auto;position:fixed}.hb-popover__title{border-bottom:1px solid var(--hb-color-border-secondary);font-size:var(--hb-font-size-sm);font-weight:600;padding:var(--hb-spacing-xs)var(--hb-spacing-md)}.hb-popover__body{color:var(--hb-color-text);font-size:var(--hb-font-size-sm);padding:var(--hb-spacing-sm)var(--hb-spacing-md)}@keyframes hb-popover-fade{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.hb-popover__popup--leaving{animation:hb-popover-fade-out .15s ease-in forwards}@keyframes hb-popover-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.98)}}@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}';const l=s;const d=class{constructor(t){e(this,t)}get el(){return t(this)}title="";width="240px";placement="bottom";trigger="hover";disabled=false;visible=false;leaving=false;popupStyle={};triggerRef;popupRef;leave=n((()=>this.leaving),(e=>this.leaving=e),150);show=()=>{if(!this.disabled){this.leave.cancel();this.visible=true;requestAnimationFrame((()=>this.updatePosition()))}};hide=()=>{this.visible=false;this.leave.start()};toggle=()=>{if(this.visible){this.hide()}else{this.show()}};disconnectedCallback(){this.leave.dispose()}handleKeydown=e=>{if(this.disabled)return;if(e.key==="Escape"&&(this.visible||this.leaving)){e.preventDefault();this.hide();return}if(this.trigger==="click"&&r(e.key)){e.preventDefault();this.toggle()}};updatePosition(){if(!this.triggerRef||!this.popupRef)return;const e=this.triggerRef.getBoundingClientRect();const{width:t,height:i}=this.popupRef.getBoundingClientRect();const r=o(e,t,i,this.placement,8);this.popupStyle={top:`${r.top}px`,left:`${r.left}px`,zIndex:String(a())}}get shouldRender(){return this.visible||this.leaving}render(){const e=this.trigger==="hover"?{onMouseEnter:this.show,onMouseLeave:this.hide}:{onClick:this.toggle};return i("div",{key:"e9007c4ef9ebb2286c0b6fa5673137b14be6db86",class:"hb-popover",...e,onKeyDown:this.handleKeydown},i("div",{key:"6b7eac4394ed810048ef73c3ab818f6129e5e6d0",ref:e=>{this.triggerRef=e},class:"hb-popover__trigger",role:"button",tabindex:this.disabled?-1:0,"aria-haspopup":"dialog","aria-expanded":this.visible?"true":"false","aria-disabled":this.disabled?"true":"false",onFocus:this.trigger==="hover"?this.show:undefined,onBlur:this.trigger==="hover"?this.hide:undefined},i("slot",{key:"5c0786412affbc4fd67471503b5fdd034f1d90ea"})),this.shouldRender&&i("div",{key:"f1c0edf1cdbc1af5b838c08717305dbf28e31b0e",ref:e=>{this.popupRef=e},class:{"hb-popover__popup":true,"hb-popover__popup--leaving":this.leaving},style:{...this.popupStyle,width:this.width},role:"dialog","aria-labelledby":this.title?"hb-popover__title":undefined,onMouseEnter:()=>this.trigger==="hover"&&this.show(),onMouseLeave:()=>this.trigger==="hover"&&this.hide()},this.title&&i("div",{key:"d23367facd21d47a512bc791193d44b35a8c7025",id:"hb-popover__title",class:"hb-popover__title"},this.title),i("div",{key:"491a6babd5fef0ac9013e999a8a449e1216e9f00",class:"hb-popover__body"},i("slot",{key:"15a925de9bb5c0e4f3c66f466ef2e744d7563a50",name:"content"}))))}};d.style=l;export{d as hb_popover};
2
+ //# sourceMappingURL=p-69bb1dd9.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["popoverCss","HbPopoverStyle0","Popover","title","width","placement","trigger","disabled","visible","leaving","popupStyle","triggerRef","popupRef","leave","createLeaveScheduler","this","v","show","cancel","requestAnimationFrame","updatePosition","hide","start","toggle","disconnectedCallback","dispose","handleKeydown","e","key","preventDefault","isActivationKey","rect","getBoundingClientRect","pw","height","ph","pos","computePosition","top","left","zIndex","String","getNextZIndex","shouldRender","render","events","onMouseEnter","onMouseLeave","onClick","h","class","onKeyDown","ref","el","role","tabindex","onFocus","undefined","onBlur","style","id","name"],"sources":["src/components/Popover/popover.css?tag=hb-popover&encapsulation=shadow","src/components/Popover/Popover.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n.hb-popover__trigger {\n display: inline-block;\n}\n.hb-popover__popup {\n position: fixed;\n background: var(--hb-color-bg-elevated);\n border-radius: var(--hb-border-radius-base);\n box-shadow: var(--hb-box-shadow);\n padding: var(--hb-spacing-sm) 0;\n animation: hb-popover-fade 0.15s ease-out;\n pointer-events: auto;\n}\n.hb-popover__title {\n padding: var(--hb-spacing-xs) var(--hb-spacing-md);\n font-weight: 600;\n font-size: var(--hb-font-size-sm);\n border-bottom: 1px solid var(--hb-color-border-secondary);\n}\n.hb-popover__body {\n padding: var(--hb-spacing-sm) var(--hb-spacing-md);\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n}\n@keyframes hb-popover-fade {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n/* 离场动画:播完后由 shouldRender=false 卸载 */\n.hb-popover__popup--leaving {\n animation: hb-popover-fade-out 0.15s ease-in forwards;\n}\n@keyframes hb-popover-fade-out {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.98);\n }\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\nimport { computePosition, getNextZIndex, Placement } from '../../utils/popup-manager';\nimport { isActivationKey } from '../../utils/a11y';\nimport { createLeaveScheduler } from '../../utils/transition';\n\n/**\n * Popover 气泡卡片\n * 无障碍(对齐 antd / WAI-ARIA):\n * - 触发器 role=button + aria-haspopup=dialog + aria-expanded\n * - 浮层 role=dialog + aria-labelledby(title)\n * - 键盘:trigger 上 Enter/Space 打开/关闭;Esc 关闭\n *\n * 进出场动画:用 leaving state 延迟卸载,让 fade-out 有机会播放。\n */\n@Component({ tag: 'hb-popover', styleUrl: 'popover.css', shadow: true })\nexport class Popover {\n @Element() el: HTMLElement;\n @Prop() title: string = '';\n @Prop() width: string = '240px';\n @Prop() placement: Placement = 'bottom';\n @Prop() trigger: 'hover' | 'click' = 'hover';\n @Prop() disabled: boolean = false;\n @State() visible: boolean = false;\n @State() leaving: boolean = false;\n @State() popupStyle: Record<string, string> = {};\n\n private triggerRef?: HTMLElement;\n private popupRef?: HTMLDivElement;\n private leave = createLeaveScheduler(\n () => this.leaving,\n v => (this.leaving = v),\n 150,\n );\n\n private show = () => {\n if (!this.disabled) {\n this.leave.cancel();\n this.visible = true;\n requestAnimationFrame(() => this.updatePosition());\n }\n };\n private hide = () => {\n this.visible = false;\n this.leave.start();\n };\n private toggle = () => {\n if (this.visible) {\n this.hide();\n } else {\n this.show();\n }\n };\n\n disconnectedCallback() {\n this.leave.dispose();\n }\n\n private handleKeydown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n if (e.key === 'Escape' && (this.visible || this.leaving)) {\n e.preventDefault();\n this.hide();\n return;\n }\n if (this.trigger === 'click' && isActivationKey(e.key)) {\n e.preventDefault();\n this.toggle();\n }\n };\n\n private updatePosition() {\n if (!this.triggerRef || !this.popupRef) return;\n const rect = this.triggerRef.getBoundingClientRect();\n const { width: pw, height: ph } = this.popupRef.getBoundingClientRect();\n const pos = computePosition(rect, pw, ph, this.placement, 8);\n this.popupStyle = { top: `${pos.top}px`, left: `${pos.left}px`, zIndex: String(getNextZIndex()) };\n }\n\n private get shouldRender(): boolean {\n return this.visible || this.leaving;\n }\n\n render() {\n const events = this.trigger === 'hover' ? { onMouseEnter: this.show, onMouseLeave: this.hide } : { onClick: this.toggle };\n\n return (\n <div class=\"hb-popover\" {...events} onKeyDown={this.handleKeydown}>\n <div\n ref={(el: any) => {\n this.triggerRef = el;\n }}\n class=\"hb-popover__trigger\"\n role=\"button\"\n tabindex={this.disabled ? -1 : 0}\n aria-haspopup=\"dialog\"\n aria-expanded={this.visible ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onFocus={this.trigger === 'hover' ? this.show : undefined}\n onBlur={this.trigger === 'hover' ? this.hide : undefined}\n >\n <slot />\n </div>\n {this.shouldRender && (\n <div\n ref={(el: any) => {\n this.popupRef = el;\n }}\n class={{\n 'hb-popover__popup': true,\n 'hb-popover__popup--leaving': this.leaving,\n }}\n style={{ ...this.popupStyle, width: this.width }}\n role=\"dialog\"\n aria-labelledby={this.title ? 'hb-popover__title' : undefined}\n onMouseEnter={() => this.trigger === 'hover' && this.show()}\n onMouseLeave={() => this.trigger === 'hover' && this.hide()}\n >\n {this.title && (\n <div id=\"hb-popover__title\" class=\"hb-popover__title\">\n {this.title}\n </div>\n )}\n <div class=\"hb-popover__body\">\n <slot name=\"content\" />\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"mappings":"qKAAA,MAAMA,EAAa,i7MACnB,MAAAC,EAAeD,E,MCcFE,EAAO,M,iDAEVC,MAAgB,GAChBC,MAAgB,QAChBC,UAAuB,SACvBC,QAA6B,QAC7BC,SAAoB,MACnBC,QAAmB,MACnBC,QAAmB,MACnBC,WAAqC,GAEtCC,WACAC,SACAC,MAAQC,GACd,IAAMC,KAAKN,UACXO,GAAMD,KAAKN,QAAUO,GACrB,KAGMC,KAAO,KACb,IAAKF,KAAKR,SAAU,CAClBQ,KAAKF,MAAMK,SACXH,KAAKP,QAAU,KACfW,uBAAsB,IAAMJ,KAAKK,kB,GAG7BC,KAAO,KACbN,KAAKP,QAAU,MACfO,KAAKF,MAAMS,OAAO,EAEZC,OAAS,KACf,GAAIR,KAAKP,QAAS,CAChBO,KAAKM,M,KACA,CACLN,KAAKE,M,GAIT,oBAAAO,GACET,KAAKF,MAAMY,S,CAGLC,cAAiBC,IACvB,GAAIZ,KAAKR,SAAU,OACnB,GAAIoB,EAAEC,MAAQ,WAAab,KAAKP,SAAWO,KAAKN,SAAU,CACxDkB,EAAEE,iBACFd,KAAKM,OACL,M,CAEF,GAAIN,KAAKT,UAAY,SAAWwB,EAAgBH,EAAEC,KAAM,CACtDD,EAAEE,iBACFd,KAAKQ,Q,GAID,cAAAH,GACN,IAAKL,KAAKJ,aAAeI,KAAKH,SAAU,OACxC,MAAMmB,EAAOhB,KAAKJ,WAAWqB,wBAC7B,MAAQ5B,MAAO6B,EAAIC,OAAQC,GAAOpB,KAAKH,SAASoB,wBAChD,MAAMI,EAAMC,EAAgBN,EAAME,EAAIE,EAAIpB,KAAKV,UAAW,GAC1DU,KAAKL,WAAa,CAAE4B,IAAK,GAAGF,EAAIE,QAASC,KAAM,GAAGH,EAAIG,SAAUC,OAAQC,OAAOC,K,CAGjF,gBAAYC,GACV,OAAO5B,KAAKP,SAAWO,KAAKN,O,CAG9B,MAAAmC,GACE,MAAMC,EAAS9B,KAAKT,UAAY,QAAU,CAAEwC,aAAc/B,KAAKE,KAAM8B,aAAchC,KAAKM,MAAS,CAAE2B,QAASjC,KAAKQ,QAEjH,OACE0B,EAAA,OAAArB,IAAA,2CAAKsB,MAAM,gBAAiBL,EAAQM,UAAWpC,KAAKW,eAClDuB,EAAA,OAAArB,IAAA,2CACEwB,IAAMC,IACJtC,KAAKJ,WAAa0C,CAAE,EAEtBH,MAAM,sBACNI,KAAK,SACLC,SAAUxC,KAAKR,UAAY,EAAI,EAAC,gBAClB,SAAQ,gBACPQ,KAAKP,QAAU,OAAS,QAAO,gBAC/BO,KAAKR,SAAW,OAAS,QACxCiD,QAASzC,KAAKT,UAAY,QAAUS,KAAKE,KAAOwC,UAChDC,OAAQ3C,KAAKT,UAAY,QAAUS,KAAKM,KAAOoC,WAE/CR,EAAA,QAAArB,IAAA,8CAEDb,KAAK4B,cACJM,EAAA,OAAArB,IAAA,2CACEwB,IAAMC,IACJtC,KAAKH,SAAWyC,CAAE,EAEpBH,MAAO,CACL,oBAAqB,KACrB,6BAA8BnC,KAAKN,SAErCkD,MAAO,IAAK5C,KAAKL,WAAYN,MAAOW,KAAKX,OACzCkD,KAAK,SAAQ,kBACIvC,KAAKZ,MAAQ,oBAAsBsD,UACpDX,aAAc,IAAM/B,KAAKT,UAAY,SAAWS,KAAKE,OACrD8B,aAAc,IAAMhC,KAAKT,UAAY,SAAWS,KAAKM,QAEpDN,KAAKZ,OACJ8C,EAAA,OAAArB,IAAA,2CAAKgC,GAAG,oBAAoBV,MAAM,qBAC/BnC,KAAKZ,OAGV8C,EAAA,OAAArB,IAAA,2CAAKsB,MAAM,oBACTD,EAAA,QAAArB,IAAA,2CAAMiC,KAAK,c","ignoreList":[]}