huibo-ui 0.3.0 → 0.4.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/{date-helpers-904747ff.js → date-helpers-1ffddc59.js} +7 -3
- package/dist/cjs/date-helpers-1ffddc59.js.map +1 -0
- package/dist/cjs/hb-affix.cjs.entry.js +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 +270 -146
- package/dist/cjs/hb-cascader.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/hb-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/hb-collapse-item.cjs.entry.js +1 -1
- package/dist/cjs/hb-collapse.cjs.entry.js +1 -1
- package/dist/cjs/hb-color-picker-panel.cjs.entry.js +2 -2
- package/dist/cjs/hb-color-picker.cjs.entry.js +91 -14
- 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 +85 -7
- 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-divider.cjs.entry.js +2 -2
- package/dist/cjs/hb-drawer.cjs.entry.js +1 -1
- package/dist/cjs/hb-dropdown.cjs.entry.js +74 -6
- 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 +59 -8
- package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-form.cjs.entry.js +3 -3
- 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 +12 -8
- package/dist/cjs/hb-image-preview.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-image.cjs.entry.js +1 -1
- package/dist/cjs/hb-input-number.cjs.entry.js +5 -5
- package/dist/cjs/hb-input-tag.cjs.entry.js +2 -2
- package/dist/cjs/hb-input.cjs.entry.js +39 -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 +2 -2
- 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 +2 -2
- 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 +21 -8
- package/dist/cjs/hb-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popconfirm.cjs.entry.js +37 -7
- package/dist/cjs/hb-popconfirm.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-popover.cjs.entry.js +22 -2
- 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 +2 -2
- package/dist/cjs/hb-rate.cjs.entry.js +45 -3
- 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-segmented.cjs.entry.js +39 -5
- package/dist/cjs/hb-segmented.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-select.cjs.entry.js +47 -8
- package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-slider.cjs.entry.js +189 -20
- 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 +4 -4
- 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 +1 -1
- package/dist/cjs/hb-table.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tabs.cjs.entry.js +2 -2
- package/dist/cjs/hb-tag.cjs.entry.js +2 -2
- package/dist/cjs/hb-text.cjs.entry.js +2 -2
- package/dist/cjs/hb-time-picker.cjs.entry.js +4 -4
- package/dist/cjs/hb-time-select.cjs.entry.js +2 -2
- package/dist/cjs/hb-timeline.cjs.entry.js +1 -1
- package/dist/cjs/hb-tooltip.cjs.entry.js +18 -1
- 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 +95 -18
- package/dist/cjs/hb-tree-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-tree.cjs.entry.js +1 -1
- package/dist/cjs/hb-upload.cjs.entry.js +3 -3
- package/dist/cjs/hb-watermark.cjs.entry.js +1 -1
- package/dist/cjs/huibo-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/Affix/Affix.js +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 +374 -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 +3 -3
- package/dist/collection/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/collection/components/Collapse/Collapse.js +1 -1
- package/dist/collection/components/Collapse/CollapseItem.js +1 -1
- package/dist/collection/components/ColorPicker/ColorPicker.js +92 -14
- package/dist/collection/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/collection/components/ColorPicker/color-picker.css +13 -0
- 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 +89 -10
- package/dist/collection/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/collection/components/DatePicker/date-picker.css +62 -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 +22 -0
- package/dist/collection/components/Divider/Divider.js +2 -2
- package/dist/collection/components/Drawer/Drawer.js +1 -1
- package/dist/collection/components/Dropdown/Dropdown.js +83 -7
- package/dist/collection/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/collection/components/Dropdown/dropdown.css +2 -1
- 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 +2 -2
- package/dist/collection/components/Form/FormItem.js +60 -9
- package/dist/collection/components/Form/FormItem.js.map +1 -1
- package/dist/collection/components/Form/form-item.css +49 -4
- package/dist/collection/components/Form/form.css +1 -0
- package/dist/collection/components/Image/Image.js +1 -1
- package/dist/collection/components/ImagePreview/ImagePreview.js +12 -8
- package/dist/collection/components/ImagePreview/ImagePreview.js.map +1 -1
- package/dist/collection/components/Input/Input.js +38 -2
- package/dist/collection/components/Input/Input.js.map +1 -1
- package/dist/collection/components/Input/input.css +21 -2
- package/dist/collection/components/InputNumber/InputNumber.js +5 -5
- 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 +524 -0
- 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 +2 -2
- 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 +2 -2
- 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 +23 -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 +44 -7
- package/dist/collection/components/Popconfirm/Popconfirm.js.map +1 -1
- package/dist/collection/components/Popover/Popover.js +29 -2
- package/dist/collection/components/Popover/Popover.js.map +1 -1
- package/dist/collection/components/Progress/Progress.js +1 -1
- package/dist/collection/components/Radio/Radio.js +2 -2
- package/dist/collection/components/Rate/Rate.js +45 -3
- package/dist/collection/components/Rate/Rate.js.map +1 -1
- package/dist/collection/components/Result/Result.js +1 -1
- package/dist/collection/components/Segmented/Segmented.js +51 -6
- package/dist/collection/components/Segmented/Segmented.js.map +1 -1
- package/dist/collection/components/Select/Select.js +46 -7
- package/dist/collection/components/Select/Select.js.map +1 -1
- package/dist/collection/components/Select/select.css +50 -4
- package/dist/collection/components/Slider/Slider.js +221 -21
- package/dist/collection/components/Slider/Slider.js.map +1 -1
- package/dist/collection/components/Slider/slider.css +58 -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 +45 -0
- package/dist/collection/components/Table/table.css +20 -0
- package/dist/collection/components/Tabs/TabPane.js +1 -1
- package/dist/collection/components/Tabs/Tabs.js +2 -2
- package/dist/collection/components/Tag/Tag.js +2 -2
- package/dist/collection/components/Text/Text.js +2 -2
- package/dist/collection/components/TimePicker/TimePicker.js +4 -4
- package/dist/collection/components/TimeSelect/TimeSelect.js +2 -2
- package/dist/collection/components/Timeline/Timeline.js +1 -1
- package/dist/collection/components/Tooltip/Tooltip.js +25 -2
- package/dist/collection/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/collection/components/Transfer/Transfer.js +2 -2
- package/dist/collection/components/Tree/Tree.js +1 -1
- package/dist/collection/components/TreeSelect/TreeSelect.js +94 -17
- 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 +1 -1
- package/dist/collection/utils/date-helpers.js +6 -2
- package/dist/collection/utils/date-helpers.js.map +1 -1
- package/dist/components/hb-affix.js +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 +273 -146
- package/dist/components/hb-cascader.js.map +1 -1
- package/dist/components/hb-checkbox-group.js +2 -2
- package/dist/components/hb-checkbox.js +3 -3
- package/dist/components/hb-collapse-item.js +1 -1
- package/dist/components/hb-collapse.js +1 -1
- package/dist/components/hb-color-picker-panel.js +2 -2
- package/dist/components/hb-color-picker.js +93 -15
- 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 +87 -8
- 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-divider.js +2 -2
- package/dist/components/hb-drawer.js +1 -1
- package/dist/components/hb-dropdown.js +76 -7
- 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 +59 -8
- package/dist/components/hb-form-item.js.map +1 -1
- package/dist/components/hb-form.js +3 -3
- 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 +12 -8
- package/dist/components/hb-image-preview.js.map +1 -1
- package/dist/components/hb-image.js +1 -1
- package/dist/components/hb-input-number.js +5 -5
- package/dist/components/hb-input-tag.js +2 -2
- package/dist/components/hb-input.js +39 -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 +2 -2
- package/dist/components/hb-menu.js +3 -3
- package/dist/components/hb-menu.js.map +1 -1
- package/dist/components/hb-message.js +2 -2
- package/dist/components/hb-notification.js +2 -2
- package/dist/components/hb-page-header.js +1 -1
- package/dist/components/hb-pagination.js +25 -10
- package/dist/components/hb-pagination.js.map +1 -1
- package/dist/components/hb-popconfirm.js +37 -7
- package/dist/components/hb-popconfirm.js.map +1 -1
- package/dist/components/hb-popover.js +22 -2
- package/dist/components/hb-popover.js.map +1 -1
- package/dist/components/hb-progress.js +1 -1
- package/dist/components/hb-radio.js +2 -2
- package/dist/components/hb-rate.js +45 -3
- 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-segmented.js +41 -6
- package/dist/components/hb-segmented.js.map +1 -1
- package/dist/components/hb-select.js +47 -8
- package/dist/components/hb-select.js.map +1 -1
- package/dist/components/hb-slider.js +194 -21
- 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 +4 -4
- 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 +1 -1
- package/dist/components/hb-table.js.map +1 -1
- package/dist/components/hb-tabs.js +2 -2
- package/dist/components/hb-tag.js +2 -2
- package/dist/components/hb-text.js +2 -2
- package/dist/components/hb-time-picker.js +4 -4
- package/dist/components/hb-time-select.js +2 -2
- package/dist/components/hb-timeline.js +1 -1
- package/dist/components/hb-tooltip.js +18 -1
- package/dist/components/hb-tooltip.js.map +1 -1
- package/dist/components/hb-transfer.js +2 -2
- package/dist/components/hb-tree-select.js +95 -18
- package/dist/components/hb-tree-select.js.map +1 -1
- package/dist/components/hb-tree.js +1 -1
- package/dist/components/hb-upload.js +3 -3
- package/dist/components/hb-watermark.js +1 -1
- package/dist/components/{p-cf94cbf6.js → p-08b4005c.js} +7 -3
- package/dist/components/p-08b4005c.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 → date-helpers-44507189.js} +7 -3
- package/dist/esm/date-helpers-44507189.js.map +1 -0
- package/dist/esm/hb-affix.entry.js +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 +270 -146
- package/dist/esm/hb-cascader.entry.js.map +1 -1
- package/dist/esm/hb-checkbox-group.entry.js +2 -2
- package/dist/esm/hb-checkbox.entry.js +3 -3
- package/dist/esm/hb-collapse-item.entry.js +1 -1
- package/dist/esm/hb-collapse.entry.js +1 -1
- package/dist/esm/hb-color-picker-panel.entry.js +2 -2
- package/dist/esm/hb-color-picker.entry.js +91 -14
- 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 +85 -7
- 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-divider.entry.js +2 -2
- package/dist/esm/hb-drawer.entry.js +1 -1
- package/dist/esm/hb-dropdown.entry.js +74 -6
- 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 +59 -8
- package/dist/esm/hb-form-item.entry.js.map +1 -1
- package/dist/esm/hb-form.entry.js +3 -3
- 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 +12 -8
- package/dist/esm/hb-image-preview.entry.js.map +1 -1
- package/dist/esm/hb-image.entry.js +1 -1
- package/dist/esm/hb-input-number.entry.js +5 -5
- package/dist/esm/hb-input-tag.entry.js +2 -2
- package/dist/esm/hb-input.entry.js +39 -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 +2 -2
- 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 +2 -2
- 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 +21 -8
- package/dist/esm/hb-pagination.entry.js.map +1 -1
- package/dist/esm/hb-popconfirm.entry.js +37 -7
- package/dist/esm/hb-popconfirm.entry.js.map +1 -1
- package/dist/esm/hb-popover.entry.js +22 -2
- 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 +2 -2
- package/dist/esm/hb-rate.entry.js +45 -3
- 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-segmented.entry.js +40 -6
- package/dist/esm/hb-segmented.entry.js.map +1 -1
- package/dist/esm/hb-select.entry.js +47 -8
- package/dist/esm/hb-select.entry.js.map +1 -1
- package/dist/esm/hb-slider.entry.js +189 -20
- 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 +4 -4
- 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 +1 -1
- package/dist/esm/hb-table.entry.js.map +1 -1
- package/dist/esm/hb-tabs.entry.js +2 -2
- package/dist/esm/hb-tag.entry.js +2 -2
- package/dist/esm/hb-text.entry.js +2 -2
- package/dist/esm/hb-time-picker.entry.js +4 -4
- package/dist/esm/hb-time-select.entry.js +2 -2
- package/dist/esm/hb-timeline.entry.js +1 -1
- package/dist/esm/hb-tooltip.entry.js +18 -1
- 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 +95 -18
- package/dist/esm/hb-tree-select.entry.js.map +1 -1
- package/dist/esm/hb-tree.entry.js +1 -1
- package/dist/esm/hb-upload.entry.js +3 -3
- package/dist/esm/hb-watermark.entry.js +1 -1
- package/dist/esm/huibo-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- 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-02f15843.entry.js +2 -0
- package/dist/huibo-ui/p-08b4005c.js +2 -0
- package/dist/huibo-ui/p-08b4005c.js.map +1 -0
- package/dist/huibo-ui/{p-fd19813c.entry.js → p-0d4b2997.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-d7815b4f.entry.js → p-13010da2.entry.js} +2 -2
- package/dist/huibo-ui/{p-8c80a765.entry.js → p-15db24e9.entry.js} +2 -2
- package/dist/huibo-ui/{p-8d925e3d.entry.js → p-1b0fbe69.entry.js} +2 -2
- package/dist/huibo-ui/p-1f8db37a.entry.js +2 -0
- package/dist/huibo-ui/p-1f8db37a.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-315feadf.entry.js → p-213b9de7.entry.js} +2 -2
- package/dist/huibo-ui/p-25fd7d5c.entry.js +2 -0
- package/dist/huibo-ui/p-25fd7d5c.entry.js.map +1 -0
- package/dist/huibo-ui/p-2811e603.entry.js +2 -0
- package/dist/huibo-ui/p-2811e603.entry.js.map +1 -0
- package/dist/huibo-ui/{p-64ca0980.entry.js → p-2943f5d0.entry.js} +2 -2
- package/dist/huibo-ui/p-2943f5d0.entry.js.map +1 -0
- package/dist/huibo-ui/{p-710f38de.entry.js → p-2b4556ff.entry.js} +2 -2
- package/dist/huibo-ui/{p-e0ab9010.entry.js → p-33de6878.entry.js} +2 -2
- package/dist/huibo-ui/{p-ebd04656.entry.js → p-3807da71.entry.js} +2 -2
- package/dist/huibo-ui/{p-6a1ec3ff.entry.js → p-3deff48c.entry.js} +2 -2
- package/dist/huibo-ui/{p-e2a8a396.entry.js → p-41d9c846.entry.js} +2 -2
- package/dist/huibo-ui/{p-0a033738.entry.js → p-47ef7a86.entry.js} +2 -2
- package/dist/huibo-ui/p-4d34e43e.entry.js +2 -0
- package/dist/huibo-ui/p-4d34e43e.entry.js.map +1 -0
- package/dist/huibo-ui/p-54aa2fd8.entry.js +2 -0
- package/dist/huibo-ui/p-54aa2fd8.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-c1b4eacb.entry.js → p-60532a1f.entry.js} +2 -2
- package/dist/huibo-ui/{p-59b2e61c.entry.js → p-626b48f1.entry.js} +2 -2
- package/dist/huibo-ui/p-626b48f1.entry.js.map +1 -0
- package/dist/huibo-ui/p-639f167d.entry.js +2 -0
- package/dist/huibo-ui/p-639f167d.entry.js.map +1 -0
- package/dist/huibo-ui/{p-f1c084c5.entry.js → p-678b4212.entry.js} +2 -2
- package/dist/huibo-ui/p-6beb5b81.entry.js +2 -0
- package/dist/huibo-ui/p-6beb5b81.entry.js.map +1 -0
- package/dist/huibo-ui/{p-a0015341.entry.js → p-6bfeab80.entry.js} +2 -2
- 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-85f68526.entry.js → p-735bceef.entry.js} +2 -2
- package/dist/huibo-ui/{p-8b1ae77e.entry.js → p-746a11a3.entry.js} +2 -2
- package/dist/huibo-ui/p-76519752.entry.js +2 -0
- package/dist/huibo-ui/{p-d3939d44.entry.js → p-79af2efa.entry.js} +2 -2
- package/dist/huibo-ui/{p-e0768565.entry.js → p-7da14d7c.entry.js} +2 -2
- package/dist/huibo-ui/{p-8c987d57.entry.js → p-7f65dc36.entry.js} +2 -2
- package/dist/huibo-ui/{p-0e65e1bd.entry.js → p-86bdc48a.entry.js} +2 -2
- package/dist/huibo-ui/p-86bdc48a.entry.js.map +1 -0
- package/dist/huibo-ui/{p-d87fc21a.entry.js → p-88a6c905.entry.js} +2 -2
- package/dist/huibo-ui/{p-d64b91ef.entry.js → p-89ea1141.entry.js} +2 -2
- package/dist/huibo-ui/p-89ea1141.entry.js.map +1 -0
- 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-8a8443b8.entry.js +2 -0
- package/dist/huibo-ui/p-8a8443b8.entry.js.map +1 -0
- package/dist/huibo-ui/p-8fd788c9.entry.js +2 -0
- package/dist/huibo-ui/p-8fd788c9.entry.js.map +1 -0
- package/dist/huibo-ui/{p-9319c650.entry.js → p-8fdbd17c.entry.js} +2 -2
- package/dist/huibo-ui/p-92521c31.entry.js +2 -0
- package/dist/huibo-ui/p-92521c31.entry.js.map +1 -0
- package/dist/huibo-ui/{p-c3e665f6.entry.js → p-9a5406f0.entry.js} +2 -2
- package/dist/huibo-ui/p-9a5406f0.entry.js.map +1 -0
- package/dist/huibo-ui/{p-c321c4aa.entry.js → p-a084b8e5.entry.js} +2 -2
- package/dist/huibo-ui/{p-5df47135.entry.js → p-a190ca89.entry.js} +2 -2
- package/dist/huibo-ui/{p-463de26d.entry.js → p-a8996d22.entry.js} +2 -2
- package/dist/huibo-ui/p-aa5e5e02.entry.js +2 -0
- package/dist/huibo-ui/p-aa5e5e02.entry.js.map +1 -0
- package/dist/huibo-ui/{p-6b381d0e.entry.js → p-ab9cf0e4.entry.js} +2 -2
- package/dist/huibo-ui/{p-477d8568.entry.js → p-aeae83af.entry.js} +2 -2
- package/dist/huibo-ui/{p-77017274.entry.js → p-af74667d.entry.js} +2 -2
- package/dist/huibo-ui/{p-b489a526.entry.js → p-b06c8020.entry.js} +2 -2
- package/dist/huibo-ui/{p-2e6584ea.entry.js → p-b468858e.entry.js} +2 -2
- package/dist/huibo-ui/{p-2b286698.entry.js → p-b7885d4a.entry.js} +2 -2
- package/dist/huibo-ui/{p-231a7335.entry.js → p-b8d87f7e.entry.js} +2 -2
- package/dist/huibo-ui/{p-8b027491.entry.js → p-c50ad398.entry.js} +2 -2
- package/dist/huibo-ui/p-c6c91664.entry.js +2 -0
- package/dist/huibo-ui/{p-c3e8893d.entry.js → p-c80f8ace.entry.js} +2 -2
- package/dist/huibo-ui/p-c80f8ace.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-c922d672.entry.js → p-cad57c2d.entry.js} +2 -2
- package/dist/huibo-ui/{p-a042e3d0.entry.js → p-ccd09d5a.entry.js} +2 -2
- package/dist/huibo-ui/p-d79a15b1.entry.js +2 -0
- package/dist/huibo-ui/p-d79a15b1.entry.js.map +1 -0
- package/dist/huibo-ui/{p-10c088f3.entry.js → p-d9c7c378.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-be48d2aa.entry.js → p-e039155d.entry.js} +2 -2
- package/dist/huibo-ui/{p-dfaf7e37.entry.js → p-e10fcfbe.entry.js} +2 -2
- package/dist/huibo-ui/{p-079a4130.entry.js → p-e3155cd7.entry.js} +2 -2
- package/dist/huibo-ui/{p-4001c08d.entry.js → p-e5cbfa9e.entry.js} +2 -2
- package/dist/huibo-ui/p-e5cbfa9e.entry.js.map +1 -0
- package/dist/huibo-ui/p-edbda423.entry.js +2 -0
- package/dist/huibo-ui/p-edbda423.entry.js.map +1 -0
- package/dist/huibo-ui/{p-465dcb4c.entry.js → p-f2c78699.entry.js} +2 -2
- package/dist/huibo-ui/{p-6ac242fe.entry.js → p-f4336be9.entry.js} +2 -2
- package/dist/huibo-ui/{p-332c8877.entry.js → p-f5969181.entry.js} +2 -2
- package/dist/huibo-ui/{p-f81ec512.entry.js → p-f6889710.entry.js} +2 -2
- package/dist/huibo-ui/{p-24ad7eec.entry.js → p-f9bb5217.entry.js} +2 -2
- package/dist/huibo-ui/{p-4d8b1404.entry.js → p-fd8301c6.entry.js} +2 -2
- package/dist/huibo-ui/{p-dd05cb2c.entry.js → p-fea20295.entry.js} +2 -2
- package/dist/types/components/Calendar/Calendar.d.ts +13 -1
- package/dist/types/components/Cascader/Cascader.d.ts +68 -90
- package/dist/types/components/ColorPicker/ColorPicker.d.ts +11 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +14 -3
- package/dist/types/components/Dropdown/Dropdown.d.ts +14 -1
- package/dist/types/components/Form/FormItem.d.ts +10 -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/Pagination/Pagination.d.ts +3 -0
- package/dist/types/components/Popconfirm/Popconfirm.d.ts +12 -0
- package/dist/types/components/Popover/Popover.d.ts +9 -0
- package/dist/types/components/Rate/Rate.d.ts +7 -0
- package/dist/types/components/Segmented/Segmented.d.ts +12 -1
- package/dist/types/components/Select/Select.d.ts +6 -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/Tooltip/Tooltip.d.ts +9 -1
- package/dist/types/components/TreeSelect/TreeSelect.d.ts +9 -0
- package/dist/types/components.d.ts +250 -94
- package/dist/types/utils/date-helpers.d.ts +1 -1
- package/package.json +8 -2
- package/readme.md +88 -73
- package/dist/cjs/date-helpers-904747ff.js.map +0 -1
- package/dist/components/p-cf94cbf6.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-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-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-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-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-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-c3e665f6.entry.js.map +0 -1
- package/dist/huibo-ui/p-c3e8893d.entry.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-d64b91ef.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-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-4d0dff15.entry.js.map → p-02f15843.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-fd19813c.entry.js.map → p-0d4b2997.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-d7815b4f.entry.js.map → p-13010da2.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-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-315feadf.entry.js.map → p-213b9de7.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-710f38de.entry.js.map → p-2b4556ff.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e0ab9010.entry.js.map → p-33de6878.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-ebd04656.entry.js.map → p-3807da71.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-e2a8a396.entry.js.map → p-41d9c846.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-0a033738.entry.js.map → p-47ef7a86.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-c1b4eacb.entry.js.map → p-60532a1f.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f1c084c5.entry.js.map → p-678b4212.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-85f68526.entry.js.map → p-735bceef.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-953b9514.entry.js.map → p-76519752.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-d3939d44.entry.js.map → p-79af2efa.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-e0768565.entry.js.map → p-7da14d7c.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-d87fc21a.entry.js.map → p-88a6c905.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-9319c650.entry.js.map → p-8fdbd17c.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-c321c4aa.entry.js.map → p-a084b8e5.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-463de26d.entry.js.map → p-a8996d22.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-6b381d0e.entry.js.map → p-ab9cf0e4.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-77017274.entry.js.map → p-af74667d.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-2e6584ea.entry.js.map → p-b468858e.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-231a7335.entry.js.map → p-b8d87f7e.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-8b027491.entry.js.map → p-c50ad398.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-769960f4.entry.js.map → p-c6c91664.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-c922d672.entry.js.map → p-cad57c2d.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-a042e3d0.entry.js.map → p-ccd09d5a.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-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-be48d2aa.entry.js.map → p-e039155d.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-dfaf7e37.entry.js.map → p-e10fcfbe.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-465dcb4c.entry.js.map → p-f2c78699.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-6ac242fe.entry.js.map → p-f4336be9.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-332c8877.entry.js.map → p-f5969181.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-f81ec512.entry.js.map → p-f6889710.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-24ad7eec.entry.js.map → p-f9bb5217.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-4d8b1404.entry.js.map → p-fd8301c6.entry.js.map} +0 -0
- /package/dist/huibo-ui/{p-dd05cb2c.entry.js.map → p-fea20295.entry.js.map} +0 -0
|
@@ -11,7 +11,7 @@ function isSameDay(date1, date2) {
|
|
|
11
11
|
date1.getDate() === date2.getDate());
|
|
12
12
|
}
|
|
13
13
|
/** 生成 42 天(6 周)的日历网格数据 */
|
|
14
|
-
function getCalendarDays(viewDate, selectedDate, today = new Date()) {
|
|
14
|
+
function getCalendarDays(viewDate, selectedDate, today = new Date(), firstDayOfWeek = 0) {
|
|
15
15
|
const days = [];
|
|
16
16
|
const year = viewDate.getFullYear();
|
|
17
17
|
const month = viewDate.getMonth();
|
|
@@ -19,9 +19,13 @@ function getCalendarDays(viewDate, selectedDate, today = new Date()) {
|
|
|
19
19
|
const lastDay = new Date(year, month + 1, 0);
|
|
20
20
|
const firstDayWeek = firstDay.getDay();
|
|
21
21
|
const daysInMonth = lastDay.getDate();
|
|
22
|
+
// 按 firstDayOfWeek 计算需要补多少上月天数。
|
|
23
|
+
// 默认 firstDayOfWeek=0(周日为首列)时,offset = firstDayWeek;
|
|
24
|
+
// firstDayOfWeek=1(周一为首列)时,周日的 offset 多 1、周一的 offset 为 0。
|
|
25
|
+
const offset = ((firstDayWeek - firstDayOfWeek) + 7) % 7;
|
|
22
26
|
// 上月填充
|
|
23
27
|
const prevMonth = new Date(year, month - 1, 0);
|
|
24
|
-
for (let i =
|
|
28
|
+
for (let i = offset - 1; i >= 0; i--) {
|
|
25
29
|
const date = new Date(year, month - 1, prevMonth.getDate() - i);
|
|
26
30
|
days.push({
|
|
27
31
|
date,
|
|
@@ -131,4 +135,4 @@ exports.getYearRangeStart = getYearRangeStart;
|
|
|
131
135
|
exports.isSameDay = isSameDay;
|
|
132
136
|
exports.parseDate = parseDate;
|
|
133
137
|
|
|
134
|
-
//# sourceMappingURL=date-helpers-
|
|
138
|
+
//# sourceMappingURL=date-helpers-1ffddc59.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"date-helpers-1ffddc59.js","mappings":";;AAAA;;;;AAYA;SACgB,SAAS,CAAC,KAAW,EAAE,KAAW;IAChD,QACE,KAAK,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,WAAW,EAAE;QAC3C,KAAK,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,QAAQ,EAAE;QACrC,KAAK,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,OAAO,EAAE,EACnC;AACJ,CAAC;AAED;SACgB,eAAe,CAC7B,QAAc,EACd,YAAmB,EACnB,QAAc,IAAI,IAAI,EAAE,EACxB,iBAAyB,CAAC;IAE1B,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CA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AM,UAAU,GAAG,aAAa,IAAI,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC,CAAC;IACvD,MAAM,KAAK,GAAmB,EAAE,CAAC;IACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;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;IACzB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAClC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK;EACpC;AAEF;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 (\n date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate()\n );\n}\n\n/** 生成 42 天(6 周)的日历网格数据 */\nexport function getCalendarDays(\n viewDate: Date,\n selectedDate?: Date,\n today: Date = new Date(),\n firstDayOfWeek: number = 0\n): 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\n .replace('YYYY', String(year))\n .replace('MM', month)\n .replace('DD', day)\n .replace('HH', hours)\n .replace('mm', minutes)\n .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(\n viewDate: Date,\n selectedDate?: Date,\n startYearBase?: number\n): 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 '七月', '八月', '九月', '十月', '十一月', '十二月',\n];\n\n/** 中文星期名称 */\nexport const WEEK_DAY_NAMES = ['日', '一', '二', '三', '四', '五', '六'];\n"],"version":3}
|
|
@@ -91,7 +91,7 @@ const Affix = class {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
render() {
|
|
94
|
-
return (index.h("div", { key: '
|
|
94
|
+
return (index.h("div", { key: '374ccf4d24df0d0e4ca4dd35b915a34a39669056', class: { 'hb-affix': true, 'hb-affix--fixed': this.affixed }, style: this.affixed ? this.fixedStyle : undefined }, index.h("slot", { key: '5f7c0c1341c274663846cc6d4264129415c6fffc' })));
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
Affix.style = HbAffixStyle0;
|
|
@@ -20,7 +20,7 @@ const Aside = class {
|
|
|
20
20
|
if (this.width) {
|
|
21
21
|
style.width = this.width;
|
|
22
22
|
}
|
|
23
|
-
return (index.h("aside", { key: '
|
|
23
|
+
return (index.h("aside", { key: '2615bba7300b1d86fa82a1618718e07479f41348', class: "hb-aside", style: style }, index.h("slot", { key: 'dd4ad7e905f2ea8c72bc4d70c82ab0a13bed5e0f' })));
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
Aside.style = HbAsideStyle0;
|
|
@@ -21,7 +21,7 @@ const Avatar = class {
|
|
|
21
21
|
return typeof this.size === 'number' ? `${this.size}px` : map[this.size];
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (index.h("span", { key: '
|
|
24
|
+
return (index.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 ? index.h("img", { src: this.src, alt: this.alt }) : this.icon ? index.h("span", null, this.icon) : index.h("slot", null)));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
Avatar.style = HbAvatarStyle0;
|
|
@@ -85,12 +85,12 @@ const Backtop = class {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
render() {
|
|
88
|
-
return (index.h(index.Host, { key: '
|
|
88
|
+
return (index.h(index.Host, { key: '5406d83477f015dc770e46c3e495a5c036effa61', class: { 'hb-backtop': true, 'hb-backtop--hidden': !this.visible }, style: {
|
|
89
89
|
right: `${this.right}px`,
|
|
90
90
|
bottom: `${this.bottom}px`,
|
|
91
91
|
visibility: this.visible ? 'visible' : 'hidden',
|
|
92
92
|
opacity: this.visible ? '1' : '0',
|
|
93
|
-
} }, index.h("div", { key: '
|
|
93
|
+
} }, index.h("div", { key: 'dd75722c174dc48fd77ca0342955745a8e233f98', class: "hb-backtop__inner", onClick: this.scrollToTop }, index.h("slot", { key: '7dda375453258d76e61720d5689cbe79dd564046' }, index.h("span", { key: '96bf90719eff982610a4bcd44367c2250ebedfd4', class: "hb-backtop__icon" }, "\u2191")))));
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
Backtop.style = HbBacktopStyle0;
|
|
@@ -25,7 +25,7 @@ const Badge = class {
|
|
|
25
25
|
return String(this.value);
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (index.h("div", { key: '
|
|
28
|
+
return (index.h("div", { key: 'f8c6ce8c0c83e0a6332f305c4e1d83e42f0ed8da', class: "hb-badge" }, index.h("slot", { key: 'c7a52c406aaa545972888f4761b0e8637e5a76f9' }), !this.hidden && (index.h("sup", { key: '9786f19cb8fc171d7265b0d14624e51d6b72a250', class: { 'hb-badge__content': true, [`hb-badge__content--${this.type}`]: true, 'hb-badge__content--dot': this.isDot } }, this.displayValue))));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
Badge.style = HbBadgeStyle0;
|
|
@@ -16,7 +16,7 @@ const BreadcrumbItem = class {
|
|
|
16
16
|
// 从父级 hb-breadcrumb 读取分隔符 prop
|
|
17
17
|
// 优先级:item 的 separator slot > breadcrumb.separator > 默认 '/'
|
|
18
18
|
const parentSeparator = this.el.closest('hb-breadcrumb')?.separator;
|
|
19
|
-
return (index.h("span", { key: '
|
|
19
|
+
return (index.h("span", { key: '181c8e289f83b6a95445bee02ae0e6405a3ac7c7', class: "hb-breadcrumb-item" }, index.h(Tag, { key: 'af828de3d06e5a41c52b23b874d0b211a44e4169', class: "hb-breadcrumb-item__inner", href: this.href }, index.h("slot", { key: '0c4b87ea5809acd5e2b2d53f59011a32fae8d370' })), index.h("span", { key: '106653462a241dcc2a64556b4a5bae60a548d766', class: "hb-breadcrumb-item__separator" }, index.h("slot", { key: '905f0e3fffa0a2d7452065f95f33c39c4c3382b8', name: "separator" }, parentSeparator ?? '/'))));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -14,7 +14,7 @@ const Breadcrumb = class {
|
|
|
14
14
|
/** 分隔符 */
|
|
15
15
|
separator = '/';
|
|
16
16
|
render() {
|
|
17
|
-
return (index.h("nav", { key: '
|
|
17
|
+
return (index.h("nav", { key: '404e3b9cb740956fa8e3f12ca91efec1d3d0a03b', class: "hb-breadcrumb", "aria-label": "Breadcrumb" }, index.h("slot", { key: '8fac787347489530954f2edbe79dab5d05ce7ef4' })));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
Breadcrumb.style = HbBreadcrumbStyle0;
|
|
@@ -22,14 +22,14 @@ const Button = class {
|
|
|
22
22
|
/** 是否加载中 */
|
|
23
23
|
loading = false;
|
|
24
24
|
render() {
|
|
25
|
-
return (index.h("button", { key: '
|
|
25
|
+
return (index.h("button", { key: '77ba452cfa960b02e746b2494aa1f471a85d33fd', disabled: this.disabled || this.loading, class: {
|
|
26
26
|
'hb-button': true,
|
|
27
27
|
[`hb-button--${this.type}`]: true,
|
|
28
28
|
[`hb-button--${this.size}`]: true,
|
|
29
29
|
'hb-button--disabled': this.disabled,
|
|
30
30
|
'hb-button--loading': this.loading,
|
|
31
31
|
[this.classNames]: !!this.classNames,
|
|
32
|
-
} }, this.loading && index.h("span", { key: '
|
|
32
|
+
} }, this.loading && index.h("span", { key: '152d4a7657ba8399554782c7abd38a6c5b26de17', class: "hb-button__loading-icon" }, "\u23F3"), index.h("slot", { key: '9381db3ab788d9bfe73c8b29d422642d1a8eacbc' })));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
Button.style = HbButtonStyle0;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5aa5c817.js');
|
|
6
|
-
const dateHelpers = require('./date-helpers-
|
|
6
|
+
const dateHelpers = require('./date-helpers-1ffddc59.js');
|
|
7
7
|
|
|
8
|
-
const calendarCss = "/*! 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-calendar{background-color:var(--hb-color-white,#fff);border-radius:4px;box-sizing:border-box;padding:12px;width:100%}.hb-calendar__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-calendar__header-label{color:var(--hb-color-text-regular,#606266);font-size:14px;font-weight:600}.hb-calendar__next-btn,.hb-calendar__prev-btn{background:0 0;border:none;color:var(--hb-color-text-regular,#606266);cursor:pointer;font-size:18px;line-height:1;padding:4px 8px;transition:color .2s}.hb-calendar__next-btn:hover,.hb-calendar__prev-btn:hover{color:var(--hb-color-primary)}.hb-calendar__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-calendar__weekday{color:var(--hb-color-text-placeholder,#c0c4cc);font-size:12px;font-weight:500;padding:4px 0;text-align:center}.hb-calendar__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-calendar__day{align-items:center;aspect-ratio:1;border-radius:4px;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:flex;font-size:13px;justify-content:center;transition:all .2s;-webkit-user-select:none;user-select:none}.hb-calendar__day:hover:not(.hb-calendar__day--other-month){background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-calendar__day--other-month{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:default}.hb-calendar__day--today{color:var(--hb-color-primary);font-weight:600}.hb-calendar__day--selected{color:var(--hb-color-white,#fff)}.hb-calendar__day--selected,.hb-calendar__day--selected:hover{background-color:var(--hb-color-primary)}@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}";
|
|
8
|
+
const calendarCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.grid{display:grid}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-calendar{background-color:var(--hb-color-white,#fff);border-radius:4px;box-sizing:border-box;padding:12px;width:100%}.hb-calendar__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-calendar__header-label{color:var(--hb-color-text-regular,#606266);font-size:14px;font-weight:600}.hb-calendar__next-btn,.hb-calendar__prev-btn{background:0 0;border:none;color:var(--hb-color-text-regular,#606266);cursor:pointer;font-size:18px;line-height:1;padding:4px 8px;transition:color .2s}.hb-calendar__next-btn:hover,.hb-calendar__prev-btn:hover{color:var(--hb-color-primary)}.hb-calendar__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-calendar__weekday{color:var(--hb-color-text-placeholder,#c0c4cc);font-size:12px;font-weight:500;padding:4px 0;text-align:center}.hb-calendar__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-calendar__day{align-items:center;aspect-ratio:1;border-radius:4px;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:flex;font-size:13px;justify-content:center;transition:all .2s;-webkit-user-select:none;user-select:none}.hb-calendar__day:hover:not(.hb-calendar__day--other-month){background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-calendar__day--other-month{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:default}.hb-calendar__day--today{color:var(--hb-color-primary);font-weight:600}.hb-calendar__day--selected{color:var(--hb-color-white,#fff)}.hb-calendar__day--selected,.hb-calendar__day--selected:hover{background-color:var(--hb-color-primary)}.hb-calendar__day--focused{outline:2px solid var(--hb-color-primary,#1677ff);outline-offset:-2px}.hb-calendar__day--disabled{color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed;opacity:.5}.hb-calendar__day--disabled:hover{background-color:#0000}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
9
9
|
const HbCalendarStyle0 = calendarCss;
|
|
10
10
|
|
|
11
11
|
const Calendar = class {
|
|
@@ -32,6 +32,8 @@ const Calendar = class {
|
|
|
32
32
|
hbChange;
|
|
33
33
|
viewDate = new Date();
|
|
34
34
|
selectedDate;
|
|
35
|
+
/** 键盘导航的焦点日期(用于 role=gridcell 的 roving tabindex) */
|
|
36
|
+
focusDate = new Date();
|
|
35
37
|
componentDidLoad() {
|
|
36
38
|
this.initFromModelValue();
|
|
37
39
|
}
|
|
@@ -43,6 +45,11 @@ const Calendar = class {
|
|
|
43
45
|
this.selectedDate = parsed;
|
|
44
46
|
if (parsed) {
|
|
45
47
|
this.viewDate = new Date(parsed.getFullYear(), parsed.getMonth(), 1);
|
|
48
|
+
this.focusDate = new Date(parsed);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
// 无选中值时焦点默认到今天
|
|
52
|
+
this.focusDate = new Date();
|
|
46
53
|
}
|
|
47
54
|
}
|
|
48
55
|
handleSelect = (day) => {
|
|
@@ -51,10 +58,65 @@ const Calendar = class {
|
|
|
51
58
|
if (this.disabledDate && this.disabledDate(day.date))
|
|
52
59
|
return;
|
|
53
60
|
this.selectedDate = day.date;
|
|
61
|
+
this.focusDate = new Date(day.date);
|
|
54
62
|
const iso = this.toISODate(day.date);
|
|
55
63
|
this.modelValue = iso;
|
|
56
64
|
this.hbChange.emit(iso);
|
|
57
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* 日期网格键盘导航(对齐 WAI-ARIA grid / antd Calendar):
|
|
68
|
+
* - ArrowRight/Left:±1 天
|
|
69
|
+
* - ArrowDown/Up:±7 天
|
|
70
|
+
* - Home/End:当周首/末日
|
|
71
|
+
* - PageDown/Up:±1 月
|
|
72
|
+
* - Enter:选中焦点日
|
|
73
|
+
* 焦点日跨月时同步滚动 viewDate。
|
|
74
|
+
*/
|
|
75
|
+
handleGridKeydown = (e) => {
|
|
76
|
+
const next = new Date(this.focusDate);
|
|
77
|
+
switch (e.key) {
|
|
78
|
+
case 'ArrowRight':
|
|
79
|
+
next.setDate(next.getDate() + 1);
|
|
80
|
+
break;
|
|
81
|
+
case 'ArrowLeft':
|
|
82
|
+
next.setDate(next.getDate() - 1);
|
|
83
|
+
break;
|
|
84
|
+
case 'ArrowDown':
|
|
85
|
+
next.setDate(next.getDate() + 7);
|
|
86
|
+
break;
|
|
87
|
+
case 'ArrowUp':
|
|
88
|
+
next.setDate(next.getDate() - 7);
|
|
89
|
+
break;
|
|
90
|
+
case 'Home': {
|
|
91
|
+
const d = next.getDay();
|
|
92
|
+
next.setDate(next.getDate() - d);
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case 'End': {
|
|
96
|
+
const d = 6 - next.getDay();
|
|
97
|
+
next.setDate(next.getDate() + d);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
case 'PageDown':
|
|
101
|
+
next.setMonth(next.getMonth() + 1);
|
|
102
|
+
break;
|
|
103
|
+
case 'PageUp':
|
|
104
|
+
next.setMonth(next.getMonth() - 1);
|
|
105
|
+
break;
|
|
106
|
+
case 'Enter':
|
|
107
|
+
e.preventDefault();
|
|
108
|
+
this.handleSelect({ date: this.focusDate, isCurrentMonth: true });
|
|
109
|
+
return;
|
|
110
|
+
default:
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
// 焦点跨月:viewDate 跟随(PageUp/Down 或方向键滑出)
|
|
115
|
+
if (next.getMonth() !== this.viewDate.getMonth() || next.getFullYear() !== this.viewDate.getFullYear()) {
|
|
116
|
+
this.viewDate = new Date(next.getFullYear(), next.getMonth(), 1);
|
|
117
|
+
}
|
|
118
|
+
this.focusDate = next;
|
|
119
|
+
};
|
|
58
120
|
toISODate(date) {
|
|
59
121
|
const y = date.getFullYear();
|
|
60
122
|
const m = String(date.getMonth() + 1).padStart(2, '0');
|
|
@@ -64,20 +126,26 @@ const Calendar = class {
|
|
|
64
126
|
changeMonth(delta) {
|
|
65
127
|
this.viewDate = dateHelpers.addMonths(this.viewDate, delta);
|
|
66
128
|
}
|
|
67
|
-
/** 按 firstDayOfWeek
|
|
129
|
+
/** 按 firstDayOfWeek 重排星期标题;getCalendarDays 也按同一 firstDayOfWeek 对齐网格 */
|
|
68
130
|
get orderedWeekNames() {
|
|
69
131
|
const offset = ((this.firstDayOfWeek % 7) + 7) % 7;
|
|
70
132
|
return [...dateHelpers.WEEK_DAY_NAMES.slice(offset), ...dateHelpers.WEEK_DAY_NAMES.slice(0, offset)];
|
|
71
133
|
}
|
|
72
134
|
render() {
|
|
73
|
-
const days = dateHelpers.getCalendarDays(this.viewDate, this.selectedDate);
|
|
135
|
+
const days = dateHelpers.getCalendarDays(this.viewDate, this.selectedDate, new Date(), this.firstDayOfWeek);
|
|
74
136
|
const current = this.viewDate;
|
|
75
|
-
return (index.h("div", { key: '
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
137
|
+
return (index.h("div", { key: '9c18ef6f549973316bcfe0343290e442f72dfdb8', class: "hb-calendar" }, index.h("div", { key: 'ab177ab7cd14aec0c52a3806ed098e7abc245283', class: "hb-calendar__header" }, index.h("button", { key: '5e7c773130c63479f806c33a085e5a82ba5c2fe7', type: "button", class: "hb-calendar__prev-btn", onClick: () => this.changeMonth(-1), "aria-label": "\u4E0A\u4E00\u6708" }, "\u2039"), index.h("span", { key: 'bfcd78f5119f461878e7a8c8fbfc260e97b58458', class: "hb-calendar__header-label", "aria-live": "polite" }, current.getFullYear(), "\u5E74 ", dateHelpers.MONTH_NAMES[current.getMonth()]), index.h("button", { key: '4eb5cf7d57c0288f895b35b889bd5016b8c78075', type: "button", class: "hb-calendar__next-btn", onClick: () => this.changeMonth(1), "aria-label": "\u4E0B\u4E00\u6708" }, "\u203A")), index.h("div", { key: '2b643cc4f0a121c349018e502745212adae5dfe9', class: "hb-calendar__body", role: "grid", "aria-label": `${current.getFullYear()}年${current.getMonth() + 1}月日历` }, index.h("div", { key: '546e2f58e40732ee2cc270152d4e69bb044fdef6', class: "hb-calendar__weekdays", role: "row" }, this.orderedWeekNames.map((day) => (index.h("div", { class: "hb-calendar__weekday", role: "columnheader", "aria-disabled": "true" }, day)))), index.h("div", { key: '36178be8edbf59348396b7355066f45aa1adcc81', class: "hb-calendar__days", role: "row", onKeyDown: this.handleGridKeydown }, days.map((day, index$1) => {
|
|
138
|
+
const isFocused = dateHelpers.isSameDay(day.date, this.focusDate);
|
|
139
|
+
const dayDisabled = day.isCurrentMonth && !!this.disabledDate && this.disabledDate(day.date);
|
|
140
|
+
return (index.h("div", { key: index$1, class: {
|
|
141
|
+
'hb-calendar__day': true,
|
|
142
|
+
'hb-calendar__day--other-month': !day.isCurrentMonth,
|
|
143
|
+
'hb-calendar__day--today': day.isToday,
|
|
144
|
+
'hb-calendar__day--selected': day.isSelected,
|
|
145
|
+
'hb-calendar__day--focused': isFocused,
|
|
146
|
+
'hb-calendar__day--disabled': dayDisabled,
|
|
147
|
+
}, role: "gridcell", tabindex: isFocused ? 0 : -1, "aria-selected": day.isSelected ? 'true' : 'false', "aria-current": day.isToday ? 'date' : undefined, "aria-disabled": !day.isCurrentMonth || dayDisabled ? 'true' : undefined, "aria-label": this.toISODate(day.date), onClick: () => this.handleSelect(day) }, day.date.getDate()));
|
|
148
|
+
})))));
|
|
81
149
|
}
|
|
82
150
|
static get watchers() { return {
|
|
83
151
|
"modelValue": ["handleModelValueChange"]
|
|
@@ -1 +1 @@
|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AAuB,EAC7B,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,gBACvB,oBAAK,aAGT,CACL,EACNA,kEAAK,KAAK,EAAC,mBAAmB,IAC5BA,kEAAK,KAAK,EAAC,uBAAuB,IAC/B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,MAC7BA,iBAAK,KAAK,EAAC,sBAAsB,IAAE,GAAG,CAAO,CAC9C,CAAC,CACE,EACNA,kEAAK,KAAK,EAAC,mBAAmB,IAC3B,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAEE,OAAK,MACnBF,iBACE,GAAG,EAAEE,OAAK,EACV,KAAK,EAAE;gBACL,kBAAkB,EAAE,IAAI;gBACxB,+BAA+B,EAAE,CAAC,GAAG,CAAC,cAAc;gBACpD,yBAAyB,EAAE,GAAG,CAAC,OAAO;gBACtC,4BAA4B,EAAE,GAAG,CAAC,UAAU;aAC7C,EACD,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAEpC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CACf,CACP,CAAC,CACE,CACF,CACF,EACN;KACH;;;;;;;;;","names":["parseDate","addMonths","WEEK_DAY_NAMES","getCalendarDays","h","MONTH_NAMES","index"],"sources":["src/components/Calendar/calendar.css?tag=hb-calendar&encapsulation=shadow","src/components/Calendar/Calendar.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-calendar {\n width: 100%;\n padding: 12px;\n box-sizing: border-box;\n background-color: var(--hb-color-white, #ffffff);\n border-radius: 4px;\n}\n\n/* 头部:年月 + 上下月按钮 */\n.hb-calendar__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n}\n\n.hb-calendar__header-label {\n font-weight: 600;\n font-size: 14px;\n color: var(--hb-color-text-regular, #606266);\n}\n\n.hb-calendar__prev-btn,\n.hb-calendar__next-btn {\n background: none;\n border: none;\n font-size: 18px;\n cursor: pointer;\n color: var(--hb-color-text-regular, #606266);\n padding: 4px 8px;\n line-height: 1;\n transition: color 0.2s;\n}\n\n.hb-calendar__prev-btn:hover,\n.hb-calendar__next-btn:hover {\n color: var(--hb-color-primary);\n}\n\n/* 星期行 */\n.hb-calendar__weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n margin-bottom: 8px;\n}\n\n.hb-calendar__weekday {\n text-align: center;\n font-size: 12px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n font-weight: 500;\n padding: 4px 0;\n}\n\n/* 日期网格 */\n.hb-calendar__days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n}\n\n.hb-calendar__day {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n color: var(--hb-color-text-regular, #606266);\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s;\n user-select: none;\n}\n\n.hb-calendar__day:hover:not(.hb-calendar__day--other-month) {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n}\n\n.hb-calendar__day--other-month {\n color: var(--hb-color-text-placeholder, #c0c4cc);\n cursor: default;\n}\n\n.hb-calendar__day--today {\n color: var(--hb-color-primary);\n font-weight: 600;\n}\n\n.hb-calendar__day--selected {\n background-color: var(--hb-color-primary);\n color: var(--hb-color-white, #ffffff);\n}\n\n.hb-calendar__day--selected:hover {\n background-color: var(--hb-color-primary);\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Watch } from '@stencil/core';\nimport {\n getCalendarDays,\n parseDate,\n addMonths,\n MONTH_NAMES,\n WEEK_DAY_NAMES,\n} from '../../utils/date-helpers';\n\n/**\n * Calendar 日历组件\n * 月份视图日历,支持选中日期与月份切换\n */\n@Component({\n tag: 'hb-calendar',\n styleUrl: 'calendar.css',\n shadow: true,\n})\nexport class Calendar {\n /**\n * 绑定值(ISO 日期字符串)\n */\n @Prop({ mutable: true }) modelValue?: string;\n\n /**\n * 每周第一天(0=周日,1=周一 …)\n * @default 0\n */\n @Prop() firstDayOfWeek: number = 0;\n\n /**\n * 禁用日期判定(声明预留,暂不强求实现)\n */\n @Prop() disabledDate?: (date: Date) => boolean;\n\n /**\n * 值改变事件,detail 为 ISO 日期字符串\n */\n @Event() hbChange: EventEmitter<string>;\n\n @State() viewDate: Date = new Date();\n @State() selectedDate?: Date;\n\n componentDidLoad() {\n this.initFromModelValue();\n }\n\n @Watch('modelValue')\n handleModelValueChange() {\n this.initFromModelValue();\n }\n\n private initFromModelValue() {\n const parsed = parseDate(this.modelValue);\n this.selectedDate = parsed;\n if (parsed) {\n this.viewDate = new Date(parsed.getFullYear(), parsed.getMonth(), 1);\n }\n }\n\n private handleSelect = (day: { date: Date; isCurrentMonth: boolean }) => {\n if (!day.isCurrentMonth) return;\n if (this.disabledDate && this.disabledDate(day.date)) return;\n this.selectedDate = day.date;\n const iso = this.toISODate(day.date);\n this.modelValue = iso;\n this.hbChange.emit(iso);\n };\n\n private toISODate(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, '0');\n const d = String(date.getDate()).padStart(2, '0');\n return `${y}-${m}-${d}`;\n }\n\n private changeMonth(delta: number) {\n this.viewDate = addMonths(this.viewDate, delta);\n }\n\n /** 按 firstDayOfWeek 重排星期标题(getCalendarDays 网格恒以周日为首列) */\n private get orderedWeekNames(): string[] {\n const offset = ((this.firstDayOfWeek % 7) + 7) % 7;\n return [...WEEK_DAY_NAMES.slice(offset), ...WEEK_DAY_NAMES.slice(0, offset)];\n }\n\n render() {\n const days = getCalendarDays(this.viewDate, this.selectedDate);\n const current = this.viewDate;\n\n return (\n <div class=\"hb-calendar\">\n <div class=\"hb-calendar__header\">\n <button\n type=\"button\"\n class=\"hb-calendar__prev-btn\"\n onClick={() => this.changeMonth(-1)}\n aria-label=\"上一月\"\n >\n ‹\n </button>\n <span class=\"hb-calendar__header-label\">\n {current.getFullYear()}年 {MONTH_NAMES[current.getMonth()]}\n </span>\n <button\n type=\"button\"\n class=\"hb-calendar__next-btn\"\n onClick={() => this.changeMonth(1)}\n aria-label=\"下一月\"\n >\n ›\n </button>\n </div>\n <div class=\"hb-calendar__body\">\n <div class=\"hb-calendar__weekdays\">\n {this.orderedWeekNames.map((day) => (\n <div class=\"hb-calendar__weekday\">{day}</div>\n ))}\n </div>\n <div class=\"hb-calendar__days\">\n {days.map((day, index) => (\n <div\n key={index}\n class={{\n 'hb-calendar__day': true,\n 'hb-calendar__day--other-month': !day.isCurrentMonth,\n 'hb-calendar__day--today': day.isToday,\n 'hb-calendar__day--selected': day.isSelected,\n }}\n onClick={() => this.handleSelect(day)}\n >\n {day.date.getDate()}\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"hb-calendar.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,WAAW,GAAG,+8OAA+8O,CAAC;AACp+O,yBAAe,WAAW;;MCkBb,QAAQ;;;;;;;;IAIM,UAAU,CAAU;;;;;IAMrC,cAAc,GAAW,CAAC,CAAC;;;;IAK3B,YAAY,CAA2B;;;;IAKtC,QAAQ,CAAuB;IAE/B,QAAQ,GAAS,IAAI,IAAI,EAAE,CAAC;IAC5B,YAAY,CAAQ;;IAEpB,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAEtC,gBAAgB;QACd,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;IAGD,sBAAsB;QACpB,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;IAEO,kBAAkB;QACxB,MAAM,MAAM,GAAGA,qBAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;QAC3B,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;YACrE,IAAI,CAAC,SAAS,GAAG,IA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AQ,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC,mBACb,GAAG,CAAC,UAAU,GAAG,MAAM,GAAG,OAAO,kBAClC,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,mBAC/B,CAAC,GAAG,CAAC,cAAc,IAAI,WAAW,GAAG,MAAM,GAAG,SAAS,gBAC1D,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EACpC,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAEpC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CACf,EACN;SACH,CAAC,CACE,CACF,CACF,EACN;KACH;;;;;;;;;","names":["parseDate","addMonths","WEEK_DAY_NAMES","getCalendarDays","h","MONTH_NAMES","index","isSameDay"],"sources":["src/components/Calendar/calendar.css?tag=hb-calendar&encapsulation=shadow","src/components/Calendar/Calendar.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-calendar {\n width: 100%;\n padding: 12px;\n box-sizing: border-box;\n background-color: var(--hb-color-white, #ffffff);\n border-radius: 4px;\n}\n\n/* 头部:年月 + 上下月按钮 */\n.hb-calendar__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n}\n\n.hb-calendar__header-label {\n font-weight: 600;\n font-size: 14px;\n color: var(--hb-color-text-regular, #606266);\n}\n\n.hb-calendar__prev-btn,\n.hb-calendar__next-btn {\n background: none;\n border: none;\n font-size: 18px;\n cursor: pointer;\n color: var(--hb-color-text-regular, #606266);\n padding: 4px 8px;\n line-height: 1;\n transition: color 0.2s;\n}\n\n.hb-calendar__prev-btn:hover,\n.hb-calendar__next-btn:hover {\n color: var(--hb-color-primary);\n}\n\n/* 星期行 */\n.hb-calendar__weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n margin-bottom: 8px;\n}\n\n.hb-calendar__weekday {\n text-align: center;\n font-size: 12px;\n color: var(--hb-color-text-placeholder, #c0c4cc);\n font-weight: 500;\n padding: 4px 0;\n}\n\n/* 日期网格 */\n.hb-calendar__days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n}\n\n.hb-calendar__day {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n color: var(--hb-color-text-regular, #606266);\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s;\n user-select: none;\n}\n\n.hb-calendar__day:hover:not(.hb-calendar__day--other-month) {\n background-color: var(--hb-fill-color-light, #f5f7fa);\n}\n\n.hb-calendar__day--other-month {\n color: var(--hb-color-text-placeholder, #c0c4cc);\n cursor: default;\n}\n\n.hb-calendar__day--today {\n color: var(--hb-color-primary);\n font-weight: 600;\n}\n\n.hb-calendar__day--selected {\n background-color: var(--hb-color-primary);\n color: var(--hb-color-white, #ffffff);\n}\n\n.hb-calendar__day--selected:hover {\n background-color: var(--hb-color-primary);\n}\n\n/* 键盘焦点日(roving tabindex 的可见焦点态) */\n.hb-calendar__day--focused {\n outline: 2px solid var(--hb-color-primary, #1677ff);\n outline-offset: -2px;\n}\n\n.hb-calendar__day--disabled {\n color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.hb-calendar__day--disabled:hover {\n background-color: transparent;\n}\n","import { Component, h, Prop, Event, EventEmitter, State, Watch } from '@stencil/core';\nimport {\n getCalendarDays,\n parseDate,\n addMonths,\n isSameDay,\n MONTH_NAMES,\n WEEK_DAY_NAMES,\n} from '../../utils/date-helpers';\n\n/**\n * Calendar 日历组件\n * 月份视图日历,支持选中日期与月份切换\n */\n@Component({\n tag: 'hb-calendar',\n styleUrl: 'calendar.css',\n shadow: true,\n})\nexport class Calendar {\n /**\n * 绑定值(ISO 日期字符串)\n */\n @Prop({ mutable: true }) modelValue?: string;\n\n /**\n * 每周第一天(0=周日,1=周一 …)\n * @default 0\n */\n @Prop() firstDayOfWeek: number = 0;\n\n /**\n * 禁用日期判定(声明预留,暂不强求实现)\n */\n @Prop() disabledDate?: (date: Date) => boolean;\n\n /**\n * 值改变事件,detail 为 ISO 日期字符串\n */\n @Event() hbChange: EventEmitter<string>;\n\n @State() viewDate: Date = new Date();\n @State() selectedDate?: Date;\n /** 键盘导航的焦点日期(用于 role=gridcell 的 roving tabindex) */\n @State() focusDate: Date = new Date();\n\n componentDidLoad() {\n this.initFromModelValue();\n }\n\n @Watch('modelValue')\n handleModelValueChange() {\n this.initFromModelValue();\n }\n\n private initFromModelValue() {\n const parsed = parseDate(this.modelValue);\n this.selectedDate = parsed;\n if (parsed) {\n this.viewDate = new Date(parsed.getFullYear(), parsed.getMonth(), 1);\n this.focusDate = new Date(parsed);\n } else {\n // 无选中值时焦点默认到今天\n this.focusDate = new Date();\n }\n }\n\n private handleSelect = (day: { date: Date; isCurrentMonth: boolean }) => {\n if (!day.isCurrentMonth) return;\n if (this.disabledDate && this.disabledDate(day.date)) return;\n this.selectedDate = day.date;\n this.focusDate = new Date(day.date);\n const iso = this.toISODate(day.date);\n this.modelValue = iso;\n this.hbChange.emit(iso);\n };\n\n /**\n * 日期网格键盘导航(对齐 WAI-ARIA grid / antd Calendar):\n * - ArrowRight/Left:±1 天\n * - ArrowDown/Up:±7 天\n * - Home/End:当周首/末日\n * - PageDown/Up:±1 月\n * - Enter:选中焦点日\n * 焦点日跨月时同步滚动 viewDate。\n */\n private handleGridKeydown = (e: KeyboardEvent) => {\n const next = new Date(this.focusDate);\n let monthDelta = 0;\n switch (e.key) {\n case 'ArrowRight': next.setDate(next.getDate() + 1); break;\n case 'ArrowLeft': next.setDate(next.getDate() - 1); break;\n case 'ArrowDown': next.setDate(next.getDate() + 7); break;\n case 'ArrowUp': next.setDate(next.getDate() - 7); break;\n case 'Home': { const d = next.getDay(); next.setDate(next.getDate() - d); break; }\n case 'End': { const d = 6 - next.getDay(); next.setDate(next.getDate() + d); break; }\n case 'PageDown': next.setMonth(next.getMonth() + 1); monthDelta = 1; break;\n case 'PageUp': next.setMonth(next.getMonth() - 1); monthDelta = -1; break;\n case 'Enter':\n e.preventDefault();\n this.handleSelect({ date: this.focusDate, isCurrentMonth: true });\n return;\n default:\n return;\n }\n e.preventDefault();\n // 焦点跨月:viewDate 跟随(PageUp/Down 或方向键滑出)\n if (next.getMonth() !== this.viewDate.getMonth() || next.getFullYear() !== this.viewDate.getFullYear()) {\n this.viewDate = new Date(next.getFullYear(), next.getMonth(), 1);\n }\n if (monthDelta) void monthDelta;\n this.focusDate = next;\n };\n\n private toISODate(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, '0');\n const d = String(date.getDate()).padStart(2, '0');\n return `${y}-${m}-${d}`;\n }\n\n private changeMonth(delta: number) {\n this.viewDate = addMonths(this.viewDate, delta);\n }\n\n /** 按 firstDayOfWeek 重排星期标题;getCalendarDays 也按同一 firstDayOfWeek 对齐网格 */\n private get orderedWeekNames(): string[] {\n const offset = ((this.firstDayOfWeek % 7) + 7) % 7;\n return [...WEEK_DAY_NAMES.slice(offset), ...WEEK_DAY_NAMES.slice(0, offset)];\n }\n\n render() {\n const days = getCalendarDays(this.viewDate, this.selectedDate, new Date(), this.firstDayOfWeek);\n const current = this.viewDate;\n\n return (\n <div class=\"hb-calendar\">\n <div class=\"hb-calendar__header\">\n <button\n type=\"button\"\n class=\"hb-calendar__prev-btn\"\n onClick={() => this.changeMonth(-1)}\n aria-label=\"上一月\"\n >\n ‹\n </button>\n <span class=\"hb-calendar__header-label\" aria-live=\"polite\">\n {current.getFullYear()}年 {MONTH_NAMES[current.getMonth()]}\n </span>\n <button\n type=\"button\"\n class=\"hb-calendar__next-btn\"\n onClick={() => this.changeMonth(1)}\n aria-label=\"下一月\"\n >\n ›\n </button>\n </div>\n <div class=\"hb-calendar__body\" role=\"grid\" aria-label={`${current.getFullYear()}年${current.getMonth() + 1}月日历`}>\n <div class=\"hb-calendar__weekdays\" role=\"row\">\n {this.orderedWeekNames.map((day) => (\n <div class=\"hb-calendar__weekday\" role=\"columnheader\" aria-disabled=\"true\">{day}</div>\n ))}\n </div>\n <div class=\"hb-calendar__days\" role=\"row\" onKeyDown={this.handleGridKeydown}>\n {days.map((day, index) => {\n const isFocused = isSameDay(day.date, this.focusDate);\n const dayDisabled = day.isCurrentMonth && !!this.disabledDate && this.disabledDate(day.date);\n return (\n <div\n key={index}\n class={{\n 'hb-calendar__day': true,\n 'hb-calendar__day--other-month': !day.isCurrentMonth,\n 'hb-calendar__day--today': day.isToday,\n 'hb-calendar__day--selected': day.isSelected,\n 'hb-calendar__day--focused': isFocused,\n 'hb-calendar__day--disabled': dayDisabled,\n }}\n role=\"gridcell\"\n tabindex={isFocused ? 0 : -1}\n aria-selected={day.isSelected ? 'true' : 'false'}\n aria-current={day.isToday ? 'date' : undefined}\n aria-disabled={!day.isCurrentMonth || dayDisabled ? 'true' : undefined}\n aria-label={this.toISODate(day.date)}\n onClick={() => this.handleSelect(day)}\n >\n {day.date.getDate()}\n </div>\n );\n })}\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -14,7 +14,7 @@ const Card = class {
|
|
|
14
14
|
header;
|
|
15
15
|
shadow = 'always';
|
|
16
16
|
render() {
|
|
17
|
-
return (index.h("div", { key: '
|
|
17
|
+
return (index.h("div", { key: 'f7608af1d9f0b49f69ae715158640746b0cef19d', class: { 'hb-card': true, [`hb-card--shadow-${this.shadow}`]: true } }, (this.header || this.elHasHeaderSlot) && (index.h("div", { key: '07d640827829fba28288c45643ea94553ae668bc', class: "hb-card__header" }, index.h("slot", { key: 'b48962d1f96d2c6caf8aeea54739d40ebd992a7b', name: "header" }, index.h("span", { key: '1c4701c4b0b478fdacfb950dab4da22ed92b8eca' }, this.header)))), index.h("div", { key: '3c98aa57aa0f8338dac90ff5a81baeb068473bd2', class: "hb-card__body" }, index.h("slot", { key: 'e4e3f11461bd73def3139e19cd3b945da1bc1365' }))));
|
|
18
18
|
}
|
|
19
19
|
get elHasHeaderSlot() {
|
|
20
20
|
return !!document.querySelector('hb-card [slot="header"]');
|