huibo-ui 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{a11y-802de67a.js → a11y-4385c871.js} +17 -2
- package/dist/cjs/a11y-4385c871.js.map +1 -0
- package/dist/cjs/{date-helpers-1ffddc59.js → date-helpers-c05ef385.js} +5 -16
- package/dist/cjs/date-helpers-c05ef385.js.map +1 -0
- package/dist/cjs/hb-alert.cjs.entry.js +2 -1
- package/dist/cjs/hb-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-calendar.cjs.entry.js +2 -2
- package/dist/cjs/hb-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-cascader.cjs.entry.js +48 -12
- package/dist/cjs/hb-cascader.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-checkbox-group.cjs.entry.js +12 -8
- package/dist/cjs/hb-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-checkbox.cjs.entry.js +9 -4
- package/dist/cjs/hb-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-collapse-item.cjs.entry.js +13 -4
- package/dist/cjs/hb-collapse-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-collapse.cjs.entry.js +20 -15
- package/dist/cjs/hb-collapse.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-color-picker.cjs.entry.js +22 -19
- package/dist/cjs/hb-color-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-date-picker-pane.cjs.entry.js +1 -1
- package/dist/cjs/hb-date-picker.cjs.entry.js +13 -10
- package/dist/cjs/hb-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-date-range-picker.cjs.entry.js +1 -1
- package/dist/cjs/hb-date-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/hb-descriptions.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-dialog.cjs.entry.js +51 -12
- package/dist/cjs/hb-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-drawer.cjs.entry.js +34 -4
- package/dist/cjs/hb-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-dropdown.cjs.entry.js +27 -15
- package/dist/cjs/hb-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-empty.cjs.entry.js +1 -1
- package/dist/cjs/hb-float-button.cjs.entry.js +2 -2
- package/dist/cjs/hb-form-item.cjs.entry.js +11 -10
- package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-form.cjs.entry.js +12 -7
- package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-image-preview.cjs.entry.js +1 -1
- package/dist/cjs/hb-image-preview.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-image.cjs.entry.js +21 -3
- package/dist/cjs/hb-image.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-input-number.cjs.entry.js +7 -7
- package/dist/cjs/hb-input-number.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-input-tag.cjs.entry.js +2 -2
- package/dist/cjs/hb-input.cjs.entry.js +3 -2
- package/dist/cjs/hb-input.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-layout.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-link.cjs.entry.js +2 -2
- package/dist/cjs/hb-loading.cjs.entry.js +2 -2
- package/dist/cjs/hb-menu-item.cjs.entry.js +14 -5
- package/dist/cjs/hb-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-menu.cjs.entry.js +2 -2
- package/dist/cjs/hb-message.cjs.entry.js +13 -4
- package/dist/cjs/hb-message.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-page-header.cjs.entry.js +1 -1
- package/dist/cjs/hb-pagination.cjs.entry.js +8 -5
- package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popconfirm.cjs.entry.js +27 -8
- package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popover.cjs.entry.js +26 -14
- package/dist/cjs/hb-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-progress.cjs.entry.js +1 -1
- package/dist/cjs/hb-radio.cjs.entry.js +8 -3
- package/dist/cjs/hb-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-rate.cjs.entry.js +3 -3
- package/dist/cjs/hb-rate.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-row.cjs.entry.js +2 -2
- package/dist/cjs/hb-scrollbar.cjs.entry.js +5 -5
- package/dist/cjs/hb-scrollbar.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-segmented.cjs.entry.js +13 -2
- package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-select.cjs.entry.js +21 -12
- package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-slider.cjs.entry.js +6 -12
- package/dist/cjs/hb-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-space.cjs.entry.js +2 -2
- package/dist/cjs/hb-statistic.cjs.entry.js +1 -1
- package/dist/cjs/hb-step.cjs.entry.js +1 -1
- package/dist/cjs/hb-steps.cjs.entry.js +2 -2
- package/dist/cjs/hb-steps.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-sub-menu.cjs.entry.js +5 -5
- package/dist/cjs/hb-switch.cjs.entry.js +3 -3
- package/dist/cjs/hb-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/hb-table.cjs.entry.js +25 -16
- package/dist/cjs/hb-table.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tabs.cjs.entry.js +31 -10
- package/dist/cjs/hb-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tag.cjs.entry.js +3 -2
- package/dist/cjs/hb-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-text.cjs.entry.js +2 -2
- package/dist/cjs/hb-time-picker.cjs.entry.js +14 -9
- package/dist/cjs/hb-time-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-time-select.cjs.entry.js +13 -4
- package/dist/cjs/hb-time-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tooltip.cjs.entry.js +30 -10
- package/dist/cjs/hb-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tree-select.cjs.entry.js +125 -10
- package/dist/cjs/hb-tree-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tree.cjs.entry.js +145 -12
- package/dist/cjs/hb-tree.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-watermark.cjs.entry.js +19 -11
- package/dist/cjs/hb-watermark.cjs.entry.js.map +1 -1
- package/dist/cjs/huibo-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/transition-59f1da0f.js +34 -0
- package/dist/cjs/transition-59f1da0f.js.map +1 -0
- package/dist/collection/components/Alert/Alert.js +2 -1
- package/dist/collection/components/Alert/Alert.js.map +1 -1
- package/dist/collection/components/Calendar/Calendar.js +2 -2
- package/dist/collection/components/Calendar/Calendar.js.map +1 -1
- package/dist/collection/components/Cascader/Cascader.js +47 -11
- package/dist/collection/components/Cascader/Cascader.js.map +1 -1
- package/dist/collection/components/Checkbox/Checkbox.js +9 -4
- package/dist/collection/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/collection/components/Checkbox/CheckboxGroup.js +12 -8
- package/dist/collection/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/collection/components/Collapse/Collapse.js +20 -15
- package/dist/collection/components/Collapse/Collapse.js.map +1 -1
- package/dist/collection/components/Collapse/CollapseItem.js +33 -4
- package/dist/collection/components/Collapse/CollapseItem.js.map +1 -1
- package/dist/collection/components/ColorPicker/ColorPicker.js +22 -19
- package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/collection/components/ColorPicker/color-picker.css +8 -3
- package/dist/collection/components/DatePicker/DatePicker.js +12 -9
- package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/collection/components/DatePicker/date-picker.css +3 -2
- package/dist/collection/components/Descriptions/descriptions.css +30 -10
- package/dist/collection/components/Dialog/Dialog.js +54 -10
- package/dist/collection/components/Dialog/Dialog.js.map +1 -1
- package/dist/collection/components/Dialog/dialog.css +57 -11
- package/dist/collection/components/Drawer/Drawer.js +34 -3
- package/dist/collection/components/Drawer/Drawer.js.map +1 -1
- package/dist/collection/components/Drawer/drawer.css +207 -17
- package/dist/collection/components/Dropdown/Dropdown.js +28 -13
- package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/collection/components/Dropdown/dropdown.css +24 -2
- package/dist/collection/components/Empty/Empty.js +1 -1
- package/dist/collection/components/FloatButton/FloatButton.js +2 -2
- package/dist/collection/components/Form/Form.js +14 -9
- package/dist/collection/components/Form/Form.js.map +1 -1
- package/dist/collection/components/Form/FormItem.js +13 -12
- package/dist/collection/components/Form/FormItem.js.map +1 -1
- package/dist/collection/components/Form/form-item.css +8 -2
- package/dist/collection/components/Image/Image.js +24 -3
- package/dist/collection/components/Image/Image.js.map +1 -1
- package/dist/collection/components/ImagePreview/ImagePreview.js +1 -1
- package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
- package/dist/collection/components/Input/Input.js +3 -2
- package/dist/collection/components/Input/Input.js.map +1 -1
- package/dist/collection/components/Input/input.css +1 -2
- package/dist/collection/components/InputNumber/InputNumber.js +6 -6
- package/dist/collection/components/InputNumber/InputNumber.js.map +1 -1
- package/dist/collection/components/InputNumber/input-number.css +11 -1
- package/dist/collection/components/InputTag/InputTag.js +2 -2
- package/dist/collection/components/Layout/Layout.js.map +1 -1
- package/dist/collection/components/Layout/Row.js +2 -2
- package/dist/collection/components/Layout/layout.css +1713 -576
- package/dist/collection/components/Link/Link.js +2 -2
- package/dist/collection/components/Loading/Loading.js +2 -2
- package/dist/collection/components/Menu/Menu.js +2 -2
- package/dist/collection/components/Menu/MenuItem.js +34 -5
- package/dist/collection/components/Menu/MenuItem.js.map +1 -1
- package/dist/collection/components/Menu/SubMenu.js +4 -4
- package/dist/collection/components/Message/Message.js +13 -4
- package/dist/collection/components/Message/Message.js.map +1 -1
- package/dist/collection/components/PageHeader/PageHeader.js +1 -1
- package/dist/collection/components/Pagination/Pagination.js +8 -5
- package/dist/collection/components/Pagination/Pagination.js.map +1 -1
- package/dist/collection/components/Popconfirm/Popconfirm.js +28 -6
- package/dist/collection/components/Popconfirm/Popconfirm.js.map +1 -1
- package/dist/collection/components/Popconfirm/popconfirm.css +80 -16
- package/dist/collection/components/Popover/Popover.js +27 -12
- package/dist/collection/components/Popover/Popover.js.map +1 -1
- package/dist/collection/components/Popover/popover.css +49 -8
- package/dist/collection/components/Progress/Progress.js +1 -1
- package/dist/collection/components/Radio/Radio.js +8 -3
- package/dist/collection/components/Radio/Radio.js.map +1 -1
- package/dist/collection/components/Rate/Rate.js +3 -3
- package/dist/collection/components/Rate/Rate.js.map +1 -1
- package/dist/collection/components/Scrollbar/Scrollbar.js +5 -5
- package/dist/collection/components/Scrollbar/Scrollbar.js.map +1 -1
- package/dist/collection/components/Segmented/Segmented.js +15 -1
- package/dist/collection/components/Segmented/Segmented.js.map +1 -1
- package/dist/collection/components/Select/Select.js +21 -12
- package/dist/collection/components/Select/Select.js.map +1 -1
- package/dist/collection/components/Select/select.css +0 -1
- package/dist/collection/components/Slider/Slider.js +6 -12
- package/dist/collection/components/Slider/Slider.js.map +1 -1
- package/dist/collection/components/Slider/slider.css +0 -1
- package/dist/collection/components/Space/Space.js +2 -2
- package/dist/collection/components/Statistic/Statistic.js +1 -1
- package/dist/collection/components/Steps/Step.js +1 -1
- package/dist/collection/components/Steps/Steps.js +2 -2
- package/dist/collection/components/Steps/Steps.js.map +1 -1
- package/dist/collection/components/Switch/Switch.js +3 -3
- package/dist/collection/components/Switch/Switch.js.map +1 -1
- package/dist/collection/components/Switch/switch.css +3 -2
- package/dist/collection/components/Table/Table.js +25 -16
- package/dist/collection/components/Table/Table.js.map +1 -1
- package/dist/collection/components/Table/table.css +6 -2
- package/dist/collection/components/Tabs/TabPane.js +1 -1
- package/dist/collection/components/Tabs/Tabs.js +31 -10
- package/dist/collection/components/Tabs/Tabs.js.map +1 -1
- package/dist/collection/components/Tag/Tag.js +3 -2
- package/dist/collection/components/Tag/Tag.js.map +1 -1
- package/dist/collection/components/Text/Text.js +2 -2
- package/dist/collection/components/TimePicker/TimePicker.js +14 -9
- package/dist/collection/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/collection/components/TimeSelect/TimeSelect.js +13 -4
- package/dist/collection/components/TimeSelect/TimeSelect.js.map +1 -1
- package/dist/collection/components/Tooltip/Tooltip.js +31 -8
- package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/collection/components/Tooltip/tooltip.css +24 -2
- package/dist/collection/components/Tree/Tree.js +147 -13
- package/dist/collection/components/Tree/Tree.js.map +1 -1
- package/dist/collection/components/TreeSelect/TreeSelect.js +130 -11
- package/dist/collection/components/TreeSelect/TreeSelect.js.map +1 -1
- package/dist/collection/components/Watermark/Watermark.js +19 -11
- package/dist/collection/components/Watermark/Watermark.js.map +1 -1
- package/dist/collection/utils/a11y.js +15 -1
- package/dist/collection/utils/a11y.js.map +1 -1
- package/dist/collection/utils/date-helpers.js +4 -15
- package/dist/collection/utils/date-helpers.js.map +1 -1
- package/dist/collection/utils/transition.js +29 -0
- package/dist/collection/utils/transition.js.map +1 -0
- package/dist/components/hb-alert.js +2 -1
- package/dist/components/hb-alert.js.map +1 -1
- package/dist/components/hb-calendar.js +2 -2
- package/dist/components/hb-calendar.js.map +1 -1
- package/dist/components/hb-cascader.js +48 -12
- package/dist/components/hb-cascader.js.map +1 -1
- package/dist/components/hb-checkbox-group.js +12 -8
- package/dist/components/hb-checkbox-group.js.map +1 -1
- package/dist/components/hb-checkbox.js +9 -4
- package/dist/components/hb-checkbox.js.map +1 -1
- package/dist/components/hb-collapse-item.js +14 -4
- package/dist/components/hb-collapse-item.js.map +1 -1
- package/dist/components/hb-collapse.js +20 -15
- package/dist/components/hb-collapse.js.map +1 -1
- package/dist/components/hb-color-picker.js +22 -19
- package/dist/components/hb-color-picker.js.map +1 -1
- package/dist/components/hb-date-picker-pane.js +1 -1
- package/dist/components/hb-date-picker.js +13 -10
- package/dist/components/hb-date-picker.js.map +1 -1
- package/dist/components/hb-date-range-picker.js +1 -1
- package/dist/components/hb-date-time-picker.js +1 -1
- package/dist/components/hb-descriptions.js.map +1 -1
- package/dist/components/hb-dialog.js +53 -13
- package/dist/components/hb-dialog.js.map +1 -1
- package/dist/components/hb-drawer.js +36 -5
- package/dist/components/hb-drawer.js.map +1 -1
- package/dist/components/hb-dropdown.js +28 -15
- package/dist/components/hb-dropdown.js.map +1 -1
- package/dist/components/hb-empty.js +1 -1
- package/dist/components/hb-float-button.js +2 -2
- package/dist/components/hb-form-item.js +11 -10
- package/dist/components/hb-form-item.js.map +1 -1
- package/dist/components/hb-form.js +12 -7
- package/dist/components/hb-form.js.map +1 -1
- package/dist/components/hb-image-preview.js +1 -1
- package/dist/components/hb-image-preview.js.map +1 -1
- package/dist/components/hb-image.js +23 -3
- package/dist/components/hb-image.js.map +1 -1
- package/dist/components/hb-input-number.js +7 -7
- package/dist/components/hb-input-number.js.map +1 -1
- package/dist/components/hb-input-tag.js +2 -2
- package/dist/components/hb-input.js +3 -2
- package/dist/components/hb-input.js.map +1 -1
- package/dist/components/hb-layout.js.map +1 -1
- package/dist/components/hb-link.js +2 -2
- package/dist/components/hb-loading.js +2 -2
- package/dist/components/hb-menu-item.js +15 -5
- package/dist/components/hb-menu-item.js.map +1 -1
- package/dist/components/hb-menu.js +2 -2
- package/dist/components/hb-message.js +13 -4
- package/dist/components/hb-message.js.map +1 -1
- package/dist/components/hb-page-header.js +1 -1
- package/dist/components/hb-pagination.js +8 -5
- package/dist/components/hb-pagination.js.map +1 -1
- package/dist/components/hb-popconfirm.js +28 -8
- package/dist/components/hb-popconfirm.js.map +1 -1
- package/dist/components/hb-popover.js +27 -14
- package/dist/components/hb-popover.js.map +1 -1
- package/dist/components/hb-progress.js +1 -1
- package/dist/components/hb-radio.js +8 -3
- package/dist/components/hb-radio.js.map +1 -1
- package/dist/components/hb-rate.js +3 -3
- package/dist/components/hb-rate.js.map +1 -1
- package/dist/components/hb-row.js +2 -2
- package/dist/components/hb-scrollbar.js +5 -5
- package/dist/components/hb-scrollbar.js.map +1 -1
- package/dist/components/hb-segmented.js +15 -2
- package/dist/components/hb-segmented.js.map +1 -1
- package/dist/components/hb-select.js +21 -12
- package/dist/components/hb-select.js.map +1 -1
- package/dist/components/hb-slider.js +6 -12
- package/dist/components/hb-slider.js.map +1 -1
- package/dist/components/hb-space.js +2 -2
- package/dist/components/hb-statistic.js +1 -1
- package/dist/components/hb-step.js +1 -1
- package/dist/components/hb-steps.js +2 -2
- package/dist/components/hb-steps.js.map +1 -1
- package/dist/components/hb-sub-menu.js +5 -5
- package/dist/components/hb-switch.js +3 -3
- package/dist/components/hb-switch.js.map +1 -1
- package/dist/components/hb-tab-pane.js +1 -1
- package/dist/components/hb-table.js +25 -16
- package/dist/components/hb-table.js.map +1 -1
- package/dist/components/hb-tabs.js +31 -10
- package/dist/components/hb-tabs.js.map +1 -1
- package/dist/components/hb-tag.js +3 -2
- package/dist/components/hb-tag.js.map +1 -1
- package/dist/components/hb-text.js +2 -2
- package/dist/components/hb-time-picker.js +14 -9
- package/dist/components/hb-time-picker.js.map +1 -1
- package/dist/components/hb-time-select.js +13 -4
- package/dist/components/hb-time-select.js.map +1 -1
- package/dist/components/hb-tooltip.js +31 -10
- package/dist/components/hb-tooltip.js.map +1 -1
- package/dist/components/hb-tree-select.js +129 -11
- package/dist/components/hb-tree-select.js.map +1 -1
- package/dist/components/hb-tree.js +147 -13
- package/dist/components/hb-tree.js.map +1 -1
- package/dist/components/hb-watermark.js +19 -11
- package/dist/components/hb-watermark.js.map +1 -1
- package/dist/{esm/a11y-f9ab2964.js → components/p-00aa34c8.js} +17 -3
- package/dist/components/p-00aa34c8.js.map +1 -0
- package/dist/components/{p-08b4005c.js → p-e0876aca.js} +5 -16
- package/dist/components/p-e0876aca.js.map +1 -0
- package/dist/components/p-fad66d69.js +32 -0
- package/dist/components/p-fad66d69.js.map +1 -0
- package/dist/{components/p-cc0aeb50.js → esm/a11y-e4cde5b0.js} +17 -3
- package/dist/esm/a11y-e4cde5b0.js.map +1 -0
- package/dist/esm/{date-helpers-44507189.js → date-helpers-259ed2f1.js} +5 -16
- package/dist/esm/date-helpers-259ed2f1.js.map +1 -0
- package/dist/esm/hb-alert.entry.js +2 -1
- package/dist/esm/hb-alert.entry.js.map +1 -1
- package/dist/esm/hb-calendar.entry.js +2 -2
- package/dist/esm/hb-calendar.entry.js.map +1 -1
- package/dist/esm/hb-cascader.entry.js +48 -12
- package/dist/esm/hb-cascader.entry.js.map +1 -1
- package/dist/esm/hb-checkbox-group.entry.js +12 -8
- package/dist/esm/hb-checkbox-group.entry.js.map +1 -1
- package/dist/esm/hb-checkbox.entry.js +9 -4
- package/dist/esm/hb-checkbox.entry.js.map +1 -1
- package/dist/esm/hb-collapse-item.entry.js +13 -4
- package/dist/esm/hb-collapse-item.entry.js.map +1 -1
- package/dist/esm/hb-collapse.entry.js +20 -15
- package/dist/esm/hb-collapse.entry.js.map +1 -1
- package/dist/esm/hb-color-picker.entry.js +22 -19
- package/dist/esm/hb-color-picker.entry.js.map +1 -1
- package/dist/esm/hb-date-picker-pane.entry.js +1 -1
- package/dist/esm/hb-date-picker.entry.js +13 -10
- package/dist/esm/hb-date-picker.entry.js.map +1 -1
- package/dist/esm/hb-date-range-picker.entry.js +1 -1
- package/dist/esm/hb-date-time-picker.entry.js +1 -1
- package/dist/esm/hb-descriptions.entry.js.map +1 -1
- package/dist/esm/hb-dialog.entry.js +51 -12
- package/dist/esm/hb-dialog.entry.js.map +1 -1
- package/dist/esm/hb-drawer.entry.js +34 -4
- package/dist/esm/hb-drawer.entry.js.map +1 -1
- package/dist/esm/hb-dropdown.entry.js +27 -15
- package/dist/esm/hb-dropdown.entry.js.map +1 -1
- package/dist/esm/hb-empty.entry.js +1 -1
- package/dist/esm/hb-float-button.entry.js +2 -2
- package/dist/esm/hb-form-item.entry.js +11 -10
- package/dist/esm/hb-form-item.entry.js.map +1 -1
- package/dist/esm/hb-form.entry.js +12 -7
- package/dist/esm/hb-form.entry.js.map +1 -1
- package/dist/esm/hb-image-preview.entry.js +1 -1
- package/dist/esm/hb-image-preview.entry.js.map +1 -1
- package/dist/esm/hb-image.entry.js +21 -3
- package/dist/esm/hb-image.entry.js.map +1 -1
- package/dist/esm/hb-input-number.entry.js +7 -7
- package/dist/esm/hb-input-number.entry.js.map +1 -1
- package/dist/esm/hb-input-tag.entry.js +2 -2
- package/dist/esm/hb-input.entry.js +3 -2
- package/dist/esm/hb-input.entry.js.map +1 -1
- package/dist/esm/hb-layout.entry.js.map +1 -1
- package/dist/esm/hb-link.entry.js +2 -2
- package/dist/esm/hb-loading.entry.js +2 -2
- package/dist/esm/hb-menu-item.entry.js +14 -5
- package/dist/esm/hb-menu-item.entry.js.map +1 -1
- package/dist/esm/hb-menu.entry.js +2 -2
- package/dist/esm/hb-message.entry.js +13 -4
- package/dist/esm/hb-message.entry.js.map +1 -1
- package/dist/esm/hb-page-header.entry.js +1 -1
- package/dist/esm/hb-pagination.entry.js +8 -5
- package/dist/esm/hb-pagination.entry.js.map +1 -1
- package/dist/esm/hb-popconfirm.entry.js +27 -8
- package/dist/esm/hb-popconfirm.entry.js.map +1 -1
- package/dist/esm/hb-popover.entry.js +26 -14
- package/dist/esm/hb-popover.entry.js.map +1 -1
- package/dist/esm/hb-progress.entry.js +1 -1
- package/dist/esm/hb-radio.entry.js +8 -3
- package/dist/esm/hb-radio.entry.js.map +1 -1
- package/dist/esm/hb-rate.entry.js +3 -3
- package/dist/esm/hb-rate.entry.js.map +1 -1
- package/dist/esm/hb-row.entry.js +2 -2
- package/dist/esm/hb-scrollbar.entry.js +5 -5
- package/dist/esm/hb-scrollbar.entry.js.map +1 -1
- package/dist/esm/hb-segmented.entry.js +13 -2
- package/dist/esm/hb-segmented.entry.js.map +1 -1
- package/dist/esm/hb-select.entry.js +21 -12
- package/dist/esm/hb-select.entry.js.map +1 -1
- package/dist/esm/hb-slider.entry.js +6 -12
- package/dist/esm/hb-slider.entry.js.map +1 -1
- package/dist/esm/hb-space.entry.js +2 -2
- package/dist/esm/hb-statistic.entry.js +1 -1
- package/dist/esm/hb-step.entry.js +1 -1
- package/dist/esm/hb-steps.entry.js +2 -2
- package/dist/esm/hb-steps.entry.js.map +1 -1
- package/dist/esm/hb-sub-menu.entry.js +5 -5
- package/dist/esm/hb-switch.entry.js +3 -3
- package/dist/esm/hb-switch.entry.js.map +1 -1
- package/dist/esm/hb-tab-pane.entry.js +1 -1
- package/dist/esm/hb-table.entry.js +25 -16
- package/dist/esm/hb-table.entry.js.map +1 -1
- package/dist/esm/hb-tabs.entry.js +31 -10
- package/dist/esm/hb-tabs.entry.js.map +1 -1
- package/dist/esm/hb-tag.entry.js +3 -2
- package/dist/esm/hb-tag.entry.js.map +1 -1
- package/dist/esm/hb-text.entry.js +2 -2
- package/dist/esm/hb-time-picker.entry.js +14 -9
- package/dist/esm/hb-time-picker.entry.js.map +1 -1
- package/dist/esm/hb-time-select.entry.js +13 -4
- package/dist/esm/hb-time-select.entry.js.map +1 -1
- package/dist/esm/hb-tooltip.entry.js +30 -10
- package/dist/esm/hb-tooltip.entry.js.map +1 -1
- package/dist/esm/hb-tree-select.entry.js +125 -10
- package/dist/esm/hb-tree-select.entry.js.map +1 -1
- package/dist/esm/hb-tree.entry.js +145 -12
- package/dist/esm/hb-tree.entry.js.map +1 -1
- package/dist/esm/hb-watermark.entry.js +19 -11
- package/dist/esm/hb-watermark.entry.js.map +1 -1
- package/dist/esm/huibo-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/transition-4295d789.js +32 -0
- package/dist/esm/transition-4295d789.js.map +1 -0
- package/dist/huibo-ui/huibo-ui.esm.js +1 -1
- package/dist/huibo-ui/huibo-ui.esm.js.map +1 -1
- package/dist/huibo-ui/p-00aa34c8.js +2 -0
- package/dist/huibo-ui/p-00aa34c8.js.map +1 -0
- package/dist/huibo-ui/p-0cc1e3f3.entry.js +2 -0
- package/dist/huibo-ui/p-0cc1e3f3.entry.js.map +1 -0
- package/dist/huibo-ui/{p-678b4212.entry.js → p-0ddae4e9.entry.js} +2 -2
- package/dist/huibo-ui/p-10f6c184.entry.js.map +1 -1
- package/dist/huibo-ui/{p-f4336be9.entry.js → p-14c3b47b.entry.js} +2 -2
- package/dist/huibo-ui/{p-c50ad398.entry.js → p-193efdc0.entry.js} +2 -2
- package/dist/huibo-ui/{p-735bceef.entry.js → p-1b98152b.entry.js} +2 -2
- package/dist/huibo-ui/p-1b98152b.entry.js.map +1 -0
- package/dist/huibo-ui/p-1f6d0adb.entry.js +2 -0
- package/dist/huibo-ui/p-1f6d0adb.entry.js.map +1 -0
- package/dist/huibo-ui/{p-2943f5d0.entry.js → p-29092b85.entry.js} +2 -2
- package/dist/huibo-ui/p-29092b85.entry.js.map +1 -0
- package/dist/huibo-ui/p-2bc30b1b.entry.js +2 -0
- package/dist/huibo-ui/p-2bc30b1b.entry.js.map +1 -0
- package/dist/huibo-ui/{p-0d4b2997.entry.js → p-2bcda1bb.entry.js} +2 -2
- package/dist/huibo-ui/{p-b8d87f7e.entry.js → p-2ca9796a.entry.js} +2 -2
- package/dist/huibo-ui/p-2ca9796a.entry.js.map +1 -0
- package/dist/huibo-ui/{p-7da14d7c.entry.js → p-3042f986.entry.js} +2 -2
- package/dist/huibo-ui/{p-e039155d.entry.js → p-3dacb26b.entry.js} +2 -2
- package/dist/huibo-ui/{p-a084b8e5.entry.js → p-412ff618.entry.js} +2 -2
- package/dist/huibo-ui/{p-6beb5b81.entry.js → p-415295f3.entry.js} +2 -2
- package/dist/huibo-ui/p-415295f3.entry.js.map +1 -0
- package/dist/huibo-ui/p-494e6c25.entry.js +2 -0
- package/dist/huibo-ui/p-494e6c25.entry.js.map +1 -0
- package/dist/huibo-ui/p-4d87d7f4.entry.js +2 -0
- package/dist/huibo-ui/p-4d87d7f4.entry.js.map +1 -0
- package/dist/huibo-ui/{p-2811e603.entry.js → p-54a28052.entry.js} +2 -2
- package/dist/huibo-ui/p-54a28052.entry.js.map +1 -0
- package/dist/huibo-ui/p-5e253c15.entry.js +2 -0
- package/dist/huibo-ui/p-5e253c15.entry.js.map +1 -0
- package/dist/huibo-ui/p-63d68c61.entry.js +2 -0
- package/dist/huibo-ui/p-63d68c61.entry.js.map +1 -0
- package/dist/huibo-ui/{p-ccd09d5a.entry.js → p-6518c435.entry.js} +2 -2
- package/dist/huibo-ui/{p-1f8db37a.entry.js → p-687d8dff.entry.js} +2 -2
- package/dist/huibo-ui/p-687d8dff.entry.js.map +1 -0
- package/dist/huibo-ui/p-688460ce.entry.js +2 -0
- package/dist/huibo-ui/p-688460ce.entry.js.map +1 -0
- package/dist/huibo-ui/p-69bb1dd9.entry.js +2 -0
- package/dist/huibo-ui/p-69bb1dd9.entry.js.map +1 -0
- package/dist/huibo-ui/{p-e5cbfa9e.entry.js → p-6c23fbd1.entry.js} +2 -2
- package/dist/huibo-ui/p-6c23fbd1.entry.js.map +1 -0
- package/dist/huibo-ui/p-6c8cf248.entry.js.map +1 -1
- package/dist/huibo-ui/p-6efed295.entry.js +2 -0
- package/dist/huibo-ui/p-6efed295.entry.js.map +1 -0
- package/dist/huibo-ui/{p-c80f8ace.entry.js → p-79b24b83.entry.js} +2 -2
- package/dist/huibo-ui/p-79b24b83.entry.js.map +1 -0
- package/dist/huibo-ui/p-7a38b3e2.entry.js +2 -0
- package/dist/huibo-ui/p-7a38b3e2.entry.js.map +1 -0
- package/dist/huibo-ui/{p-cad57c2d.entry.js → p-7a682c56.entry.js} +2 -2
- package/dist/huibo-ui/{p-a8996d22.entry.js → p-815fc943.entry.js} +2 -2
- package/dist/huibo-ui/{p-af74667d.entry.js → p-89be7973.entry.js} +2 -2
- package/dist/huibo-ui/p-8a202bc5.entry.js.map +1 -1
- package/dist/huibo-ui/{p-213b9de7.entry.js → p-8c4415ed.entry.js} +2 -2
- package/dist/huibo-ui/p-8c4415ed.entry.js.map +1 -0
- package/dist/huibo-ui/{p-8fdbd17c.entry.js → p-950e7465.entry.js} +2 -2
- package/dist/huibo-ui/{p-ab9cf0e4.entry.js → p-96cecd21.entry.js} +2 -2
- package/dist/huibo-ui/p-96cecd21.entry.js.map +1 -0
- package/dist/huibo-ui/{p-2b4556ff.entry.js → p-98b513cd.entry.js} +2 -2
- package/dist/huibo-ui/p-98b513cd.entry.js.map +1 -0
- package/dist/huibo-ui/{p-86bdc48a.entry.js → p-ac18c68b.entry.js} +2 -2
- package/dist/huibo-ui/p-ac18c68b.entry.js.map +1 -0
- package/dist/huibo-ui/{p-89ea1141.entry.js → p-ac45291c.entry.js} +2 -2
- package/dist/huibo-ui/{p-e10fcfbe.entry.js → p-b105cf76.entry.js} +2 -2
- package/dist/huibo-ui/p-b105cf76.entry.js.map +1 -0
- package/dist/huibo-ui/{p-9a5406f0.entry.js → p-b38802b0.entry.js} +2 -2
- package/dist/huibo-ui/{p-9a5406f0.entry.js.map → p-b38802b0.entry.js.map} +1 -1
- package/dist/huibo-ui/{p-ea74fcae.entry.js → p-b3fd12c7.entry.js} +2 -2
- package/dist/huibo-ui/p-b3fd12c7.entry.js.map +1 -0
- package/dist/huibo-ui/p-b5ea18ba.entry.js +2 -0
- package/dist/huibo-ui/p-b5ea18ba.entry.js.map +1 -0
- package/dist/huibo-ui/{p-41d9c846.entry.js → p-b6afe81e.entry.js} +2 -2
- package/dist/huibo-ui/p-b7900dee.entry.js +2 -0
- package/dist/huibo-ui/p-b7900dee.entry.js.map +1 -0
- package/dist/huibo-ui/p-b8c83751.entry.js +2 -0
- package/dist/huibo-ui/p-b8c83751.entry.js.map +1 -0
- package/dist/huibo-ui/p-c7713947.entry.js +2 -0
- package/dist/huibo-ui/p-c7713947.entry.js.map +1 -0
- package/dist/huibo-ui/{p-33de6878.entry.js → p-c869842c.entry.js} +2 -2
- package/dist/huibo-ui/p-c869842c.entry.js.map +1 -0
- package/dist/huibo-ui/p-c8e917db.entry.js.map +1 -1
- package/dist/huibo-ui/p-cb66dbef.entry.js +2 -0
- package/dist/huibo-ui/p-cb66dbef.entry.js.map +1 -0
- package/dist/huibo-ui/p-cde83f76.entry.js +2 -0
- package/dist/huibo-ui/p-cde83f76.entry.js.map +1 -0
- package/dist/huibo-ui/{p-f5969181.entry.js → p-dd9c6459.entry.js} +2 -2
- package/dist/huibo-ui/{p-08b4005c.js → p-e0876aca.js} +1 -1
- package/dist/huibo-ui/p-e0876aca.js.map +1 -0
- package/dist/huibo-ui/{p-aa5e5e02.entry.js → p-e1773c93.entry.js} +2 -2
- package/dist/huibo-ui/p-e1773c93.entry.js.map +1 -0
- package/dist/huibo-ui/{p-626b48f1.entry.js → p-e73c357f.entry.js} +2 -2
- package/dist/huibo-ui/p-e73c357f.entry.js.map +1 -0
- package/dist/huibo-ui/{p-60532a1f.entry.js → p-e7c73624.entry.js} +2 -2
- package/dist/huibo-ui/p-e7c73624.entry.js.map +1 -0
- package/dist/huibo-ui/{p-13010da2.entry.js → p-e9e7abca.entry.js} +2 -2
- package/dist/huibo-ui/{p-f6889710.entry.js → p-ea0823f3.entry.js} +2 -2
- package/dist/huibo-ui/p-ea0823f3.entry.js.map +1 -0
- package/dist/huibo-ui/{p-b468858e.entry.js → p-f1f2483f.entry.js} +2 -2
- package/dist/huibo-ui/p-fad66d69.js +2 -0
- package/dist/huibo-ui/p-fad66d69.js.map +1 -0
- package/dist/huibo-ui/{p-fd8301c6.entry.js → p-fd6831f9.entry.js} +2 -2
- package/dist/huibo-ui/p-ff6bc5cc.entry.js +2 -0
- package/dist/huibo-ui/p-ff6bc5cc.entry.js.map +1 -0
- package/dist/types/components/Cascader/Cascader.d.ts +12 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/types/components/Checkbox/CheckboxGroup.d.ts +1 -0
- package/dist/types/components/Collapse/Collapse.d.ts +2 -0
- package/dist/types/components/Collapse/CollapseItem.d.ts +8 -1
- package/dist/types/components/Dialog/Dialog.d.ts +13 -1
- package/dist/types/components/Drawer/Drawer.d.ts +4 -0
- package/dist/types/components/Dropdown/Dropdown.d.ts +6 -2
- package/dist/types/components/Form/Form.d.ts +2 -0
- package/dist/types/components/Image/Image.d.ts +6 -0
- package/dist/types/components/Menu/MenuItem.d.ts +8 -1
- package/dist/types/components/Message/Message.d.ts +3 -0
- package/dist/types/components/Popconfirm/Popconfirm.d.ts +6 -2
- package/dist/types/components/Popover/Popover.d.ts +6 -1
- package/dist/types/components/Radio/Radio.d.ts +5 -0
- package/dist/types/components/Segmented/Segmented.d.ts +6 -0
- package/dist/types/components/Select/Select.d.ts +5 -0
- package/dist/types/components/Table/Table.d.ts +8 -2
- package/dist/types/components/Tabs/Tabs.d.ts +6 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +6 -0
- package/dist/types/components/Tree/Tree.d.ts +24 -0
- package/dist/types/components/TreeSelect/TreeSelect.d.ts +17 -0
- package/dist/types/components/Watermark/Watermark.d.ts +7 -1
- package/dist/types/components.d.ts +40 -4
- package/dist/types/utils/a11y.d.ts +9 -0
- package/dist/types/utils/transition.d.ts +27 -0
- package/package.json +1 -1
- package/dist/cjs/a11y-802de67a.js.map +0 -1
- package/dist/cjs/date-helpers-1ffddc59.js.map +0 -1
- package/dist/components/p-08b4005c.js.map +0 -1
- package/dist/components/p-cc0aeb50.js.map +0 -1
- package/dist/esm/a11y-f9ab2964.js.map +0 -1
- package/dist/esm/date-helpers-44507189.js.map +0 -1
- package/dist/huibo-ui/p-08b4005c.js.map +0 -1
- package/dist/huibo-ui/p-1f8db37a.entry.js.map +0 -1
- package/dist/huibo-ui/p-213b9de7.entry.js.map +0 -1
- package/dist/huibo-ui/p-25fd7d5c.entry.js +0 -2
- package/dist/huibo-ui/p-25fd7d5c.entry.js.map +0 -1
- package/dist/huibo-ui/p-2811e603.entry.js.map +0 -1
- package/dist/huibo-ui/p-2943f5d0.entry.js.map +0 -1
- package/dist/huibo-ui/p-2b4556ff.entry.js.map +0 -1
- package/dist/huibo-ui/p-33de6878.entry.js.map +0 -1
- package/dist/huibo-ui/p-3807da71.entry.js +0 -2
- package/dist/huibo-ui/p-3807da71.entry.js.map +0 -1
- package/dist/huibo-ui/p-47ef7a86.entry.js +0 -2
- package/dist/huibo-ui/p-47ef7a86.entry.js.map +0 -1
- package/dist/huibo-ui/p-4d34e43e.entry.js +0 -2
- package/dist/huibo-ui/p-4d34e43e.entry.js.map +0 -1
- package/dist/huibo-ui/p-54aa2fd8.entry.js +0 -2
- package/dist/huibo-ui/p-54aa2fd8.entry.js.map +0 -1
- package/dist/huibo-ui/p-60532a1f.entry.js.map +0 -1
- package/dist/huibo-ui/p-626b48f1.entry.js.map +0 -1
- package/dist/huibo-ui/p-639f167d.entry.js +0 -2
- package/dist/huibo-ui/p-639f167d.entry.js.map +0 -1
- package/dist/huibo-ui/p-6beb5b81.entry.js.map +0 -1
- package/dist/huibo-ui/p-735bceef.entry.js.map +0 -1
- package/dist/huibo-ui/p-76519752.entry.js +0 -2
- package/dist/huibo-ui/p-76519752.entry.js.map +0 -1
- package/dist/huibo-ui/p-79af2efa.entry.js +0 -2
- package/dist/huibo-ui/p-79af2efa.entry.js.map +0 -1
- package/dist/huibo-ui/p-7f6975ad.entry.js +0 -2
- package/dist/huibo-ui/p-7f6975ad.entry.js.map +0 -1
- package/dist/huibo-ui/p-86bdc48a.entry.js.map +0 -1
- package/dist/huibo-ui/p-8a8443b8.entry.js +0 -2
- package/dist/huibo-ui/p-8a8443b8.entry.js.map +0 -1
- package/dist/huibo-ui/p-8fd788c9.entry.js +0 -2
- package/dist/huibo-ui/p-8fd788c9.entry.js.map +0 -1
- package/dist/huibo-ui/p-92521c31.entry.js +0 -2
- package/dist/huibo-ui/p-92521c31.entry.js.map +0 -1
- package/dist/huibo-ui/p-965d4d02.entry.js +0 -2
- package/dist/huibo-ui/p-965d4d02.entry.js.map +0 -1
- package/dist/huibo-ui/p-aa5e5e02.entry.js.map +0 -1
- package/dist/huibo-ui/p-ab9cf0e4.entry.js.map +0 -1
- package/dist/huibo-ui/p-b8d87f7e.entry.js.map +0 -1
- package/dist/huibo-ui/p-c6c91664.entry.js +0 -2
- package/dist/huibo-ui/p-c6c91664.entry.js.map +0 -1
- package/dist/huibo-ui/p-c80f8ace.entry.js.map +0 -1
- package/dist/huibo-ui/p-cc0aeb50.js +0 -2
- package/dist/huibo-ui/p-cc0aeb50.js.map +0 -1
- package/dist/huibo-ui/p-d79a15b1.entry.js +0 -2
- package/dist/huibo-ui/p-d79a15b1.entry.js.map +0 -1
- package/dist/huibo-ui/p-e10fcfbe.entry.js.map +0 -1
- package/dist/huibo-ui/p-e5cbfa9e.entry.js.map +0 -1
- package/dist/huibo-ui/p-ea74fcae.entry.js.map +0 -1
- package/dist/huibo-ui/p-edbda423.entry.js +0 -2
- package/dist/huibo-ui/p-edbda423.entry.js.map +0 -1
- package/dist/huibo-ui/p-f6889710.entry.js.map +0 -1
- package/dist/huibo-ui/p-f9bb5217.entry.js +0 -2
- package/dist/huibo-ui/p-f9bb5217.entry.js.map +0 -1
- package/dist/huibo-ui/p-fea20295.entry.js +0 -2
- package/dist/huibo-ui/p-fea20295.entry.js.map +0 -1
- /package/dist/huibo-ui/{p-678b4212.entry.js.map → p-0ddae4e9.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f4336be9.entry.js.map → p-14c3b47b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-c50ad398.entry.js.map → p-193efdc0.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-0d4b2997.entry.js.map → p-2bcda1bb.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-7da14d7c.entry.js.map → p-3042f986.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e039155d.entry.js.map → p-3dacb26b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-a084b8e5.entry.js.map → p-412ff618.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-ccd09d5a.entry.js.map → p-6518c435.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-cad57c2d.entry.js.map → p-7a682c56.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-a8996d22.entry.js.map → p-815fc943.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-af74667d.entry.js.map → p-89be7973.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8fdbd17c.entry.js.map → p-950e7465.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-89ea1141.entry.js.map → p-ac45291c.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-41d9c846.entry.js.map → p-b6afe81e.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f5969181.entry.js.map → p-dd9c6459.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-13010da2.entry.js.map → p-e9e7abca.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-b468858e.entry.js.map → p-f1f2483f.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-fd8301c6.entry.js.map → p-fd6831f9.entry.js.map} +0 -0
|
@@ -23,7 +23,7 @@ const PageHeader = class {
|
|
|
23
23
|
this.hbBack.emit();
|
|
24
24
|
};
|
|
25
25
|
render() {
|
|
26
|
-
return (h("div", { key: '
|
|
26
|
+
return (h("div", { key: 'ecfe4d352c4696133f30f9cb130a484c9512872f', class: { 'hb-page-header': true, 'hb-page-header--ghost': this.ghost } }, h("div", { key: 'b8972b2af8caf2c16dfa336434112d53dbced99e', class: "hb-page-header__main" }, this.back && (h("button", { key: '175834ac887d6079cc4518e2e454e3b19b574e49', type: "button", class: "hb-page-header__back", onClick: this.handleBack, "aria-label": "\u8FD4\u56DE" }, h("span", { key: '2effefb7b2e1846992b549def041226f9076ae8c', class: "hb-page-header__back-arrow" }, "\u2190"))), h("div", { key: '2bd0014a9b6788bd9202f330b36808f74d3feecc', class: "hb-page-header__titles" }, this.title && h("span", { key: 'a1538b4e5a6e1eb611c7cfa3eaaefbd802d71911', class: "hb-page-header__title" }, this.title), this.subtitle && h("span", { key: 'ff730fda5ba94da9482a513262b6f31749f712ad', class: "hb-page-header__subtitle" }, this.subtitle))), h("div", { key: '5b062f4656eed561e52f1aacb26c32ac8f638fb9', class: "hb-page-header__extra" }, h("slot", { key: 'd5cb18262a07f8b4962704f0d661ec3265275b35' }))));
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
PageHeader.style = HbPageHeaderStyle0;
|
|
@@ -55,14 +55,17 @@ const Pagination = class {
|
|
|
55
55
|
handleSizeChange(e) {
|
|
56
56
|
const target = e.target;
|
|
57
57
|
const size = parseInt(target.value, 10);
|
|
58
|
-
// 切 pageSize 后立即重算 totalPages,并防止 currentPage
|
|
58
|
+
// 切 pageSize 后立即重算 totalPages,并防止 currentPage 越界。
|
|
59
|
+
// 注意:先记下旧页码再赋值,否则「safePage !== internalCurrent」恒为 false(B2 回归)。
|
|
59
60
|
this.internalPageSize = size;
|
|
60
61
|
const newTotal = Math.max(1, Math.ceil(this.total / size));
|
|
61
|
-
const
|
|
62
|
+
const oldCurrent = this.internalCurrent;
|
|
63
|
+
const safePage = Math.min(oldCurrent, newTotal);
|
|
62
64
|
this.hbSizeChange.emit(size);
|
|
63
65
|
this.internalCurrent = safePage;
|
|
64
66
|
this.currentPage = safePage;
|
|
65
|
-
|
|
67
|
+
// 仅当页码真的被钳位时才 emit,避免切 pageSize 但页码未变时多余回调
|
|
68
|
+
if (safePage !== oldCurrent) {
|
|
66
69
|
this.hbCurrentChange.emit(safePage);
|
|
67
70
|
}
|
|
68
71
|
}
|
|
@@ -99,10 +102,10 @@ const Pagination = class {
|
|
|
99
102
|
}
|
|
100
103
|
render() {
|
|
101
104
|
const pages = this.getPages();
|
|
102
|
-
return (h("nav", { key: '
|
|
105
|
+
return (h("nav", { key: '9879e0e196ad17034b61a53919db135b70e829c7', class: { 'hb-pagination': true, 'hb-pagination--disabled': this.disabled }, role: "navigation", "aria-label": "\u5206\u9875" }, this.showTotal && (h("span", { key: '4cdc7fb2bbd5a05306b8256083e226fe326c6d3e', class: "hb-pagination__total", "aria-live": "polite" }, "\u5171 ", this.total, " \u6761")), this.showPageSize && (h("select", { key: '0d9630a2193aba460d576d126dcc54db34c8061c', class: "hb-pagination__sizes", onChange: this.handleSizeChange, disabled: this.disabled, "aria-label": "\u6BCF\u9875\u6761\u6570" }, this.pageSizes.map(size => (h("option", { value: size, selected: size === this.internalPageSize }, size, " \u6761/\u9875"))))), h("button", { key: '01e783d289673b1594101be14c2656ad4916edd8', type: "button", class: "hb-pagination__btn hb-pagination__prev", disabled: this.disabled || this.internalCurrent <= 1, onClick: () => this.handlePageClick(this.internalCurrent - 1), "aria-label": "\u4E0A\u4E00\u9875" }, "\u2039"), pages.map(page => page === '...' ? (h("span", { class: "hb-pagination__ellipsis", "aria-hidden": "true" }, "...")) : (h("button", { type: "button", class: {
|
|
103
106
|
'hb-pagination__btn': true,
|
|
104
107
|
'hb-pagination__btn--active': page === this.internalCurrent,
|
|
105
|
-
}, disabled: this.disabled, onClick: () => this.handlePageClick(page), "aria-label": `第 ${page} 页`, "aria-current": page === this.internalCurrent ? 'page' : undefined }, page))), h("button", { key: '
|
|
108
|
+
}, disabled: this.disabled, onClick: () => this.handlePageClick(page), "aria-label": `第 ${page} 页`, "aria-current": page === this.internalCurrent ? 'page' : undefined }, page))), h("button", { key: '946f06b2333376cd02dd6309377d691b5f5e6039', type: "button", class: "hb-pagination__btn hb-pagination__next", disabled: this.disabled || this.internalCurrent >= this.totalPages, onClick: () => this.handlePageClick(this.internalCurrent + 1), "aria-label": "\u4E0B\u4E00\u9875" }, "\u203A")));
|
|
106
109
|
}
|
|
107
110
|
static get watchers() { return {
|
|
108
111
|
"currentPage": ["handleCurrentPageChange"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"hb-pagination.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,+7OAA+7O,CAAC;AACt9O,2BAAe,aAAa;;MCUf,UAAU;;;;;;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AM,IAEhB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,KACtB,cAAQ,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,KAAK,IAAI,CAAC,gBAAgB,IAAG,IAAI,mBAAc,CACnF,CAAC,CACK,CACV,EAED,+DACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,wCAAwC,EAC9C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,eAAe,IAAI,CAAC,EACpD,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,gBAClD,oBAAK,aAGT,EAER,KAAK,CAAC,GAAG,CAAC,IAAI,IACb,IAAI,KAAK,KAAK,IACZ,YAAM,KAAK,EAAC,yBAAyB,iBAAa,MAAM,UAAW,KAEnE,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE;gBACL,oBAAoB,EAAE,IAAI;gBAC1B,4BAA4B,EAAE,IAAI,KAAK,IAAI,CAAC,eAAe;aAC5D,EACD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,IAAc,CAAC,gBACvC,KAAK,IAAI,IAAI,kBACX,IAAI,KAAK,IAAI,CAAC,eAAe,GAAG,MAAM,GAAG,SAAS,IAE/D,IAAI,CACE,CACV,CACF,EAED,+DACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,wCAAwC,EAC9C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,UAAU,EAClE,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,gBAClD,oBAAK,aAGT,CACL,EACN;KACH;;;;;;;;;;","names":[],"sources":["src/components/Pagination/pagination.css?tag=hb-pagination&encapsulation=shadow","src/components/Pagination/Pagination.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-pagination {\n display: flex;\n align-items: center;\n gap: var(--hb-spacing-xxs);\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n user-select: none;\n}\n\n.hb-pagination--disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n\n.hb-pagination__total {\n margin-right: var(--hb-spacing-xs);\n color: var(--hb-color-text-secondary);\n}\n\n.hb-pagination__sizes {\n height: 28px;\n padding: 0 var(--hb-spacing-xs);\n border: 1px solid var(--hb-color-border);\n border-radius: var(--hb-border-radius-sm);\n background: var(--hb-color-bg);\n color: var(--hb-color-text);\n font-size: var(--hb-font-size-sm);\n cursor: pointer;\n outline: none;\n margin-right: var(--hb-spacing-xs);\n}\n\n.hb-pagination__sizes:focus {\n border-color: var(--hb-color-primary);\n}\n\n.hb-pagination__btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 28px;\n height: 28px;\n padding: 0 4px;\n border: 1px solid var(--hb-color-border);\n border-radius: var(--hb-border-radius-sm);\n background: var(--hb-color-bg);\n color: var(--hb-color-text);\n font-size: var(--hb-font-size-sm);\n cursor: pointer;\n outline: none;\n transition: all var(--hb-transition-duration) var(--hb-transition-function);\n}\n\n.hb-pagination__btn:hover:not(:disabled):not(.hb-pagination__btn--active) {\n color: var(--hb-color-primary);\n border-color: var(--hb-color-primary);\n}\n\n.hb-pagination__btn:disabled {\n color: var(--hb-color-text-disabled);\n cursor: not-allowed;\n background: var(--hb-color-fill-quaternary);\n}\n\n.hb-pagination__btn--active {\n background-color: var(--hb-color-primary);\n border-color: var(--hb-color-primary);\n color: #fff;\n}\n\n.hb-pagination__ellipsis {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 28px;\n height: 28px;\n color: var(--hb-color-text-secondary);\n letter-spacing: 2px;\n}\n\n/* ============================================================\n * 响应式(移动端):小屏简化分页,\n * 隐藏非相邻页码与省略号,仅保留 首页/上一页/当前页/下一页/末页。\n * 通过 aria-hidden 而非 display:none,保持键盘可达性由 active 决定。\n * ============================================================ */\n@media (max-width: 575.98px) {\n /* 隐藏中间页码(保留 active 与首末按钮) */\n .hb-pagination__btn:not(.hb-pagination__btn--active):not(.hb-pagination__prev):not(.hb-pagination__next) {\n display: none;\n }\n\n /* 隐藏省略号 */\n .hb-pagination__ellipsis {\n display: none;\n }\n\n /* 隐藏\"共 N 条\"和\"每页 N 条\"选择器以节省空间(信息保留在 aria-label) */\n .hb-pagination__total,\n .hb-pagination__sizes {\n display: none;\n }\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Watch } from '@stencil/core';\n\n/**\n * Pagination 分页组件\n * 当数据量过多时,使用分页分解数据\n */\n@Component({\n tag: 'hb-pagination',\n styleUrl: 'pagination.css',\n shadow: true,\n})\nexport class Pagination {\n /** 总条目数 */\n @Prop() total: number = 0;\n\n /** 每页显示条目数 */\n @Prop() pageSize: number = 10;\n\n /** 当前页数 */\n @Prop({ mutable: true }) currentPage: number = 1;\n\n /** 每页显示个数选择器的选项设置 */\n @Prop() pageSizes: number[] = [10, 20, 50, 100];\n\n /** 最大页码按钮数 */\n @Prop() pagerCount: number = 7;\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n /** 是否显示总条数 */\n @Prop() showTotal: boolean = false;\n\n /** 是否显示每页条数选择器 */\n @Prop() showPageSize: boolean = false;\n\n @State() internalCurrent: number = 1;\n /** 内部每页条数:pageSize 变更时同步;size 切换后立即生效重算 totalPages */\n @State() internalPageSize: number = 10;\n\n /** 当前页改变事件 */\n @Event() hbCurrentChange: EventEmitter<number>;\n\n /** 每页条数改变事件 */\n @Event() hbSizeChange: EventEmitter<number>;\n\n @Watch('currentPage')\n handleCurrentPageChange() {\n this.internalCurrent = this.currentPage;\n }\n\n @Watch('pageSize')\n handlePageSizeChange() {\n this.internalPageSize = this.pageSize;\n }\n\n componentDidLoad() {\n this.internalCurrent = this.currentPage;\n this.internalPageSize = this.pageSize;\n }\n\n private get totalPages(): number {\n return Math.max(1, Math.ceil(this.total / this.internalPageSize));\n }\n\n private handlePageClick(page: number) {\n if (this.disabled || page === this.internalCurrent || page < 1 || page > this.totalPages) return;\n this.internalCurrent = page;\n this.currentPage = page;\n this.hbCurrentChange.emit(page);\n }\n\n private handleSizeChange(e: Event) {\n const target = e.target as HTMLSelectElement;\n const size = parseInt(target.value, 10);\n // 切 pageSize 后立即重算 totalPages,并防止 currentPage 越界\n this.internalPageSize = size;\n const newTotal = Math.max(1, Math.ceil(this.total / size));\n const safePage = Math.min(this.internalCurrent, newTotal);\n this.hbSizeChange.emit(size);\n this.internalCurrent = safePage;\n this.currentPage = safePage;\n if (safePage !== this.internalCurrent) {\n this.hbCurrentChange.emit(safePage);\n }\n }\n\n private getPages(): (number | '...')[] {\n const pages: (number | '...')[] = [];\n const total = this.totalPages;\n const current = this.internalCurrent;\n const pager = this.pagerCount;\n\n if (total <= pager) {\n for (let i = 1; i <= total; i++) pages.push(i);\n return pages;\n }\n\n const half = Math.floor((pager - 2) / 2);\n let start = current - half;\n let end = current + half;\n\n if (start < 2) {\n start = 2;\n end = Math.min(pager - 1, total - 1);\n }\n if (end > total - 1) {\n end = total - 1;\n start = Math.max(2, total - pager + 2);\n }\n\n pages.push(1);\n if (start > 2) pages.push('...');\n for (let i = start; i <= end; i++) pages.push(i);\n if (end < total - 1) pages.push('...');\n pages.push(total);\n\n return pages;\n }\n\n render() {\n const pages = this.getPages();\n\n return (\n <nav\n class={{ 'hb-pagination': true, 'hb-pagination--disabled': this.disabled }}\n role=\"navigation\"\n aria-label=\"分页\"\n >\n {this.showTotal && (\n <span class=\"hb-pagination__total\" aria-live=\"polite\">共 {this.total} 条</span>\n )}\n\n {this.showPageSize && (\n <select\n class=\"hb-pagination__sizes\"\n onChange={this.handleSizeChange}\n disabled={this.disabled}\n aria-label=\"每页条数\"\n >\n {this.pageSizes.map(size => (\n <option value={size} selected={size === this.internalPageSize}>{size} 条/页</option>\n ))}\n </select>\n )}\n\n <button\n type=\"button\"\n class=\"hb-pagination__btn hb-pagination__prev\"\n disabled={this.disabled || this.internalCurrent <= 1}\n onClick={() => this.handlePageClick(this.internalCurrent - 1)}\n aria-label=\"上一页\"\n >\n ‹\n </button>\n\n {pages.map(page =>\n page === '...' ? (\n <span class=\"hb-pagination__ellipsis\" aria-hidden=\"true\">...</span>\n ) : (\n <button\n type=\"button\"\n class={{\n 'hb-pagination__btn': true,\n 'hb-pagination__btn--active': page === this.internalCurrent,\n }}\n disabled={this.disabled}\n onClick={() => this.handlePageClick(page as number)}\n aria-label={`第 ${page} 页`}\n aria-current={page === this.internalCurrent ? 'page' : undefined}\n >\n {page}\n </button>\n )\n )}\n\n <button\n type=\"button\"\n class=\"hb-pagination__btn hb-pagination__next\"\n disabled={this.disabled || this.internalCurrent >= this.totalPages}\n onClick={() => this.handlePageClick(this.internalCurrent + 1)}\n aria-label=\"下一页\"\n >\n ›\n </button>\n </nav>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"hb-pagination.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,+7OAA+7O,CAAC;AACt9O,2BAAe,aAAa;;MCUf,UAAU;;;;;;;IAEb,KAAK,GAAW,CAAC,CAAC;;IAGlB,QAAQ,GAAW,EAAE,CAAC;;IAGL,WAAW,GAAW,CAAC,CAAC;;IAGzC,SAAS,GAAa,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;;IAGxC,UAAU,GAAW,CAAC,CAAC;;IAGvB,QAAQ,GAAY,KAAK,CAAC;;IAG1B,SAAS,GAAY,KAAK,CAAC;;IAG3B,YAAY,GAAY,KAAK,CAAC;IAE7B,eAAe,GAAW,CAAC,CAAC;;IAE5B,gBAAgB,GAAW,EAAE,CAAC;;IAG9B,eAAe,CAAuB;;IAGtC,YAAY,CAAuB;IAG5C,uBAAuB;QACrB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC;KACzC;IAGD,oBAAoB;QAClB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC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EP,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE;gBACL,oBAAoB,EAAE,IAAI;gBAC1B,4BAA4B,EAAE,IAAI,KAAK,IAAI,CAAC,eAAe;aAC5D,EACD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,IAAc,CAAC,gBACvC,KAAK,IAAI,IAAI,kBACX,IAAI,KAAK,IAAI,CAAC,eAAe,GAAG,MAAM,GAAG,SAAS,IAE/D,IAAI,CACE,CACV,CACF,EAED,+DACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,wCAAwC,EAC9C,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,UAAU,EAClE,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,gBAClD,oBAAK,aAGT,CACL,EACN;KACH;;;;;;;;;;","names":[],"sources":["src/components/Pagination/pagination.css?tag=hb-pagination&encapsulation=shadow","src/components/Pagination/Pagination.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-pagination {\n display: flex;\n align-items: center;\n gap: var(--hb-spacing-xxs);\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n user-select: none;\n}\n\n.hb-pagination--disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n\n.hb-pagination__total {\n margin-right: var(--hb-spacing-xs);\n color: var(--hb-color-text-secondary);\n}\n\n.hb-pagination__sizes {\n height: 28px;\n padding: 0 var(--hb-spacing-xs);\n border: 1px solid var(--hb-color-border);\n border-radius: var(--hb-border-radius-sm);\n background: var(--hb-color-bg);\n color: var(--hb-color-text);\n font-size: var(--hb-font-size-sm);\n cursor: pointer;\n outline: none;\n margin-right: var(--hb-spacing-xs);\n}\n\n.hb-pagination__sizes:focus {\n border-color: var(--hb-color-primary);\n}\n\n.hb-pagination__btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 28px;\n height: 28px;\n padding: 0 4px;\n border: 1px solid var(--hb-color-border);\n border-radius: var(--hb-border-radius-sm);\n background: var(--hb-color-bg);\n color: var(--hb-color-text);\n font-size: var(--hb-font-size-sm);\n cursor: pointer;\n outline: none;\n transition: all var(--hb-transition-duration) var(--hb-transition-function);\n}\n\n.hb-pagination__btn:hover:not(:disabled):not(.hb-pagination__btn--active) {\n color: var(--hb-color-primary);\n border-color: var(--hb-color-primary);\n}\n\n.hb-pagination__btn:disabled {\n color: var(--hb-color-text-disabled);\n cursor: not-allowed;\n background: var(--hb-color-fill-quaternary);\n}\n\n.hb-pagination__btn--active {\n background-color: var(--hb-color-primary);\n border-color: var(--hb-color-primary);\n color: #fff;\n}\n\n.hb-pagination__ellipsis {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 28px;\n height: 28px;\n color: var(--hb-color-text-secondary);\n letter-spacing: 2px;\n}\n\n/* ============================================================\n * 响应式(移动端):小屏简化分页,\n * 隐藏非相邻页码与省略号,仅保留 首页/上一页/当前页/下一页/末页。\n * 通过 aria-hidden 而非 display:none,保持键盘可达性由 active 决定。\n * ============================================================ */\n@media (max-width: 575.98px) {\n /* 隐藏中间页码(保留 active 与首末按钮) */\n .hb-pagination__btn:not(.hb-pagination__btn--active):not(.hb-pagination__prev):not(.hb-pagination__next) {\n display: none;\n }\n\n /* 隐藏省略号 */\n .hb-pagination__ellipsis {\n display: none;\n }\n\n /* 隐藏\"共 N 条\"和\"每页 N 条\"选择器以节省空间(信息保留在 aria-label) */\n .hb-pagination__total,\n .hb-pagination__sizes {\n display: none;\n }\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Watch } from '@stencil/core';\n\n/**\n * Pagination 分页组件\n * 当数据量过多时,使用分页分解数据\n */\n@Component({\n tag: 'hb-pagination',\n styleUrl: 'pagination.css',\n shadow: true,\n})\nexport class Pagination {\n /** 总条目数 */\n @Prop() total: number = 0;\n\n /** 每页显示条目数 */\n @Prop() pageSize: number = 10;\n\n /** 当前页数 */\n @Prop({ mutable: true }) currentPage: number = 1;\n\n /** 每页显示个数选择器的选项设置 */\n @Prop() pageSizes: number[] = [10, 20, 50, 100];\n\n /** 最大页码按钮数 */\n @Prop() pagerCount: number = 7;\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n /** 是否显示总条数 */\n @Prop() showTotal: boolean = false;\n\n /** 是否显示每页条数选择器 */\n @Prop() showPageSize: boolean = false;\n\n @State() internalCurrent: number = 1;\n /** 内部每页条数:pageSize 变更时同步;size 切换后立即生效重算 totalPages */\n @State() internalPageSize: number = 10;\n\n /** 当前页改变事件 */\n @Event() hbCurrentChange: EventEmitter<number>;\n\n /** 每页条数改变事件 */\n @Event() hbSizeChange: EventEmitter<number>;\n\n @Watch('currentPage')\n handleCurrentPageChange() {\n this.internalCurrent = this.currentPage;\n }\n\n @Watch('pageSize')\n handlePageSizeChange() {\n this.internalPageSize = this.pageSize;\n }\n\n componentDidLoad() {\n this.internalCurrent = this.currentPage;\n this.internalPageSize = this.pageSize;\n }\n\n private get totalPages(): number {\n return Math.max(1, Math.ceil(this.total / this.internalPageSize));\n }\n\n private handlePageClick(page: number) {\n if (this.disabled || page === this.internalCurrent || page < 1 || page > this.totalPages) return;\n this.internalCurrent = page;\n this.currentPage = page;\n this.hbCurrentChange.emit(page);\n }\n\n private handleSizeChange(e: Event) {\n const target = e.target as HTMLSelectElement;\n const size = parseInt(target.value, 10);\n // 切 pageSize 后立即重算 totalPages,并防止 currentPage 越界。\n // 注意:先记下旧页码再赋值,否则「safePage !== internalCurrent」恒为 false(B2 回归)。\n this.internalPageSize = size;\n const newTotal = Math.max(1, Math.ceil(this.total / size));\n const oldCurrent = this.internalCurrent;\n const safePage = Math.min(oldCurrent, newTotal);\n this.hbSizeChange.emit(size);\n this.internalCurrent = safePage;\n this.currentPage = safePage;\n // 仅当页码真的被钳位时才 emit,避免切 pageSize 但页码未变时多余回调\n if (safePage !== oldCurrent) {\n this.hbCurrentChange.emit(safePage);\n }\n }\n\n private getPages(): (number | '...')[] {\n const pages: (number | '...')[] = [];\n const total = this.totalPages;\n const current = this.internalCurrent;\n const pager = this.pagerCount;\n\n if (total <= pager) {\n for (let i = 1; i <= total; i++) pages.push(i);\n return pages;\n }\n\n const half = Math.floor((pager - 2) / 2);\n let start = current - half;\n let end = current + half;\n\n if (start < 2) {\n start = 2;\n end = Math.min(pager - 1, total - 1);\n }\n if (end > total - 1) {\n end = total - 1;\n start = Math.max(2, total - pager + 2);\n }\n\n pages.push(1);\n if (start > 2) pages.push('...');\n for (let i = start; i <= end; i++) pages.push(i);\n if (end < total - 1) pages.push('...');\n pages.push(total);\n\n return pages;\n }\n\n render() {\n const pages = this.getPages();\n\n return (\n <nav class={{ 'hb-pagination': true, 'hb-pagination--disabled': this.disabled }} role=\"navigation\" aria-label=\"分页\">\n {this.showTotal && (\n <span class=\"hb-pagination__total\" aria-live=\"polite\">\n 共 {this.total} 条\n </span>\n )}\n\n {this.showPageSize && (\n <select class=\"hb-pagination__sizes\" onChange={this.handleSizeChange} disabled={this.disabled} aria-label=\"每页条数\">\n {this.pageSizes.map(size => (\n <option value={size} selected={size === this.internalPageSize}>\n {size} 条/页\n </option>\n ))}\n </select>\n )}\n\n <button\n type=\"button\"\n class=\"hb-pagination__btn hb-pagination__prev\"\n disabled={this.disabled || this.internalCurrent <= 1}\n onClick={() => this.handlePageClick(this.internalCurrent - 1)}\n aria-label=\"上一页\"\n >\n ‹\n </button>\n\n {pages.map(page =>\n page === '...' ? (\n <span class=\"hb-pagination__ellipsis\" aria-hidden=\"true\">\n ...\n </span>\n ) : (\n <button\n type=\"button\"\n class={{\n 'hb-pagination__btn': true,\n 'hb-pagination__btn--active': page === this.internalCurrent,\n }}\n disabled={this.disabled}\n onClick={() => this.handlePageClick(page as number)}\n aria-label={`第 ${page} 页`}\n aria-current={page === this.internalCurrent ? 'page' : undefined}\n >\n {page}\n </button>\n ),\n )}\n\n <button\n type=\"button\"\n class=\"hb-pagination__btn hb-pagination__next\"\n disabled={this.disabled || this.internalCurrent >= this.totalPages}\n onClick={() => this.handlePageClick(this.internalCurrent + 1)}\n aria-label=\"下一页\"\n >\n ›\n </button>\n </nav>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h } from './index-fdf7135e.js';
|
|
2
2
|
import { c as computePosition, g as getNextZIndex } from './popup-manager-128cc685.js';
|
|
3
|
-
import { i as isActivationKey } from './a11y-
|
|
3
|
+
import { i as isActivationKey } from './a11y-e4cde5b0.js';
|
|
4
|
+
import { c as createLeaveScheduler } from './transition-4295d789.js';
|
|
4
5
|
|
|
5
|
-
const popconfirmCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:inline-block}.hb-popconfirm__trigger{cursor:pointer;display:inline-block}.hb-popconfirm__popup{animation:hb-popconfirm-fade .15s ease-out;background:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);min-width:200px;padding:var(--hb-spacing-md);pointer-events:auto;position:fixed}.hb-popconfirm__main{align-items:flex-start;display:flex;gap:var(--hb-spacing-xs);margin-bottom:var(--hb-spacing-sm)}.hb-popconfirm__icon{color:var(--hb-color-warning);flex-shrink:0;font-size:16px}.hb-popconfirm__title{color:var(--hb-color-text);font-size:var(--hb-font-size-sm);line-height:1.5}.hb-popconfirm__action{display:flex;gap:var(--hb-spacing-xs);justify-content:flex-end}.hb-popconfirm__btn{background:var(--hb-color-bg);border:1px solid var(--hb-color-border);border-radius:var(--hb-border-radius-sm);cursor:pointer;font-size:var(--hb-font-size-xs);padding:4px 12px;transition:all var(--hb-transition-duration)}.hb-popconfirm__btn--cancel:hover{border-color:var(--hb-color-primary);color:var(--hb-color-primary)}.hb-popconfirm__btn--confirm{background:var(--hb-color-primary);border-color:var(--hb-color-primary);color:#fff}.hb-popconfirm__btn--confirm:hover{background:var(--hb-color-primary-hover)}@keyframes hb-popconfirm-fade{0%{opacity:0}to{opacity:1}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
6
|
+
const popconfirmCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:inline-block}.hb-popconfirm__trigger{cursor:pointer;display:inline-block}.hb-popconfirm__popup{animation:hb-popconfirm-fade .15s ease-out;background:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);min-width:200px;padding:var(--hb-spacing-md);pointer-events:auto;position:fixed}.hb-popconfirm__main{align-items:flex-start;display:flex;gap:var(--hb-spacing-xs);margin-bottom:var(--hb-spacing-sm)}.hb-popconfirm__icon{color:var(--hb-color-warning);flex-shrink:0;font-size:16px}.hb-popconfirm__title{color:var(--hb-color-text);font-size:var(--hb-font-size-sm);line-height:1.5}.hb-popconfirm__action{display:flex;gap:var(--hb-spacing-xs);justify-content:flex-end}.hb-popconfirm__btn{background:var(--hb-color-bg);border:1px solid var(--hb-color-border);border-radius:var(--hb-border-radius-sm);cursor:pointer;font-size:var(--hb-font-size-xs);padding:4px 12px;transition:all var(--hb-transition-duration)}.hb-popconfirm__btn--cancel:hover{border-color:var(--hb-color-primary);color:var(--hb-color-primary)}.hb-popconfirm__btn--confirm{background:var(--hb-color-primary);border-color:var(--hb-color-primary);color:#fff}.hb-popconfirm__btn--confirm:hover{background:var(--hb-color-primary-hover)}@keyframes hb-popconfirm-fade{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.hb-popconfirm__popup--leaving{animation:hb-popconfirm-fade-out .2s ease-in forwards}@keyframes hb-popconfirm-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.98)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
6
7
|
const HbPopconfirmStyle0 = popconfirmCss;
|
|
7
8
|
|
|
8
9
|
const Popconfirm = class {
|
|
@@ -17,29 +18,35 @@ const Popconfirm = class {
|
|
|
17
18
|
disabled = false;
|
|
18
19
|
icon = '⚠';
|
|
19
20
|
visible = false;
|
|
21
|
+
leaving = false;
|
|
20
22
|
popupStyle = {};
|
|
21
23
|
triggerRef;
|
|
22
24
|
popupRef;
|
|
23
25
|
confirmBtnRef;
|
|
26
|
+
leave = createLeaveScheduler(() => this.leaving, v => (this.leaving = v), 200);
|
|
24
27
|
show = () => {
|
|
25
28
|
if (this.disabled)
|
|
26
29
|
return;
|
|
30
|
+
this.leave.cancel();
|
|
27
31
|
this.visible = true;
|
|
28
32
|
requestAnimationFrame(() => {
|
|
29
33
|
this.updatePosition();
|
|
30
|
-
// 打开后自动聚焦确认按钮(对齐 antd:Enter 直接确认)
|
|
31
34
|
this.confirmBtnRef?.focus();
|
|
32
35
|
});
|
|
33
36
|
};
|
|
34
|
-
hide = () => {
|
|
35
|
-
|
|
37
|
+
hide = () => {
|
|
38
|
+
this.visible = false;
|
|
39
|
+
this.leave.start();
|
|
40
|
+
};
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
this.leave.dispose();
|
|
43
|
+
}
|
|
36
44
|
handleKeydown = (e) => {
|
|
37
|
-
if (e.key === 'Escape' && this.visible) {
|
|
45
|
+
if (e.key === 'Escape' && (this.visible || this.leaving)) {
|
|
38
46
|
e.preventDefault();
|
|
39
47
|
this.handleCancel(e);
|
|
40
48
|
}
|
|
41
49
|
};
|
|
42
|
-
/** 触发器键盘:Enter/Space 打开 */
|
|
43
50
|
handleTriggerKeydown = (e) => {
|
|
44
51
|
if (this.disabled)
|
|
45
52
|
return;
|
|
@@ -66,8 +73,20 @@ const Popconfirm = class {
|
|
|
66
73
|
this.hide();
|
|
67
74
|
this.el.dispatchEvent(new CustomEvent('hbCancel', { bubbles: true }));
|
|
68
75
|
};
|
|
76
|
+
get shouldRender() {
|
|
77
|
+
return this.visible || this.leaving;
|
|
78
|
+
}
|
|
69
79
|
render() {
|
|
70
|
-
return (h("div", { key: '
|
|
80
|
+
return (h("div", { key: '226619c96a2db6ccaebb74ad82945fa412a12ac1', class: "hb-popconfirm", onClick: this.show, onKeyDown: this.handleKeydown }, h("div", { key: 'fa33a01af716ef727ab4e1bb5ab936e6a9831baa', ref: (el) => {
|
|
81
|
+
this.triggerRef = el;
|
|
82
|
+
}, class: "hb-popconfirm__trigger", role: "button", tabindex: this.disabled ? -1 : 0, "aria-haspopup": "dialog", "aria-expanded": this.visible ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', onKeyDown: this.handleTriggerKeydown }, h("slot", { key: 'bb7ce2a124bcfdb45138d62e548954af35115f44' })), this.shouldRender && (h("div", { key: '706762852f8cfdcbc4afdb33ef7ea33263cb5e5f', ref: (el) => {
|
|
83
|
+
this.popupRef = el;
|
|
84
|
+
}, class: {
|
|
85
|
+
'hb-popconfirm__popup': true,
|
|
86
|
+
'hb-popconfirm__popup--leaving': this.leaving,
|
|
87
|
+
}, style: this.popupStyle, role: "dialog", "aria-live": "polite", "aria-labelledby": "hb-popconfirm__title" }, h("div", { key: '543120f1621f1d1d48c11d9c0981def93f48d052', class: "hb-popconfirm__main" }, h("span", { key: 'fb9289e719296fb6dd41180f9f04fbfcd00cb308', class: "hb-popconfirm__icon", "aria-hidden": "true" }, this.icon), h("span", { key: '337236e625fa0153dede32b2806e3bab936e322c', id: "hb-popconfirm__title", class: "hb-popconfirm__title" }, this.title)), h("div", { key: '00ec4666bbc3b3d313af8a02a0da73609eed5584', class: "hb-popconfirm__action" }, h("button", { key: 'ee50356e14f2c81f8aeab193f99530b77bc15f6c', type: "button", class: "hb-popconfirm__btn hb-popconfirm__btn--cancel", onClick: this.handleCancel }, this.cancelButtonText), h("button", { key: '719717991db63b57000c9d93ba2e254e8bf7045f', type: "button", ref: (el) => {
|
|
88
|
+
this.confirmBtnRef = el;
|
|
89
|
+
}, class: "hb-popconfirm__btn hb-popconfirm__btn--confirm", onClick: this.handleConfirm }, this.confirmButtonText))))));
|
|
71
90
|
}
|
|
72
91
|
};
|
|
73
92
|
Popconfirm.style = HbPopconfirmStyle0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"hb-popconfirm.entry.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,26NAA26N,CAAC;AACl8N,2BAAe,aAAa;;MCWf,UAAU;;;;;IAEb,KAAK,GAAW,UAAU,CAAC;IAC3B,iBAAiB,GAAW,IAAI,CAAC;IACjC,gBAAgB,GAAW,IAAI,CAAC;IAChC,SAAS,GAAc,KAAK,CAAC;IAC7B,QAAQ,GAAY,KAAK,CAAC;IAC1B,IAAI,GAAW,GAAG,CAAC;IAClB,OAAO,GAAY,KAAK,CAAC;IACzB,UAAU,GAA2B,EAAE,CAAC;IAEzC,UAAU,CAAe;IACzB,QAAQ,CAAkB;IAC1B,aAAa,CAAqB;IAElC,IAAI,GAAG;QACb,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,qBAAqB,CAAC;YACpB,IAAI,CAAC,cAAc,EAAE,CAAC;;YAEtB,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,CAAC;SAC7B,CAAC,CAAC;KACJ,CAAC;IACM,IAAI,GAAG,QAAQ,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC;;IAGvC,aAAa,GAAG,CAAC,CAAgB;QACvC,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,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,CAAC,YAAY,IAEzB,IAAI,CAAC,gBAAgB,CACf,EACT,+DACE,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,CAAC,EAAO,OAAO,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,EAAE,EAC9C,KAAK,EAAC,gDAAgD,EACtD,OAAO,EAAE,IAAI,CAAC,aAAa,IAE1B,IAAI,CAAC,iBAAiB,CAChB,CACL,CACF,CACP,CACG,EACN;KACH;;;;;;","names":[],"sources":["src/components/Popconfirm/popconfirm.css?tag=hb-popconfirm&encapsulation=shadow","src/components/Popconfirm/Popconfirm.tsx"],"sourcesContent":[":host { display: inline-block; }\n.hb-popconfirm__trigger { display: inline-block; cursor: pointer; }\n.hb-popconfirm__popup {\n position: fixed; background: var(--hb-color-bg-elevated);\n border-radius: var(--hb-border-radius-base); box-shadow: var(--hb-box-shadow);\n padding: var(--hb-spacing-md); min-width: 200px; animation: hb-popconfirm-fade 0.15s ease-out; pointer-events: auto;\n}\n.hb-popconfirm__main { display: flex; align-items: flex-start; gap: var(--hb-spacing-xs); margin-bottom: var(--hb-spacing-sm); }\n.hb-popconfirm__icon { color: var(--hb-color-warning); font-size: 16px; flex-shrink: 0; }\n.hb-popconfirm__title { font-size: var(--hb-font-size-sm); color: var(--hb-color-text); line-height: 1.5; }\n.hb-popconfirm__action { display: flex; justify-content: flex-end; gap: var(--hb-spacing-xs); }\n.hb-popconfirm__btn {\n padding: 4px 12px; font-size: var(--hb-font-size-xs); border-radius: var(--hb-border-radius-sm);\n cursor: pointer; border: 1px solid var(--hb-color-border); background: var(--hb-color-bg);\n transition: all var(--hb-transition-duration);\n}\n.hb-popconfirm__btn--cancel:hover { color: var(--hb-color-primary); border-color: var(--hb-color-primary); }\n.hb-popconfirm__btn--confirm { background: var(--hb-color-primary); color: #fff; border-color: var(--hb-color-primary); }\n.hb-popconfirm__btn--confirm:hover { background: var(--hb-color-primary-hover); }\n@keyframes hb-popconfirm-fade { from { opacity: 0; } to { opacity: 1; } }\n","import { Component, h, Prop, State, Element } from '@stencil/core';\nimport { computePosition, getNextZIndex, Placement } from '../../utils/popup-manager';\nimport { isActivationKey } from '../../utils/a11y';\n\n/**\n * Popconfirm 气泡确认框\n * 无障碍(对齐 antd / WAI-ARIA):\n * - 触发器 role=button + aria-haspopup=dialog + aria-expanded + aria-describedby\n * - 浮层 role=dialog + aria-live=polite(确认文屏幕阅读器实时播报)\n * - 键盘:trigger Enter/Space 打开;Esc=取消关闭;打开时自动聚焦确认按钮\n */\n@Component({ tag: 'hb-popconfirm', styleUrl: 'popconfirm.css', shadow: true })\nexport class Popconfirm {\n @Element() el: HTMLElement;\n @Prop() title: string = '确定执行此操作?';\n @Prop() confirmButtonText: string = '确定';\n @Prop() cancelButtonText: string = '取消';\n @Prop() placement: Placement = 'top';\n @Prop() disabled: boolean = false;\n @Prop() icon: string = '⚠';\n @State() visible: boolean = false;\n @State() popupStyle: Record<string, string> = {};\n\n private triggerRef?: HTMLElement;\n private popupRef?: HTMLDivElement;\n private confirmBtnRef?: HTMLButtonElement;\n\n private show = () => {\n if (this.disabled) return;\n this.visible = true;\n requestAnimationFrame(() => {\n this.updatePosition();\n // 打开后自动聚焦确认按钮(对齐 antd:Enter 直接确认)\n this.confirmBtnRef?.focus();\n });\n };\n private hide = () => { this.visible = false; };\n\n /** 键盘:Esc 取消关闭(Enter 由聚焦的确认按钮原生处理) */\n private handleKeydown = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && this.visible) {\n e.preventDefault();\n this.handleCancel(e);\n }\n };\n\n /** 触发器键盘:Enter/Space 打开 */\n private handleTriggerKeydown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n if (isActivationKey(e.key)) {\n e.preventDefault();\n this.show();\n }\n };\n\n private updatePosition() {\n if (!this.triggerRef || !this.popupRef) return;\n const rect = this.triggerRef.getBoundingClientRect();\n const { width: pw, height: ph } = this.popupRef.getBoundingClientRect();\n const pos = computePosition(rect, pw, ph, this.placement, 8);\n this.popupStyle = { top: `${pos.top}px`, left: `${pos.left}px`, zIndex: String(getNextZIndex()) };\n }\n\n private handleConfirm = (e: Event) => {\n e.stopPropagation();\n this.hide();\n this.el.dispatchEvent(new CustomEvent('hbConfirm', { bubbles: true }));\n };\n private handleCancel = (e: Event) => {\n e.stopPropagation();\n this.hide();\n this.el.dispatchEvent(new CustomEvent('hbCancel', { bubbles: true }));\n };\n\n render() {\n return (\n <div\n class=\"hb-popconfirm\"\n onClick={this.show}\n onKeyDown={this.handleKeydown}\n >\n <div\n ref={(el: any) => { this.triggerRef = el; }}\n class=\"hb-popconfirm__trigger\"\n role=\"button\"\n tabindex={this.disabled ? -1 : 0}\n aria-haspopup=\"dialog\"\n aria-expanded={this.visible ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onKeyDown={this.handleTriggerKeydown}\n >\n <slot />\n </div>\n {this.visible && (\n <div\n ref={(el: any) => { this.popupRef = el; }}\n class=\"hb-popconfirm__popup\"\n style={this.popupStyle}\n role=\"dialog\"\n aria-live=\"polite\"\n aria-labelledby=\"hb-popconfirm__title\"\n >\n <div class=\"hb-popconfirm__main\">\n <span class=\"hb-popconfirm__icon\" aria-hidden=\"true\">{this.icon}</span>\n <span id=\"hb-popconfirm__title\" class=\"hb-popconfirm__title\">{this.title}</span>\n </div>\n <div class=\"hb-popconfirm__action\">\n <button\n type=\"button\"\n class=\"hb-popconfirm__btn hb-popconfirm__btn--cancel\"\n onClick={this.handleCancel}\n >\n {this.cancelButtonText}\n </button>\n <button\n type=\"button\"\n ref={(el: any) => { this.confirmBtnRef = el; }}\n class=\"hb-popconfirm__btn hb-popconfirm__btn--confirm\"\n onClick={this.handleConfirm}\n >\n {this.confirmButtonText}\n </button>\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"hb-popconfirm.entry.js","mappings":";;;;;AAAA,MAAM,aAAa,GAAG,6oOAA6oO,CAAC;AACpqO,2BAAe,aAAa;;MCcf,UAAU;;;;;IAEb,KA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ACT,+DACE,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,CAAC,EAAO;gBACX,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;aACzB,EACD,KAAK,EAAC,gDAAgD,EACtD,OAAO,EAAE,IAAI,CAAC,aAAa,IAE1B,IAAI,CAAC,iBAAiB,CAChB,CACL,CACF,CACP,CACG,EACN;KACH;;;;;;","names":[],"sources":["src/components/Popconfirm/popconfirm.css?tag=hb-popconfirm&encapsulation=shadow","src/components/Popconfirm/Popconfirm.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n.hb-popconfirm__trigger {\n display: inline-block;\n cursor: pointer;\n}\n.hb-popconfirm__popup {\n position: fixed;\n background: var(--hb-color-bg-elevated);\n border-radius: var(--hb-border-radius-base);\n box-shadow: var(--hb-box-shadow);\n padding: var(--hb-spacing-md);\n min-width: 200px;\n animation: hb-popconfirm-fade 0.15s ease-out;\n pointer-events: auto;\n}\n.hb-popconfirm__main {\n display: flex;\n align-items: flex-start;\n gap: var(--hb-spacing-xs);\n margin-bottom: var(--hb-spacing-sm);\n}\n.hb-popconfirm__icon {\n color: var(--hb-color-warning);\n font-size: 16px;\n flex-shrink: 0;\n}\n.hb-popconfirm__title {\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n line-height: 1.5;\n}\n.hb-popconfirm__action {\n display: flex;\n justify-content: flex-end;\n gap: var(--hb-spacing-xs);\n}\n.hb-popconfirm__btn {\n padding: 4px 12px;\n font-size: var(--hb-font-size-xs);\n border-radius: var(--hb-border-radius-sm);\n cursor: pointer;\n border: 1px solid var(--hb-color-border);\n background: var(--hb-color-bg);\n transition: all var(--hb-transition-duration);\n}\n.hb-popconfirm__btn--cancel:hover {\n color: var(--hb-color-primary);\n border-color: var(--hb-color-primary);\n}\n.hb-popconfirm__btn--confirm {\n background: var(--hb-color-primary);\n color: #fff;\n border-color: var(--hb-color-primary);\n}\n.hb-popconfirm__btn--confirm:hover {\n background: var(--hb-color-primary-hover);\n}\n@keyframes hb-popconfirm-fade {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n/* 离场动画 */\n.hb-popconfirm__popup--leaving {\n animation: hb-popconfirm-fade-out 0.2s ease-in forwards;\n}\n@keyframes hb-popconfirm-fade-out {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.98);\n }\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\nimport { computePosition, getNextZIndex, Placement } from '../../utils/popup-manager';\nimport { isActivationKey } from '../../utils/a11y';\nimport { createLeaveScheduler } from '../../utils/transition';\n\n/**\n * Popconfirm 气泡确认框\n * 无障碍(对齐 antd / WAI-ARIA):\n * - 触发器 role=button + aria-haspopup=dialog + aria-expanded + aria-describedby\n * - 浮层 role=dialog + aria-live=polite(确认文屏幕阅读器实时播报)\n * - 键盘:trigger Enter/Space 打开;Esc=取消关闭;打开时自动聚焦确认按钮\n *\n * 进出场动画:用 leaving state 延迟卸载。\n */\n@Component({ tag: 'hb-popconfirm', styleUrl: 'popconfirm.css', shadow: true })\nexport class Popconfirm {\n @Element() el: HTMLElement;\n @Prop() title: string = '确定执行此操作?';\n @Prop() confirmButtonText: string = '确定';\n @Prop() cancelButtonText: string = '取消';\n @Prop() placement: Placement = 'top';\n @Prop() disabled: boolean = false;\n @Prop() icon: string = '⚠';\n @State() visible: boolean = false;\n @State() leaving: boolean = false;\n @State() popupStyle: Record<string, string> = {};\n\n private triggerRef?: HTMLElement;\n private popupRef?: HTMLDivElement;\n private confirmBtnRef?: HTMLButtonElement;\n private leave = createLeaveScheduler(\n () => this.leaving,\n v => (this.leaving = v),\n 200,\n );\n\n private show = () => {\n if (this.disabled) return;\n this.leave.cancel();\n this.visible = true;\n requestAnimationFrame(() => {\n this.updatePosition();\n this.confirmBtnRef?.focus();\n });\n };\n private hide = () => {\n this.visible = false;\n this.leave.start();\n };\n\n disconnectedCallback() {\n this.leave.dispose();\n }\n\n private handleKeydown = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && (this.visible || this.leaving)) {\n e.preventDefault();\n this.handleCancel(e);\n }\n };\n\n private handleTriggerKeydown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n if (isActivationKey(e.key)) {\n e.preventDefault();\n this.show();\n }\n };\n\n private updatePosition() {\n if (!this.triggerRef || !this.popupRef) return;\n const rect = this.triggerRef.getBoundingClientRect();\n const { width: pw, height: ph } = this.popupRef.getBoundingClientRect();\n const pos = computePosition(rect, pw, ph, this.placement, 8);\n this.popupStyle = { top: `${pos.top}px`, left: `${pos.left}px`, zIndex: String(getNextZIndex()) };\n }\n\n private handleConfirm = (e: Event) => {\n e.stopPropagation();\n this.hide();\n this.el.dispatchEvent(new CustomEvent('hbConfirm', { bubbles: true }));\n };\n private handleCancel = (e: Event) => {\n e.stopPropagation();\n this.hide();\n this.el.dispatchEvent(new CustomEvent('hbCancel', { bubbles: true }));\n };\n\n private get shouldRender(): boolean {\n return this.visible || this.leaving;\n }\n\n render() {\n return (\n <div class=\"hb-popconfirm\" onClick={this.show} onKeyDown={this.handleKeydown}>\n <div\n ref={(el: any) => {\n this.triggerRef = el;\n }}\n class=\"hb-popconfirm__trigger\"\n role=\"button\"\n tabindex={this.disabled ? -1 : 0}\n aria-haspopup=\"dialog\"\n aria-expanded={this.visible ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onKeyDown={this.handleTriggerKeydown}\n >\n <slot />\n </div>\n {this.shouldRender && (\n <div\n ref={(el: any) => {\n this.popupRef = el;\n }}\n class={{\n 'hb-popconfirm__popup': true,\n 'hb-popconfirm__popup--leaving': this.leaving,\n }}\n style={this.popupStyle}\n role=\"dialog\"\n aria-live=\"polite\"\n aria-labelledby=\"hb-popconfirm__title\"\n >\n <div class=\"hb-popconfirm__main\">\n <span class=\"hb-popconfirm__icon\" aria-hidden=\"true\">\n {this.icon}\n </span>\n <span id=\"hb-popconfirm__title\" class=\"hb-popconfirm__title\">\n {this.title}\n </span>\n </div>\n <div class=\"hb-popconfirm__action\">\n <button type=\"button\" class=\"hb-popconfirm__btn hb-popconfirm__btn--cancel\" onClick={this.handleCancel}>\n {this.cancelButtonText}\n </button>\n <button\n type=\"button\"\n ref={(el: any) => {\n this.confirmBtnRef = el;\n }}\n class=\"hb-popconfirm__btn hb-popconfirm__btn--confirm\"\n onClick={this.handleConfirm}\n >\n {this.confirmButtonText}\n </button>\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h } from './index-fdf7135e.js';
|
|
2
2
|
import { c as computePosition, g as getNextZIndex } from './popup-manager-128cc685.js';
|
|
3
|
-
import { i as isActivationKey } from './a11y-
|
|
3
|
+
import { i as isActivationKey } from './a11y-e4cde5b0.js';
|
|
4
|
+
import { c as createLeaveScheduler } from './transition-4295d789.js';
|
|
4
5
|
|
|
5
|
-
const popoverCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;.hb-popover__trigger,:host{display:inline-block}.hb-popover__popup{animation:hb-popover-fade .15s ease-out;background:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);padding:var(--hb-spacing-sm)0;pointer-events:auto;position:fixed}.hb-popover__title{border-bottom:1px solid var(--hb-color-border-secondary);font-size:var(--hb-font-size-sm);font-weight:600;padding:var(--hb-spacing-xs)var(--hb-spacing-md)}.hb-popover__body{color:var(--hb-color-text);font-size:var(--hb-font-size-sm);padding:var(--hb-spacing-sm)var(--hb-spacing-md)}@keyframes hb-popover-fade{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
6
|
+
const popoverCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;.hb-popover__trigger,:host{display:inline-block}.hb-popover__popup{animation:hb-popover-fade .15s ease-out;background:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);padding:var(--hb-spacing-sm)0;pointer-events:auto;position:fixed}.hb-popover__title{border-bottom:1px solid var(--hb-color-border-secondary);font-size:var(--hb-font-size-sm);font-weight:600;padding:var(--hb-spacing-xs)var(--hb-spacing-md)}.hb-popover__body{color:var(--hb-color-text);font-size:var(--hb-font-size-sm);padding:var(--hb-spacing-sm)var(--hb-spacing-md)}@keyframes hb-popover-fade{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.hb-popover__popup--leaving{animation:hb-popover-fade-out .15s ease-in forwards}@keyframes hb-popover-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.98)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
6
7
|
const HbPopoverStyle0 = popoverCss;
|
|
7
8
|
|
|
8
9
|
const Popover = class {
|
|
@@ -10,24 +11,28 @@ const Popover = class {
|
|
|
10
11
|
registerInstance(this, hostRef);
|
|
11
12
|
}
|
|
12
13
|
get el() { return getElement(this); }
|
|
13
|
-
// 注意:使用默认值使其成为 required string,避免与 HTMLElement.title(string)
|
|
14
|
-
// 的可选类型冲突;同时保留 Ant Design 兼容的 `title` API。
|
|
15
14
|
title = '';
|
|
16
15
|
width = '240px';
|
|
17
16
|
placement = 'bottom';
|
|
18
17
|
trigger = 'hover';
|
|
19
18
|
disabled = false;
|
|
20
19
|
visible = false;
|
|
20
|
+
leaving = false;
|
|
21
21
|
popupStyle = {};
|
|
22
22
|
triggerRef;
|
|
23
23
|
popupRef;
|
|
24
|
+
leave = createLeaveScheduler(() => this.leaving, v => (this.leaving = v), 150);
|
|
24
25
|
show = () => {
|
|
25
26
|
if (!this.disabled) {
|
|
27
|
+
this.leave.cancel();
|
|
26
28
|
this.visible = true;
|
|
27
29
|
requestAnimationFrame(() => this.updatePosition());
|
|
28
30
|
}
|
|
29
31
|
};
|
|
30
|
-
hide = () => {
|
|
32
|
+
hide = () => {
|
|
33
|
+
this.visible = false;
|
|
34
|
+
this.leave.start();
|
|
35
|
+
};
|
|
31
36
|
toggle = () => {
|
|
32
37
|
if (this.visible) {
|
|
33
38
|
this.hide();
|
|
@@ -36,16 +41,17 @@ const Popover = class {
|
|
|
36
41
|
this.show();
|
|
37
42
|
}
|
|
38
43
|
};
|
|
39
|
-
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
this.leave.dispose();
|
|
46
|
+
}
|
|
40
47
|
handleKeydown = (e) => {
|
|
41
48
|
if (this.disabled)
|
|
42
49
|
return;
|
|
43
|
-
if (e.key === 'Escape' && this.visible) {
|
|
50
|
+
if (e.key === 'Escape' && (this.visible || this.leaving)) {
|
|
44
51
|
e.preventDefault();
|
|
45
52
|
this.hide();
|
|
46
53
|
return;
|
|
47
54
|
}
|
|
48
|
-
// click 触发模式才允许键盘打开;hover 模式 focus 时已由 onFocus 展开
|
|
49
55
|
if (this.trigger === 'click' && isActivationKey(e.key)) {
|
|
50
56
|
e.preventDefault();
|
|
51
57
|
this.toggle();
|
|
@@ -59,13 +65,19 @@ const Popover = class {
|
|
|
59
65
|
const pos = computePosition(rect, pw, ph, this.placement, 8);
|
|
60
66
|
this.popupStyle = { top: `${pos.top}px`, left: `${pos.left}px`, zIndex: String(getNextZIndex()) };
|
|
61
67
|
}
|
|
68
|
+
get shouldRender() {
|
|
69
|
+
return this.visible || this.leaving;
|
|
70
|
+
}
|
|
62
71
|
render() {
|
|
63
|
-
const events = this.trigger === 'hover'
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
const events = this.trigger === 'hover' ? { onMouseEnter: this.show, onMouseLeave: this.hide } : { onClick: this.toggle };
|
|
73
|
+
return (h("div", { key: 'e9007c4ef9ebb2286c0b6fa5673137b14be6db86', class: "hb-popover", ...events, onKeyDown: this.handleKeydown }, h("div", { key: '6b7eac4394ed810048ef73c3ab818f6129e5e6d0', ref: (el) => {
|
|
74
|
+
this.triggerRef = el;
|
|
75
|
+
}, class: "hb-popover__trigger", role: "button", tabindex: this.disabled ? -1 : 0, "aria-haspopup": "dialog", "aria-expanded": this.visible ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', onFocus: this.trigger === 'hover' ? this.show : undefined, onBlur: this.trigger === 'hover' ? this.hide : undefined }, h("slot", { key: '5c0786412affbc4fd67471503b5fdd034f1d90ea' })), this.shouldRender && (h("div", { key: 'f1c0edf1cdbc1af5b838c08717305dbf28e31b0e', ref: (el) => {
|
|
76
|
+
this.popupRef = el;
|
|
77
|
+
}, class: {
|
|
78
|
+
'hb-popover__popup': true,
|
|
79
|
+
'hb-popover__popup--leaving': this.leaving,
|
|
80
|
+
}, style: { ...this.popupStyle, width: this.width }, role: "dialog", "aria-labelledby": this.title ? 'hb-popover__title' : undefined, onMouseEnter: () => this.trigger === 'hover' && this.show(), onMouseLeave: () => this.trigger === 'hover' && this.hide() }, this.title && (h("div", { key: 'd23367facd21d47a512bc791193d44b35a8c7025', id: "hb-popover__title", class: "hb-popover__title" }, this.title)), h("div", { key: '491a6babd5fef0ac9013e999a8a449e1216e9f00', class: "hb-popover__body" }, h("slot", { key: '15a925de9bb5c0e4f3c66f466ef2e744d7563a50', name: "content" }))))));
|
|
69
81
|
}
|
|
70
82
|
};
|
|
71
83
|
Popover.style = HbPopoverStyle0;
|
|
@@ -1 +1 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,CAAC,KAAK,CACP,CACP,EACD,4DAAK,KAAK,EAAC,kBAAkB,IAC3B,6DAAM,IAAI,EAAC,SAAS,GAAG,CACnB,CACF,CACP,CACG,EACN;KACH;;;;;;","names":[],"sources":["src/components/Popover/popover.css?tag=hb-popover&encapsulation=shadow","src/components/Popover/Popover.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n.hb-popover__trigger {\n display: inline-block;\n}\n.hb-popover__popup {\n position: fixed;\n background: var(--hb-color-bg-elevated);\n border-radius: var(--hb-border-radius-base);\n box-shadow: var(--hb-box-shadow);\n padding: var(--hb-spacing-sm) 0;\n animation: hb-popover-fade 0.15s ease-out;\n pointer-events: auto;\n}\n.hb-popover__title {\n padding: var(--hb-spacing-xs) var(--hb-spacing-md);\n font-weight: 600;\n font-size: var(--hb-font-size-sm);\n border-bottom: 1px solid var(--hb-color-border-secondary);\n}\n.hb-popover__body {\n padding: var(--hb-spacing-sm) var(--hb-spacing-md);\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n}\n@keyframes hb-popover-fade {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n/* 离场动画:播完后由 shouldRender=false 卸载 */\n.hb-popover__popup--leaving {\n animation: hb-popover-fade-out 0.15s ease-in forwards;\n}\n@keyframes hb-popover-fade-out {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.98);\n }\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\nimport { computePosition, getNextZIndex, Placement } from '../../utils/popup-manager';\nimport { isActivationKey } from '../../utils/a11y';\nimport { createLeaveScheduler } from '../../utils/transition';\n\n/**\n * Popover 气泡卡片\n * 无障碍(对齐 antd / WAI-ARIA):\n * - 触发器 role=button + aria-haspopup=dialog + aria-expanded\n * - 浮层 role=dialog + aria-labelledby(title)\n * - 键盘:trigger 上 Enter/Space 打开/关闭;Esc 关闭\n *\n * 进出场动画:用 leaving state 延迟卸载,让 fade-out 有机会播放。\n */\n@Component({ tag: 'hb-popover', styleUrl: 'popover.css', shadow: true })\nexport class Popover {\n @Element() el: HTMLElement;\n @Prop() title: string = '';\n @Prop() width: string = '240px';\n @Prop() placement: Placement = 'bottom';\n @Prop() trigger: 'hover' | 'click' = 'hover';\n @Prop() disabled: boolean = false;\n @State() visible: boolean = false;\n @State() leaving: boolean = false;\n @State() popupStyle: Record<string, string> = {};\n\n private triggerRef?: HTMLElement;\n private popupRef?: HTMLDivElement;\n private leave = createLeaveScheduler(\n () => this.leaving,\n v => (this.leaving = v),\n 150,\n );\n\n private show = () => {\n if (!this.disabled) {\n this.leave.cancel();\n this.visible = true;\n requestAnimationFrame(() => this.updatePosition());\n }\n };\n private hide = () => {\n this.visible = false;\n this.leave.start();\n };\n private toggle = () => {\n if (this.visible) {\n this.hide();\n } else {\n this.show();\n }\n };\n\n disconnectedCallback() {\n this.leave.dispose();\n }\n\n private handleKeydown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n if (e.key === 'Escape' && (this.visible || this.leaving)) {\n e.preventDefault();\n this.hide();\n return;\n }\n if (this.trigger === 'click' && isActivationKey(e.key)) {\n e.preventDefault();\n this.toggle();\n }\n };\n\n private updatePosition() {\n if (!this.triggerRef || !this.popupRef) return;\n const rect = this.triggerRef.getBoundingClientRect();\n const { width: pw, height: ph } = this.popupRef.getBoundingClientRect();\n const pos = computePosition(rect, pw, ph, this.placement, 8);\n this.popupStyle = { top: `${pos.top}px`, left: `${pos.left}px`, zIndex: String(getNextZIndex()) };\n }\n\n private get shouldRender(): boolean {\n return this.visible || this.leaving;\n }\n\n render() {\n const events = this.trigger === 'hover' ? { onMouseEnter: this.show, onMouseLeave: this.hide } : { onClick: this.toggle };\n\n return (\n <div class=\"hb-popover\" {...events} onKeyDown={this.handleKeydown}>\n <div\n ref={(el: any) => {\n this.triggerRef = el;\n }}\n class=\"hb-popover__trigger\"\n role=\"button\"\n tabindex={this.disabled ? -1 : 0}\n aria-haspopup=\"dialog\"\n aria-expanded={this.visible ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onFocus={this.trigger === 'hover' ? this.show : undefined}\n onBlur={this.trigger === 'hover' ? this.hide : undefined}\n >\n <slot />\n </div>\n {this.shouldRender && (\n <div\n ref={(el: any) => {\n this.popupRef = el;\n }}\n class={{\n 'hb-popover__popup': true,\n 'hb-popover__popup--leaving': this.leaving,\n }}\n style={{ ...this.popupStyle, width: this.width }}\n role=\"dialog\"\n aria-labelledby={this.title ? 'hb-popover__title' : undefined}\n onMouseEnter={() => this.trigger === 'hover' && this.show()}\n onMouseLeave={() => this.trigger === 'hover' && this.hide()}\n >\n {this.title && (\n <div id=\"hb-popover__title\" class=\"hb-popover__title\">\n {this.title}\n </div>\n )}\n <div class=\"hb-popover__body\">\n <slot name=\"content\" />\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -25,7 +25,7 @@ const Progress = class {
|
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
27
|
const clampedPct = Math.max(0, Math.min(100, this.percentage));
|
|
28
|
-
return (h("div", { key: '
|
|
28
|
+
return (h("div", { key: '579e6c39f03cbc18f54cfc0024ed4d7ea4ed4939', class: "hb-progress" }, h("div", { key: '66da6e37c2d800a81930dc7fd6f262bcda03a5cf', class: "hb-progress__bar", style: { height: `${this.strokeWidth}px` } }, h("div", { key: '86b459334a9353120893300497185be957b59a38', class: "hb-progress__bar-inner", style: { width: `${clampedPct}%`, backgroundColor: this.barColor } })), this.showText && h("span", { key: '2c8bbf3174b230e3c23d90a50dbc088614943f34', class: "hb-progress__text" }, clampedPct, "%")));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
Progress.style = HbProgressStyle0;
|
|
@@ -53,6 +53,11 @@ const Radio = class {
|
|
|
53
53
|
*/
|
|
54
54
|
hbChange;
|
|
55
55
|
isChecked = false;
|
|
56
|
+
/**
|
|
57
|
+
* P7:实例级稳定 inputId,在类字段初始化一次。
|
|
58
|
+
* 修复前每次 render 用 Math.random() 生成新 id,破坏 SSR 水合与外部 getElementById 缓存。
|
|
59
|
+
*/
|
|
60
|
+
stableInputId = `hb-radio-${Math.random().toString(36).slice(2, 11)}`;
|
|
56
61
|
handleValueChange() {
|
|
57
62
|
this.updateChecked();
|
|
58
63
|
}
|
|
@@ -93,14 +98,14 @@ const Radio = class {
|
|
|
93
98
|
}
|
|
94
99
|
};
|
|
95
100
|
render() {
|
|
96
|
-
const inputId = this.radioId ||
|
|
97
|
-
return (h("label", { key: '
|
|
101
|
+
const inputId = this.radioId || this.stableInputId;
|
|
102
|
+
return (h("label", { key: 'fce88ccf09122606b1a02d20b6c68303087853a1', class: {
|
|
98
103
|
'hb-radio': true,
|
|
99
104
|
'hb-radio--checked': this.isChecked,
|
|
100
105
|
'hb-radio--disabled': this.disabled,
|
|
101
106
|
'hb-radio--border': this.border,
|
|
102
107
|
[`hb-radio--${this.size}`]: true,
|
|
103
|
-
} }, h("span", { key: '
|
|
108
|
+
} }, h("span", { key: '21ff8b3d4d2e3e4dda04f18b34c0b2264c4f5679', class: "hb-radio__input" }, h("input", { key: '398035c739f0b291a8daef77f535a26c0fbdf171', type: "radio", id: inputId, name: this.name, checked: this.isChecked, disabled: this.disabled, value: this.value, onChange: this.handleChange, class: "hb-radio__original" }), h("span", { key: '932ea7075b17621ad928fe8f72a5dacb10080d23', class: "hb-radio__inner" })), (this.label || this.value !== undefined) && (h("span", { key: '1859263be207025088188ccf7d012b6532fc0f94', class: "hb-radio__label" }, h("slot", { key: '7364a2f3a031c55caa445b0bca2748f2f74598b0' }, this.label || this.value)))));
|
|
104
109
|
}
|
|
105
110
|
static get watchers() { return {
|
|
106
111
|
"modelValue": ["handleValueChange"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"hb-radio.entry.js","mappings":";;AAAA,MAAM,QAAQ,GAAG,0yQAA0yQ,CAAC;AAC5zQ,sBAAe,QAAQ;;MCUV,KAAK;;;;;;;;;I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K,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,KAAK,EAAC,oBAAoB,GAC1B,EACF,6DAAM,KAAK,EAAC,iBAAiB,GAAQ,CAChC,EACN,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,MACtC,6DAAM,KAAK,EAAC,iBAAiB,IAC3B,+DAAO,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAQ,CAClC,CACR,CACK,EACR;KACH;;;;;;;;;;;","names":[],"sources":["src/components/Radio/radio.css?tag=hb-radio&encapsulation=shadow","src/components/Radio/Radio.tsx"],"sourcesContent":[":host {\n display: inline-block;\n --hb-radio-font-size: 14px;\n --hb-radio-color: var(--hb-color-primary);\n --hb-radio-border-color: var(--hb-border-color, #dcdfe6);\n --hb-radio-text-color: var(--hb-color-text-regular, #606266);\n --hb-radio-disabled-color: var(--hb-color-text-disabled, #c0c4cc);\n}\n\n.hb-radio {\n color: var(--hb-radio-text-color);\n font-weight: 500;\n font-size: var(--hb-radio-font-size);\n position: relative;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n user-select: none;\n margin-right: 30px;\n}\n\n.hb-radio:last-child {\n margin-right: 0;\n}\n\n.hb-radio__input {\n white-space: nowrap;\n cursor: pointer;\n outline: none;\n display: inline-flex;\n position: relative;\n vertical-align: middle;\n}\n\n.hb-radio__original {\n opacity: 0;\n outline: none;\n position: absolute;\n margin: 0;\n width: 0;\n height: 0;\n z-index: -1;\n}\n\n.hb-radio__inner {\n border: 1px solid var(--hb-radio-border-color);\n border-radius: 50%;\n width: 14px;\n height: 14px;\n background-color: var(--hb-color-white, #ffffff);\n position: relative;\n cursor: pointer;\n display: inline-block;\n box-sizing: border-box;\n transition: all 0.2s;\n}\n\n.hb-radio__inner::after {\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background-color: var(--hb-color-white, #ffffff);\n content: '';\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%) scale(0);\n transition: transform 0.15s ease-in;\n}\n\n.hb-radio--checked .hb-radio__inner {\n border-color: var(--hb-radio-color);\n background: var(--hb-radio-color);\n}\n\n.hb-radio--checked .hb-radio__inner::after {\n transform: translate(-50%, -50%) scale(1);\n}\n\n.hb-radio__label {\n padding-left: 8px;\n line-height: 1;\n font-size: var(--hb-radio-font-size);\n}\n\n.hb-radio--disabled {\n cursor: not-allowed;\n}\n\n.hb-radio--disabled .hb-radio__inner {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n border-color: var(--hb-radio-border-color);\n cursor: not-allowed;\n}\n\n.hb-radio--disabled .hb-radio__label {\n color: var(--hb-radio-disabled-color);\n cursor: not-allowed;\n}\n\n.hb-radio--border {\n padding: 9px 15px 9px 9px;\n border-radius: 4px;\n border: 1px solid var(--hb-radio-border-color);\n box-sizing: border-box;\n white-space: nowrap;\n}\n\n.hb-radio--border.hb-radio--checked {\n border-color: var(--hb-radio-color);\n}\n\n.hb-radio--border.hb-radio--disabled {\n border-color: var(--hb-radio-border-color);\n cursor: not-allowed;\n}\n\n.hb-radio--small {\n font-size: 12px;\n}\n\n.hb-radio--small .hb-radio__inner {\n width: 12px;\n height: 12px;\n}\n\n.hb-radio--small .hb-radio__inner::after {\n width: 3px;\n height: 3px;\n}\n\n.hb-radio--small .hb-radio__label {\n padding-left: 6px;\n}\n\n.hb-radio--large {\n font-size: 16px;\n}\n\n.hb-radio--large .hb-radio__inner {\n width: 16px;\n height: 16px;\n}\n\n.hb-radio--large .hb-radio__inner::after {\n width: 5px;\n height: 5px;\n}\n\n.hb-radio--large .hb-radio__label {\n padding-left: 10px;\n}\n\n.hb-radio:hover:not(.hb-radio--disabled) .hb-radio__inner {\n border-color: var(--hb-radio-color);\n}\n\n","import { Component, h, Prop, Event, EventEmitter, State, Watch, Element } from '@stencil/core';\n\n/**\n * Radio 单选框组件\n * 在一组备选项中进行单选\n */\n@Component({\n tag: 'hb-radio',\n styleUrl: 'radio.css',\n shadow: true,\n})\nexport class Radio {\n @Element() el: HTMLElement;\n\n /**\n * 绑定值\n */\n @Prop({ mutable: true }) modelValue?: string | number;\n\n /**\n * 单选框的值\n */\n @Prop() value?: string | number;\n\n /**\n * 是否禁用\n * @default false\n */\n @Prop() disabled: boolean = false;\n\n /**\n * 是否选中\n * @default false\n */\n @Prop() checked: boolean = false;\n\n /**\n * 原生 name 属性\n */\n @Prop() name?: string;\n\n /**\n * 原生 id 属性\n */\n @Prop() radioId?: string;\n\n /**\n * 文本标签\n */\n @Prop() label?: string;\n\n /**\n * 是否显示边框\n * @default false\n */\n @Prop() border: boolean = false;\n\n /**\n * 尺寸\n */\n @Prop() size: 'large' | 'default' | 'small' = 'default';\n\n /**\n * 值改变事件\n */\n @Event() hbChange: EventEmitter<string | number | boolean>;\n\n @State() isChecked: boolean = false;\n\n /**\n * P7:实例级稳定 inputId,在类字段初始化一次。\n * 修复前每次 render 用 Math.random() 生成新 id,破坏 SSR 水合与外部 getElementById 缓存。\n */\n private stableInputId = `hb-radio-${Math.random().toString(36).slice(2, 11)}`;\n\n @Watch('modelValue')\n @Watch('checked')\n @Watch('value')\n handleValueChange() {\n this.updateChecked();\n }\n\n componentDidLoad() {\n this.updateChecked();\n }\n\n private updateChecked() {\n if (this.value !== undefined) {\n // 在 radio group 中\n this.isChecked = this.modelValue === this.value;\n } else {\n // 单个 radio\n this.isChecked = this.checked;\n }\n }\n\n private handleChange = (e: Event) => {\n const target = e.target as HTMLInputElement;\n\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n if (this.value !== undefined) {\n // 在 radio group 中\n this.modelValue = this.value;\n this.isChecked = true;\n this.hbChange.emit(this.value);\n } else {\n // 单个 radio\n this.isChecked = target.checked;\n if (target.checked && this.value !== undefined) {\n this.hbChange.emit(this.value);\n } else {\n this.hbChange.emit(target.checked);\n }\n }\n };\n\n render() {\n const inputId = this.radioId || this.stableInputId;\n\n return (\n <label\n class={{\n 'hb-radio': true,\n 'hb-radio--checked': this.isChecked,\n 'hb-radio--disabled': this.disabled,\n 'hb-radio--border': this.border,\n [`hb-radio--${this.size}`]: true,\n }}\n >\n <span class=\"hb-radio__input\">\n <input\n type=\"radio\"\n id={inputId}\n name={this.name}\n checked={this.isChecked}\n disabled={this.disabled}\n value={this.value}\n onChange={this.handleChange}\n class=\"hb-radio__original\"\n />\n <span class=\"hb-radio__inner\"></span>\n </span>\n {(this.label || this.value !== undefined) && (\n <span class=\"hb-radio__label\">\n <slot>{this.label || this.value}</slot>\n </span>\n )}\n </label>\n );\n }\n}\n"],"version":3}
|
|
@@ -142,7 +142,7 @@ const Rate = class {
|
|
|
142
142
|
render() {
|
|
143
143
|
const displayValue = this.getDisplayValue();
|
|
144
144
|
const stars = Array.from({ length: this.max }, (_, i) => i + 1);
|
|
145
|
-
return (h("div", { key: '
|
|
145
|
+
return (h("div", { key: '733a00e30b05ce6e5e8e5d798d558babc97fb477', class: "hb-rate", role: "slider", tabindex: this.disabled || this.readonly ? -1 : 0, "aria-valuemin": 0, "aria-valuemax": this.max, "aria-valuenow": this.currentValue, "aria-valuetext": this.scoreTemplate ? this.getScoreText() : `${this.currentValue} 分`, "aria-orientation": "horizontal", "aria-disabled": this.disabled ? 'true' : 'false', "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.handleKeydown }, stars.map(value => {
|
|
146
146
|
const isFull = displayValue >= value;
|
|
147
147
|
const isHalf = this.allowHalf && displayValue >= value - 0.5 && displayValue < value;
|
|
148
148
|
const isActive = isFull || isHalf;
|
|
@@ -153,11 +153,11 @@ const Rate = class {
|
|
|
153
153
|
}, onMouseEnter: () => this.handleMouseEnter(value), onMouseLeave: this.handleMouseLeave, onClick: () => this.handleClick(value, false) }, this.allowHalf && (h("span", { class: {
|
|
154
154
|
'hb-rate__half': true,
|
|
155
155
|
'hb-rate__half--active': isHalf,
|
|
156
|
-
}, onClick:
|
|
156
|
+
}, onClick: e => {
|
|
157
157
|
e.stopPropagation();
|
|
158
158
|
this.handleClick(value, true);
|
|
159
159
|
} }, "\u2605")), h("span", { class: "hb-rate__icon", "aria-hidden": "true" }, "\u2605")));
|
|
160
|
-
}), this.showScore &&
|
|
160
|
+
}), this.showScore && h("span", { key: '481d7c8434c369991751e9573423a3ec4dd043e9', class: "hb-rate__text" }, this.getScoreText()), this.showText && this.getText() && h("span", { key: '0d63eec55abc38ef6a9819db65b22bbcd93613c9', class: "hb-rate__text" }, this.getText())));
|
|
161
161
|
}
|
|
162
162
|
static get watchers() { return {
|
|
163
163
|
"modelValue": ["handleValueChange"]
|