huibo-ui 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (661) hide show
  1. package/dist/cjs/{a11y-802de67a.js → a11y-4385c871.js} +17 -2
  2. package/dist/cjs/a11y-4385c871.js.map +1 -0
  3. package/dist/cjs/{date-helpers-1ffddc59.js → date-helpers-c05ef385.js} +5 -16
  4. package/dist/cjs/date-helpers-c05ef385.js.map +1 -0
  5. package/dist/cjs/hb-alert.cjs.entry.js +2 -1
  6. package/dist/cjs/hb-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/hb-calendar.cjs.entry.js +2 -2
  8. package/dist/cjs/hb-calendar.cjs.entry.js.map +1 -1
  9. package/dist/cjs/hb-cascader.cjs.entry.js +48 -12
  10. package/dist/cjs/hb-cascader.cjs.entry.js.map +1 -1
  11. package/dist/cjs/hb-checkbox-group.cjs.entry.js +12 -8
  12. package/dist/cjs/hb-checkbox-group.cjs.entry.js.map +1 -1
  13. package/dist/cjs/hb-checkbox.cjs.entry.js +9 -4
  14. package/dist/cjs/hb-checkbox.cjs.entry.js.map +1 -1
  15. package/dist/cjs/hb-collapse-item.cjs.entry.js +13 -4
  16. package/dist/cjs/hb-collapse-item.cjs.entry.js.map +1 -1
  17. package/dist/cjs/hb-collapse.cjs.entry.js +20 -15
  18. package/dist/cjs/hb-collapse.cjs.entry.js.map +1 -1
  19. package/dist/cjs/hb-color-picker.cjs.entry.js +22 -19
  20. package/dist/cjs/hb-color-picker.cjs.entry.js.map +1 -1
  21. package/dist/cjs/hb-date-picker-pane.cjs.entry.js +1 -1
  22. package/dist/cjs/hb-date-picker.cjs.entry.js +13 -10
  23. package/dist/cjs/hb-date-picker.cjs.entry.js.map +1 -1
  24. package/dist/cjs/hb-date-range-picker.cjs.entry.js +1 -1
  25. package/dist/cjs/hb-date-time-picker.cjs.entry.js +1 -1
  26. package/dist/cjs/hb-descriptions.cjs.entry.js.map +1 -1
  27. package/dist/cjs/hb-dialog.cjs.entry.js +51 -12
  28. package/dist/cjs/hb-dialog.cjs.entry.js.map +1 -1
  29. package/dist/cjs/hb-drawer.cjs.entry.js +34 -4
  30. package/dist/cjs/hb-drawer.cjs.entry.js.map +1 -1
  31. package/dist/cjs/hb-dropdown.cjs.entry.js +27 -15
  32. package/dist/cjs/hb-dropdown.cjs.entry.js.map +1 -1
  33. package/dist/cjs/hb-empty.cjs.entry.js +1 -1
  34. package/dist/cjs/hb-float-button.cjs.entry.js +2 -2
  35. package/dist/cjs/hb-form-item.cjs.entry.js +67 -16
  36. package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
  37. package/dist/cjs/hb-form.cjs.entry.js +115 -7
  38. package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
  39. package/dist/cjs/hb-image-preview.cjs.entry.js +1 -1
  40. package/dist/cjs/hb-image-preview.cjs.entry.js.map +1 -1
  41. package/dist/cjs/hb-image.cjs.entry.js +21 -3
  42. package/dist/cjs/hb-image.cjs.entry.js.map +1 -1
  43. package/dist/cjs/hb-input-number.cjs.entry.js +7 -7
  44. package/dist/cjs/hb-input-number.cjs.entry.js.map +1 -1
  45. package/dist/cjs/hb-input-tag.cjs.entry.js +2 -2
  46. package/dist/cjs/hb-input.cjs.entry.js +3 -2
  47. package/dist/cjs/hb-input.cjs.entry.js.map +1 -1
  48. package/dist/cjs/hb-layout.cjs.entry.js.map +1 -1
  49. package/dist/cjs/hb-link.cjs.entry.js +2 -2
  50. package/dist/cjs/hb-loading.cjs.entry.js +2 -2
  51. package/dist/cjs/hb-menu-item.cjs.entry.js +14 -5
  52. package/dist/cjs/hb-menu-item.cjs.entry.js.map +1 -1
  53. package/dist/cjs/hb-menu.cjs.entry.js +2 -2
  54. package/dist/cjs/hb-message.cjs.entry.js +13 -4
  55. package/dist/cjs/hb-message.cjs.entry.js.map +1 -1
  56. package/dist/cjs/hb-page-header.cjs.entry.js +1 -1
  57. package/dist/cjs/hb-pagination.cjs.entry.js +8 -5
  58. package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
  59. package/dist/cjs/hb-popconfirm.cjs.entry.js +27 -8
  60. package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
  61. package/dist/cjs/hb-popover.cjs.entry.js +26 -14
  62. package/dist/cjs/hb-popover.cjs.entry.js.map +1 -1
  63. package/dist/cjs/hb-progress.cjs.entry.js +1 -1
  64. package/dist/cjs/hb-radio.cjs.entry.js +8 -3
  65. package/dist/cjs/hb-radio.cjs.entry.js.map +1 -1
  66. package/dist/cjs/hb-rate.cjs.entry.js +3 -3
  67. package/dist/cjs/hb-rate.cjs.entry.js.map +1 -1
  68. package/dist/cjs/hb-row.cjs.entry.js +2 -2
  69. package/dist/cjs/hb-scrollbar.cjs.entry.js +5 -5
  70. package/dist/cjs/hb-scrollbar.cjs.entry.js.map +1 -1
  71. package/dist/cjs/hb-segmented.cjs.entry.js +13 -2
  72. package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
  73. package/dist/cjs/hb-select.cjs.entry.js +100 -19
  74. package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
  75. package/dist/cjs/hb-slider.cjs.entry.js +6 -12
  76. package/dist/cjs/hb-slider.cjs.entry.js.map +1 -1
  77. package/dist/cjs/hb-space.cjs.entry.js +2 -2
  78. package/dist/cjs/hb-statistic.cjs.entry.js +1 -1
  79. package/dist/cjs/hb-step.cjs.entry.js +1 -1
  80. package/dist/cjs/hb-steps.cjs.entry.js +3 -3
  81. package/dist/cjs/hb-steps.cjs.entry.js.map +1 -1
  82. package/dist/cjs/hb-sub-menu.cjs.entry.js +5 -5
  83. package/dist/cjs/hb-switch.cjs.entry.js +3 -3
  84. package/dist/cjs/hb-switch.cjs.entry.js.map +1 -1
  85. package/dist/cjs/hb-tab-pane.cjs.entry.js +1 -1
  86. package/dist/cjs/hb-table.cjs.entry.js +218 -41
  87. package/dist/cjs/hb-table.cjs.entry.js.map +1 -1
  88. package/dist/cjs/hb-tabs.cjs.entry.js +31 -10
  89. package/dist/cjs/hb-tabs.cjs.entry.js.map +1 -1
  90. package/dist/cjs/hb-tag.cjs.entry.js +3 -2
  91. package/dist/cjs/hb-tag.cjs.entry.js.map +1 -1
  92. package/dist/cjs/hb-text.cjs.entry.js +2 -2
  93. package/dist/cjs/hb-time-picker.cjs.entry.js +14 -9
  94. package/dist/cjs/hb-time-picker.cjs.entry.js.map +1 -1
  95. package/dist/cjs/hb-time-select.cjs.entry.js +13 -4
  96. package/dist/cjs/hb-time-select.cjs.entry.js.map +1 -1
  97. package/dist/cjs/hb-tooltip.cjs.entry.js +30 -10
  98. package/dist/cjs/hb-tooltip.cjs.entry.js.map +1 -1
  99. package/dist/cjs/hb-tree-select.cjs.entry.js +125 -10
  100. package/dist/cjs/hb-tree-select.cjs.entry.js.map +1 -1
  101. package/dist/cjs/hb-tree.cjs.entry.js +145 -12
  102. package/dist/cjs/hb-tree.cjs.entry.js.map +1 -1
  103. package/dist/cjs/hb-watermark.cjs.entry.js +19 -11
  104. package/dist/cjs/hb-watermark.cjs.entry.js.map +1 -1
  105. package/dist/cjs/huibo-ui.cjs.js +1 -1
  106. package/dist/cjs/loader.cjs.js +1 -1
  107. package/dist/cjs/transition-59f1da0f.js +34 -0
  108. package/dist/cjs/transition-59f1da0f.js.map +1 -0
  109. package/dist/collection/components/Alert/Alert.js +2 -1
  110. package/dist/collection/components/Alert/Alert.js.map +1 -1
  111. package/dist/collection/components/Calendar/Calendar.js +2 -2
  112. package/dist/collection/components/Calendar/Calendar.js.map +1 -1
  113. package/dist/collection/components/Cascader/Cascader.js +47 -11
  114. package/dist/collection/components/Cascader/Cascader.js.map +1 -1
  115. package/dist/collection/components/Checkbox/Checkbox.js +9 -4
  116. package/dist/collection/components/Checkbox/Checkbox.js.map +1 -1
  117. package/dist/collection/components/Checkbox/CheckboxGroup.js +12 -8
  118. package/dist/collection/components/Checkbox/CheckboxGroup.js.map +1 -1
  119. package/dist/collection/components/Collapse/Collapse.js +20 -15
  120. package/dist/collection/components/Collapse/Collapse.js.map +1 -1
  121. package/dist/collection/components/Collapse/CollapseItem.js +33 -4
  122. package/dist/collection/components/Collapse/CollapseItem.js.map +1 -1
  123. package/dist/collection/components/ColorPicker/ColorPicker.js +22 -19
  124. package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
  125. package/dist/collection/components/ColorPicker/color-picker.css +8 -3
  126. package/dist/collection/components/DatePicker/DatePicker.js +12 -9
  127. package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
  128. package/dist/collection/components/DatePicker/date-picker.css +3 -2
  129. package/dist/collection/components/Descriptions/descriptions.css +30 -10
  130. package/dist/collection/components/Dialog/Dialog.js +54 -10
  131. package/dist/collection/components/Dialog/Dialog.js.map +1 -1
  132. package/dist/collection/components/Dialog/dialog.css +57 -11
  133. package/dist/collection/components/Drawer/Drawer.js +34 -3
  134. package/dist/collection/components/Drawer/Drawer.js.map +1 -1
  135. package/dist/collection/components/Drawer/drawer.css +207 -17
  136. package/dist/collection/components/Dropdown/Dropdown.js +28 -13
  137. package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
  138. package/dist/collection/components/Dropdown/dropdown.css +24 -2
  139. package/dist/collection/components/Empty/Empty.js +1 -1
  140. package/dist/collection/components/FloatButton/FloatButton.js +2 -2
  141. package/dist/collection/components/Form/Form.js +217 -9
  142. package/dist/collection/components/Form/Form.js.map +1 -1
  143. package/dist/collection/components/Form/FormItem.js +126 -18
  144. package/dist/collection/components/Form/FormItem.js.map +1 -1
  145. package/dist/collection/components/Form/form-item.css +8 -2
  146. package/dist/collection/components/Image/Image.js +24 -3
  147. package/dist/collection/components/Image/Image.js.map +1 -1
  148. package/dist/collection/components/ImagePreview/ImagePreview.js +1 -1
  149. package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
  150. package/dist/collection/components/Input/Input.js +3 -2
  151. package/dist/collection/components/Input/Input.js.map +1 -1
  152. package/dist/collection/components/Input/input.css +1 -2
  153. package/dist/collection/components/InputNumber/InputNumber.js +6 -6
  154. package/dist/collection/components/InputNumber/InputNumber.js.map +1 -1
  155. package/dist/collection/components/InputNumber/input-number.css +11 -1
  156. package/dist/collection/components/InputTag/InputTag.js +2 -2
  157. package/dist/collection/components/Layout/Layout.js.map +1 -1
  158. package/dist/collection/components/Layout/Row.js +2 -2
  159. package/dist/collection/components/Layout/layout.css +1713 -576
  160. package/dist/collection/components/Link/Link.js +2 -2
  161. package/dist/collection/components/Loading/Loading.js +2 -2
  162. package/dist/collection/components/Menu/Menu.js +2 -2
  163. package/dist/collection/components/Menu/MenuItem.js +34 -5
  164. package/dist/collection/components/Menu/MenuItem.js.map +1 -1
  165. package/dist/collection/components/Menu/SubMenu.js +4 -4
  166. package/dist/collection/components/Message/Message.js +13 -4
  167. package/dist/collection/components/Message/Message.js.map +1 -1
  168. package/dist/collection/components/PageHeader/PageHeader.js +1 -1
  169. package/dist/collection/components/Pagination/Pagination.js +8 -5
  170. package/dist/collection/components/Pagination/Pagination.js.map +1 -1
  171. package/dist/collection/components/Popconfirm/Popconfirm.js +28 -6
  172. package/dist/collection/components/Popconfirm/Popconfirm.js.map +1 -1
  173. package/dist/collection/components/Popconfirm/popconfirm.css +80 -16
  174. package/dist/collection/components/Popover/Popover.js +27 -12
  175. package/dist/collection/components/Popover/Popover.js.map +1 -1
  176. package/dist/collection/components/Popover/popover.css +49 -8
  177. package/dist/collection/components/Progress/Progress.js +1 -1
  178. package/dist/collection/components/Radio/Radio.js +8 -3
  179. package/dist/collection/components/Radio/Radio.js.map +1 -1
  180. package/dist/collection/components/Rate/Rate.js +3 -3
  181. package/dist/collection/components/Rate/Rate.js.map +1 -1
  182. package/dist/collection/components/Scrollbar/Scrollbar.js +5 -5
  183. package/dist/collection/components/Scrollbar/Scrollbar.js.map +1 -1
  184. package/dist/collection/components/Segmented/Segmented.js +15 -1
  185. package/dist/collection/components/Segmented/Segmented.js.map +1 -1
  186. package/dist/collection/components/Select/Select.js +123 -19
  187. package/dist/collection/components/Select/Select.js.map +1 -1
  188. package/dist/collection/components/Select/select.css +0 -1
  189. package/dist/collection/components/Slider/Slider.js +6 -12
  190. package/dist/collection/components/Slider/Slider.js.map +1 -1
  191. package/dist/collection/components/Slider/slider.css +0 -1
  192. package/dist/collection/components/Space/Space.js +2 -2
  193. package/dist/collection/components/Statistic/Statistic.js +1 -1
  194. package/dist/collection/components/Steps/Step.js +1 -1
  195. package/dist/collection/components/Steps/Steps.js +2 -2
  196. package/dist/collection/components/Steps/Steps.js.map +1 -1
  197. package/dist/collection/components/Switch/Switch.js +3 -3
  198. package/dist/collection/components/Switch/Switch.js.map +1 -1
  199. package/dist/collection/components/Switch/switch.css +3 -2
  200. package/dist/collection/components/Table/Table.js +296 -41
  201. package/dist/collection/components/Table/Table.js.map +1 -1
  202. package/dist/collection/components/Table/table.css +6 -2
  203. package/dist/collection/components/Tabs/TabPane.js +1 -1
  204. package/dist/collection/components/Tabs/Tabs.js +31 -10
  205. package/dist/collection/components/Tabs/Tabs.js.map +1 -1
  206. package/dist/collection/components/Tag/Tag.js +3 -2
  207. package/dist/collection/components/Tag/Tag.js.map +1 -1
  208. package/dist/collection/components/Text/Text.js +2 -2
  209. package/dist/collection/components/TimePicker/TimePicker.js +14 -9
  210. package/dist/collection/components/TimePicker/TimePicker.js.map +1 -1
  211. package/dist/collection/components/TimeSelect/TimeSelect.js +13 -4
  212. package/dist/collection/components/TimeSelect/TimeSelect.js.map +1 -1
  213. package/dist/collection/components/Tooltip/Tooltip.js +31 -8
  214. package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
  215. package/dist/collection/components/Tooltip/tooltip.css +24 -2
  216. package/dist/collection/components/Tree/Tree.js +147 -13
  217. package/dist/collection/components/Tree/Tree.js.map +1 -1
  218. package/dist/collection/components/TreeSelect/TreeSelect.js +130 -11
  219. package/dist/collection/components/TreeSelect/TreeSelect.js.map +1 -1
  220. package/dist/collection/components/Watermark/Watermark.js +19 -11
  221. package/dist/collection/components/Watermark/Watermark.js.map +1 -1
  222. package/dist/collection/utils/a11y.js +15 -1
  223. package/dist/collection/utils/a11y.js.map +1 -1
  224. package/dist/collection/utils/date-helpers.js +4 -15
  225. package/dist/collection/utils/date-helpers.js.map +1 -1
  226. package/dist/collection/utils/transition.js +29 -0
  227. package/dist/collection/utils/transition.js.map +1 -0
  228. package/dist/collection/utils/virtual-scroll.js +39 -0
  229. package/dist/collection/utils/virtual-scroll.js.map +1 -0
  230. package/dist/components/hb-alert.js +2 -1
  231. package/dist/components/hb-alert.js.map +1 -1
  232. package/dist/components/hb-calendar.js +2 -2
  233. package/dist/components/hb-calendar.js.map +1 -1
  234. package/dist/components/hb-cascader.js +48 -12
  235. package/dist/components/hb-cascader.js.map +1 -1
  236. package/dist/components/hb-checkbox-group.js +12 -8
  237. package/dist/components/hb-checkbox-group.js.map +1 -1
  238. package/dist/components/hb-checkbox.js +9 -4
  239. package/dist/components/hb-checkbox.js.map +1 -1
  240. package/dist/components/hb-collapse-item.js +14 -4
  241. package/dist/components/hb-collapse-item.js.map +1 -1
  242. package/dist/components/hb-collapse.js +20 -15
  243. package/dist/components/hb-collapse.js.map +1 -1
  244. package/dist/components/hb-color-picker.js +22 -19
  245. package/dist/components/hb-color-picker.js.map +1 -1
  246. package/dist/components/hb-date-picker-pane.js +1 -1
  247. package/dist/components/hb-date-picker.js +13 -10
  248. package/dist/components/hb-date-picker.js.map +1 -1
  249. package/dist/components/hb-date-range-picker.js +1 -1
  250. package/dist/components/hb-date-time-picker.js +1 -1
  251. package/dist/components/hb-descriptions.js.map +1 -1
  252. package/dist/components/hb-dialog.js +53 -13
  253. package/dist/components/hb-dialog.js.map +1 -1
  254. package/dist/components/hb-drawer.js +36 -5
  255. package/dist/components/hb-drawer.js.map +1 -1
  256. package/dist/components/hb-dropdown.js +28 -15
  257. package/dist/components/hb-dropdown.js.map +1 -1
  258. package/dist/components/hb-empty.js +1 -1
  259. package/dist/components/hb-float-button.js +2 -2
  260. package/dist/components/hb-form-item.js +70 -16
  261. package/dist/components/hb-form-item.js.map +1 -1
  262. package/dist/components/hb-form.js +120 -7
  263. package/dist/components/hb-form.js.map +1 -1
  264. package/dist/components/hb-image-preview.js +1 -1
  265. package/dist/components/hb-image-preview.js.map +1 -1
  266. package/dist/components/hb-image.js +23 -3
  267. package/dist/components/hb-image.js.map +1 -1
  268. package/dist/components/hb-input-number.js +7 -7
  269. package/dist/components/hb-input-number.js.map +1 -1
  270. package/dist/components/hb-input-tag.js +2 -2
  271. package/dist/components/hb-input.js +3 -2
  272. package/dist/components/hb-input.js.map +1 -1
  273. package/dist/components/hb-layout.js.map +1 -1
  274. package/dist/components/hb-link.js +2 -2
  275. package/dist/components/hb-loading.js +2 -2
  276. package/dist/components/hb-menu-item.js +15 -5
  277. package/dist/components/hb-menu-item.js.map +1 -1
  278. package/dist/components/hb-menu.js +2 -2
  279. package/dist/components/hb-message.js +13 -4
  280. package/dist/components/hb-message.js.map +1 -1
  281. package/dist/components/hb-page-header.js +1 -1
  282. package/dist/components/hb-pagination.js +8 -5
  283. package/dist/components/hb-pagination.js.map +1 -1
  284. package/dist/components/hb-popconfirm.js +28 -8
  285. package/dist/components/hb-popconfirm.js.map +1 -1
  286. package/dist/components/hb-popover.js +27 -14
  287. package/dist/components/hb-popover.js.map +1 -1
  288. package/dist/components/hb-progress.js +1 -1
  289. package/dist/components/hb-radio.js +8 -3
  290. package/dist/components/hb-radio.js.map +1 -1
  291. package/dist/components/hb-rate.js +3 -3
  292. package/dist/components/hb-rate.js.map +1 -1
  293. package/dist/components/hb-row.js +2 -2
  294. package/dist/components/hb-scrollbar.js +5 -5
  295. package/dist/components/hb-scrollbar.js.map +1 -1
  296. package/dist/components/hb-segmented.js +15 -2
  297. package/dist/components/hb-segmented.js.map +1 -1
  298. package/dist/components/hb-select.js +105 -20
  299. package/dist/components/hb-select.js.map +1 -1
  300. package/dist/components/hb-slider.js +6 -12
  301. package/dist/components/hb-slider.js.map +1 -1
  302. package/dist/components/hb-space.js +2 -2
  303. package/dist/components/hb-statistic.js +1 -1
  304. package/dist/components/hb-step.js +1 -1
  305. package/dist/components/hb-steps.js +3 -3
  306. package/dist/components/hb-steps.js.map +1 -1
  307. package/dist/components/hb-sub-menu.js +5 -5
  308. package/dist/components/hb-switch.js +3 -3
  309. package/dist/components/hb-switch.js.map +1 -1
  310. package/dist/components/hb-tab-pane.js +1 -1
  311. package/dist/components/hb-table.js +226 -43
  312. package/dist/components/hb-table.js.map +1 -1
  313. package/dist/components/hb-tabs.js +31 -10
  314. package/dist/components/hb-tabs.js.map +1 -1
  315. package/dist/components/hb-tag.js +3 -2
  316. package/dist/components/hb-tag.js.map +1 -1
  317. package/dist/components/hb-text.js +2 -2
  318. package/dist/components/hb-time-picker.js +14 -9
  319. package/dist/components/hb-time-picker.js.map +1 -1
  320. package/dist/components/hb-time-select.js +13 -4
  321. package/dist/components/hb-time-select.js.map +1 -1
  322. package/dist/components/hb-tooltip.js +31 -10
  323. package/dist/components/hb-tooltip.js.map +1 -1
  324. package/dist/components/hb-tree-select.js +129 -11
  325. package/dist/components/hb-tree-select.js.map +1 -1
  326. package/dist/components/hb-tree.js +147 -13
  327. package/dist/components/hb-tree.js.map +1 -1
  328. package/dist/components/hb-watermark.js +19 -11
  329. package/dist/components/hb-watermark.js.map +1 -1
  330. package/dist/{esm/a11y-f9ab2964.js → components/p-00aa34c8.js} +17 -3
  331. package/dist/components/p-00aa34c8.js.map +1 -0
  332. package/dist/components/{p-08b4005c.js → p-e0876aca.js} +5 -16
  333. package/dist/components/p-e0876aca.js.map +1 -0
  334. package/dist/components/p-fad66d69.js +32 -0
  335. package/dist/components/p-fad66d69.js.map +1 -0
  336. package/dist/{components/p-cc0aeb50.js → esm/a11y-e4cde5b0.js} +17 -3
  337. package/dist/esm/a11y-e4cde5b0.js.map +1 -0
  338. package/dist/esm/{date-helpers-44507189.js → date-helpers-259ed2f1.js} +5 -16
  339. package/dist/esm/date-helpers-259ed2f1.js.map +1 -0
  340. package/dist/esm/hb-alert.entry.js +2 -1
  341. package/dist/esm/hb-alert.entry.js.map +1 -1
  342. package/dist/esm/hb-calendar.entry.js +2 -2
  343. package/dist/esm/hb-calendar.entry.js.map +1 -1
  344. package/dist/esm/hb-cascader.entry.js +48 -12
  345. package/dist/esm/hb-cascader.entry.js.map +1 -1
  346. package/dist/esm/hb-checkbox-group.entry.js +12 -8
  347. package/dist/esm/hb-checkbox-group.entry.js.map +1 -1
  348. package/dist/esm/hb-checkbox.entry.js +9 -4
  349. package/dist/esm/hb-checkbox.entry.js.map +1 -1
  350. package/dist/esm/hb-collapse-item.entry.js +13 -4
  351. package/dist/esm/hb-collapse-item.entry.js.map +1 -1
  352. package/dist/esm/hb-collapse.entry.js +20 -15
  353. package/dist/esm/hb-collapse.entry.js.map +1 -1
  354. package/dist/esm/hb-color-picker.entry.js +22 -19
  355. package/dist/esm/hb-color-picker.entry.js.map +1 -1
  356. package/dist/esm/hb-date-picker-pane.entry.js +1 -1
  357. package/dist/esm/hb-date-picker.entry.js +13 -10
  358. package/dist/esm/hb-date-picker.entry.js.map +1 -1
  359. package/dist/esm/hb-date-range-picker.entry.js +1 -1
  360. package/dist/esm/hb-date-time-picker.entry.js +1 -1
  361. package/dist/esm/hb-descriptions.entry.js.map +1 -1
  362. package/dist/esm/hb-dialog.entry.js +51 -12
  363. package/dist/esm/hb-dialog.entry.js.map +1 -1
  364. package/dist/esm/hb-drawer.entry.js +34 -4
  365. package/dist/esm/hb-drawer.entry.js.map +1 -1
  366. package/dist/esm/hb-dropdown.entry.js +27 -15
  367. package/dist/esm/hb-dropdown.entry.js.map +1 -1
  368. package/dist/esm/hb-empty.entry.js +1 -1
  369. package/dist/esm/hb-float-button.entry.js +2 -2
  370. package/dist/esm/hb-form-item.entry.js +67 -16
  371. package/dist/esm/hb-form-item.entry.js.map +1 -1
  372. package/dist/esm/hb-form.entry.js +115 -7
  373. package/dist/esm/hb-form.entry.js.map +1 -1
  374. package/dist/esm/hb-image-preview.entry.js +1 -1
  375. package/dist/esm/hb-image-preview.entry.js.map +1 -1
  376. package/dist/esm/hb-image.entry.js +21 -3
  377. package/dist/esm/hb-image.entry.js.map +1 -1
  378. package/dist/esm/hb-input-number.entry.js +7 -7
  379. package/dist/esm/hb-input-number.entry.js.map +1 -1
  380. package/dist/esm/hb-input-tag.entry.js +2 -2
  381. package/dist/esm/hb-input.entry.js +3 -2
  382. package/dist/esm/hb-input.entry.js.map +1 -1
  383. package/dist/esm/hb-layout.entry.js.map +1 -1
  384. package/dist/esm/hb-link.entry.js +2 -2
  385. package/dist/esm/hb-loading.entry.js +2 -2
  386. package/dist/esm/hb-menu-item.entry.js +14 -5
  387. package/dist/esm/hb-menu-item.entry.js.map +1 -1
  388. package/dist/esm/hb-menu.entry.js +2 -2
  389. package/dist/esm/hb-message.entry.js +13 -4
  390. package/dist/esm/hb-message.entry.js.map +1 -1
  391. package/dist/esm/hb-page-header.entry.js +1 -1
  392. package/dist/esm/hb-pagination.entry.js +8 -5
  393. package/dist/esm/hb-pagination.entry.js.map +1 -1
  394. package/dist/esm/hb-popconfirm.entry.js +27 -8
  395. package/dist/esm/hb-popconfirm.entry.js.map +1 -1
  396. package/dist/esm/hb-popover.entry.js +26 -14
  397. package/dist/esm/hb-popover.entry.js.map +1 -1
  398. package/dist/esm/hb-progress.entry.js +1 -1
  399. package/dist/esm/hb-radio.entry.js +8 -3
  400. package/dist/esm/hb-radio.entry.js.map +1 -1
  401. package/dist/esm/hb-rate.entry.js +3 -3
  402. package/dist/esm/hb-rate.entry.js.map +1 -1
  403. package/dist/esm/hb-row.entry.js +2 -2
  404. package/dist/esm/hb-scrollbar.entry.js +5 -5
  405. package/dist/esm/hb-scrollbar.entry.js.map +1 -1
  406. package/dist/esm/hb-segmented.entry.js +13 -2
  407. package/dist/esm/hb-segmented.entry.js.map +1 -1
  408. package/dist/esm/hb-select.entry.js +100 -19
  409. package/dist/esm/hb-select.entry.js.map +1 -1
  410. package/dist/esm/hb-slider.entry.js +6 -12
  411. package/dist/esm/hb-slider.entry.js.map +1 -1
  412. package/dist/esm/hb-space.entry.js +2 -2
  413. package/dist/esm/hb-statistic.entry.js +1 -1
  414. package/dist/esm/hb-step.entry.js +1 -1
  415. package/dist/esm/hb-steps.entry.js +3 -3
  416. package/dist/esm/hb-steps.entry.js.map +1 -1
  417. package/dist/esm/hb-sub-menu.entry.js +5 -5
  418. package/dist/esm/hb-switch.entry.js +3 -3
  419. package/dist/esm/hb-switch.entry.js.map +1 -1
  420. package/dist/esm/hb-tab-pane.entry.js +1 -1
  421. package/dist/esm/hb-table.entry.js +218 -41
  422. package/dist/esm/hb-table.entry.js.map +1 -1
  423. package/dist/esm/hb-tabs.entry.js +31 -10
  424. package/dist/esm/hb-tabs.entry.js.map +1 -1
  425. package/dist/esm/hb-tag.entry.js +3 -2
  426. package/dist/esm/hb-tag.entry.js.map +1 -1
  427. package/dist/esm/hb-text.entry.js +2 -2
  428. package/dist/esm/hb-time-picker.entry.js +14 -9
  429. package/dist/esm/hb-time-picker.entry.js.map +1 -1
  430. package/dist/esm/hb-time-select.entry.js +13 -4
  431. package/dist/esm/hb-time-select.entry.js.map +1 -1
  432. package/dist/esm/hb-tooltip.entry.js +30 -10
  433. package/dist/esm/hb-tooltip.entry.js.map +1 -1
  434. package/dist/esm/hb-tree-select.entry.js +125 -10
  435. package/dist/esm/hb-tree-select.entry.js.map +1 -1
  436. package/dist/esm/hb-tree.entry.js +145 -12
  437. package/dist/esm/hb-tree.entry.js.map +1 -1
  438. package/dist/esm/hb-watermark.entry.js +19 -11
  439. package/dist/esm/hb-watermark.entry.js.map +1 -1
  440. package/dist/esm/huibo-ui.js +1 -1
  441. package/dist/esm/loader.js +1 -1
  442. package/dist/esm/transition-4295d789.js +32 -0
  443. package/dist/esm/transition-4295d789.js.map +1 -0
  444. package/dist/huibo-ui/huibo-ui.esm.js +1 -1
  445. package/dist/huibo-ui/huibo-ui.esm.js.map +1 -1
  446. package/dist/huibo-ui/p-00aa34c8.js +2 -0
  447. package/dist/huibo-ui/p-00aa34c8.js.map +1 -0
  448. package/dist/huibo-ui/p-0cc1e3f3.entry.js +2 -0
  449. package/dist/huibo-ui/p-0cc1e3f3.entry.js.map +1 -0
  450. package/dist/huibo-ui/{p-678b4212.entry.js → p-0ddae4e9.entry.js} +2 -2
  451. package/dist/huibo-ui/p-10f6c184.entry.js.map +1 -1
  452. package/dist/huibo-ui/{p-f4336be9.entry.js → p-14c3b47b.entry.js} +2 -2
  453. package/dist/huibo-ui/{p-c50ad398.entry.js → p-193efdc0.entry.js} +2 -2
  454. package/dist/huibo-ui/{p-735bceef.entry.js → p-1b98152b.entry.js} +2 -2
  455. package/dist/huibo-ui/p-1b98152b.entry.js.map +1 -0
  456. package/dist/huibo-ui/p-1f6d0adb.entry.js +2 -0
  457. package/dist/huibo-ui/p-1f6d0adb.entry.js.map +1 -0
  458. package/dist/huibo-ui/{p-0d4b2997.entry.js → p-2bcda1bb.entry.js} +2 -2
  459. package/dist/huibo-ui/{p-b8d87f7e.entry.js → p-2ca9796a.entry.js} +2 -2
  460. package/dist/huibo-ui/p-2ca9796a.entry.js.map +1 -0
  461. package/dist/huibo-ui/{p-c80f8ace.entry.js → p-2cf5bf20.entry.js} +2 -2
  462. package/dist/huibo-ui/p-2cf5bf20.entry.js.map +1 -0
  463. package/dist/huibo-ui/{p-7da14d7c.entry.js → p-3042f986.entry.js} +2 -2
  464. package/dist/huibo-ui/{p-e039155d.entry.js → p-3dacb26b.entry.js} +2 -2
  465. package/dist/huibo-ui/{p-a084b8e5.entry.js → p-412ff618.entry.js} +2 -2
  466. package/dist/huibo-ui/p-4148d875.entry.js +2 -0
  467. package/dist/huibo-ui/p-4148d875.entry.js.map +1 -0
  468. package/dist/huibo-ui/{p-6beb5b81.entry.js → p-415295f3.entry.js} +2 -2
  469. package/dist/huibo-ui/p-415295f3.entry.js.map +1 -0
  470. package/dist/huibo-ui/p-494e6c25.entry.js +2 -0
  471. package/dist/huibo-ui/p-494e6c25.entry.js.map +1 -0
  472. package/dist/huibo-ui/p-4d87d7f4.entry.js +2 -0
  473. package/dist/huibo-ui/p-4d87d7f4.entry.js.map +1 -0
  474. package/dist/huibo-ui/p-5e253c15.entry.js +2 -0
  475. package/dist/huibo-ui/p-5e253c15.entry.js.map +1 -0
  476. package/dist/huibo-ui/p-63d68c61.entry.js +2 -0
  477. package/dist/huibo-ui/p-63d68c61.entry.js.map +1 -0
  478. package/dist/huibo-ui/{p-ccd09d5a.entry.js → p-6518c435.entry.js} +2 -2
  479. package/dist/huibo-ui/{p-1f8db37a.entry.js → p-687d8dff.entry.js} +2 -2
  480. package/dist/huibo-ui/p-687d8dff.entry.js.map +1 -0
  481. package/dist/huibo-ui/p-688460ce.entry.js +2 -0
  482. package/dist/huibo-ui/p-688460ce.entry.js.map +1 -0
  483. package/dist/huibo-ui/p-69bb1dd9.entry.js +2 -0
  484. package/dist/huibo-ui/p-69bb1dd9.entry.js.map +1 -0
  485. package/dist/huibo-ui/{p-2811e603.entry.js → p-6bfe1954.entry.js} +2 -2
  486. package/dist/huibo-ui/p-6bfe1954.entry.js.map +1 -0
  487. package/dist/huibo-ui/{p-e5cbfa9e.entry.js → p-6c23fbd1.entry.js} +2 -2
  488. package/dist/huibo-ui/p-6c23fbd1.entry.js.map +1 -0
  489. package/dist/huibo-ui/p-6c8cf248.entry.js.map +1 -1
  490. package/dist/huibo-ui/p-6efed295.entry.js +2 -0
  491. package/dist/huibo-ui/p-6efed295.entry.js.map +1 -0
  492. package/dist/huibo-ui/p-7a38b3e2.entry.js +2 -0
  493. package/dist/huibo-ui/p-7a38b3e2.entry.js.map +1 -0
  494. package/dist/huibo-ui/{p-cad57c2d.entry.js → p-7a682c56.entry.js} +2 -2
  495. package/dist/huibo-ui/{p-a8996d22.entry.js → p-815fc943.entry.js} +2 -2
  496. package/dist/huibo-ui/{p-af74667d.entry.js → p-89be7973.entry.js} +2 -2
  497. package/dist/huibo-ui/p-8a202bc5.entry.js.map +1 -1
  498. package/dist/huibo-ui/{p-213b9de7.entry.js → p-8c4415ed.entry.js} +2 -2
  499. package/dist/huibo-ui/p-8c4415ed.entry.js.map +1 -0
  500. package/dist/huibo-ui/{p-8fdbd17c.entry.js → p-950e7465.entry.js} +2 -2
  501. package/dist/huibo-ui/{p-ab9cf0e4.entry.js → p-96cecd21.entry.js} +2 -2
  502. package/dist/huibo-ui/p-96cecd21.entry.js.map +1 -0
  503. package/dist/huibo-ui/{p-2b4556ff.entry.js → p-98b513cd.entry.js} +2 -2
  504. package/dist/huibo-ui/p-98b513cd.entry.js.map +1 -0
  505. package/dist/huibo-ui/{p-89ea1141.entry.js → p-ac45291c.entry.js} +2 -2
  506. package/dist/huibo-ui/{p-e10fcfbe.entry.js → p-b105cf76.entry.js} +2 -2
  507. package/dist/huibo-ui/p-b105cf76.entry.js.map +1 -0
  508. package/dist/huibo-ui/{p-9a5406f0.entry.js → p-b38802b0.entry.js} +2 -2
  509. package/dist/huibo-ui/{p-9a5406f0.entry.js.map → p-b38802b0.entry.js.map} +1 -1
  510. package/dist/huibo-ui/{p-ea74fcae.entry.js → p-b3fd12c7.entry.js} +2 -2
  511. package/dist/huibo-ui/p-b3fd12c7.entry.js.map +1 -0
  512. package/dist/huibo-ui/p-b5ea18ba.entry.js +2 -0
  513. package/dist/huibo-ui/p-b5ea18ba.entry.js.map +1 -0
  514. package/dist/huibo-ui/{p-41d9c846.entry.js → p-b6afe81e.entry.js} +2 -2
  515. package/dist/huibo-ui/p-b7900dee.entry.js +2 -0
  516. package/dist/huibo-ui/p-b7900dee.entry.js.map +1 -0
  517. package/dist/huibo-ui/p-b8c83751.entry.js +2 -0
  518. package/dist/huibo-ui/p-b8c83751.entry.js.map +1 -0
  519. package/dist/huibo-ui/p-c7713947.entry.js +2 -0
  520. package/dist/huibo-ui/p-c7713947.entry.js.map +1 -0
  521. package/dist/huibo-ui/{p-33de6878.entry.js → p-c869842c.entry.js} +2 -2
  522. package/dist/huibo-ui/p-c869842c.entry.js.map +1 -0
  523. package/dist/huibo-ui/p-c8e917db.entry.js.map +1 -1
  524. package/dist/huibo-ui/p-cb66dbef.entry.js +2 -0
  525. package/dist/huibo-ui/p-cb66dbef.entry.js.map +1 -0
  526. package/dist/huibo-ui/p-cde83f76.entry.js +2 -0
  527. package/dist/huibo-ui/p-cde83f76.entry.js.map +1 -0
  528. package/dist/huibo-ui/{p-f5969181.entry.js → p-dd9c6459.entry.js} +2 -2
  529. package/dist/huibo-ui/{p-08b4005c.js → p-e0876aca.js} +1 -1
  530. package/dist/huibo-ui/p-e0876aca.js.map +1 -0
  531. package/dist/huibo-ui/{p-aa5e5e02.entry.js → p-e1773c93.entry.js} +2 -2
  532. package/dist/huibo-ui/p-e1773c93.entry.js.map +1 -0
  533. package/dist/huibo-ui/{p-626b48f1.entry.js → p-e73c357f.entry.js} +2 -2
  534. package/dist/huibo-ui/p-e73c357f.entry.js.map +1 -0
  535. package/dist/huibo-ui/{p-60532a1f.entry.js → p-e7c73624.entry.js} +2 -2
  536. package/dist/huibo-ui/p-e7c73624.entry.js.map +1 -0
  537. package/dist/huibo-ui/{p-86bdc48a.entry.js → p-e8824b2c.entry.js} +2 -2
  538. package/dist/huibo-ui/p-e8824b2c.entry.js.map +1 -0
  539. package/dist/huibo-ui/{p-13010da2.entry.js → p-e9e7abca.entry.js} +2 -2
  540. package/dist/huibo-ui/{p-f6889710.entry.js → p-ea0823f3.entry.js} +2 -2
  541. package/dist/huibo-ui/p-ea0823f3.entry.js.map +1 -0
  542. package/dist/huibo-ui/{p-b468858e.entry.js → p-f1f2483f.entry.js} +2 -2
  543. package/dist/huibo-ui/p-f69599fa.entry.js +2 -0
  544. package/dist/huibo-ui/p-f69599fa.entry.js.map +1 -0
  545. package/dist/huibo-ui/p-fad66d69.js +2 -0
  546. package/dist/huibo-ui/p-fad66d69.js.map +1 -0
  547. package/dist/huibo-ui/{p-fd8301c6.entry.js → p-fd6831f9.entry.js} +2 -2
  548. package/dist/huibo-ui/p-ff6bc5cc.entry.js +2 -0
  549. package/dist/huibo-ui/p-ff6bc5cc.entry.js.map +1 -0
  550. package/dist/types/components/Cascader/Cascader.d.ts +12 -0
  551. package/dist/types/components/Checkbox/Checkbox.d.ts +5 -0
  552. package/dist/types/components/Checkbox/CheckboxGroup.d.ts +1 -0
  553. package/dist/types/components/Collapse/Collapse.d.ts +2 -0
  554. package/dist/types/components/Collapse/CollapseItem.d.ts +8 -1
  555. package/dist/types/components/Dialog/Dialog.d.ts +13 -1
  556. package/dist/types/components/Drawer/Drawer.d.ts +4 -0
  557. package/dist/types/components/Dropdown/Dropdown.d.ts +6 -2
  558. package/dist/types/components/Form/Form.d.ts +59 -0
  559. package/dist/types/components/Form/FormItem.d.ts +23 -0
  560. package/dist/types/components/Image/Image.d.ts +6 -0
  561. package/dist/types/components/Menu/MenuItem.d.ts +8 -1
  562. package/dist/types/components/Message/Message.d.ts +3 -0
  563. package/dist/types/components/Popconfirm/Popconfirm.d.ts +6 -2
  564. package/dist/types/components/Popover/Popover.d.ts +6 -1
  565. package/dist/types/components/Radio/Radio.d.ts +5 -0
  566. package/dist/types/components/Segmented/Segmented.d.ts +6 -0
  567. package/dist/types/components/Select/Select.d.ts +24 -0
  568. package/dist/types/components/Table/Table.d.ts +110 -9
  569. package/dist/types/components/Tabs/Tabs.d.ts +6 -0
  570. package/dist/types/components/Tooltip/Tooltip.d.ts +6 -0
  571. package/dist/types/components/Tree/Tree.d.ts +24 -0
  572. package/dist/types/components/TreeSelect/TreeSelect.d.ts +17 -0
  573. package/dist/types/components/Watermark/Watermark.d.ts +7 -1
  574. package/dist/types/components.d.ts +188 -6
  575. package/dist/types/utils/a11y.d.ts +9 -0
  576. package/dist/types/utils/transition.d.ts +27 -0
  577. package/dist/types/utils/virtual-scroll.d.ts +38 -0
  578. package/package.json +1 -1
  579. package/dist/cjs/a11y-802de67a.js.map +0 -1
  580. package/dist/cjs/date-helpers-1ffddc59.js.map +0 -1
  581. package/dist/components/p-08b4005c.js.map +0 -1
  582. package/dist/components/p-cc0aeb50.js.map +0 -1
  583. package/dist/esm/a11y-f9ab2964.js.map +0 -1
  584. package/dist/esm/date-helpers-44507189.js.map +0 -1
  585. package/dist/huibo-ui/p-08b4005c.js.map +0 -1
  586. package/dist/huibo-ui/p-1f8db37a.entry.js.map +0 -1
  587. package/dist/huibo-ui/p-213b9de7.entry.js.map +0 -1
  588. package/dist/huibo-ui/p-25fd7d5c.entry.js +0 -2
  589. package/dist/huibo-ui/p-25fd7d5c.entry.js.map +0 -1
  590. package/dist/huibo-ui/p-2811e603.entry.js.map +0 -1
  591. package/dist/huibo-ui/p-2943f5d0.entry.js +0 -2
  592. package/dist/huibo-ui/p-2943f5d0.entry.js.map +0 -1
  593. package/dist/huibo-ui/p-2b4556ff.entry.js.map +0 -1
  594. package/dist/huibo-ui/p-33de6878.entry.js.map +0 -1
  595. package/dist/huibo-ui/p-3807da71.entry.js +0 -2
  596. package/dist/huibo-ui/p-3807da71.entry.js.map +0 -1
  597. package/dist/huibo-ui/p-47ef7a86.entry.js +0 -2
  598. package/dist/huibo-ui/p-47ef7a86.entry.js.map +0 -1
  599. package/dist/huibo-ui/p-4d34e43e.entry.js +0 -2
  600. package/dist/huibo-ui/p-4d34e43e.entry.js.map +0 -1
  601. package/dist/huibo-ui/p-54aa2fd8.entry.js +0 -2
  602. package/dist/huibo-ui/p-54aa2fd8.entry.js.map +0 -1
  603. package/dist/huibo-ui/p-60532a1f.entry.js.map +0 -1
  604. package/dist/huibo-ui/p-626b48f1.entry.js.map +0 -1
  605. package/dist/huibo-ui/p-639f167d.entry.js +0 -2
  606. package/dist/huibo-ui/p-639f167d.entry.js.map +0 -1
  607. package/dist/huibo-ui/p-6beb5b81.entry.js.map +0 -1
  608. package/dist/huibo-ui/p-735bceef.entry.js.map +0 -1
  609. package/dist/huibo-ui/p-76519752.entry.js +0 -2
  610. package/dist/huibo-ui/p-76519752.entry.js.map +0 -1
  611. package/dist/huibo-ui/p-79af2efa.entry.js +0 -2
  612. package/dist/huibo-ui/p-79af2efa.entry.js.map +0 -1
  613. package/dist/huibo-ui/p-7f6975ad.entry.js +0 -2
  614. package/dist/huibo-ui/p-7f6975ad.entry.js.map +0 -1
  615. package/dist/huibo-ui/p-86bdc48a.entry.js.map +0 -1
  616. package/dist/huibo-ui/p-8a8443b8.entry.js +0 -2
  617. package/dist/huibo-ui/p-8a8443b8.entry.js.map +0 -1
  618. package/dist/huibo-ui/p-8fd788c9.entry.js +0 -2
  619. package/dist/huibo-ui/p-8fd788c9.entry.js.map +0 -1
  620. package/dist/huibo-ui/p-92521c31.entry.js +0 -2
  621. package/dist/huibo-ui/p-92521c31.entry.js.map +0 -1
  622. package/dist/huibo-ui/p-965d4d02.entry.js +0 -2
  623. package/dist/huibo-ui/p-965d4d02.entry.js.map +0 -1
  624. package/dist/huibo-ui/p-aa5e5e02.entry.js.map +0 -1
  625. package/dist/huibo-ui/p-ab9cf0e4.entry.js.map +0 -1
  626. package/dist/huibo-ui/p-b8d87f7e.entry.js.map +0 -1
  627. package/dist/huibo-ui/p-c6c91664.entry.js +0 -2
  628. package/dist/huibo-ui/p-c6c91664.entry.js.map +0 -1
  629. package/dist/huibo-ui/p-c80f8ace.entry.js.map +0 -1
  630. package/dist/huibo-ui/p-cc0aeb50.js +0 -2
  631. package/dist/huibo-ui/p-cc0aeb50.js.map +0 -1
  632. package/dist/huibo-ui/p-d79a15b1.entry.js +0 -2
  633. package/dist/huibo-ui/p-d79a15b1.entry.js.map +0 -1
  634. package/dist/huibo-ui/p-e10fcfbe.entry.js.map +0 -1
  635. package/dist/huibo-ui/p-e5cbfa9e.entry.js.map +0 -1
  636. package/dist/huibo-ui/p-ea74fcae.entry.js.map +0 -1
  637. package/dist/huibo-ui/p-edbda423.entry.js +0 -2
  638. package/dist/huibo-ui/p-edbda423.entry.js.map +0 -1
  639. package/dist/huibo-ui/p-f6889710.entry.js.map +0 -1
  640. package/dist/huibo-ui/p-f9bb5217.entry.js +0 -2
  641. package/dist/huibo-ui/p-f9bb5217.entry.js.map +0 -1
  642. package/dist/huibo-ui/p-fea20295.entry.js +0 -2
  643. package/dist/huibo-ui/p-fea20295.entry.js.map +0 -1
  644. /package/dist/huibo-ui/{p-678b4212.entry.js.map → p-0ddae4e9.entry.js.map} +0 -0
  645. /package/dist/huibo-ui/{p-f4336be9.entry.js.map → p-14c3b47b.entry.js.map} +0 -0
  646. /package/dist/huibo-ui/{p-c50ad398.entry.js.map → p-193efdc0.entry.js.map} +0 -0
  647. /package/dist/huibo-ui/{p-0d4b2997.entry.js.map → p-2bcda1bb.entry.js.map} +0 -0
  648. /package/dist/huibo-ui/{p-7da14d7c.entry.js.map → p-3042f986.entry.js.map} +0 -0
  649. /package/dist/huibo-ui/{p-e039155d.entry.js.map → p-3dacb26b.entry.js.map} +0 -0
  650. /package/dist/huibo-ui/{p-a084b8e5.entry.js.map → p-412ff618.entry.js.map} +0 -0
  651. /package/dist/huibo-ui/{p-ccd09d5a.entry.js.map → p-6518c435.entry.js.map} +0 -0
  652. /package/dist/huibo-ui/{p-cad57c2d.entry.js.map → p-7a682c56.entry.js.map} +0 -0
  653. /package/dist/huibo-ui/{p-a8996d22.entry.js.map → p-815fc943.entry.js.map} +0 -0
  654. /package/dist/huibo-ui/{p-af74667d.entry.js.map → p-89be7973.entry.js.map} +0 -0
  655. /package/dist/huibo-ui/{p-8fdbd17c.entry.js.map → p-950e7465.entry.js.map} +0 -0
  656. /package/dist/huibo-ui/{p-89ea1141.entry.js.map → p-ac45291c.entry.js.map} +0 -0
  657. /package/dist/huibo-ui/{p-41d9c846.entry.js.map → p-b6afe81e.entry.js.map} +0 -0
  658. /package/dist/huibo-ui/{p-f5969181.entry.js.map → p-dd9c6459.entry.js.map} +0 -0
  659. /package/dist/huibo-ui/{p-13010da2.entry.js.map → p-e9e7abca.entry.js.map} +0 -0
  660. /package/dist/huibo-ui/{p-b468858e.entry.js.map → p-f1f2483f.entry.js.map} +0 -0
  661. /package/dist/huibo-ui/{p-fd8301c6.entry.js.map → p-fd6831f9.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,g as i,h as a}from"./p-e42dfa95.js";import{p as r,f as o,a as n,i as s,g as d,W as l,M as h}from"./p-08b4005c.js";import{c}from"./p-4ef5a884.js";const p='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:inline-block}.hb-date-range-picker{display:inline-block;position:relative}.hb-date-range-picker__input-wrapper{align-items:center;cursor:pointer;display:inline-flex;gap:4px}.hb-date-range-picker__input{background-color:var(--hb-color-bg-container,#fff);border:1px solid var(--hb-color-border,#dcdfe6);border-radius:var(--hb-border-radius-base,4px);box-sizing:border-box;color:var(--hb-color-text,#606266);cursor:pointer;font-size:var(--hb-font-size-base,14px);height:var(--hb-size-default,32px);line-height:var(--hb-size-default,32px);outline:none;padding:0 8px;transition:border-color var(--hb-transition-duration,.2s)ease;width:140px}.hb-date-range-picker__input:hover:not(:disabled){border-color:var(--hb-color-primary,#1677ff)}.hb-date-range-picker__separator{color:var(--hb-color-text-secondary,#909399);font-size:var(--hb-font-size-base,14px)}.hb-date-range-picker__suffix{align-items:center;display:inline-flex;margin-left:-28px;pointer-events:none}.hb-date-range-picker__clear{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:16px;pointer-events:auto;transition:color var(--hb-transition-duration,.2s)ease}.hb-date-range-picker__clear:hover{color:var(--hb-color-text,#606266)}.hb-date-range-picker__icon{font-size:14px}.hb-date-range-picker__dropdown{background-color:var(--hb-color-bg-container,#fff);border:1px solid var(--hb-color-border,#dcdfe6);border-radius:var(--hb-border-radius-base,4px);box-shadow:var(--hb-box-shadow-lg,0 2px 12px 0 #0000001a);display:flex;gap:8px;left:0;margin-top:4px;padding:8px;position:absolute;top:100%;z-index:var(--hb-z-index-dropdown,1050)}.hb-date-range-picker__pane{min-width:280px;padding:12px}.hb-date-range-picker__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-date-range-picker__header-label{color:var(--hb-color-text,#606266);font-size:var(--hb-font-size-base,14px);font-weight:600}.hb-date-range-picker__next-btn,.hb-date-range-picker__prev-btn{background:0 0;border:none;color:var(--hb-color-text,#606266);cursor:pointer;font-size:18px;padding:4px 8px;transition:color var(--hb-transition-duration,.2s)ease}.hb-date-range-picker__next-btn:hover,.hb-date-range-picker__prev-btn:hover{color:var(--hb-color-primary,#1677ff)}.hb-date-range-picker__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-date-range-picker__weekday{color:var(--hb-color-text-tertiary,#909399);font-size:var(--hb-font-size-sm,12px);font-weight:500;text-align:center}.hb-date-range-picker__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-date-range-picker__day{align-items:center;aspect-ratio:1;border-radius:var(--hb-border-radius-base,4px);color:var(--hb-color-text,#606266);cursor:pointer;display:flex;font-size:13px;justify-content:center;transition:all var(--hb-transition-duration,.2s)ease}.hb-date-range-picker__day:hover:not(.hb-date-range-picker__day--other-month){background-color:var(--hb-color-fill-tertiary,#f5f7fa)}.hb-date-range-picker__day--other-month{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:default}.hb-date-range-picker__day--disabled{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:not-allowed}.hb-date-range-picker__day--disabled:hover{background-color:#0000}.hb-date-range-picker__day--today{color:var(--hb-color-primary,#1677ff);font-weight:600}.hb-date-range-picker__day--in-range{background-color:var(--hb-color-primary-bg,#e6f4ff);border-radius:0}.hb-date-range-picker__day--end,.hb-date-range-picker__day--start{background-color:var(--hb-color-primary,#1677ff);color:var(--hb-color-text-inverse,#fff)}.hb-date-range-picker--small .hb-date-range-picker__input{font-size:var(--hb-font-size-sm,12px);height:var(--hb-size-sm,24px);line-height:var(--hb-size-sm,24px)}.hb-date-range-picker--large .hb-date-range-picker__input{font-size:var(--hb-font-size-lg,16px);height:var(--hb-size-lg,40px);line-height:var(--hb-size-lg,40px)}.hb-date-range-picker--disabled{cursor:not-allowed}.hb-date-range-picker--disabled .hb-date-range-picker__input{background-color:var(--hb-color-fill-tertiary,#f5f7fa);color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}';const b=p;const f=class{constructor(i){e(this,i);this.hbChange=t(this,"hbChange",7);this.hbVisibleChange=t(this,"hbVisibleChange",7)}get el(){return i(this)}modelValue=[];placeholder=["开始日期","结束日期"];disabled=false;clearable=false;size="default";format="YYYY-MM-DD";disabledDate;name;hbChange;hbVisibleChange;isOpen=false;leftViewDate=new Date;startDate;endDate;pickingEnd=false;hoverDate;clickOutside=c({host:null,isOpen:()=>this.isOpen,onClose:()=>this.closePanel()});componentDidLoad(){this.clickOutside=c({host:this.el,isOpen:()=>this.isOpen,onClose:()=>this.closePanel()});this.clickOutside.connect();this.syncFromModelValue()}disconnectedCallback(){this.clickOutside.disconnect()}handleModelValueChange(){this.syncFromModelValue()}syncFromModelValue(){if(!this.modelValue||this.modelValue.length===0){this.startDate=undefined;this.endDate=undefined;this.pickingEnd=false;return}this.startDate=r(this.modelValue[0]);this.endDate=r(this.modelValue[1]);this.pickingEnd=false}get displayStart(){return this.startDate?o(this.startDate,this.format):""}get displayEnd(){return this.endDate?o(this.endDate,this.format):""}openPanel(){if(this.disabled)return;this.isOpen=true;this.hbVisibleChange.emit(true)}closePanel(){if(!this.isOpen)return;this.isOpen=false;this.hoverDate=undefined;this.pickingEnd=false;this.hbVisibleChange.emit(false)}handleTriggerClick=()=>{if(this.disabled)return;if(this.isOpen){this.closePanel()}else{this.openPanel()}};handleClear=e=>{e.stopPropagation();this.startDate=undefined;this.endDate=undefined;this.pickingEnd=false;this.modelValue=[];this.hbChange.emit([]);this.closePanel()};changeMonth(e){this.leftViewDate=n(this.leftViewDate,e)}isDateDisabled=e=>!!this.disabledDate&&this.disabledDate(e);handleDayClick=e=>{if(this.isDateDisabled(e))return;if(!this.startDate||this.startDate&&this.endDate||!this.pickingEnd){this.startDate=e;this.endDate=undefined;this.pickingEnd=true;return}if(e.getTime()<this.startDate.getTime()){this.endDate=this.startDate;this.startDate=e}else{this.endDate=e}this.pickingEnd=false;this.commitRange()};commitRange(){if(!this.startDate||!this.endDate)return;const e=o(this.startDate,this.format);const t=o(this.endDate,this.format);this.modelValue=[e,t];this.hbChange.emit([e,t]);this.closePanel()}handleDayHover=e=>{if(this.pickingEnd){this.hoverDate=e}};isStart(e){return!!this.startDate&&s(this.startDate,e)}isEnd(e){return!!this.endDate&&s(this.endDate,e)}isInRange(e){if(!this.startDate)return false;const t=this.endDate||this.hoverDate;if(!t)return false;const i=e.getTime();const a=this.startDate.getTime();const r=t.getTime();const o=Math.min(a,r);const n=Math.max(a,r);return i>o&&i<n}renderMonth(e,t){const i=d(e,undefined);return a("div",{class:"hb-date-range-picker__pane"},a("div",{class:"hb-date-range-picker__header"},t==="left"&&a("button",{type:"button",class:"hb-date-range-picker__prev-btn",onClick:()=>this.changeMonth(-1),"aria-label":"上个月"},"‹"),a("span",{class:"hb-date-range-picker__header-label"},e.getFullYear(),"年 ",h[e.getMonth()]),t==="right"&&a("button",{type:"button",class:"hb-date-range-picker__next-btn",onClick:()=>this.changeMonth(1),"aria-label":"下个月"},"›")),a("div",{class:"hb-date-range-picker__weekdays"},l.map((e=>a("div",{class:"hb-date-range-picker__weekday"},e)))),a("div",{class:"hb-date-range-picker__days"},i.map(((e,t)=>{const i=e.isCurrentMonth&&this.isDateDisabled(e.date);return a("div",{key:t,class:{"hb-date-range-picker__day":true,"hb-date-range-picker__day--other-month":!e.isCurrentMonth,"hb-date-range-picker__day--today":e.isToday,"hb-date-range-picker__day--start":this.isStart(e.date),"hb-date-range-picker__day--end":this.isEnd(e.date),"hb-date-range-picker__day--in-range":this.isInRange(e.date),"hb-date-range-picker__day--disabled":i},role:"gridcell","aria-disabled":!e.isCurrentMonth||i?"true":undefined,onClick:()=>e.isCurrentMonth&&!i&&this.handleDayClick(e.date),onMouseEnter:()=>e.isCurrentMonth&&!i&&this.handleDayHover(e.date)},e.date.getDate())}))))}render(){const e=n(this.leftViewDate,1);const t=this.clearable&&!!this.startDate&&!!this.endDate&&!this.disabled;return a("div",{key:"2449050b8a140dcd90e5760813ec8fd430e1f86e",class:{"hb-date-range-picker":true,"hb-date-range-picker--open":this.isOpen,"hb-date-range-picker--disabled":this.disabled,[`hb-date-range-picker--${this.size}`]:true}},a("div",{key:"de9e91f0a42b8ddaf6b1157e0a4784e01e37ecbb",class:"hb-date-range-picker__input-wrapper",onClick:this.handleTriggerClick},a("input",{key:"c4d214489d6b01061889d04f83460802758fcd21",type:"text",name:this.name,class:"hb-date-range-picker__input",placeholder:this.placeholder[0]||"开始日期",value:this.displayStart,disabled:this.disabled,readonly:true}),a("span",{key:"40db9eb30725498a6d4860c6916c0f10b7787d02",class:"hb-date-range-picker__separator"},"至"),a("input",{key:"b8dbe546d411b21fab4a8c8e341c59315d8694e7",type:"text",class:"hb-date-range-picker__input",placeholder:this.placeholder[1]||"结束日期",value:this.displayEnd,disabled:this.disabled,readonly:true}),a("span",{key:"dde8b66f4deacb6d7c7339a88b7403a650a2d985",class:"hb-date-range-picker__suffix"},t&&a("span",{key:"984e99ed8af3de2d525cbb7d483af0a006fd77b9",class:"hb-date-range-picker__clear",onClick:this.handleClear},"×"),a("span",{key:"ca489ea7075035a405554477a525eb21f74ac72c",class:"hb-date-range-picker__icon"},"📅"))),this.isOpen&&a("div",{key:"3c53193d613b99f6ba3e7067ecf4a64cb948251f",class:"hb-date-range-picker__dropdown"},this.renderMonth(this.leftViewDate,"left"),this.renderMonth(e,"right")))}static get watchers(){return{modelValue:["handleModelValueChange"]}}};f.style=b;export{f as hb_date_range_picker};
