huibo-ui 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-904747ff.js → date-helpers-c05ef385.js} +10 -17
- package/dist/cjs/date-helpers-c05ef385.js.map +1 -0
- package/dist/cjs/hb-affix.cjs.entry.js +1 -1
- 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-aside.cjs.entry.js +1 -1
- package/dist/cjs/hb-avatar.cjs.entry.js +1 -1
- package/dist/cjs/hb-backtop.cjs.entry.js +2 -2
- package/dist/cjs/hb-badge.cjs.entry.js +1 -1
- package/dist/cjs/hb-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/hb-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/hb-button.cjs.entry.js +2 -2
- package/dist/cjs/hb-calendar.cjs.entry.js +78 -10
- package/dist/cjs/hb-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-card.cjs.entry.js +1 -1
- package/dist/cjs/hb-cascader.cjs.entry.js +306 -146
- 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-panel.cjs.entry.js +2 -2
- package/dist/cjs/hb-color-picker.cjs.entry.js +108 -28
- package/dist/cjs/hb-color-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-config-provider.cjs.entry.js +1 -1
- package/dist/cjs/hb-container.cjs.entry.js +2 -2
- package/dist/cjs/hb-date-picker-pane.cjs.entry.js +2 -2
- package/dist/cjs/hb-date-picker.cjs.entry.js +90 -9
- package/dist/cjs/hb-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-date-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/hb-date-time-picker.cjs.entry.js +3 -3
- package/dist/cjs/hb-descriptions.cjs.entry.js +2 -2
- 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-divider.cjs.entry.js +2 -2
- 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 +91 -11
- 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-footer.cjs.entry.js +1 -1
- package/dist/cjs/hb-form-item.cjs.entry.js +61 -9
- package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-form.cjs.entry.js +13 -8
- package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-header.cjs.entry.js +1 -1
- package/dist/cjs/hb-image-preview.cjs.entry.js +13 -9
- 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 +40 -3
- package/dist/cjs/hb-input.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-layout.cjs.entry.js +36 -14
- 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-main.cjs.entry.js +1 -1
- 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 +3 -3
- package/dist/cjs/hb-menu.cjs.entry.js.map +1 -1
- 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-notification.cjs.entry.js +2 -2
- package/dist/cjs/hb-page-header.cjs.entry.js +1 -1
- package/dist/cjs/hb-pagination.cjs.entry.js +24 -8
- package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popconfirm.cjs.entry.js +57 -8
- package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popover.cjs.entry.js +37 -5
- 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 +46 -4
- package/dist/cjs/hb-rate.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-result.cjs.entry.js +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 +50 -5
- package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-select.cjs.entry.js +64 -16
- package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-slider.cjs.entry.js +186 -23
- 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 +30 -9
- 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 +9 -4
- 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 +26 -17
- 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-timeline.cjs.entry.js +1 -1
- package/dist/cjs/hb-tooltip.cjs.entry.js +43 -6
- package/dist/cjs/hb-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-transfer.cjs.entry.js +2 -2
- package/dist/cjs/hb-tree-select.cjs.entry.js +215 -23
- 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-upload.cjs.entry.js +3 -3
- 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/collection-manifest.json +3 -3
- package/dist/collection/components/Affix/Affix.js +1 -1
- package/dist/collection/components/Alert/Alert.js +2 -1
- package/dist/collection/components/Alert/Alert.js.map +1 -1
- package/dist/collection/components/Avatar/Avatar.js +1 -1
- package/dist/collection/components/Backtop/Backtop.js +2 -2
- package/dist/collection/components/Badge/Badge.js +1 -1
- package/dist/collection/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/collection/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/collection/components/Button/Button.js +2 -2
- package/dist/collection/components/Calendar/Calendar.js +84 -10
- package/dist/collection/components/Calendar/Calendar.js.map +1 -1
- package/dist/collection/components/Calendar/calendar.css +16 -0
- package/dist/collection/components/Card/Card.js +1 -1
- package/dist/collection/components/Cascader/Cascader.js +410 -194
- package/dist/collection/components/Cascader/Cascader.js.map +1 -1
- package/dist/collection/components/Cascader/cascader.css +170 -16
- 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 +109 -28
- package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/collection/components/ColorPicker/color-picker.css +21 -3
- package/dist/collection/components/ColorPickerPanel/ColorPickerPanel.js +2 -2
- package/dist/collection/components/ConfigProvider/ConfigProvider.js +1 -1
- package/dist/collection/components/Container/Aside.js +1 -1
- package/dist/collection/components/Container/Container.js +2 -2
- package/dist/collection/components/Container/Footer.js +1 -1
- package/dist/collection/components/Container/Header.js +1 -1
- package/dist/collection/components/Container/Main.js +1 -1
- package/dist/collection/components/DatePicker/DatePicker.js +94 -12
- package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/collection/components/DatePicker/date-picker.css +63 -2
- package/dist/collection/components/DatePickerPane/DatePickerPane.js +1 -1
- package/dist/collection/components/DateRangePicker/DateRangePicker.js +2 -2
- package/dist/collection/components/DateTimePicker/DateTimePicker.js +2 -2
- package/dist/collection/components/Descriptions/Descriptions.js +1 -1
- package/dist/collection/components/Descriptions/descriptions.css +52 -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/Divider/Divider.js +2 -2
- 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 +103 -12
- package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/collection/components/Dropdown/dropdown.css +26 -3
- 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 +62 -10
- package/dist/collection/components/Form/FormItem.js.map +1 -1
- package/dist/collection/components/Form/form-item.css +57 -6
- package/dist/collection/components/Form/form.css +1 -0
- 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 +13 -9
- package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
- package/dist/collection/components/Input/Input.js +39 -2
- package/dist/collection/components/Input/Input.js.map +1 -1
- package/dist/collection/components/Input/input.css +22 -4
- 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 +87 -34
- 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 +1732 -71
- 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/Menu/menu.css +25 -0
- package/dist/collection/components/Message/Message.js +13 -4
- package/dist/collection/components/Message/Message.js.map +1 -1
- package/dist/collection/components/Notification/Notification.js +2 -2
- package/dist/collection/components/PageHeader/PageHeader.js +1 -1
- package/dist/collection/components/Pagination/Pagination.js +26 -7
- package/dist/collection/components/Pagination/Pagination.js.map +1 -1
- package/dist/collection/components/Pagination/pagination.css +23 -0
- package/dist/collection/components/Popconfirm/Popconfirm.js +66 -7
- 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 +46 -4
- 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 +46 -4
- package/dist/collection/components/Rate/Rate.js.map +1 -1
- package/dist/collection/components/Result/Result.js +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 +65 -6
- package/dist/collection/components/Segmented/Segmented.js.map +1 -1
- package/dist/collection/components/Select/Select.js +63 -15
- package/dist/collection/components/Select/Select.js.map +1 -1
- package/dist/collection/components/Select/select.css +50 -5
- package/dist/collection/components/Slider/Slider.js +218 -24
- package/dist/collection/components/Slider/Slider.js.map +1 -1
- package/dist/collection/components/Slider/slider.css +57 -7
- 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 +35 -8
- package/dist/collection/components/Steps/Steps.js.map +1 -1
- package/dist/collection/components/Switch/Switch.js +8 -3
- package/dist/collection/components/Switch/Switch.js.map +1 -1
- package/dist/collection/components/Switch/switch.css +47 -1
- 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 +26 -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/Timeline/Timeline.js +1 -1
- package/dist/collection/components/Tooltip/Tooltip.js +52 -6
- package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/collection/components/Tooltip/tooltip.css +24 -2
- package/dist/collection/components/Transfer/Transfer.js +2 -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 +219 -23
- package/dist/collection/components/TreeSelect/TreeSelect.js.map +1 -1
- package/dist/collection/components/TreeSelect/tree-select.css +41 -7
- package/dist/collection/components/Upload/Upload.js +3 -3
- 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 +9 -16
- 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-affix.js +1 -1
- package/dist/components/hb-alert.js +2 -1
- package/dist/components/hb-alert.js.map +1 -1
- package/dist/components/hb-aside.js +1 -1
- package/dist/components/hb-avatar.js +1 -1
- package/dist/components/hb-backtop.js +2 -2
- package/dist/components/hb-badge.js +1 -1
- package/dist/components/hb-breadcrumb-item.js +1 -1
- package/dist/components/hb-breadcrumb.js +1 -1
- package/dist/components/hb-button.js +2 -2
- package/dist/components/hb-calendar.js +80 -11
- package/dist/components/hb-calendar.js.map +1 -1
- package/dist/components/hb-card.js +1 -1
- package/dist/components/hb-cascader.js +309 -146
- 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-panel.js +2 -2
- package/dist/components/hb-color-picker.js +110 -29
- package/dist/components/hb-color-picker.js.map +1 -1
- package/dist/components/hb-config-provider.js +1 -1
- package/dist/components/hb-container.js +2 -2
- package/dist/components/hb-date-picker-pane.js +2 -2
- package/dist/components/hb-date-picker.js +92 -10
- package/dist/components/hb-date-picker.js.map +1 -1
- package/dist/components/hb-date-range-picker.js +3 -3
- package/dist/components/hb-date-time-picker.js +3 -3
- package/dist/components/hb-descriptions.js +2 -2
- 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-divider.js +2 -2
- package/dist/components/hb-drawer.js +36 -5
- package/dist/components/hb-drawer.js.map +1 -1
- package/dist/components/hb-dropdown.js +94 -12
- 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-footer.js +1 -1
- package/dist/components/hb-form-item.js +61 -9
- package/dist/components/hb-form-item.js.map +1 -1
- package/dist/components/hb-form.js +13 -8
- package/dist/components/hb-form.js.map +1 -1
- package/dist/components/hb-header.js +1 -1
- package/dist/components/hb-icon.js +1 -89
- package/dist/components/hb-icon.js.map +1 -1
- package/dist/components/hb-image-preview.js +13 -9
- 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 +40 -3
- package/dist/components/hb-input.js.map +1 -1
- package/dist/components/hb-layout.js +36 -14
- 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-main.js +1 -1
- 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 +3 -3
- package/dist/components/hb-menu.js.map +1 -1
- package/dist/components/hb-message.js +13 -4
- package/dist/components/hb-message.js.map +1 -1
- package/dist/components/hb-notification.js +2 -2
- package/dist/components/hb-page-header.js +1 -1
- package/dist/components/hb-pagination.js +28 -10
- package/dist/components/hb-pagination.js.map +1 -1
- package/dist/components/hb-popconfirm.js +58 -8
- package/dist/components/hb-popconfirm.js.map +1 -1
- package/dist/components/hb-popover.js +38 -5
- 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 +46 -4
- package/dist/components/hb-rate.js.map +1 -1
- package/dist/components/hb-result.js +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 +54 -6
- package/dist/components/hb-segmented.js.map +1 -1
- package/dist/components/hb-select.js +64 -16
- package/dist/components/hb-select.js.map +1 -1
- package/dist/components/hb-slider.js +191 -24
- 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 +35 -8
- package/dist/components/hb-steps.js.map +1 -1
- package/dist/components/hb-sub-menu.js +5 -5
- package/dist/components/hb-switch.js +9 -4
- package/dist/components/hb-switch.js.map +1 -1
- package/dist/components/hb-tab-pane.js +1 -1
- package/dist/components/hb-table.js +26 -17
- 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-timeline.js +1 -1
- package/dist/components/hb-tooltip.js +44 -6
- package/dist/components/hb-tooltip.js.map +1 -1
- package/dist/components/hb-transfer.js +2 -2
- package/dist/components/hb-tree-select.js +219 -24
- 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-upload.js +3 -3
- package/dist/components/hb-watermark.js +19 -11
- package/dist/components/hb-watermark.js.map +1 -1
- package/dist/components/{p-cc0aeb50.js → p-00aa34c8.js} +17 -3
- package/dist/components/p-00aa34c8.js.map +1 -0
- package/dist/components/p-86d92faf.js +93 -0
- package/dist/components/p-86d92faf.js.map +1 -0
- package/dist/{esm/date-helpers-e4d85a67.js → components/p-e0876aca.js} +10 -17
- 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/esm/{a11y-f9ab2964.js → a11y-e4cde5b0.js} +17 -3
- package/dist/esm/a11y-e4cde5b0.js.map +1 -0
- package/dist/{components/p-cf94cbf6.js → esm/date-helpers-259ed2f1.js} +10 -17
- package/dist/esm/date-helpers-259ed2f1.js.map +1 -0
- package/dist/esm/hb-affix.entry.js +1 -1
- package/dist/esm/hb-alert.entry.js +2 -1
- package/dist/esm/hb-alert.entry.js.map +1 -1
- package/dist/esm/hb-aside.entry.js +1 -1
- package/dist/esm/hb-avatar.entry.js +1 -1
- package/dist/esm/hb-backtop.entry.js +2 -2
- package/dist/esm/hb-badge.entry.js +1 -1
- package/dist/esm/hb-breadcrumb-item.entry.js +1 -1
- package/dist/esm/hb-breadcrumb.entry.js +1 -1
- package/dist/esm/hb-button.entry.js +2 -2
- package/dist/esm/hb-calendar.entry.js +78 -10
- package/dist/esm/hb-calendar.entry.js.map +1 -1
- package/dist/esm/hb-card.entry.js +1 -1
- package/dist/esm/hb-cascader.entry.js +306 -146
- 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-panel.entry.js +2 -2
- package/dist/esm/hb-color-picker.entry.js +108 -28
- package/dist/esm/hb-color-picker.entry.js.map +1 -1
- package/dist/esm/hb-config-provider.entry.js +1 -1
- package/dist/esm/hb-container.entry.js +2 -2
- package/dist/esm/hb-date-picker-pane.entry.js +2 -2
- package/dist/esm/hb-date-picker.entry.js +90 -9
- package/dist/esm/hb-date-picker.entry.js.map +1 -1
- package/dist/esm/hb-date-range-picker.entry.js +3 -3
- package/dist/esm/hb-date-time-picker.entry.js +3 -3
- package/dist/esm/hb-descriptions.entry.js +2 -2
- 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-divider.entry.js +2 -2
- 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 +91 -11
- 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-footer.entry.js +1 -1
- package/dist/esm/hb-form-item.entry.js +61 -9
- package/dist/esm/hb-form-item.entry.js.map +1 -1
- package/dist/esm/hb-form.entry.js +13 -8
- package/dist/esm/hb-form.entry.js.map +1 -1
- package/dist/esm/hb-header.entry.js +1 -1
- package/dist/esm/hb-image-preview.entry.js +13 -9
- 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 +40 -3
- package/dist/esm/hb-input.entry.js.map +1 -1
- package/dist/esm/hb-layout.entry.js +36 -14
- 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-main.entry.js +1 -1
- 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 +3 -3
- package/dist/esm/hb-menu.entry.js.map +1 -1
- package/dist/esm/hb-message.entry.js +13 -4
- package/dist/esm/hb-message.entry.js.map +1 -1
- package/dist/esm/hb-notification.entry.js +2 -2
- package/dist/esm/hb-page-header.entry.js +1 -1
- package/dist/esm/hb-pagination.entry.js +24 -8
- package/dist/esm/hb-pagination.entry.js.map +1 -1
- package/dist/esm/hb-popconfirm.entry.js +57 -8
- package/dist/esm/hb-popconfirm.entry.js.map +1 -1
- package/dist/esm/hb-popover.entry.js +37 -5
- 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 +46 -4
- package/dist/esm/hb-rate.entry.js.map +1 -1
- package/dist/esm/hb-result.entry.js +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 +51 -6
- package/dist/esm/hb-segmented.entry.js.map +1 -1
- package/dist/esm/hb-select.entry.js +64 -16
- package/dist/esm/hb-select.entry.js.map +1 -1
- package/dist/esm/hb-slider.entry.js +186 -23
- 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 +28 -7
- 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 +9 -4
- 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 +26 -17
- 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-timeline.entry.js +1 -1
- package/dist/esm/hb-tooltip.entry.js +43 -6
- package/dist/esm/hb-tooltip.entry.js.map +1 -1
- package/dist/esm/hb-transfer.entry.js +2 -2
- package/dist/esm/hb-tree-select.entry.js +215 -23
- 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-upload.entry.js +3 -3
- 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.css +1 -1
- 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-02f15843.entry.js +2 -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-f1c084c5.entry.js → p-0ddae4e9.entry.js} +2 -2
- package/dist/huibo-ui/{p-672076c3.entry.js → p-10f6c184.entry.js} +2 -2
- package/dist/huibo-ui/p-10f6c184.entry.js.map +1 -0
- package/dist/huibo-ui/{p-6ac242fe.entry.js → p-14c3b47b.entry.js} +2 -2
- package/dist/huibo-ui/{p-8c80a765.entry.js → p-15db24e9.entry.js} +2 -2
- package/dist/huibo-ui/{p-8b027491.entry.js → p-193efdc0.entry.js} +2 -2
- package/dist/huibo-ui/{p-8d925e3d.entry.js → p-1b0fbe69.entry.js} +2 -2
- package/dist/huibo-ui/{p-85f68526.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-f374d5a3.entry.js → p-20632186.entry.js} +2 -2
- package/dist/huibo-ui/{p-e6f2d71d.entry.js → p-20fc554b.entry.js} +2 -2
- package/dist/huibo-ui/{p-64ca0980.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-fd19813c.entry.js → p-2bcda1bb.entry.js} +2 -2
- package/dist/huibo-ui/{p-231a7335.entry.js → p-2ca9796a.entry.js} +2 -2
- package/dist/huibo-ui/p-2ca9796a.entry.js.map +1 -0
- package/dist/huibo-ui/{p-e0768565.entry.js → p-3042f986.entry.js} +2 -2
- package/dist/huibo-ui/{p-be48d2aa.entry.js → p-3dacb26b.entry.js} +2 -2
- package/dist/huibo-ui/{p-6a1ec3ff.entry.js → p-3deff48c.entry.js} +2 -2
- package/dist/huibo-ui/{p-c321c4aa.entry.js → p-412ff618.entry.js} +2 -2
- package/dist/huibo-ui/p-415295f3.entry.js +2 -0
- 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-54a28052.entry.js +2 -0
- package/dist/huibo-ui/p-54a28052.entry.js.map +1 -0
- package/dist/huibo-ui/{p-88127de1.entry.js → p-55cd13eb.entry.js} +2 -2
- package/dist/huibo-ui/{p-58ebb9b3.entry.js → p-5c839288.entry.js} +2 -2
- 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-a042e3d0.entry.js → p-6518c435.entry.js} +2 -2
- package/dist/huibo-ui/p-687d8dff.entry.js +2 -0
- 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-a0015341.entry.js → p-6bfeab80.entry.js} +2 -2
- package/dist/huibo-ui/{p-4001c08d.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 +2 -0
- package/dist/huibo-ui/p-6c8cf248.entry.js.map +1 -0
- 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-8b1ae77e.entry.js → p-746a11a3.entry.js} +2 -2
- package/dist/huibo-ui/{p-c3e8893d.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-c922d672.entry.js → p-7a682c56.entry.js} +2 -2
- package/dist/huibo-ui/{p-8c987d57.entry.js → p-7f65dc36.entry.js} +2 -2
- package/dist/huibo-ui/{p-463de26d.entry.js → p-815fc943.entry.js} +2 -2
- package/dist/huibo-ui/{p-d87fc21a.entry.js → p-88a6c905.entry.js} +2 -2
- package/dist/huibo-ui/{p-77017274.entry.js → p-89be7973.entry.js} +2 -2
- package/dist/huibo-ui/p-8a202bc5.entry.js +2 -0
- package/dist/huibo-ui/p-8a202bc5.entry.js.map +1 -0
- package/dist/huibo-ui/{p-315feadf.entry.js → p-8c4415ed.entry.js} +2 -2
- package/dist/huibo-ui/p-8c4415ed.entry.js.map +1 -0
- package/dist/huibo-ui/{p-9319c650.entry.js → p-950e7465.entry.js} +2 -2
- package/dist/huibo-ui/{p-6b381d0e.entry.js → p-96cecd21.entry.js} +2 -2
- package/dist/huibo-ui/p-96cecd21.entry.js.map +1 -0
- package/dist/huibo-ui/{p-710f38de.entry.js → p-98b513cd.entry.js} +2 -2
- package/dist/huibo-ui/p-98b513cd.entry.js.map +1 -0
- package/dist/huibo-ui/{p-5df47135.entry.js → p-a190ca89.entry.js} +2 -2
- package/dist/huibo-ui/{p-0e65e1bd.entry.js → p-ac18c68b.entry.js} +2 -2
- package/dist/huibo-ui/p-ac18c68b.entry.js.map +1 -0
- package/dist/huibo-ui/{p-d64b91ef.entry.js → p-ac45291c.entry.js} +2 -2
- package/dist/huibo-ui/p-ac45291c.entry.js.map +1 -0
- package/dist/huibo-ui/{p-477d8568.entry.js → p-aeae83af.entry.js} +2 -2
- package/dist/huibo-ui/{p-b489a526.entry.js → p-b06c8020.entry.js} +2 -2
- package/dist/huibo-ui/{p-dfaf7e37.entry.js → p-b105cf76.entry.js} +2 -2
- package/dist/huibo-ui/p-b105cf76.entry.js.map +1 -0
- package/dist/huibo-ui/{p-c3e665f6.entry.js → p-b38802b0.entry.js} +2 -2
- package/dist/huibo-ui/p-b38802b0.entry.js.map +1 -0
- 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-e2a8a396.entry.js → p-b6afe81e.entry.js} +2 -2
- package/dist/huibo-ui/{p-2b286698.entry.js → p-b7885d4a.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-e0ab9010.entry.js → p-c869842c.entry.js} +2 -2
- package/dist/huibo-ui/p-c869842c.entry.js.map +1 -0
- package/dist/huibo-ui/{p-476527c1.entry.js → p-c8e917db.entry.js} +2 -2
- package/dist/huibo-ui/p-c8e917db.entry.js.map +1 -0
- 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-10c088f3.entry.js → p-d9c7c378.entry.js} +2 -2
- package/dist/huibo-ui/{p-332c8877.entry.js → p-dd9c6459.entry.js} +2 -2
- package/dist/huibo-ui/{p-80aca641.entry.js → p-dfccc7aa.entry.js} +2 -2
- package/dist/huibo-ui/{p-21682e92.entry.js → p-dfd144d8.entry.js} +2 -2
- package/dist/huibo-ui/p-e0876aca.js +2 -0
- package/dist/huibo-ui/p-e0876aca.js.map +1 -0
- package/dist/huibo-ui/p-e1773c93.entry.js +2 -0
- package/dist/huibo-ui/p-e1773c93.entry.js.map +1 -0
- package/dist/huibo-ui/{p-079a4130.entry.js → p-e3155cd7.entry.js} +2 -2
- package/dist/huibo-ui/{p-59b2e61c.entry.js → p-e73c357f.entry.js} +2 -2
- package/dist/huibo-ui/p-e73c357f.entry.js.map +1 -0
- package/dist/huibo-ui/{p-c1b4eacb.entry.js → p-e7c73624.entry.js} +2 -2
- package/dist/huibo-ui/p-e7c73624.entry.js.map +1 -0
- package/dist/huibo-ui/{p-d7815b4f.entry.js → p-e9e7abca.entry.js} +2 -2
- package/dist/huibo-ui/{p-f81ec512.entry.js → p-ea0823f3.entry.js} +2 -2
- package/dist/huibo-ui/p-ea0823f3.entry.js.map +1 -0
- package/dist/huibo-ui/{p-2e6584ea.entry.js → p-f1f2483f.entry.js} +2 -2
- package/dist/huibo-ui/{p-465dcb4c.entry.js → p-f2c78699.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-4d8b1404.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/Calendar/Calendar.d.ts +13 -1
- package/dist/types/components/Cascader/Cascader.d.ts +80 -90
- 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/ColorPicker/ColorPicker.d.ts +11 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +14 -3
- 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 +18 -1
- package/dist/types/components/Form/Form.d.ts +2 -0
- package/dist/types/components/Form/FormItem.d.ts +10 -0
- package/dist/types/components/Image/Image.d.ts +6 -0
- package/dist/types/components/ImagePreview/ImagePreview.d.ts +5 -1
- package/dist/types/components/Input/Input.d.ts +9 -0
- package/dist/types/components/Layout/Layout.d.ts +20 -10
- package/dist/types/components/Menu/MenuItem.d.ts +8 -1
- package/dist/types/components/Message/Message.d.ts +3 -0
- package/dist/types/components/Pagination/Pagination.d.ts +3 -0
- package/dist/types/components/Popconfirm/Popconfirm.d.ts +16 -0
- package/dist/types/components/Popover/Popover.d.ts +14 -0
- package/dist/types/components/Radio/Radio.d.ts +5 -0
- package/dist/types/components/Rate/Rate.d.ts +7 -0
- package/dist/types/components/Segmented/Segmented.d.ts +18 -1
- package/dist/types/components/Select/Select.d.ts +11 -0
- package/dist/types/components/Slider/Slider.d.ts +27 -1
- package/dist/types/components/Steps/Steps.d.ts +14 -6
- 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 +15 -1
- package/dist/types/components/Tree/Tree.d.ts +24 -0
- package/dist/types/components/TreeSelect/TreeSelect.d.ts +26 -0
- package/dist/types/components/Watermark/Watermark.d.ts +7 -1
- package/dist/types/components.d.ts +290 -98
- package/dist/types/utils/a11y.d.ts +9 -0
- package/dist/types/utils/date-helpers.d.ts +1 -1
- package/dist/types/utils/transition.d.ts +27 -0
- package/package.json +8 -2
- package/readme.md +88 -73
- package/dist/cjs/a11y-802de67a.js.map +0 -1
- package/dist/cjs/date-helpers-904747ff.js.map +0 -1
- package/dist/components/p-cc0aeb50.js.map +0 -1
- package/dist/components/p-cf94cbf6.js.map +0 -1
- package/dist/esm/a11y-f9ab2964.js.map +0 -1
- package/dist/esm/date-helpers-e4d85a67.js.map +0 -1
- package/dist/huibo-ui/p-003cee87.entry.js +0 -2
- package/dist/huibo-ui/p-003cee87.entry.js.map +0 -1
- package/dist/huibo-ui/p-0a033738.entry.js +0 -2
- package/dist/huibo-ui/p-0a033738.entry.js.map +0 -1
- package/dist/huibo-ui/p-0bef78ac.entry.js +0 -2
- package/dist/huibo-ui/p-0bef78ac.entry.js.map +0 -1
- package/dist/huibo-ui/p-0e65e1bd.entry.js.map +0 -1
- package/dist/huibo-ui/p-0f189251.entry.js +0 -2
- package/dist/huibo-ui/p-0f189251.entry.js.map +0 -1
- package/dist/huibo-ui/p-1b5acd6d.entry.js +0 -2
- package/dist/huibo-ui/p-1b5acd6d.entry.js.map +0 -1
- package/dist/huibo-ui/p-231a7335.entry.js.map +0 -1
- package/dist/huibo-ui/p-24ad7eec.entry.js +0 -2
- package/dist/huibo-ui/p-24ad7eec.entry.js.map +0 -1
- package/dist/huibo-ui/p-315feadf.entry.js.map +0 -1
- package/dist/huibo-ui/p-3c7f73c8.entry.js +0 -2
- package/dist/huibo-ui/p-3c7f73c8.entry.js.map +0 -1
- package/dist/huibo-ui/p-4001c08d.entry.js.map +0 -1
- package/dist/huibo-ui/p-44c48246.entry.js +0 -2
- package/dist/huibo-ui/p-44c48246.entry.js.map +0 -1
- package/dist/huibo-ui/p-476527c1.entry.js.map +0 -1
- package/dist/huibo-ui/p-4d0dff15.entry.js +0 -2
- package/dist/huibo-ui/p-58d20809.entry.js +0 -2
- package/dist/huibo-ui/p-58d20809.entry.js.map +0 -1
- package/dist/huibo-ui/p-59b2e61c.entry.js.map +0 -1
- package/dist/huibo-ui/p-64ca0980.entry.js.map +0 -1
- package/dist/huibo-ui/p-672076c3.entry.js.map +0 -1
- package/dist/huibo-ui/p-6b381d0e.entry.js.map +0 -1
- package/dist/huibo-ui/p-710f38de.entry.js.map +0 -1
- package/dist/huibo-ui/p-756acbdb.entry.js +0 -2
- package/dist/huibo-ui/p-756acbdb.entry.js.map +0 -1
- package/dist/huibo-ui/p-75a93de3.entry.js +0 -2
- package/dist/huibo-ui/p-75a93de3.entry.js.map +0 -1
- package/dist/huibo-ui/p-769960f4.entry.js +0 -2
- package/dist/huibo-ui/p-769960f4.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-85f68526.entry.js.map +0 -1
- package/dist/huibo-ui/p-8d615521.entry.js +0 -2
- package/dist/huibo-ui/p-8d615521.entry.js.map +0 -1
- package/dist/huibo-ui/p-953b9514.entry.js +0 -2
- package/dist/huibo-ui/p-953b9514.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-ad6b0c6e.entry.js +0 -2
- package/dist/huibo-ui/p-ad6b0c6e.entry.js.map +0 -1
- package/dist/huibo-ui/p-c1a059d9.entry.js +0 -2
- package/dist/huibo-ui/p-c1a059d9.entry.js.map +0 -1
- package/dist/huibo-ui/p-c1b4eacb.entry.js.map +0 -1
- package/dist/huibo-ui/p-c3e665f6.entry.js.map +0 -1
- package/dist/huibo-ui/p-c3e8893d.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-cf94cbf6.js +0 -2
- package/dist/huibo-ui/p-cf94cbf6.js.map +0 -1
- package/dist/huibo-ui/p-d3939d44.entry.js +0 -2
- package/dist/huibo-ui/p-d3939d44.entry.js.map +0 -1
- package/dist/huibo-ui/p-d64b91ef.entry.js.map +0 -1
- package/dist/huibo-ui/p-dd05cb2c.entry.js +0 -2
- package/dist/huibo-ui/p-dd05cb2c.entry.js.map +0 -1
- package/dist/huibo-ui/p-dfaf7e37.entry.js.map +0 -1
- package/dist/huibo-ui/p-e0ab9010.entry.js.map +0 -1
- package/dist/huibo-ui/p-e9490259.entry.js +0 -2
- package/dist/huibo-ui/p-e9490259.entry.js.map +0 -1
- package/dist/huibo-ui/p-ea74fcae.entry.js.map +0 -1
- package/dist/huibo-ui/p-ebd04656.entry.js +0 -2
- package/dist/huibo-ui/p-ebd04656.entry.js.map +0 -1
- package/dist/huibo-ui/p-ed0ff857.entry.js +0 -2
- package/dist/huibo-ui/p-ed0ff857.entry.js.map +0 -1
- package/dist/huibo-ui/p-f0ac7db5.entry.js +0 -2
- package/dist/huibo-ui/p-f0ac7db5.entry.js.map +0 -1
- package/dist/huibo-ui/p-f81ec512.entry.js.map +0 -1
- /package/dist/huibo-ui/{p-4d0dff15.entry.js.map → p-02f15843.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f1c084c5.entry.js.map → p-0ddae4e9.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-6ac242fe.entry.js.map → p-14c3b47b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8c80a765.entry.js.map → p-15db24e9.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8b027491.entry.js.map → p-193efdc0.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8d925e3d.entry.js.map → p-1b0fbe69.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f374d5a3.entry.js.map → p-20632186.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e6f2d71d.entry.js.map → p-20fc554b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-fd19813c.entry.js.map → p-2bcda1bb.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e0768565.entry.js.map → p-3042f986.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-be48d2aa.entry.js.map → p-3dacb26b.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-6a1ec3ff.entry.js.map → p-3deff48c.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-c321c4aa.entry.js.map → p-412ff618.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-88127de1.entry.js.map → p-55cd13eb.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-58ebb9b3.entry.js.map → p-5c839288.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-a042e3d0.entry.js.map → p-6518c435.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-a0015341.entry.js.map → p-6bfeab80.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8b1ae77e.entry.js.map → p-746a11a3.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-c922d672.entry.js.map → p-7a682c56.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8c987d57.entry.js.map → p-7f65dc36.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-463de26d.entry.js.map → p-815fc943.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-d87fc21a.entry.js.map → p-88a6c905.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-77017274.entry.js.map → p-89be7973.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-9319c650.entry.js.map → p-950e7465.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-5df47135.entry.js.map → p-a190ca89.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-477d8568.entry.js.map → p-aeae83af.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-b489a526.entry.js.map → p-b06c8020.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e2a8a396.entry.js.map → p-b6afe81e.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-2b286698.entry.js.map → p-b7885d4a.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-10c088f3.entry.js.map → p-d9c7c378.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-332c8877.entry.js.map → p-dd9c6459.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-80aca641.entry.js.map → p-dfccc7aa.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-21682e92.entry.js.map → p-dfd144d8.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-079a4130.entry.js.map → p-e3155cd7.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-d7815b4f.entry.js.map → p-e9e7abca.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-2e6584ea.entry.js.map → p-f1f2483f.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-465dcb4c.entry.js.map → p-f2c78699.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-4d8b1404.entry.js.map → p-fd6831f9.entry.js.map} +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h } from './p-1407a5e8.js';
|
|
2
|
+
|
|
3
|
+
const iconCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{align-items:center;display:inline-flex;justify-content:center;line-height:0;vertical-align:middle}.hb-icon{color:inherit;display:inline-block;flex-shrink:0;font-size:inherit;height:1em;width:1em}.hb-icon--spin{animation:hb-icon-spin 1s linear infinite}.hb-icon--placeholder{align-items:center;background-color:var(--hb-color-fill-tertiary);border-radius:var(--hb-border-radius-xs);color:var(--hb-color-text-tertiary);display:inline-flex;font-size:var(--hb-font-size-xs);justify-content:center;line-height:1;overflow:hidden;padding:0 2px;word-break:break-all}@keyframes hb-icon-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
4
|
+
const HbIconStyle0 = iconCss;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 内置常用图标 SVG path 映射表(24x24 viewBox,stroke/fill 由 currentColor 继承)
|
|
8
|
+
* 设计参照 Ant Design / Element Plus 常用后台图标。
|
|
9
|
+
*/
|
|
10
|
+
const ICON_PATHS = {
|
|
11
|
+
edit: 'M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z',
|
|
12
|
+
delete: 'M6 7h12v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7zm3-3h6l1 2H8l1-2zM4 6h16v2H4V6z',
|
|
13
|
+
plus: 'M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5z',
|
|
14
|
+
search: 'M10 4a6 6 0 1 0 3.9 10.5l4.3 4.3 1.4-1.4-4.3-4.3A6 6 0 0 0 10 4zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8z',
|
|
15
|
+
refresh: 'M12 5V2L8 6l4 4V7a5 5 0 1 1-5 5H5a7 7 0 1 0 7-7z',
|
|
16
|
+
check: 'M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.5-1.5z',
|
|
17
|
+
close: 'M6 6l12 12M18 6L6 18',
|
|
18
|
+
'arrow-up': 'M12 5l7 7h-4v7h-6v-7H5z',
|
|
19
|
+
'arrow-down': 'M12 19l-7-7h4V5h6v7h4z',
|
|
20
|
+
'arrow-left': 'M5 12l7-7v4h7v6h-7v4z',
|
|
21
|
+
'arrow-right': 'M19 12l-7 7v-4H5V9h7V5z',
|
|
22
|
+
eye: 'M12 5c-7 0-10 7-10 7s3 7 10 7 10-7 10-7-3-7-10-7zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6a2 2 0 1 0 0 4 2 2 0 0 0 0-4z',
|
|
23
|
+
setting: 'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm9 4a8.9 8.9 0 0 0-.2-2l2-1.5-2-3.5-2.4 1a8 8 0 0 0-3.4-2L14.5 1h-5l-.3 2.5a8 8 0 0 0-3.4 2l-2.4-1-2 3.5L3.4 10a8.9 8.9 0 0 0 0 4l-2 1.5 2 3.5 2.4-1a8 8 0 0 0 3.4 2l.3 2.5h5l.3-2.5a8 8 0 0 0 3.4-2l2.4 1 2-3.5-2-1.5c.1-.6.2-1.3.2-2z',
|
|
24
|
+
user: 'M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-5 0-9 2.5-9 6v2h18v-2c0-3.5-4-6-9-6z',
|
|
25
|
+
bell: 'M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2zm6-6V11a6 6 0 0 0-5-5.9V4a1 1 0 0 0-2 0v1.1A6 6 0 0 0 6 11v5l-2 2v1h16v-1l-2-2z',
|
|
26
|
+
menu: 'M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z',
|
|
27
|
+
home: 'M12 3l9 8h-3v9h-4v-6H10v6H6v-9H3z',
|
|
28
|
+
upload: 'M9 16h6v-6h4l-7-7-7 7h4v6zm-4 2h14v2H5v-2z',
|
|
29
|
+
download: 'M9 4h6v8h4l-7 7-7-7h4V4zm-4 14h14v2H5v-2z',
|
|
30
|
+
info: 'M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9a10 10 0 1 0 0 20 10 10 0 0 0 0-20z',
|
|
31
|
+
warning: 'M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z',
|
|
32
|
+
};
|
|
33
|
+
const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends H {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
this.__registerHost();
|
|
37
|
+
this.__attachShadow();
|
|
38
|
+
}
|
|
39
|
+
/** 图标名(查 ICON_PATHS 映射表) */
|
|
40
|
+
name = '';
|
|
41
|
+
/** 尺寸(number 视为 px,string 直接作为 width/height) */
|
|
42
|
+
size = '1em';
|
|
43
|
+
/** 颜色(默认继承 currentColor) */
|
|
44
|
+
color = 'inherit';
|
|
45
|
+
/** 是否旋转动画 */
|
|
46
|
+
spin = false;
|
|
47
|
+
normalizeSize() {
|
|
48
|
+
if (typeof this.size === 'number') {
|
|
49
|
+
return `${this.size}px`;
|
|
50
|
+
}
|
|
51
|
+
return this.size;
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
const dimension = this.normalizeSize();
|
|
55
|
+
const path = ICON_PATHS[this.name];
|
|
56
|
+
const svgStyle = {
|
|
57
|
+
width: dimension,
|
|
58
|
+
height: dimension,
|
|
59
|
+
color: this.color,
|
|
60
|
+
};
|
|
61
|
+
if (path) {
|
|
62
|
+
// close / arrow 等使用 stroke 描边;info/warning/eye 等使用 fill 填充
|
|
63
|
+
const strokeBased = this.name === 'close' || this.name.startsWith('arrow-');
|
|
64
|
+
return (h("svg", { class: { 'hb-icon': true, 'hb-icon--spin': this.spin }, viewBox: "0 0 24 24", style: svgStyle, fill: strokeBased ? 'none' : 'currentColor', stroke: strokeBased ? 'currentColor' : 'none', "stroke-width": strokeBased ? 2 : 0, "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: path })));
|
|
65
|
+
}
|
|
66
|
+
// 未知 name:渲染占位方块 + title 文本
|
|
67
|
+
return (h("span", { class: { 'hb-icon': true, 'hb-icon--spin': this.spin, 'hb-icon--placeholder': true }, style: svgStyle, role: "img", "aria-label": this.name }, this.name || ''));
|
|
68
|
+
}
|
|
69
|
+
static get style() { return HbIconStyle0; }
|
|
70
|
+
}, [1, "hb-icon", {
|
|
71
|
+
"name": [1],
|
|
72
|
+
"size": [8],
|
|
73
|
+
"color": [1],
|
|
74
|
+
"spin": [4]
|
|
75
|
+
}]);
|
|
76
|
+
function defineCustomElement() {
|
|
77
|
+
if (typeof customElements === "undefined") {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const components = ["hb-icon"];
|
|
81
|
+
components.forEach(tagName => { switch (tagName) {
|
|
82
|
+
case "hb-icon":
|
|
83
|
+
if (!customElements.get(tagName)) {
|
|
84
|
+
customElements.define(tagName, Icon);
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
} });
|
|
88
|
+
}
|
|
89
|
+
defineCustomElement();
|
|
90
|
+
|
|
91
|
+
export { Icon as I, defineCustomElement as d };
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=p-86d92faf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-86d92faf.js","mappings":";;AAAA,MAAM,OAAO,GAAG,4uMAA4uM,CAAC;AAC7vM,qBAAe,OAAO;;ACCtB;;;;AAIA,MAAM,UAAU,GAA2B;IACzC,IAAI,EACF,yIAAyI;IAC3I,MAAM,EACJ,4EAA4E;IAC9E,IAAI,EAAE,oCAAoC;IAC1C,MAAM,EACJ,mGAAmG;IACrG,OAAO,EACL,kDAAkD;IACpD,KAAK,EAAE,iDAAiD;IACxD,KAAK,EAAE,sBAAsB;IAC7B,UAAU,EAAE,yBAAyB;IACrC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,uBAAuB;IACrC,aAAa,EAAE,yBAAyB;IACxC,GAAG,EAAE,sHAAsH;IAC3H,OAAO,EACL,2QAA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BACN,OAAO,iBACX,MAAM,IAElB,YAAM,CAAC,EAAE,IAAI,GAAI,CACb,EACN;SACH;;QAGD,QACE,YACE,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,CAAC,IAAI,EAAE,sBAAsB,EAAE,IAAI,EAAE,EACpF,KAAK,EAAE,QAAQ,EACf,IAAI,EAAC,KAAK,gBACE,IAAI,CAAC,IAAI,IAEpB,IAAI,CAAC,IAAI,IAAI,EAAE,CACX,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/Icon/icon.css?tag=hb-icon&encapsulation=shadow","src/components/Icon/Icon.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n vertical-align: middle;\n}\n\n.hb-icon {\n display: inline-block;\n width: 1em;\n height: 1em;\n font-size: inherit;\n color: inherit;\n flex-shrink: 0;\n}\n\n.hb-icon--spin {\n animation: hb-icon-spin 1s linear infinite;\n}\n\n.hb-icon--placeholder {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: var(--hb-font-size-xs);\n color: var(--hb-color-text-tertiary);\n background-color: var(--hb-color-fill-tertiary);\n border-radius: var(--hb-border-radius-xs);\n line-height: 1;\n overflow: hidden;\n word-break: break-all;\n padding: 0 2px;\n}\n\n@keyframes hb-icon-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * 内置常用图标 SVG path 映射表(24x24 viewBox,stroke/fill 由 currentColor 继承)\n * 设计参照 Ant Design / Element Plus 常用后台图标。\n */\nconst ICON_PATHS: Record<string, string> = {\n edit:\n 'M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z',\n delete:\n 'M6 7h12v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7zm3-3h6l1 2H8l1-2zM4 6h16v2H4V6z',\n plus: 'M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5z',\n search:\n 'M10 4a6 6 0 1 0 3.9 10.5l4.3 4.3 1.4-1.4-4.3-4.3A6 6 0 0 0 10 4zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8z',\n refresh:\n 'M12 5V2L8 6l4 4V7a5 5 0 1 1-5 5H5a7 7 0 1 0 7-7z',\n check: 'M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.5-1.5z',\n close: 'M6 6l12 12M18 6L6 18',\n 'arrow-up': 'M12 5l7 7h-4v7h-6v-7H5z',\n 'arrow-down': 'M12 19l-7-7h4V5h6v7h4z',\n 'arrow-left': 'M5 12l7-7v4h7v6h-7v4z',\n 'arrow-right': 'M19 12l-7 7v-4H5V9h7V5z',\n eye: 'M12 5c-7 0-10 7-10 7s3 7 10 7 10-7 10-7-3-7-10-7zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6a2 2 0 1 0 0 4 2 2 0 0 0 0-4z',\n setting:\n 'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm9 4a8.9 8.9 0 0 0-.2-2l2-1.5-2-3.5-2.4 1a8 8 0 0 0-3.4-2L14.5 1h-5l-.3 2.5a8 8 0 0 0-3.4 2l-2.4-1-2 3.5L3.4 10a8.9 8.9 0 0 0 0 4l-2 1.5 2 3.5 2.4-1a8 8 0 0 0 3.4 2l.3 2.5h5l.3-2.5a8 8 0 0 0 3.4-2l2.4 1 2-3.5-2-1.5c.1-.6.2-1.3.2-2z',\n user: 'M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-5 0-9 2.5-9 6v2h18v-2c0-3.5-4-6-9-6z',\n bell: 'M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2zm6-6V11a6 6 0 0 0-5-5.9V4a1 1 0 0 0-2 0v1.1A6 6 0 0 0 6 11v5l-2 2v1h16v-1l-2-2z',\n menu: 'M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z',\n home: 'M12 3l9 8h-3v9h-4v-6H10v6H6v-9H3z',\n upload:\n 'M9 16h6v-6h4l-7-7-7 7h4v6zm-4 2h14v2H5v-2z',\n download:\n 'M9 4h6v8h4l-7 7-7-7h4V4zm-4 14h14v2H5v-2z',\n info: 'M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9a10 10 0 1 0 0 20 10 10 0 0 0 0-20z',\n warning:\n 'M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z',\n};\n\n/**\n * Icon 图标组件\n * 内置常用后台图标,替换项目内散落的 emoji 图标。\n * 通过 name 查表渲染对应 SVG,未知 name 渲染占位。\n */\n@Component({\n tag: 'hb-icon',\n styleUrl: 'icon.css',\n shadow: true,\n})\nexport class Icon {\n /** 图标名(查 ICON_PATHS 映射表) */\n @Prop() name: string = '';\n\n /** 尺寸(number 视为 px,string 直接作为 width/height) */\n @Prop() size: number | string = '1em';\n\n /** 颜色(默认继承 currentColor) */\n @Prop() color: string = 'inherit';\n\n /** 是否旋转动画 */\n @Prop() spin: boolean = false;\n\n private normalizeSize(): string {\n if (typeof this.size === 'number') {\n return `${this.size}px`;\n }\n return this.size;\n }\n\n render() {\n const dimension = this.normalizeSize();\n const path = ICON_PATHS[this.name];\n\n const svgStyle = {\n width: dimension,\n height: dimension,\n color: this.color,\n };\n\n if (path) {\n // close / arrow 等使用 stroke 描边;info/warning/eye 等使用 fill 填充\n const strokeBased = this.name === 'close' || this.name.startsWith('arrow-');\n return (\n <svg\n class={{ 'hb-icon': true, 'hb-icon--spin': this.spin }}\n viewBox=\"0 0 24 24\"\n style={svgStyle}\n fill={strokeBased ? 'none' : 'currentColor'}\n stroke={strokeBased ? 'currentColor' : 'none'}\n stroke-width={strokeBased ? 2 : 0}\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d={path} />\n </svg>\n );\n }\n\n // 未知 name:渲染占位方块 + title 文本\n return (\n <span\n class={{ 'hb-icon': true, 'hb-icon--spin': this.spin, 'hb-icon--placeholder': true }}\n style={svgStyle}\n role=\"img\"\n aria-label={this.name}\n >\n {this.name || ''}\n </span>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/** 判断两个日期是否为同一天 */
|
|
6
6
|
function isSameDay(date1, date2) {
|
|
7
|
-
return
|
|
8
|
-
date1.getMonth() === date2.getMonth() &&
|
|
9
|
-
date1.getDate() === date2.getDate());
|
|
7
|
+
return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();
|
|
10
8
|
}
|
|
11
9
|
/** 生成 42 天(6 周)的日历网格数据 */
|
|
12
|
-
function getCalendarDays(viewDate, selectedDate, today = new Date()) {
|
|
10
|
+
function getCalendarDays(viewDate, selectedDate, today = new Date(), firstDayOfWeek = 0) {
|
|
13
11
|
const days = [];
|
|
14
12
|
const year = viewDate.getFullYear();
|
|
15
13
|
const month = viewDate.getMonth();
|
|
@@ -17,9 +15,13 @@ function getCalendarDays(viewDate, selectedDate, today = new Date()) {
|
|
|
17
15
|
const lastDay = new Date(year, month + 1, 0);
|
|
18
16
|
const firstDayWeek = firstDay.getDay();
|
|
19
17
|
const daysInMonth = lastDay.getDate();
|
|
18
|
+
// 按 firstDayOfWeek 计算需要补多少上月天数。
|
|
19
|
+
// 默认 firstDayOfWeek=0(周日为首列)时,offset = firstDayWeek;
|
|
20
|
+
// firstDayOfWeek=1(周一为首列)时,周日的 offset 多 1、周一的 offset 为 0。
|
|
21
|
+
const offset = (firstDayWeek - firstDayOfWeek + 7) % 7;
|
|
20
22
|
// 上月填充
|
|
21
23
|
const prevMonth = new Date(year, month - 1, 0);
|
|
22
|
-
for (let i =
|
|
24
|
+
for (let i = offset - 1; i >= 0; i--) {
|
|
23
25
|
const date = new Date(year, month - 1, prevMonth.getDate() - i);
|
|
24
26
|
days.push({
|
|
25
27
|
date,
|
|
@@ -62,13 +64,7 @@ function formatDate(date, format) {
|
|
|
62
64
|
const hours = String(date.getHours()).padStart(2, '0');
|
|
63
65
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
|
64
66
|
const seconds = String(date.getSeconds()).padStart(2, '0');
|
|
65
|
-
return format
|
|
66
|
-
.replace('YYYY', String(year))
|
|
67
|
-
.replace('MM', month)
|
|
68
|
-
.replace('DD', day)
|
|
69
|
-
.replace('HH', hours)
|
|
70
|
-
.replace('mm', minutes)
|
|
71
|
-
.replace('ss', seconds);
|
|
67
|
+
return format.replace('YYYY', String(year)).replace('MM', month).replace('DD', day).replace('HH', hours).replace('mm', minutes).replace('ss', seconds);
|
|
72
68
|
}
|
|
73
69
|
/** 安全解析日期值 */
|
|
74
70
|
function parseDate(value) {
|
|
@@ -111,13 +107,10 @@ function getYearRangeStart(viewDate) {
|
|
|
111
107
|
return year - (year % 12);
|
|
112
108
|
}
|
|
113
109
|
/** 中文月份名称 */
|
|
114
|
-
const MONTH_NAMES = [
|
|
115
|
-
'一月', '二月', '三月', '四月', '五月', '六月',
|
|
116
|
-
'七月', '八月', '九月', '十月', '十一月', '十二月',
|
|
117
|
-
];
|
|
110
|
+
const MONTH_NAMES = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
|
|
118
111
|
/** 中文星期名称 */
|
|
119
112
|
const WEEK_DAY_NAMES = ['日', '一', '二', '三', '四', '五', '六'];
|
|
120
113
|
|
|
121
114
|
export { MONTH_NAMES as M, WEEK_DAY_NAMES as W, addMonths as a, addYears as b, getYearRangeStart as c, getCalendarYears as d, formatDate as f, getCalendarDays as g, isSameDay as i, parseDate as p };
|
|
122
115
|
|
|
123
|
-
//# sourceMappingURL=
|
|
116
|
+
//# sourceMappingURL=p-e0876aca.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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E,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAEtG;MACa,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;;;;","names":[],"sources":["src/utils/date-helpers.ts"],"sourcesContent":["/**\n * 日历和日期工具函数\n * 从 DatePicker / DateTimePicker / DatePickerPane 中提取的共享逻辑\n */\n\nexport interface CalendarDay {\n date: Date;\n isCurrentMonth: boolean;\n isToday: boolean;\n isSelected: boolean;\n}\n\n/** 判断两个日期是否为同一天 */\nexport function isSameDay(date1: Date, date2: Date): boolean {\n return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();\n}\n\n/** 生成 42 天(6 周)的日历网格数据 */\nexport function getCalendarDays(viewDate: Date, selectedDate?: Date, today: Date = new Date(), firstDayOfWeek: number = 0): CalendarDay[] {\n const days: CalendarDay[] = [];\n const year = viewDate.getFullYear();\n const month = viewDate.getMonth();\n\n const firstDay = new Date(year, month, 1);\n const lastDay = new Date(year, month + 1, 0);\n const firstDayWeek = firstDay.getDay();\n const daysInMonth = lastDay.getDate();\n\n // 按 firstDayOfWeek 计算需要补多少上月天数。\n // 默认 firstDayOfWeek=0(周日为首列)时,offset = firstDayWeek;\n // firstDayOfWeek=1(周一为首列)时,周日的 offset 多 1、周一的 offset 为 0。\n const offset = (firstDayWeek - firstDayOfWeek + 7) % 7;\n\n // 上月填充\n const prevMonth = new Date(year, month - 1, 0);\n for (let i = offset - 1; i >= 0; i--) {\n const date = new Date(year, month - 1, prevMonth.getDate() - i);\n days.push({\n date,\n isCurrentMonth: false,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n // 当月日期\n for (let i = 1; i <= daysInMonth; i++) {\n const date = new Date(year, month, i);\n days.push({\n date,\n isCurrentMonth: true,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n // 下月填充(补齐 42 天)\n const remainingDays = 42 - days.length;\n for (let i = 1; i <= remainingDays; i++) {\n const date = new Date(year, month + 1, i);\n days.push({\n date,\n isCurrentMonth: false,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n return days;\n}\n\n/**\n * 格式化日期为指定格式字符串\n * 支持:YYYY, MM, DD, HH, mm, ss\n */\nexport function formatDate(date: Date, format: string): string {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n\n return format.replace('YYYY', String(year)).replace('MM', month).replace('DD', day).replace('HH', hours).replace('mm', minutes).replace('ss', seconds);\n}\n\n/** 安全解析日期值 */\nexport function parseDate(value: string | Date | undefined): Date | undefined {\n if (!value) return undefined;\n const date = value instanceof Date ? value : new Date(value);\n if (isNaN(date.getTime())) return undefined;\n return date;\n}\n\n/** 月份偏移,返回新日期对象(不可变) */\nexport function addMonths(date: Date, delta: number): Date {\n const result = new Date(date);\n result.setMonth(result.getMonth() + delta);\n return result;\n}\n\n/** 年份偏移,返回新日期对象(不可变) */\nexport function addYears(date: Date, delta: number): Date {\n const result = new Date(date);\n result.setFullYear(result.getFullYear() + delta);\n return result;\n}\n\n/**\n * 生成 years 视图的 12 年档数据(每档 12 年)。\n * 以 viewDate 所在年份向下取整到 12 的倍数作为起点。\n */\nexport interface CalendarYear {\n year: number;\n isCurrentYearRange: boolean;\n isSelected: boolean;\n}\n\nexport function getCalendarYears(viewDate: Date, selectedDate?: Date, startYearBase?: number): CalendarYear[] {\n const year = viewDate.getFullYear();\n const rangeStart = startYearBase ?? year - (year % 12);\n const years: CalendarYear[] = [];\n for (let i = 0; i < 12; i++) {\n const y = rangeStart + i;\n years.push({\n year: y,\n isCurrentYearRange: y === year,\n isSelected: !!selectedDate && selectedDate.getFullYear() === y,\n });\n }\n return years;\n}\n\n/** 获取 years 视图标题所显示的年份档区间起点 */\nexport function getYearRangeStart(viewDate: Date): number {\n const year = viewDate.getFullYear();\n return year - (year % 12);\n}\n\n/** 中文月份名称 */\nexport const MONTH_NAMES = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];\n\n/** 中文星期名称 */\nexport const WEEK_DAY_NAMES = ['日', '一', '二', '三', '四', '五', '六'];\n"],"version":3}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
function createLeaveScheduler(getLeaving, setLeaving, duration = 200) {
|
|
2
|
+
let timer;
|
|
3
|
+
const start = (onDone) => {
|
|
4
|
+
if (timer)
|
|
5
|
+
clearTimeout(timer);
|
|
6
|
+
setLeaving(true);
|
|
7
|
+
timer = setTimeout(() => {
|
|
8
|
+
timer = undefined;
|
|
9
|
+
setLeaving(false);
|
|
10
|
+
onDone?.();
|
|
11
|
+
}, duration);
|
|
12
|
+
};
|
|
13
|
+
const cancel = () => {
|
|
14
|
+
if (timer) {
|
|
15
|
+
clearTimeout(timer);
|
|
16
|
+
timer = undefined;
|
|
17
|
+
}
|
|
18
|
+
if (getLeaving())
|
|
19
|
+
setLeaving(false);
|
|
20
|
+
};
|
|
21
|
+
const dispose = () => {
|
|
22
|
+
if (timer) {
|
|
23
|
+
clearTimeout(timer);
|
|
24
|
+
timer = undefined;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return { start, cancel, dispose };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { createLeaveScheduler as c };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=p-fad66d69.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-fad66d69.js","mappings":"SA4BgB,oBAAoB,CAAC,UAAyB,EAAE,UAAyB,EAAE,WAAmB,GAAG;IAC/G,IAAI,KAAgD,CAAC;IAErD,MAAM,KAAK,GAAG,CAAC,MAAmB;QAChC,IAAI,KAAK;YAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QAC/B,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,KAAK,GAAG,UAAU,CAAC;YACjB,KAAK,GAAG,SAAS,CAAC;YAClB,UAAU,CAAC,KAAK,CAAC,CAAC;YAClB,MAAM,IAAI,CAAC;SACZ,EAAE,QAAQ,CAAC,CAAC;KACd,CAAC;IAEF,MAAM,MAAM,GAAG;QACb,IAAI,KAAK,EAAE;YACT,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,KAAK,GAAG,SAAS,CAAC;SACnB;QACD,IAAI,UAAU,EAAE;YAAE,UAAU,CAAC,KAAK,CAAC,CAAC;KACrC,CAAC;IAEF,MAAM,OAAO,GAAG;QACd,IAAI,KAAK,EAAE;YACT,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,KAAK,GAAG,SAAS,CAAC;SACnB;KACF,CAAC;IAEF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACpC;;;;","names":[],"sources":["src/utils/transition.ts"],"sourcesContent":["/**\n * 弹层进出场动画编排工具\n *\n * 问题背景:Stencil 声明式渲染里 `{visible && <El/>}` 会在关闭瞬间卸载 DOM,\n * CSS 离场动画没机会播放——出现\"打开有动画、关闭瞬间消失\"的体验缺陷。\n *\n * 方案:组件维护一个 `leaving` state,关闭时先设 leaving=true 播放离场动画,\n * 动画时长(默认 200ms)后再 leaving=false 真正卸载。`shouldRender = visible || leaving`。\n *\n * 用法(在组件里):\n * ```ts\n * private leave = createLeaveScheduler(() => this.leaving, (v) => this.leaving = v, 200);\n * // visible 变 false 时:this.leave.start(() => 真正关闭的清理);\n * // render 里:{this.shouldRender && <El class={{ '--leaving': this.leaving }}/>}\n * ```\n */\nexport type LeavingSetter = (leaving: boolean) => void;\nexport type LeavingGetter = () => boolean;\n\nexport interface LeaveScheduler {\n /** 开始离场:设 leaving=true,duration 后回调 onDone 并 leaving=false */\n start(onDone?: () => void): void;\n /** 取消挂起的离场(用于关闭中途又打开的场景) */\n cancel(): void;\n /** disconnectedCallback 时调用,避免组件卸载后还在 setState */\n dispose(): void;\n}\n\nexport function createLeaveScheduler(getLeaving: LeavingGetter, setLeaving: LeavingSetter, duration: number = 200): LeaveScheduler {\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const start = (onDone?: () => void) => {\n if (timer) clearTimeout(timer);\n setLeaving(true);\n timer = setTimeout(() => {\n timer = undefined;\n setLeaving(false);\n onDone?.();\n }, duration);\n };\n\n const cancel = () => {\n if (timer) {\n clearTimeout(timer);\n timer = undefined;\n }\n if (getLeaving()) setLeaving(false);\n };\n\n const dispose = () => {\n if (timer) {\n clearTimeout(timer);\n timer = undefined;\n }\n };\n\n return { start, cancel, dispose };\n}\n"],"version":3}
|
|
@@ -9,6 +9,20 @@
|
|
|
9
9
|
function isActivationKey(key) {
|
|
10
10
|
return key === 'Enter' || key === ' ' || key === 'Spacebar';
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* 生成一个 keydown 处理器:当按下激活键(Enter/Space)时触发元素 click。
|
|
14
|
+
* 用于给 `role="button"` 的 `<span>`/`<div>` 补齐键盘可达性(A3)。
|
|
15
|
+
*
|
|
16
|
+
* 用法:`onKeyDown={activationClickHandler}`
|
|
17
|
+
* 它会读 `event.currentTarget`(即绑定 onKeyDown 的元素)并调 .click(),
|
|
18
|
+
* 并 preventDefault 避免空格滚动页面。
|
|
19
|
+
*/
|
|
20
|
+
function activationClickHandler(e) {
|
|
21
|
+
if (isActivationKey(e.key)) {
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
e.currentTarget.click();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
12
26
|
/** 查询容器内可聚焦的元素顺序(tabindex >= 0 的语义元素) */
|
|
13
27
|
const FOCUSABLE_SELECTOR = [
|
|
14
28
|
'a[href]',
|
|
@@ -20,7 +34,7 @@ const FOCUSABLE_SELECTOR = [
|
|
|
20
34
|
'[contenteditable="true"]',
|
|
21
35
|
].join(',');
|
|
22
36
|
function getFocusableElements(container) {
|
|
23
|
-
return Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter(
|
|
37
|
+
return Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter(el => el.getAttribute('aria-hidden') !== 'true' && el.style.display !== 'none');
|
|
24
38
|
}
|
|
25
39
|
/**
|
|
26
40
|
* 创建焦点陷阱(Dialog / Drawer 打开时把 Tab 循环限制在容器内)。
|
|
@@ -114,6 +128,6 @@ function handleListKeyboard(event, options) {
|
|
|
114
128
|
}
|
|
115
129
|
}
|
|
116
130
|
|
|
117
|
-
export { createFocusTrap as c, handleListKeyboard as h, isActivationKey as i };
|
|
131
|
+
export { activationClickHandler as a, createFocusTrap as c, handleListKeyboard as h, isActivationKey as i };
|
|
118
132
|
|
|
119
|
-
//# sourceMappingURL=a11y-
|
|
133
|
+
//# sourceMappingURL=a11y-e4cde5b0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"a11y-e4cde5b0.js","mappings":"AAAA;;;;;;;AAQA;SACgB,eAAe,CAAC,GAAuB;IACrD,OAAO,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,UAAU,CAAC;AAC9D,CAAC;AAED;;;;;;;;SAQgB,sBAAsB,CAAC,CAAgB;IACrD,IAAI,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;QAC1B,CAAC,CAAC,cAAc,EAAE,CAAC;QAClB,CAAC,CAAC,aAA6B,CAAC,KAAK,EAAE,CAAC;KAC1C;AACH,CAAC;AAED;AACA,MAAM,kBAAkB,GAAG;IACzB,SAAS;IACT,wBAAwB;IACxB,0BAA0B;IAC1B,uBAAuB;IACvB,wBAAwB;IACxB,iCAAiC;IACjC,0BAA0B;CAC3B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAEI,oBAAoB,CAAC,SAAsB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,QAAQ,KAAK,CAAC,GAAG;QACf,KAAK,WAAW,CAAC;QACjB,KAAK,YAAY;YACf,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,GAAG,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC;QAC9F,KAAK,SAAS,CAAC;QACf,KAAK,WAAW;YACd,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,GAAG,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC;QAC9F,KAAK,MAAM;YACT,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QACxC,KAAK,KAAK;YACR,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,CAAC,EAAE,CAAC;QACpD,KAAK,OAAO,CAAC;QACb,KAAK,GAAG,CAAC;QACT,KAAK,UAAU;YACb,OAAO,WAAW,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QACtF,KAAK,QAAQ;YACX,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAC3B;YACE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KAC3B;AACH;;;;","names":[],"sources":["src/utils/a11y.ts"],"sourcesContent":["/**\n * 无障碍(a11y)工具集\n * 统一 ARIA 属性辅助、焦点陷阱、列表键盘导航等在交互组件(Dialog / Drawer / Menu /\n * Dropdown / Select 等)中重复出现且容易写错的可访问性逻辑。\n *\n * 参考标准:WAI-ARIA Authoring Practices 1.2。\n */\n\n/** 判定按键是否为「激活」键(Enter / Space),用于自定义可聚焦元素的点击替代 */\nexport function isActivationKey(key: string | undefined): boolean {\n return key === 'Enter' || key === ' ' || key === 'Spacebar';\n}\n\n/**\n * 生成一个 keydown 处理器:当按下激活键(Enter/Space)时触发元素 click。\n * 用于给 `role=\"button\"` 的 `<span>`/`<div>` 补齐键盘可达性(A3)。\n *\n * 用法:`onKeyDown={activationClickHandler}`\n * 它会读 `event.currentTarget`(即绑定 onKeyDown 的元素)并调 .click(),\n * 并 preventDefault 避免空格滚动页面。\n */\nexport function activationClickHandler(e: KeyboardEvent): void {\n if (isActivationKey(e.key)) {\n e.preventDefault();\n (e.currentTarget as HTMLElement).click();\n }\n}\n\n/** 查询容器内可聚焦的元素顺序(tabindex >= 0 的语义元素) */\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'textarea:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n '[contenteditable=\"true\"]',\n].join(',');\n\nexport function getFocusableElements(container: HTMLElement): HTMLElement[] {\n return Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter(el => el.getAttribute('aria-hidden') !== 'true' && el.style.display !== 'none');\n}\n\n/** 焦点陷阱选项 */\nexport interface FocusTrapOptions {\n /** 焦点受限的容器元素 */\n container: HTMLElement;\n /** 打开时是否自动聚焦容器内首个可聚焦元素 */\n autoFocus?: boolean;\n /** 容器激活前的元素(用于关闭时归还焦点) */\n returnFocusTo?: HTMLElement | null;\n}\n\n/** 焦点陷阱句柄 */\nexport interface FocusTrap {\n /** 启用:绑定 Tab 拦截,可选自动聚焦 */\n connect: () => void;\n /** 关闭:解除拦截,归还焦点 */\n disconnect: () => void;\n}\n\n/**\n * 创建焦点陷阱(Dialog / Drawer 打开时把 Tab 循环限制在容器内)。\n * 关键点:Tab 与 Shift+Tab 在容器边界时回环到另一端,防止焦点逃逸到背景。\n * 返回句柄,组件在打开时 connect()、关闭时 disconnect()。\n */\nexport function createFocusTrap(options: FocusTrapOptions): FocusTrap {\n const { container, autoFocus = true, returnFocusTo } = options;\n let active = false;\n let previouslyFocused: HTMLElement | null = null;\n\n const handleKeydown = (e: KeyboardEvent) => {\n if (e.key !== 'Tab') return;\n const focusable = getFocusableElements(container);\n if (focusable.length === 0) {\n e.preventDefault();\n container.focus();\n return;\n }\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const activeEl = document.activeElement;\n\n if (e.shiftKey) {\n if (activeEl === first || !container.contains(activeEl)) {\n e.preventDefault();\n last.focus();\n }\n } else {\n if (activeEl === last) {\n e.preventDefault();\n first.focus();\n }\n }\n };\n\n const connect = () => {\n if (active) return;\n active = true;\n previouslyFocused = (returnFocusTo ?? document.activeElement) as HTMLElement | null;\n container.addEventListener('keydown', handleKeydown);\n if (autoFocus) {\n const focusable = getFocusableElements(container);\n (focusable[0] ?? container).focus();\n }\n };\n\n const disconnect = () => {\n if (!active) return;\n active = false;\n container.removeEventListener('keydown', handleKeydown);\n if (previouslyFocused && typeof previouslyFocused.focus === 'function') {\n previouslyFocused.focus();\n }\n previouslyFocused = null;\n };\n\n return { connect, disconnect };\n}\n\n/** 列表键盘导航产生的动作 */\nexport type ListKeyAction = { type: 'navigate'; index: number } | { type: 'select'; index: number } | { type: 'close' } | { type: 'none' };\n\n/** 列表键盘导航参数 */\nexport interface ListKeyboardOptions {\n /** 当前高亮项索引(-1 表示无高亮) */\n activeIndex: number;\n /** 列表项总数 */\n itemCount: number;\n /** 是否允许循环(首尾跳转) */\n loop?: boolean;\n}\n\n/**\n * 列表 / 菜单 / 下拉选项的键盘导航核心逻辑(listbox / menu / combobox 通用)。\n * 返回应执行的动作,由调用方据此更新 activeIndex / 触发选中 / 关闭。\n *\n * 支持:ArrowDown/ArrowUp(竖排)/ArrowRight/ArrowLeft(横排)移动、Home/End 跳首尾、\n * Enter/Space 选中、Escape 关闭。\n */\nexport function handleListKeyboard(event: KeyboardEvent, options: ListKeyboardOptions): ListKeyAction {\n const { activeIndex, itemCount, loop = true } = options;\n if (itemCount <= 0) return { type: 'none' };\n\n const clamp = (idx: number) => (idx + itemCount) % itemCount;\n const within = (idx: number) => Math.max(0, Math.min(idx, itemCount - 1));\n\n switch (event.key) {\n case 'ArrowDown':\n case 'ArrowRight':\n return { type: 'navigate', index: loop ? clamp(activeIndex + 1) : within(activeIndex + 1) };\n case 'ArrowUp':\n case 'ArrowLeft':\n return { type: 'navigate', index: loop ? clamp(activeIndex - 1) : within(activeIndex - 1) };\n case 'Home':\n return { type: 'navigate', index: 0 };\n case 'End':\n return { type: 'navigate', index: itemCount - 1 };\n case 'Enter':\n case ' ':\n case 'Spacebar':\n return activeIndex >= 0 ? { type: 'select', index: activeIndex } : { type: 'none' };\n case 'Escape':\n return { type: 'close' };\n default:\n return { type: 'none' };\n }\n}\n\n/**\n * 为元素批量设置 ARIA 属性(不可变:返回新映射,但直接操作 DOM 属性是 a11y 的固有需求)。\n * 组件挂载后调用一次即可,避免每次 render 重复写 setAttribute。\n */\nexport function applyAria(el: HTMLElement, attrs: Record<string, string | boolean | undefined>): void {\n Object.entries(attrs).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n el.removeAttribute(`aria-${key}`);\n } else {\n el.setAttribute(`aria-${key}`, String(value));\n }\n });\n}\n"],"version":3}
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/** 判断两个日期是否为同一天 */
|
|
6
6
|
function isSameDay(date1, date2) {
|
|
7
|
-
return
|
|
8
|
-
date1.getMonth() === date2.getMonth() &&
|
|
9
|
-
date1.getDate() === date2.getDate());
|
|
7
|
+
return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();
|
|
10
8
|
}
|
|
11
9
|
/** 生成 42 天(6 周)的日历网格数据 */
|
|
12
|
-
function getCalendarDays(viewDate, selectedDate, today = new Date()) {
|
|
10
|
+
function getCalendarDays(viewDate, selectedDate, today = new Date(), firstDayOfWeek = 0) {
|
|
13
11
|
const days = [];
|
|
14
12
|
const year = viewDate.getFullYear();
|
|
15
13
|
const month = viewDate.getMonth();
|
|
@@ -17,9 +15,13 @@ function getCalendarDays(viewDate, selectedDate, today = new Date()) {
|
|
|
17
15
|
const lastDay = new Date(year, month + 1, 0);
|
|
18
16
|
const firstDayWeek = firstDay.getDay();
|
|
19
17
|
const daysInMonth = lastDay.getDate();
|
|
18
|
+
// 按 firstDayOfWeek 计算需要补多少上月天数。
|
|
19
|
+
// 默认 firstDayOfWeek=0(周日为首列)时,offset = firstDayWeek;
|
|
20
|
+
// firstDayOfWeek=1(周一为首列)时,周日的 offset 多 1、周一的 offset 为 0。
|
|
21
|
+
const offset = (firstDayWeek - firstDayOfWeek + 7) % 7;
|
|
20
22
|
// 上月填充
|
|
21
23
|
const prevMonth = new Date(year, month - 1, 0);
|
|
22
|
-
for (let i =
|
|
24
|
+
for (let i = offset - 1; i >= 0; i--) {
|
|
23
25
|
const date = new Date(year, month - 1, prevMonth.getDate() - i);
|
|
24
26
|
days.push({
|
|
25
27
|
date,
|
|
@@ -62,13 +64,7 @@ function formatDate(date, format) {
|
|
|
62
64
|
const hours = String(date.getHours()).padStart(2, '0');
|
|
63
65
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
|
64
66
|
const seconds = String(date.getSeconds()).padStart(2, '0');
|
|
65
|
-
return format
|
|
66
|
-
.replace('YYYY', String(year))
|
|
67
|
-
.replace('MM', month)
|
|
68
|
-
.replace('DD', day)
|
|
69
|
-
.replace('HH', hours)
|
|
70
|
-
.replace('mm', minutes)
|
|
71
|
-
.replace('ss', seconds);
|
|
67
|
+
return format.replace('YYYY', String(year)).replace('MM', month).replace('DD', day).replace('HH', hours).replace('mm', minutes).replace('ss', seconds);
|
|
72
68
|
}
|
|
73
69
|
/** 安全解析日期值 */
|
|
74
70
|
function parseDate(value) {
|
|
@@ -111,13 +107,10 @@ function getYearRangeStart(viewDate) {
|
|
|
111
107
|
return year - (year % 12);
|
|
112
108
|
}
|
|
113
109
|
/** 中文月份名称 */
|
|
114
|
-
const MONTH_NAMES = [
|
|
115
|
-
'一月', '二月', '三月', '四月', '五月', '六月',
|
|
116
|
-
'七月', '八月', '九月', '十月', '十一月', '十二月',
|
|
117
|
-
];
|
|
110
|
+
const MONTH_NAMES = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
|
|
118
111
|
/** 中文星期名称 */
|
|
119
112
|
const WEEK_DAY_NAMES = ['日', '一', '二', '三', '四', '五', '六'];
|
|
120
113
|
|
|
121
114
|
export { MONTH_NAMES as M, WEEK_DAY_NAMES as W, addMonths as a, addYears as b, getYearRangeStart as c, getCalendarYears as d, formatDate as f, getCalendarDays as g, isSameDay as i, parseDate as p };
|
|
122
115
|
|
|
123
|
-
//# sourceMappingURL=
|
|
116
|
+
//# sourceMappingURL=date-helpers-259ed2f1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"date-helpers-259ed2f1.js","mappings":"AAAA;;;;AAYA;SACgB,SAAS,CAAC,KAAW,EAAE,KAAW;IAChD,OAAO,KAAK,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,QAAQ,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;AACrI,CAAC;AAED;SACgB,eAAe,CAAC,QAAc,EAAE,YAAmB,EAAE,QAAc,IAAI,IAAI,EAAE,EAAE,iBAAyB,CAAC;IACvH,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAElC,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,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AE;QAC3B,MAAM,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC;YACT,IAAI,EAAE,CAAC;YACP,kBAAkB,EAAE,CAAC,KAAK,IAAI;YAC9B,UAAU,EAAE,CAAC,CAAC,YAAY,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,CAAC;SAC/D,CAAC,CAAC;KACJ;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;SACgB,iBAAiB,CAAC,QAAc;IAC9C,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACpC,OAAO,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED;MACa,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;AAEtG;MACa,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;;;;","names":[],"sources":["src/utils/date-helpers.ts"],"sourcesContent":["/**\n * 日历和日期工具函数\n * 从 DatePicker / DateTimePicker / DatePickerPane 中提取的共享逻辑\n */\n\nexport interface CalendarDay {\n date: Date;\n isCurrentMonth: boolean;\n isToday: boolean;\n isSelected: boolean;\n}\n\n/** 判断两个日期是否为同一天 */\nexport function isSameDay(date1: Date, date2: Date): boolean {\n return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();\n}\n\n/** 生成 42 天(6 周)的日历网格数据 */\nexport function getCalendarDays(viewDate: Date, selectedDate?: Date, today: Date = new Date(), firstDayOfWeek: number = 0): CalendarDay[] {\n const days: CalendarDay[] = [];\n const year = viewDate.getFullYear();\n const month = viewDate.getMonth();\n\n const firstDay = new Date(year, month, 1);\n const lastDay = new Date(year, month + 1, 0);\n const firstDayWeek = firstDay.getDay();\n const daysInMonth = lastDay.getDate();\n\n // 按 firstDayOfWeek 计算需要补多少上月天数。\n // 默认 firstDayOfWeek=0(周日为首列)时,offset = firstDayWeek;\n // firstDayOfWeek=1(周一为首列)时,周日的 offset 多 1、周一的 offset 为 0。\n const offset = (firstDayWeek - firstDayOfWeek + 7) % 7;\n\n // 上月填充\n const prevMonth = new Date(year, month - 1, 0);\n for (let i = offset - 1; i >= 0; i--) {\n const date = new Date(year, month - 1, prevMonth.getDate() - i);\n days.push({\n date,\n isCurrentMonth: false,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n // 当月日期\n for (let i = 1; i <= daysInMonth; i++) {\n const date = new Date(year, month, i);\n days.push({\n date,\n isCurrentMonth: true,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n // 下月填充(补齐 42 天)\n const remainingDays = 42 - days.length;\n for (let i = 1; i <= remainingDays; i++) {\n const date = new Date(year, month + 1, i);\n days.push({\n date,\n isCurrentMonth: false,\n isToday: isSameDay(date, today),\n isSelected: !!selectedDate && isSameDay(date, selectedDate),\n });\n }\n\n return days;\n}\n\n/**\n * 格式化日期为指定格式字符串\n * 支持:YYYY, MM, DD, HH, mm, ss\n */\nexport function formatDate(date: Date, format: string): string {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n\n return format.replace('YYYY', String(year)).replace('MM', month).replace('DD', day).replace('HH', hours).replace('mm', minutes).replace('ss', seconds);\n}\n\n/** 安全解析日期值 */\nexport function parseDate(value: string | Date | undefined): Date | undefined {\n if (!value) return undefined;\n const date = value instanceof Date ? value : new Date(value);\n if (isNaN(date.getTime())) return undefined;\n return date;\n}\n\n/** 月份偏移,返回新日期对象(不可变) */\nexport function addMonths(date: Date, delta: number): Date {\n const result = new Date(date);\n result.setMonth(result.getMonth() + delta);\n return result;\n}\n\n/** 年份偏移,返回新日期对象(不可变) */\nexport function addYears(date: Date, delta: number): Date {\n const result = new Date(date);\n result.setFullYear(result.getFullYear() + delta);\n return result;\n}\n\n/**\n * 生成 years 视图的 12 年档数据(每档 12 年)。\n * 以 viewDate 所在年份向下取整到 12 的倍数作为起点。\n */\nexport interface CalendarYear {\n year: number;\n isCurrentYearRange: boolean;\n isSelected: boolean;\n}\n\nexport function getCalendarYears(viewDate: Date, selectedDate?: Date, startYearBase?: number): CalendarYear[] {\n const year = viewDate.getFullYear();\n const rangeStart = startYearBase ?? year - (year % 12);\n const years: CalendarYear[] = [];\n for (let i = 0; i < 12; i++) {\n const y = rangeStart + i;\n years.push({\n year: y,\n isCurrentYearRange: y === year,\n isSelected: !!selectedDate && selectedDate.getFullYear() === y,\n });\n }\n return years;\n}\n\n/** 获取 years 视图标题所显示的年份档区间起点 */\nexport function getYearRangeStart(viewDate: Date): number {\n const year = viewDate.getFullYear();\n return year - (year % 12);\n}\n\n/** 中文月份名称 */\nexport const MONTH_NAMES = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];\n\n/** 中文星期名称 */\nexport const WEEK_DAY_NAMES = ['日', '一', '二', '三', '四', '五', '六'];\n"],"version":3}
|
|
@@ -87,7 +87,7 @@ const Affix = class {
|
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
render() {
|
|
90
|
-
return (h("div", { key: '
|
|
90
|
+
return (h("div", { key: '374ccf4d24df0d0e4ca4dd35b915a34a39669056', class: { 'hb-affix': true, 'hb-affix--fixed': this.affixed }, style: this.affixed ? this.fixedStyle : undefined }, h("slot", { key: '5f7c0c1341c274663846cc6d4264129415c6fffc' })));
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
Affix.style = HbAffixStyle0;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-fdf7135e.js';
|
|
2
|
+
import { a as activationClickHandler } from './a11y-e4cde5b0.js';
|
|
2
3
|
|
|
3
4
|
const alertCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-alert{align-items:flex-start;border-radius:var(--hb-border-radius-base);display:flex;font-size:var(--hb-font-size-sm);gap:var(--hb-spacing-xs);line-height:1.5;padding:var(--hb-spacing-sm)var(--hb-spacing-md)}.hb-alert--center{justify-content:center;text-align:center}.hb-alert__icon{flex-shrink:0;font-size:16px;margin-top:2px}.hb-alert__body{flex:1}.hb-alert__title{font-weight:600}.hb-alert__description{font-size:var(--hb-font-size-xs);margin-top:4px;opacity:.85}.hb-alert__close{cursor:pointer;flex-shrink:0;font-size:16px;opacity:.6}.hb-alert__close:hover{opacity:1}.hb-alert--success{background:var(--hb-color-success-bg);border:1px solid var(--hb-color-success-border);color:var(--hb-color-success)}.hb-alert--warning{background:var(--hb-color-warning-bg);border:1px solid var(--hb-color-warning-border);color:var(--hb-color-warning)}.hb-alert--error{background:var(--hb-color-danger-bg);border:1px solid var(--hb-color-danger-border);color:var(--hb-color-danger)}.hb-alert--info{background:var(--hb-color-primary-bg);border:1px solid var(--hb-color-primary-border);color:var(--hb-color-primary)}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
4
5
|
const HbAlertStyle0 = alertCss;
|
|
@@ -33,7 +34,7 @@ const Alert = class {
|
|
|
33
34
|
// error/warning 是紧急通告 → role=alert(断言式,屏幕阅读器即时朗读);
|
|
34
35
|
// info/success 是状态信息 → role=status(礼貌式,不打断)。
|
|
35
36
|
const liveRole = this.type === 'error' || this.type === 'warning' ? 'alert' : 'status';
|
|
36
|
-
return (h("div", { class: { 'hb-alert': true, [`hb-alert--${this.type}`]: true, 'hb-alert--center': this.center, 'hb-alert--with-description': !!this.description }, role: liveRole }, this.showIcon && h("span", { class: "hb-alert__icon", "aria-hidden": "true" }, icons[this.type]), h("div", { class: "hb-alert__body" }, h("div", { class: "hb-alert__title" }, this.title), this.description && h("div", { class: "hb-alert__description" }, this.description)), this.closable && h("span", { class: "hb-alert__close", role: "button", "aria-label": "\u5173\u95ED", tabIndex: 0, onClick: this.handleClose }, "\u00D7")));
|
|
37
|
+
return (h("div", { class: { 'hb-alert': true, [`hb-alert--${this.type}`]: true, 'hb-alert--center': this.center, 'hb-alert--with-description': !!this.description }, role: liveRole }, this.showIcon && (h("span", { class: "hb-alert__icon", "aria-hidden": "true" }, icons[this.type])), h("div", { class: "hb-alert__body" }, h("div", { class: "hb-alert__title" }, this.title), this.description && h("div", { class: "hb-alert__description" }, this.description)), this.closable && (h("span", { class: "hb-alert__close", role: "button", "aria-label": "\u5173\u95ED", tabIndex: 0, onClick: this.handleClose, onKeyDown: activationClickHandler }, "\u00D7"))));
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
Alert.style = HbAlertStyle0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"hb-alert.entry.js","mappings":"
|
|
1
|
+
{"file":"hb-alert.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,otNAAotN,CAAC;AACtuN,sBAAe,QAAQ;;MCWV,KAAK;;;;;;IAER,KAAK,GAAW,EAAE,CAAC;;IAGnB,WAAW,CAAU;;IAGrB,IAAI,GAA6C,MAAM,CAAC;;IAGxD,QAAQ,GAAY,KAAK,CAAC;;IAG1B,QAAQ,GAAY,IAAI,CAAC;;IAGzB,MAAM,GAAY,KAAK,CAAC;IAEvB,MAAM,GAAY,KAAK,CAAC;IAExB,OAAO,CAAqB;IAE7B,WAAW,GAAG;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;KACrB,CAAC;IAEF,MAAM;QACJ,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC7B,MAAM,KAAK,GAA2B,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;;;QAG5F,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;QACvF,QACE,WAAK,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,aAAa,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,EAAE,kBAAkB,EAAE,IAAI,CAAC,MAAM,EAAE,4BAA4B,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,IAClK,IAAI,CAAC,QAAQ,KACZ,YAAM,KAAK,EAAC,gBAAgB,iBAAa,MAAM,IAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CACZ,CACR,EACD,WAAK,KAAK,EAAC,gBAAgB,IACzB,WAAK,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,KAAK,CAAO,EAC9C,IAAI,CAAC,WAAW,IAAI,WAAK,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,WAAW,CAAO,CAC5E,EACL,IAAI,CAAC,QAAQ,KACZ,YAAM,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,QAAQ,gBAAY,cAAI,EAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,sBAAsB,aAE9H,CACR,CACG,EACN;KACH;;;;;;","names":[],"sources":["src/components/Alert/alert.css?tag=hb-alert&encapsulation=shadow","src/components/Alert/Alert.tsx"],"sourcesContent":[":host { display: block; }\n.hb-alert {\n display: flex; align-items: flex-start; gap: var(--hb-spacing-xs);\n padding: var(--hb-spacing-sm) var(--hb-spacing-md);\n border-radius: var(--hb-border-radius-base);\n font-size: var(--hb-font-size-sm);\n line-height: 1.5;\n}\n.hb-alert--center { justify-content: center; text-align: center; }\n.hb-alert__icon { font-size: 16px; margin-top: 2px; flex-shrink: 0; }\n.hb-alert__body { flex: 1; }\n.hb-alert__title { font-weight: 600; }\n.hb-alert__description { margin-top: 4px; font-size: var(--hb-font-size-xs); opacity: 0.85; }\n.hb-alert__close { cursor: pointer; font-size: 16px; opacity: 0.6; flex-shrink: 0; }\n.hb-alert__close:hover { opacity: 1; }\n\n.hb-alert--success { background: var(--hb-color-success-bg); color: var(--hb-color-success); border: 1px solid var(--hb-color-success-border); }\n.hb-alert--warning { background: var(--hb-color-warning-bg); color: var(--hb-color-warning); border: 1px solid var(--hb-color-warning-border); }\n.hb-alert--error { background: var(--hb-color-danger-bg); color: var(--hb-color-danger); border: 1px solid var(--hb-color-danger-border); }\n.hb-alert--info { background: var(--hb-color-primary-bg); color: var(--hb-color-primary); border: 1px solid var(--hb-color-primary-border); }\n","import { Component, h, Prop, Event, EventEmitter, State } from '@stencil/core';\nimport { activationClickHandler } from '../../utils/a11y';\n\n/**\n * Alert 警告提示组件\n * 展示需要关注的信息\n */\n@Component({\n tag: 'hb-alert',\n styleUrl: 'alert.css',\n shadow: true,\n})\nexport class Alert {\n /** 标题 */\n @Prop() title: string = '';\n\n /** 描述文字 */\n @Prop() description?: string;\n\n /** 类型 */\n @Prop() type: 'success' | 'warning' | 'info' | 'error' = 'info';\n\n /** 是否可关闭 */\n @Prop() closable: boolean = false;\n\n /** 是否显示图标 */\n @Prop() showIcon: boolean = true;\n\n /** 是否居中 */\n @Prop() center: boolean = false;\n\n @State() closed: boolean = false;\n\n @Event() hbClose: EventEmitter<void>;\n\n private handleClose = () => {\n this.closed = true;\n this.hbClose.emit();\n };\n\n render() {\n if (this.closed) return null;\n const icons: Record<string, string> = { success: '✓', warning: '⚠', info: 'ℹ', error: '✕' };\n // error/warning 是紧急通告 → role=alert(断言式,屏幕阅读器即时朗读);\n // info/success 是状态信息 → role=status(礼貌式,不打断)。\n const liveRole = this.type === 'error' || this.type === 'warning' ? 'alert' : 'status';\n return (\n <div class={{ 'hb-alert': true, [`hb-alert--${this.type}`]: true, 'hb-alert--center': this.center, 'hb-alert--with-description': !!this.description }} role={liveRole}>\n {this.showIcon && (\n <span class=\"hb-alert__icon\" aria-hidden=\"true\">\n {icons[this.type]}\n </span>\n )}\n <div class=\"hb-alert__body\">\n <div class=\"hb-alert__title\">{this.title}</div>\n {this.description && <div class=\"hb-alert__description\">{this.description}</div>}\n </div>\n {this.closable && (\n <span class=\"hb-alert__close\" role=\"button\" aria-label=\"关闭\" tabIndex={0} onClick={this.handleClose} onKeyDown={activationClickHandler}>\n ×\n </span>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -16,7 +16,7 @@ const Aside = class {
|
|
|
16
16
|
if (this.width) {
|
|
17
17
|
style.width = this.width;
|
|
18
18
|
}
|
|
19
|
-
return (h("aside", { key: '
|
|
19
|
+
return (h("aside", { key: '2615bba7300b1d86fa82a1618718e07479f41348', class: "hb-aside", style: style }, h("slot", { key: 'dd4ad7e905f2ea8c72bc4d70c82ab0a13bed5e0f' })));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
Aside.style = HbAsideStyle0;
|
|
@@ -17,7 +17,7 @@ const Avatar = class {
|
|
|
17
17
|
return typeof this.size === 'number' ? `${this.size}px` : map[this.size];
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h("span", { key: '
|
|
20
|
+
return (h("span", { key: '41fda719b0c3d2ca0a562a0b4ff98e3705cac0c0', class: { 'hb-avatar': true, [`hb-avatar--${this.shape}`]: true }, style: { width: this.sizePx, height: this.sizePx, fontSize: `calc(${this.sizePx} * 0.45)` } }, this.src ? h("img", { src: this.src, alt: this.alt }) : this.icon ? h("span", null, this.icon) : h("slot", null)));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
Avatar.style = HbAvatarStyle0;
|
|
@@ -81,12 +81,12 @@ const Backtop = class {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
render() {
|
|
84
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '5406d83477f015dc770e46c3e495a5c036effa61', class: { 'hb-backtop': true, 'hb-backtop--hidden': !this.visible }, style: {
|
|
85
85
|
right: `${this.right}px`,
|
|
86
86
|
bottom: `${this.bottom}px`,
|
|
87
87
|
visibility: this.visible ? 'visible' : 'hidden',
|
|
88
88
|
opacity: this.visible ? '1' : '0',
|
|
89
|
-
} }, h("div", { key: '
|
|
89
|
+
} }, h("div", { key: 'dd75722c174dc48fd77ca0342955745a8e233f98', class: "hb-backtop__inner", onClick: this.scrollToTop }, h("slot", { key: '7dda375453258d76e61720d5689cbe79dd564046' }, h("span", { key: '96bf90719eff982610a4bcd44367c2250ebedfd4', class: "hb-backtop__icon" }, "\u2191")))));
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
Backtop.style = HbBacktopStyle0;
|
|
@@ -21,7 +21,7 @@ const Badge = class {
|
|
|
21
21
|
return String(this.value);
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h("div", { key: '
|
|
24
|
+
return (h("div", { key: 'f8c6ce8c0c83e0a6332f305c4e1d83e42f0ed8da', class: "hb-badge" }, h("slot", { key: 'c7a52c406aaa545972888f4761b0e8637e5a76f9' }), !this.hidden && (h("sup", { key: '9786f19cb8fc171d7265b0d14624e51d6b72a250', class: { 'hb-badge__content': true, [`hb-badge__content--${this.type}`]: true, 'hb-badge__content--dot': this.isDot } }, this.displayValue))));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
Badge.style = HbBadgeStyle0;
|
|
@@ -12,7 +12,7 @@ const BreadcrumbItem = class {
|
|
|
12
12
|
// 从父级 hb-breadcrumb 读取分隔符 prop
|
|
13
13
|
// 优先级:item 的 separator slot > breadcrumb.separator > 默认 '/'
|
|
14
14
|
const parentSeparator = this.el.closest('hb-breadcrumb')?.separator;
|
|
15
|
-
return (h("span", { key: '
|
|
15
|
+
return (h("span", { key: '181c8e289f83b6a95445bee02ae0e6405a3ac7c7', class: "hb-breadcrumb-item" }, h(Tag, { key: 'af828de3d06e5a41c52b23b874d0b211a44e4169', class: "hb-breadcrumb-item__inner", href: this.href }, h("slot", { key: '0c4b87ea5809acd5e2b2d53f59011a32fae8d370' })), h("span", { key: '106653462a241dcc2a64556b4a5bae60a548d766', class: "hb-breadcrumb-item__separator" }, h("slot", { key: '905f0e3fffa0a2d7452065f95f33c39c4c3382b8', name: "separator" }, parentSeparator ?? '/'))));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -10,7 +10,7 @@ const Breadcrumb = class {
|
|
|
10
10
|
/** 分隔符 */
|
|
11
11
|
separator = '/';
|
|
12
12
|
render() {
|
|
13
|
-
return (h("nav", { key: '
|
|
13
|
+
return (h("nav", { key: '404e3b9cb740956fa8e3f12ca91efec1d3d0a03b', class: "hb-breadcrumb", "aria-label": "Breadcrumb" }, h("slot", { key: '8fac787347489530954f2edbe79dab5d05ce7ef4' })));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
Breadcrumb.style = HbBreadcrumbStyle0;
|
|
@@ -18,14 +18,14 @@ const Button = class {
|
|
|
18
18
|
/** 是否加载中 */
|
|
19
19
|
loading = false;
|
|
20
20
|
render() {
|
|
21
|
-
return (h("button", { key: '
|
|
21
|
+
return (h("button", { key: '77ba452cfa960b02e746b2494aa1f471a85d33fd', disabled: this.disabled || this.loading, class: {
|
|
22
22
|
'hb-button': true,
|
|
23
23
|
[`hb-button--${this.type}`]: true,
|
|
24
24
|
[`hb-button--${this.size}`]: true,
|
|
25
25
|
'hb-button--disabled': this.disabled,
|
|
26
26
|
'hb-button--loading': this.loading,
|
|
27
27
|
[this.classNames]: !!this.classNames,
|
|
28
|
-
} }, this.loading && h("span", { key: '
|
|
28
|
+
} }, this.loading && h("span", { key: '152d4a7657ba8399554782c7abd38a6c5b26de17', class: "hb-button__loading-icon" }, "\u23F3"), h("slot", { key: '9381db3ab788d9bfe73c8b29d422642d1a8eacbc' })));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
Button.style = HbButtonStyle0;
|