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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-fdf7135e.js';
|
|
2
2
|
import { c as createClickOutsideHandler } from './click-outside-291294f9.js';
|
|
3
|
-
import { p as parseDate, f as formatDate, a as addMonths, g as getCalendarDays, M as MONTH_NAMES, W as WEEK_DAY_NAMES } from './date-helpers-
|
|
3
|
+
import { p as parseDate, f as formatDate, a as addMonths, g as getCalendarDays, M as MONTH_NAMES, W as WEEK_DAY_NAMES } from './date-helpers-44507189.js';
|
|
4
4
|
|
|
5
5
|
const dateTimePickerCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{--hb-date-time-picker-font-size:14px;--hb-date-time-picker-height:32px;--hb-date-time-picker-border-color:var(--hb-border-color,#dcdfe6);--hb-date-time-picker-border-color-hover:var(--hb-color-primary);--hb-date-time-picker-bg-color:var(--hb-color-white,#fff);display:inline-block;position:relative}.hb-date-time-picker{display:inline-block;position:relative;width:280px}.hb-date-time-picker__input-wrapper{cursor:pointer;display:inline-block;position:relative;width:100%}.hb-date-time-picker__input{background-color:var(--hb-date-time-picker-bg-color);border:1px solid var(--hb-date-time-picker-border-color);border-radius:4px;box-sizing:border-box;color:var(--hb-color-text-regular,#606266);cursor:pointer;display:inline-block;font-size:var(--hb-date-time-picker-font-size);height:var(--hb-date-time-picker-height);line-height:var(--hb-date-time-picker-height);outline:none;padding:0 30px 0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}.hb-date-time-picker__suffix{align-items:center;display:flex;position:absolute;right:8px;top:50%;transform:translateY(-50%)}.hb-date-time-picker__clear{color:var(--hb-color-text-placeholder,#c0c4cc);cursor:pointer;font-size:16px;margin-right:8px}.hb-date-time-picker__dropdown{background-color:var(--hb-date-time-picker-bg-color);border:1px solid var(--hb-date-time-picker-border-color);border-radius:4px;box-shadow:0 2px 12px #0000001a;left:0;margin-top:4px;min-width:320px;padding:12px;position:absolute;top:100%;z-index:1000}.hb-date-time-picker__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.hb-date-time-picker__header-label{font-size:14px;font-weight:600}.hb-date-time-picker__next-btn,.hb-date-time-picker__prev-btn{background:0 0;border:none;cursor:pointer;font-size:18px;padding:4px 8px}.hb-date-time-picker__weekdays{display:grid;gap:4px;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.hb-date-time-picker__weekday{color:var(--hb-color-text-placeholder,#c0c4cc);font-size:12px;text-align:center}.hb-date-time-picker__days{display:grid;gap:4px;grid-template-columns:repeat(7,1fr)}.hb-date-time-picker__day{align-items:center;aspect-ratio:1;border-radius:4px;cursor:pointer;display:flex;font-size:13px;justify-content:center}.hb-date-time-picker__day:hover:not(.hb-date-time-picker__day--other-month){background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-date-time-picker__day--selected{background-color:var(--hb-color-primary);color:var(--hb-color-white,#fff)}.hb-date-time-picker__time-body{display:flex;padding:8px}.hb-date-time-picker__time-list{flex:1;max-height:280px;overflow-y:auto}.hb-date-time-picker__time-title{border-bottom:1px solid var(--hb-border-color-lighter,#e4e7ed);font-size:12px;padding:8px 0;text-align:center}.hb-date-time-picker__time-content{padding:4px 0}.hb-date-time-picker__time-item{cursor:pointer;font-size:13px;padding:8px 16px;text-align:center}.hb-date-time-picker__time-item:hover{background-color:var(--hb-fill-color-light,#f5f7fa)}.hb-date-time-picker__time-item--selected{background-color:var(--hb-color-primary-light-9,#ecf5ff);color:var(--hb-color-primary);font-weight:600}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
6
6
|
const HbDateTimePickerStyle0 = dateTimePickerCss;
|
|
@@ -101,12 +101,12 @@ const DateTimePicker = class {
|
|
|
101
101
|
const hours = Array.from({ length: 24 }, (_, i) => i);
|
|
102
102
|
const minutes = Array.from({ length: 60 }, (_, i) => i);
|
|
103
103
|
const seconds = Array.from({ length: 60 }, (_, i) => i);
|
|
104
|
-
return (h("div", { key: '
|
|
104
|
+
return (h("div", { key: '55bfc24d36320660882db41b17902564989c11ad', class: {
|
|
105
105
|
'hb-date-time-picker': true,
|
|
106
106
|
'hb-date-time-picker--open': this.isOpen,
|
|
107
107
|
'hb-date-time-picker--disabled': this.disabled,
|
|
108
108
|
[`hb-date-time-picker--${this.size}`]: true,
|
|
109
|
-
} }, h("div", { key: '
|
|
109
|
+
} }, h("div", { key: 'cc339767373fdc5adc383e0c50a42df290a0dbf5', class: "hb-date-time-picker__input-wrapper", onClick: this.handleInputClick }, h("input", { key: '52de52179b54f039661a6d0cc2469567dbad1c8f', type: "text", id: this.inputId, name: this.name, class: "hb-date-time-picker__input", placeholder: this.placeholder, value: this.inputValue, disabled: this.disabled, readonly: true }), h("span", { key: '9e5f570884d0f5bc9e8715ac79f3117646a8a7c8', class: "hb-date-time-picker__suffix" }, this.clearable && this.modelValue && (h("span", { key: '8480660a74eb665b5b987fda8aeb8ef38878e110', class: "hb-date-time-picker__clear", onClick: this.handleClear }, "\u00D7")), h("span", { key: 'eb4910df6ca2df24fa2d91f6900180dc1fba4aa5', class: "hb-date-time-picker__icon" }, "\uD83D\uDCC5"))), this.isOpen && (h("div", { key: '69a2a1438cd788ad6a070c0bf170f75ac5204e8f', class: "hb-date-time-picker__dropdown" }, this.currentView === 'date' ? ([
|
|
110
110
|
h("div", { class: "hb-date-time-picker__header" }, h("button", { type: "button", class: "hb-date-time-picker__prev-btn", onClick: () => this.changeMonth(-1) }, "\u2039"), h("span", { class: "hb-date-time-picker__header-label" }, current.getFullYear(), "\u5E74 ", MONTH_NAMES[current.getMonth()]), h("button", { type: "button", class: "hb-date-time-picker__next-btn", onClick: () => this.changeMonth(1) }, "\u203A")),
|
|
111
111
|
h("div", { class: "hb-date-time-picker__body" }, h("div", { class: "hb-date-time-picker__weekdays" }, WEEK_DAY_NAMES.map(day => h("div", { class: "hb-date-time-picker__weekday" }, day))), h("div", { class: "hb-date-time-picker__days" }, days.map((day, index) => (h("div", { key: index, class: {
|
|
112
112
|
'hb-date-time-picker__day': true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-fdf7135e.js';
|
|
2
2
|
|
|
3
|
-
const descriptionsCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.grid{display:grid}.border{border-style:var(--tw-border-style);border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-descriptions{background:var(--hb-color-bg-container);border-radius:var(--hb-border-radius-sm);color:var(--hb-color-text);font-size:var(--hb-font-size-sm)}.hb-descriptions__title{color:var(--hb-color-text-primary);font-size:var(--hb-font-size-lg);font-weight:600;margin-bottom:var(--hb-spacing-sm)}.hb-descriptions__view{width:100%}.hb-descriptions__row{display:grid;gap:0;width:100%}.hb-descriptions__item{border-bottom:1px solid var(--hb-color-border-secondary);display:flex;padding:var(--hb-spacing-sm)var(--hb-spacing-md)}.hb-descriptions__row .hb-descriptions__item:last-child{border-bottom:none}.hb-descriptions__label{color:var(--hb-color-text-secondary);flex-shrink:0;margin-right:var(--hb-spacing-sm);white-space:nowrap}.hb-descriptions__colon{margin-left:0}.hb-descriptions__value{color:var(--hb-color-text);word-break:break-all}.hb-descriptions--bordered{border:1px solid var(--hb-color-border-secondary);overflow:hidden}.hb-descriptions--bordered .hb-descriptions__title{border-bottom:1px solid var(--hb-color-border-secondary);margin-bottom:0;padding:var(--hb-spacing-sm)var(--hb-spacing-md)}.hb-descriptions--bordered .hb-descriptions__item{border-right:1px solid var(--hb-color-border-secondary);padding:var(--hb-spacing-sm)var(--hb-spacing-md)}.hb-descriptions--bordered .hb-descriptions__item:nth-child(3n){border-right:none}.hb-descriptions--bordered .hb-descriptions__item:last-child{border-bottom:none}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
3
|
+
const descriptionsCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.grid{display:grid}.border{border-style:var(--tw-border-style);border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-descriptions{background:var(--hb-color-bg-container);border-radius:var(--hb-border-radius-sm);color:var(--hb-color-text);font-size:var(--hb-font-size-sm)}.hb-descriptions__title{color:var(--hb-color-text-primary);font-size:var(--hb-font-size-lg);font-weight:600;margin-bottom:var(--hb-spacing-sm)}.hb-descriptions__view{width:100%}.hb-descriptions__row{display:grid;gap:0;width:100%}.hb-descriptions__item{border-bottom:1px solid var(--hb-color-border-secondary);display:flex;padding:var(--hb-spacing-sm)var(--hb-spacing-md)}.hb-descriptions__row .hb-descriptions__item:last-child{border-bottom:none}.hb-descriptions__label{color:var(--hb-color-text-secondary);flex-shrink:0;margin-right:var(--hb-spacing-sm);white-space:nowrap}.hb-descriptions__colon{margin-left:0}.hb-descriptions__value{color:var(--hb-color-text);word-break:break-all}.hb-descriptions--bordered{border:1px solid var(--hb-color-border-secondary);overflow:hidden}.hb-descriptions--bordered .hb-descriptions__title{border-bottom:1px solid var(--hb-color-border-secondary);margin-bottom:0;padding:var(--hb-spacing-sm)var(--hb-spacing-md)}.hb-descriptions--bordered .hb-descriptions__item{border-right:1px solid var(--hb-color-border-secondary);padding:var(--hb-spacing-sm)var(--hb-spacing-md)}.hb-descriptions--bordered .hb-descriptions__item:nth-child(3n){border-right:none}.hb-descriptions--bordered .hb-descriptions__item:last-child{border-bottom:none}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@media (max-width:575.98px){.hb-descriptions__row{grid-template-columns:1fr!important}.hb-descriptions__item{align-items:flex-start;flex-direction:column;gap:var(--hb-spacing-xxs,2px)}.hb-descriptions__label{font-weight:500;margin-bottom:var(--hb-spacing-xxs,2px);margin-right:0}}";
|
|
4
4
|
const HbDescriptionsStyle0 = descriptionsCss;
|
|
5
5
|
|
|
6
6
|
const Descriptions = class {
|
|
@@ -18,7 +18,7 @@ const Descriptions = class {
|
|
|
18
18
|
/** 描述项数组 */
|
|
19
19
|
items = [];
|
|
20
20
|
render() {
|
|
21
|
-
return (h("div", { key: '
|
|
21
|
+
return (h("div", { key: '8eca1aa5621202c1e88d866e1eeab1246dce7294', class: { 'hb-descriptions': true, 'hb-descriptions--bordered': this.border } }, this.title && h("div", { key: 'b928e6f3e2cd9bc24fa5c84dd3c57b4f198c6514', class: "hb-descriptions__title" }, this.title), h("div", { key: '56ac04c6f168efdf5c67b71eaa959205d52bafdc', class: "hb-descriptions__view" }, h("div", { key: '3b2b1d157ee5220e27dab7460fa61447bec29c08', class: "hb-descriptions__row", style: { gridTemplateColumns: `repeat(${this.column}, minmax(0, 1fr))` } }, this.items.map((item) => (h("div", { class: "hb-descriptions__item", style: item.span ? { gridColumn: `span ${item.span}` } : undefined }, h("span", { class: "hb-descriptions__label" }, item.label, this.colon && h("span", { class: "hb-descriptions__colon" }, "\uFF1A")), h("span", { class: "hb-descriptions__value" }, item.value))))))));
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
Descriptions.style = HbDescriptionsStyle0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"hb-descriptions.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,
|
|
1
|
+
{"file":"hb-descriptions.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,89OAA89O,CAAC;AACv/O,6BAAe,eAAe;;MCMjB,YAAY;;;;;IAEf,KAAK,GAAW,EAAE,CAAC;;IAGnB,MAAM,GAAY,KAAK,CAAC;;IAGxB,MAAM,GAAW,CAAC,CAAC;;IAGnB,KAAK,GAAY,IAAI,CAAC;;IAGtB,KAAK,GAAsB,EAAE,CAAC;IAEtC,MAAM;QACJ,QACE,4DAAK,KAAK,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,2BAA2B,EAAE,IAAI,CAAC,MAAM,EAAE,IAC9E,IAAI,CAAC,KAAK,IAAI,4DAAK,KAAK,EAAC,wBAAwB,IAAE,IAAI,CAAC,KAAK,CAAO,EACrE,4DAAK,KAAK,EAAC,uBAAuB,IAChC,4DAAK,KAAK,EAAC,sBAAsB,EAAC,KAAK,EAAE,EAAE,mBAAmB,EAAE,UAAU,IAAI,CAAC,MAAM,mBAAmB,EAAE,IACvG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,MACnB,WACE,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,IAAI,CAAC,IAAI,GAAG,EAAE,UAAU,EAAE,QAAQ,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,SAAS,IAElE,YAAM,KAAK,EAAC,wBAAwB,IACjC,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,wBAAwB,aAAS,CACvD,EACP,YAAM,KAAK,EAAC,wBAAwB,IAAE,IAAI,CAAC,KAAK,CAAQ,CACpD,CACP,CAAC,CACE,CACF,CACF,EACN;KACH;;;;;;","names":[],"sources":["src/components/Descriptions/descriptions.css?tag=hb-descriptions&encapsulation=shadow","src/components/Descriptions/Descriptions.tsx"],"sourcesContent":[":host { display: block; }\n.hb-descriptions {\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n background: var(--hb-color-bg-container);\n border-radius: var(--hb-border-radius-sm);\n}\n.hb-descriptions__title {\n font-size: var(--hb-font-size-lg);\n font-weight: 600;\n color: var(--hb-color-text-primary);\n margin-bottom: var(--hb-spacing-sm);\n}\n.hb-descriptions__view { width: 100%; }\n.hb-descriptions__row {\n display: grid;\n gap: 0;\n width: 100%;\n}\n.hb-descriptions__item {\n display: flex;\n padding: var(--hb-spacing-sm) var(--hb-spacing-md);\n border-bottom: 1px solid var(--hb-color-border-secondary);\n}\n.hb-descriptions__row .hb-descriptions__item:nth-last-child(-n+3):not(:nth-last-child(1)) {\n /* 保留默认下边框,最后一项由下方规则移除 */\n}\n/* 简化:最后一个 item 无下边框 */\n.hb-descriptions__row .hb-descriptions__item:last-child { border-bottom: none; }\n\n.hb-descriptions__label {\n color: var(--hb-color-text-secondary);\n white-space: nowrap;\n margin-right: var(--hb-spacing-sm);\n flex-shrink: 0;\n}\n.hb-descriptions__colon { margin-left: 0; }\n.hb-descriptions__value {\n color: var(--hb-color-text);\n word-break: break-all;\n}\n\n/* 带边框样式 */\n.hb-descriptions--bordered {\n border: 1px solid var(--hb-color-border-secondary);\n overflow: hidden;\n}\n.hb-descriptions--bordered .hb-descriptions__title { padding: var(--hb-spacing-sm) var(--hb-spacing-md); margin-bottom: 0; border-bottom: 1px solid var(--hb-color-border-secondary); }\n.hb-descriptions--bordered .hb-descriptions__item { border-right: 1px solid var(--hb-color-border-secondary); }\n.hb-descriptions--bordered .hb-descriptions__item:nth-child(3n) { border-right: none; }\n.hb-descriptions--bordered .hb-descriptions__item { padding: var(--hb-spacing-sm) var(--hb-spacing-md); }\n.hb-descriptions--bordered .hb-descriptions__item:last-child { border-bottom: none; }\n\n/* ============================================================\n * 响应式(移动端):小屏 descriptions 改为单列纵向堆叠,\n * label 与 value 上下排列,避免横向挤压。\n * ============================================================ */\n@media (max-width: 575.98px) {\n .hb-descriptions__row {\n grid-template-columns: 1fr !important;\n }\n\n .hb-descriptions__item {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--hb-spacing-xxs, 2px);\n }\n\n .hb-descriptions__label {\n margin-right: 0;\n margin-bottom: var(--hb-spacing-xxs, 2px);\n font-weight: 500;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Descriptions 描述列表组件\n * 成组展示多个描述字段,支持列数、边框、冒号、跨列 span\n */\n@Component({ tag: 'hb-descriptions', styleUrl: 'descriptions.css', shadow: true })\nexport class Descriptions {\n /** 标题 */\n @Prop() title: string = '';\n\n /** 是否带边框 */\n @Prop() border: boolean = false;\n\n /** 每行列数 */\n @Prop() column: number = 3;\n\n /** 是否显示冒号 */\n @Prop() colon: boolean = true;\n\n /** 描述项数组 */\n @Prop() items: DescriptionItem[] = [];\n\n render() {\n return (\n <div class={{ 'hb-descriptions': true, 'hb-descriptions--bordered': this.border }}>\n {this.title && <div class=\"hb-descriptions__title\">{this.title}</div>}\n <div class=\"hb-descriptions__view\">\n <div class=\"hb-descriptions__row\" style={{ gridTemplateColumns: `repeat(${this.column}, minmax(0, 1fr))` }}>\n {this.items.map((item) => (\n <div\n class=\"hb-descriptions__item\"\n style={item.span ? { gridColumn: `span ${item.span}` } : undefined}\n >\n <span class=\"hb-descriptions__label\">\n {item.label}\n {this.colon && <span class=\"hb-descriptions__colon\">:</span>}\n </span>\n <span class=\"hb-descriptions__value\">{item.value}</span>\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport interface DescriptionItem {\n label: string;\n value: string;\n span?: number;\n}\n"],"version":3}
|
|
@@ -16,13 +16,13 @@ const Divider = class {
|
|
|
16
16
|
dashed = false;
|
|
17
17
|
render() {
|
|
18
18
|
const hasContent = this.el.childNodes.length > 0;
|
|
19
|
-
return (h("div", { key: '
|
|
19
|
+
return (h("div", { key: '72f2e4f0e52b38799b0c292e99565c683a2b455c', class: {
|
|
20
20
|
'hb-divider': true,
|
|
21
21
|
[`hb-divider--${this.direction}`]: true,
|
|
22
22
|
'hb-divider--dashed': this.dashed,
|
|
23
23
|
'hb-divider--with-text': hasContent,
|
|
24
24
|
[`hb-divider--with-text-${this.contentPosition}`]: hasContent,
|
|
25
|
-
} }, h("div", { key: '
|
|
25
|
+
} }, h("div", { key: 'afe16a81dee380655eaa42090dd1b760e9403e8c', class: "hb-divider__line hb-divider__line--before" }), h("div", { key: '9b64b270790df8794ae9bbbe13783fc1b77367f1', class: "hb-divider__text" }, h("slot", { key: '9e9a5a024fa6212026cca8e9e8d76e84af6523cb' })), h("div", { key: '6277539ebf37f4e295e8b9d9a8ce912de15efa71', class: "hb-divider__line hb-divider__line--after" })));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
Divider.style = HbDividerStyle0;
|
|
@@ -72,7 +72,7 @@ const Drawer = class {
|
|
|
72
72
|
const isVertical = dir === 'ttb' || dir === 'btt';
|
|
73
73
|
const sizeStyle = isVertical ? { height: this.size } : { width: this.size };
|
|
74
74
|
const translateClass = `hb-drawer--${dir}`;
|
|
75
|
-
return (h("div", { key: '
|
|
75
|
+
return (h("div", { key: 'e85f1040fdaacbf6e5d329f5561cdae25b2d4bc7', class: { 'hb-drawer-wrapper': true, 'hb-drawer-wrapper--visible': this.modelValue } }, this.modal && h("div", { key: '274cc165c21ea6490ca8f08be672b0605abc5d64', class: "hb-drawer__overlay", style: { zIndex: String(this.zIndexState) }, onClick: () => this.closeOnClickModal && this.close() }), h("div", { key: '8be6526f044035cfa31aebc66c5d459dbb2102af', ref: (el) => (this.panelRef = el), class: { 'hb-drawer': true, [translateClass]: true, 'hb-drawer--visible': this.modelValue }, style: { ...sizeStyle, zIndex: String(this.zIndexState + 1) }, role: "dialog", "aria-modal": "true", "aria-label": this.title || undefined }, h("div", { key: '826172fbe94e295fa146ef451455307fc97c7925', class: "hb-drawer__header" }, h("span", { key: 'a9fc420dea4707d6bd9ae38752c1ef08892ee44b', class: "hb-drawer__title" }, this.title), this.showClose && h("button", { key: 'b10452826b00e8fddc37a895af118c88b6c90ea4', type: "button", class: "hb-drawer__close", "aria-label": "\u5173\u95ED", onClick: this.close }, "\u00D7")), h("div", { key: 'f251c9c87ec21647c9bbc5363c6818b7fba4f7b5', class: "hb-drawer__body" }, h("slot", { key: '48e06fdeac538ec34aded9216c4a6ea98bd262ca' })))));
|
|
76
76
|
}
|
|
77
77
|
static get watchers() { return {
|
|
78
78
|
"modelValue": ["handleVisible"]
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-fdf7135e.js';
|
|
2
2
|
import { c as createClickOutsideHandler } from './click-outside-291294f9.js';
|
|
3
3
|
import { g as getNextZIndex } from './popup-manager-128cc685.js';
|
|
4
|
+
import { i as isActivationKey, h as handleListKeyboard } from './a11y-f9ab2964.js';
|
|
4
5
|
|
|
5
|
-
const dropdownCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:inline-block;position:relative}.hb-dropdown__trigger{cursor:pointer;display:inline-block}.hb-dropdown__menu{animation:hb-dropdown-fade-in .15s ease-out;background-color:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);left:0;margin-top:4px;min-width:120px;padding:4px 0;position:absolute;top:100%}.hb-dropdown__item{align-items:center;color:var(--hb-color-text);cursor:pointer;display:flex;font-size:var(--hb-font-size-sm);padding:6px 16px;transition:background-color var(--hb-transition-duration);white-space:nowrap}.hb-dropdown__item:hover:not(.hb-dropdown__item--disabled){background-color:var(--hb-color-fill-tertiary);color:var(--hb-color-primary)}.hb-dropdown__item--disabled{color:var(--hb-color-text-disabled);cursor:not-allowed}.hb-dropdown__item--divided{border-top:1px solid var(--hb-color-border-secondary);margin-top:4px;padding-top:8px}.hb-dropdown__item--danger{color:var(--hb-color-danger)}.hb-dropdown__item--danger:hover:not(.hb-dropdown__item--disabled){background-color:var(--hb-color-danger-bg);color:var(--hb-color-danger)}@keyframes hb-dropdown-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
6
|
+
const dropdownCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:inline-block;position:relative}.hb-dropdown__trigger{cursor:pointer;display:inline-block}.hb-dropdown__menu{animation:hb-dropdown-fade-in .15s ease-out;background-color:var(--hb-color-bg-elevated);border-radius:var(--hb-border-radius-base);box-shadow:var(--hb-box-shadow);left:0;margin-top:4px;min-width:120px;padding:4px 0;position:absolute;top:100%}.hb-dropdown__item{align-items:center;color:var(--hb-color-text);cursor:pointer;display:flex;font-size:var(--hb-font-size-sm);padding:6px 16px;transition:background-color var(--hb-transition-duration);white-space:nowrap}.hb-dropdown__item--active:not(.hb-dropdown__item--disabled),.hb-dropdown__item:hover:not(.hb-dropdown__item--disabled){background-color:var(--hb-color-fill-tertiary);color:var(--hb-color-primary)}.hb-dropdown__item--disabled{color:var(--hb-color-text-disabled);cursor:not-allowed}.hb-dropdown__item--divided{border-top:1px solid var(--hb-color-border-secondary);margin-top:4px;padding-top:8px}.hb-dropdown__item--danger{color:var(--hb-color-danger)}.hb-dropdown__item--danger:hover:not(.hb-dropdown__item--disabled){background-color:var(--hb-color-danger-bg);color:var(--hb-color-danger)}@keyframes hb-dropdown-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
|
|
6
7
|
const HbDropdownStyle0 = dropdownCss;
|
|
7
8
|
|
|
8
9
|
const Dropdown = class {
|
|
@@ -18,6 +19,8 @@ const Dropdown = class {
|
|
|
18
19
|
/** 是否禁用 */
|
|
19
20
|
disabled = false;
|
|
20
21
|
isOpen = false;
|
|
22
|
+
/** 键盘高亮项索引(-1 表示无) */
|
|
23
|
+
activeIndex = -1;
|
|
21
24
|
/** 命令事件 */
|
|
22
25
|
hbCommand;
|
|
23
26
|
clickOutside = createClickOutsideHandler({
|
|
@@ -29,8 +32,9 @@ const Dropdown = class {
|
|
|
29
32
|
this.clickOutside = createClickOutsideHandler({
|
|
30
33
|
host: this.el,
|
|
31
34
|
isOpen: () => this.isOpen,
|
|
32
|
-
onClose: () => { this.
|
|
35
|
+
onClose: () => { this.close(); },
|
|
33
36
|
});
|
|
37
|
+
// click 触发才需要外部点击关闭;hover 触发由 mouseenter/leave 控制
|
|
34
38
|
if (this.trigger === 'click') {
|
|
35
39
|
this.clickOutside.connect();
|
|
36
40
|
}
|
|
@@ -38,34 +42,98 @@ const Dropdown = class {
|
|
|
38
42
|
disconnectedCallback() {
|
|
39
43
|
this.clickOutside.disconnect();
|
|
40
44
|
}
|
|
45
|
+
open = () => {
|
|
46
|
+
if (this.disabled)
|
|
47
|
+
return;
|
|
48
|
+
this.isOpen = true;
|
|
49
|
+
// 打开时默认高亮首个可选(非禁用)项,便于 Enter 直接选
|
|
50
|
+
this.activeIndex = this.items.findIndex(i => !i.disabled);
|
|
51
|
+
};
|
|
52
|
+
close = () => {
|
|
53
|
+
this.isOpen = false;
|
|
54
|
+
this.activeIndex = -1;
|
|
55
|
+
};
|
|
41
56
|
show = () => {
|
|
42
57
|
if (this.disabled)
|
|
43
58
|
return;
|
|
44
59
|
this.isOpen = true;
|
|
45
60
|
};
|
|
46
61
|
hide = () => {
|
|
47
|
-
this.
|
|
62
|
+
this.close();
|
|
48
63
|
};
|
|
49
64
|
toggle = () => {
|
|
50
65
|
if (this.disabled)
|
|
51
66
|
return;
|
|
52
|
-
|
|
67
|
+
if (this.isOpen)
|
|
68
|
+
this.close();
|
|
69
|
+
else
|
|
70
|
+
this.open();
|
|
53
71
|
};
|
|
54
72
|
handleSelect = (item) => {
|
|
55
73
|
if (item.disabled)
|
|
56
74
|
return;
|
|
57
|
-
this.
|
|
75
|
+
this.close();
|
|
58
76
|
this.hbCommand.emit(item.key);
|
|
59
77
|
};
|
|
78
|
+
/** 触发器键盘:Enter/Space/↓ 打开 */
|
|
79
|
+
handleTriggerKeydown = (e) => {
|
|
80
|
+
if (this.disabled)
|
|
81
|
+
return;
|
|
82
|
+
if (this.trigger === 'hover')
|
|
83
|
+
return; // hover 触发不需要键盘打开(focus 会展开见下)
|
|
84
|
+
if (isActivationKey(e.key) || e.key === 'ArrowDown') {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
this.open();
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
/** 菜单键盘:↑↓ 导航、Enter/Space 选中、Esc 关闭、Home/End 跳首尾 */
|
|
90
|
+
handleMenuKeydown = (e) => {
|
|
91
|
+
const enabledCount = this.items.length;
|
|
92
|
+
const action = handleListKeyboard(e, {
|
|
93
|
+
activeIndex: this.activeIndex,
|
|
94
|
+
itemCount: enabledCount,
|
|
95
|
+
loop: true,
|
|
96
|
+
});
|
|
97
|
+
switch (action.type) {
|
|
98
|
+
case 'navigate':
|
|
99
|
+
e.preventDefault();
|
|
100
|
+
// 跳过禁用项:最多扫一圈
|
|
101
|
+
{
|
|
102
|
+
let idx = action.index;
|
|
103
|
+
for (let i = 0; i < enabledCount; i++) {
|
|
104
|
+
if (!this.items[idx]?.disabled)
|
|
105
|
+
break;
|
|
106
|
+
idx = (idx + 1) % enabledCount;
|
|
107
|
+
}
|
|
108
|
+
this.activeIndex = idx;
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
case 'select': {
|
|
112
|
+
e.preventDefault();
|
|
113
|
+
const item = this.items[action.index];
|
|
114
|
+
if (item && !item.disabled)
|
|
115
|
+
this.handleSelect(item);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case 'close':
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
this.close();
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
60
124
|
render() {
|
|
61
125
|
const triggerEvents = this.trigger === 'hover'
|
|
62
126
|
? { onMouseEnter: this.show, onMouseLeave: this.hide }
|
|
63
127
|
: { onClick: this.toggle };
|
|
64
|
-
return (h("div", { key: '
|
|
128
|
+
return (h("div", { key: '59f46f0179081fb6c094e21e1f0cd8008ce5e71d', class: "hb-dropdown", ...triggerEvents, onKeyDown: this.handleTriggerKeydown }, h("div", { key: '346a5bfca387e19aa85d420516c542d0c0a01b50', class: "hb-dropdown__trigger", role: "button", tabindex: this.disabled ? -1 : 0, "aria-haspopup": "menu", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", { key: '260f2627159a9bcbcaa374b1c6e8a473ed76e876' })), this.isOpen && (h("div", { key: '478f230e909c1ad13dc32dabcd1d2b543bde0c6c', class: "hb-dropdown__menu", style: { zIndex: String(getNextZIndex()) }, role: "menu", onKeyDown: this.handleMenuKeydown }, this.items.map((item, index) => (h("div", { class: {
|
|
65
129
|
'hb-dropdown__item': true,
|
|
66
130
|
'hb-dropdown__item--disabled': item.disabled,
|
|
67
131
|
'hb-dropdown__item--divided': item.divided,
|
|
68
132
|
'hb-dropdown__item--danger': item.danger,
|
|
133
|
+
'hb-dropdown__item--active': index === this.activeIndex,
|
|
134
|
+
}, role: "menuitem", tabindex: -1, "aria-disabled": item.disabled ? 'true' : undefined, onMouseEnter: () => {
|
|
135
|
+
if (!item.disabled)
|
|
136
|
+
this.activeIndex = index;
|
|
69
137
|
}, onClick: () => this.handleSelect(item) }, item.label)))))));
|
|
70
138
|
}
|
|
71
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"hb-dropdown.entry.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,mzNAAmzN,CAAC;AACx0N,yBAAe,WAAW;;MCoBb,QAAQ;;;;;;;IAIX,KAAK,GAAmB,EAAE,CAAC;;IAG3B,OAAO,GAAsB,OAAO,CAAC;;IAGrC,QAAQ,GAAY,KAAK,CAAC;IAEzB,MAAM,GAAY,KAAK,CAAC;;IAGxB,SAAS,CAAuB;IAEjC,YAAY,GAAG,yBAAyB,CAAC;QAC/C,IAAI,EAAE,IAAW;QACjB,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM;QACzB,OAAO,EAAE,QAAQ,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE;KACxC,CAAC,CAAC;IAEH,gBAAgB;QACd,IAAI,CAAC,YAAY,GAAG,yBAAyB,CAAC;YAC5C,IAAI,EAAE,IAAI,CAAC,EAAE;YACb,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM;YACzB,OAAO,EAAE,QAAQ,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE;SACxC,CAAC,CAAC;QACH,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,EAAE;YAC5B,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;SAC7B;KACF;IAED,oBAAoB;QAClB,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;KAChC;IAEO,IAAI,GAAG;QACb,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;KACpB,CAAC;IAEM,IAAI,GAAG;QACb,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;KACrB,CAAC;IAEM,MAAM,GAAG;QACf,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;KAC5B,CAAC;IAEM,YAAY,GAAG,CAAC,IAAkB;QACxC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC/B,CAAC;IAEF,MAAM;QACJ,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,KAAK,OAAO;cAC1C,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE;cACpD,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QAE7B,QACE,4DAAK,KAAK,EAAC,aAAa,KAAK,aAAa,IACxC,4DAAK,KAAK,EAAC,sBAAsB,IAC/B,8DAAQ,CACJ,EACL,IAAI,CAAC,MAAM,KACV,4DAAK,KAAK,EAAC,mBAAmB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC,EAAE,IACtE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAClB,WACE,KAAK,EAAE;gBACL,mBAAmB,EAAE,IAAI;gBACzB,6BAA6B,EAAE,IAAI,CAAC,QAAQ;gBAC5C,4BAA4B,EAAE,IAAI,CAAC,OAAO;gBAC1C,2BAA2B,EAAE,IAAI,CAAC,MAAM;aACzC,EACD,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAErC,IAAI,CAAC,KAAK,CACP,CACP,CAAC,CACE,CACP,CACG,EACN;KACH;;;;;;","names":[],"sources":["src/components/Dropdown/dropdown.css?tag=hb-dropdown&encapsulation=shadow","src/components/Dropdown/Dropdown.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n}\n\n.hb-dropdown__trigger {\n display: inline-block;\n cursor: pointer;\n}\n\n.hb-dropdown__menu {\n position: absolute;\n top: 100%;\n left: 0;\n min-width: 120px;\n margin-top: 4px;\n padding: 4px 0;\n background-color: var(--hb-color-bg-elevated);\n border-radius: var(--hb-border-radius-base);\n box-shadow: var(--hb-box-shadow);\n animation: hb-dropdown-fade-in 0.15s ease-out;\n}\n\n.hb-dropdown__item {\n display: flex;\n align-items: center;\n padding: 6px 16px;\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n cursor: pointer;\n white-space: nowrap;\n transition: background-color var(--hb-transition-duration);\n}\n\n.hb-dropdown__item:hover:not(.hb-dropdown__item--disabled) {\n background-color: var(--hb-color-fill-tertiary);\n color: var(--hb-color-primary);\n}\n\n.hb-dropdown__item--disabled {\n color: var(--hb-color-text-disabled);\n cursor: not-allowed;\n}\n\n.hb-dropdown__item--divided {\n margin-top: 4px;\n padding-top: 8px;\n border-top: 1px solid var(--hb-color-border-secondary);\n}\n\n.hb-dropdown__item--danger {\n color: var(--hb-color-danger);\n}\n.hb-dropdown__item--danger:hover:not(.hb-dropdown__item--disabled) {\n background-color: var(--hb-color-danger-bg);\n color: var(--hb-color-danger);\n}\n\n@keyframes hb-dropdown-fade-in {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n","import { Component, h, Prop, State, Element, Event, EventEmitter } from '@stencil/core';\nimport { createClickOutsideHandler } from '../../utils/click-outside';\nimport { getNextZIndex } from '../../utils/popup-manager';\n\nexport interface DropdownItem {\n key: string;\n label: string;\n disabled?: boolean;\n divided?: boolean;\n danger?: boolean;\n}\n\n/**\n * Dropdown 下拉菜单组件\n * 将动作或菜单折叠到下拉菜单中\n */\n@Component({\n tag: 'hb-dropdown',\n styleUrl: 'dropdown.css',\n shadow: true,\n})\nexport class Dropdown {\n @Element() el: HTMLElement;\n\n /** 菜单项 */\n @Prop() items: DropdownItem[] = [];\n\n /** 触发方式 */\n @Prop() trigger: 'hover' | 'click' = 'hover';\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n @State() isOpen: boolean = false;\n\n /** 命令事件 */\n @Event() hbCommand: EventEmitter<string>;\n\n private clickOutside = createClickOutsideHandler({\n host: null as any,\n isOpen: () => this.isOpen,\n onClose: () => { this.isOpen = false; },\n });\n\n componentDidLoad() {\n this.clickOutside = createClickOutsideHandler({\n host: this.el,\n isOpen: () => this.isOpen,\n onClose: () => { this.isOpen = false; },\n });\n if (this.trigger === 'click') {\n this.clickOutside.connect();\n }\n }\n\n disconnectedCallback() {\n this.clickOutside.disconnect();\n }\n\n private show = () => {\n if (this.disabled) return;\n this.isOpen = true;\n };\n\n private hide = () => {\n this.isOpen = false;\n };\n\n private toggle = () => {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n };\n\n private handleSelect = (item: DropdownItem) => {\n if (item.disabled) return;\n this.isOpen = false;\n this.hbCommand.emit(item.key);\n };\n\n render() {\n const triggerEvents = this.trigger === 'hover'\n ? { onMouseEnter: this.show, onMouseLeave: this.hide }\n : { onClick: this.toggle };\n\n return (\n <div class=\"hb-dropdown\" {...triggerEvents}>\n <div class=\"hb-dropdown__trigger\">\n <slot />\n </div>\n {this.isOpen && (\n <div class=\"hb-dropdown__menu\" style={{ zIndex: String(getNextZIndex()) }}>\n {this.items.map(item => (\n <div\n class={{\n 'hb-dropdown__item': true,\n 'hb-dropdown__item--disabled': item.disabled,\n 'hb-dropdown__item--divided': item.divided,\n 'hb-dropdown__item--danger': item.danger,\n }}\n onClick={() => this.handleSelect(item)}\n >\n {item.label}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"hb-dropdown.entry.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,g3NAAg3N,CAAC;AACr4N,yBAAe,WAAW;;MC0Bb,QAAQ;;;;;;;IAIX,KAAK,GAAmB,EAAE,CAAC;;IAG3B,OAAO,GAAsB,OAAO,CAAC;;IAGrC,QAAQ,GAAY,KAAK,CAAC;IAEzB,MAAM,GAAY,KAAK,CAAC;;IAExB,WAAW,GAAW,CAAC,CAAC,CAAC;;IAGzB,SAAS,CAAuB;IAEjC,YAAY,GAAG,yBAAyB,CAAC;QAC/C,IAAI,EAAE,IAAW;QACjB,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM;QACzB,OAAO,EAAE,QAAQ,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE;KACxC,CAAC,CAAC;IAEH,gBAAgB;QACd,IAAI,CAAC,YAAY,GAAG,yBAAyB,CAAC;YAC5C,IAAI,EAAE,IAAI,CAAC,EAAE;YACb,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM;YACzB,OAAO,EAAE,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE;SACjC,CAAC,CAAC;;QAEH,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,EAAE;YAC5B,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;SAC7B;KACF;IAED,oBAAoB;QAClB,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;KAChC;IAEO,IAAI,GAAG;QACb,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;;QAEnB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;KAC3D,CAAC;IAEM,KAAK,GAAG;QACd,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;KACvB,CAAC;IAEM,IAAI,GAAG;QACb,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;KACpB,CAAC;IAEM,IAAI,GAAG;QACb,IAAI,CAAC,KAAK,EAAE,CAAC;KACd,CAAC;IAEM,MAAM,GAAG;QACf,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,IAAI,CAAC,MAAM;YAAE,IAAI,CAAC,KAAK,EAAE,CAAC;;YACzB,IAAI,CAAC,IAAI,EAAE,CAAC;KAClB,CAAC;IAEM,YAAY,GAAG,CAAC,IAAkB;QACxC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC/B,CAAC;;IAGM,oBAAoB,GAAG,CAAC,CAAgB;QAC9C,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO;YAAE,OAAO;QACrC,IAAI,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW,EAAE;YACnD,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,EAAE,CAAC;SACb;KACF,CAAC;;IAGM,iBAAiB,GAAG,CAAC,CAAgB;QAC3C,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QACvC,MAAM,MAAM,GAAG,kBAAkB,CAAC,CAAC,EAAE;YACnC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,YAAY;YACvB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;QACH,QAAQ,MAAM,CAAC,IAAI;YACjB,KAAK,UAAU;gBACb,CAAC,CAAC,cAAc,EAAE,CAAC;;gBAEnB;oBACE,IAAI,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;oBACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,EAAE,CAAC,EAAE,EAAE;wBACrC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ;4BAAE,MAAM;wBACtC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,YAAY,CAAC;qBAChC;oBACD,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;iBACxB;gBACD,MAAM;YACR,KAAK,QAAQ,EAAE;gBACb,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACtC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ;oBAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;gBACpD,MAAM;aACP;YACD,KAAK,OAAO;gBACV,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACb,MAAM;SAGT;KACF,CAAC;IAEF,MAAM;QACJ,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,KAAK,OAAO;cAC1C,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE;cACpD,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QAE7B,QACE,4DACE,KAAK,EAAC,aAAa,KACf,aAAa,EACjB,SAAS,EAAE,IAAI,CAAC,oBAAoB,IAEpC,4DACE,KAAK,EAAC,sBAAsB,EAC5B,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,mBAClB,MAAM,mBACL,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,mBAC9B,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,IAE/C,8DAAQ,CACJ,EACL,IAAI,CAAC,MAAM,KACV,4DACE,KAAK,EAAC,mBAAmB,EACzB,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC,EAAE,EAC1C,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,IAAI,CAAC,iBAAiB,IAEhC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,MAC1B,WACE,KAAK,EAAE;gBACL,mBAAmB,EAAE,IAAI;gBACzB,6BAA6B,EAAE,IAAI,CAAC,QAAQ;gBAC5C,4BAA4B,EAAE,IAAI,CAAC,OAAO;gBAC1C,2BAA2B,EAAE,IAAI,CAAC,MAAM;gBACxC,2BAA2B,EAAE,KAAK,KAAK,IAAI,CAAC,WAAW;aACxD,EACD,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC,mBACG,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,SAAS,EACjD,YAAY,EAAE;gBAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ;oBAAE,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;aAAE,EACrE,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAErC,IAAI,CAAC,KAAK,CACP,CACP,CAAC,CACE,CACP,CACG,EACN;KACH;;;;;;","names":[],"sources":["src/components/Dropdown/dropdown.css?tag=hb-dropdown&encapsulation=shadow","src/components/Dropdown/Dropdown.tsx"],"sourcesContent":[":host {\n display: inline-block;\n position: relative;\n}\n\n.hb-dropdown__trigger {\n display: inline-block;\n cursor: pointer;\n}\n\n.hb-dropdown__menu {\n position: absolute;\n top: 100%;\n left: 0;\n min-width: 120px;\n margin-top: 4px;\n padding: 4px 0;\n background-color: var(--hb-color-bg-elevated);\n border-radius: var(--hb-border-radius-base);\n box-shadow: var(--hb-box-shadow);\n animation: hb-dropdown-fade-in 0.15s ease-out;\n}\n\n.hb-dropdown__item {\n display: flex;\n align-items: center;\n padding: 6px 16px;\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n cursor: pointer;\n white-space: nowrap;\n transition: background-color var(--hb-transition-duration);\n}\n\n.hb-dropdown__item:hover:not(.hb-dropdown__item--disabled),\n.hb-dropdown__item--active:not(.hb-dropdown__item--disabled) {\n background-color: var(--hb-color-fill-tertiary);\n color: var(--hb-color-primary);\n}\n\n.hb-dropdown__item--disabled {\n color: var(--hb-color-text-disabled);\n cursor: not-allowed;\n}\n\n.hb-dropdown__item--divided {\n margin-top: 4px;\n padding-top: 8px;\n border-top: 1px solid var(--hb-color-border-secondary);\n}\n\n.hb-dropdown__item--danger {\n color: var(--hb-color-danger);\n}\n.hb-dropdown__item--danger:hover:not(.hb-dropdown__item--disabled) {\n background-color: var(--hb-color-danger-bg);\n color: var(--hb-color-danger);\n}\n\n@keyframes hb-dropdown-fade-in {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n","import { Component, h, Prop, State, Element, Event, EventEmitter } from '@stencil/core';\nimport { createClickOutsideHandler } from '../../utils/click-outside';\nimport { getNextZIndex } from '../../utils/popup-manager';\nimport { handleListKeyboard, isActivationKey } from '../../utils/a11y';\n\nexport interface DropdownItem {\n key: string;\n label: string;\n disabled?: boolean;\n divided?: boolean;\n danger?: boolean;\n}\n\n/**\n * Dropdown 下拉菜单组件\n * 将动作或菜单折叠到下拉菜单中。\n *\n * 无障碍(对齐 WAI-ARIA menu / antd):\n * - 触发器 role=button + aria-haspopup=menu + aria-expanded\n * - 菜单 role=menu,菜单项 role=menuitem + aria-disabled\n * - 键盘:trigger 上 Enter/Space/↓ 打开;菜单内 ↑↓ 导航、Enter/Space 选中、Esc 关闭\n */\n@Component({\n tag: 'hb-dropdown',\n styleUrl: 'dropdown.css',\n shadow: true,\n})\nexport class Dropdown {\n @Element() el: HTMLElement;\n\n /** 菜单项 */\n @Prop() items: DropdownItem[] = [];\n\n /** 触发方式 */\n @Prop() trigger: 'hover' | 'click' = 'hover';\n\n /** 是否禁用 */\n @Prop() disabled: boolean = false;\n\n @State() isOpen: boolean = false;\n /** 键盘高亮项索引(-1 表示无) */\n @State() activeIndex: number = -1;\n\n /** 命令事件 */\n @Event() hbCommand: EventEmitter<string>;\n\n private clickOutside = createClickOutsideHandler({\n host: null as any,\n isOpen: () => this.isOpen,\n onClose: () => { this.isOpen = false; },\n });\n\n componentDidLoad() {\n this.clickOutside = createClickOutsideHandler({\n host: this.el,\n isOpen: () => this.isOpen,\n onClose: () => { this.close(); },\n });\n // click 触发才需要外部点击关闭;hover 触发由 mouseenter/leave 控制\n if (this.trigger === 'click') {\n this.clickOutside.connect();\n }\n }\n\n disconnectedCallback() {\n this.clickOutside.disconnect();\n }\n\n private open = () => {\n if (this.disabled) return;\n this.isOpen = true;\n // 打开时默认高亮首个可选(非禁用)项,便于 Enter 直接选\n this.activeIndex = this.items.findIndex(i => !i.disabled);\n };\n\n private close = () => {\n this.isOpen = false;\n this.activeIndex = -1;\n };\n\n private show = () => {\n if (this.disabled) return;\n this.isOpen = true;\n };\n\n private hide = () => {\n this.close();\n };\n\n private toggle = () => {\n if (this.disabled) return;\n if (this.isOpen) this.close();\n else this.open();\n };\n\n private handleSelect = (item: DropdownItem) => {\n if (item.disabled) return;\n this.close();\n this.hbCommand.emit(item.key);\n };\n\n /** 触发器键盘:Enter/Space/↓ 打开 */\n private handleTriggerKeydown = (e: KeyboardEvent) => {\n if (this.disabled) return;\n if (this.trigger === 'hover') return; // hover 触发不需要键盘打开(focus 会展开见下)\n if (isActivationKey(e.key) || e.key === 'ArrowDown') {\n e.preventDefault();\n this.open();\n }\n };\n\n /** 菜单键盘:↑↓ 导航、Enter/Space 选中、Esc 关闭、Home/End 跳首尾 */\n private handleMenuKeydown = (e: KeyboardEvent) => {\n const enabledCount = this.items.length;\n const action = handleListKeyboard(e, {\n activeIndex: this.activeIndex,\n itemCount: enabledCount,\n loop: true,\n });\n switch (action.type) {\n case 'navigate':\n e.preventDefault();\n // 跳过禁用项:最多扫一圈\n {\n let idx = action.index;\n for (let i = 0; i < enabledCount; i++) {\n if (!this.items[idx]?.disabled) break;\n idx = (idx + 1) % enabledCount;\n }\n this.activeIndex = idx;\n }\n break;\n case 'select': {\n e.preventDefault();\n const item = this.items[action.index];\n if (item && !item.disabled) this.handleSelect(item);\n break;\n }\n case 'close':\n e.preventDefault();\n this.close();\n break;\n default:\n break;\n }\n };\n\n render() {\n const triggerEvents = this.trigger === 'hover'\n ? { onMouseEnter: this.show, onMouseLeave: this.hide }\n : { onClick: this.toggle };\n\n return (\n <div\n class=\"hb-dropdown\"\n {...triggerEvents}\n onKeyDown={this.handleTriggerKeydown}\n >\n <div\n class=\"hb-dropdown__trigger\"\n role=\"button\"\n tabindex={this.disabled ? -1 : 0}\n aria-haspopup=\"menu\"\n aria-expanded={this.isOpen ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n >\n <slot />\n </div>\n {this.isOpen && (\n <div\n class=\"hb-dropdown__menu\"\n style={{ zIndex: String(getNextZIndex()) }}\n role=\"menu\"\n onKeyDown={this.handleMenuKeydown}\n >\n {this.items.map((item, index) => (\n <div\n class={{\n 'hb-dropdown__item': true,\n 'hb-dropdown__item--disabled': item.disabled,\n 'hb-dropdown__item--divided': item.divided,\n 'hb-dropdown__item--danger': item.danger,\n 'hb-dropdown__item--active': index === this.activeIndex,\n }}\n role=\"menuitem\"\n tabindex={-1}\n aria-disabled={item.disabled ? 'true' : undefined}\n onMouseEnter={() => { if (!item.disabled) this.activeIndex = index; }}\n onClick={() => this.handleSelect(item)}\n >\n {item.label}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -10,7 +10,7 @@ const Empty = class {
|
|
|
10
10
|
description = '暂无数据';
|
|
11
11
|
image;
|
|
12
12
|
render() {
|
|
13
|
-
return (h("div", { key: '
|
|
13
|
+
return (h("div", { key: 'c5d0bd8a84173bfd5dfa42255288ea2a712c5d7d', class: "hb-empty" }, h("div", { key: '286d98932465bb79a74a3db494fee2cbd89e06fc', class: "hb-empty__image" }, this.image ? h("img", { src: this.image, alt: this.description }) : h("span", { class: "hb-empty__icon" }, "\uD83D\uDCED")), h("div", { key: 'f8c1af87ab0308ebd0703aaaaffd5c3af3317235', class: "hb-empty__description" }, this.description), h("div", { key: '3bbed3cb38933b0ed47ff34409b7f18c7a14044a', class: "hb-empty__footer" }, h("slot", { key: '2ffb28e71fe2558c601597265e55bca599617997' }))));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
Empty.style = HbEmptyStyle0;
|
|
@@ -39,11 +39,11 @@ const FloatButton = class {
|
|
|
39
39
|
right: `${this.right}px`,
|
|
40
40
|
bottom: `${this.bottom}px`,
|
|
41
41
|
};
|
|
42
|
-
return (h("button", { key: '
|
|
42
|
+
return (h("button", { key: '40601144541971a0bedf09c9228ab0de219620e8', type: "button", class: {
|
|
43
43
|
'hb-float-button': true,
|
|
44
44
|
[`hb-float-button--${this.type}`]: true,
|
|
45
45
|
[`hb-float-button--${this.shape}`]: true,
|
|
46
|
-
}, style: style, onClick: this.handleClick }, this.icon && h("span", { key: '
|
|
46
|
+
}, style: style, onClick: this.handleClick }, this.icon && h("span", { key: 'bcdf2cc93de5b5c56db5967dde89f499efa3c5a5', class: "hb-float-button__icon" }, this.icon), this.description && h("span", { key: 'cc735e9dbc892b6b054b10af00b8e3b0805aea26', class: "hb-float-button__description" }, this.description), this.renderBadge()));
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
FloatButton.style = HbFloatButtonStyle0;
|
|
@@ -16,7 +16,7 @@ const Footer = class {
|
|
|
16
16
|
if (this.height) {
|
|
17
17
|
style.height = this.height;
|
|
18
18
|
}
|
|
19
|
-
return (h("footer", { key: '
|
|
19
|
+
return (h("footer", { key: '65847074853df09c57dd2bcead1470dac15f5951', class: "hb-footer", style: style }, h("slot", { key: 'e0f976bf1b3cd1f3a7ae2609bdf9b621070dac10' })));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
Footer.style = HbFooterStyle0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h } from './index-fdf7135e.js';
|
|
2
2
|
|
|
3
|
-
const formItemCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.inline{display:inline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-form-item{align-items:flex-start;display:flex;gap:var(--hb-spacing-sm)}.hb-form-item__label{align-items:center;color:var(--hb-color-text);display:inline-flex;flex-shrink:0;font-size:var(--hb-font-size-sm);height:var(--hb-size-default);justify-content:flex-end;white-space:nowrap}.hb-form-item__required{color:var(--hb-color-danger);margin-right:4px}.hb-form-item__content{flex:1;position:relative}.hb-form-item__error{animation:hb-form-error-fade-in .2s ease-out;color:var(--hb-color-danger);font-size:var(--hb-font-size-xs);line-height:1;margin-top:4px}@keyframes hb-form-error-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@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}";
|
|
3
|
+
const formItemCss = "/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.inline{display:inline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-form-item{align-items:flex-start;display:flex;gap:var(--hb-spacing-sm)}.hb-form-item--label-top,:host([data-label-top]) .hb-form-item{align-items:stretch;flex-direction:column;gap:var(--hb-spacing-xs)}.hb-form-item__label{align-items:center;color:var(--hb-color-text);display:inline-flex;flex-shrink:0;font-size:var(--hb-font-size-sm,14px);height:var(--hb-size-default,32px);justify-content:flex-end;white-space:nowrap}.hb-form-item--label-top .hb-form-item__label,:host([data-label-top]) .hb-form-item__label{height:auto;justify-content:flex-start;padding-bottom:var(--hb-spacing-xxs,2px)}.hb-form-item--label-left .hb-form-item__label{justify-content:flex-start}.hb-form-item__required{color:var(--hb-color-danger);font-family:SimSun,sans-serif;font-size:var(--hb-font-size-sm,14px);margin-right:4px}.hb-form-item__content{flex:1;min-width:0;position:relative}.hb-form-item__error{animation:hb-form-error-fade-in .2s ease-out;color:var(--hb-color-danger);font-size:var(--hb-font-size-xs,12px);line-height:1.5;margin-top:4px;min-height:0}@keyframes hb-form-error-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@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}@media (max-width:575.98px){.hb-form-item{align-items:stretch!important;flex-direction:column!important;gap:var(--hb-spacing-xs)!important}.hb-form-item__label{height:auto!important;justify-content:flex-start!important;padding-bottom:var(--hb-spacing-xxs,2px)!important}}";
|
|
4
4
|
const HbFormItemStyle0 = formItemCss;
|
|
5
5
|
|
|
6
6
|
const FormItem = class {
|
|
@@ -22,6 +22,9 @@ const FormItem = class {
|
|
|
22
22
|
size = 'default';
|
|
23
23
|
errors = [];
|
|
24
24
|
isvalidating = false;
|
|
25
|
+
/** hb-form 在 componentWillLoad 注册的事件监听;FormItem 在 componentDidLoad 派发,
|
|
26
|
+
* 但 componentWillLoad 早于子组件的 componentDidLoad,因此注册一定先到。
|
|
27
|
+
* 这里还监听 hbFieldReset,便于 Form.resetFields 主动广播。 */
|
|
25
28
|
componentDidLoad() {
|
|
26
29
|
// 向父级 hb-form 注册
|
|
27
30
|
this.el.dispatchEvent(new CustomEvent('hbFormFieldRegister', {
|
|
@@ -32,14 +35,37 @@ const FormItem = class {
|
|
|
32
35
|
getValue: this.getValue,
|
|
33
36
|
},
|
|
34
37
|
bubbles: true,
|
|
38
|
+
composed: true, // 穿越 Shadow DOM 边界(FormItem 自身 shadow -> Form host)
|
|
35
39
|
}));
|
|
40
|
+
// 子控件值变化时清错(对齐 antd:合法输入即移除错误提示)
|
|
41
|
+
this.el.addEventListener('hbChange', this.handleChildChange);
|
|
36
42
|
}
|
|
43
|
+
disconnectedCallback() {
|
|
44
|
+
this.el.removeEventListener('hbChange', this.handleChildChange);
|
|
45
|
+
}
|
|
46
|
+
/** 子控件 hbChange 时,若当前有错误则重新校验以尽早清除错误提示 */
|
|
47
|
+
handleChildChange = () => {
|
|
48
|
+
if (this.errors.length > 0) {
|
|
49
|
+
void this.validate();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
37
52
|
get formRules() {
|
|
38
53
|
// 合并 prop 对应的 form rules 和自身 rules
|
|
39
54
|
const form = this.el.closest('hb-form');
|
|
40
55
|
const formLevelRules = form ? form.rules?.[this.prop] || [] : [];
|
|
41
56
|
return [...formLevelRules, ...this.rules];
|
|
42
57
|
}
|
|
58
|
+
/** 是否渲染必填星号:显式 required 或任一规则带 required(对齐 antd 自动推断) */
|
|
59
|
+
get isRequired() {
|
|
60
|
+
if (this.required)
|
|
61
|
+
return true;
|
|
62
|
+
return this.formRules.some(r => r && r.required);
|
|
63
|
+
}
|
|
64
|
+
/** 继承父 hb-form 的 labelPosition(FormItem 自身无此 prop,避免与 Form 冲突时以 Form 为准) */
|
|
65
|
+
get resolvedLabelPosition() {
|
|
66
|
+
const form = this.el.closest('hb-form');
|
|
67
|
+
return (form && form.labelPosition) || 'right';
|
|
68
|
+
}
|
|
43
69
|
/**
|
|
44
70
|
* 验证此字段
|
|
45
71
|
*/
|
|
@@ -53,13 +79,32 @@ const FormItem = class {
|
|
|
53
79
|
this.isvalidating = true;
|
|
54
80
|
const errors = [];
|
|
55
81
|
for (const rule of rules) {
|
|
56
|
-
|
|
82
|
+
// 必填校验:空字符串 / null / undefined / 空数组均视为"未填"
|
|
83
|
+
const isEmpty = value === undefined ||
|
|
84
|
+
value === null ||
|
|
85
|
+
value === '' ||
|
|
86
|
+
(Array.isArray(value) && value.length === 0);
|
|
87
|
+
if (rule.required && isEmpty) {
|
|
57
88
|
errors.push(rule.message || `${this.label || this.prop}不能为空`);
|
|
58
89
|
continue;
|
|
59
90
|
}
|
|
60
|
-
|
|
61
|
-
|
|
91
|
+
// 非必填且为空时,跳过后续格式校验(与 antd 行为一致)
|
|
92
|
+
if (isEmpty)
|
|
62
93
|
continue;
|
|
94
|
+
if (rule.pattern) {
|
|
95
|
+
const ok = typeof rule.pattern === 'string'
|
|
96
|
+
? new RegExp(rule.pattern).test(String(value))
|
|
97
|
+
: rule.pattern.test(String(value));
|
|
98
|
+
if (!ok) {
|
|
99
|
+
errors.push(rule.message || `${this.label || this.prop}格式不正确`);
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (rule.type === 'email') {
|
|
104
|
+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(value))) {
|
|
105
|
+
errors.push(rule.message || `${this.label || this.prop}格式不正确`);
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
63
108
|
}
|
|
64
109
|
if (rule.min !== undefined && typeof value === 'string' && value.length < rule.min) {
|
|
65
110
|
errors.push(rule.message || `${this.label || this.prop}最少${rule.min}个字符`);
|
|
@@ -86,19 +131,25 @@ const FormItem = class {
|
|
|
86
131
|
this.errors = [];
|
|
87
132
|
};
|
|
88
133
|
getValue = () => {
|
|
89
|
-
//
|
|
90
|
-
const input = this.el.querySelector('hb-input, hb-select, hb-cascader, hb-date-picker, hb-
|
|
134
|
+
// 覆盖所有表单控件:input/select/cascader/date 系列/数字/checkbox/radio/switch/slider/color-picker/rate/upload
|
|
135
|
+
const input = this.el.querySelector('hb-input, hb-select, hb-cascader, hb-date-picker, hb-date-time-picker, hb-date-range-picker, ' +
|
|
136
|
+
'hb-input-number, hb-textarea, hb-checkbox, hb-checkbox-group, hb-radio-group, hb-switch, ' +
|
|
137
|
+
'hb-slider, hb-color-picker, hb-rate, hb-time-picker, hb-time-select');
|
|
91
138
|
if (input) {
|
|
92
139
|
return input.modelValue;
|
|
93
140
|
}
|
|
94
141
|
return undefined;
|
|
95
142
|
};
|
|
96
143
|
render() {
|
|
97
|
-
|
|
144
|
+
const labelTop = this.resolvedLabelPosition === 'top';
|
|
145
|
+
return (h("div", { key: '5819f09264a5823f5130f1ce3ff34915da8c7e41', class: {
|
|
98
146
|
'hb-form-item': true,
|
|
99
147
|
'hb-form-item--error': this.errors.length > 0,
|
|
100
148
|
'hb-form-item--validating': this.isvalidating,
|
|
101
|
-
|
|
149
|
+
'hb-form-item--required': this.isRequired,
|
|
150
|
+
'hb-form-item--label-top': labelTop,
|
|
151
|
+
'hb-form-item--label-left': this.resolvedLabelPosition === 'left',
|
|
152
|
+
} }, this.label && (h("label", { key: '0a1881ea32b5a7a403e9fdfbcc886bdbc682abfa', class: "hb-form-item__label", style: this.labelWidth ? { width: this.labelWidth } : undefined, title: this.label }, this.isRequired && (h("span", { key: '46543df749b05021d867904d968dc60bf062ee41', class: "hb-form-item__required", "aria-hidden": "true" }, "*")), this.label)), h("div", { key: '5ce3712dc8ebcb70cb3688a4546f0dd1ee3e5cd4', class: "hb-form-item__content" }, h("slot", { key: '26e5c4a39560aca1796545b2f3679b042ef7d771' }), this.errors.length > 0 && (h("div", { key: '79e79d4bc52fe02c0735333cfbbb9b912a206c77', class: "hb-form-item__error", role: "alert" }, this.errors[0])))));
|
|
102
153
|
}
|
|
103
154
|
};
|
|
104
155
|
FormItem.style = HbFormItemStyle0;
|