2
- //# sourceMappingURL=p-a8996d22.entry.js.map
1
+ import{r as e,c as t,g as i,h as a}from"./p-e42dfa95.js";import{p as r,f as o,a as n,i as s,g as d,W as l,M as h}from"./p-e0876aca.js";import{c}from"./p-4ef5a884.js";const p='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:inline-block}.hb-date-range-picker{display:inline-block;position:relative}.hb-date-range-picker__input-wrapper{align-items:center;cursor:pointer;display:inline-flex;gap:4px}.hb-date-range-picker__input{background-color:var(--hb-color-bg-container,#fff);border:1px solid var(--hb-color-border,#dcdfe6);border-radius:var(--hb-border-radius-base,4px);box-sizing:border-box;color:var(--hb-color-text,#606266);cursor:pointer;font-size:var(--hb-font-size-base,14px);height:var(--hb-size-default,32px);line-height:var(--hb-size-default,32px);outline:none;padding:0 8px;transition:border-color var(--hb-transition-duration,.2s)ease;width:140px}.hb-date-range-picker__input:hover:not(:disabled){border-color:var(--hb-color-primary,#1677ff)}.hb-date-range-picker__separator{color:var(--hb-color-text-secondary,#909399);font-size:var(--hb-font-size-base,14px)}.hb-date-range-picker__suffix{align-items:center;display:inline-flex;margin-left:-28px;pointer-events:none}.hb-date-range-picker__clear{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:16px;pointer-events:auto;transition:color var(--hb-transition-duration,.2s)ease}.hb-date-range-picker__clear:hover{color:var(--hb-color-text,#606266)}.hb-date-range-picker__icon{font-size:14px}.hb-date-range-picker__dropdown{background-color:var(--hb-color-bg-container,#fff);border:1px solid var(--hb-color-border,#dcdfe6);border-radius:var(--hb-border-radius-base,4px);box-shadow:var(--hb-box-shadow-lg,0 2px 12px 0 #0000001a);display:flex;gap:8px;left:0;margin-top:4px;padding:8px;position:absolute;top:100%;z-index:var(--hb-z-index-dropdown,1050)}.hb-date-range-picker__pane{min-width:280px;padding:12px}.hb-date-range-picker__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-date-range-picker__header-label{color:var(--hb-color-text,#606266);font-size:var(--hb-font-size-base,14px);font-weight:600}.hb-date-range-picker__next-btn,.hb-date-range-picker__prev-btn{background:0 0;border:none;color:var(--hb-color-text,#606266);cursor:pointer;font-size:18px;padding:4px 8px;transition:color var(--hb-transition-duration,.2s)ease}.hb-date-range-picker__next-btn:hover,.hb-date-range-picker__prev-btn:hover{color:var(--hb-color-primary,#1677ff)}.hb-date-range-picker__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-date-range-picker__weekday{color:var(--hb-color-text-tertiary,#909399);font-size:var(--hb-font-size-sm,12px);font-weight:500;text-align:center}.hb-date-range-picker__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-date-range-picker__day{align-items:center;aspect-ratio:1;border-radius:var(--hb-border-radius-base,4px);color:var(--hb-color-text,#606266);cursor:pointer;display:flex;font-size:13px;justify-content:center;transition:all var(--hb-transition-duration,.2s)ease}.hb-date-range-picker__day:hover:not(.hb-date-range-picker__day--other-month){background-color:var(--hb-color-fill-tertiary,#f5f7fa)}.hb-date-range-picker__day--other-month{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:default}.hb-date-range-picker__day--disabled{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:not-allowed}.hb-date-range-picker__day--disabled:hover{background-color:#0000}.hb-date-range-picker__day--today{color:var(--hb-color-primary,#1677ff);font-weight:600}.hb-date-range-picker__day--in-range{background-color:var(--hb-color-primary-bg,#e6f4ff);border-radius:0}.hb-date-range-picker__day--end,.hb-date-range-picker__day--start{background-color:var(--hb-color-primary,#1677ff);color:var(--hb-color-text-inverse,#fff)}.hb-date-range-picker--small .hb-date-range-picker__input{font-size:var(--hb-font-size-sm,12px);height:var(--hb-size-sm,24px);line-height:var(--hb-size-sm,24px)}.hb-date-range-picker--large .hb-date-range-picker__input{font-size:var(--hb-font-size-lg,16px);height:var(--hb-size-lg,40px);line-height:var(--hb-size-lg,40px)}.hb-date-range-picker--disabled{cursor:not-allowed}.hb-date-range-picker--disabled .hb-date-range-picker__input{background-color:var(--hb-color-fill-tertiary,#f5f7fa);color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}';const b=p;const f=class{constructor(i){e(this,i);this.hbChange=t(this,"hbChange",7);this.hbVisibleChange=t(this,"hbVisibleChange",7)}get el(){return i(this)}modelValue=[];placeholder=["开始日期","结束日期"];disabled=false;clearable=false;size="default";format="YYYY-MM-DD";disabledDate;name;hbChange;hbVisibleChange;isOpen=false;leftViewDate=new Date;startDate;endDate;pickingEnd=false;hoverDate;clickOutside=c({host:null,isOpen:()=>this.isOpen,onClose:()=>this.closePanel()});componentDidLoad(){this.clickOutside=c({host:this.el,isOpen:()=>this.isOpen,onClose:()=>this.closePanel()});this.clickOutside.connect();this.syncFromModelValue()}disconnectedCallback(){this.clickOutside.disconnect()}handleModelValueChange(){this.syncFromModelValue()}syncFromModelValue(){if(!this.modelValue||this.modelValue.length===0){this.startDate=undefined;this.endDate=undefined;this.pickingEnd=false;return}this.startDate=r(this.modelValue[0]);this.endDate=r(this.modelValue[1]);this.pickingEnd=false}get displayStart(){return this.startDate?o(this.startDate,this.format):""}get displayEnd(){return this.endDate?o(this.endDate,this.format):""}openPanel(){if(this.disabled)return;this.isOpen=true;this.hbVisibleChange.emit(true)}closePanel(){if(!this.isOpen)return;this.isOpen=false;this.hoverDate=undefined;this.pickingEnd=false;this.hbVisibleChange.emit(false)}handleTriggerClick=()=>{if(this.disabled)return;if(this.isOpen){this.closePanel()}else{this.openPanel()}};handleClear=e=>{e.stopPropagation();this.startDate=undefined;this.endDate=undefined;this.pickingEnd=false;this.modelValue=[];this.hbChange.emit([]);this.closePanel()};changeMonth(e){this.leftViewDate=n(this.leftViewDate,e)}isDateDisabled=e=>!!this.disabledDate&&this.disabledDate(e);handleDayClick=e=>{if(this.isDateDisabled(e))return;if(!this.startDate||this.startDate&&this.endDate||!this.pickingEnd){this.startDate=e;this.endDate=undefined;this.pickingEnd=true;return}if(e.getTime()<this.startDate.getTime()){this.endDate=this.startDate;this.startDate=e}else{this.endDate=e}this.pickingEnd=false;this.commitRange()};commitRange(){if(!this.startDate||!this.endDate)return;const e=o(this.startDate,this.format);const t=o(this.endDate,this.format);this.modelValue=[e,t];this.hbChange.emit([e,t]);this.closePanel()}handleDayHover=e=>{if(this.pickingEnd){this.hoverDate=e}};isStart(e){return!!this.startDate&&s(this.startDate,e)}isEnd(e){return!!this.endDate&&s(this.endDate,e)}isInRange(e){if(!this.startDate)return false;const t=this.endDate||this.hoverDate;if(!t)return false;const i=e.getTime();const a=this.startDate.getTime();const r=t.getTime();const o=Math.min(a,r);const n=Math.max(a,r);return i>o&&i<n}renderMonth(e,t){const i=d(e,undefined);return a("div",{class:"hb-date-range-picker__pane"},a("div",{class:"hb-date-range-picker__header"},t==="left"&&a("button",{type:"button",class:"hb-date-range-picker__prev-btn",onClick:()=>this.changeMonth(-1),"aria-label":"上个月"},"‹"),a("span",{class:"hb-date-range-picker__header-label"},e.getFullYear(),"年 ",h[e.getMonth()]),t==="right"&&a("button",{type:"button",class:"hb-date-range-picker__next-btn",onClick:()=>this.changeMonth(1),"aria-label":"下个月"},"›")),a("div",{class:"hb-date-range-picker__weekdays"},l.map((e=>a("div",{class:"hb-date-range-picker__weekday"},e)))),a("div",{class:"hb-date-range-picker__days"},i.map(((e,t)=>{const i=e.isCurrentMonth&&this.isDateDisabled(e.date);return a("div",{key:t,class:{"hb-date-range-picker__day":true,"hb-date-range-picker__day--other-month":!e.isCurrentMonth,"hb-date-range-picker__day--today":e.isToday,"hb-date-range-picker__day--start":this.isStart(e.date),"hb-date-range-picker__day--end":this.isEnd(e.date),"hb-date-range-picker__day--in-range":this.isInRange(e.date),"hb-date-range-picker__day--disabled":i},role:"gridcell","aria-disabled":!e.isCurrentMonth||i?"true":undefined,onClick:()=>e.isCurrentMonth&&!i&&this.handleDayClick(e.date),onMouseEnter:()=>e.isCurrentMonth&&!i&&this.handleDayHover(e.date)},e.date.getDate())}))))}render(){const e=n(this.leftViewDate,1);const t=this.clearable&&!!this.startDate&&!!this.endDate&&!this.disabled;return a("div",{key:"2449050b8a140dcd90e5760813ec8fd430e1f86e",class:{"hb-date-range-picker":true,"hb-date-range-picker--open":this.isOpen,"hb-date-range-picker--disabled":this.disabled,[`hb-date-range-picker--${this.size}`]:true}},a("div",{key:"de9e91f0a42b8ddaf6b1157e0a4784e01e37ecbb",class:"hb-date-range-picker__input-wrapper",onClick:this.handleTriggerClick},a("input",{key:"c4d214489d6b01061889d04f83460802758fcd21",type:"text",name:this.name,class:"hb-date-range-picker__input",placeholder:this.placeholder[0]||"开始日期",value:this.displayStart,disabled:this.disabled,readonly:true}),a("span",{key:"40db9eb30725498a6d4860c6916c0f10b7787d02",class:"hb-date-range-picker__separator"},"至"),a("input",{key:"b8dbe546d411b21fab4a8c8e341c59315d8694e7",type:"text",class:"hb-date-range-picker__input",placeholder:this.placeholder[1]||"结束日期",value:this.displayEnd,disabled:this.disabled,readonly:true}),a("span",{key:"dde8b66f4deacb6d7c7339a88b7403a650a2d985",class:"hb-date-range-picker__suffix"},t&&a("span",{key:"984e99ed8af3de2d525cbb7d483af0a006fd77b9",class:"hb-date-range-picker__clear",onClick:this.handleClear},"×"),a("span",{key:"ca489ea7075035a405554477a525eb21f74ac72c",class:"hb-date-range-picker__icon"},"📅"))),this.isOpen&&a("div",{key:"3c53193d613b99f6ba3e7067ecf4a64cb948251f",class:"hb-date-range-picker__dropdown"},this.renderMonth(this.leftViewDate,"left"),this.renderMonth(e,"right")))}static get watchers(){return{modelValue:["handleModelValueChange"]}}};f.style=b;export{f as hb_date_range_picker};
2
+ //# sourceMappingURL=p-815fc943.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as t}from"./p-e42dfa95.js";const i='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-space-size:8px;--hb-space-alignment:start;--hb-space-fill-ratio:100%;display:inline-flex}.hb-space{align-items:var(--hb-space-alignment);display:inline-flex;flex-wrap:nowrap;gap:var(--hb-space-size)}.hb-space--horizontal{flex-direction:row}.hb-space--vertical{flex-direction:column}.hb-space--wrap{flex-wrap:wrap}.hb-space--fill,.hb-space--fill.hb-space--horizontal{width:100%}.hb-space--fill.hb-space--vertical{height:100%}::slotted(*){display:inline-block;flex-shrink:0;margin:0}.hb-space__item{align-items:center;display:inline-flex}.hb-space__item+.hb-space__item:before{color:var(--hb-color-text-placeholder,#c0c4cc);content:attr(data-separator);display:inline-block;margin:0 var(--hb-space-size)}@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 o=i;const a=class{constructor(t){e(this,t)}size="small";direction="horizontal";wrap=false;alignment="start";fill=false;fillRatio=100;getSizeValue(){if(typeof this.size==="number"){return`${this.size}px`}const e={small:"8px",default:"16px",large:"24px"};return e[this.size]}render(){const e=this.getSizeValue();return t("div",{key:"23205a0d926148969e1dc0c98dee9b81f52e921e",class:{"hb-space":true,[`hb-space--${this.direction}`]:true,"hb-space--wrap":this.wrap&&this.direction==="horizontal","hb-space--fill":this.fill},style:{"--hb-space-size":e,"--hb-space-alignment":this.alignment,"--hb-space-fill-ratio":`${this.fillRatio}%`}},t("slot",{key:"b313162f92bf63bc8926b15af1a7f0bbe3d0295d"}))}};a.style=o;export{a as hb_space};
2
- //# sourceMappingURL=p-af74667d.entry.js.map
1
+ import{r as e,h as t}from"./p-e42dfa95.js";const i='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-space-size:8px;--hb-space-alignment:start;--hb-space-fill-ratio:100%;display:inline-flex}.hb-space{align-items:var(--hb-space-alignment);display:inline-flex;flex-wrap:nowrap;gap:var(--hb-space-size)}.hb-space--horizontal{flex-direction:row}.hb-space--vertical{flex-direction:column}.hb-space--wrap{flex-wrap:wrap}.hb-space--fill,.hb-space--fill.hb-space--horizontal{width:100%}.hb-space--fill.hb-space--vertical{height:100%}::slotted(*){display:inline-block;flex-shrink:0;margin:0}.hb-space__item{align-items:center;display:inline-flex}.hb-space__item+.hb-space__item:before{color:var(--hb-color-text-placeholder,#c0c4cc);content:attr(data-separator);display:inline-block;margin:0 var(--hb-space-size)}@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 o=i;const a=class{constructor(t){e(this,t)}size="small";direction="horizontal";wrap=false;alignment="start";fill=false;fillRatio=100;getSizeValue(){if(typeof this.size==="number"){return`${this.size}px`}const e={small:"8px",default:"16px",large:"24px"};return e[this.size]}render(){const e=this.getSizeValue();return t("div",{key:"bf6b529ca457b65b9cdb9180dc31d88829f9605b",class:{"hb-space":true,[`hb-space--${this.direction}`]:true,"hb-space--wrap":this.wrap&&this.direction==="horizontal","hb-space--fill":this.fill},style:{"--hb-space-size":e,"--hb-space-alignment":this.alignment,"--hb-space-fill-ratio":`${this.fillRatio}%`}},t("slot",{key:"5c9c0891c379451ec3c8bb987530904171f49f36"}))}};a.style=o;export{a as hb_space};
2
+ //# sourceMappingURL=p-89be7973.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["sliderCss","HbSliderStyle0","Slider","modelValue","min","max","step","showTooltip","formatTooltip","disabled","range","vertical","height","marks","dragging","currentValue","tooltipVisible","tooltipValue","activeHandle","sliderRef","isDragging","dragHandle","hbChange","hbInput","componentDidLoad","this","normalizeInitial","addEventListeners","disconnectedCallback","removeEventListeners","handleModelChange","v","Array","isArray","length","document","addEventListener","handleMouseMove","handleMouseUp","removeEventListener","getPercentage","value","getValueFromPercentage","percentage","snapped","Math","round","resolveHandle","vals","leftPct","rightPct","abs","handleMouseDown","e","handle","preventDefault","handleDrag","emit","rect","getBoundingClientRect","clientY","top","clientX","left","width","clampedPercentage","lo","hi","handleKeyDown","key","isDecrease","isIncrease","isBigDecrease","isBigIncrease","delta","next","formatValue","String","markList","Object","entries","map","k","Number","label","render","singlePct","rangeVals","barStart","barSize","posProp","sizeProp","renderHandle","pct","tooltipVal","isActive","h","class","style","onMouseDown","onTouchStart","handleTouchStart","role","tabindex","onKeyDown","undefined","ref","el","m","touch","touches","dragFromTouch","move","ev","t","end","passive","clamped"],"sources":["src/components/Slider/slider.css?tag=hb-slider&encapsulation=shadow","src/components/Slider/Slider.tsx"],"sourcesContent":[":host {\n display: inline-block;\n --hb-slider-main-bg-color: var(--hb-color-primary);\n --hb-slider-runway-bg-color: var(--hb-fill-color-light, #e4e7ed);\n --hb-slider-stop-bg-color: var(--hb-color-white, #ffffff);\n --hb-slider-button-size: 20px;\n}\n\n.hb-slider {\n width: 100%;\n height: 40px;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.hb-slider--vertical {\n width: 40px;\n height: 100%;\n flex-direction: column;\n}\n\n.hb-slider__runway {\n width: 100%;\n height: 6px;\n margin: 16px 0;\n background-color: var(--hb-slider-runway-bg-color);\n border-radius: 3px;\n position: relative;\n cursor: pointer;\n vertical-align: middle;\n}\n\n.hb-slider--vertical .hb-slider__runway {\n width: 6px;\n height: 100%;\n margin: 0 16px;\n}\n\n.hb-slider__bar {\n height: 6px;\n background-color: var(--hb-slider-main-bg-color);\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n position: absolute;\n top: 0;\n}\n\n.hb-slider--vertical .hb-slider__bar {\n width: 6px;\n height: auto;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n border-bottom-left-radius: 0;\n bottom: 0;\n top: auto;\n}\n\n.hb-slider__button-wrapper {\n position: absolute;\n z-index: 1001;\n top: 50%;\n transform: translate(-50%, -50%);\n background-color: transparent;\n text-align: center;\n user-select: none;\n outline: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n\n.hb-slider--vertical .hb-slider__button-wrapper {\n left: 50%;\n top: auto;\n transform: translate(-50%, 50%);\n}\n\n.hb-slider__button {\n width: var(--hb-slider-button-size);\n height: var(--hb-slider-button-size);\n background-color: var(--hb-color-white, #ffffff);\n border: 2px solid var(--hb-slider-main-bg-color);\n border-radius: 50%;\n transition: 0.2s;\n user-select: none;\n cursor: grab;\n}\n\n.hb-slider__button:active {\n cursor: grabbing;\n}\n\n.hb-slider__button-wrapper:hover .hb-slider__button,\n.hb-slider__button-wrapper--hover .hb-slider__button {\n transform: scale(1.2);\n}\n\n.hb-slider__tooltip {\n position: absolute;\n bottom: calc(100% + 12px);\n left: 50%;\n transform: translateX(-50%);\n padding: 6px 8px;\n background-color: rgba(0, 0, 0, 0.75);\n color: var(--hb-color-white, #ffffff);\n border-radius: 4px;\n font-size: 12px;\n white-space: nowrap;\n}\n\n.hb-slider__tooltip::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n border: 4px solid transparent;\n border-top-color: rgba(0, 0, 0, 0.75);\n}\n\n.hb-slider--disabled {\n cursor: not-allowed;\n}\n\n.hb-slider--disabled .hb-slider__runway {\n cursor: not-allowed;\n background-color: var(--hb-fill-color-light, #e4e7ed);\n}\n\n.hb-slider--disabled .hb-slider__bar {\n background-color: var(--hb-color-text-disabled, #c0c4cc);\n}\n\n.hb-slider--disabled .hb-slider__button {\n border-color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n\n/* ---- 刻度标记(marks)---- */\n.hb-slider__mark {\n position: absolute;\n top: 0;\n width: 2px;\n height: 6px;\n transform: translateX(-50%);\n background-color: var(--hb-color-border, #dcdfe6);\n pointer-events: none;\n}\n\n.hb-slider__mark-label {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: var(--hb-spacing-xs, 4px);\n font-size: var(--hb-font-size-xs, 12px);\n color: var(--hb-color-text-secondary, #606266);\n white-space: nowrap;\n}\n\n/* 有刻度时给底部留出标签空间 */\n.hb-slider--with-marks {\n padding-bottom: var(--hb-spacing-lg, 16px);\n}\n\n.hb-slider--vertical .hb-slider__mark {\n top: auto;\n left: 50%;\n width: 6px;\n height: 2px;\n transform: translate(-50%, -50%);\n}\n\n.hb-slider--vertical .hb-slider__mark-label {\n top: 50%;\n left: 100%;\n transform: translateY(-50%);\n margin-top: 0;\n margin-left: var(--hb-spacing-xs, 4px);\n}\n\n/* 聚焦态:对齐 antd 的蓝色外圈 */\n.hb-slider__button-wrapper:focus {\n outline: none;\n}\n\n.hb-slider__button-wrapper:focus-visible .hb-slider__button {\n box-shadow: 0 0 0 4px var(--hb-color-primary-bg, rgba(22, 119, 255, 0.12));\n}\n\n","import { Component, h, Prop, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\n\n/** 刻度定义:值 →(可选)标签 */\nexport interface SliderMark {\n value: number;\n label?: string;\n}\n\n/**\n * Slider 滑块组件\n * 通过拖动滑块在一个固定区间内进行选择,支持单滑块/双滑块(range)/竖向/刻度。\n */\n@Component({\n tag: 'hb-slider',\n styleUrl: 'slider.css',\n shadow: true,\n})\nexport class Slider {\n @Element() el: HTMLElement;\n\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue: number | number[] = 0;\n\n /**\n * 最小值\n * @default 0\n */\n @Prop() min: number = 0;\n\n /**\n * 最大值\n * @default 100\n */\n @Prop() max: number = 100;\n\n /**\n * 步长\n * @default 1\n */\n @Prop() step: number = 1;\n\n /**\n * 是否显示工具提示\n * @default true\n */\n @Prop() showTooltip: boolean = true;\n\n /**\n * 格式化 tooltip message\n */\n @Prop() formatTooltip?: (value: number) => string;\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否为范围选择\n * @default false\n */\n @Prop() range: boolean = false;\n\n /**\n * 是否竖向模式\n * @default false\n */\n @Prop() vertical: boolean = false;\n\n /**\n * 高度,竖向模式时必填\n */\n @Prop() height?: string;\n\n /**\n * 刻度标记(对齐 antd marks)\n */\n @Prop() marks?: SliderMark[] | Record<number, string>;\n\n @State() dragging: boolean = false;\n @State() currentValue: number | number[] = 0;\n @State() tooltipVisible: boolean = false;\n @State() tooltipValue: number = 0;\n /** range 模式下当前拖动的是哪个手柄(0/1),用于 tooltip 定位与渲染 */\n @State() activeHandle: 0 | 1 = 0;\n\n private sliderRef?: HTMLDivElement;\n private isDragging: boolean = false;\n /** 拖动期间锁定的手柄索引(鼠标按下时确定) */\n private dragHandle: 0 | 1 | null = null;\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<number | number[]>;\n\n /**\n * 值改变事件(拖拽时实时触发)\n */\n @Event() hbInput: EventEmitter<number | number[]>;\n\n componentDidLoad() {\n this.currentValue = this.normalizeInitial(this.modelValue);\n this.addEventListeners();\n }\n\n disconnectedCallback() {\n this.removeEventListeners();\n }\n\n /** 外部更新 modelValue 时同步内部 currentValue(对齐 antd 受控语义) */\n @Watch('modelValue')\n handleModelChange() {\n if (!this.isDragging) {\n this.currentValue = this.normalizeInitial(this.modelValue);\n }\n }\n\n /** range 模式下确保 currentValue 为 [min, max] 形状的有序数组 */\n private normalizeInitial(v: number | number[]): number | number[] {\n if (this.range) {\n if (Array.isArray(v) && v.length === 2) {\n return v[0] <= v[1] ? [v[0], v[1]] : [v[1], v[0]];\n }\n return [this.min, this.max];\n }\n return typeof v === 'number' ? v : (Array.isArray(v) ? v[0] ?? this.min : this.min);\n }\n\n private addEventListeners() {\n document.addEventListener('mousemove', this.handleMouseMove);\n document.addEventListener('mouseup', this.handleMouseUp);\n }\n\n private removeEventListeners() {\n document.removeEventListener('mousemove', this.handleMouseMove);\n document.removeEventListener('mouseup', this.handleMouseUp);\n }\n\n private getPercentage(value: number): number {\n if (this.max === this.min) return 0;\n return ((value - this.min) / (this.max - this.min)) * 100;\n }\n\n private getValueFromPercentage(percentage: number): number {\n const value = this.min + (percentage / 100) * (this.max - this.min);\n const snapped = Math.round(value / this.step) * this.step;\n return Math.max(this.min, Math.min(this.max, snapped));\n }\n\n /** 鼠标按下时根据落点决定拖哪个手柄(range:更近的那个) */\n private resolveHandle(percentage: number): 0 | 1 {\n if (!this.range) return 0;\n const vals = this.currentValue as number[];\n const leftPct = this.getPercentage(vals[0]);\n const rightPct = this.getPercentage(vals[1]);\n return Math.abs(percentage - leftPct) <= Math.abs(percentage - rightPct) ? 0 : 1;\n }\n\n private handleMouseDown = (e: MouseEvent, handle: 0 | 1 | null = null) => {\n if (this.disabled) return;\n e.preventDefault();\n this.isDragging = true;\n this.dragging = true;\n this.dragHandle = handle;\n this.handleDrag(e);\n };\n\n private handleMouseMove = (e: MouseEvent) => {\n if (!this.isDragging) return;\n this.handleDrag(e);\n };\n\n private handleMouseUp = () => {\n if (!this.isDragging) return;\n this.isDragging = false;\n this.dragging = false;\n this.tooltipVisible = false;\n this.dragHandle = null;\n this.hbChange.emit(this.currentValue);\n };\n\n private handleDrag(e: MouseEvent) {\n if (!this.sliderRef) return;\n\n const rect = this.sliderRef.getBoundingClientRect();\n const percentage = this.vertical\n ? 1 - (e.clientY - rect.top) / rect.height\n : (e.clientX - rect.left) / rect.width;\n\n const clampedPercentage = Math.max(0, Math.min(100, percentage * 100));\n const value = this.getValueFromPercentage(clampedPercentage);\n\n if (this.range) {\n const vals = this.currentValue as number[];\n // 优先用 mousedown 时锁定的手柄;未锁定(点击 runway)则按落点就近\n const handle = this.dragHandle !== null ? this.dragHandle : this.resolveHandle(clampedPercentage);\n this.activeHandle = handle;\n let [lo, hi] = [vals[0], vals[1]];\n if (handle === 0) {\n lo = Math.min(value, hi);\n } else {\n hi = Math.max(value, lo);\n }\n this.currentValue = [lo, hi];\n this.tooltipValue = handle === 0 ? lo : hi;\n this.tooltipVisible = true;\n } else {\n this.activeHandle = 0;\n this.currentValue = value;\n this.tooltipValue = value;\n this.tooltipVisible = true;\n }\n\n this.modelValue = this.currentValue;\n this.hbInput.emit(this.currentValue);\n }\n\n /** 键盘可访问:方向键调整当前手柄,对齐 WAI-ARIA slider pattern */\n private handleKeyDown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n const { key } = e;\n const isDecrease = key === 'ArrowLeft' || key === 'ArrowDown';\n const isIncrease = key === 'ArrowRight' || key === 'ArrowUp';\n const isBigDecrease = key === 'PageDown' || key === 'Home';\n const isBigIncrease = key === 'PageUp' || key === 'End';\n if (!isDecrease && !isIncrease && !isBigDecrease && !isBigIncrease) return;\n\n e.preventDefault();\n const delta =\n isBigDecrease ? -this.max :\n isBigIncrease ? this.max :\n (isDecrease ? -1 : 1) * this.step;\n\n if (this.range) {\n const vals = this.currentValue as number[];\n let [lo, hi] = [vals[0], vals[1]];\n if (this.activeHandle === 0) {\n lo = Math.max(this.min, Math.min(lo + delta, hi));\n } else {\n hi = Math.min(this.max, Math.max(hi + delta, lo));\n }\n this.currentValue = [lo, hi];\n this.tooltipValue = this.activeHandle === 0 ? lo : hi;\n this.tooltipVisible = true;\n } else {\n const next = Math.max(this.min, Math.min((this.currentValue as number) + delta, this.max));\n this.currentValue = next;\n this.tooltipValue = next;\n this.tooltipVisible = true;\n }\n this.modelValue = this.currentValue;\n this.hbChange.emit(this.currentValue);\n this.hbInput.emit(this.currentValue);\n };\n\n private formatValue(value: number): string {\n if (this.formatTooltip) {\n return this.formatTooltip(value);\n }\n return String(value);\n }\n\n /** 规范化 marks 为 [{value,label}] 数组 */\n private get markList(): { value: number; label?: string }[] {\n if (!this.marks) return [];\n if (Array.isArray(this.marks)) return this.marks;\n return Object.entries(this.marks).map(([k, v]) => ({ value: Number(k), label: v as string }));\n }\n\n render() {\n const range = this.range;\n const singlePct = this.getPercentage(this.currentValue as number);\n const rangeVals = range ? (this.currentValue as number[]) : [0, 0];\n const leftPct = range ? this.getPercentage(rangeVals[0]) : 0;\n const rightPct = range ? this.getPercentage(rangeVals[1]) : singlePct;\n // bar:单滑块从 min 到 value;range 从 lo 到 hi\n const barStart = range ? leftPct : 0;\n const barSize = range ? rightPct - leftPct : singlePct;\n const posProp = this.vertical ? 'bottom' : 'left';\n const sizeProp = this.vertical ? 'height' : 'width';\n\n const renderHandle = (handle: 0 | 1, pct: number) => {\n const tooltipVal = range ? rangeVals[handle] : (this.currentValue as number);\n const isActive = this.tooltipVisible && (range ? this.activeHandle === handle : true);\n return (\n <div\n class={{\n 'hb-slider__button-wrapper': true,\n 'hb-slider__button-wrapper--hover': isActive,\n }}\n style={{ [posProp]: `${pct}%` }}\n onMouseDown={(e: MouseEvent) => this.handleMouseDown(e, handle)}\n onTouchStart={(e: TouchEvent) => this.handleTouchStart(e, handle)}\n role=\"slider\"\n tabindex={this.disabled ? -1 : 0}\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n aria-valuenow={tooltipVal}\n aria-valuetext={this.formatValue(tooltipVal)}\n aria-orientation={this.vertical ? 'vertical' : 'horizontal'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onKeyDown={this.handleKeyDown}\n >\n {this.showTooltip && isActive && (\n <div class=\"hb-slider__tooltip\">{this.formatValue(this.tooltipValue)}</div>\n )}\n <div class=\"hb-slider__button\"></div>\n </div>\n );\n };\n\n return (\n <div\n class={{\n 'hb-slider': true,\n 'hb-slider--vertical': this.vertical,\n 'hb-slider--disabled': this.disabled,\n 'hb-slider--with-marks': this.markList.length > 0,\n }}\n style={this.vertical && this.height ? { height: this.height } : undefined}\n >\n <div\n class=\"hb-slider__runway\"\n ref={(el) => (this.sliderRef = el as HTMLDivElement)}\n onMouseDown={(e: MouseEvent) => this.handleMouseDown(e, null)}\n onTouchStart={(e: TouchEvent) => this.handleTouchStart(e, null)}\n >\n <div\n class=\"hb-slider__bar\"\n style={{\n [sizeProp]: `${Math.max(0, barSize)}%`,\n [posProp]: `${barStart}%`,\n }}\n ></div>\n {this.markList.map(m => {\n const pct = this.getPercentage(m.value);\n return (\n <div\n class=\"hb-slider__mark\"\n style={{ [posProp]: `${pct}%` }}\n aria-hidden=\"true\"\n >\n {m.label && <span class=\"hb-slider__mark-label\">{m.label}</span>}\n </div>\n );\n })}\n {range ? renderHandle(0, leftPct) : null}\n {renderHandle(range ? 1 : 0, range ? rightPct : singlePct)}\n </div>\n </div>\n );\n }\n\n /** 触屏支持:把 touch 事件映射到 mouse 同等逻辑(移动端可用) */\n private handleTouchStart = (e: TouchEvent, handle: 0 | 1 | null) => {\n if (this.disabled) return;\n e.preventDefault();\n const touch = e.touches[0];\n this.isDragging = true;\n this.dragging = true;\n this.dragHandle = handle;\n this.dragFromTouch(touch.clientX, touch.clientY);\n const move = (ev: TouchEvent) => {\n const t = ev.touches[0];\n this.dragFromTouch(t.clientX, t.clientY);\n };\n const end = () => {\n this.isDragging = false;\n this.dragging = false;\n this.tooltipVisible = false;\n this.dragHandle = null;\n this.hbChange.emit(this.currentValue);\n document.removeEventListener('touchmove', move);\n document.removeEventListener('touchend', end);\n };\n document.addEventListener('touchmove', move, { passive: false });\n document.addEventListener('touchend', end);\n };\n\n private dragFromTouch(clientX: number, clientY: number) {\n if (!this.sliderRef) return;\n const rect = this.sliderRef.getBoundingClientRect();\n const percentage = this.vertical\n ? 1 - (clientY - rect.top) / rect.height\n : (clientX - rect.left) / rect.width;\n const clamped = Math.max(0, Math.min(100, percentage * 100));\n const value = this.getValueFromPercentage(clamped);\n if (this.range) {\n const vals = this.currentValue as number[];\n const handle = this.dragHandle !== null ? this.dragHandle : this.resolveHandle(clamped);\n this.activeHandle = handle;\n let [lo, hi] = [vals[0], vals[1]];\n if (handle === 0) lo = Math.min(value, hi);\n else hi = Math.max(value, lo);\n this.currentValue = [lo, hi];\n this.tooltipValue = handle === 0 ? lo : hi;\n this.tooltipVisible = true;\n } else {\n this.currentValue = value;\n this.tooltipValue = value;\n this.tooltipVisible = true;\n }\n this.modelValue = this.currentValue;\n this.hbInput.emit(this.currentValue);\n }\n}\n\n"],"mappings":"yDAAA,MAAMA,EAAY,kzRAClB,MAAAC,EAAeD,E,MCgBFE,EAAM,M,qHAMQC,WAAgC,EAMjDC,IAAc,EAMdC,IAAc,IAMdC,KAAe,EAMfC,YAAuB,KAKvBC,cAMAC,SAAoB,MAMpBC,MAAiB,MAMjBC,SAAoB,MAKpBC,OAKAC,MAECC,SA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AAKJ,WAAaI,KAAKsB,cAAcsE,GAC/E5F,KAAKP,aAAeoC,EACpB,IAAKY,EAAIC,GAAM,CAACnB,EAAK,GAAIA,EAAK,IAC9B,GAAIM,IAAW,EAAGY,EAAKrB,KAAKzC,IAAIqC,EAAO0B,QAClCA,EAAKtB,KAAKxC,IAAIoC,EAAOyB,GAC1BzC,KAAKV,aAAe,CAACmD,EAAIC,GACzB1C,KAAKR,aAAeqC,IAAW,EAAIY,EAAKC,EACxC1C,KAAKT,eAAiB,I,KACjB,CACLS,KAAKV,aAAe0B,EACpBhB,KAAKR,aAAewB,EACpBhB,KAAKT,eAAiB,I,CAExBS,KAAKtB,WAAasB,KAAKV,aACvBU,KAAKF,QAAQkC,KAAKhC,KAAKV,a","ignoreList":[]}
1
+ {"version":3,"names":["sliderCss","HbSliderStyle0","Slider","modelValue","min","max","step","showTooltip","formatTooltip","disabled","range","vertical","height","marks","dragging","currentValue","tooltipVisible","tooltipValue","activeHandle","sliderRef","isDragging","dragHandle","hbChange","hbInput","componentDidLoad","this","normalizeInitial","addEventListeners","disconnectedCallback","removeEventListeners","handleModelChange","v","Array","isArray","length","document","addEventListener","handleMouseMove","handleMouseUp","removeEventListener","getPercentage","value","getValueFromPercentage","percentage","snapped","Math","round","resolveHandle","vals","leftPct","rightPct","abs","handleMouseDown","e","handle","preventDefault","handleDrag","emit","rect","getBoundingClientRect","clientY","top","clientX","left","width","clampedPercentage","lo","hi","handleKeyDown","key","isDecrease","isIncrease","isBigDecrease","isBigIncrease","delta","next","formatValue","String","markList","Object","entries","map","k","Number","label","render","singlePct","rangeVals","barStart","barSize","posProp","sizeProp","renderHandle","pct","tooltipVal","isActive","h","class","style","onMouseDown","onTouchStart","handleTouchStart","role","tabindex","onKeyDown","undefined","ref","el","m","touch","touches","dragFromTouch","move","ev","t","end","passive","clamped"],"sources":["src/components/Slider/slider.css?tag=hb-slider&encapsulation=shadow","src/components/Slider/Slider.tsx"],"sourcesContent":[":host {\n display: inline-block;\n --hb-slider-main-bg-color: var(--hb-color-primary);\n --hb-slider-runway-bg-color: var(--hb-fill-color-light, #e4e7ed);\n --hb-slider-stop-bg-color: var(--hb-color-white, #ffffff);\n --hb-slider-button-size: 20px;\n}\n\n.hb-slider {\n width: 100%;\n height: 40px;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.hb-slider--vertical {\n width: 40px;\n height: 100%;\n flex-direction: column;\n}\n\n.hb-slider__runway {\n width: 100%;\n height: 6px;\n margin: 16px 0;\n background-color: var(--hb-slider-runway-bg-color);\n border-radius: 3px;\n position: relative;\n cursor: pointer;\n vertical-align: middle;\n}\n\n.hb-slider--vertical .hb-slider__runway {\n width: 6px;\n height: 100%;\n margin: 0 16px;\n}\n\n.hb-slider__bar {\n height: 6px;\n background-color: var(--hb-slider-main-bg-color);\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n position: absolute;\n top: 0;\n}\n\n.hb-slider--vertical .hb-slider__bar {\n width: 6px;\n height: auto;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n border-bottom-left-radius: 0;\n bottom: 0;\n top: auto;\n}\n\n.hb-slider__button-wrapper {\n position: absolute;\n z-index: 1001;\n top: 50%;\n transform: translate(-50%, -50%);\n background-color: transparent;\n text-align: center;\n user-select: none;\n outline: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n\n.hb-slider--vertical .hb-slider__button-wrapper {\n left: 50%;\n top: auto;\n transform: translate(-50%, 50%);\n}\n\n.hb-slider__button {\n width: var(--hb-slider-button-size);\n height: var(--hb-slider-button-size);\n background-color: var(--hb-color-white, #ffffff);\n border: 2px solid var(--hb-slider-main-bg-color);\n border-radius: 50%;\n transition: 0.2s;\n user-select: none;\n cursor: grab;\n}\n\n.hb-slider__button:active {\n cursor: grabbing;\n}\n\n.hb-slider__button-wrapper:hover .hb-slider__button,\n.hb-slider__button-wrapper--hover .hb-slider__button {\n transform: scale(1.2);\n}\n\n.hb-slider__tooltip {\n position: absolute;\n bottom: calc(100% + 12px);\n left: 50%;\n transform: translateX(-50%);\n padding: 6px 8px;\n background-color: rgba(0, 0, 0, 0.75);\n color: var(--hb-color-white, #ffffff);\n border-radius: 4px;\n font-size: 12px;\n white-space: nowrap;\n}\n\n.hb-slider__tooltip::after {\n content: '';\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n border: 4px solid transparent;\n border-top-color: rgba(0, 0, 0, 0.75);\n}\n\n.hb-slider--disabled {\n cursor: not-allowed;\n}\n\n.hb-slider--disabled .hb-slider__runway {\n cursor: not-allowed;\n background-color: var(--hb-fill-color-light, #e4e7ed);\n}\n\n.hb-slider--disabled .hb-slider__bar {\n background-color: var(--hb-color-text-disabled, #c0c4cc);\n}\n\n.hb-slider--disabled .hb-slider__button {\n border-color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n\n/* ---- 刻度标记(marks)---- */\n.hb-slider__mark {\n position: absolute;\n top: 0;\n width: 2px;\n height: 6px;\n transform: translateX(-50%);\n background-color: var(--hb-color-border, #dcdfe6);\n pointer-events: none;\n}\n\n.hb-slider__mark-label {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: var(--hb-spacing-xs, 4px);\n font-size: var(--hb-font-size-xs, 12px);\n color: var(--hb-color-text-secondary, #606266);\n white-space: nowrap;\n}\n\n/* 有刻度时给底部留出标签空间 */\n.hb-slider--with-marks {\n padding-bottom: var(--hb-spacing-lg, 16px);\n}\n\n.hb-slider--vertical .hb-slider__mark {\n top: auto;\n left: 50%;\n width: 6px;\n height: 2px;\n transform: translate(-50%, -50%);\n}\n\n.hb-slider--vertical .hb-slider__mark-label {\n top: 50%;\n left: 100%;\n transform: translateY(-50%);\n margin-top: 0;\n margin-left: var(--hb-spacing-xs, 4px);\n}\n\n/* 聚焦态:对齐 antd 的蓝色外圈 */\n.hb-slider__button-wrapper:focus {\n outline: none;\n}\n\n.hb-slider__button-wrapper:focus-visible .hb-slider__button {\n box-shadow: 0 0 0 4px var(--hb-color-primary-bg, rgba(22, 119, 255, 0.12));\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\n\n/** 刻度定义:值 →(可选)标签 */\nexport interface SliderMark {\n value: number;\n label?: string;\n}\n\n/**\n * Slider 滑块组件\n * 通过拖动滑块在一个固定区间内进行选择,支持单滑块/双滑块(range)/竖向/刻度。\n */\n@Component({\n tag: 'hb-slider',\n styleUrl: 'slider.css',\n shadow: true,\n})\nexport class Slider {\n @Element() el: HTMLElement;\n\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue: number | number[] = 0;\n\n /**\n * 最小值\n * @default 0\n */\n @Prop() min: number = 0;\n\n /**\n * 最大值\n * @default 100\n */\n @Prop() max: number = 100;\n\n /**\n * 步长\n * @default 1\n */\n @Prop() step: number = 1;\n\n /**\n * 是否显示工具提示\n * @default true\n */\n @Prop() showTooltip: boolean = true;\n\n /**\n * 格式化 tooltip message\n */\n @Prop() formatTooltip?: (value: number) => string;\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否为范围选择\n * @default false\n */\n @Prop() range: boolean = false;\n\n /**\n * 是否竖向模式\n * @default false\n */\n @Prop() vertical: boolean = false;\n\n /**\n * 高度,竖向模式时必填\n */\n @Prop() height?: string;\n\n /**\n * 刻度标记(对齐 antd marks)\n */\n @Prop() marks?: SliderMark[] | Record<number, string>;\n\n @State() dragging: boolean = false;\n @State() currentValue: number | number[] = 0;\n @State() tooltipVisible: boolean = false;\n @State() tooltipValue: number = 0;\n /** range 模式下当前拖动的是哪个手柄(0/1),用于 tooltip 定位与渲染 */\n @State() activeHandle: 0 | 1 = 0;\n\n private sliderRef?: HTMLDivElement;\n private isDragging: boolean = false;\n /** 拖动期间锁定的手柄索引(鼠标按下时确定) */\n private dragHandle: 0 | 1 | null = null;\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<number | number[]>;\n\n /**\n * 值改变事件(拖拽时实时触发)\n */\n @Event() hbInput: EventEmitter<number | number[]>;\n\n componentDidLoad() {\n this.currentValue = this.normalizeInitial(this.modelValue);\n this.addEventListeners();\n }\n\n disconnectedCallback() {\n this.removeEventListeners();\n }\n\n /** 外部更新 modelValue 时同步内部 currentValue(对齐 antd 受控语义) */\n @Watch('modelValue')\n handleModelChange() {\n if (!this.isDragging) {\n this.currentValue = this.normalizeInitial(this.modelValue);\n }\n }\n\n /** range 模式下确保 currentValue 为 [min, max] 形状的有序数组 */\n private normalizeInitial(v: number | number[]): number | number[] {\n if (this.range) {\n if (Array.isArray(v) && v.length === 2) {\n return v[0] <= v[1] ? [v[0], v[1]] : [v[1], v[0]];\n }\n return [this.min, this.max];\n }\n return typeof v === 'number' ? v : Array.isArray(v) ? (v[0] ?? this.min) : this.min;\n }\n\n private addEventListeners() {\n document.addEventListener('mousemove', this.handleMouseMove);\n document.addEventListener('mouseup', this.handleMouseUp);\n }\n\n private removeEventListeners() {\n document.removeEventListener('mousemove', this.handleMouseMove);\n document.removeEventListener('mouseup', this.handleMouseUp);\n }\n\n private getPercentage(value: number): number {\n if (this.max === this.min) return 0;\n return ((value - this.min) / (this.max - this.min)) * 100;\n }\n\n private getValueFromPercentage(percentage: number): number {\n const value = this.min + (percentage / 100) * (this.max - this.min);\n const snapped = Math.round(value / this.step) * this.step;\n return Math.max(this.min, Math.min(this.max, snapped));\n }\n\n /** 鼠标按下时根据落点决定拖哪个手柄(range:更近的那个) */\n private resolveHandle(percentage: number): 0 | 1 {\n if (!this.range) return 0;\n const vals = this.currentValue as number[];\n const leftPct = this.getPercentage(vals[0]);\n const rightPct = this.getPercentage(vals[1]);\n return Math.abs(percentage - leftPct) <= Math.abs(percentage - rightPct) ? 0 : 1;\n }\n\n private handleMouseDown = (e: MouseEvent, handle: 0 | 1 | null = null) => {\n if (this.disabled) return;\n e.preventDefault();\n this.isDragging = true;\n this.dragging = true;\n this.dragHandle = handle;\n this.handleDrag(e);\n };\n\n private handleMouseMove = (e: MouseEvent) => {\n if (!this.isDragging) return;\n this.handleDrag(e);\n };\n\n private handleMouseUp = () => {\n if (!this.isDragging) return;\n this.isDragging = false;\n this.dragging = false;\n this.tooltipVisible = false;\n this.dragHandle = null;\n this.hbChange.emit(this.currentValue);\n };\n\n private handleDrag(e: MouseEvent) {\n if (!this.sliderRef) return;\n\n const rect = this.sliderRef.getBoundingClientRect();\n const percentage = this.vertical ? 1 - (e.clientY - rect.top) / rect.height : (e.clientX - rect.left) / rect.width;\n\n const clampedPercentage = Math.max(0, Math.min(100, percentage * 100));\n const value = this.getValueFromPercentage(clampedPercentage);\n\n if (this.range) {\n const vals = this.currentValue as number[];\n // 优先用 mousedown 时锁定的手柄;未锁定(点击 runway)则按落点就近\n const handle = this.dragHandle !== null ? this.dragHandle : this.resolveHandle(clampedPercentage);\n this.activeHandle = handle;\n let [lo, hi] = [vals[0], vals[1]];\n if (handle === 0) {\n lo = Math.min(value, hi);\n } else {\n hi = Math.max(value, lo);\n }\n this.currentValue = [lo, hi];\n this.tooltipValue = handle === 0 ? lo : hi;\n this.tooltipVisible = true;\n } else {\n this.activeHandle = 0;\n this.currentValue = value;\n this.tooltipValue = value;\n this.tooltipVisible = true;\n }\n\n this.modelValue = this.currentValue;\n this.hbInput.emit(this.currentValue);\n }\n\n /** 键盘可访问:方向键调整当前手柄,对齐 WAI-ARIA slider pattern */\n private handleKeyDown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n const { key } = e;\n const isDecrease = key === 'ArrowLeft' || key === 'ArrowDown';\n const isIncrease = key === 'ArrowRight' || key === 'ArrowUp';\n const isBigDecrease = key === 'PageDown' || key === 'Home';\n const isBigIncrease = key === 'PageUp' || key === 'End';\n if (!isDecrease && !isIncrease && !isBigDecrease && !isBigIncrease) return;\n\n e.preventDefault();\n const delta = isBigDecrease ? -this.max : isBigIncrease ? this.max : (isDecrease ? -1 : 1) * this.step;\n\n if (this.range) {\n const vals = this.currentValue as number[];\n let [lo, hi] = [vals[0], vals[1]];\n if (this.activeHandle === 0) {\n lo = Math.max(this.min, Math.min(lo + delta, hi));\n } else {\n hi = Math.min(this.max, Math.max(hi + delta, lo));\n }\n this.currentValue = [lo, hi];\n this.tooltipValue = this.activeHandle === 0 ? lo : hi;\n this.tooltipVisible = true;\n } else {\n const next = Math.max(this.min, Math.min((this.currentValue as number) + delta, this.max));\n this.currentValue = next;\n this.tooltipValue = next;\n this.tooltipVisible = true;\n }\n this.modelValue = this.currentValue;\n this.hbChange.emit(this.currentValue);\n this.hbInput.emit(this.currentValue);\n };\n\n private formatValue(value: number): string {\n if (this.formatTooltip) {\n return this.formatTooltip(value);\n }\n return String(value);\n }\n\n /** 规范化 marks 为 [{value,label}] 数组 */\n private get markList(): { value: number; label?: string }[] {\n if (!this.marks) return [];\n if (Array.isArray(this.marks)) return this.marks;\n return Object.entries(this.marks).map(([k, v]) => ({ value: Number(k), label: v as string }));\n }\n\n render() {\n const range = this.range;\n const singlePct = this.getPercentage(this.currentValue as number);\n const rangeVals = range ? (this.currentValue as number[]) : [0, 0];\n const leftPct = range ? this.getPercentage(rangeVals[0]) : 0;\n const rightPct = range ? this.getPercentage(rangeVals[1]) : singlePct;\n // bar:单滑块从 min 到 value;range 从 lo 到 hi\n const barStart = range ? leftPct : 0;\n const barSize = range ? rightPct - leftPct : singlePct;\n const posProp = this.vertical ? 'bottom' : 'left';\n const sizeProp = this.vertical ? 'height' : 'width';\n\n const renderHandle = (handle: 0 | 1, pct: number) => {\n const tooltipVal = range ? rangeVals[handle] : (this.currentValue as number);\n const isActive = this.tooltipVisible && (range ? this.activeHandle === handle : true);\n return (\n <div\n class={{\n 'hb-slider__button-wrapper': true,\n 'hb-slider__button-wrapper--hover': isActive,\n }}\n style={{ [posProp]: `${pct}%` }}\n onMouseDown={(e: MouseEvent) => this.handleMouseDown(e, handle)}\n onTouchStart={(e: TouchEvent) => this.handleTouchStart(e, handle)}\n role=\"slider\"\n tabindex={this.disabled ? -1 : 0}\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n aria-valuenow={tooltipVal}\n aria-valuetext={this.formatValue(tooltipVal)}\n aria-orientation={this.vertical ? 'vertical' : 'horizontal'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onKeyDown={this.handleKeyDown}\n >\n {this.showTooltip && isActive && <div class=\"hb-slider__tooltip\">{this.formatValue(this.tooltipValue)}</div>}\n <div class=\"hb-slider__button\"></div>\n </div>\n );\n };\n\n return (\n <div\n class={{\n 'hb-slider': true,\n 'hb-slider--vertical': this.vertical,\n 'hb-slider--disabled': this.disabled,\n 'hb-slider--with-marks': this.markList.length > 0,\n }}\n style={this.vertical && this.height ? { height: this.height } : undefined}\n >\n <div\n class=\"hb-slider__runway\"\n ref={el => (this.sliderRef = el as HTMLDivElement)}\n onMouseDown={(e: MouseEvent) => this.handleMouseDown(e, null)}\n onTouchStart={(e: TouchEvent) => this.handleTouchStart(e, null)}\n >\n <div\n class=\"hb-slider__bar\"\n style={{\n [sizeProp]: `${Math.max(0, barSize)}%`,\n [posProp]: `${barStart}%`,\n }}\n ></div>\n {this.markList.map(m => {\n const pct = this.getPercentage(m.value);\n return (\n <div class=\"hb-slider__mark\" style={{ [posProp]: `${pct}%` }} aria-hidden=\"true\">\n {m.label && <span class=\"hb-slider__mark-label\">{m.label}</span>}\n </div>\n );\n })}\n {range ? renderHandle(0, leftPct) : null}\n {renderHandle(range ? 1 : 0, range ? rightPct : singlePct)}\n </div>\n </div>\n );\n }\n\n /** 触屏支持:把 touch 事件映射到 mouse 同等逻辑(移动端可用) */\n private handleTouchStart = (e: TouchEvent, handle: 0 | 1 | null) => {\n if (this.disabled) return;\n e.preventDefault();\n const touch = e.touches[0];\n this.isDragging = true;\n this.dragging = true;\n this.dragHandle = handle;\n this.dragFromTouch(touch.clientX, touch.clientY);\n const move = (ev: TouchEvent) => {\n const t = ev.touches[0];\n this.dragFromTouch(t.clientX, t.clientY);\n };\n const end = () => {\n this.isDragging = false;\n this.dragging = false;\n this.tooltipVisible = false;\n this.dragHandle = null;\n this.hbChange.emit(this.currentValue);\n document.removeEventListener('touchmove', move);\n document.removeEventListener('touchend', end);\n };\n document.addEventListener('touchmove', move, { passive: false });\n document.addEventListener('touchend', end);\n };\n\n private dragFromTouch(clientX: number, clientY: number) {\n if (!this.sliderRef) return;\n const rect = this.sliderRef.getBoundingClientRect();\n const percentage = this.vertical ? 1 - (clientY - rect.top) / rect.height : (clientX - rect.left) / rect.width;\n const clamped = Math.max(0, Math.min(100, percentage * 100));\n const value = this.getValueFromPercentage(clamped);\n if (this.range) {\n const vals = this.currentValue as number[];\n const handle = this.dragHandle !== null ? this.dragHandle : this.resolveHandle(clamped);\n this.activeHandle = handle;\n let [lo, hi] = [vals[0], vals[1]];\n if (handle === 0) lo = Math.min(value, hi);\n else hi = Math.max(value, lo);\n this.currentValue = [lo, hi];\n this.tooltipValue = handle === 0 ? lo : hi;\n this.tooltipVisible = true;\n } else {\n this.currentValue = value;\n this.tooltipValue = value;\n this.tooltipVisible = true;\n }\n this.modelValue = this.currentValue;\n this.hbInput.emit(this.currentValue);\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAY,kzRAClB,MAAAC,EAAeD,E,MCgBFE,EAAM,M,qHAMQC,WAAgC,EAMjDC,IAAc,EAMdC,IAAc,IAMdC,KAAe,EAMfC,YAAuB,KAKvBC,cAMAC,SAAoB,MAMpBC,MAAiB,MAMjBC,SAAoB,MAKpBC,OAKAC,MAECC,SAAoB,MACpBC,aAAkC,EAClCC,eAA0B,MAC1BC,aAAuB,EAEvBC,aAAsB,EAEvBC,UACAC,WAAsB,MAEtBC,WAA2B,KAK1BC,SAKAC,QAET,gBAAAC,GACEC,KAAKV,aAAeU,KAAKC,iBAAiBD,KAAKtB,YAC/CsB,KAAKE,mB,CAGP,oBAAAC,GACEH,KAAKI,sB,CAKP,iBAAAC,GACE,IAAKL,KAAKL,WAAY,CACpBK,KAAKV,aAAeU,KAAKC,iBAAiBD,KAAKtB,W,EAK3C,gBAAAuB,CAAiBK,GACvB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EACpBhB,KAAKR,aAAewB,EACpBhB,KAAKT,eAAiB,I,CAExBS,KAAKtB,WAAasB,KAAKV,aACvBU,KAAKF,QAAQkC,KAAKhC,KAAKV,a","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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--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{.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.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;position:relative}.hb-watermark{display:block;position:relative;width:100%}.hb-watermark__content{position:relative;z-index:1}.hb-watermark__layer{background-position:0 0;inset:0;pointer-events:none;position:absolute;z-index:9}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@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 a=o;const n=class{constructor(e){t(this,e)}get host(){return e(this)}content="";width=120;height=120;gap=8;rotate=-22;fontColor="rgba(0,0,0,0.15)";fontSize=14;get backgroundImage(){const{width:t,height:e,content:i,fontColor:o,fontSize:a,rotate:n}=this;const r=this.escapeXml(i||"");const s=`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${e}" viewBox="0 0 ${t} ${e}"><text x="50%" y="50%" dy="${a/4}" text-anchor="middle" fill="${o}" font-size="${a}" font-family="sans-serif" transform="rotate(${n} ${t/2} ${e/2})">${r}</text></svg>`;return`url("data:image/svg+xml;utf8,${encodeURIComponent(s)}")`}escapeXml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}get layerStyle(){const{backgroundImage:t,width:e,height:i,gap:o}=this;return{backgroundImage:t,backgroundRepeat:"repeat",backgroundSize:`${e+o}px ${i+o}px`}}render(){return i("div",{key:"f87f4534f042780b2d9845d2433aaca2089dd123",class:"hb-watermark"},i("div",{key:"15da20909c1eff4f2d2aa2d582e3e575e38839df",class:"hb-watermark__content"},i("slot",{key:"44db3f4ae92cd8f19ddfb4fbd79962fc71dad1d6"})),i("div",{key:"15c1b61915ab1e6429503f19e93cc7631221a03a",class:"hb-watermark__layer",style:this.layerStyle,"aria-hidden":"true"}))}};n.style=a;export{n as hb_watermark};
2
- //# sourceMappingURL=p-213b9de7.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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--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{.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.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;position:relative}.hb-watermark{display:block;position:relative;width:100%}.hb-watermark__content{position:relative;z-index:1}.hb-watermark__layer{background-position:0 0;inset:0;pointer-events:none;position:absolute;z-index:9}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@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 a=o;const n=class{constructor(e){t(this,e)}get host(){return e(this)}content="";width=120;height=120;gap=8;rotate=-22;fontColor="rgba(0,0,0,0.15)";fontSize=14;_bgImageCache=null;_bgImageKey="";getBackgroundImage(){const t=`${this.content}|${this.width}|${this.height}|${this.gap}|${this.rotate}|${this.fontColor}|${this.fontSize}`;if(this._bgImageCache!==null&&this._bgImageKey===t){return this._bgImageCache}const{width:e,height:i,content:o,fontColor:a,fontSize:n,rotate:r}=this;const s=this.escapeXml(o||"");const l=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${i}" viewBox="0 0 ${e} ${i}"><text x="50%" y="50%" dy="${n/4}" text-anchor="middle" fill="${a}" font-size="${n}" font-family="sans-serif" transform="rotate(${r} ${e/2} ${i/2})">${s}</text></svg>`;const d=`url("data:image/svg+xml;utf8,${encodeURIComponent(l)}")`;this._bgImageCache=d;this._bgImageKey=t;return d}escapeXml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}get layerStyle(){const{width:t,height:e,gap:i}=this;return{backgroundImage:this.getBackgroundImage(),backgroundRepeat:"repeat",backgroundSize:`${t+i}px ${e+i}px`}}render(){return i("div",{key:"1d4bcad1db81f2b2787726fe643c7f4dc519786f",class:"hb-watermark"},i("div",{key:"07ab80f66ba3347224f71dd7efc6f21e21511109",class:"hb-watermark__content"},i("slot",{key:"69cf1f3a3bbd71e65ec84a3e4f5ba0d8317b627a"})),i("div",{key:"8f19e58740f4d181be67b5c1582581612634f57e",class:"hb-watermark__layer",style:this.layerStyle,"aria-hidden":"true"}))}};n.style=a;export{n as hb_watermark};
2
+ //# sourceMappingURL=p-8c4415ed.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["watermarkCss","HbWatermarkStyle0","Watermark","content","width","height","gap","rotate","fontColor","fontSize","_bgImageCache","_bgImageKey","getBackgroundImage","key","this","safeText","escapeXml","svg","result","encodeURIComponent","input","replace","layerStyle","backgroundImage","backgroundRepeat","backgroundSize","render","h","class","style"],"sources":["src/components/Watermark/watermark.css?tag=hb-watermark&encapsulation=shadow","src/components/Watermark/Watermark.tsx"],"sourcesContent":[":host {\n position: relative;\n display: block;\n}\n\n.hb-watermark {\n position: relative;\n display: block;\n width: 100%;\n}\n\n.hb-watermark__content {\n position: relative;\n z-index: 1;\n}\n\n.hb-watermark__layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9;\n pointer-events: none;\n background-position: 0 0;\n}\n","import { Component, h, Prop, Element } from '@stencil/core';\n\n/**\n * Watermark 水印组件\n * 在内容之上平铺一层文字水印,常用于版权/防泄密标识\n */\n@Component({\n tag: 'hb-watermark',\n styleUrl: 'watermark.css',\n shadow: true,\n})\nexport class Watermark {\n @Element() host!: HTMLElement;\n\n /** 水印文字 */\n @Prop() content: string = '';\n\n /** 单个水印单元宽度 */\n @Prop() width: number = 120;\n\n /** 单个水印单元高度 */\n @Prop() height: number = 120;\n\n /** 水印单元之间的间距 */\n @Prop() gap: number = 8;\n\n /** 旋转角度 */\n @Prop() rotate: number = -22;\n\n /** 字体颜色 */\n @Prop() fontColor: string = 'rgba(0,0,0,0.15)';\n\n /** 字号 */\n @Prop() fontSize: number = 14;\n\n /**\n * P6:SVG data-URI 缓存。仅当依赖 props 变化时重算(escapeXml + encodeURIComponent 较重)。\n * 修复前是 getter,每次 render 重编,父组件频繁重渲染时浪费明显。\n */\n private _bgImageCache: string | null = null;\n private _bgImageKey: string = '';\n private getBackgroundImage(): string {\n const key = `${this.content}|${this.width}|${this.height}|${this.gap}|${this.rotate}|${this.fontColor}|${this.fontSize}`;\n if (this._bgImageCache !== null && this._bgImageKey === key) {\n return this._bgImageCache;\n }\n const { width, height, content, fontColor, fontSize, rotate } = this;\n const safeText = this.escapeXml(content || '');\n const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${width}\" height=\"${height}\" viewBox=\"0 0 ${width} ${height}\"><text x=\"50%\" y=\"50%\" dy=\"${fontSize / 4}\" text-anchor=\"middle\" fill=\"${fontColor}\" font-size=\"${fontSize}\" font-family=\"sans-serif\" transform=\"rotate(${rotate} ${width / 2} ${height / 2})\">${safeText}</text></svg>`;\n const result = `url(\"data:image/svg+xml;utf8,${encodeURIComponent(svg)}\")`;\n this._bgImageCache = result;\n this._bgImageKey = key;\n return result;\n }\n\n private escapeXml(input: string): string {\n return input.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\"/g, '&quot;').replace(/'/g, '&apos;');\n }\n\n private get layerStyle(): Record<string, string> {\n const { width, height, gap } = this;\n return {\n backgroundImage: this.getBackgroundImage(),\n backgroundRepeat: 'repeat',\n backgroundSize: `${width + gap}px ${height + gap}px`,\n };\n }\n\n render() {\n return (\n <div class=\"hb-watermark\">\n <div class=\"hb-watermark__content\">\n <slot />\n </div>\n <div class=\"hb-watermark__layer\" style={this.layerStyle} aria-hidden=\"true\"></div>\n </div>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAe,kwMACrB,MAAAC,EAAeD,E,MCUFE,EAAS,M,mDAIZC,QAAkB,GAGlBC,MAAgB,IAGhBC,OAAiB,IAGjBC,IAAc,EAGdC,QAAkB,GAGlBC,UAAoB,mBAGpBC,SAAmB,GAMnBC,cAA+B,KAC/BC,YAAsB,GACtB,kBAAAC,GACN,MAAMC,EAAM,GAAGC,KAAKX,WAAWW,KAAKV,SAASU,KAAKT,UAAUS,KAAKR,OAAOQ,KAAKP,UAAUO,KAAKN,aAAaM,KAAKL,WAC9G,GAAIK,KAAKJ,gBAAkB,MAAQI,KAAKH,cAAgBE,EAAK,CAC3D,OAAOC,KAAKJ,a,CAEd,MAAMN,MAAEA,EAAKC,OAAEA,EAAMF,QAAEA,EAAOK,UAAEA,EAASC,SAAEA,EAAQF,OAAEA,GAAWO,KAChE,MAAMC,EAAWD,KAAKE,UAAUb,GAAW,IAC3C,MAAMc,EAAM,kDAAkDb,cAAkBC,mBAAwBD,KAASC,gCAAqCI,EAAW,iCAAiCD,iBAAyBC,iDAAwDF,KAAUH,EAAQ,KAAKC,EAAS,OAAOU,iBAC1T,MAAMG,EAAS,gCAAgCC,mBAAmBF,OAClEH,KAAKJ,cAAgBQ,EACrBJ,KAAKH,YAAcE,EACnB,OAAOK,C,CAGD,SAAAF,CAAUI,GAChB,OAAOA,EAAMC,QAAQ,KAAM,SAASA,QAAQ,KAAM,QAAQA,QAAQ,KAAM,QAAQA,QAAQ,KAAM,UAAUA,QAAQ,KAAM,S,CAGxH,cAAYC,GACV,MAAMlB,MAAEA,EAAKC,OAAEA,EAAMC,IAAEA,GAAQQ,KAC/B,MAAO,CACLS,gBAAiBT,KAAKF,qBACtBY,iBAAkB,SAClBC,eAAgB,GAAGrB,EAAQE,OAASD,EAASC,M,CAIjD,MAAAoB,GACE,OACEC,EAAA,OAAAd,IAAA,2CAAKe,MAAM,gBACTD,EAAA,OAAAd,IAAA,2CAAKe,MAAM,yBACTD,EAAA,QAAAd,IAAA,8CAEFc,EAAA,OAAAd,IAAA,2CAAKe,MAAM,sBAAsBC,MAAOf,KAAKQ,WAAU,cAAc,S","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as t}from"./p-e42dfa95.js";const i='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-loading{align-items:center;display:flex;justify-content:center;padding:var(--hb-spacing-lg)}.hb-loading--fullscreen{background-color:var(--hb-color-bg-mask);inset:0;position:fixed;z-index:var(--hb-z-index-modal)}.hb-loading__spinner{align-items:center;display:flex;flex-direction:column;gap:var(--hb-spacing-sm)}.hb-loading__circle{animation:hb-spin .8s linear infinite;border:3px solid var(--hb-color-border-secondary);border-radius:50%;border-top-color:var(--hb-color-primary);height:32px;width:32px}.hb-loading--small .hb-loading__circle{border-width:2px;height:20px;width:20px}.hb-loading--large .hb-loading__circle{border-width:4px;height:44px;width:44px}.hb-loading__text{color:var(--hb-color-primary);font-size:var(--hb-font-size-sm)}@keyframes hb-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@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 o=i;const n=class{constructor(t){e(this,t)}size="default";text;fullscreen=false;render(){return t("div",{key:"d8e3b21dac5f910d9a927180425753b0245550ee",class:{"hb-loading":true,"hb-loading--fullscreen":this.fullscreen,[`hb-loading--${this.size}`]:true}},t("div",{key:"1aa9028b7e6c3ac550c0d8f6fd2e36ffd8a6b10a",class:"hb-loading__spinner"},t("div",{key:"ee52c55b1d98b7b48eac202d4c58e699b5df32e6",class:"hb-loading__circle"}),this.text&&t("div",{key:"e9221d649116747f720afb8d380c4a5caf6192d9",class:"hb-loading__text"},this.text)))}};n.style=o;export{n as hb_loading};
2
- //# sourceMappingURL=p-8fdbd17c.entry.js.map
1
+ import{r as e,h as t}from"./p-e42dfa95.js";const i='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-loading{align-items:center;display:flex;justify-content:center;padding:var(--hb-spacing-lg)}.hb-loading--fullscreen{background-color:var(--hb-color-bg-mask);inset:0;position:fixed;z-index:var(--hb-z-index-modal)}.hb-loading__spinner{align-items:center;display:flex;flex-direction:column;gap:var(--hb-spacing-sm)}.hb-loading__circle{animation:hb-spin .8s linear infinite;border:3px solid var(--hb-color-border-secondary);border-radius:50%;border-top-color:var(--hb-color-primary);height:32px;width:32px}.hb-loading--small .hb-loading__circle{border-width:2px;height:20px;width:20px}.hb-loading--large .hb-loading__circle{border-width:4px;height:44px;width:44px}.hb-loading__text{color:var(--hb-color-primary);font-size:var(--hb-font-size-sm)}@keyframes hb-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@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 o=i;const n=class{constructor(t){e(this,t)}size="default";text;fullscreen=false;render(){return t("div",{key:"d4d4a02e79e76f293ec86320163cb69ff73b41ac",class:{"hb-loading":true,"hb-loading--fullscreen":this.fullscreen,[`hb-loading--${this.size}`]:true}},t("div",{key:"c31b2e33a1d5a789dfd5eff3ae460b01f960627a",class:"hb-loading__spinner"},t("div",{key:"d02a2a05dbfe2b1185512375b64a157d2ebd16a0",class:"hb-loading__circle"}),this.text&&t("div",{key:"d224855e42c1448d2471262c52e14e812cc50d9a",class:"hb-loading__text"},this.text)))}};n.style=o;export{n as hb_loading};
2
+ //# sourceMappingURL=p-950e7465.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,g as t,h as o}from"./p-e42dfa95.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-border-style:solid;--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{.border{border-style:var(--tw-border-style);border-width:1px}.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-radio-font-size:14px;--hb-radio-color:var(--hb-color-primary);--hb-radio-border-color:var(--hb-border-color,#dcdfe6);--hb-radio-text-color:var(--hb-color-text-regular,#606266);--hb-radio-disabled-color:var(--hb-color-text-disabled,#c0c4cc);display:inline-block}.hb-radio{align-items:center;color:var(--hb-radio-text-color);cursor:pointer;display:inline-flex;font-size:var(--hb-radio-font-size);font-weight:500;margin-right:30px;position:relative;-webkit-user-select:none;user-select:none;white-space:nowrap}.hb-radio:last-child{margin-right:0}.hb-radio__input{cursor:pointer;display:inline-flex;outline:none;position:relative;vertical-align:middle;white-space:nowrap}.hb-radio__original{height:0;margin:0;opacity:0;outline:none;position:absolute;width:0;z-index:-1}.hb-radio__inner{border:1px solid var(--hb-radio-border-color);box-sizing:border-box;cursor:pointer;display:inline-block;height:14px;position:relative;transition:all .2s;width:14px}.hb-radio__inner,.hb-radio__inner:after{background-color:var(--hb-color-white,#fff);border-radius:50%}.hb-radio__inner:after{content:"";height:4px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)scale(0);transition:transform .15s ease-in;width:4px}.hb-radio--checked .hb-radio__inner{background:var(--hb-radio-color);border-color:var(--hb-radio-color)}.hb-radio--checked .hb-radio__inner:after{transform:translate(-50%,-50%)scale(1)}.hb-radio__label{font-size:var(--hb-radio-font-size);line-height:1;padding-left:8px}.hb-radio--disabled{cursor:not-allowed}.hb-radio--disabled .hb-radio__inner{background-color:var(--hb-fill-color-light,#f5f7fa);border-color:var(--hb-radio-border-color);cursor:not-allowed}.hb-radio--disabled .hb-radio__label{color:var(--hb-radio-disabled-color);cursor:not-allowed}.hb-radio--border{border:1px solid var(--hb-radio-border-color);border-radius:4px;box-sizing:border-box;padding:9px 15px 9px 9px;white-space:nowrap}.hb-radio--border.hb-radio--checked{border-color:var(--hb-radio-color)}.hb-radio--border.hb-radio--disabled{border-color:var(--hb-radio-border-color);cursor:not-allowed}.hb-radio--small{font-size:12px}.hb-radio--small .hb-radio__inner{height:12px;width:12px}.hb-radio--small .hb-radio__inner:after{height:3px;width:3px}.hb-radio--small .hb-radio__label{padding-left:6px}.hb-radio--large{font-size:16px}.hb-radio--large .hb-radio__inner{height:16px;width:16px}.hb-radio--large .hb-radio__inner:after{height:5px;width:5px}.hb-radio--large .hb-radio__label{padding-left:10px}.hb-radio:hover:not(.hb-radio--disabled) .hb-radio__inner{border-color:var(--hb-radio-color)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@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 a=r;const n=class{constructor(t){e(this,t);this.hbChange=i(this,"hbChange",7)}get el(){return t(this)}modelValue;value;disabled=false;checked=false;name;radioId;label;border=false;size="default";hbChange;isChecked=false;handleValueChange(){this.updateChecked()}componentDidLoad(){this.updateChecked()}updateChecked(){if(this.value!==undefined){this.isChecked=this.modelValue===this.value}else{this.isChecked=this.checked}}handleChange=e=>{const i=e.target;if(this.disabled){e.preventDefault();return}if(this.value!==undefined){this.modelValue=this.value;this.isChecked=true;this.hbChange.emit(this.value)}else{this.isChecked=i.checked;if(i.checked&&this.value!==undefined){this.hbChange.emit(this.value)}else{this.hbChange.emit(i.checked)}}};render(){const e=this.radioId||`hb-radio-${Math.random().toString(36).substr(2,9)}`;return o("label",{key:"463c0d18fd65a81e2a2bf5618362e35461ab554f",class:{"hb-radio":true,"hb-radio--checked":this.isChecked,"hb-radio--disabled":this.disabled,"hb-radio--border":this.border,[`hb-radio--${this.size}`]:true}},o("span",{key:"292c166d1b83d7b2e0f4a0ae9dad244515eb8cc6",class:"hb-radio__input"},o("input",{key:"1adc442e06c276252c7b2824b1fb5cb4d2e65087",type:"radio",id:e,name:this.name,checked:this.isChecked,disabled:this.disabled,value:this.value,onChange:this.handleChange,class:"hb-radio__original"}),o("span",{key:"6b2c538c1c1e1dd8e2de0eeffe073d7621febe8b",class:"hb-radio__inner"})),(this.label||this.value!==undefined)&&o("span",{key:"0b1a0f58465b4f159902ff573233f617000114de",class:"hb-radio__label"},o("slot",{key:"e4ff0c4d859ffd28d9c82b8c1b4cebed39f00b93"},this.label||this.value)))}static get watchers(){return{modelValue:["handleValueChange"],checked:["handleValueChange"],value:["handleValueChange"]}}};n.style=a;export{n as hb_radio};
2
- //# sourceMappingURL=p-ab9cf0e4.entry.js.map
1
+ import{r as e,c as i,g as t,h as o}from"./p-e42dfa95.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-border-style:solid;--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{.border{border-style:var(--tw-border-style);border-width:1px}.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-radio-font-size:14px;--hb-radio-color:var(--hb-color-primary);--hb-radio-border-color:var(--hb-border-color,#dcdfe6);--hb-radio-text-color:var(--hb-color-text-regular,#606266);--hb-radio-disabled-color:var(--hb-color-text-disabled,#c0c4cc);display:inline-block}.hb-radio{align-items:center;color:var(--hb-radio-text-color);cursor:pointer;display:inline-flex;font-size:var(--hb-radio-font-size);font-weight:500;margin-right:30px;position:relative;-webkit-user-select:none;user-select:none;white-space:nowrap}.hb-radio:last-child{margin-right:0}.hb-radio__input{cursor:pointer;display:inline-flex;outline:none;position:relative;vertical-align:middle;white-space:nowrap}.hb-radio__original{height:0;margin:0;opacity:0;outline:none;position:absolute;width:0;z-index:-1}.hb-radio__inner{border:1px solid var(--hb-radio-border-color);box-sizing:border-box;cursor:pointer;display:inline-block;height:14px;position:relative;transition:all .2s;width:14px}.hb-radio__inner,.hb-radio__inner:after{background-color:var(--hb-color-white,#fff);border-radius:50%}.hb-radio__inner:after{content:"";height:4px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)scale(0);transition:transform .15s ease-in;width:4px}.hb-radio--checked .hb-radio__inner{background:var(--hb-radio-color);border-color:var(--hb-radio-color)}.hb-radio--checked .hb-radio__inner:after{transform:translate(-50%,-50%)scale(1)}.hb-radio__label{font-size:var(--hb-radio-font-size);line-height:1;padding-left:8px}.hb-radio--disabled{cursor:not-allowed}.hb-radio--disabled .hb-radio__inner{background-color:var(--hb-fill-color-light,#f5f7fa);border-color:var(--hb-radio-border-color);cursor:not-allowed}.hb-radio--disabled .hb-radio__label{color:var(--hb-radio-disabled-color);cursor:not-allowed}.hb-radio--border{border:1px solid var(--hb-radio-border-color);border-radius:4px;box-sizing:border-box;padding:9px 15px 9px 9px;white-space:nowrap}.hb-radio--border.hb-radio--checked{border-color:var(--hb-radio-color)}.hb-radio--border.hb-radio--disabled{border-color:var(--hb-radio-border-color);cursor:not-allowed}.hb-radio--small{font-size:12px}.hb-radio--small .hb-radio__inner{height:12px;width:12px}.hb-radio--small .hb-radio__inner:after{height:3px;width:3px}.hb-radio--small .hb-radio__label{padding-left:6px}.hb-radio--large{font-size:16px}.hb-radio--large .hb-radio__inner{height:16px;width:16px}.hb-radio--large .hb-radio__inner:after{height:5px;width:5px}.hb-radio--large .hb-radio__label{padding-left:10px}.hb-radio:hover:not(.hb-radio--disabled) .hb-radio__inner{border-color:var(--hb-radio-color)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@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 a=r;const n=class{constructor(t){e(this,t);this.hbChange=i(this,"hbChange",7)}get el(){return t(this)}modelValue;value;disabled=false;checked=false;name;radioId;label;border=false;size="default";hbChange;isChecked=false;stableInputId=`hb-radio-${Math.random().toString(36).slice(2,11)}`;handleValueChange(){this.updateChecked()}componentDidLoad(){this.updateChecked()}updateChecked(){if(this.value!==undefined){this.isChecked=this.modelValue===this.value}else{this.isChecked=this.checked}}handleChange=e=>{const i=e.target;if(this.disabled){e.preventDefault();return}if(this.value!==undefined){this.modelValue=this.value;this.isChecked=true;this.hbChange.emit(this.value)}else{this.isChecked=i.checked;if(i.checked&&this.value!==undefined){this.hbChange.emit(this.value)}else{this.hbChange.emit(i.checked)}}};render(){const e=this.radioId||this.stableInputId;return o("label",{key:"fce88ccf09122606b1a02d20b6c68303087853a1",class:{"hb-radio":true,"hb-radio--checked":this.isChecked,"hb-radio--disabled":this.disabled,"hb-radio--border":this.border,[`hb-radio--${this.size}`]:true}},o("span",{key:"21ff8b3d4d2e3e4dda04f18b34c0b2264c4f5679",class:"hb-radio__input"},o("input",{key:"398035c739f0b291a8daef77f535a26c0fbdf171",type:"radio",id:e,name:this.name,checked:this.isChecked,disabled:this.disabled,value:this.value,onChange:this.handleChange,class:"hb-radio__original"}),o("span",{key:"932ea7075b17621ad928fe8f72a5dacb10080d23",class:"hb-radio__inner"})),(this.label||this.value!==undefined)&&o("span",{key:"1859263be207025088188ccf7d012b6532fc0f94",class:"hb-radio__label"},o("slot",{key:"7364a2f3a031c55caa445b0bca2748f2f74598b0"},this.label||this.value)))}static get watchers(){return{modelValue:["handleValueChange"],checked:["handleValueChange"],value:["handleValueChange"]}}};n.style=a;export{n as hb_radio};
2
+ //# sourceMappingURL=p-96cecd21.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["radioCss","HbRadioStyle0","Radio","modelValue","value","disabled","checked","name","radioId","label","border","size","hbChange","isChecked","stableInputId","Math","random","toString","slice","handleValueChange","this","updateChecked","componentDidLoad","undefined","handleChange","e","target","preventDefault","emit","render","inputId","h","key","class","type","id","onChange"],"sources":["src/components/Radio/radio.css?tag=hb-radio&encapsulation=shadow","src/components/Radio/Radio.tsx"],"sourcesContent":[":host {\n display: inline-block;\n --hb-radio-font-size: 14px;\n --hb-radio-color: var(--hb-color-primary);\n --hb-radio-border-color: var(--hb-border-color, #dcdfe6);\n --hb-radio-text-color: var(--hb-color-text-regular, #606266);\n --hb-radio-disabled-color: var(--hb-color-text-disabled, #c0c4cc);\n}\n\n.hb-radio {\n color: var(--hb-radio-text-color);\n font-weight: 500;\n font-size: var(--hb-radio-font-size);\n position: relative;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n user-select: none;\n margin-right: 30px;\n}\n\n.hb-radio:last-child {\n margin-right: 0;\n}\n\n.hb-radio__input {\n white-space: nowrap;\n cursor: pointer;\n outline: none;\n display: inline-flex;\n position: relative;\n vertical-align: middle;\n}\n\n.hb-radio__original {\n opacity: 0;\n outline: none;\n position: absolute;\n margin: 0;\n width: 0;\n height: 0;\n z-index: -1;\n}\n\n.hb-radio__inner {\n border: 1px solid var(--hb-radio-border-color);\n border-radius: 50%;\n width: 14px;\n height: 14px;\n background-color: var(--hb-color-white, #ffffff);\n position: relative;\n cursor: pointer;\n display: inline-block;\n box-sizing: border-box;\n transition: all 0.2s;\n}\n\n.hb-radio__inner::after {\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background-color: var(--hb-color-white, #ffffff);\n content: '';\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%) scale(0);\n transition: transform 0.15s ease-in;\n}\n\n.hb-radio--checked .hb-radio__inner {\n border-color: var(--hb-radio-color);\n background: var(--hb-radio-color);\n}\n\n.hb-radio--checked .hb-radio__inner::after {\n transform: translate(-50%, -50%) scale(1);\n}\n\n.hb-radio__label {\n padding-left: 8px;\n line-height: 1;\n font-size: var(--hb-radio-font-size);\n}\n\n.hb-radio--disabled {\n cursor: not-allowed;\n}\n\n.hb-radio--disabled .hb-radio__inner {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n border-color: var(--hb-radio-border-color);\n cursor: not-allowed;\n}\n\n.hb-radio--disabled .hb-radio__label {\n color: var(--hb-radio-disabled-color);\n cursor: not-allowed;\n}\n\n.hb-radio--border {\n padding: 9px 15px 9px 9px;\n border-radius: 4px;\n border: 1px solid var(--hb-radio-border-color);\n box-sizing: border-box;\n white-space: nowrap;\n}\n\n.hb-radio--border.hb-radio--checked {\n border-color: var(--hb-radio-color);\n}\n\n.hb-radio--border.hb-radio--disabled {\n border-color: var(--hb-radio-border-color);\n cursor: not-allowed;\n}\n\n.hb-radio--small {\n font-size: 12px;\n}\n\n.hb-radio--small .hb-radio__inner {\n width: 12px;\n height: 12px;\n}\n\n.hb-radio--small .hb-radio__inner::after {\n width: 3px;\n height: 3px;\n}\n\n.hb-radio--small .hb-radio__label {\n padding-left: 6px;\n}\n\n.hb-radio--large {\n font-size: 16px;\n}\n\n.hb-radio--large .hb-radio__inner {\n width: 16px;\n height: 16px;\n}\n\n.hb-radio--large .hb-radio__inner::after {\n width: 5px;\n height: 5px;\n}\n\n.hb-radio--large .hb-radio__label {\n padding-left: 10px;\n}\n\n.hb-radio:hover:not(.hb-radio--disabled) .hb-radio__inner {\n border-color: var(--hb-radio-color);\n}\n\n","import { Component, h, Prop, Event, EventEmitter, State, Watch, Element } from '@stencil/core';\n\n/**\n * Radio 单选框组件\n * 在一组备选项中进行单选\n */\n@Component({\n tag: 'hb-radio',\n styleUrl: 'radio.css',\n shadow: true,\n})\nexport class Radio {\n @Element() el: HTMLElement;\n\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue?: string | number;\n\n /**\n * 单选框的值\n */\n @Prop() value?: string | number;\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否选中\n * @default false\n */\n @Prop() checked: boolean = false;\n\n /**\n * 原生 name 属性\n */\n @Prop() name?: string;\n\n /**\n * 原生 id 属性\n */\n @Prop() radioId?: string;\n\n /**\n * 文本标签\n */\n @Prop() label?: string;\n\n /**\n * 是否显示边框\n * @default false\n */\n @Prop() border: boolean = false;\n\n /**\n * 尺寸\n */\n @Prop() size: 'large' | 'default' | 'small' = 'default';\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<string | number | boolean>;\n\n @State() isChecked: boolean = false;\n\n /**\n * P7:实例级稳定 inputId,在类字段初始化一次。\n * 修复前每次 render 用 Math.random() 生成新 id,破坏 SSR 水合与外部 getElementById 缓存。\n */\n private stableInputId = `hb-radio-${Math.random().toString(36).slice(2, 11)}`;\n\n @Watch('modelValue')\n @Watch('checked')\n @Watch('value')\n handleValueChange() {\n this.updateChecked();\n }\n\n componentDidLoad() {\n this.updateChecked();\n }\n\n private updateChecked() {\n if (this.value !== undefined) {\n // 在 radio group 中\n this.isChecked = this.modelValue === this.value;\n } else {\n // 单个 radio\n this.isChecked = this.checked;\n }\n }\n\n private handleChange = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n if (this.value !== undefined) {\n // 在 radio group 中\n this.modelValue = this.value;\n this.isChecked = true;\n this.hbChange.emit(this.value);\n } else {\n // 单个 radio\n this.isChecked = target.checked;\n if (target.checked && this.value !== undefined) {\n this.hbChange.emit(this.value);\n } else {\n this.hbChange.emit(target.checked);\n }\n }\n };\n\n render() {\n const inputId = this.radioId || this.stableInputId;\n\n return (\n <label\n class={{\n 'hb-radio': true,\n 'hb-radio--checked': this.isChecked,\n 'hb-radio--disabled': this.disabled,\n 'hb-radio--border': this.border,\n [`hb-radio--${this.size}`]: true,\n }}\n >\n <span class=\"hb-radio__input\">\n <input\n type=\"radio\"\n id={inputId}\n name={this.name}\n checked={this.isChecked}\n disabled={this.disabled}\n value={this.value}\n onChange={this.handleChange}\n class=\"hb-radio__original\"\n />\n <span class=\"hb-radio__inner\"></span>\n </span>\n {(this.label || this.value !== undefined) && (\n <span class=\"hb-radio__label\">\n <slot>{this.label || this.value}</slot>\n </span>\n )}\n </label>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAW,mvQACjB,MAAAC,EAAeD,E,MCUFE,EAAK,M,oFAMSC,WAKjBC,MAMAC,SAAoB,MAMpBC,QAAmB,MAKnBC,KAKAC,QAKAC,MAMAC,OAAkB,MAKlBC,KAAsC,UAKrCC,SAEAC,UAAqB,MAMtBC,cAAgB,YAAYC,KAAKC,SAASC,SAAS,IAAIC,MAAM,EAAG,MAKxE,iBAAAC,GACEC,KAAKC,e,CAGP,gBAAAC,GACEF,KAAKC,e,CAGC,aAAAA,GACN,GAAID,KAAKhB,QAAUmB,UAAW,CAE5BH,KAAKP,UAAYO,KAAKjB,aAAeiB,KAAKhB,K,KACrC,CAELgB,KAAKP,UAAYO,KAAKd,O,EAIlBkB,aAAgBC,IACtB,MAAMC,EAASD,EAAEC,OAEjB,GAAIN,KAAKf,SAAU,CACjBoB,EAAEE,iBACF,M,CAGF,GAAIP,KAAKhB,QAAUmB,UAAW,CAE5BH,KAAKjB,WAAaiB,KAAKhB,MACvBgB,KAAKP,UAAY,KACjBO,KAAKR,SAASgB,KAAKR,KAAKhB,M,KACnB,CAELgB,KAAKP,UAAYa,EAAOpB,QACxB,GAAIoB,EAAOpB,SAAWc,KAAKhB,QAAUmB,UAAW,CAC9CH,KAAKR,SAASgB,KAAKR,KAAKhB,M,KACnB,CACLgB,KAAKR,SAASgB,KAAKF,EAAOpB,Q,IAKhC,MAAAuB,GACE,MAAMC,EAAUV,KAAKZ,SAAWY,KAAKN,cAErC,OACEiB,EAAA,SAAAC,IAAA,2CACEC,MAAO,CACL,WAAY,KACZ,oBAAqBb,KAAKP,UAC1B,qBAAsBO,KAAKf,SAC3B,mBAAoBe,KAAKV,OACzB,CAAC,aAAaU,KAAKT,QAAS,OAG9BoB,EAAA,QAAAC,IAAA,2CAAMC,MAAM,mBACVF,EAAA,SAAAC,IAAA,2CACEE,KAAK,QACLC,GAAIL,EACJvB,KAAMa,KAAKb,KACXD,QAASc,KAAKP,UACdR,SAAUe,KAAKf,SACfD,MAAOgB,KAAKhB,MACZgC,SAAUhB,KAAKI,aACfS,MAAM,uBAERF,EAAA,QAAAC,IAAA,2CAAMC,MAAM,sBAEZb,KAAKX,OAASW,KAAKhB,QAAUmB,YAC7BQ,EAAA,QAAAC,IAAA,2CAAMC,MAAM,mBACVF,EAAA,QAAAC,IAAA,4CAAOZ,KAAKX,OAASW,KAAKhB,Q","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,g as i,h as o}from"./p-e42dfa95.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:block}.hb-tree{background-color:var(--hb-color-bg-container);box-sizing:border-box;color:var(--hb-color-text);font-size:var(--hb-font-size-base)}.hb-tree,.hb-tree__children{list-style:none;margin:0;padding:0}.hb-tree__node{list-style:none;white-space:nowrap}.hb-tree__node-content{align-items:center;border-radius:var(--hb-border-radius-sm);box-sizing:border-box;cursor:pointer;display:flex;gap:var(--hb-spacing-xxs);height:28px;padding-right:var(--hb-spacing-xs);transition:background-color var(--hb-transition-duration,.2s)var(--hb-transition-function,ease)}.hb-tree__node-content:hover{background-color:var(--hb-color-fill-tertiary)}.hb-tree__node-content--selected{background-color:var(--hb-color-primary-bg)}.hb-tree__node--disabled>.hb-tree__node-content{cursor:not-allowed;opacity:.5}.hb-tree__node--disabled>.hb-tree__node-content:hover{background-color:#0000}.hb-tree__switcher{align-items:center;color:var(--hb-color-text-tertiary);display:inline-flex;flex-shrink:0;height:18px;justify-content:center;width:18px}.hb-tree__arrow{display:inline-block;font-size:10px;transition:transform var(--hb-transition-duration,.2s)}.hb-tree__arrow--expanded{transform:rotate(90deg)}.hb-tree--show-line .hb-tree__switcher{color:var(--hb-color-border)}.hb-tree__line-dot{border-bottom:1px solid var(--hb-color-border);border-bottom-left-radius:var(--hb-border-radius-sm);border-left:1px solid var(--hb-color-border);height:6px;width:6px}.hb-tree__checkbox{align-items:center;background-color:var(--hb-color-bg-container);border:1px solid var(--hb-color-border);border-radius:var(--hb-border-radius-xs,2px);color:#fff;display:inline-flex;flex-shrink:0;font-size:11px;height:16px;justify-content:center;line-height:1;transition:all var(--hb-transition-duration,.2s);width:16px}.hb-tree__checkbox:hover:not(.hb-tree__checkbox--disabled){border-color:var(--hb-color-primary)}.hb-tree__checkbox--checked,.hb-tree__checkbox--indeterminate{background-color:var(--hb-color-primary);border-color:var(--hb-color-primary)}.hb-tree__checkbox--disabled{cursor:not-allowed;opacity:.5}.hb-tree__title{flex:1;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.hb-tree__node-content--selected .hb-tree__title{color:var(--hb-color-primary);font-weight:500}@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 n=r;const s=class{constructor(i){e(this,i);this.hbSelect=t(this,"hbSelect",7);this.hbExpand=t(this,"hbExpand",7);this.hbCheck=t(this,"hbCheck",7)}get el(){return i(this)}data=[];expandedKeys=[];selectedKeys=[];checkable=false;checkedKeys=[];defaultExpandAll=false;showLine=false;internalExpanded=null;internalSelected=null;internalChecked=null;hbSelect;hbExpand;hbCheck;componentWillLoad(){if(this.defaultExpandAll){const e=[];this.collectExpandableKeys(this.data,e);this.internalExpanded=e}}handleDataChange(){if(!this.defaultExpandAll){return}const e=this.getExpandedKeys();const t=[...e];this.collectExpandableKeys(this.data,t);const i=Array.from(new Set(t));this.internalExpanded=i;this.expandedKeys=i}handleExpandedKeysChange(){this.internalExpanded=null}handleSelectedKeysChange(){this.internalSelected=null}handleCheckedKeysChange(){this.internalChecked=null}collectExpandableKeys(e,t){for(const i of e){if(i.children&&i.children.length>0){t.push(i.key);this.collectExpandableKeys(i.children,t)}}}getExpandedKeys(){return this.internalExpanded!==null?this.internalExpanded:this.expandedKeys}getSelectedKeys(){return this.internalSelected!==null?this.internalSelected:this.selectedKeys}getCheckedKeys(){return this.internalChecked!==null?this.internalChecked:this.checkedKeys}isExpanded=e=>this.getExpandedKeys().includes(e);isSelected=e=>this.getSelectedKeys().includes(e);isChecked=e=>this.getCheckedKeys().includes(e);handleToggleExpand=(e,t)=>{t.stopPropagation();if(e.disabled)return;const i=[...this.getExpandedKeys()];const o=i.indexOf(e.key);if(o>=0){i.splice(o,1)}else{i.push(e.key)}this.internalExpanded=i;this.expandedKeys=i;this.hbExpand.emit(i)};handleSelect=e=>{if(e.disabled)return;const t=[...this.getSelectedKeys()];const i=t.indexOf(e.key);if(i>=0){t.splice(i,1)}else{t.push(e.key)}this.internalSelected=t;this.selectedKeys=t;this.hbSelect.emit(t)};handleCheck=(e,t)=>{t.stopPropagation();if(e.disabled)return;const i=[...this.getCheckedKeys()];const o=i.includes(e.key);const r=new Set(i);if(o){this.removeDescendantKeys(e,r);r.delete(e.key)}else{r.add(e.key);this.collectCheckableDescendantKeys(e,r)}this.reconcileAncestors(e,r);const n=Array.from(r);this.internalChecked=n;this.checkedKeys=n;this.hbCheck.emit(n)};removeDescendantKeys(e,t){if(!e.children)return;for(const i of e.children){t.delete(i.key);this.removeDescendantKeys(i,t)}}collectCheckableDescendantKeys(e,t){if(!e.children)return;for(const i of e.children){if(!i.disabled){t.add(i.key)}this.collectCheckableDescendantKeys(i,t)}}reconcileAncestors(e,t){const i=this.findAncestors(this.data,e.key,[]);for(const e of i){if(e.disabled||!e.children||e.children.length===0)continue;const i=e.children.filter((e=>!e.disabled));if(i.length===0)continue;const o=i.every((e=>t.has(e.key)));if(o){t.add(e.key)}else{t.delete(e.key)}}}findAncestors(e,t,i){for(const o of e){if(o.key===t){return i}if(o.children&&o.children.length>0){const e=this.findAncestors(o.children,t,[o,...i]);if(e)return e}}return null}computeIndeterminateKeys(){const e=this.getCheckedKeys();const t=new Set;const i=o=>{if(!o.children||o.children.length===0){return{hasCheckedDescendant:false}}let r=false;for(const t of o.children){const o=i(t);if(e.includes(t.key)||o.hasCheckedDescendant){r=true}}if(r&&!e.includes(o.key)){t.add(o.key)}return{hasCheckedDescendant:r}};for(const e of this.data){i(e)}return t}renderNode=(e,t,i)=>{const r=!!(e.children&&e.children.length>0);const n=this.isExpanded(e.key);const s=this.isSelected(e.key);const a=this.isChecked(e.key);const l=i.has(e.key);const h=!!e.disabled;return o("li",{class:{"hb-tree__node":true,"hb-tree__node--disabled":h},role:"treeitem","aria-level":t+1,"aria-expanded":r?String(n):undefined,"aria-selected":s?"true":"false","aria-checked":this.checkable?l?"mixed":a?"true":"false":undefined,"aria-disabled":h?"true":undefined,tabindex:s?0:-1},o("div",{class:{"hb-tree__node-content":true,"hb-tree__node-content--selected":s},style:{paddingLeft:`${t*18+8}px`}},o("span",{class:"hb-tree__switcher",onClick:t=>r&&this.handleToggleExpand(e,t)},r?o("span",{class:{"hb-tree__arrow":true,"hb-tree__arrow--expanded":n}},"▶"):this.showLine?o("span",{class:"hb-tree__line-dot"}):null),this.checkable&&o("span",{class:{"hb-tree__checkbox":true,"hb-tree__checkbox--checked":a,"hb-tree__checkbox--indeterminate":l,"hb-tree__checkbox--disabled":h},onClick:t=>this.handleCheck(e,t)},a?"✓":l?"–":""),o("span",{class:"hb-tree__title",onClick:()=>this.handleSelect(e)},e.title)),r&&n&&o("ul",{class:"hb-tree__children",role:"group"},e.children.map((e=>this.renderNode(e,t+1,i)))))};render(){const e=this.checkable?this.computeIndeterminateKeys():new Set;return o("ul",{key:"df5e7db490f2799102049a16b1ed63f944a9fe27",class:{"hb-tree":true,"hb-tree--show-line":this.showLine},role:"tree"},this.data.map((t=>this.renderNode(t,0,e))))}static get watchers(){return{data:["handleDataChange"],expandedKeys:["handleExpandedKeysChange"],selectedKeys:["handleSelectedKeysChange"],checkedKeys:["handleCheckedKeysChange"]}}};s.style=n;export{s as hb_tree};
2
- //# sourceMappingURL=p-2b4556ff.entry.js.map
1
+ import{r as e,c as t,g as i,h as o}from"./p-e42dfa95.js";const n='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-tree{background-color:var(--hb-color-bg-container);box-sizing:border-box;color:var(--hb-color-text);font-size:var(--hb-font-size-base)}.hb-tree,.hb-tree__children{list-style:none;margin:0;padding:0}.hb-tree__node{list-style:none;white-space:nowrap}.hb-tree__node-content{align-items:center;border-radius:var(--hb-border-radius-sm);box-sizing:border-box;cursor:pointer;display:flex;gap:var(--hb-spacing-xxs);height:28px;padding-right:var(--hb-spacing-xs);transition:background-color var(--hb-transition-duration,.2s)var(--hb-transition-function,ease)}.hb-tree__node-content:hover{background-color:var(--hb-color-fill-tertiary)}.hb-tree__node-content--selected{background-color:var(--hb-color-primary-bg)}.hb-tree__node--disabled>.hb-tree__node-content{cursor:not-allowed;opacity:.5}.hb-tree__node--disabled>.hb-tree__node-content:hover{background-color:#0000}.hb-tree__switcher{align-items:center;color:var(--hb-color-text-tertiary);display:inline-flex;flex-shrink:0;height:18px;justify-content:center;width:18px}.hb-tree__arrow{display:inline-block;font-size:10px;transition:transform var(--hb-transition-duration,.2s)}.hb-tree__arrow--expanded{transform:rotate(90deg)}.hb-tree--show-line .hb-tree__switcher{color:var(--hb-color-border)}.hb-tree__line-dot{border-bottom:1px solid var(--hb-color-border);border-bottom-left-radius:var(--hb-border-radius-sm);border-left:1px solid var(--hb-color-border);height:6px;width:6px}.hb-tree__checkbox{align-items:center;background-color:var(--hb-color-bg-container);border:1px solid var(--hb-color-border);border-radius:var(--hb-border-radius-xs,2px);color:#fff;display:inline-flex;flex-shrink:0;font-size:11px;height:16px;justify-content:center;line-height:1;transition:all var(--hb-transition-duration,.2s);width:16px}.hb-tree__checkbox:hover:not(.hb-tree__checkbox--disabled){border-color:var(--hb-color-primary)}.hb-tree__checkbox--checked,.hb-tree__checkbox--indeterminate{background-color:var(--hb-color-primary);border-color:var(--hb-color-primary)}.hb-tree__checkbox--disabled{cursor:not-allowed;opacity:.5}.hb-tree__title{flex:1;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.hb-tree__node-content--selected .hb-tree__title{color:var(--hb-color-primary);font-weight:500}@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 r=n;const s=class{constructor(i){e(this,i);this.hbSelect=t(this,"hbSelect",7);this.hbExpand=t(this,"hbExpand",7);this.hbCheck=t(this,"hbCheck",7)}get el(){return i(this)}data=[];expandedKeys=[];selectedKeys=[];checkable=false;checkedKeys=[];defaultExpandAll=false;showLine=false;internalExpanded=null;internalSelected=null;internalChecked=null;focusKey=null;hbSelect;hbExpand;hbCheck;componentWillLoad(){if(this.defaultExpandAll){const e=[];this.collectExpandableKeys(this.data,e);this.internalExpanded=e}}handleDataChange(){if(!this.defaultExpandAll){return}const e=this.getExpandedKeys();const t=[...e];this.collectExpandableKeys(this.data,t);const i=Array.from(new Set(t));this.internalExpanded=i;this.expandedKeys=i}handleExpandedKeysChange(){this.internalExpanded=null}handleSelectedKeysChange(){this.internalSelected=null}handleCheckedKeysChange(){this.internalChecked=null}collectExpandableKeys(e,t){for(const i of e){if(i.children&&i.children.length>0){t.push(i.key);this.collectExpandableKeys(i.children,t)}}}getExpandedKeys(){return this.internalExpanded!==null?this.internalExpanded:this.expandedKeys}getSelectedKeys(){return this.internalSelected!==null?this.internalSelected:this.selectedKeys}getCheckedKeys(){return this.internalChecked!==null?this.internalChecked:this.checkedKeys}isExpanded=e=>this.getExpandedKeys().includes(e);isSelected=e=>this.getSelectedKeys().includes(e);isChecked=e=>this.getCheckedKeys().includes(e);handleToggleExpand=(e,t)=>{t.stopPropagation();if(e.disabled)return;const i=[...this.getExpandedKeys()];const o=i.indexOf(e.key);if(o>=0){i.splice(o,1)}else{i.push(e.key)}this.internalExpanded=i;this.expandedKeys=i;this.hbExpand.emit(i)};handleSelect=e=>{if(e.disabled)return;const t=[...this.getSelectedKeys()];const i=t.indexOf(e.key);if(i>=0){t.splice(i,1)}else{t.push(e.key)}this.internalSelected=t;this.selectedKeys=t;this.hbSelect.emit(t)};handleCheck=(e,t)=>{t.stopPropagation();if(e.disabled)return;const i=[...this.getCheckedKeys()];const o=i.includes(e.key);const n=new Set(i);if(o){this.removeDescendantKeys(e,n);n.delete(e.key)}else{n.add(e.key);this.collectCheckableDescendantKeys(e,n)}this.reconcileAncestors(e,n);const r=Array.from(n);this.internalChecked=r;this.checkedKeys=r;this.hbCheck.emit(r)};removeDescendantKeys(e,t){if(!e.children)return;for(const i of e.children){t.delete(i.key);this.removeDescendantKeys(i,t)}}collectCheckableDescendantKeys(e,t){if(!e.children)return;for(const i of e.children){if(!i.disabled){t.add(i.key)}this.collectCheckableDescendantKeys(i,t)}}reconcileAncestors(e,t){const i=this.findAncestors(this.data,e.key,[]);for(const e of i){if(e.disabled||!e.children||e.children.length===0)continue;const i=e.children.filter((e=>!e.disabled));if(i.length===0)continue;const o=i.every((e=>t.has(e.key)));if(o){t.add(e.key)}else{t.delete(e.key)}}}findAncestors(e,t,i){for(const o of e){if(o.key===t){return i}if(o.children&&o.children.length>0){const e=this.findAncestors(o.children,t,[o,...i]);if(e)return e}}return null}computeIndeterminateKeys(){const e=this.getCheckedKeys();const t=new Set;const i=o=>{if(!o.children||o.children.length===0){return{hasCheckedDescendant:false}}let n=false;for(const t of o.children){const o=i(t);if(e.includes(t.key)||o.hasCheckedDescendant){n=true}}if(n&&!e.includes(o.key)){t.add(o.key)}return{hasCheckedDescendant:n}};for(const e of this.data){i(e)}return t}getFlattenedVisibleNodes(){const e=[];const t=(i,o,n)=>{for(const r of i){e.push({node:r,level:o,parentKey:n});if(r.children&&r.children.length>0&&this.isExpanded(r.key)){t(r.children,o+1,r.key)}}};t(this.data,0,null);return e}handleTreeKeydown=e=>{const t=this.getFlattenedVisibleNodes();if(t.length===0)return;const i=t.filter((e=>!e.node.disabled));if(i.length===0)return;let o=this.focusKey;if(!o){const e=this.getSelectedKeys();o=e.length>0?e[e.length-1]:null}let n=o?t.findIndex((e=>e.node.key===o)):-1;if(n<0||t[n].node.disabled){n=t.findIndex((e=>!e.node.disabled));if(n<0)return}const r=t.map(((e,t)=>({x:e,i:t}))).filter((e=>!e.x.node.disabled)).map((e=>e.i));const s=r.indexOf(n);const a=t[n];const l=!(a.node.children&&a.node.children.length>0);const h=!l&&this.isExpanded(a.node.key);switch(e.key){case"ArrowDown":{e.preventDefault();const i=(s+1)%r.length;this.focusNode(t[r[i]].node);break}case"ArrowUp":{e.preventDefault();const i=(s-1+r.length)%r.length;this.focusNode(t[r[i]].node);break}case"ArrowRight":{e.preventDefault();if(l)return;if(!h){this.handleToggleExpand(a.node,{stopPropagation:()=>{}})}else{const e=t.findIndex(((e,t)=>t>n&&e.parentKey===a.node.key&&!e.node.disabled));if(e>=0)this.focusNode(t[e].node)}break}case"ArrowLeft":{e.preventDefault();if(!l&&h){this.handleToggleExpand(a.node,{stopPropagation:()=>{}})}else if(a.parentKey){const e=t.findIndex((e=>e.node.key===a.parentKey));if(e>=0&&!t[e].node.disabled)this.focusNode(t[e].node)}break}case"Home":{e.preventDefault();this.focusNode(t[r[0]].node);break}case"End":{e.preventDefault();this.focusNode(t[r[r.length-1]].node);break}case"Enter":case" ":case"Spacebar":{e.preventDefault();this.handleSelect(a.node);break}default:return}};focusNode(e){this.focusKey=e.key;requestAnimationFrame((()=>{const t=this.el.shadowRoot?.querySelector(`[data-tree-key="${e.key}"]`);t?.focus()}))}renderNode=(e,t,i)=>{const n=!!(e.children&&e.children.length>0);const r=this.isExpanded(e.key);const s=this.isSelected(e.key);const a=this.isChecked(e.key);const l=i.has(e.key);const h=!!e.disabled;const d=this.getSelectedKeys();const c=d.length>0?d[d.length-1]:null;const b=this.focusKey??c;const p=b===e.key;return o("li",{class:{"hb-tree__node":true,"hb-tree__node--disabled":h},"data-tree-key":e.key,role:"treeitem","aria-level":t+1,"aria-expanded":n?String(r):undefined,"aria-selected":s?"true":"false","aria-checked":this.checkable?l?"mixed":a?"true":"false":undefined,"aria-disabled":h?"true":undefined,tabindex:p?0:-1},o("div",{class:{"hb-tree__node-content":true,"hb-tree__node-content--selected":s},style:{paddingLeft:`${t*18+8}px`}},o("span",{class:"hb-tree__switcher",onClick:t=>n&&this.handleToggleExpand(e,t)},n?o("span",{class:{"hb-tree__arrow":true,"hb-tree__arrow--expanded":r}},"▶"):this.showLine?o("span",{class:"hb-tree__line-dot"}):null),this.checkable&&o("span",{class:{"hb-tree__checkbox":true,"hb-tree__checkbox--checked":a,"hb-tree__checkbox--indeterminate":l,"hb-tree__checkbox--disabled":h},onClick:t=>this.handleCheck(e,t)},a?"✓":l?"–":""),o("span",{class:"hb-tree__title",onClick:()=>this.handleSelect(e)},e.title)),n&&r&&o("ul",{class:"hb-tree__children",role:"group"},e.children.map((e=>this.renderNode(e,t+1,i)))))};render(){const e=this.checkable?this.computeIndeterminateKeys():new Set;return o("ul",{key:"22de41fa0c22bd430496431f1ad8c70dbbc5c3b2",class:{"hb-tree":true,"hb-tree--show-line":this.showLine},role:"tree",tabindex:-1,onKeyDown:this.handleTreeKeydown},this.data.map((t=>this.renderNode(t,0,e))))}static get watchers(){return{data:["handleDataChange"],expandedKeys:["handleExpandedKeysChange"],selectedKeys:["handleSelectedKeysChange"],checkedKeys:["handleCheckedKeysChange"]}}};s.style=r;export{s as hb_tree};
2
+ //# sourceMappingURL=p-98b513cd.entry.js.map