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,h as i}from"./p-e42dfa95.js";const a='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@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-page-header{align-items:center;background:var(--hb-color-bg-container);border-bottom:1px solid var(--hb-color-border-secondary);border-radius:var(--hb-border-radius-sm);display:flex;justify-content:space-between;padding:var(--hb-spacing-md)var(--hb-spacing-lg)}.hb-page-header--ghost{background:0 0;border-bottom:none}.hb-page-header__main{align-items:center;display:flex;gap:var(--hb-spacing-sm);min-width:0}.hb-page-header__back{align-items:center;background:0 0;border:none;border-radius:var(--hb-border-radius-sm);color:var(--hb-color-text);cursor:pointer;display:inline-flex;font-size:var(--hb-font-size-lg);height:28px;justify-content:center;line-height:1;padding:0;transition:background .2s;width:28px}.hb-page-header__back:hover{background:var(--hb-color-fill-secondary)}.hb-page-header__back-arrow{display:inline-block}.hb-page-header__titles{align-items:baseline;display:flex;gap:var(--hb-spacing-sm);min-width:0}.hb-page-header__title{color:var(--hb-color-text-primary);font-size:var(--hb-font-size-xl);font-weight:600;line-height:1.4}.hb-page-header__subtitle{color:var(--hb-color-text-secondary);font-size:var(--hb-font-size-sm)}.hb-page-header__extra{align-items:center;display:flex;flex-shrink:0;gap:var(--hb-spacing-sm)}@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=a;const r=class{constructor(i){e(this,i);this.hbBack=t(this,"hbBack",7)}title="";subtitle="";back=false;ghost=false;hbBack;handleBack=e=>{e.stopPropagation();this.hbBack.emit()};render(){return i("div",{key:"d0a12aabf3367b79a6b772519747bf8a1bc4b6a6",class:{"hb-page-header":true,"hb-page-header--ghost":this.ghost}},i("div",{key:"a1b06d2e308104ac47c6ef8fea494d50f11491ba",class:"hb-page-header__main"},this.back&&i("button",{key:"9bff3ddc9271167a63b1abca030299a09fa92281",type:"button",class:"hb-page-header__back",onClick:this.handleBack,"aria-label":"返回"},i("span",{key:"099fa0f3b3c5aa3da46e72b1341589f90406ac85",class:"hb-page-header__back-arrow"},"←")),i("div",{key:"17ab5366d4b9e0ccc5a3ed593a2564afdf7a333b",class:"hb-page-header__titles"},this.title&&i("span",{key:"587984784445116a7a20485d405fb8e8920fd631",class:"hb-page-header__title"},this.title),this.subtitle&&i("span",{key:"36d2e8452515ae043d87fb8371b5d6c3f7fd5121",class:"hb-page-header__subtitle"},this.subtitle))),i("div",{key:"1cda5981edc21edafe737c1b8b4c922a14676787",class:"hb-page-header__extra"},i("slot",{key:"67e7fa41c6467e676e7e46a11a2d3fe6bf7db413"})))}};r.style=o;export{r as hb_page_header};
2
- //# sourceMappingURL=p-f5969181.entry.js.map
1
+ import{r as e,c as t,h as i}from"./p-e42dfa95.js";const a='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@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-page-header{align-items:center;background:var(--hb-color-bg-container);border-bottom:1px solid var(--hb-color-border-secondary);border-radius:var(--hb-border-radius-sm);display:flex;justify-content:space-between;padding:var(--hb-spacing-md)var(--hb-spacing-lg)}.hb-page-header--ghost{background:0 0;border-bottom:none}.hb-page-header__main{align-items:center;display:flex;gap:var(--hb-spacing-sm);min-width:0}.hb-page-header__back{align-items:center;background:0 0;border:none;border-radius:var(--hb-border-radius-sm);color:var(--hb-color-text);cursor:pointer;display:inline-flex;font-size:var(--hb-font-size-lg);height:28px;justify-content:center;line-height:1;padding:0;transition:background .2s;width:28px}.hb-page-header__back:hover{background:var(--hb-color-fill-secondary)}.hb-page-header__back-arrow{display:inline-block}.hb-page-header__titles{align-items:baseline;display:flex;gap:var(--hb-spacing-sm);min-width:0}.hb-page-header__title{color:var(--hb-color-text-primary);font-size:var(--hb-font-size-xl);font-weight:600;line-height:1.4}.hb-page-header__subtitle{color:var(--hb-color-text-secondary);font-size:var(--hb-font-size-sm)}.hb-page-header__extra{align-items:center;display:flex;flex-shrink:0;gap:var(--hb-spacing-sm)}@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=a;const r=class{constructor(i){e(this,i);this.hbBack=t(this,"hbBack",7)}title="";subtitle="";back=false;ghost=false;hbBack;handleBack=e=>{e.stopPropagation();this.hbBack.emit()};render(){return i("div",{key:"ecfe4d352c4696133f30f9cb130a484c9512872f",class:{"hb-page-header":true,"hb-page-header--ghost":this.ghost}},i("div",{key:"b8972b2af8caf2c16dfa336434112d53dbced99e",class:"hb-page-header__main"},this.back&&i("button",{key:"175834ac887d6079cc4518e2e454e3b19b574e49",type:"button",class:"hb-page-header__back",onClick:this.handleBack,"aria-label":"返回"},i("span",{key:"2effefb7b2e1846992b549def041226f9076ae8c",class:"hb-page-header__back-arrow"},"←")),i("div",{key:"2bd0014a9b6788bd9202f330b36808f74d3feecc",class:"hb-page-header__titles"},this.title&&i("span",{key:"a1538b4e5a6e1eb611c7cfa3eaaefbd802d71911",class:"hb-page-header__title"},this.title),this.subtitle&&i("span",{key:"ff730fda5ba94da9482a513262b6f31749f712ad",class:"hb-page-header__subtitle"},this.subtitle))),i("div",{key:"5b062f4656eed561e52f1aacb26c32ac8f638fb9",class:"hb-page-header__extra"},i("slot",{key:"d5cb18262a07f8b4962704f0d661ec3265275b35"})))}};r.style=o;export{r as hb_page_header};
2
+ //# sourceMappingURL=p-dd9c6459.entry.js.map
@@ -1,2 +1,2 @@
1
1
  function n(n,t){return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()&&n.getDate()===t.getDate()}function t(t,e,s=new Date,o=0){const c=[];const r=t.getFullYear();const a=t.getMonth();const i=new Date(r,a,1);const u=new Date(r,a+1,0);const f=i.getDay();const d=u.getDate();const D=(f-o+7)%7;const l=new Date(r,a-1,0);for(let t=D-1;t>=0;t--){const o=new Date(r,a-1,l.getDate()-t);c.push({date:o,isCurrentMonth:false,isToday:n(o,s),isSelected:!!e&&n(o,e)})}for(let t=1;t<=d;t++){const o=new Date(r,a,t);c.push({date:o,isCurrentMonth:true,isToday:n(o,s),isSelected:!!e&&n(o,e)})}const w=42-c.length;for(let t=1;t<=w;t++){const o=new Date(r,a+1,t);c.push({date:o,isCurrentMonth:false,isToday:n(o,s),isSelected:!!e&&n(o,e)})}return c}function e(n,t){const e=n.getFullYear();const s=String(n.getMonth()+1).padStart(2,"0");const o=String(n.getDate()).padStart(2,"0");const c=String(n.getHours()).padStart(2,"0");const r=String(n.getMinutes()).padStart(2,"0");const a=String(n.getSeconds()).padStart(2,"0");return t.replace("YYYY",String(e)).replace("MM",s).replace("DD",o).replace("HH",c).replace("mm",r).replace("ss",a)}function s(n){if(!n)return undefined;const t=n instanceof Date?n:new Date(n);if(isNaN(t.getTime()))return undefined;return t}function o(n,t){const e=new Date(n);e.setMonth(e.getMonth()+t);return e}function c(n,t){const e=new Date(n);e.setFullYear(e.getFullYear()+t);return e}function r(n,t,e){const s=n.getFullYear();const o=e??s-s%12;const c=[];for(let n=0;n<12;n++){const e=o+n;c.push({year:e,isCurrentYearRange:e===s,isSelected:!!t&&t.getFullYear()===e})}return c}function a(n){const t=n.getFullYear();return t-t%12}const i=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"];const u=["日","一","二","三","四","五","六"];export{i as M,u as W,o as a,c as b,a as c,r as d,e as f,t as g,n as i,s as p};
2
- //# sourceMappingURL=p-08b4005c.js.map
2
+ //# sourceMappingURL=p-e0876aca.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isSameDay","date1","date2","getFullYear","getMonth","getDate","getCalendarDays","viewDate","selectedDate","today","Date","firstDayOfWeek","days","year","month","firstDay","lastDay","firstDayWeek","getDay","daysInMonth","offset","prevMonth","i","date","push","isCurrentMonth","isToday","isSelected","remainingDays","length","formatDate","format","String","padStart","day","hours","getHours","minutes","getMinutes","seconds","getSeconds","replace","parseDate","value","undefined","isNaN","getTime","addMonths","delta","result","setMonth","addYears","setFullYear","getCalendarYears","startYearBase","rangeStart","years","y","isCurrentYearRange","getYearRangeStart","MONTH_NAMES","WEEK_DAY_NAMES"],"sources":["src/utils/date-helpers.ts"],"sourcesContent":["/**\n * 日历和日期工具函数\n * 从 DatePicker / DateTimePicker / DatePickerPane 中提取的共享逻辑\n */\n\nexport interface CalendarDay {\n date: Date;\n isCurrentMonth: boolean;\n isToday: boolean;\n isSelected: boolean;\n}\n\n/** 判断两个日期是否为同一天 */\nexport function isSameDay(date1: Date, date2: Date): boolean {\n return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();\n}\n\n/** 生成 42 天(6 周)的日历网格数据 */\nexport function getCalendarDays(viewDate: Date, selectedDate?: Date, today: Date = new Date(), firstDayOfWeek: number = 0): CalendarDay[] {\n const days: CalendarDay[] = [];\n const year = viewDate.getFullYear();\n const month = viewDate.getMonth();\n\n const firstDay = new Date(year, month, 1);\n const lastDay = new Date(year, month + 1, 0);\n const firstDayWeek = firstDay.getDay();\n const daysInMonth = lastDay.getDate();\n\n // 按 firstDayOfWeek 计算需要补多少上月天数。\n // 默认 firstDayOfWeek=0(周日为首列)时,offset = firstDayWeek;\n // firstDayOfWeek=1(周一为首列)时,周日的 offset 多 1、周一的 offset 为 0。\n const offset = (firstDayWeek - firstDayOfWeek + 7) % 7;\n\n // 上月填充\n const prevMonth = new Date(year, month - 1, 0);\n for (let i = offset - 1; i >= 0; i--) {\n const date = new Date(year, month - 1, prevMonth.getDate() - i);\n days.push({\n date,\n isCurrentMonth: false,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n // 当月日期\n for (let i = 1; i <= daysInMonth; i++) {\n const date = new Date(year, month, i);\n days.push({\n date,\n isCurrentMonth: true,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n // 下月填充(补齐 42 天)\n const remainingDays = 42 - days.length;\n for (let i = 1; i <= remainingDays; i++) {\n const date = new Date(year, month + 1, i);\n days.push({\n date,\n isCurrentMonth: false,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n return days;\n}\n\n/**\n * 格式化日期为指定格式字符串\n * 支持:YYYY, MM, DD, HH, mm, ss\n */\nexport function formatDate(date: Date, format: string): string {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n\n return format.replace('YYYY', String(year)).replace('MM', month).replace('DD', day).replace('HH', hours).replace('mm', minutes).replace('ss', seconds);\n}\n\n/** 安全解析日期值 */\nexport function parseDate(value: string | Date | undefined): Date | undefined {\n if (!value) return undefined;\n const date = value instanceof Date ? value : new Date(value);\n if (isNaN(date.getTime())) return undefined;\n return date;\n}\n\n/** 月份偏移,返回新日期对象(不可变) */\nexport function addMonths(date: Date, delta: number): Date {\n const result = new Date(date);\n result.setMonth(result.getMonth() + delta);\n return result;\n}\n\n/** 年份偏移,返回新日期对象(不可变) */\nexport function addYears(date: Date, delta: number): Date {\n const result = new Date(date);\n result.setFullYear(result.getFullYear() + delta);\n return result;\n}\n\n/**\n * 生成 years 视图的 12 年档数据(每档 12 年)。\n * 以 viewDate 所在年份向下取整到 12 的倍数作为起点。\n */\nexport interface CalendarYear {\n year: number;\n isCurrentYearRange: boolean;\n isSelected: boolean;\n}\n\nexport function getCalendarYears(viewDate: Date, selectedDate?: Date, startYearBase?: number): CalendarYear[] {\n const year = viewDate.getFullYear();\n const rangeStart = startYearBase ?? year - (year % 12);\n const years: CalendarYear[] = [];\n for (let i = 0; i < 12; i++) {\n const y = rangeStart + i;\n years.push({\n year: y,\n isCurrentYearRange: y === year,\n isSelected: !!selectedDate && selectedDate.getFullYear() === y,\n });\n }\n return years;\n}\n\n/** 获取 years 视图标题所显示的年份档区间起点 */\nexport function getYearRangeStart(viewDate: Date): number {\n const year = viewDate.getFullYear();\n return year - (year % 12);\n}\n\n/** 中文月份名称 */\nexport const MONTH_NAMES = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];\n\n/** 中文星期名称 */\nexport const WEEK_DAY_NAMES = ['日', '一', '二', '三', '四', '五', '六'];\n"],"mappings":"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","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:inline-block;position:relative}.hb-color-picker{display:inline-block}.hb-color-picker__trigger{align-items:center;border:1px solid var(--hb-border-color,#dcdfe6);border-radius:4px;cursor:pointer;display:inline-flex;padding:4px;transition:border-color .2s}.hb-color-picker__trigger:hover:not(.hb-color-picker--disabled){border-color:var(--hb-color-primary)}.hb-color-picker__color{border:1px solid var(--hb-border-color-lighter,#e4e7ed);border-radius:2px;height:20px;width:40px}.hb-color-picker__text{color:var(--hb-color-text-regular,#606266);font-size:14px;margin-left:8px}.hb-color-picker__dropdown{background-color:var(--hb-color-white,#fff);border:1px solid var(--hb-border-color,#dcdfe6);border-radius:4px;box-shadow:0 2px 12px #0000001a;left:0;margin-top:4px;min-width:300px;padding:12px;position:absolute;top:100%;z-index:1000}.hb-color-picker__saturation{border-radius:4px;cursor:crosshair;height:180px;overflow:hidden;position:relative;-webkit-user-select:none;user-select:none;width:100%}.hb-color-picker__saturation-bg{inset:0;position:absolute}.hb-color-picker__saturation-white{background:linear-gradient(90deg,#fff,#fff0);inset:0;position:absolute}.hb-color-picker__saturation-black{background:linear-gradient(#0000,#000);inset:0;position:absolute}.hb-color-picker__saturation-pointer{border:2px solid var(--hb-color-white,#fff);border-radius:50%;box-shadow:0 0 2px #0000004d;height:12px;position:absolute;transform:translate(-50%,-50%);width:12px}.hb-color-picker__controls{margin-top:12px}.hb-color-picker__alpha,.hb-color-picker__hue{border-radius:2px;cursor:pointer;height:12px;margin-bottom:8px;position:relative}.hb-color-picker__hue{position:relative}.hb-color-picker__hue-bar{background:linear-gradient(90deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:2px;height:100%}.hb-color-picker__hue-pointer{background:#fff;border:1px solid #0000004d;border-radius:2px;box-shadow:0 0 2px #0000004d;height:100%;pointer-events:none;position:absolute;top:0;transform:translate(-50%);width:4px}.hb-color-picker__alpha-bar{background-image:linear-gradient(45deg,#ccc 25%,#0000 0),linear-gradient(-45deg,#ccc 25%,#0000 0),linear-gradient(45deg,#0000 75%,#ccc 0),linear-gradient(-45deg,#0000 75%,#ccc 0);background-position:0 0,0 4px,4px -4px,-4px 0;background-size:8px 8px;border-radius:2px;height:100%}.hb-color-picker__alpha-pointer{background:#fff;border:1px solid #0000004d;border-radius:2px;box-shadow:0 0 2px #0000004d;height:100%;pointer-events:none;position:absolute;top:0;transform:translate(-50%);width:4px}.hb-color-picker__input{margin-top:12px}.hb-color-picker__input-hex{border:1px solid var(--hb-border-color,#dcdfe6);border-radius:4px;font-size:13px;margin-bottom:8px;padding:6px 8px;width:100%}.hb-color-picker__input-rgb{display:flex;gap:8px}.hb-color-picker__input-rgb input{border:1px solid var(--hb-border-color,#dcdfe6);border-radius:4px;flex:1;font-size:13px;padding:6px 8px}.hb-color-picker__predefine{border-top:1px solid var(--hb-border-color-lighter,#e4e7ed);display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;padding-top:12px}.hb-color-picker__predefine-color{border:2px solid #0000;border-radius:4px;cursor:pointer;height:24px;transition:transform .2s;width:24px}.hb-color-picker__predefine-color:hover{transform:scale(1.1)}.hb-color-picker__predefine-color--selected{border-color:var(--hb-color-primary);transform:scale(1.1)}.hb-color-picker--disabled{cursor:not-allowed;opacity:.6}.hb-color-picker--disabled .hb-color-picker__trigger{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 a=r;const s=class{constructor(i){e(this,i);this.hbChange=t(this,"hbChange",7);this.hbActiveChange=t(this,"hbActiveChange",7)}get el(){return i(this)}modelValue;disabled=false;colorFormat="hex";showAlpha=false;predefine;isOpen=false;currentColor="#409EFF";hue=210;saturation=100;value=100;alpha=100;hbChange;hbActiveChange;componentDidLoad(){if(this.modelValue){this.currentColor=this.modelValue;this.updateHSVFromColor(this.modelValue)}else{this.updateHSVFromColor(this.currentColor)}document.addEventListener("click",this.handleDocumentClick)}disconnectedCallback(){document.removeEventListener("click",this.handleDocumentClick)}handleDocumentClick=e=>{if(!this.isOpen)return;const t=e.target;if(!this.el.contains(t)){this.isOpen=false}};handleValueChange(){if(this.modelValue){this.currentColor=this.modelValue;this.updateHSVFromColor(this.modelValue)}}handleTriggerClick=()=>{if(this.disabled)return;this.isOpen=!this.isOpen};handleKeyDown=e=>{if(this.disabled)return;if(e.key==="Escape"&&this.isOpen){e.preventDefault();this.isOpen=false}};normalizeHex(e){if(typeof e!=="string")return null;const t=e.trim();if(/^#([A-Fa-f0-9]{6})$/.test(t))return t.toLowerCase();if(/^#([A-Fa-f0-9]{3})$/.test(t)){const[,e,i,o]=t.match(/^#(.)(.)(.)$/);return`#${e}${e}${i}${i}${o}${o}`.toLowerCase()}return null}handleColorSelect=e=>{const t=this.normalizeHex(e);if(!t)return;this.currentColor=t;this.modelValue=t;this.hbChange.emit(t);this.hbActiveChange.emit(t)};handleSaturationClick=e=>{const t=e.currentTarget;const i=t.getBoundingClientRect();const o=e.clientX-i.left;const r=e.clientY-i.top;this.saturation=Math.max(0,Math.min(100,o/i.width*100));this.value=Math.max(0,Math.min(100,100-r/i.height*100));const a=this.hsvToHex(this.hue,this.saturation,this.value);this.handleColorSelect(a)};handleHueClick=e=>{const t=e.currentTarget;const i=t.getBoundingClientRect();const o=e.clientX-i.left;this.hue=Math.max(0,Math.min(360,o/i.width*360));const r=this.hsvToHex(this.hue,this.saturation,this.value);this.handleColorSelect(r)};handleInputChange=e=>{const t=e.target;const i=t.value;if(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i)){this.handleColorSelect(i)}};handleAlphaClick=e=>{const t=e.currentTarget;const i=t.getBoundingClientRect();const o=e.clientX-i.left;this.alpha=Math.max(0,Math.min(100,Math.round(o/i.width*100)));this.hbActiveChange.emit(this.getFormattedValue())};handleRgbInputChange=(e,t)=>{const i=this.hexToRgb(this.currentColor);if(i){const o=parseInt(t,10);if(!isNaN(o)&&o>=0&&o<=255){if(e===0)i.r=o;else if(e===1)i.g=o;else if(e===2)i.b=o;const t=`#${[i.r,i.g,i.b].map((e=>{const t=e.toString(16);return t.length===1?"0"+t:t})).join("")}`;this.handleColorSelect(t)}}};hexToRgb(e){const t=this.normalizeHex(e);if(!t)return null;const i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null}rgbToHsv(e,t,i){e=e/255;t=t/255;i=i/255;const o=Math.max(e,t,i);const r=Math.min(e,t,i);const a=o-r;let s=0;if(a!==0){if(o===e){s=(t-i)/a%6}else if(o===t){s=(i-e)/a+2}else{s=(e-t)/a+4}}s=Math.round(s*60);if(s<0)s+=360;const n=o===0?0:Math.round(a/o*100);const l=Math.round(o*100);return{h:s,s:n,v:l}}hsvToRgb(e,t,i){t=t/100;i=i/100;const o=i*t;const r=o*(1-Math.abs(e/60%2-1));const a=i-o;let s=0,n=0,l=0;if(e>=0&&e<60){s=o;n=r;l=0}else if(e>=60&&e<120){s=r;n=o;l=0}else if(e>=120&&e<180){s=0;n=o;l=r}else if(e>=180&&e<240){s=0;n=r;l=o}else if(e>=240&&e<300){s=r;n=0;l=o}else if(e>=300&&e<360){s=o;n=0;l=r}return{r:Math.round((s+a)*255),g:Math.round((n+a)*255),b:Math.round((l+a)*255)}}hsvToHex(e,t,i){const o=this.hsvToRgb(e,t,i);return`#${[o.r,o.g,o.b].map((e=>{const t=e.toString(16);return t.length===1?"0"+t:t})).join("")}`}updateHSVFromColor(e){const t=this.hexToRgb(e);if(t){const e=this.rgbToHsv(t.r,t.g,t.b);this.hue=e.h;this.saturation=e.s;this.value=e.v}}getFormattedValue(){const e=this.hexToRgb(this.currentColor);if(!e)return this.currentColor;switch(this.colorFormat){case"rgb":return`rgb(${e.r}, ${e.g}, ${e.b})`;case"hsl":{const t=this.rgbToHsv(e.r,e.g,e.b);const[i,o,r]=this.hsvToHsl(t.h,t.s,t.v);return`hsl(${i}, ${o}%, ${r}%)`}case"hsv":{const t=this.rgbToHsv(e.r,e.g,e.b);return`hsv(${t.h}, ${t.s}%, ${t.v}%)`}case"hex":default:return this.currentColor}}hsvToHsl(e,t,i){t/=100;i/=100;const o=i-i*t/2;const r=o===0||o===1?0:(i-o)/Math.min(o,1-o);return[Math.round(e),Math.round(r*100),Math.round(o*100)]}render(){const e=this.hexToRgb(this.currentColor);const t=this.predefine||["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#000000","#ffffff","#808080"];const i=this.hsvToHex(this.hue,100,100);return o("div",{key:"52393318617ee172eb5ea6cfbe2a4924a3b6b63e",class:{"hb-color-picker":true,"hb-color-picker--open":this.isOpen,"hb-color-picker--disabled":this.disabled},onKeyDown:this.handleKeyDown},o("div",{key:"58a32dc101b842064bade3fbd44b594bbbec05b5",class:"hb-color-picker__trigger",onClick:this.handleTriggerClick,role:"button",tabindex:this.disabled?-1:0,"aria-haspopup":"dialog","aria-expanded":this.isOpen?"true":"false","aria-disabled":this.disabled?"true":"false",onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();this.handleTriggerClick()}}},o("div",{key:"5f183c7aa2a29818e13a569f172560a2ee7d475e",class:"hb-color-picker__color",style:{backgroundColor:this.currentColor}}),o("span",{key:"eb1f178aff0cc1c6eb247322e9162dea60178b60",class:"hb-color-picker__text"},this.currentColor)),this.isOpen&&o("div",{key:"cca8bb671e305e262edebf7095128f91dcc78ee0",class:"hb-color-picker__dropdown",role:"dialog"},o("div",{key:"ecbbe0b9c3791a2638b0540f49f6cad628a15f64",class:"hb-color-picker__panel"},o("div",{key:"514850ca7676e52c1fc7385c8cc352e4ad5d0362",class:"hb-color-picker__saturation",onClick:this.handleSaturationClick},o("div",{key:"b5e98c45b8a8a750f12e8bea6406a107e235a3be",class:"hb-color-picker__saturation-bg",style:{backgroundColor:i}}),o("div",{key:"fd7f705ad5e58713adb3dae2892abf830f57051d",class:"hb-color-picker__saturation-white"}),o("div",{key:"e513305bb22b0753eb0c82829f843d68a19ee4fa",class:"hb-color-picker__saturation-black"}),o("div",{key:"3f44dc010cacd7cac78a88ace1cd86aa253b26f2",class:"hb-color-picker__saturation-pointer",style:{left:`${this.saturation}%`,top:`${100-this.value}%`}})),o("div",{key:"3b91d0d162027b58adb790d5f5ca0243fa3cb07c",class:"hb-color-picker__controls"},o("div",{key:"1c1fe521f3820e86ed71c331e6da7213db907038",class:"hb-color-picker__hue",onClick:this.handleHueClick},o("div",{key:"a2caa8290277ad46c59efd087c255c3a55fe3ca6",class:"hb-color-picker__hue-bar"}),o("div",{key:"36f9bdd607dcc6181a554442e47a5f5574d71649",class:"hb-color-picker__hue-pointer",style:{left:`${this.hue/360*100}%`}})),this.showAlpha&&o("div",{key:"ced86625cf6f3e461752a61022bbb36015fa3b3a",class:"hb-color-picker__alpha",onClick:this.handleAlphaClick},o("div",{key:"2de6b6937338ccbdf07a89267ca274e1f04a5b0e",class:"hb-color-picker__alpha-bar",style:{backgroundColor:this.currentColor}}),o("div",{key:"4363ebb73a38c7b657ef80144e33220b0063b438",class:"hb-color-picker__alpha-pointer",style:{left:`${this.alpha}%`}}))),o("div",{key:"d90829aaf4099621bcb438755ca44718f23652cd",class:"hb-color-picker__input"},o("input",{key:"7209889a410ac83c73b52a4af3809e621ad4dfef",type:"text",class:"hb-color-picker__input-hex",value:this.currentColor,onInput:this.handleInputChange,"aria-label":"HEX 颜色值"}),e&&o("div",{key:"83b2df101257f8ada13a9006dd9d7140db4123bc",class:"hb-color-picker__input-rgb"},o("input",{key:"7858c1e35bcbe9e0356c3cab386b2e061a47c9ea",type:"number",min:"0",max:"255",value:e.r,onInput:e=>this.handleRgbInputChange(0,e.target.value),"aria-label":"红色通道"}),o("input",{key:"b03784fb1668bfdd78693b58fe912a121810b855",type:"number",min:"0",max:"255",value:e.g,onInput:e=>this.handleRgbInputChange(1,e.target.value),"aria-label":"绿色通道"}),o("input",{key:"d40ae6d0ae271cadbd1e9ddca9e98b071357fc78",type:"number",min:"0",max:"255",value:e.b,onInput:e=>this.handleRgbInputChange(2,e.target.value),"aria-label":"蓝色通道"}))),this.predefine&&this.predefine.length>0&&o("div",{key:"5c858086b250b0db9bea5add8685d3a39e073550",class:"hb-color-picker__predefine"},t.map((e=>{const t=this.normalizeHex(e)||e;return o("div",{class:{"hb-color-picker__predefine-color":true,"hb-color-picker__predefine-color--selected":t===this.currentColor},style:{backgroundColor:e},onClick:()=>this.handleColorSelect(e),title:e})}))))))}static get watchers(){return{modelValue:["handleValueChange"]}}};s.style=a;export{s as hb_color_picker};
2
- //# sourceMappingURL=p-aa5e5e02.entry.js.map
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:inline-block;position:relative}.hb-color-picker{display:inline-block}.hb-color-picker__trigger{align-items:center;border:1px solid var(--hb-border-color,#dcdfe6);border-radius:4px;cursor:pointer;display:inline-flex;padding:4px;transition:border-color .2s}.hb-color-picker__trigger:hover:not(.hb-color-picker--disabled){border-color:var(--hb-color-primary)}.hb-color-picker__color{border:1px solid var(--hb-border-color-lighter,#e4e7ed);border-radius:2px;height:20px;width:40px}.hb-color-picker__text{color:var(--hb-color-text-regular,#606266);font-size:14px;margin-left:8px}.hb-color-picker__dropdown{background-color:var(--hb-color-white,#fff);border:1px solid var(--hb-border-color,#dcdfe6);border-radius:4px;box-shadow:0 2px 12px #0000001a;left:0;margin-top:4px;min-width:300px;padding:12px;position:absolute;top:100%;z-index:1000}.hb-color-picker__saturation{border-radius:4px;cursor:crosshair;height:180px;overflow:hidden;position:relative;-webkit-user-select:none;user-select:none;width:100%}.hb-color-picker__saturation-bg{inset:0;position:absolute}.hb-color-picker__saturation-white{background:linear-gradient(90deg,#fff,#fff0);inset:0;position:absolute}.hb-color-picker__saturation-black{background:linear-gradient(#0000,#000);inset:0;position:absolute}.hb-color-picker__saturation-pointer{border:2px solid var(--hb-color-white,#fff);border-radius:50%;box-shadow:0 0 2px #0000004d;height:12px;position:absolute;transform:translate(-50%,-50%);width:12px}.hb-color-picker__controls{margin-top:12px}.hb-color-picker__alpha,.hb-color-picker__hue{border-radius:2px;cursor:pointer;height:12px;margin-bottom:8px;position:relative}.hb-color-picker__hue{position:relative}.hb-color-picker__hue-bar{background:linear-gradient(90deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);border-radius:2px;height:100%}.hb-color-picker__hue-pointer{background:#fff;border:1px solid #0000004d;border-radius:2px;box-shadow:0 0 2px #0000004d;height:100%;pointer-events:none;position:absolute;top:0;transform:translate(-50%);width:4px}.hb-color-picker__alpha-bar{background-image:linear-gradient(45deg,#ccc 25%,#0000 0),linear-gradient(-45deg,#ccc 25%,#0000 0),linear-gradient(45deg,#0000 75%,#ccc 0),linear-gradient(-45deg,#0000 75%,#ccc 0);background-position:0 0,0 4px,4px -4px,-4px 0;background-size:8px 8px;border-radius:2px;height:100%}.hb-color-picker__alpha-pointer{background:#fff;border:1px solid #0000004d;border-radius:2px;box-shadow:0 0 2px #0000004d;height:100%;pointer-events:none;position:absolute;top:0;transform:translate(-50%);width:4px}.hb-color-picker__input{margin-top:12px}.hb-color-picker__input-hex{border:1px solid var(--hb-border-color,#dcdfe6);border-radius:4px;font-size:13px;margin-bottom:8px;padding:6px 8px;width:100%}.hb-color-picker__input-rgb{display:flex;gap:8px}.hb-color-picker__input-rgb input{border:1px solid var(--hb-border-color,#dcdfe6);border-radius:4px;flex:1;font-size:13px;padding:6px 8px}.hb-color-picker__predefine{border-top:1px solid var(--hb-border-color-lighter,#e4e7ed);display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;padding-top:12px}.hb-color-picker__predefine-color{border:2px solid #0000;border-radius:4px;cursor:pointer;height:24px;transition:transform .2s;width:24px}.hb-color-picker__predefine-color:hover{transform:scale(1.1)}.hb-color-picker__predefine-color--selected{border-color:var(--hb-color-primary);transform:scale(1.1)}.hb-color-picker--disabled{cursor:not-allowed;opacity:.6}.hb-color-picker--disabled .hb-color-picker__trigger{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 a=r;const s=class{constructor(i){e(this,i);this.hbChange=t(this,"hbChange",7);this.hbActiveChange=t(this,"hbActiveChange",7)}get el(){return i(this)}modelValue;disabled=false;colorFormat="hex";showAlpha=false;predefine;isOpen=false;currentColor="#409EFF";hue=210;saturation=100;value=100;alpha=100;hbChange;hbActiveChange;componentDidLoad(){if(this.modelValue){this.currentColor=this.modelValue;this.updateHSVFromColor(this.modelValue)}else{this.updateHSVFromColor(this.currentColor)}document.addEventListener("click",this.handleDocumentClick)}disconnectedCallback(){document.removeEventListener("click",this.handleDocumentClick)}handleDocumentClick=e=>{if(!this.isOpen)return;const t=e.target;if(!this.el.contains(t)){this.isOpen=false}};handleValueChange(){if(this.modelValue){this.currentColor=this.modelValue;this.updateHSVFromColor(this.modelValue)}}handleTriggerClick=()=>{if(this.disabled)return;this.isOpen=!this.isOpen};handleKeyDown=e=>{if(this.disabled)return;if(e.key==="Escape"&&this.isOpen){e.preventDefault();this.isOpen=false}};normalizeHex(e){if(typeof e!=="string")return null;const t=e.trim();if(/^#([A-Fa-f0-9]{6})$/.test(t))return t.toLowerCase();if(/^#([A-Fa-f0-9]{3})$/.test(t)){const[,e,i,o]=t.match(/^#(.)(.)(.)$/);return`#${e}${e}${i}${i}${o}${o}`.toLowerCase()}return null}handleColorSelect=e=>{const t=this.normalizeHex(e);if(!t)return;this.currentColor=t;this.modelValue=t;this.hbChange.emit(t);this.hbActiveChange.emit(t)};handleSaturationClick=e=>{const t=e.currentTarget;const i=t.getBoundingClientRect();const o=e.clientX-i.left;const r=e.clientY-i.top;this.saturation=Math.max(0,Math.min(100,o/i.width*100));this.value=Math.max(0,Math.min(100,100-r/i.height*100));const a=this.hsvToHex(this.hue,this.saturation,this.value);this.handleColorSelect(a)};handleHueClick=e=>{const t=e.currentTarget;const i=t.getBoundingClientRect();const o=e.clientX-i.left;this.hue=Math.max(0,Math.min(360,o/i.width*360));const r=this.hsvToHex(this.hue,this.saturation,this.value);this.handleColorSelect(r)};handleInputChange=e=>{const t=e.target;const i=t.value;if(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i)){this.handleColorSelect(i)}};handleAlphaClick=e=>{const t=e.currentTarget;const i=t.getBoundingClientRect();const o=e.clientX-i.left;this.alpha=Math.max(0,Math.min(100,Math.round(o/i.width*100)));this.hbActiveChange.emit(this.getFormattedValue())};handleRgbInputChange=(e,t)=>{const i=this.hexToRgb(this.currentColor);if(i){const o=parseInt(t,10);if(!isNaN(o)&&o>=0&&o<=255){if(e===0)i.r=o;else if(e===1)i.g=o;else if(e===2)i.b=o;const t=`#${[i.r,i.g,i.b].map((e=>{const t=e.toString(16);return t.length===1?"0"+t:t})).join("")}`;this.handleColorSelect(t)}}};hexToRgb(e){const t=this.normalizeHex(e);if(!t)return null;const i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null}rgbToHsv(e,t,i){e=e/255;t=t/255;i=i/255;const o=Math.max(e,t,i);const r=Math.min(e,t,i);const a=o-r;let s=0;if(a!==0){if(o===e){s=(t-i)/a%6}else if(o===t){s=(i-e)/a+2}else{s=(e-t)/a+4}}s=Math.round(s*60);if(s<0)s+=360;const n=o===0?0:Math.round(a/o*100);const l=Math.round(o*100);return{h:s,s:n,v:l}}hsvToRgb(e,t,i){t=t/100;i=i/100;const o=i*t;const r=o*(1-Math.abs(e/60%2-1));const a=i-o;let s=0,n=0,l=0;if(e>=0&&e<60){s=o;n=r;l=0}else if(e>=60&&e<120){s=r;n=o;l=0}else if(e>=120&&e<180){s=0;n=o;l=r}else if(e>=180&&e<240){s=0;n=r;l=o}else if(e>=240&&e<300){s=r;n=0;l=o}else if(e>=300&&e<360){s=o;n=0;l=r}return{r:Math.round((s+a)*255),g:Math.round((n+a)*255),b:Math.round((l+a)*255)}}hsvToHex(e,t,i){const o=this.hsvToRgb(e,t,i);return`#${[o.r,o.g,o.b].map((e=>{const t=e.toString(16);return t.length===1?"0"+t:t})).join("")}`}updateHSVFromColor(e){const t=this.hexToRgb(e);if(t){const e=this.rgbToHsv(t.r,t.g,t.b);this.hue=e.h;this.saturation=e.s;this.value=e.v}}getFormattedValue(){const e=this.hexToRgb(this.currentColor);if(!e)return this.currentColor;switch(this.colorFormat){case"rgb":return`rgb(${e.r}, ${e.g}, ${e.b})`;case"hsl":{const t=this.rgbToHsv(e.r,e.g,e.b);const[i,o,r]=this.hsvToHsl(t.h,t.s,t.v);return`hsl(${i}, ${o}%, ${r}%)`}case"hsv":{const t=this.rgbToHsv(e.r,e.g,e.b);return`hsv(${t.h}, ${t.s}%, ${t.v}%)`}case"hex":default:return this.currentColor}}hsvToHsl(e,t,i){t/=100;i/=100;const o=i-i*t/2;const r=o===0||o===1?0:(i-o)/Math.min(o,1-o);return[Math.round(e),Math.round(r*100),Math.round(o*100)]}render(){const e=this.hexToRgb(this.currentColor);const t=this.predefine||["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#000000","#ffffff","#808080"];const i=this.hsvToHex(this.hue,100,100);return o("div",{key:"8159e1edcb35ac81d9590a6bbe39ee5f386793b0",class:{"hb-color-picker":true,"hb-color-picker--open":this.isOpen,"hb-color-picker--disabled":this.disabled},onKeyDown:this.handleKeyDown},o("div",{key:"719abe5e28e1a2119287423626ae7695233e9fdd",class:"hb-color-picker__trigger",onClick:this.handleTriggerClick,role:"button",tabindex:this.disabled?-1:0,"aria-haspopup":"dialog","aria-expanded":this.isOpen?"true":"false","aria-disabled":this.disabled?"true":"false",onKeyDown:e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();this.handleTriggerClick()}}},o("div",{key:"93b7fb2f6754556fdd3128050b859ee0cc6ec833",class:"hb-color-picker__color",style:{backgroundColor:this.currentColor}}),o("span",{key:"d309c1b383d72d658997de577c168dee6f7e361e",class:"hb-color-picker__text"},this.currentColor)),this.isOpen&&o("div",{key:"f003b426845acc8b99fd7d511d4a4ba971f2e9f7",class:"hb-color-picker__dropdown",role:"dialog"},o("div",{key:"33dd2879affc21f80594d89fc289a11627949375",class:"hb-color-picker__panel"},o("div",{key:"7c2018e2b1d835cac0545dec44e8ae87e2c5ed65",class:"hb-color-picker__saturation",onClick:this.handleSaturationClick},o("div",{key:"def94c6e3c46b3ceea88dcadcda4f212abc65b81",class:"hb-color-picker__saturation-bg",style:{backgroundColor:i}}),o("div",{key:"0f0fc45d2f8e41b921243697aae7af2ab024bda3",class:"hb-color-picker__saturation-white"}),o("div",{key:"6437cc9967f46ffacbca1e5128fd921276c3e914",class:"hb-color-picker__saturation-black"}),o("div",{key:"091a01517569d89dc75262da962e46144ac05107",class:"hb-color-picker__saturation-pointer",style:{left:`${this.saturation}%`,top:`${100-this.value}%`}})),o("div",{key:"016d2417565eeb443e4d1af01926b4350234e6de",class:"hb-color-picker__controls"},o("div",{key:"4c3fc5e6290032416c65939ad5f0b847577a1668",class:"hb-color-picker__hue",onClick:this.handleHueClick},o("div",{key:"4838eaa146e754ad293e07f6ff802651f8032ee6",class:"hb-color-picker__hue-bar"}),o("div",{key:"5e5b64cb048a164ed755d7100b428f6110b5ff8d",class:"hb-color-picker__hue-pointer",style:{left:`${this.hue/360*100}%`}})),this.showAlpha&&o("div",{key:"8ad1fb26a551f18a3876c3780a007abb6bd711e9",class:"hb-color-picker__alpha",onClick:this.handleAlphaClick},o("div",{key:"1467ae93bb35de900fe9c8d8c96178361b8047c6",class:"hb-color-picker__alpha-bar",style:{backgroundColor:this.currentColor}}),o("div",{key:"67fa6c3a238892b18a82847260ba4c48b9197bfd",class:"hb-color-picker__alpha-pointer",style:{left:`${this.alpha}%`}}))),o("div",{key:"bb5853062d46603de849661b656ec85cbd03aba8",class:"hb-color-picker__input"},o("input",{key:"f47b3cc4af3d58144c5093629708937a0ed3d69f",type:"text",class:"hb-color-picker__input-hex",value:this.currentColor,onInput:this.handleInputChange,"aria-label":"HEX 颜色值"}),e&&o("div",{key:"166d6a75b6332888318392b645c69ee4385aa7e2",class:"hb-color-picker__input-rgb"},o("input",{key:"8475ced358e11965a970f9f6c32b9f0e97f838c6",type:"number",min:"0",max:"255",value:e.r,onInput:e=>this.handleRgbInputChange(0,e.target.value),"aria-label":"红色通道"}),o("input",{key:"6fd5090119fb416984640ea0d43af694c2be6557",type:"number",min:"0",max:"255",value:e.g,onInput:e=>this.handleRgbInputChange(1,e.target.value),"aria-label":"绿色通道"}),o("input",{key:"1f813b8619f9bc267e5d8939a80df789755b4cd6",type:"number",min:"0",max:"255",value:e.b,onInput:e=>this.handleRgbInputChange(2,e.target.value),"aria-label":"蓝色通道"}))),this.predefine&&this.predefine.length>0&&o("div",{key:"c553c83cecd4cc41644d1fe0a76059d91ce5abd6",class:"hb-color-picker__predefine"},t.map((e=>{const t=this.normalizeHex(e)||e;return o("div",{class:{"hb-color-picker__predefine-color":true,"hb-color-picker__predefine-color--selected":t===this.currentColor},style:{backgroundColor:e},onClick:()=>this.handleColorSelect(e),title:e})}))))))}static get watchers(){return{modelValue:["handleValueChange"]}}};s.style=a;export{s as hb_color_picker};
2
+ //# sourceMappingURL=p-e1773c93.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["colorPickerCss","HbColorPickerStyle0","ColorPicker","modelValue","disabled","colorFormat","showAlpha","predefine","isOpen","currentColor","hue","saturation","value","alpha","hbChange","hbActiveChange","componentDidLoad","this","updateHSVFromColor","document","addEventListener","handleDocumentClick","disconnectedCallback","removeEventListener","e","target","el","contains","handleValueChange","handleTriggerClick","handleKeyDown","key","preventDefault","normalizeHex","color","c","trim","test","toLowerCase","r","g","b","match","handleColorSelect","normalized","emit","handleSaturationClick","currentTarget","rect","getBoundingClientRect","x","clientX","left","y","clientY","top","Math","max","min","width","height","hex","hsvToHex","handleHueClick","handleInputChange","handleAlphaClick","round","getFormattedValue","handleRgbInputChange","index","rgb","hexToRgb","num","parseInt","isNaN","map","toString","length","join","result","exec","rgbToHsv","diff","h","s","v","hsvToRgb","abs","m","hsv","l","hsvToHsl","sl","render","predefinedColors","hueColor","class","onKeyDown","onClick","role","tabindex","style","backgroundColor","type","onInput","title"],"sources":["src/components/ColorPicker/color-picker.css?tag=hb-color-picker&encapsulation=shadow","src/components/ColorPicker/ColorPicker.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n}\n\n.hb-color-picker {\n display: inline-block;\n}\n\n.hb-color-picker__trigger {\n display: inline-flex;\n align-items: center;\n padding: 4px;\n border: 1px solid var(--hb-border-color, #dcdfe6);\n border-radius: 4px;\n cursor: pointer;\n transition: border-color 0.2s;\n}\n\n.hb-color-picker__trigger:hover:not(.hb-color-picker--disabled) {\n border-color: var(--hb-color-primary);\n}\n\n.hb-color-picker__color {\n width: 40px;\n height: 20px;\n border-radius: 2px;\n border: 1px solid var(--hb-border-color-lighter, #e4e7ed);\n}\n\n.hb-color-picker__text {\n margin-left: 8px;\n font-size: 14px;\n color: var(--hb-color-text-regular, #606266);\n}\n\n.hb-color-picker__dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n margin-top: 4px;\n background-color: var(--hb-color-white, #ffffff);\n border: 1px solid var(--hb-border-color, #dcdfe6);\n border-radius: 4px;\n box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);\n z-index: 1000;\n padding: 12px;\n min-width: 300px;\n}\n\n.hb-color-picker__saturation {\n position: relative;\n width: 100%;\n height: 180px;\n border-radius: 4px;\n overflow: hidden;\n cursor: crosshair;\n user-select: none;\n}\n\n.hb-color-picker__saturation-bg {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n /* 背景色会根据当前色相动态设置 */\n}\n\n.hb-color-picker__saturation-white {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));\n}\n\n.hb-color-picker__saturation-black {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));\n}\n\n.hb-color-picker__saturation-pointer {\n position: absolute;\n width: 12px;\n height: 12px;\n border: 2px solid var(--hb-color-white, #ffffff);\n border-radius: 50%;\n transform: translate(-50%, -50%);\n box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);\n}\n\n.hb-color-picker__controls {\n margin-top: 12px;\n}\n\n.hb-color-picker__hue,\n.hb-color-picker__alpha {\n position: relative;\n height: 12px;\n border-radius: 2px;\n margin-bottom: 8px;\n cursor: pointer;\n}\n\n.hb-color-picker__hue {\n position: relative;\n}\n\n.hb-color-picker__hue-bar {\n height: 100%;\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n border-radius: 2px;\n}\n\n.hb-color-picker__hue-pointer {\n position: absolute;\n top: 0;\n width: 4px;\n height: 100%;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.3);\n border-radius: 2px;\n transform: translateX(-50%);\n box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);\n pointer-events: none;\n}\n\n.hb-color-picker__alpha-bar {\n height: 100%;\n background-image:\n linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%),\n linear-gradient(-45deg, transparent 75%, #ccc 75%);\n background-size: 8px 8px;\n background-position:\n 0 0,\n 0 4px,\n 4px -4px,\n -4px 0px;\n border-radius: 2px;\n}\n\n.hb-color-picker__alpha-pointer {\n position: absolute;\n top: 0;\n width: 4px;\n height: 100%;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.3);\n border-radius: 2px;\n transform: translateX(-50%);\n box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);\n pointer-events: none;\n}\n\n.hb-color-picker__input {\n margin-top: 12px;\n}\n\n.hb-color-picker__input-hex {\n width: 100%;\n padding: 6px 8px;\n border: 1px solid var(--hb-border-color, #dcdfe6);\n border-radius: 4px;\n font-size: 13px;\n margin-bottom: 8px;\n}\n\n.hb-color-picker__input-rgb {\n display: flex;\n gap: 8px;\n}\n\n.hb-color-picker__input-rgb input {\n flex: 1;\n padding: 6px 8px;\n border: 1px solid var(--hb-border-color, #dcdfe6);\n border-radius: 4px;\n font-size: 13px;\n}\n\n.hb-color-picker__predefine {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-top: 12px;\n padding-top: 12px;\n border-top: 1px solid var(--hb-border-color-lighter, #e4e7ed);\n}\n\n.hb-color-picker__predefine-color {\n width: 24px;\n height: 24px;\n border-radius: 4px;\n cursor: pointer;\n border: 2px solid transparent;\n transition: transform 0.2s;\n}\n\n.hb-color-picker__predefine-color:hover {\n transform: scale(1.1);\n}\n\n.hb-color-picker__predefine-color--selected {\n border-color: var(--hb-color-primary);\n transform: scale(1.1);\n}\n\n.hb-color-picker--disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.hb-color-picker--disabled .hb-color-picker__trigger {\n cursor: not-allowed;\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\n\n/**\n * ColorPicker 颜色选择器组件\n * 用于颜色选择,支持多种格式\n */\n@Component({\n tag: 'hb-color-picker',\n styleUrl: 'color-picker.css',\n shadow: true,\n})\nexport class ColorPicker {\n @Element() el: HTMLElement;\n\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue?: string;\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 颜色格式\n */\n @Prop() colorFormat: 'hsl' | 'hsv' | 'hex' | 'rgb' = 'hex';\n\n /**\n * 是否显示透明度\n * @default false\n */\n @Prop() showAlpha: boolean = false;\n\n /**\n * 预定义颜色\n */\n @Prop() predefine?: string[];\n\n @State() isOpen: boolean = false;\n @State() currentColor: string = '#409EFF';\n @State() hue: number = 210; // 色相值 0-360\n @State() saturation: number = 100; // 饱和度 0-100\n @State() value: number = 100; // 明度 0-100\n @State() alpha: number = 100; // 透明度 0-100(仅 showAlpha=true 时生效)\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<string>;\n\n /**\n * 激活时触发\n */\n @Event() hbActiveChange: EventEmitter<string>;\n\n componentDidLoad() {\n if (this.modelValue) {\n this.currentColor = this.modelValue;\n this.updateHSVFromColor(this.modelValue);\n } else {\n this.updateHSVFromColor(this.currentColor);\n }\n document.addEventListener('click', this.handleDocumentClick);\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleDocumentClick);\n }\n\n private handleDocumentClick = (e: MouseEvent) => {\n if (!this.isOpen) return;\n const target = e.target as HTMLElement;\n if (!this.el.contains(target)) {\n this.isOpen = false;\n }\n };\n\n @Watch('modelValue')\n handleValueChange() {\n if (this.modelValue) {\n this.currentColor = this.modelValue;\n this.updateHSVFromColor(this.modelValue);\n }\n }\n\n private handleTriggerClick = () => {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n };\n\n /** 键盘交互:Escape 关闭面板(对齐 antd / WAI-ARIA) */\n private handleKeyDown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n if (e.key === 'Escape' && this.isOpen) {\n e.preventDefault();\n this.isOpen = false;\n }\n };\n\n /** 把 3 位简写 hex 规范化为 6 位,避免后续 hexToRgb 解析失败 */\n private normalizeHex(color: string): string | null {\n if (typeof color !== 'string') return null;\n const c = color.trim();\n if (/^#([A-Fa-f0-9]{6})$/.test(c)) return c.toLowerCase();\n if (/^#([A-Fa-f0-9]{3})$/.test(c)) {\n const [, r, g, b] = c.match(/^#(.)(.)(.)$/)!;\n return `#${r}${r}${g}${g}${b}${b}`.toLowerCase();\n }\n return null;\n }\n\n private handleColorSelect = (color: string) => {\n const normalized = this.normalizeHex(color);\n if (!normalized) return; // 非法颜色直接忽略,防止 currentColor 进入不可解析态\n this.currentColor = normalized;\n this.modelValue = normalized;\n this.hbChange.emit(normalized);\n this.hbActiveChange.emit(normalized);\n };\n\n private handleSaturationClick = (e: MouseEvent) => {\n const target = e.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n const x = e.clientX - rect.left;\n const y = e.clientY - rect.top;\n\n // X 轴代表饱和度 (0-100%)\n this.saturation = Math.max(0, Math.min(100, (x / rect.width) * 100));\n // Y 轴代表明度 (0-100%,从上到下)\n this.value = Math.max(0, Math.min(100, 100 - (y / rect.height) * 100));\n\n const hex = this.hsvToHex(this.hue, this.saturation, this.value);\n this.handleColorSelect(hex);\n };\n\n private handleHueClick = (e: MouseEvent) => {\n const target = e.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n const x = e.clientX - rect.left;\n\n // 色相值 0-360\n this.hue = Math.max(0, Math.min(360, (x / rect.width) * 360));\n\n const hex = this.hsvToHex(this.hue, this.saturation, this.value);\n this.handleColorSelect(hex);\n };\n\n private handleInputChange = (e: Event) => {\n const target = e.target as HTMLInputElement;\n const value = target.value;\n // 验证 hex 颜色格式(3 位简写会被 handleColorSelect 内部规范化为 6 位)\n if (/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(value)) {\n this.handleColorSelect(value);\n }\n };\n\n /** 透明度条点击/拖动:X 轴映射到 alpha 0-100 */\n private handleAlphaClick = (e: MouseEvent) => {\n const target = e.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n const x = e.clientX - rect.left;\n this.alpha = Math.max(0, Math.min(100, Math.round((x / rect.width) * 100)));\n // alpha 变化触发 active 事件(不改变 hex,但通知消费者透明度变化)\n this.hbActiveChange.emit(this.getFormattedValue());\n };\n\n private handleRgbInputChange = (index: number, value: string) => {\n const rgb = this.hexToRgb(this.currentColor);\n if (rgb) {\n const num = parseInt(value, 10);\n if (!isNaN(num) && num >= 0 && num <= 255) {\n if (index === 0) rgb.r = num;\n else if (index === 1) rgb.g = num;\n else if (index === 2) rgb.b = num;\n\n const hex = `#${[rgb.r, rgb.g, rgb.b]\n .map(x => {\n const hex = x.toString(16);\n return hex.length === 1 ? '0' + hex : hex;\n })\n .join('')}`;\n this.handleColorSelect(hex);\n }\n }\n };\n\n private hexToRgb(hex: string): { r: number; g: number; b: number } | null {\n // 先用 normalizeHex 兜底 3 位简写(#abc → #aabbcc),再解析\n const normalized = this.normalizeHex(hex);\n if (!normalized) return null;\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(normalized);\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n }\n : null;\n }\n\n // RGB 转 HSV\n private rgbToHsv(r: number, g: number, b: number): { h: number; s: number; v: number } {\n r = r / 255;\n g = g / 255;\n b = b / 255;\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const diff = max - min;\n\n let h = 0;\n if (diff !== 0) {\n if (max === r) {\n h = ((g - b) / diff) % 6;\n } else if (max === g) {\n h = (b - r) / diff + 2;\n } else {\n h = (r - g) / diff + 4;\n }\n }\n h = Math.round(h * 60);\n if (h < 0) h += 360;\n\n const s = max === 0 ? 0 : Math.round((diff / max) * 100);\n const v = Math.round(max * 100);\n\n return { h, s, v };\n }\n\n // HSV 转 RGB\n private hsvToRgb(h: number, s: number, v: number): { r: number; g: number; b: number } {\n s = s / 100;\n v = v / 100;\n\n const c = v * s;\n const x = c * (1 - Math.abs(((h / 60) % 2) - 1));\n const m = v - c;\n\n let r = 0,\n g = 0,\n b = 0;\n\n if (h >= 0 && h < 60) {\n r = c;\n g = x;\n b = 0;\n } else if (h >= 60 && h < 120) {\n r = x;\n g = c;\n b = 0;\n } else if (h >= 120 && h < 180) {\n r = 0;\n g = c;\n b = x;\n } else if (h >= 180 && h < 240) {\n r = 0;\n g = x;\n b = c;\n } else if (h >= 240 && h < 300) {\n r = x;\n g = 0;\n b = c;\n } else if (h >= 300 && h < 360) {\n r = c;\n g = 0;\n b = x;\n }\n\n return {\n r: Math.round((r + m) * 255),\n g: Math.round((g + m) * 255),\n b: Math.round((b + m) * 255),\n };\n }\n\n // HSV 转 Hex\n private hsvToHex(h: number, s: number, v: number): string {\n const rgb = this.hsvToRgb(h, s, v);\n return `#${[rgb.r, rgb.g, rgb.b]\n .map(x => {\n const hex = x.toString(16);\n return hex.length === 1 ? '0' + hex : hex;\n })\n .join('')}`;\n }\n\n // 从颜色值更新 HSV\n private updateHSVFromColor(color: string) {\n const rgb = this.hexToRgb(color);\n if (rgb) {\n const hsv = this.rgbToHsv(rgb.r, rgb.g, rgb.b);\n this.hue = hsv.h;\n this.saturation = hsv.s;\n this.value = hsv.v;\n }\n }\n\n /** 按当前 colorFormat 输出最终颜色字符串(对齐 antd 的 format 行为) */\n private getFormattedValue(): string {\n const rgb = this.hexToRgb(this.currentColor);\n if (!rgb) return this.currentColor;\n switch (this.colorFormat) {\n case 'rgb':\n return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;\n case 'hsl': {\n const hsv = this.rgbToHsv(rgb.r, rgb.g, rgb.b);\n const [h, s, l] = this.hsvToHsl(hsv.h, hsv.s, hsv.v);\n return `hsl(${h}, ${s}%, ${l}%)`;\n }\n case 'hsv': {\n const hsv = this.rgbToHsv(rgb.r, rgb.g, rgb.b);\n return `hsv(${hsv.h}, ${hsv.s}%, ${hsv.v}%)`;\n }\n case 'hex':\n default:\n return this.currentColor;\n }\n }\n\n /** HSV → HSL(HSL 字符串输出用) */\n private hsvToHsl(h: number, s: number, v: number): [number, number, number] {\n s /= 100;\n v /= 100;\n const l = v - (v * s) / 2;\n const sl = l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l);\n return [Math.round(h), Math.round(sl * 100), Math.round(l * 100)];\n }\n\n render() {\n const rgb = this.hexToRgb(this.currentColor);\n const predefinedColors = this.predefine || ['#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#1e90ff', '#c71585', '#000000', '#ffffff', '#808080'];\n\n // 根据当前色相生成饱和度面板的背景色\n const hueColor = this.hsvToHex(this.hue, 100, 100);\n\n return (\n <div\n class={{\n 'hb-color-picker': true,\n 'hb-color-picker--open': this.isOpen,\n 'hb-color-picker--disabled': this.disabled,\n }}\n onKeyDown={this.handleKeyDown}\n >\n <div\n class=\"hb-color-picker__trigger\"\n onClick={this.handleTriggerClick}\n role=\"button\"\n tabindex={this.disabled ? -1 : 0}\n aria-haspopup=\"dialog\"\n aria-expanded={this.isOpen ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.handleTriggerClick();\n }\n }}\n >\n <div class=\"hb-color-picker__color\" style={{ backgroundColor: this.currentColor }}></div>\n <span class=\"hb-color-picker__text\">{this.currentColor}</span>\n </div>\n {this.isOpen && (\n <div class=\"hb-color-picker__dropdown\" role=\"dialog\">\n <div class=\"hb-color-picker__panel\">\n <div class=\"hb-color-picker__saturation\" onClick={this.handleSaturationClick}>\n <div class=\"hb-color-picker__saturation-bg\" style={{ backgroundColor: hueColor }}></div>\n <div class=\"hb-color-picker__saturation-white\"></div>\n <div class=\"hb-color-picker__saturation-black\"></div>\n <div\n class=\"hb-color-picker__saturation-pointer\"\n style={{\n left: `${this.saturation}%`,\n top: `${100 - this.value}%`,\n }}\n ></div>\n </div>\n <div class=\"hb-color-picker__controls\">\n <div class=\"hb-color-picker__hue\" onClick={this.handleHueClick}>\n <div class=\"hb-color-picker__hue-bar\"></div>\n <div\n class=\"hb-color-picker__hue-pointer\"\n style={{\n left: `${(this.hue / 360) * 100}%`,\n }}\n ></div>\n </div>\n {this.showAlpha && (\n <div class=\"hb-color-picker__alpha\" onClick={this.handleAlphaClick}>\n <div class=\"hb-color-picker__alpha-bar\" style={{ backgroundColor: this.currentColor }}></div>\n <div class=\"hb-color-picker__alpha-pointer\" style={{ left: `${this.alpha}%` }}></div>\n </div>\n )}\n </div>\n <div class=\"hb-color-picker__input\">\n <input type=\"text\" class=\"hb-color-picker__input-hex\" value={this.currentColor} onInput={this.handleInputChange} aria-label=\"HEX 颜色值\" />\n {rgb && (\n <div class=\"hb-color-picker__input-rgb\">\n <input type=\"number\" min=\"0\" max=\"255\" value={rgb.r} onInput={e => this.handleRgbInputChange(0, (e.target as HTMLInputElement).value)} aria-label=\"红色通道\" />\n <input type=\"number\" min=\"0\" max=\"255\" value={rgb.g} onInput={e => this.handleRgbInputChange(1, (e.target as HTMLInputElement).value)} aria-label=\"绿色通道\" />\n <input type=\"number\" min=\"0\" max=\"255\" value={rgb.b} onInput={e => this.handleRgbInputChange(2, (e.target as HTMLInputElement).value)} aria-label=\"蓝色通道\" />\n </div>\n )}\n </div>\n {this.predefine && this.predefine.length > 0 && (\n <div class=\"hb-color-picker__predefine\">\n {predefinedColors.map(color => {\n const normalized = this.normalizeHex(color) || color;\n return (\n <div\n class={{\n 'hb-color-picker__predefine-color': true,\n 'hb-color-picker__predefine-color--selected': normalized === this.currentColor,\n }}\n style={{ backgroundColor: color }}\n onClick={() => this.handleColorSelect(color)}\n title={color}\n ></div>\n );\n })}\n </div>\n )}\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAiB,ogSACvB,MAAAC,EAAeD,E,MCUFE,EAAW,M,mIAMGC,WAMjBC,SAAoB,MAKpBC,YAA6C,MAM7CC,UAAqB,MAKrBC,UAECC,OAAkB,MAClBC,aAAuB,UACvBC,IAAc,IACdC,WAAqB,IACrBC,MAAgB,IAChBC,MAAgB,IAKhBC,SAKAC,eAET,gBAAAC,GACE,GAAIC,KAAKd,WAAY,CACnBc,KAAKR,aAAeQ,KAAKd,WACzBc,KAAKC,mBAAmBD,KAAKd,W,KACxB,CACLc,KAAKC,mBAAmBD,KAAKR,a,CAE/BU,SAASC,iBAAiB,QAASH,KAAKI,oB,CAG1C,oBAAAC,GACEH,SAASI,oBAAoB,QAASN,KAAKI,oB,CAGrCA,oBAAuBG,IAC7B,IAAKP,KAAKT,OAAQ,OAClB,MAAMiB,EAASD,EAAEC,OACjB,IAAKR,KAAKS,GAAGC,SAASF,GAAS,CAC7BR,KAAKT,OAAS,K,GAKlB,iBAAAoB,GACE,GAAIX,KAAKd,WAAY,CACnBc,KAAKR,aAAeQ,KAAKd,WACzBc,KAAKC,mBAAmBD,KAAKd,W,EAIzB0B,mBAAqB,KAC3B,GAAIZ,KAAKb,SAAU,OACnBa,KAAKT,QAAUS,KAAKT,MAAM,EAIpBsB,cAAiBN,IACvB,GAAIP,KAAKb,SAAU,OACnB,GAAIoB,EAAEO,MAAQ,UAAYd,KAAKT,OAAQ,CACrCgB,EAAEQ,iBACFf,KAAKT,OAAS,K,GAKV,YAAAyB,CAAaC,GACnB,UAAWA,IAAU,SAAU,OAAO,KACtC,MAAMC,EAAID,EAAME,OAChB,GAAI,sBAAsBC,KAAKF,GAAI,OAAOA,EAAEG,cAC5C,GAAI,sBAAsBD,KAAKF,GAAI,CACjC,MAAM,CAAGI,EAAGC,EAAGC,GAAKN,EAAEO,MAAM,gBAC5B,MAAO,IAAIH,IAAIA,IAAIC,IAAIA,IAAIC,IAAIA,IAAIH,a,CAErC,OAAO,I,CAGDK,kBAAqBT,IAC3B,MAAMU,EAAa3B,KAAKgB,aAAaC,GACrC,IAAKU,EAAY,OACjB3B,KAAKR,aAAemC,EACpB3B,KAAKd,WAAayC,EAClB3B,KAAKH,SAAS+B,KAAKD,GACnB3B,KAAKF,eAAe8B,KAAKD,EAAW,EAG9BE,sBAAyBtB,IAC/B,MAAMC,EAASD,EAAEuB,cACjB,MAAMC,EAAOvB,EAAOwB,wBACpB,MAAMC,EAAI1B,EAAE2B,QAAUH,EAAKI,KAC3B,MAAMC,EAAI7B,EAAE8B,QAAUN,EAAKO,IAG3BtC,KAAKN,WAAa6C,KAAKC,IAAI,EAAGD,KAAKE,IAAI,IAAMR,EAAIF,EAAKW,MAAS,MAE/D1C,KAAKL,MAAQ4C,KAAKC,IAAI,EAAGD,KAAKE,IAAI,IAAK,IAAOL,EAAIL,EAAKY,OAAU,MAEjE,MAAMC,EAAM5C,KAAK6C,SAAS7C,KAAKP,IAAKO,KAAKN,WAAYM,KAAKL,OAC1DK,KAAK0B,kBAAkBkB,EAAI,EAGrBE,eAAkBvC,IACxB,MAAMC,EAASD,EAAEuB,cACjB,MAAMC,EAAOvB,EAAOwB,wBACpB,MAAMC,EAAI1B,EAAE2B,QAAUH,EAAKI,KAG3BnC,KAAKP,IAAM8C,KAAKC,IAAI,EAAGD,KAAKE,IAAI,IAAMR,EAAIF,EAAKW,MAAS,MAExD,MAAME,EAAM5C,KAAK6C,SAAS7C,KAAKP,IAAKO,KAAKN,WAAYM,KAAKL,OAC1DK,KAAK0B,kBAAkBkB,EAAI,EAGrBG,kBAAqBxC,IAC3B,MAAMC,EAASD,EAAEC,OACjB,MAAMb,EAAQa,EAAOb,MAErB,GAAI,qCAAqCyB,KAAKzB,GAAQ,CACpDK,KAAK0B,kBAAkB/B,E,GAKnBqD,iBAAoBzC,IAC1B,MAAMC,EAASD,EAAEuB,cACjB,MAAMC,EAAOvB,EAAOwB,wBACpB,MAAMC,EAAI1B,EAAE2B,QAAUH,EAAKI,KAC3BnC,KAAKJ,MAAQ2C,KAAKC,IAAI,EAAGD,KAAKE,IAAI,IAAKF,KAAKU,MAAOhB,EAAIF,EAAKW,MAAS,OAErE1C,KAAKF,eAAe8B,KAAK5B,KAAKkD,oBAAoB,EAG5CC,qBAAuB,CAACC,EAAezD,KAC7C,MAAM0D,EAAMrD,KAAKsD,SAAStD,KAAKR,cAC/B,GAAI6D,EAAK,CACP,MAAME,EAAMC,SAAS7D,EAAO,IAC5B,IAAK8D,MAAMF,IAAQA,GAAO,GAAKA,GAAO,IAAK,CACzC,GAAIH,IAAU,EAAGC,EAAI/B,EAAIiC,OACpB,GAAIH,IAAU,EAAGC,EAAI9B,EAAIgC,OACzB,GAAIH,IAAU,EAAGC,EAAI7B,EAAI+B,EAE9B,MAAMX,EAAM,IAAI,CAACS,EAAI/B,EAAG+B,EAAI9B,EAAG8B,EAAI7B,GAChCkC,KAAIzB,IACH,MAAMW,EAAMX,EAAE0B,SAAS,IACvB,OAAOf,EAAIgB,SAAW,EAAI,IAAMhB,EAAMA,CAAG,IAE1CiB,KAAK,MACR7D,KAAK0B,kBAAkBkB,E,IAKrB,QAAAU,CAASV,GAEf,MAAMjB,EAAa3B,KAAKgB,aAAa4B,GACrC,IAAKjB,EAAY,OAAO,KACxB,MAAMmC,EAAS,4CAA4CC,KAAKpC,GAChE,OAAOmC,EACH,CACExC,EAAGkC,SAASM,EAAO,GAAI,IACvBvC,EAAGiC,SAASM,EAAO,GAAI,IACvBtC,EAAGgC,SAASM,EAAO,GAAI,KAEzB,I,CAIE,QAAAE,CAAS1C,EAAWC,EAAWC,GACrCF,EAAIA,EAAI,IACRC,EAAIA,EAAI,IACRC,EAAIA,EAAI,IAER,MAAMgB,EAAMD,KAAKC,IAAIlB,EAAGC,EAAGC,GAC3B,MAAMiB,EAAMF,KAAKE,IAAInB,EAAGC,EAAGC,GAC3B,MAAMyC,EAAOzB,EAAMC,EAEnB,IAAIyB,EAAI,EACR,GAAID,IAAS,EAAG,CACd,GAAIzB,IAAQlB,EAAG,CACb4C,GAAM3C,EAAIC,GAAKyC,EAAQ,C,MAClB,GAAIzB,IAAQjB,EAAG,CACpB2C,GAAK1C,EAAIF,GAAK2C,EAAO,C,KAChB,CACLC,GAAK5C,EAAIC,GAAK0C,EAAO,C,EAGzBC,EAAI3B,KAAKU,MAAMiB,EAAI,IACnB,GAAIA,EAAI,EAAGA,GAAK,IAEhB,MAAMC,EAAI3B,IAAQ,EAAI,EAAID,KAAKU,MAAOgB,EAAOzB,EAAO,KACpD,MAAM4B,EAAI7B,KAAKU,MAAMT,EAAM,KAE3B,MAAO,CAAE0B,IAAGC,IAAGC,I,CAIT,QAAAC,CAASH,EAAWC,EAAWC,GACrCD,EAAIA,EAAI,IACRC,EAAIA,EAAI,IAER,MAAMlD,EAAIkD,EAAID,EACd,MAAMlC,EAAIf,GAAK,EAAIqB,KAAK+B,IAAMJ,EAAI,GAAM,EAAK,IAC7C,MAAMK,EAAIH,EAAIlD,EAEd,IAAII,EAAI,EACNC,EAAI,EACJC,EAAI,EAEN,GAAI0C,GAAK,GAAKA,EAAI,GAAI,CACpB5C,EAAIJ,EACJK,EAAIU,EACJT,EAAI,C,MACC,GAAI0C,GAAK,IAAMA,EAAI,IAAK,CAC7B5C,EAAIW,EACJV,EAAIL,EACJM,EAAI,C,MACC,GAAI0C,GAAK,KAAOA,EAAI,IAAK,CAC9B5C,EAAI,EACJC,EAAIL,EACJM,EAAIS,C,MACC,GAAIiC,GAAK,KAAOA,EAAI,IAAK,CAC9B5C,EAAI,EACJC,EAAIU,EACJT,EAAIN,C,MACC,GAAIgD,GAAK,KAAOA,EAAI,IAAK,CAC9B5C,EAAIW,EACJV,EAAI,EACJC,EAAIN,C,MACC,GAAIgD,GAAK,KAAOA,EAAI,IAAK,CAC9B5C,EAAIJ,EACJK,EAAI,EACJC,EAAIS,C,CAGN,MAAO,CACLX,EAAGiB,KAAKU,OAAO3B,EAAIiD,GAAK,KACxBhD,EAAGgB,KAAKU,OAAO1B,EAAIgD,GAAK,KACxB/C,EAAGe,KAAKU,OAAOzB,EAAI+C,GAAK,K,CAKpB,QAAA1B,CAASqB,EAAWC,EAAWC,GACrC,MAAMf,EAAMrD,KAAKqE,SAASH,EAAGC,EAAGC,GAChC,MAAO,IAAI,CAACf,EAAI/B,EAAG+B,EAAI9B,EAAG8B,EAAI7B,GAC3BkC,KAAIzB,IACH,MAAMW,EAAMX,EAAE0B,SAAS,IACvB,OAAOf,EAAIgB,SAAW,EAAI,IAAMhB,EAAMA,CAAG,IAE1CiB,KAAK,K,CAIF,kBAAA5D,CAAmBgB,GACzB,MAAMoC,EAAMrD,KAAKsD,SAASrC,GAC1B,GAAIoC,EAAK,CACP,MAAMmB,EAAMxE,KAAKgE,SAASX,EAAI/B,EAAG+B,EAAI9B,EAAG8B,EAAI7B,GAC5CxB,KAAKP,IAAM+E,EAAIN,EACflE,KAAKN,WAAa8E,EAAIL,EACtBnE,KAAKL,MAAQ6E,EAAIJ,C,EAKb,iBAAAlB,GACN,MAAMG,EAAMrD,KAAKsD,SAAStD,KAAKR,cAC/B,IAAK6D,EAAK,OAAOrD,KAAKR,aACtB,OAAQQ,KAAKZ,aACX,IAAK,MACH,MAAO,OAAOiE,EAAI/B,MAAM+B,EAAI9B,MAAM8B,EAAI7B,KACxC,IAAK,MAAO,CACV,MAAMgD,EAAMxE,KAAKgE,SAASX,EAAI/B,EAAG+B,EAAI9B,EAAG8B,EAAI7B,GAC5C,MAAO0C,EAAGC,EAAGM,GAAKzE,KAAK0E,SAASF,EAAIN,EAAGM,EAAIL,EAAGK,EAAIJ,GAClD,MAAO,OAAOF,MAAMC,OAAOM,K,CAE7B,IAAK,MAAO,CACV,MAAMD,EAAMxE,KAAKgE,SAASX,EAAI/B,EAAG+B,EAAI9B,EAAG8B,EAAI7B,GAC5C,MAAO,OAAOgD,EAAIN,MAAMM,EAAIL,OAAOK,EAAIJ,K,CAEzC,IAAK,MACL,QACE,OAAOpE,KAAKR,a,CAKV,QAAAkF,CAASR,EAAWC,EAAWC,GACrCD,GAAK,IACLC,GAAK,IACL,MAAMK,EAAIL,EAAKA,EAAID,EAAK,EACxB,MAAMQ,EAAKF,IAAM,GAAKA,IAAM,EAAI,GAAKL,EAAIK,GAAKlC,KAAKE,IAAIgC,EAAG,EAAIA,GAC9D,MAAO,CAAClC,KAAKU,MAAMiB,GAAI3B,KAAKU,MAAM0B,EAAK,KAAMpC,KAAKU,MAAMwB,EAAI,K,CAG9D,MAAAG,GACE,MAAMvB,EAAMrD,KAAKsD,SAAStD,KAAKR,cAC/B,MAAMqF,EAAmB7E,KAAKV,WAAa,CAAC,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,WAG/I,MAAMwF,EAAW9E,KAAK6C,SAAS7C,KAAKP,IAAK,IAAK,KAE9C,OACEyE,EAAA,OAAApD,IAAA,2CACEiE,MAAO,CACL,kBAAmB,KACnB,wBAAyB/E,KAAKT,OAC9B,4BAA6BS,KAAKb,UAEpC6F,UAAWhF,KAAKa,eAEhBqD,EAAA,OAAApD,IAAA,2CACEiE,MAAM,2BACNE,QAASjF,KAAKY,mBACdsE,KAAK,SACLC,SAAUnF,KAAKb,UAAY,EAAI,EAAC,gBAClB,SAAQ,gBACPa,KAAKT,OAAS,OAAS,QAAO,gBAC9BS,KAAKb,SAAW,OAAS,QACxC6F,UAAWzE,IACT,GAAIA,EAAEO,MAAQ,SAAWP,EAAEO,MAAQ,IAAK,CACtCP,EAAEQ,iBACFf,KAAKY,oB,IAITsD,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,yBAAyBK,MAAO,CAAEC,gBAAiBrF,KAAKR,gBACnE0E,EAAA,QAAApD,IAAA,2CAAMiE,MAAM,yBAAyB/E,KAAKR,eAE3CQ,KAAKT,QACJ2E,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,4BAA4BG,KAAK,UAC1ChB,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,0BACTb,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,8BAA8BE,QAASjF,KAAK6B,uBACrDqC,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,iCAAiCK,MAAO,CAAEC,gBAAiBP,KACtEZ,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,sCACXb,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,sCACXb,EAAA,OAAApD,IAAA,2CACEiE,MAAM,sCACNK,MAAO,CACLjD,KAAM,GAAGnC,KAAKN,cACd4C,IAAK,GAAG,IAAMtC,KAAKL,aAIzBuE,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,6BACTb,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,uBAAuBE,QAASjF,KAAK8C,gBAC9CoB,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,6BACXb,EAAA,OAAApD,IAAA,2CACEiE,MAAM,+BACNK,MAAO,CACLjD,KAAM,GAAInC,KAAKP,IAAM,IAAO,WAIjCO,KAAKX,WACJ6E,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,yBAAyBE,QAASjF,KAAKgD,kBAChDkB,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,6BAA6BK,MAAO,CAAEC,gBAAiBrF,KAAKR,gBACvE0E,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,iCAAiCK,MAAO,CAAEjD,KAAM,GAAGnC,KAAKJ,cAIzEsE,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,0BACTb,EAAA,SAAApD,IAAA,2CAAOwE,KAAK,OAAOP,MAAM,6BAA6BpF,MAAOK,KAAKR,aAAc+F,QAASvF,KAAK+C,kBAAiB,aAAa,YAC3HM,GACCa,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,8BACTb,EAAA,SAAApD,IAAA,2CAAOwE,KAAK,SAAS7C,IAAI,IAAID,IAAI,MAAM7C,MAAO0D,EAAI/B,EAAGiE,QAAShF,GAAKP,KAAKmD,qBAAqB,EAAI5C,EAAEC,OAA4Bb,OAAM,aAAa,SAClJuE,EAAA,SAAApD,IAAA,2CAAOwE,KAAK,SAAS7C,IAAI,IAAID,IAAI,MAAM7C,MAAO0D,EAAI9B,EAAGgE,QAAShF,GAAKP,KAAKmD,qBAAqB,EAAI5C,EAAEC,OAA4Bb,OAAM,aAAa,SAClJuE,EAAA,SAAApD,IAAA,2CAAOwE,KAAK,SAAS7C,IAAI,IAAID,IAAI,MAAM7C,MAAO0D,EAAI7B,EAAG+D,QAAShF,GAAKP,KAAKmD,qBAAqB,EAAI5C,EAAEC,OAA4Bb,OAAM,aAAa,WAIvJK,KAAKV,WAAaU,KAAKV,UAAUsE,OAAS,GACzCM,EAAA,OAAApD,IAAA,2CAAKiE,MAAM,8BACRF,EAAiBnB,KAAIzC,IACpB,MAAMU,EAAa3B,KAAKgB,aAAaC,IAAUA,EAC/C,OACEiD,EAAA,OACEa,MAAO,CACL,mCAAoC,KACpC,6CAA8CpD,IAAe3B,KAAKR,cAEpE4F,MAAO,CAAEC,gBAAiBpE,GAC1BgE,QAAS,IAAMjF,KAAK0B,kBAAkBT,GACtCuE,MAAOvE,GACF,O","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as e}from"./p-e42dfa95.js";const o='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.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-switch-width:40px;--hb-switch-active-color:var(--hb-color-primary);--hb-switch-inactive-color:var(--hb-color-text-placeholder,#c0c4cc);display:inline-block}.hb-switch{align-items:center;cursor:pointer;display:inline-flex;font-size:14px;height:20px;line-height:20px;position:relative;vertical-align:middle}.hb-switch__original{height:0;margin:0;opacity:0;position:absolute;width:0}.hb-switch__core{background:var(--hb-switch-inactive-color);border:1px solid var(--hb-switch-inactive-color);border-radius:10px;box-sizing:border-box;cursor:pointer;display:inline-block;height:20px;margin:0;outline:none;position:relative;transition:border-color .3s,background-color .3s;vertical-align:middle;width:var(--hb-switch-width)}.hb-switch__core:after{background-color:var(--hb-color-white,#fff);border-radius:100%;content:"";height:16px;left:1px;position:absolute;top:1px;transition:all .3s;width:16px}.hb-switch--checked .hb-switch__core{background-color:var(--hb-switch-active-color);border-color:var(--hb-switch-active-color)}.hb-switch--checked .hb-switch__core:after{left:100%;margin-left:-17px}.hb-switch__inner{color:var(--hb-color-white,#fff);font-size:12px;left:23px;position:absolute;transition:all .3s}.hb-switch--checked .hb-switch__inner{left:5px}.hb-switch--disabled{cursor:not-allowed;opacity:.6}.hb-switch--disabled .hb-switch__core{cursor:not-allowed}.hb-switch--inline-prompt .hb-switch__inner--inline{align-items:center;color:#fff;display:flex;font-size:12px;height:100%;left:0;pointer-events:none;right:0}.hb-switch__inner-text{align-items:center;display:flex;flex:1;justify-content:center;opacity:0;transition:opacity .2s}.hb-switch:not(.hb-switch--checked) .hb-switch__inner-text--inactive{justify-content:flex-start;opacity:1;padding-left:6px;padding-right:22px}.hb-switch:not(.hb-switch--checked) .hb-switch__inner-text--active{display:none}.hb-switch--checked .hb-switch__inner-text--active{justify-content:flex-end;opacity:1;padding-left:22px;padding-right:6px}.hb-switch--checked .hb-switch__inner-text--inactive{display:none}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}';const n=o;const a=class{constructor(e){t(this,e);this.hbChange=i(this,"hbChange",7)}modelValue=false;disabled=false;activeText;inactiveText;activeColor;inactiveColor;activeValue=true;inactiveValue=false;width;inlinePrompt=false;hbChange;handleChange=t=>{if(this.disabled){t.preventDefault();return}const i=t.target.checked;const e=i?this.activeValue:this.inactiveValue;this.modelValue=i;this.hbChange.emit(e)};render(){const t=this.modelValue===this.activeValue;const i=!!(this.activeText||this.inactiveText);const o=this.width||(i?this.inlinePrompt?50:60:40);return e("label",{key:"8dd6419c9a3bf07eb817f7dcc5527a9205fbe3ce",class:{"hb-switch":true,"hb-switch--checked":t,"hb-switch--disabled":this.disabled,"hb-switch--inline-prompt":this.inlinePrompt&&i},style:{"--hb-switch-width":`${o}px`,"--hb-switch-active-color":this.activeColor||"var(--hb-color-primary)","--hb-switch-inactive-color":this.inactiveColor||"var(--hb-color-text-placeholder, #c0c4cc)"}},e("input",{key:"1b9ad2ba8333d68eb277b4c3e69def909bc1afa4",type:"checkbox",class:"hb-switch__original",role:"switch","aria-checked":t?"true":"false",checked:t,disabled:this.disabled,onChange:this.handleChange,"aria-label":this.activeText||this.inactiveText||undefined}),e("span",{key:"0e5f62e436fe4269fc5297304d387226048cd1da",class:"hb-switch__core"},i&&!this.inlinePrompt&&e("span",{key:"a47d95af71418779db46c9ca3149db1632fce64a",class:"hb-switch__inner"},t?this.activeText:this.inactiveText),i&&this.inlinePrompt&&e("span",{key:"f1988e24665253db80209065c5269ffd5ccc7679",class:"hb-switch__inner hb-switch__inner--inline"},e("span",{key:"ad6cc1be25962c01ec4cc4ce67a623d52a0aa79f",class:"hb-switch__inner-text hb-switch__inner-text--active"},this.activeText),e("span",{key:"2c7e5f3087e46079fa23d55b2f42d98b773cc5b9",class:"hb-switch__inner-text hb-switch__inner-text--inactive"},this.inactiveText))))}};a.style=n;export{a as hb_switch};
2
- //# sourceMappingURL=p-626b48f1.entry.js.map
1
+ import{r as t,c as e,h as i}from"./p-e42dfa95.js";const o='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.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-switch-width:40px;--hb-switch-active-color:var(--hb-color-primary);--hb-switch-inactive-color:var(--hb-color-text-placeholder,#c0c4cc);display:inline-block}.hb-switch{align-items:center;cursor:pointer;display:inline-flex;font-size:14px;height:20px;line-height:20px;position:relative;vertical-align:middle}.hb-switch__original{height:0;margin:0;opacity:0;position:absolute;width:0}.hb-switch__core{background:var(--hb-switch-inactive-color);border:1px solid var(--hb-switch-inactive-color);border-radius:10px;box-sizing:border-box;cursor:pointer;display:inline-block;height:20px;margin:0;outline:none;position:relative;transition:border-color .3s,background-color .3s;vertical-align:middle;width:var(--hb-switch-width)}.hb-switch__core:after{background-color:var(--hb-color-white,#fff);border-radius:100%;content:"";height:16px;left:1px;position:absolute;top:1px;transition:all .3s;width:16px}.hb-switch--checked .hb-switch__core{background-color:var(--hb-switch-active-color);border-color:var(--hb-switch-active-color)}.hb-switch--checked .hb-switch__core:after{left:100%;margin-left:-17px}.hb-switch__inner{color:var(--hb-color-white,#fff);font-size:12px;left:23px;position:absolute;transition:all .3s}.hb-switch--checked .hb-switch__inner{left:5px}.hb-switch--disabled{cursor:not-allowed;opacity:.6}.hb-switch--disabled .hb-switch__core{cursor:not-allowed}.hb-switch--inline-prompt .hb-switch__inner--inline{align-items:center;color:#fff;display:flex;font-size:12px;height:100%;left:0;pointer-events:none;right:0}.hb-switch__inner-text{align-items:center;display:flex;flex:1;justify-content:center;opacity:0;transition:opacity .2s}.hb-switch:not(.hb-switch--checked) .hb-switch__inner-text--inactive{justify-content:flex-start;opacity:1;padding-left:6px;padding-right:22px}.hb-switch:not(.hb-switch--checked) .hb-switch__inner-text--active{display:none}.hb-switch--checked .hb-switch__inner-text--active{justify-content:flex-end;opacity:1;padding-left:22px;padding-right:6px}.hb-switch--checked .hb-switch__inner-text--inactive{display:none}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}';const n=o;const a=class{constructor(i){t(this,i);this.hbChange=e(this,"hbChange",7)}modelValue=false;disabled=false;activeText;inactiveText;activeColor;inactiveColor;activeValue=true;inactiveValue=false;width;inlinePrompt=false;hbChange;handleChange=t=>{if(this.disabled){t.preventDefault();return}const e=t.target.checked;const i=e?this.activeValue:this.inactiveValue;this.modelValue=e;this.hbChange.emit(i)};render(){const t=this.modelValue===this.activeValue;const e=!!(this.activeText||this.inactiveText);const o=this.width||(e?this.inlinePrompt?50:60:40);return i("label",{key:"ff287325a739ef43860e353f54d9dda065c4e23d",class:{"hb-switch":true,"hb-switch--checked":t,"hb-switch--disabled":this.disabled,"hb-switch--inline-prompt":this.inlinePrompt&&e},style:{"--hb-switch-width":`${o}px`,"--hb-switch-active-color":this.activeColor||"var(--hb-color-primary)","--hb-switch-inactive-color":this.inactiveColor||"var(--hb-color-text-placeholder, #c0c4cc)"}},i("input",{key:"47260aca8d13feffef8eeb2977af92de11325f2e",type:"checkbox",class:"hb-switch__original",role:"switch","aria-checked":t?"true":"false",checked:t,disabled:this.disabled,onChange:this.handleChange,"aria-label":this.activeText||this.inactiveText||undefined}),i("span",{key:"dd8e172783702332caf0000af65ec12e926fbba7",class:"hb-switch__core"},e&&!this.inlinePrompt&&i("span",{key:"b45b42e740bfe66b676be965d5811c6b35bc7f8c",class:"hb-switch__inner"},t?this.activeText:this.inactiveText),e&&this.inlinePrompt&&i("span",{key:"b29c9c819dd6aa51999a16bd73a3d2bb971001df",class:"hb-switch__inner hb-switch__inner--inline"},i("span",{key:"8107777ef14e720cbb000fb73f3db39ed10ed1cc",class:"hb-switch__inner-text hb-switch__inner-text--active"},this.activeText),i("span",{key:"ce8a279e0ddc7a6a0e0efc0a9b27f6b5ef677fc9",class:"hb-switch__inner-text hb-switch__inner-text--inactive"},this.inactiveText))))}};a.style=n;export{a as hb_switch};
2
+ //# sourceMappingURL=p-e73c357f.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["switchCss","HbSwitchStyle0","Switch","modelValue","disabled","activeText","inactiveText","activeColor","inactiveColor","activeValue","inactiveValue","width","inlinePrompt","hbChange","handleChange","e","this","preventDefault","checked","target","value","emit","render","isChecked","hasText","h","key","class","style","type","role","onChange","undefined"],"sources":["src/components/Switch/switch.css?tag=hb-switch&encapsulation=shadow","src/components/Switch/Switch.tsx"],"sourcesContent":[":host {\n display: inline-block;\n --hb-switch-width: 40px;\n --hb-switch-active-color: var(--hb-color-primary);\n --hb-switch-inactive-color: var(--hb-color-text-placeholder, #c0c4cc);\n}\n\n.hb-switch {\n display: inline-flex;\n align-items: center;\n position: relative;\n font-size: 14px;\n line-height: 20px;\n height: 20px;\n vertical-align: middle;\n cursor: pointer;\n}\n\n.hb-switch__original {\n opacity: 0;\n width: 0;\n height: 0;\n margin: 0;\n position: absolute;\n}\n\n.hb-switch__core {\n margin: 0;\n display: inline-block;\n position: relative;\n width: var(--hb-switch-width);\n height: 20px;\n border: 1px solid var(--hb-switch-inactive-color);\n outline: none;\n border-radius: 10px;\n box-sizing: border-box;\n background: var(--hb-switch-inactive-color);\n cursor: pointer;\n transition:\n border-color 0.3s,\n background-color 0.3s;\n vertical-align: middle;\n}\n\n.hb-switch__core::after {\n content: '';\n position: absolute;\n top: 1px;\n left: 1px;\n border-radius: 100%;\n transition: all 0.3s;\n width: 16px;\n height: 16px;\n background-color: var(--hb-color-white, #ffffff);\n}\n\n.hb-switch--checked .hb-switch__core {\n border-color: var(--hb-switch-active-color);\n background-color: var(--hb-switch-active-color);\n}\n\n.hb-switch--checked .hb-switch__core::after {\n left: 100%;\n margin-left: -17px;\n}\n\n.hb-switch__inner {\n position: absolute;\n left: 23px;\n font-size: 12px;\n color: var(--hb-color-white, #ffffff);\n transition: all 0.3s;\n}\n\n.hb-switch--checked .hb-switch__inner {\n left: 5px;\n}\n\n.hb-switch--disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.hb-switch--disabled .hb-switch__core {\n cursor: not-allowed;\n}\n\n/* ---- inlinePrompt:文字塞进圆点两侧 ---- */\n.hb-switch--inline-prompt .hb-switch__inner--inline {\n left: 0;\n right: 0;\n display: flex;\n height: 100%;\n align-items: center;\n font-size: 12px;\n color: #fff;\n pointer-events: none;\n}\n\n.hb-switch__inner-text {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.2s;\n}\n\n/* 关闭态:左侧(inactive)显示,圆点在右 */\n.hb-switch:not(.hb-switch--checked) .hb-switch__inner-text--inactive {\n opacity: 1;\n padding-left: 6px;\n padding-right: 22px;\n justify-content: flex-start;\n}\n\n.hb-switch:not(.hb-switch--checked) .hb-switch__inner-text--active {\n display: none;\n}\n\n/* 打开态:右侧(active)显示,圆点在左 */\n.hb-switch--checked .hb-switch__inner-text--active {\n opacity: 1;\n padding-left: 22px;\n padding-right: 6px;\n justify-content: flex-end;\n}\n\n.hb-switch--checked .hb-switch__inner-text--inactive {\n display: none;\n}\n","import { Component, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n/**\n * Switch 开关组件\n * 表示两种相互对立的状态间的切换,多用于触发「开/关」\n */\n@Component({\n tag: 'hb-switch',\n styleUrl: 'switch.css',\n shadow: true,\n})\nexport class Switch {\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue: boolean = false;\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否显示文字描述\n * @default false\n */\n @Prop() activeText?: string;\n\n /**\n * 关闭时的文字描述\n */\n @Prop() inactiveText?: string;\n\n /**\n * 打开时的背景色\n */\n @Prop() activeColor?: string;\n\n /**\n * 关闭时的背景色\n */\n @Prop() inactiveColor?: string;\n\n /**\n * 打开时的值\n * @default true\n */\n @Prop() activeValue: boolean | string | number = true;\n\n /**\n * 关闭时的值\n * @default false\n */\n @Prop() inactiveValue: boolean | string | number = false;\n\n /**\n * 宽度\n */\n @Prop() width?: number;\n\n /**\n * 是否内联提示\n * @default false\n */\n @Prop() inlinePrompt: boolean = false;\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<boolean | string | number>;\n\n private handleChange = (e: Event) => {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n const checked = (e.target as HTMLInputElement).checked;\n const value = checked ? this.activeValue : this.inactiveValue;\n\n this.modelValue = checked;\n this.hbChange.emit(value);\n };\n\n render() {\n const isChecked = this.modelValue === this.activeValue;\n // 宽度:inlinePrompt 与 text 模式都加宽;inlinePrompt 文字塞进圆点两侧,仍需更宽一些\n const hasText = !!(this.activeText || this.inactiveText);\n const width = this.width || (hasText ? (this.inlinePrompt ? 50 : 60) : 40);\n\n return (\n <label\n class={{\n 'hb-switch': true,\n 'hb-switch--checked': isChecked,\n 'hb-switch--disabled': this.disabled,\n 'hb-switch--inline-prompt': this.inlinePrompt && hasText,\n }}\n style={{\n '--hb-switch-width': `${width}px`,\n '--hb-switch-active-color': this.activeColor || 'var(--hb-color-primary)',\n '--hb-switch-inactive-color': this.inactiveColor || 'var(--hb-color-text-placeholder, #c0c4cc)',\n }}\n >\n <input\n type=\"checkbox\"\n class=\"hb-switch__original\"\n role=\"switch\"\n aria-checked={isChecked ? 'true' : 'false'}\n checked={isChecked}\n disabled={this.disabled}\n onChange={this.handleChange}\n aria-label={this.activeText || this.inactiveText || undefined}\n />\n <span class=\"hb-switch__core\">\n {hasText && !this.inlinePrompt && <span class=\"hb-switch__inner\">{isChecked ? this.activeText : this.inactiveText}</span>}\n {hasText && this.inlinePrompt && (\n // 内联提示:开/关文字塞进圆点两侧,随切换显隐\n <span class=\"hb-switch__inner hb-switch__inner--inline\">\n <span class=\"hb-switch__inner-text hb-switch__inner-text--active\">{this.activeText}</span>\n <span class=\"hb-switch__inner-text hb-switch__inner-text--inactive\">{this.inactiveText}</span>\n </span>\n )}\n </span>\n </label>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAY,gkPAClB,MAAAC,EAAeD,E,MCUFE,EAAM,M,4DAIQC,WAAsB,MAMvCC,SAAoB,MAMpBC,WAKAC,aAKAC,YAKAC,cAMAC,YAAyC,KAMzCC,cAA2C,MAK3CC,MAMAC,aAAwB,MAKvBC,SAEDC,aAAgBC,IACtB,GAAIC,KAAKZ,SAAU,CACjBW,EAAEE,iBACF,M,CAGF,MAAMC,EAAWH,EAAEI,OAA4BD,QAC/C,MAAME,EAAQF,EAAUF,KAAKP,YAAcO,KAAKN,cAEhDM,KAAKb,WAAae,EAClBF,KAAKH,SAASQ,KAAKD,EAAM,EAG3B,MAAAE,GACE,MAAMC,EAAYP,KAAKb,aAAea,KAAKP,YAE3C,MAAMe,KAAaR,KAAKX,YAAcW,KAAKV,cAC3C,MAAMK,EAAQK,KAAKL,QAAUa,EAAWR,KAAKJ,aAAe,GAAK,GAAM,IAEvE,OACEa,EAAA,SAAAC,IAAA,2CACEC,MAAO,CACL,YAAa,KACb,qBAAsBJ,EACtB,sBAAuBP,KAAKZ,SAC5B,2BAA4BY,KAAKJ,cAAgBY,GAEnDI,MAAO,CACL,oBAAqB,GAAGjB,MACxB,2BAA4BK,KAAKT,aAAe,0BAChD,6BAA8BS,KAAKR,eAAiB,8CAGtDiB,EAAA,SAAAC,IAAA,2CACEG,KAAK,WACLF,MAAM,sBACNG,KAAK,SAAQ,eACCP,EAAY,OAAS,QACnCL,QAASK,EACTnB,SAAUY,KAAKZ,SACf2B,SAAUf,KAAKF,aAAY,aACfE,KAAKX,YAAcW,KAAKV,cAAgB0B,YAEtDP,EAAA,QAAAC,IAAA,2CAAMC,MAAM,mBACTH,IAAYR,KAAKJ,cAAgBa,EAAA,QAAAC,IAAA,2CAAMC,MAAM,oBAAoBJ,EAAYP,KAAKX,WAAaW,KAAKV,cACpGkB,GAAWR,KAAKJ,cAEfa,EAAA,QAAAC,IAAA,2CAAMC,MAAM,6CACVF,EAAA,QAAAC,IAAA,2CAAMC,MAAM,uDAAuDX,KAAKX,YACxEoB,EAAA,QAAAC,IAAA,2CAAMC,MAAM,yDAAyDX,KAAKV,gB","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{--hb-time-select-font-size:14px;--hb-time-select-height:32px;--hb-time-select-border-color:var(--hb-border-color,#dcdfe6);--hb-time-select-border-color-hover:var(--hb-color-primary);--hb-time-select-bg-color:var(--hb-color-white,#fff);display:inline-block;position:relative}.hb-time-select{display:inline-block;position:relative;width:200px}.hb-time-select__input-wrapper{cursor:pointer;display:inline-block;position:relative;width:100%}.hb-time-select__input{background-color:var(--hb-time-select-bg-color);border:1px solid var(--hb-time-select-border-color);border-radius:4px;box-sizing:border-box;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:inline-block;font-size:var(--hb-time-select-font-size);height:var(--hb-time-select-height);line-height:var(--hb-time-select-height);outline:none;padding:0 30px 0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}.hb-time-select__input:hover:not(:disabled){border-color:var(--hb-time-select-border-color-hover)}.hb-time-select__suffix{align-items:center;display:flex;position:absolute;right:8px;top:50%;transform:translateY(-50%)}.hb-time-select__clear{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:16px;margin-right:8px}.hb-time-select__arrow{font-size:12px;transition:transform .3s}.hb-time-select--open .hb-time-select__arrow{transform:rotate(180deg)}.hb-time-select__dropdown{background-color:var(--hb-time-select-bg-color);border:1px solid var(--hb-time-select-border-color);border-radius:4px;box-shadow:0 2px 12px #0000001a;left:0;margin-top:4px;max-height:300px;min-width:100%;overflow-y:auto;position:absolute;top:100%;z-index:1000}.hb-time-select__menu{list-style:none;margin:0;padding:6px 0}.hb-time-select__menu-item{color:var(--hb-color-text-regular,#606266);cursor:pointer;font-size:var(--hb-time-select-font-size);padding:8px 20px;transition:background-color .2s}.hb-time-select__menu-item:hover{background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-time-select__menu-item--selected{background-color:var(--hb-color-primary-light-9,#ecf5ff);color:var(--hb-color-primary);font-weight:600}.hb-time-select--small{width:180px}.hb-time-select--small .hb-time-select__input{font-size:12px;height:24px;line-height:24px}.hb-time-select--large{width:220px}.hb-time-select--large .hb-time-select__input{font-size:16px;height:40px;line-height:40px}.hb-time-select--disabled{cursor:not-allowed}.hb-time-select--disabled .hb-time-select__input{background-color:var(--hb-fill-color-light,#f5f7fa);border-color:var(--hb-time-select-border-color);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 n=r;const a=class{constructor(i){e(this,i);this.hbChange=t(this,"hbChange",7)}get el(){return i(this)}modelValue;placeholder="请选择时间";disabled=false;size="default";clearable=false;start="09:00";end="18:00";step=60;minTime;maxTime;isOpen=false;inputValue="";hbChange;componentDidLoad(){this.updateInputValue();document.addEventListener("click",this.handleDocumentClick)}disconnectedCallback(){document.removeEventListener("click",this.handleDocumentClick)}handleDocumentClick=e=>{if(!this.isOpen)return;const t=e.target;if(!this.el.contains(t)){this.isOpen=false}};handleValueChange(){this.updateInputValue()}updateInputValue(){this.inputValue=this.modelValue||""}generateTimeOptions(){const e=[];const[t,i]=this.start.split(":").map(Number);const[o,r]=this.end.split(":").map(Number);const n=t*60+i;const a=o*60+r;for(let t=n;t<=a;t+=this.step){const i=Math.floor(t/60);const o=t%60;const r=`${String(i).padStart(2,"0")}:${String(o).padStart(2,"0")}`;if(this.minTime&&r<this.minTime)continue;if(this.maxTime&&r>this.maxTime)continue;e.push(r)}return e}handleInputClick=()=>{if(this.disabled)return;this.isOpen=!this.isOpen};handleClear=e=>{e.stopPropagation();this.modelValue=undefined;this.inputValue="";this.isOpen=false;this.hbChange.emit(undefined)};handleSelect=e=>{this.modelValue=e;this.inputValue=e;this.isOpen=false;this.hbChange.emit(e)};render(){const e=this.generateTimeOptions();const t=this.clearable&&this.modelValue;return o("div",{key:"80b6173862d1e0951ef347de5193caedcac932fe",class:{"hb-time-select":true,"hb-time-select--open":this.isOpen,"hb-time-select--disabled":this.disabled,[`hb-time-select--${this.size}`]:true}},o("div",{key:"1641232ea00cc0867c5b6bc654d803af01883607",class:"hb-time-select__input-wrapper",onClick:this.handleInputClick},o("input",{key:"b896fb8c57ad48d448b15b92eeee853c70d168d4",type:"text",class:"hb-time-select__input",placeholder:this.placeholder,value:this.inputValue,disabled:this.disabled,readonly:true}),o("span",{key:"5056a36aaa17a2d5c2b47db106f6c7ddff0607d0",class:"hb-time-select__suffix"},t&&o("span",{key:"12b24a90b988d6f351547b351b35c03bc277c611",class:"hb-time-select__clear",onClick:this.handleClear},"×"),o("span",{key:"2a3f3187510fb01428d429237ec2a8213f3cab2b",class:"hb-time-select__arrow"},"▼"))),this.isOpen&&o("div",{key:"3f8d01ce99076e93b672642fa0c40eed4df0bf12",class:"hb-time-select__dropdown"},o("ul",{key:"50c21be3d365710617ce81f8411873ee3cecbc4b",class:"hb-time-select__menu"},e.map((e=>o("li",{class:{"hb-time-select__menu-item":true,"hb-time-select__menu-item--selected":e===this.modelValue},onClick:()=>this.handleSelect(e)},e))))))}static get watchers(){return{modelValue:["handleValueChange"]}}};a.style=n;export{a as hb_time_select};
2
- //# sourceMappingURL=p-60532a1f.entry.js.map
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{--hb-time-select-font-size:14px;--hb-time-select-height:32px;--hb-time-select-border-color:var(--hb-border-color,#dcdfe6);--hb-time-select-border-color-hover:var(--hb-color-primary);--hb-time-select-bg-color:var(--hb-color-white,#fff);display:inline-block;position:relative}.hb-time-select{display:inline-block;position:relative;width:200px}.hb-time-select__input-wrapper{cursor:pointer;display:inline-block;position:relative;width:100%}.hb-time-select__input{background-color:var(--hb-time-select-bg-color);border:1px solid var(--hb-time-select-border-color);border-radius:4px;box-sizing:border-box;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:inline-block;font-size:var(--hb-time-select-font-size);height:var(--hb-time-select-height);line-height:var(--hb-time-select-height);outline:none;padding:0 30px 0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}.hb-time-select__input:hover:not(:disabled){border-color:var(--hb-time-select-border-color-hover)}.hb-time-select__suffix{align-items:center;display:flex;position:absolute;right:8px;top:50%;transform:translateY(-50%)}.hb-time-select__clear{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:16px;margin-right:8px}.hb-time-select__arrow{font-size:12px;transition:transform .3s}.hb-time-select--open .hb-time-select__arrow{transform:rotate(180deg)}.hb-time-select__dropdown{background-color:var(--hb-time-select-bg-color);border:1px solid var(--hb-time-select-border-color);border-radius:4px;box-shadow:0 2px 12px #0000001a;left:0;margin-top:4px;max-height:300px;min-width:100%;overflow-y:auto;position:absolute;top:100%;z-index:1000}.hb-time-select__menu{list-style:none;margin:0;padding:6px 0}.hb-time-select__menu-item{color:var(--hb-color-text-regular,#606266);cursor:pointer;font-size:var(--hb-time-select-font-size);padding:8px 20px;transition:background-color .2s}.hb-time-select__menu-item:hover{background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-time-select__menu-item--selected{background-color:var(--hb-color-primary-light-9,#ecf5ff);color:var(--hb-color-primary);font-weight:600}.hb-time-select--small{width:180px}.hb-time-select--small .hb-time-select__input{font-size:12px;height:24px;line-height:24px}.hb-time-select--large{width:220px}.hb-time-select--large .hb-time-select__input{font-size:16px;height:40px;line-height:40px}.hb-time-select--disabled{cursor:not-allowed}.hb-time-select--disabled .hb-time-select__input{background-color:var(--hb-fill-color-light,#f5f7fa);border-color:var(--hb-time-select-border-color);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 a=r;const n=class{constructor(i){e(this,i);this.hbChange=t(this,"hbChange",7)}get el(){return i(this)}modelValue;placeholder="请选择时间";disabled=false;size="default";clearable=false;start="09:00";end="18:00";step=60;minTime;maxTime;isOpen=false;inputValue="";hbChange;componentDidLoad(){this.updateInputValue();document.addEventListener("click",this.handleDocumentClick)}disconnectedCallback(){document.removeEventListener("click",this.handleDocumentClick)}handleDocumentClick=e=>{if(!this.isOpen)return;const t=e.target;if(!this.el.contains(t)){this.isOpen=false}};handleValueChange(){this.updateInputValue()}updateInputValue(){this.inputValue=this.modelValue||""}generateTimeOptions(){const e=[];const t=this.start.split(":");const i=this.end.split(":");if(t.length<2||i.length<2)return e;const o=Number(t[0]);const r=Number(t[1]);const a=Number(i[0]);const n=Number(i[1]);if([o,r,a,n].some(Number.isNaN))return e;const s=o*60+r;const l=a*60+n;for(let t=s;t<=l;t+=this.step){const i=Math.floor(t/60);const o=t%60;const r=`${String(i).padStart(2,"0")}:${String(o).padStart(2,"0")}`;if(this.minTime&&r<this.minTime)continue;if(this.maxTime&&r>this.maxTime)continue;e.push(r)}return e}handleInputClick=()=>{if(this.disabled)return;this.isOpen=!this.isOpen};handleClear=e=>{e.stopPropagation();this.modelValue=undefined;this.inputValue="";this.isOpen=false;this.hbChange.emit(undefined)};handleSelect=e=>{this.modelValue=e;this.inputValue=e;this.isOpen=false;this.hbChange.emit(e)};render(){const e=this.generateTimeOptions();const t=this.clearable&&this.modelValue;return o("div",{key:"925f796c7bcbb7c9aab0ce4d84605ac1165c3847",class:{"hb-time-select":true,"hb-time-select--open":this.isOpen,"hb-time-select--disabled":this.disabled,[`hb-time-select--${this.size}`]:true}},o("div",{key:"04c127edd61105261df535e13214ebab8b263c48",class:"hb-time-select__input-wrapper",onClick:this.handleInputClick},o("input",{key:"ae6b93c66b415cf8dab94406af62e26e45564aa4",type:"text",class:"hb-time-select__input",placeholder:this.placeholder,value:this.inputValue,disabled:this.disabled,readonly:true}),o("span",{key:"7ab6337ba0008b186fdc9d421efaed7063e95a7a",class:"hb-time-select__suffix"},t&&o("span",{key:"d1b322f46ebe8705743d37e159959aa8eb3b5d1c",class:"hb-time-select__clear",onClick:this.handleClear},"×"),o("span",{key:"7fb0894ba59f6366af81a90689c6530b78fa5807",class:"hb-time-select__arrow"},"▼"))),this.isOpen&&o("div",{key:"ccfa2ea217df443a4f8177f6a65d351f12ad33bc",class:"hb-time-select__dropdown"},o("ul",{key:"a5f75285a9c42c782479e0c825208411efbf6048",class:"hb-time-select__menu"},e.map((e=>o("li",{class:{"hb-time-select__menu-item":true,"hb-time-select__menu-item--selected":e===this.modelValue},onClick:()=>this.handleSelect(e)},e))))))}static get watchers(){return{modelValue:["handleValueChange"]}}};n.style=a;export{n as hb_time_select};
2
+ //# sourceMappingURL=p-e7c73624.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["timeSelectCss","HbTimeSelectStyle0","TimeSelect","modelValue","placeholder","disabled","size","clearable","start","end","step","minTime","maxTime","isOpen","inputValue","hbChange","componentDidLoad","this","updateInputValue","document","addEventListener","handleDocumentClick","disconnectedCallback","removeEventListener","e","target","el","contains","handleValueChange","generateTimeOptions","options","startParts","split","endParts","length","startHour","Number","startMinute","endHour","endMinute","some","isNaN","startMinutes","endMinutes","minutes","hour","Math","floor","minute","timeStr","String","padStart","push","handleInputClick","handleClear","stopPropagation","undefined","emit","handleSelect","time","render","timeOptions","showClear","h","key","class","onClick","type","value","readonly","map"],"sources":["src/components/TimeSelect/time-select.css?tag=hb-time-select&encapsulation=shadow","src/components/TimeSelect/TimeSelect.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n --hb-time-select-font-size: 14px;\n --hb-time-select-height: 32px;\n --hb-time-select-border-color: var(--hb-border-color, #dcdfe6);\n --hb-time-select-border-color-hover: var(--hb-color-primary);\n --hb-time-select-bg-color: var(--hb-color-white, #ffffff);\n}\n\n.hb-time-select {\n display: inline-block;\n position: relative;\n width: 200px;\n}\n\n.hb-time-select__input-wrapper {\n position: relative;\n display: inline-block;\n width: 100%;\n cursor: pointer;\n}\n\n.hb-time-select__input {\n display: inline-block;\n width: 100%;\n height: var(--hb-time-select-height);\n line-height: var(--hb-time-select-height);\n padding: 0 30px 0 15px;\n font-size: var(--hb-time-select-font-size);\n color: var(--hb-color-text-regular, #606266);\n background-color: var(--hb-time-select-bg-color);\n border: 1px solid var(--hb-time-select-border-color);\n border-radius: 4px;\n box-sizing: border-box;\n cursor: pointer;\n outline: none;\n transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n}\n\n.hb-time-select__input:hover:not(:disabled) {\n border-color: var(--hb-time-select-border-color-hover);\n}\n\n.hb-time-select__suffix {\n position: absolute;\n right: 8px;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n}\n\n.hb-time-select__clear {\n margin-right: 8px;\n cursor: pointer;\n font-size: 16px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n}\n\n.hb-time-select__arrow {\n font-size: 12px;\n transition: transform 0.3s;\n}\n\n.hb-time-select--open .hb-time-select__arrow {\n transform: rotate(180deg);\n}\n\n.hb-time-select__dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n margin-top: 4px;\n background-color: var(--hb-time-select-bg-color);\n border: 1px solid var(--hb-time-select-border-color);\n border-radius: 4px;\n box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);\n z-index: 1000;\n min-width: 100%;\n max-height: 300px;\n overflow-y: auto;\n}\n\n.hb-time-select__menu {\n margin: 0;\n padding: 6px 0;\n list-style: none;\n}\n\n.hb-time-select__menu-item {\n padding: 8px 20px;\n font-size: var(--hb-time-select-font-size);\n color: var(--hb-color-text-regular, #606266);\n cursor: pointer;\n transition: background-color 0.2s;\n}\n\n.hb-time-select__menu-item:hover {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n}\n\n.hb-time-select__menu-item--selected {\n color: var(--hb-color-primary);\n font-weight: 600;\n background-color: var(--hb-color-primary-light-9, #ecf5ff);\n}\n\n.hb-time-select--small {\n width: 180px;\n}\n\n.hb-time-select--small .hb-time-select__input {\n height: 24px;\n line-height: 24px;\n font-size: 12px;\n}\n\n.hb-time-select--large {\n width: 220px;\n}\n\n.hb-time-select--large .hb-time-select__input {\n height: 40px;\n line-height: 40px;\n font-size: 16px;\n}\n\n.hb-time-select--disabled {\n cursor: not-allowed;\n}\n\n.hb-time-select--disabled .hb-time-select__input {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n border-color: var(--hb-time-select-border-color);\n color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n\n","import { Component, h, Prop, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\n\n/**\n * TimeSelect 时间选择组件\n * 可用于时间选择\n */\n@Component({\n tag: 'hb-time-select',\n styleUrl: 'time-select.css',\n shadow: true,\n})\nexport class TimeSelect {\n @Element() el: HTMLElement;\n\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue?: string;\n\n /**\n * 输入框占位文本\n */\n @Prop() placeholder: string = '请选择时间';\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 输入框尺寸\n */\n @Prop() size: 'large' | 'default' | 'small' = 'default';\n\n /**\n * 是否可清空\n * @default false\n */\n @Prop() clearable: boolean = false;\n\n /**\n * 开始时间\n * @default '09:00'\n */\n @Prop() start: string = '09:00';\n\n /**\n * 结束时间\n * @default '18:00'\n */\n @Prop() end: string = '18:00';\n\n /**\n * 间隔时间\n * @default 60\n */\n @Prop() step: number = 60;\n\n /**\n * 最小时间\n */\n @Prop() minTime?: string;\n\n /**\n * 最大时间\n */\n @Prop() maxTime?: string;\n\n @State() isOpen: boolean = false;\n @State() inputValue: string = '';\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<string>;\n\n componentDidLoad() {\n this.updateInputValue();\n document.addEventListener('click', this.handleDocumentClick);\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleDocumentClick);\n }\n\n private handleDocumentClick = (e: MouseEvent) => {\n if (!this.isOpen) return;\n const target = e.target as HTMLElement;\n if (!this.el.contains(target)) {\n this.isOpen = false;\n }\n };\n\n @Watch('modelValue')\n handleValueChange() {\n this.updateInputValue();\n }\n\n private updateInputValue() {\n this.inputValue = this.modelValue || '';\n }\n\n private generateTimeOptions(): string[] {\n const options: string[] = [];\n // O2:校验 split 长度,避免传 \"9\" 或 \"\" 时得 NaN → 空下拉无报错。\n const startParts = this.start.split(':');\n const endParts = this.end.split(':');\n if (startParts.length < 2 || endParts.length < 2) return options;\n const startHour = Number(startParts[0]);\n const startMinute = Number(startParts[1]);\n const endHour = Number(endParts[0]);\n const endMinute = Number(endParts[1]);\n if ([startHour, startMinute, endHour, endMinute].some(Number.isNaN)) return options;\n\n const startMinutes = startHour * 60 + startMinute;\n const endMinutes = endHour * 60 + endMinute;\n\n for (let minutes = startMinutes; minutes <= endMinutes; minutes += this.step) {\n const hour = Math.floor(minutes / 60);\n const minute = minutes % 60;\n const timeStr = `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;\n\n if (this.minTime && timeStr < this.minTime) continue;\n if (this.maxTime && timeStr > this.maxTime) continue;\n\n options.push(timeStr);\n }\n\n return options;\n }\n\n private handleInputClick = () => {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n };\n\n private handleClear = (e: Event) => {\n e.stopPropagation();\n this.modelValue = undefined;\n this.inputValue = '';\n this.isOpen = false;\n this.hbChange.emit(undefined);\n };\n\n private handleSelect = (time: string) => {\n this.modelValue = time;\n this.inputValue = time;\n this.isOpen = false;\n this.hbChange.emit(time);\n };\n\n render() {\n const timeOptions = this.generateTimeOptions();\n const showClear = this.clearable && this.modelValue;\n\n return (\n <div\n class={{\n 'hb-time-select': true,\n 'hb-time-select--open': this.isOpen,\n 'hb-time-select--disabled': this.disabled,\n [`hb-time-select--${this.size}`]: true,\n }}\n >\n <div class=\"hb-time-select__input-wrapper\" onClick={this.handleInputClick}>\n <input type=\"text\" class=\"hb-time-select__input\" placeholder={this.placeholder} value={this.inputValue} disabled={this.disabled} readonly />\n <span class=\"hb-time-select__suffix\">\n {showClear && (\n <span class=\"hb-time-select__clear\" onClick={this.handleClear}>\n ×\n </span>\n )}\n <span class=\"hb-time-select__arrow\">▼</span>\n </span>\n </div>\n {this.isOpen && (\n <div class=\"hb-time-select__dropdown\">\n <ul class=\"hb-time-select__menu\">\n {timeOptions.map(time => (\n <li\n class={{\n 'hb-time-select__menu-item': true,\n 'hb-time-select__menu-item--selected': time === this.modelValue,\n }}\n onClick={() => this.handleSelect(time)}\n >\n {time}\n </li>\n ))}\n </ul>\n </div>\n )}\n </div>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,g as t,h as i}from"./p-e42dfa95.js";const o='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.inline{display:inline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-form{display:flex;flex-direction:column;gap:var(--hb-spacing-md)}.hb-form--inline{align-items:flex-start;flex-flow:wrap;gap:var(--hb-spacing-sm)var(--hb-spacing-lg)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}';const a=o;const n=class{constructor(t){e(this,t)}get el(){return t(this)}model={};rules={};labelPosition="right";labelWidth="80px";inline=false;size="default";disabled=false;fields=[];fieldRegistry=new Map;componentWillLoad(){this.el.addEventListener("hbFormFieldRegister",(e=>{const{prop:t,validate:i,resetValue:o,getValue:a}=e.detail;this.fieldRegistry.set(t,{prop:t,validate:i,resetValue:o,getValue:a})}))}validate=async()=>{const e=await Promise.all(Array.from(this.fieldRegistry.values()).map((async e=>{const t=await e.validate();return t.length===0})));return e.every(Boolean)};resetFields=()=>{this.fieldRegistry.forEach((e=>e.resetValue()))};render(){return i("form",{key:"c76a79544096dc06761b506ccc8afdef06fcf68b",class:{"hb-form":true,[`hb-form--label-${this.labelPosition}`]:true,"hb-form--inline":this.inline},onSubmit:e=>e.preventDefault(),novalidate:true},i("slot",{key:"be1f2a559248080153cf56607d91fbad2dd44963"}))}};n.style=a;export{n as hb_form};
2
- //# sourceMappingURL=p-86bdc48a.entry.js.map
1
+ import{r as e,g as t,h as i}from"./p-e42dfa95.js";const o='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.inline{display:inline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-form{display:flex;flex-direction:column;gap:var(--hb-spacing-md)}.hb-form--inline{align-items:flex-start;flex-flow:wrap;gap:var(--hb-spacing-sm)var(--hb-spacing-lg)}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}';const n=o;const a=class{constructor(t){e(this,t)}get el(){return t(this)}model={};rules={};labelPosition="right";labelWidth="80px";inline=false;size="default";disabled=false;initialValues;validateMessages;onFinish;onFinishFailed;onValuesChange;fields=[];fieldRegistry=new Map;handleFieldRegister=e=>{const{prop:t,validate:i,resetValue:o,getValue:n}=e.detail;this.fieldRegistry.set(t,{prop:t,validate:i,resetValue:o,getValue:n})};handleFieldChange=e=>{if(!this.onValuesChange)return;const t=e.target;const i=t.closest?.("hb-form-item");if(!i)return;const o=i.prop;if(!o)return;const n=this.fieldRegistry.get(o);const a=n?n.getValue():undefined;this.onValuesChange({prop:o,value:a,values:this.getFieldsValue()})};componentWillLoad(){this.el.addEventListener("hbFormFieldRegister",this.handleFieldRegister);this.el.addEventListener("hbChange",this.handleFieldChange)}componentDidLoad(){if(this.initialValues){this.fieldRegistry.forEach(((e,t)=>{if(this.initialValues&&t in this.initialValues){this.setFieldValue(t,this.initialValues[t])}}))}}disconnectedCallback(){this.el.removeEventListener("hbFormFieldRegister",this.handleFieldRegister);this.el.removeEventListener("hbChange",this.handleFieldChange)}getFieldsValue(){const e={};this.fieldRegistry.forEach(((t,i)=>{e[i]=t.getValue()}));return e}setFieldValue(e,t){const i=this.el.querySelector(`hb-form-item[prop="${e}"]`);if(!i)return;const o=i.querySelector("hb-input, hb-select, hb-cascader, hb-date-picker, hb-date-time-picker, hb-date-range-picker, "+"hb-input-number, hb-textarea, hb-checkbox, hb-checkbox-group, hb-radio-group, hb-switch, "+"hb-slider, hb-color-picker, hb-rate, hb-time-picker, hb-time-select");if(o){o.modelValue=t}}validate=async()=>{const e=await Promise.all(Array.from(this.fieldRegistry.values()).map((async e=>{const t=await e.validate();return t.length===0})));return e.every(Boolean)};handleSubmit=async e=>{e.preventDefault();const t=[];let i=true;for(const e of this.fieldRegistry.values()){const o=await e.validate();if(o.length>0){i=false;t.push({prop:e.prop,errors:o})}}if(i){this.onFinish?.(this.getFieldsValue())}else{this.onFinishFailed?.(t)}};resetFields=()=>{this.fieldRegistry.forEach((e=>e.resetValue()))};render(){return i("form",{key:"876ec07f044efed1a9aa92dbb76642b95013e9a5",class:{"hb-form":true,[`hb-form--label-${this.labelPosition}`]:true,"hb-form--inline":this.inline},onSubmit:this.handleSubmit,novalidate:true},i("slot",{key:"16efaff38a6f97ff1f339eef37f55b7e4aff0f4c"}))}};a.style=n;export{a as hb_form};
2
+ //# sourceMappingURL=p-e8824b2c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["formCss","HbFormStyle0","Form","model","rules","labelPosition","labelWidth","inline","size","disabled","initialValues","validateMessages","onFinish","onFinishFailed","onValuesChange","fields","fieldRegistry","Map","handleFieldRegister","e","prop","validate","resetValue","getValue","detail","this","set","handleFieldChange","target","item","closest","reg","get","value","undefined","values","getFieldsValue","componentWillLoad","el","addEventListener","componentDidLoad","forEach","_reg","setFieldValue","disconnectedCallback","removeEventListener","formItem","querySelector","control","modelValue","async","results","Promise","all","Array","from","map","field","errors","length","every","Boolean","handleSubmit","preventDefault","errorList","allOk","push","resetFields","render","h","key","class","onSubmit","novalidate"],"sources":["src/components/Form/form.css?tag=hb-form&encapsulation=shadow","src/components/Form/Form.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-form {\n display: flex;\n flex-direction: column;\n gap: var(--hb-spacing-md);\n}\n\n.hb-form--inline {\n flex-direction: row;\n flex-wrap: wrap;\n gap: var(--hb-spacing-sm) var(--hb-spacing-lg);\n align-items: flex-start;\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\n\ninterface FormFieldRegistration {\n prop: string;\n validate: () => Promise<string[]>;\n resetValue: () => void;\n getValue: () => any;\n}\n\n/**\n * Form 表单组件\n * 由输入框、选择器、单选框、多选框等控件组成,配合表单校验\n */\n@Component({\n tag: 'hb-form',\n styleUrl: 'form.css',\n shadow: true,\n})\nexport class Form {\n @Element() el: HTMLElement;\n\n /** 表单数据对象 */\n @Prop() model: Record<string, any> = {};\n\n /** 表单验证规则 */\n @Prop() rules: Record<string, any[]> = {};\n\n /** 标签位置 */\n @Prop() labelPosition: 'left' | 'right' | 'top' = 'right';\n\n /** 标签宽度 */\n @Prop() labelWidth: string = '80px';\n\n /** 是否行内表单 */\n @Prop() inline: boolean = false;\n\n /** 表单尺寸 */\n @Prop() size: 'large' | 'default' | 'small' = 'default';\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n /**\n * F1:初始值(非受控)。挂载后把这些值写到对应字段的子控件 modelValue。\n * key = FormItem 的 prop。\n */\n @Prop() initialValues?: Record<string, any>;\n\n /**\n * F4:校验提示模板。覆盖默认的「{label}不能为空」「{label}格式不正确」等文案。\n * 支持 {label} 占位符。仅对未在 rule.message 显式指定消息的规则生效。\n */\n @Prop() validateMessages?: { required?: string; pattern?: string; email?: string; min?: string; max?: string };\n\n /**\n * F2:提交且校验通过后的回调。参数为各字段当前值组成的对象。\n * 由表单 submit(form onSubmit)触发——表单内放 type=\"submit\" 的按钮即可。\n */\n @Prop() onFinish?: (values: Record<string, any>) => void;\n\n /**\n * F2:提交且校验失败后的回调。\n */\n @Prop() onFinishFailed?: (errors: { prop: string; errors: string[] }[]) => void;\n\n /**\n * F3:任意字段值变化时的回调。参数为 { prop, value, values }。\n * 由子控件冒泡的 hbChange 触发。\n */\n @Prop() onValuesChange?: (info: { prop: string; value: any; values: Record<string, any> }) => void;\n\n @State() fields: FormFieldRegistration[] = [];\n\n private fieldRegistry = new Map<string, FormFieldRegistration>();\n\n // 用 componentWillLoad 而非 componentDidLoad 注册监听器:\n // Stencil 生命周期里子组件(FormItem)的 componentDidLoad 先于父组件(Form)触发,\n // 若在 componentDidLoad 才挂监听,会错过子项派发的 hbFormFieldRegister,\n // 导致 fieldRegistry 为空、validate() 永远返回 true(真实浏览器里复现,mock-doc 被 waitForChanges 掩盖)。\n // L1:抽命名 handler 以便 disconnectedCallback 正确 remove(修复前匿名箭头无法 remove)。\n private handleFieldRegister = ((e: CustomEvent) => {\n const { prop, validate, resetValue, getValue } = e.detail;\n this.fieldRegistry.set(prop, { prop, validate, resetValue, getValue });\n }) as EventListener;\n\n /**\n * F3:监听子控件冒泡的 hbChange,识别来源 FormItem 并触发 onValuesChange。\n * 注:hbChange 由 hb-input/hb-select 等控件发出(composed 冒泡穿过 shadow),\n * 这里在 host 上捕获,通过 closest('hb-form-item') 定位字段 prop。\n */\n private handleFieldChange = ((e: Event) => {\n if (!this.onValuesChange) return;\n const target = e.target as HTMLElement;\n const item = target.closest?.('hb-form-item') as any;\n if (!item) return;\n const prop = item.prop;\n if (!prop) return;\n // 取该字段最新值\n const reg = this.fieldRegistry.get(prop);\n const value = reg ? reg.getValue() : undefined;\n this.onValuesChange({ prop, value, values: this.getFieldsValue() });\n }) as EventListener;\n\n componentWillLoad() {\n this.el.addEventListener('hbFormFieldRegister', this.handleFieldRegister);\n // F3:捕获子控件值变化\n this.el.addEventListener('hbChange', this.handleFieldChange);\n }\n\n componentDidLoad() {\n // F1:把 initialValues 写到对应字段的子控件\n if (this.initialValues) {\n this.fieldRegistry.forEach((_reg, prop) => {\n if (this.initialValues && prop in this.initialValues) {\n this.setFieldValue(prop, this.initialValues[prop]);\n }\n });\n }\n }\n\n disconnectedCallback() {\n this.el.removeEventListener('hbFormFieldRegister', this.handleFieldRegister);\n this.el.removeEventListener('hbChange', this.handleFieldChange);\n }\n\n /**\n * 收集所有字段的当前值(getFieldsValue)。\n */\n private getFieldsValue(): Record<string, any> {\n const values: Record<string, any> = {};\n this.fieldRegistry.forEach((reg, prop) => {\n values[prop] = reg.getValue();\n });\n return values;\n }\n\n /**\n * 设置某字段子控件的值(setFieldValue)。\n * 子控件统一用 modelValue 受控。\n */\n private setFieldValue(prop: string, value: any) {\n const formItem = this.el.querySelector(`hb-form-item[prop=\"${prop}\"]`) as HTMLElement | null;\n if (!formItem) return;\n const control = formItem.querySelector(\n 'hb-input, hb-select, hb-cascader, hb-date-picker, hb-date-time-picker, hb-date-range-picker, ' +\n 'hb-input-number, hb-textarea, hb-checkbox, hb-checkbox-group, hb-radio-group, hb-switch, ' +\n 'hb-slider, hb-color-picker, hb-rate, hb-time-picker, hb-time-select',\n ) as any;\n if (control) {\n control.modelValue = value;\n }\n }\n\n /**\n * 验证整个表单\n * @returns 是否验证通过\n */\n @Prop() validate = async (): Promise<boolean> => {\n const results = await Promise.all(\n Array.from(this.fieldRegistry.values()).map(async field => {\n const errors = await field.validate();\n return errors.length === 0;\n }),\n );\n return results.every(Boolean);\n };\n\n /**\n * F2:提交表单——校验全部字段,通过则 onFinish(values),失败则 onFinishFailed(errors)。\n */\n private handleSubmit = async (e: Event) => {\n e.preventDefault();\n const errorList: { prop: string; errors: string[] }[] = [];\n let allOk = true;\n for (const field of this.fieldRegistry.values()) {\n const errors = await field.validate();\n if (errors.length > 0) {\n allOk = false;\n errorList.push({ prop: field.prop, errors });\n }\n }\n if (allOk) {\n this.onFinish?.(this.getFieldsValue());\n } else {\n this.onFinishFailed?.(errorList);\n }\n };\n\n /**\n * 重置表单\n */\n @Prop() resetFields = (): void => {\n this.fieldRegistry.forEach(field => field.resetValue());\n };\n\n render() {\n return (\n <form\n class={{\n 'hb-form': true,\n [`hb-form--label-${this.labelPosition}`]: true,\n 'hb-form--inline': this.inline,\n }}\n onSubmit={this.handleSubmit}\n novalidate\n >\n <slot />\n </form>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAU,8wLAChB,MAAAC,EAAeD,E,MCiBFE,EAAI,M,iDAIPC,MAA6B,GAG7BC,MAA+B,GAG/BC,cAA0C,QAG1CC,WAAqB,OAGrBC,OAAkB,MAGlBC,KAAsC,UAGtCC,SAAoB,MAMpBC,cAMAC,iBAMAC,SAKAC,eAMAC,eAECC,OAAkC,GAEnCC,cAAgB,IAAIC,IAOpBC,oBAAwBC,IAC9B,MAAMC,KAAEA,EAAIC,SAAEA,EAAQC,WAAEA,EAAUC,SAAEA,GAAaJ,EAAEK,OACnDC,KAAKT,cAAcU,IAAIN,EAAM,CAAEA,OAAMC,WAAUC,aAAYC,YAC5D,EAOOI,kBAAsBR,IAC5B,IAAKM,KAAKX,eAAgB,OAC1B,MAAMc,EAAST,EAAES,OACjB,MAAMC,EAAOD,EAAOE,UAAU,gBAC9B,IAAKD,EAAM,OACX,MAAMT,EAAOS,EAAKT,KAClB,IAAKA,EAAM,OAEX,MAAMW,EAAMN,KAAKT,cAAcgB,IAAIZ,GACnC,MAAMa,EAAQF,EAAMA,EAAIR,WAAaW,UACrCT,KAAKX,eAAe,CAAEM,OAAMa,QAAOE,OAAQV,KAAKW,kBACjD,EAED,iBAAAC,GACEZ,KAAKa,GAAGC,iBAAiB,sBAAuBd,KAAKP,qBAErDO,KAAKa,GAAGC,iBAAiB,WAAYd,KAAKE,kB,CAG5C,gBAAAa,GAEE,GAAIf,KAAKf,cAAe,CACtBe,KAAKT,cAAcyB,SAAQ,CAACC,EAAMtB,KAChC,GAAIK,KAAKf,eAAiBU,KAAQK,KAAKf,cAAe,CACpDe,KAAKkB,cAAcvB,EAAMK,KAAKf,cAAcU,G,MAMpD,oBAAAwB,GACEnB,KAAKa,GAAGO,oBAAoB,sBAAuBpB,KAAKP,qBACxDO,KAAKa,GAAGO,oBAAoB,WAAYpB,KAAKE,kB,CAMvC,cAAAS,GACN,MAAMD,EAA8B,GACpCV,KAAKT,cAAcyB,SAAQ,CAACV,EAAKX,KAC/Be,EAAOf,GAAQW,EAAIR,UAAU,IAE/B,OAAOY,C,CAOD,aAAAQ,CAAcvB,EAAca,GAClC,MAAMa,EAAWrB,KAAKa,GAAGS,cAAc,sBAAsB3B,OAC7D,IAAK0B,EAAU,OACf,MAAME,EAAUF,EAASC,cACvB,gGACE,4FACA,uEAEJ,GAAIC,EAAS,CACXA,EAAQC,WAAahB,C,EAQjBZ,SAAW6B,UACjB,MAAMC,QAAgBC,QAAQC,IAC5BC,MAAMC,KAAK9B,KAAKT,cAAcmB,UAAUqB,KAAIN,MAAMO,IAChD,MAAMC,QAAeD,EAAMpC,WAC3B,OAAOqC,EAAOC,SAAW,CAAC,KAG9B,OAAOR,EAAQS,MAAMC,QAAQ,EAMvBC,aAAeZ,MAAO/B,IAC5BA,EAAE4C,iBACF,MAAMC,EAAkD,GACxD,IAAIC,EAAQ,KACZ,IAAK,MAAMR,KAAShC,KAAKT,cAAcmB,SAAU,CAC/C,MAAMuB,QAAeD,EAAMpC,WAC3B,GAAIqC,EAAOC,OAAS,EAAG,CACrBM,EAAQ,MACRD,EAAUE,KAAK,CAAE9C,KAAMqC,EAAMrC,KAAMsC,U,EAGvC,GAAIO,EAAO,CACTxC,KAAKb,WAAWa,KAAKW,iB,KAChB,CACLX,KAAKZ,iBAAiBmD,E,GAOlBG,YAAc,KACpB1C,KAAKT,cAAcyB,SAAQgB,GAASA,EAAMnC,cAAa,EAGzD,MAAA8C,GACE,OACEC,EAAA,QAAAC,IAAA,2CACEC,MAAO,CACL,UAAW,KACX,CAAC,kBAAkB9C,KAAKpB,iBAAkB,KAC1C,kBAAmBoB,KAAKlB,QAE1BiE,SAAU/C,KAAKqC,aACfW,WAAU,MAEVJ,EAAA,QAAAC,IAAA,6C","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,h as e}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-statistic{display:inline-flex;flex-direction:column;line-height:var(--hb-line-height)}.hb-statistic__title{color:var(--hb-color-text-secondary);font-size:var(--hb-font-size-base);margin-bottom:var(--hb-spacing-xs)}.hb-statistic__content{align-items:baseline;color:var(--hb-color-text-primary);display:flex}.hb-statistic__value{font-size:var(--hb-font-size-2xl);font-weight:500;line-height:1}.hb-statistic__prefix{font-size:var(--hb-font-size-lg);margin-right:var(--hb-spacing-xxs)}.hb-statistic__suffix{font-size:var(--hb-font-size-lg);margin-left:var(--hb-spacing-xxs)}@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(e){t(this,e)}title="";value=0;precision;valuePrefix="";suffix;valueStyle;getFormattedValue(){let t;if(typeof this.value==="number"){t=this.value}else{const e=this.value.trim();if(/^-?\d+(\.\d+)?$/.test(e)){t=Number(e)}else{return this.value}}let e;if(typeof this.precision==="number"&&this.precision>=0){e=t.toFixed(this.precision)}else{e=String(t)}const[i,o]=e.split(".");const a=i.replace(/\B(?=(\d{3})+(?!\d))/g,",");return o!==undefined?`${a}.${o}`:a}render(){return e("div",{key:"e695e8811255eace58725623ad9ac4fc32fe9815",class:"hb-statistic"},this.title&&e("div",{key:"0ca9e8bae28815d841fd04f0ec0aeb6d3147cfb7",class:"hb-statistic__title"},this.title),e("div",{key:"f4b4dce8ceded1700b7bd2f50b97d886452571d9",class:"hb-statistic__content",style:this.valueStyle?{cssText:this.valueStyle}:undefined},this.valuePrefix&&e("span",{key:"7b6f19358ee7ab45b18fab4230cc0cae56161398",class:"hb-statistic__prefix"},this.valuePrefix),e("span",{key:"ba7c49912cd4d0d4a81349d8584801291075966f",class:"hb-statistic__value"},this.getFormattedValue()),this.suffix!==undefined&&e("span",{key:"87619124453f9e49eba5e22ccc6c6123b059c61b",class:"hb-statistic__suffix"},this.suffix)))}};a.style=o;export{a as hb_statistic};
2
- //# sourceMappingURL=p-13010da2.entry.js.map
1
+ import{r as t,h as e}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-statistic{display:inline-flex;flex-direction:column;line-height:var(--hb-line-height)}.hb-statistic__title{color:var(--hb-color-text-secondary);font-size:var(--hb-font-size-base);margin-bottom:var(--hb-spacing-xs)}.hb-statistic__content{align-items:baseline;color:var(--hb-color-text-primary);display:flex}.hb-statistic__value{font-size:var(--hb-font-size-2xl);font-weight:500;line-height:1}.hb-statistic__prefix{font-size:var(--hb-font-size-lg);margin-right:var(--hb-spacing-xxs)}.hb-statistic__suffix{font-size:var(--hb-font-size-lg);margin-left:var(--hb-spacing-xxs)}@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(e){t(this,e)}title="";value=0;precision;valuePrefix="";suffix;valueStyle;getFormattedValue(){let t;if(typeof this.value==="number"){t=this.value}else{const e=this.value.trim();if(/^-?\d+(\.\d+)?$/.test(e)){t=Number(e)}else{return this.value}}let e;if(typeof this.precision==="number"&&this.precision>=0){e=t.toFixed(this.precision)}else{e=String(t)}const[i,o]=e.split(".");const a=i.replace(/\B(?=(\d{3})+(?!\d))/g,",");return o!==undefined?`${a}.${o}`:a}render(){return e("div",{key:"7fd81b3093db861e1af481c05f5ffa3d1a3c5078",class:"hb-statistic"},this.title&&e("div",{key:"06d93b0bd9dcd852a84e02c6dc79e966fe6abfa4",class:"hb-statistic__title"},this.title),e("div",{key:"e11a079483edefb794604ce91d5f5aff67e8a4ec",class:"hb-statistic__content",style:this.valueStyle?{cssText:this.valueStyle}:undefined},this.valuePrefix&&e("span",{key:"69f0bd55b827a76953b1ea99dfa5d41b37c6695d",class:"hb-statistic__prefix"},this.valuePrefix),e("span",{key:"5a22b8533657904f98b63395c6b395525b94d280",class:"hb-statistic__value"},this.getFormattedValue()),this.suffix!==undefined&&e("span",{key:"0475826d2a700bbc43b16e075a3963018a0e1979",class:"hb-statistic__suffix"},this.suffix)))}};a.style=o;export{a as hb_statistic};
2
+ //# sourceMappingURL=p-e9e7abca.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as i}from"./p-e42dfa95.js";const t='/*! 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-image{background:var(--hb-color-fill-quaternary);display:inline-flex;overflow:hidden;position:relative}.hb-image__inner{height:100%;opacity:0;transition:opacity .3s;width:100%}.hb-image__inner--loaded{opacity:1}.hb-image__error{color:var(--hb-color-text-secondary);font-size:var(--hb-font-size-sm);height:100%;width:100%}.hb-image__error,.hb-image__preview{align-items:center;display:flex;justify-content:center}.hb-image__preview{background:#000c;cursor:zoom-out;inset:0;position:fixed;z-index:2000}.hb-image__preview-img{max-height:90%;max-width:90%;object-fit:contain}@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=t;const a=class{constructor(i){e(this,i)}src="";alt="";width;height;fit="fill";lazy=false;preview=false;radius;loaded=false;error=false;previewVisible=false;handleLoad=()=>{this.loaded=true};handleError=()=>{this.error=true};render(){return i("div",{key:"ba3419b5ff3facd429a8f29451be12982c602143",class:"hb-image",style:{width:this.width,height:this.height,borderRadius:this.radius}},!this.error?i("img",{src:this.src,alt:this.alt,class:{"hb-image__inner":true,"hb-image__inner--loaded":this.loaded},style:{objectFit:this.fit},loading:this.lazy?"lazy":undefined,onLoad:this.handleLoad,onError:this.handleError,onClick:()=>this.preview&&(this.previewVisible=true)}):i("div",{class:"hb-image__error"},"图片加载失败"),this.previewVisible&&i("div",{key:"327219e256924391b44f02d39f5d7000161b1fb9",class:"hb-image__preview",onClick:()=>{this.previewVisible=false}},i("img",{key:"3d1cb33434662932aff4c5fd7ffde8477616ff9a",src:this.src,alt:this.alt,class:"hb-image__preview-img"})))}};a.style=o;export{a as hb_image};
2
- //# sourceMappingURL=p-f6889710.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:inline-block}.hb-image{background:var(--hb-color-fill-quaternary);display:inline-flex;overflow:hidden;position:relative}.hb-image__inner{height:100%;opacity:0;transition:opacity .3s;width:100%}.hb-image__inner--loaded{opacity:1}.hb-image__error{color:var(--hb-color-text-secondary);font-size:var(--hb-font-size-sm);height:100%;width:100%}.hb-image__error,.hb-image__preview{align-items:center;display:flex;justify-content:center}.hb-image__preview{background:#000c;cursor:zoom-out;inset:0;position:fixed;z-index:2000}.hb-image__preview-img{max-height:90%;max-width:90%;object-fit:contain}@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)}src="";alt="";width;height;fit="fill";lazy=false;preview=false;radius;loaded=false;error=false;previewVisible=false;handleSrcChange(){this.loaded=false;this.error=false}handleLoad=()=>{this.loaded=true};handleError=()=>{this.error=true};render(){return t("div",{key:"c9bbb745e78918ca3659138a91e7472911ac4c09",class:"hb-image",style:{width:this.width,height:this.height,borderRadius:this.radius}},!this.error?t("img",{src:this.src,alt:this.alt,class:{"hb-image__inner":true,"hb-image__inner--loaded":this.loaded},style:{objectFit:this.fit},loading:this.lazy?"lazy":undefined,onLoad:this.handleLoad,onError:this.handleError,onClick:()=>this.preview&&(this.previewVisible=true)}):t("div",{class:"hb-image__error"},"图片加载失败"),this.previewVisible&&t("div",{key:"7d3b00d09c919169eab62ab6f525b2ef2f038a4c",class:"hb-image__preview",onClick:()=>{this.previewVisible=false}},t("img",{key:"7c05ea33e51493d3a297f0e1c7d3511efae46a6c",src:this.src,alt:this.alt,class:"hb-image__preview-img"})))}static get watchers(){return{src:["handleSrcChange"]}}};a.style=o;export{a as hb_image};
2
+ //# sourceMappingURL=p-ea0823f3.entry.js.map