@xihan-ui/vue 2.1.0 → 3.1.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/CHANGELOG.md +1394 -0
- package/README.md +1 -1
- package/dist/components/accordion/accordion.d.ts +6 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +4 -2
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/alert/alert.d.ts +9 -0
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +4 -0
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/anchor/anchor.d.ts +2 -2
- package/dist/components/anchor/anchor.d.ts.map +1 -1
- package/dist/components/anchor/anchor.js +2 -2
- package/dist/components/anchor/anchor.js.map +1 -1
- package/dist/components/anchor/use-anchor.d.ts +2 -2
- package/dist/components/anchor/use-anchor.js +3 -3
- package/dist/components/anchor/use-anchor.js.map +1 -1
- package/dist/components/approval/approval.d.ts +8 -1
- package/dist/components/approval/approval.d.ts.map +1 -1
- package/dist/components/approval/approval.js +10 -1
- package/dist/components/approval/approval.js.map +1 -1
- package/dist/components/avatar/avatar.d.ts +8 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +3 -1
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/avatar/use-avatar.d.ts.map +1 -1
- package/dist/components/avatar/use-avatar.js +3 -1
- package/dist/components/avatar/use-avatar.js.map +1 -1
- package/dist/components/back-top/use-back-top.d.ts.map +1 -1
- package/dist/components/back-top/use-back-top.js +3 -1
- package/dist/components/back-top/use-back-top.js.map +1 -1
- package/dist/components/badge/badge.d.ts +22 -0
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +11 -2
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +11 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +28 -9
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/calendar-picker/calendar-picker.d.ts +16 -0
- package/dist/components/calendar-picker/calendar-picker.d.ts.map +1 -1
- package/dist/components/calendar-picker/calendar-picker.js +4 -0
- package/dist/components/calendar-picker/calendar-picker.js.map +1 -1
- package/dist/components/calendar-range-picker/calendar-range-picker.d.ts +16 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.d.ts.map +1 -1
- package/dist/components/calendar-range-picker/calendar-range-picker.js +4 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.js.map +1 -1
- package/dist/components/card/card.d.ts +37 -2
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +40 -2
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/carousel/carousel.d.ts +7 -1
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- package/dist/components/carousel/carousel.js +1 -0
- package/dist/components/carousel/carousel.js.map +1 -1
- package/dist/components/carousel/use-carousel.d.ts.map +1 -1
- package/dist/components/carousel/use-carousel.js +3 -1
- package/dist/components/carousel/use-carousel.js.map +1 -1
- package/dist/components/cartesian-chart/cartesian-chart.d.ts +262 -0
- package/dist/components/cartesian-chart/cartesian-chart.d.ts.map +1 -0
- package/dist/components/cartesian-chart/cartesian-chart.js +293 -0
- package/dist/components/cartesian-chart/cartesian-chart.js.map +1 -0
- package/dist/components/cartesian-chart/context.js +15 -0
- package/dist/components/cartesian-chart/context.js.map +1 -0
- package/dist/components/cartesian-chart/use-cartesian-chart.d.ts +21 -0
- package/dist/components/cartesian-chart/use-cartesian-chart.d.ts.map +1 -0
- package/dist/components/cartesian-chart/use-cartesian-chart.js +29 -0
- package/dist/components/cartesian-chart/use-cartesian-chart.js.map +1 -0
- package/dist/components/cascader/cascader.d.ts +66 -3
- package/dist/components/cascader/cascader.d.ts.map +1 -1
- package/dist/components/cascader/cascader.js +110 -8
- package/dist/components/cascader/cascader.js.map +1 -1
- package/dist/components/cascader/context.js +10 -1
- package/dist/components/cascader/context.js.map +1 -1
- package/dist/components/cascader/use-cascader.d.ts +2 -1
- package/dist/components/cascader/use-cascader.d.ts.map +1 -1
- package/dist/components/cascader/use-cascader.js +4 -1
- package/dist/components/cascader/use-cascader.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +24 -3
- package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.js +48 -12
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.d.ts +6 -1
- package/dist/components/checkbox-group/use-checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.js +7 -3
- package/dist/components/checkbox-group/use-checkbox-group.js.map +1 -1
- package/dist/components/citation/citation.d.ts +211 -0
- package/dist/components/citation/citation.d.ts.map +1 -0
- package/dist/components/citation/citation.js +222 -0
- package/dist/components/citation/citation.js.map +1 -0
- package/dist/components/citation/context.d.ts +11 -0
- package/dist/components/citation/context.d.ts.map +1 -0
- package/dist/components/citation/context.js +24 -0
- package/dist/components/citation/context.js.map +1 -0
- package/dist/components/citation/use-citation.d.ts +19 -0
- package/dist/components/citation/use-citation.d.ts.map +1 -0
- package/dist/components/citation/use-citation.js +51 -0
- package/dist/components/citation/use-citation.js.map +1 -0
- package/dist/components/code-view/code-view.d.ts +21 -0
- package/dist/components/code-view/code-view.d.ts.map +1 -1
- package/dist/components/code-view/code-view.js +23 -4
- package/dist/components/code-view/code-view.js.map +1 -1
- package/dist/components/collapsible/collapsible.d.ts +6 -0
- package/dist/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/collapsible.js +4 -2
- package/dist/components/collapsible/collapsible.js.map +1 -1
- package/dist/components/color-field/color-field.d.ts +4 -2
- package/dist/components/color-field/color-field.d.ts.map +1 -1
- package/dist/components/color-field/color-field.js +4 -2
- package/dist/components/color-field/color-field.js.map +1 -1
- package/dist/components/color-picker/color-picker.d.ts +115 -10
- package/dist/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/color-picker.js +119 -9
- package/dist/components/color-picker/color-picker.js.map +1 -1
- package/dist/components/color-picker/context.js +10 -1
- package/dist/components/color-picker/context.js.map +1 -1
- package/dist/components/color-picker/use-color-picker.d.ts +3 -1
- package/dist/components/color-picker/use-color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/use-color-picker.js +20 -4
- package/dist/components/color-picker/use-color-picker.js.map +1 -1
- package/dist/components/color-slider/color-slider.d.ts +2 -2
- package/dist/components/color-slider/color-slider.js +1 -1
- package/dist/components/color-slider/color-slider.js.map +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker.d.ts.map +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker.js +21 -4
- package/dist/components/color-swatch-picker/color-swatch-picker.js.map +1 -1
- package/dist/components/color-swatch-picker/use-color-swatch-picker.d.ts +6 -1
- package/dist/components/color-swatch-picker/use-color-swatch-picker.d.ts.map +1 -1
- package/dist/components/color-swatch-picker/use-color-swatch-picker.js +7 -3
- package/dist/components/color-swatch-picker/use-color-swatch-picker.js.map +1 -1
- package/dist/components/combobox/combobox.d.ts +51 -4
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +76 -6
- package/dist/components/combobox/combobox.js.map +1 -1
- package/dist/components/combobox/context.js +10 -1
- package/dist/components/combobox/context.js.map +1 -1
- package/dist/components/command/command.d.ts +3 -3
- package/dist/components/command/command.js +2 -2
- package/dist/components/command/use-command.d.ts.map +1 -1
- package/dist/components/command/use-command.js +9 -30
- package/dist/components/command/use-command.js.map +1 -1
- package/dist/components/context-menu/context-menu.d.ts +58 -18
- package/dist/components/context-menu/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu/context-menu.js +110 -47
- package/dist/components/context-menu/context-menu.js.map +1 -1
- package/dist/components/context-menu/context.js +1 -1
- package/dist/components/context-menu/context.js.map +1 -1
- package/dist/components/context-menu/use-context-menu.d.ts +1 -1
- package/dist/components/context-menu/use-context-menu.d.ts.map +1 -1
- package/dist/components/context-menu/use-context-menu.js +4 -2
- package/dist/components/context-menu/use-context-menu.js.map +1 -1
- package/dist/components/date-field/date-field.d.ts +15 -3
- package/dist/components/date-field/date-field.d.ts.map +1 -1
- package/dist/components/date-field/date-field.js +7 -2
- package/dist/components/date-field/date-field.js.map +1 -1
- package/dist/components/date-picker/context.js +10 -1
- package/dist/components/date-picker/context.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +98 -3
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +91 -7
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +103 -2
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +111 -6
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/date-range-picker/use-date-range-picker.d.ts +1 -1
- package/dist/components/date-range-picker/use-date-range-picker.js.map +1 -1
- package/dist/components/descriptions/descriptions.d.ts +38 -7
- package/dist/components/descriptions/descriptions.d.ts.map +1 -1
- package/dist/components/descriptions/descriptions.js +38 -4
- package/dist/components/descriptions/descriptions.js.map +1 -1
- package/dist/components/dialog/dialog.d.ts +17 -2
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/dialog.js +15 -2
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/dialog/use-dialog.d.ts.map +1 -1
- package/dist/components/dialog/use-dialog.js +9 -27
- package/dist/components/dialog/use-dialog.js.map +1 -1
- package/dist/components/diff-view/diff-view.d.ts +22 -2
- package/dist/components/diff-view/diff-view.d.ts.map +1 -1
- package/dist/components/diff-view/diff-view.js +37 -14
- package/dist/components/diff-view/diff-view.js.map +1 -1
- package/dist/components/diff-view/use-diff-view.d.ts +7 -2
- package/dist/components/diff-view/use-diff-view.d.ts.map +1 -1
- package/dist/components/diff-view/use-diff-view.js +12 -5
- package/dist/components/diff-view/use-diff-view.js.map +1 -1
- package/dist/components/drawer/drawer.d.ts +47 -2
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/drawer.js +28 -4
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/drawer/use-drawer.d.ts +1 -1
- package/dist/components/drawer/use-drawer.d.ts.map +1 -1
- package/dist/components/drawer/use-drawer.js +12 -29
- package/dist/components/drawer/use-drawer.js.map +1 -1
- package/dist/components/empty-state/empty-state.js +4 -1
- package/dist/components/empty-state/empty-state.js.map +1 -1
- package/dist/components/empty-state/use-empty-state.js +12 -3
- package/dist/components/empty-state/use-empty-state.js.map +1 -1
- package/dist/components/field/context.d.ts +6 -1
- package/dist/components/field/context.d.ts.map +1 -1
- package/dist/components/field/context.js +10 -1
- package/dist/components/field/context.js.map +1 -1
- package/dist/components/field/field.d.ts +9 -1
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +14 -2
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/use-field-control.d.ts +8 -1
- package/dist/components/field/use-field-control.d.ts.map +1 -1
- package/dist/components/field/use-field-control.js +14 -1
- package/dist/components/field/use-field-control.js.map +1 -1
- package/dist/components/field-array/field-array.d.ts +1 -1
- package/dist/components/field-array/field-array.d.ts.map +1 -1
- package/dist/components/field-array/field-array.js +5 -1
- package/dist/components/field-array/field-array.js.map +1 -1
- package/dist/components/field-array/use-field-array.d.ts +3 -1
- package/dist/components/field-array/use-field-array.d.ts.map +1 -1
- package/dist/components/field-array/use-field-array.js +5 -2
- package/dist/components/field-array/use-field-array.js.map +1 -1
- package/dist/components/file-upload/file-upload.d.ts +26 -1
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/file-upload.js +15 -3
- package/dist/components/file-upload/file-upload.js.map +1 -1
- package/dist/components/file-upload/use-file-upload.d.ts +1 -1
- package/dist/components/file-upload/use-file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/use-file-upload.js.map +1 -1
- package/dist/components/flex/flex.d.ts +1 -1
- package/dist/components/flex/flex.d.ts.map +1 -1
- package/dist/components/flex/flex.js +4 -4
- package/dist/components/flex/flex.js.map +1 -1
- package/dist/components/float-button/float-button.d.ts +26 -1
- package/dist/components/float-button/float-button.d.ts.map +1 -1
- package/dist/components/float-button/float-button.js +17 -5
- package/dist/components/float-button/float-button.js.map +1 -1
- package/dist/components/float-button/use-float-button.js +7 -1
- package/dist/components/float-button/use-float-button.js.map +1 -1
- package/dist/components/form/context.js +5 -1
- package/dist/components/form/context.js.map +1 -1
- package/dist/components/form/form.d.ts +18 -4
- package/dist/components/form/form.d.ts.map +1 -1
- package/dist/components/form/form.js +21 -7
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form/use-form-control.js +1 -1
- package/dist/components/form/use-form.d.ts +6 -0
- package/dist/components/form/use-form.d.ts.map +1 -1
- package/dist/components/form/use-form.js +4 -0
- package/dist/components/form/use-form.js.map +1 -1
- package/dist/components/funnel-chart/context.js +15 -0
- package/dist/components/funnel-chart/context.js.map +1 -0
- package/dist/components/funnel-chart/funnel-chart.d.ts +175 -0
- package/dist/components/funnel-chart/funnel-chart.d.ts.map +1 -0
- package/dist/components/funnel-chart/funnel-chart.js +188 -0
- package/dist/components/funnel-chart/funnel-chart.js.map +1 -0
- package/dist/components/funnel-chart/use-funnel-chart.d.ts +19 -0
- package/dist/components/funnel-chart/use-funnel-chart.d.ts.map +1 -0
- package/dist/components/funnel-chart/use-funnel-chart.js +26 -0
- package/dist/components/funnel-chart/use-funnel-chart.js.map +1 -0
- package/dist/components/graph-chart/context.js +15 -0
- package/dist/components/graph-chart/context.js.map +1 -0
- package/dist/components/graph-chart/graph-chart.d.ts +194 -0
- package/dist/components/graph-chart/graph-chart.d.ts.map +1 -0
- package/dist/components/graph-chart/graph-chart.js +219 -0
- package/dist/components/graph-chart/graph-chart.js.map +1 -0
- package/dist/components/graph-chart/use-graph-chart.d.ts +19 -0
- package/dist/components/graph-chart/use-graph-chart.d.ts.map +1 -0
- package/dist/components/graph-chart/use-graph-chart.js +26 -0
- package/dist/components/graph-chart/use-graph-chart.js.map +1 -0
- package/dist/components/grid/grid.d.ts +7 -0
- package/dist/components/grid/grid.d.ts.map +1 -1
- package/dist/components/grid/grid.js +7 -1
- package/dist/components/grid/grid.js.map +1 -1
- package/dist/components/grid-list/context.d.ts +9 -0
- package/dist/components/grid-list/context.d.ts.map +1 -0
- package/dist/components/grid-list/context.js +24 -0
- package/dist/components/grid-list/context.js.map +1 -0
- package/dist/components/grid-list/grid-list.d.ts +149 -0
- package/dist/components/grid-list/grid-list.d.ts.map +1 -0
- package/dist/components/grid-list/grid-list.js +118 -0
- package/dist/components/grid-list/grid-list.js.map +1 -0
- package/dist/components/grid-list/use-grid-list.d.ts +12 -0
- package/dist/components/grid-list/use-grid-list.d.ts.map +1 -0
- package/dist/components/grid-list/use-grid-list.js +20 -0
- package/dist/components/grid-list/use-grid-list.js.map +1 -0
- package/dist/components/heatmap/heatmap.d.ts +45 -4
- package/dist/components/heatmap/heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/heatmap.js +40 -14
- package/dist/components/heatmap/heatmap.js.map +1 -1
- package/dist/components/heatmap/use-heatmap.d.ts +4 -2
- package/dist/components/heatmap/use-heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/use-heatmap.js +8 -4
- package/dist/components/heatmap/use-heatmap.js.map +1 -1
- package/dist/components/hierarchy-chart/context.js +15 -0
- package/dist/components/hierarchy-chart/context.js.map +1 -0
- package/dist/components/hierarchy-chart/hierarchy-chart.d.ts +201 -0
- package/dist/components/hierarchy-chart/hierarchy-chart.d.ts.map +1 -0
- package/dist/components/hierarchy-chart/hierarchy-chart.js +228 -0
- package/dist/components/hierarchy-chart/hierarchy-chart.js.map +1 -0
- package/dist/components/hierarchy-chart/use-hierarchy-chart.d.ts +19 -0
- package/dist/components/hierarchy-chart/use-hierarchy-chart.d.ts.map +1 -0
- package/dist/components/hierarchy-chart/use-hierarchy-chart.js +26 -0
- package/dist/components/hierarchy-chart/use-hierarchy-chart.js.map +1 -0
- package/dist/components/hover-card/hover-card.js +2 -2
- package/dist/components/icon/icon.d.ts +7 -1
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/components/icon/icon.js +1 -0
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/components/image/use-image.d.ts.map +1 -1
- package/dist/components/image/use-image.js +3 -1
- package/dist/components/image/use-image.js.map +1 -1
- package/dist/components/image-cropper/image-cropper.d.ts +35 -4
- package/dist/components/image-cropper/image-cropper.d.ts.map +1 -1
- package/dist/components/image-cropper/image-cropper.js +34 -5
- package/dist/components/image-cropper/image-cropper.js.map +1 -1
- package/dist/components/image-cropper/use-image-cropper.d.ts +3 -1
- package/dist/components/image-cropper/use-image-cropper.d.ts.map +1 -1
- package/dist/components/image-cropper/use-image-cropper.js +4 -1
- package/dist/components/image-cropper/use-image-cropper.js.map +1 -1
- package/dist/components/image-viewer/image-viewer.js +1 -1
- package/dist/components/image-viewer/use-image-viewer.d.ts.map +1 -1
- package/dist/components/image-viewer/use-image-viewer.js +9 -27
- package/dist/components/image-viewer/use-image-viewer.js.map +1 -1
- package/dist/components/infinite-scroll/infinite-scroll.d.ts +9 -1
- package/dist/components/infinite-scroll/infinite-scroll.d.ts.map +1 -1
- package/dist/components/infinite-scroll/infinite-scroll.js +2 -0
- package/dist/components/infinite-scroll/infinite-scroll.js.map +1 -1
- package/dist/components/json-viewer/json-viewer.d.ts +17 -2
- package/dist/components/json-viewer/json-viewer.d.ts.map +1 -1
- package/dist/components/json-viewer/json-viewer.js +26 -8
- package/dist/components/json-viewer/json-viewer.js.map +1 -1
- package/dist/components/listbox/listbox.d.ts +7 -1
- package/dist/components/listbox/listbox.d.ts.map +1 -1
- package/dist/components/listbox/listbox.js +2 -0
- package/dist/components/listbox/listbox.js.map +1 -1
- package/dist/components/loading-bar/use-loading-bar.d.ts.map +1 -1
- package/dist/components/loading-bar/use-loading-bar.js +3 -1
- package/dist/components/loading-bar/use-loading-bar.js.map +1 -1
- package/dist/components/log/log.d.ts +41 -2
- package/dist/components/log/log.d.ts.map +1 -1
- package/dist/components/log/log.js +25 -3
- package/dist/components/log/log.js.map +1 -1
- package/dist/components/log/use-log.d.ts +1 -1
- package/dist/components/log/use-log.d.ts.map +1 -1
- package/dist/components/log/use-log.js +4 -1
- package/dist/components/log/use-log.js.map +1 -1
- package/dist/components/markdown-stream/markdown-stream.d.ts +21 -1
- package/dist/components/markdown-stream/markdown-stream.d.ts.map +1 -1
- package/dist/components/markdown-stream/markdown-stream.js +43 -4
- package/dist/components/markdown-stream/markdown-stream.js.map +1 -1
- package/dist/components/marquee/marquee.d.ts +68 -12
- package/dist/components/marquee/marquee.d.ts.map +1 -1
- package/dist/components/marquee/marquee.js +52 -7
- package/dist/components/marquee/marquee.js.map +1 -1
- package/dist/components/mention/mention.d.ts +26 -6
- package/dist/components/mention/mention.d.ts.map +1 -1
- package/dist/components/mention/mention.js +14 -4
- package/dist/components/mention/mention.js.map +1 -1
- package/dist/components/menu/context.js +1 -1
- package/dist/components/menu/context.js.map +1 -1
- package/dist/components/menu/menu.d.ts +79 -28
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.js +132 -51
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/menu/use-menu.d.ts +1 -1
- package/dist/components/menu/use-menu.d.ts.map +1 -1
- package/dist/components/menu/use-menu.js +8 -6
- package/dist/components/menu/use-menu.js.map +1 -1
- package/dist/components/menubar/context.js +1 -1
- package/dist/components/menubar/context.js.map +1 -1
- package/dist/components/menubar/menubar.d.ts +47 -18
- package/dist/components/menubar/menubar.d.ts.map +1 -1
- package/dist/components/menubar/menubar.js +109 -47
- package/dist/components/menubar/menubar.js.map +1 -1
- package/dist/components/menubar/use-menubar.d.ts +1 -1
- package/dist/components/menubar/use-menubar.d.ts.map +1 -1
- package/dist/components/menubar/use-menubar.js +4 -2
- package/dist/components/menubar/use-menubar.js.map +1 -1
- package/dist/components/message-feed/message-feed.d.ts +13 -1
- package/dist/components/message-feed/message-feed.d.ts.map +1 -1
- package/dist/components/message-feed/message-feed.js +25 -1
- package/dist/components/message-feed/message-feed.js.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +58 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +82 -10
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/notification/context.d.ts +5 -1
- package/dist/components/notification/context.d.ts.map +1 -1
- package/dist/components/notification/context.js.map +1 -1
- package/dist/components/notification/notification.d.ts +39 -23
- package/dist/components/notification/notification.d.ts.map +1 -1
- package/dist/components/notification/notification.js +27 -9
- package/dist/components/notification/notification.js.map +1 -1
- package/dist/components/notification/use-item-exit.js +22 -0
- package/dist/components/notification/use-item-exit.js.map +1 -0
- package/dist/components/notification/use-notification.d.ts +3 -3
- package/dist/components/notification/use-notification.d.ts.map +1 -1
- package/dist/components/notification/use-notification.js +20 -5
- package/dist/components/notification/use-notification.js.map +1 -1
- package/dist/components/number-animation/number-animation.d.ts +14 -2
- package/dist/components/number-animation/number-animation.d.ts.map +1 -1
- package/dist/components/number-animation/number-animation.js +5 -1
- package/dist/components/number-animation/number-animation.js.map +1 -1
- package/dist/components/number-field/number-field.d.ts +16 -1
- package/dist/components/number-field/number-field.d.ts.map +1 -1
- package/dist/components/number-field/number-field.js +6 -0
- package/dist/components/number-field/number-field.js.map +1 -1
- package/dist/components/pagination/pagination.d.ts +22 -2
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +22 -1
- package/dist/components/pagination/pagination.js.map +1 -1
- package/dist/components/pagination/use-pagination.js +1 -0
- package/dist/components/pagination/use-pagination.js.map +1 -1
- package/dist/components/pie-chart/context.js +15 -0
- package/dist/components/pie-chart/context.js.map +1 -0
- package/dist/components/pie-chart/pie-chart.d.ts +203 -0
- package/dist/components/pie-chart/pie-chart.d.ts.map +1 -0
- package/dist/components/pie-chart/pie-chart.js +236 -0
- package/dist/components/pie-chart/pie-chart.js.map +1 -0
- package/dist/components/pie-chart/use-pie-chart.d.ts +19 -0
- package/dist/components/pie-chart/use-pie-chart.d.ts.map +1 -0
- package/dist/components/pie-chart/use-pie-chart.js +26 -0
- package/dist/components/pie-chart/use-pie-chart.js.map +1 -0
- package/dist/components/pin-input/pin-input.d.ts.map +1 -1
- package/dist/components/pin-input/pin-input.js +7 -1
- package/dist/components/pin-input/pin-input.js.map +1 -1
- package/dist/components/popconfirm/popconfirm.d.ts +20 -1
- package/dist/components/popconfirm/popconfirm.d.ts.map +1 -1
- package/dist/components/popconfirm/popconfirm.js +9 -2
- package/dist/components/popconfirm/popconfirm.js.map +1 -1
- package/dist/components/popconfirm/use-popconfirm.js +2 -0
- package/dist/components/popconfirm/use-popconfirm.js.map +1 -1
- package/dist/components/popover/popover.d.ts +12 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +7 -2
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/progress/progress.d.ts +63 -3
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/progress/progress.js +55 -3
- package/dist/components/progress/progress.js.map +1 -1
- package/dist/components/question-flow/question-flow.d.ts +40 -1
- package/dist/components/question-flow/question-flow.d.ts.map +1 -1
- package/dist/components/question-flow/question-flow.js +37 -1
- package/dist/components/question-flow/question-flow.js.map +1 -1
- package/dist/components/radar-chart/context.js +15 -0
- package/dist/components/radar-chart/context.js.map +1 -0
- package/dist/components/radar-chart/radar-chart.d.ts +189 -0
- package/dist/components/radar-chart/radar-chart.d.ts.map +1 -0
- package/dist/components/radar-chart/radar-chart.js +220 -0
- package/dist/components/radar-chart/radar-chart.js.map +1 -0
- package/dist/components/radar-chart/use-radar-chart.d.ts +19 -0
- package/dist/components/radar-chart/use-radar-chart.d.ts.map +1 -0
- package/dist/components/radar-chart/use-radar-chart.js +26 -0
- package/dist/components/radar-chart/use-radar-chart.js.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +37 -2
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +74 -9
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/radio-group/use-radio-group.d.ts +8 -1
- package/dist/components/radio-group/use-radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/use-radio-group.js +10 -3
- package/dist/components/radio-group/use-radio-group.js.map +1 -1
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/rating/rating.js +7 -1
- package/dist/components/rating/rating.js.map +1 -1
- package/dist/components/reasoning/reasoning.d.ts.map +1 -1
- package/dist/components/reasoning/reasoning.js +1 -0
- package/dist/components/reasoning/reasoning.js.map +1 -1
- package/dist/components/sankey-chart/context.js +15 -0
- package/dist/components/sankey-chart/context.js.map +1 -0
- package/dist/components/sankey-chart/sankey-chart.d.ts +161 -0
- package/dist/components/sankey-chart/sankey-chart.d.ts.map +1 -0
- package/dist/components/sankey-chart/sankey-chart.js +208 -0
- package/dist/components/sankey-chart/sankey-chart.js.map +1 -0
- package/dist/components/sankey-chart/use-sankey-chart.d.ts +19 -0
- package/dist/components/sankey-chart/use-sankey-chart.d.ts.map +1 -0
- package/dist/components/sankey-chart/use-sankey-chart.js +26 -0
- package/dist/components/sankey-chart/use-sankey-chart.js.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +13 -5
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area/scroll-area.js +17 -3
- package/dist/components/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/select/select.d.ts +9 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +16 -5
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/use-select.js +2 -1
- package/dist/components/select/use-select.js.map +1 -1
- package/dist/components/side-nav/context.js +17 -1
- package/dist/components/side-nav/context.js.map +1 -1
- package/dist/components/side-nav/side-nav.d.ts +51 -7
- package/dist/components/side-nav/side-nav.d.ts.map +1 -1
- package/dist/components/side-nav/side-nav.js +152 -13
- package/dist/components/side-nav/side-nav.js.map +1 -1
- package/dist/components/side-nav/use-side-nav.d.ts +4 -2
- package/dist/components/side-nav/use-side-nav.d.ts.map +1 -1
- package/dist/components/side-nav/use-side-nav.js +5 -3
- package/dist/components/side-nav/use-side-nav.js.map +1 -1
- package/dist/components/signature-pad/signature-pad.d.ts +28 -4
- package/dist/components/signature-pad/signature-pad.d.ts.map +1 -1
- package/dist/components/signature-pad/signature-pad.js +35 -5
- package/dist/components/signature-pad/signature-pad.js.map +1 -1
- package/dist/components/signature-pad/use-signature-pad.d.ts +1 -1
- package/dist/components/signature-pad/use-signature-pad.d.ts.map +1 -1
- package/dist/components/signature-pad/use-signature-pad.js.map +1 -1
- package/dist/components/skeleton/use-skeleton.js +6 -2
- package/dist/components/skeleton/use-skeleton.js.map +1 -1
- package/dist/components/slider/slider.d.ts +27 -0
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/slider/slider.js +19 -1
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/sortable/sortable.d.ts +18 -0
- package/dist/components/sortable/sortable.d.ts.map +1 -1
- package/dist/components/sortable/sortable.js +7 -2
- package/dist/components/sortable/sortable.js.map +1 -1
- package/dist/components/sortable/use-sortable.d.ts +1 -1
- package/dist/components/sortable/use-sortable.d.ts.map +1 -1
- package/dist/components/sortable/use-sortable.js +2 -1
- package/dist/components/sortable/use-sortable.js.map +1 -1
- package/dist/components/sparkline/sparkline.d.ts +101 -0
- package/dist/components/sparkline/sparkline.d.ts.map +1 -0
- package/dist/components/sparkline/sparkline.js +54 -0
- package/dist/components/sparkline/sparkline.js.map +1 -0
- package/dist/components/sparkline/use-sparkline.d.ts +15 -0
- package/dist/components/sparkline/use-sparkline.d.ts.map +1 -0
- package/dist/components/sparkline/use-sparkline.js +21 -0
- package/dist/components/sparkline/use-sparkline.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +8 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +2 -0
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/spinner/use-spinner.js +4 -2
- package/dist/components/spinner/use-spinner.js.map +1 -1
- package/dist/components/steps/steps.d.ts +28 -1
- package/dist/components/steps/steps.d.ts.map +1 -1
- package/dist/components/steps/steps.js +11 -2
- package/dist/components/steps/steps.js.map +1 -1
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/table/context.js +9 -1
- package/dist/components/table/context.js.map +1 -1
- package/dist/components/table/table.d.ts +52 -3
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +40 -11
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/use-table.d.ts +3 -1
- package/dist/components/table/use-table.d.ts.map +1 -1
- package/dist/components/table/use-table.js +5 -2
- package/dist/components/table/use-table.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +51 -3
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +60 -8
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/tag/use-tag.d.ts.map +1 -1
- package/dist/components/tag/use-tag.js +3 -1
- package/dist/components/tag/use-tag.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +12 -2
- package/dist/components/tags-input/tags-input.d.ts.map +1 -1
- package/dist/components/tags-input/tags-input.js +14 -5
- package/dist/components/tags-input/tags-input.js.map +1 -1
- package/dist/components/tags-input/use-tags-input.d.ts +4 -2
- package/dist/components/tags-input/use-tags-input.d.ts.map +1 -1
- package/dist/components/tags-input/use-tags-input.js +5 -2
- package/dist/components/tags-input/use-tags-input.js.map +1 -1
- package/dist/components/text-field/text-field.d.ts +2 -0
- package/dist/components/text-field/text-field.d.ts.map +1 -1
- package/dist/components/text-field/text-field.js +3 -1
- package/dist/components/text-field/text-field.js.map +1 -1
- package/dist/components/time-field/time-field.d.ts +2 -0
- package/dist/components/time-field/time-field.d.ts.map +1 -1
- package/dist/components/time-field/time-field.js +3 -1
- package/dist/components/time-field/time-field.js.map +1 -1
- package/dist/components/time-picker/context.js +10 -1
- package/dist/components/time-picker/context.js.map +1 -1
- package/dist/components/time-picker/time-picker.d.ts +88 -15
- package/dist/components/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/time-picker/time-picker.js +92 -9
- package/dist/components/time-picker/time-picker.js.map +1 -1
- package/dist/components/time-range-picker/time-range-picker.d.ts +13 -7
- package/dist/components/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/components/time-range-picker/time-range-picker.js +7 -3
- package/dist/components/time-range-picker/time-range-picker.js.map +1 -1
- package/dist/components/timer/timer.d.ts +1 -1
- package/dist/components/timestamp/timestamp.d.ts +20 -1
- package/dist/components/timestamp/timestamp.d.ts.map +1 -1
- package/dist/components/timestamp/timestamp.js +16 -5
- package/dist/components/timestamp/timestamp.js.map +1 -1
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group/toggle-group.js +7 -1
- package/dist/components/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/toolbar/toolbar.d.ts +17 -2
- package/dist/components/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/toolbar.js +31 -4
- package/dist/components/toolbar/toolbar.js.map +1 -1
- package/dist/components/toolbar/use-toolbar.d.ts +4 -2
- package/dist/components/toolbar/use-toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/use-toolbar.js +5 -2
- package/dist/components/toolbar/use-toolbar.js.map +1 -1
- package/dist/components/tooltip/context.d.ts +21 -0
- package/dist/components/tooltip/context.d.ts.map +1 -0
- package/dist/components/tooltip/context.js +10 -1
- package/dist/components/tooltip/context.js.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts +53 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +34 -3
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/components/tooltip/use-tooltip.d.ts +3 -18
- package/dist/components/tooltip/use-tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/use-tooltip.js +2 -0
- package/dist/components/tooltip/use-tooltip.js.map +1 -1
- package/dist/components/tour/tour.d.ts +8 -0
- package/dist/components/tour/tour.d.ts.map +1 -1
- package/dist/components/tour/tour.js +2 -0
- package/dist/components/tour/tour.js.map +1 -1
- package/dist/components/transfer/transfer.d.ts +21 -1
- package/dist/components/transfer/transfer.d.ts.map +1 -1
- package/dist/components/transfer/transfer.js +10 -2
- package/dist/components/transfer/transfer.js.map +1 -1
- package/dist/components/tree/tree.d.ts +34 -1
- package/dist/components/tree/tree.d.ts.map +1 -1
- package/dist/components/tree/tree.js +11 -0
- package/dist/components/tree/tree.js.map +1 -1
- package/dist/components/tree-select/context.js +10 -1
- package/dist/components/tree-select/context.js.map +1 -1
- package/dist/components/tree-select/tree-select.d.ts +72 -6
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/components/tree-select/tree-select.js +112 -13
- package/dist/components/tree-select/tree-select.js.map +1 -1
- package/dist/components/tree-select/use-tree-select.d.ts +3 -0
- package/dist/components/tree-select/use-tree-select.d.ts.map +1 -1
- package/dist/components/tree-select/use-tree-select.js +6 -1
- package/dist/components/tree-select/use-tree-select.js.map +1 -1
- package/dist/components/truncate/truncate.d.ts +25 -4
- package/dist/components/truncate/truncate.d.ts.map +1 -1
- package/dist/components/truncate/truncate.js +25 -14
- package/dist/components/truncate/truncate.js.map +1 -1
- package/dist/components/truncate/use-truncate.d.ts.map +1 -1
- package/dist/components/truncate/use-truncate.js +3 -1
- package/dist/components/truncate/use-truncate.js.map +1 -1
- package/dist/components/typography/typography.d.ts +35 -2
- package/dist/components/typography/typography.d.ts.map +1 -1
- package/dist/components/typography/typography.js +21 -3
- package/dist/components/typography/typography.js.map +1 -1
- package/dist/components/virtualizer/virtualizer.d.ts +26 -2
- package/dist/components/virtualizer/virtualizer.d.ts.map +1 -1
- package/dist/components/virtualizer/virtualizer.js +20 -3
- package/dist/components/virtualizer/virtualizer.js.map +1 -1
- package/dist/components/watermark/watermark.d.ts +14 -1
- package/dist/components/watermark/watermark.d.ts.map +1 -1
- package/dist/components/watermark/watermark.js +20 -5
- package/dist/components/watermark/watermark.js.map +1 -1
- package/dist/config/config.d.ts +1 -1
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +2 -1
- package/dist/config/config.js.map +1 -1
- package/dist/index.d.ts +64 -49
- package/dist/index.js +58 -43
- package/dist/package.js +1 -1
- package/dist/runtime/as-child.js +3 -2
- package/dist/runtime/as-child.js.map +1 -1
- package/dist/runtime/hydration.js +14 -0
- package/dist/runtime/hydration.js.map +1 -0
- package/dist/runtime/portal.js +2 -0
- package/dist/runtime/portal.js.map +1 -1
- package/dist/runtime/use-overlay-exit.js +0 -1
- package/dist/runtime/use-overlay-exit.js.map +1 -1
- package/dist/runtime/with-handlers.js +25 -0
- package/dist/runtime/with-handlers.js.map +1 -0
- package/dist/services/notification-service.d.ts +26 -7
- package/dist/services/notification-service.d.ts.map +1 -1
- package/dist/services/notification-service.js +35 -8
- package/dist/services/notification-service.js.map +1 -1
- package/dist/sound.d.ts +6 -7
- package/dist/sound.d.ts.map +1 -1
- package/dist/sound.js +6 -6
- package/dist/sound.js.map +1 -1
- package/package.json +15 -14
- package/dist/components/gradient-text/gradient-text.d.ts +0 -36
- package/dist/components/gradient-text/gradient-text.d.ts.map +0 -1
- package/dist/components/gradient-text/gradient-text.js +0 -20
- package/dist/components/gradient-text/gradient-text.js.map +0 -1
- package/dist/components/icon-wrapper/icon-wrapper.d.ts +0 -29
- package/dist/components/icon-wrapper/icon-wrapper.d.ts.map +0 -1
- package/dist/components/icon-wrapper/icon-wrapper.js +0 -20
- package/dist/components/icon-wrapper/icon-wrapper.js.map +0 -1
- package/dist/components/segmented/context.d.ts +0 -13
- package/dist/components/segmented/context.d.ts.map +0 -1
- package/dist/components/segmented/context.js +0 -24
- package/dist/components/segmented/context.js.map +0 -1
- package/dist/components/segmented/segmented.d.ts +0 -161
- package/dist/components/segmented/segmented.d.ts.map +0 -1
- package/dist/components/segmented/segmented.js +0 -142
- package/dist/components/segmented/segmented.js.map +0 -1
- package/dist/components/segmented/use-segmented.d.ts +0 -15
- package/dist/components/segmented/use-segmented.d.ts.map +0 -1
- package/dist/components/segmented/use-segmented.js +0 -22
- package/dist/components/segmented/use-segmented.js.map +0 -1
- package/dist/components/toast/context.js +0 -15
- package/dist/components/toast/context.js.map +0 -1
- package/dist/components/toast/toast.d.ts +0 -123
- package/dist/components/toast/toast.d.ts.map +0 -1
- package/dist/components/toast/toast.js +0 -112
- package/dist/components/toast/toast.js.map +0 -1
- package/dist/components/toast/use-toast.d.ts +0 -10
- package/dist/components/toast/use-toast.d.ts.map +0 -1
- package/dist/components/toast/use-toast.js +0 -17
- package/dist/components/toast/use-toast.js.map +0 -1
- package/dist/services/toast-service.d.ts +0 -69
- package/dist/services/toast-service.d.ts.map +0 -1
- package/dist/services/toast-service.js +0 -161
- package/dist/services/toast-service.js.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
|
-
import { TimestampType, TimestampValue } from "@xihan-ui/headless";
|
|
2
|
+
import { TimestampTranslations, TimestampType, TimestampValue } from "@xihan-ui/headless";
|
|
3
3
|
//#region src/components/timestamp/timestamp.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* 渲染为 `<time datetime>`:文本供人阅读,datetime 供机器读取,两者取自同一个墙钟。
|
|
6
6
|
*
|
|
7
7
|
* 默认插槽中写了内容时使用作者的文本,datetime 仍由组件计算:这正是用它包裹一段
|
|
8
8
|
* 自行排版的时间表述的用法。插槽为空时铺设组件格式化后的文本。
|
|
9
|
+
* 相对型在没给 now 时按距今远近自动刷新,刷新节奏由状态机掌握。
|
|
9
10
|
*/
|
|
10
11
|
declare const XhTimestamp: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
11
12
|
value: {
|
|
@@ -20,9 +21,18 @@ declare const XhTimestamp: import("vue").DefineComponent<import("vue").ExtractPr
|
|
|
20
21
|
locale: {
|
|
21
22
|
type: StringConstructor;
|
|
22
23
|
};
|
|
24
|
+
timeZone: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
};
|
|
23
27
|
now: {
|
|
24
28
|
type: PropType<TimestampValue>;
|
|
25
29
|
};
|
|
30
|
+
refreshInterval: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
};
|
|
33
|
+
translations: {
|
|
34
|
+
type: PropType<Partial<TimestampTranslations>>;
|
|
35
|
+
};
|
|
26
36
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
37
|
[key: string]: any;
|
|
28
38
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -38,9 +48,18 @@ declare const XhTimestamp: import("vue").DefineComponent<import("vue").ExtractPr
|
|
|
38
48
|
locale: {
|
|
39
49
|
type: StringConstructor;
|
|
40
50
|
};
|
|
51
|
+
timeZone: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
};
|
|
41
54
|
now: {
|
|
42
55
|
type: PropType<TimestampValue>;
|
|
43
56
|
};
|
|
57
|
+
refreshInterval: {
|
|
58
|
+
type: NumberConstructor;
|
|
59
|
+
};
|
|
60
|
+
translations: {
|
|
61
|
+
type: PropType<Partial<TimestampTranslations>>;
|
|
62
|
+
};
|
|
44
63
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
45
64
|
//#endregion
|
|
46
65
|
export { XhTimestamp };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.d.ts","names":[],"sources":["../../../src/components/timestamp/timestamp.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"timestamp.d.ts","names":[],"sources":["../../../src/components/timestamp/timestamp.ts"],"mappings":";;;;;;;;;;cAyBa,2BAAW,8BAAA;;IAIqB,MAAA,SAAS;;;IAC1B,MAAA,SAAS;;;;;;;;;;;;IAIM,MAAA,SAAS;;;;;;IAEhB,MAAA,SAAS,QAAQ;;;;;;IAPR,MAAA,SAAS;;;IAC1B,MAAA,SAAS;;;;;;;;;;;;IAIM,MAAA,SAAS;;;;;;IAEhB,MAAA,SAAS,QAAQ;;MA0BnD,oDAAA"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { vueNormalize } from "../../runtime/normalize-props.js";
|
|
2
2
|
import { withXhConfig } from "../../config/config.js";
|
|
3
|
+
import { useMachine } from "../../runtime/use-machine.js";
|
|
4
|
+
import { createVueIdGenerator } from "../../runtime/vue-id.js";
|
|
3
5
|
import { slotPaints } from "../../runtime/slot-content.js";
|
|
4
6
|
import { computed, defineComponent, h } from "vue";
|
|
5
|
-
import {
|
|
7
|
+
import { createScope } from "@xihan-ui/core";
|
|
8
|
+
import { connectTimestamp, timestampMachine } from "@xihan-ui/headless";
|
|
6
9
|
//#region src/components/timestamp/timestamp.ts
|
|
7
10
|
/**
|
|
8
11
|
* 渲染为 `<time datetime>`:文本供人阅读,datetime 供机器读取,两者取自同一个墙钟。
|
|
9
12
|
*
|
|
10
13
|
* 默认插槽中写了内容时使用作者的文本,datetime 仍由组件计算:这正是用它包裹一段
|
|
11
14
|
* 自行排版的时间表述的用法。插槽为空时铺设组件格式化后的文本。
|
|
15
|
+
* 相对型在没给 now 时按距今远近自动刷新,刷新节奏由状态机掌握。
|
|
12
16
|
*/
|
|
13
17
|
const XhTimestamp = defineComponent({
|
|
14
18
|
name: "XhTimestamp",
|
|
@@ -21,21 +25,28 @@ const XhTimestamp = defineComponent({
|
|
|
21
25
|
type: { type: String },
|
|
22
26
|
format: { type: String },
|
|
23
27
|
locale: { type: String },
|
|
28
|
+
timeZone: { type: String },
|
|
24
29
|
now: { type: [
|
|
25
30
|
String,
|
|
26
31
|
Number,
|
|
27
32
|
Date
|
|
28
|
-
] }
|
|
33
|
+
] },
|
|
34
|
+
refreshInterval: { type: Number },
|
|
35
|
+
translations: { type: Object }
|
|
29
36
|
},
|
|
30
37
|
setup(props, { slots }) {
|
|
31
38
|
const merged = withXhConfig("timestamp", props);
|
|
32
|
-
const
|
|
39
|
+
const service = useMachine(timestampMachine, () => ({
|
|
33
40
|
value: merged.value,
|
|
34
41
|
type: merged.type,
|
|
35
42
|
format: merged.format,
|
|
36
43
|
locale: merged.locale,
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
timeZone: merged.timeZone,
|
|
45
|
+
now: merged.now,
|
|
46
|
+
refreshInterval: merged.refreshInterval,
|
|
47
|
+
translations: merged.translations
|
|
48
|
+
}), createScope(null, createVueIdGenerator()));
|
|
49
|
+
const api = computed(() => connectTimestamp(service, vueNormalize));
|
|
39
50
|
return () => {
|
|
40
51
|
const content = slots.default?.();
|
|
41
52
|
return h("time", api.value.getRootProps(), slotPaints(content) ? content : api.value.text);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.js","names":[],"sources":["../../../src/components/timestamp/timestamp.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 timestamp 相关实现。\n\nimport type {
|
|
1
|
+
{"version":3,"file":"timestamp.js","names":[],"sources":["../../../src/components/timestamp/timestamp.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 timestamp 相关实现。\n\nimport type { TimestampTranslations, TimestampType, TimestampValue } from '@xihan-ui/headless'\nimport type { PropType } from 'vue'\nimport { createScope } from '@xihan-ui/core'\nimport { connectTimestamp, timestampMachine } from '@xihan-ui/headless'\nimport { computed, defineComponent, h } from 'vue'\nimport { withXhConfig } from '../../config/config'\nimport { vueNormalize } from '../../runtime/normalize-props'\nimport { slotPaints } from '../../runtime/slot-content'\nimport { useMachine } from '../../runtime/use-machine'\nimport { createVueIdGenerator } from '../../runtime/vue-id'\n\n/**\n * 渲染为 `<time datetime>`:文本供人阅读,datetime 供机器读取,两者取自同一个墙钟。\n *\n * 默认插槽中写了内容时使用作者的文本,datetime 仍由组件计算:这正是用它包裹一段\n * 自行排版的时间表述的用法。插槽为空时铺设组件格式化后的文本。\n * 相对型在没给 now 时按距今远近自动刷新,刷新节奏由状态机掌握。\n */\nexport const XhTimestamp = defineComponent({\n name: 'XhTimestamp',\n // 缺省值由机器与 connect 给出;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n value: { type: [String, Number, Date] as PropType<TimestampValue> },\n type: { type: String as PropType<TimestampType> },\n format: { type: String },\n locale: { type: String },\n timeZone: { type: String },\n now: { type: [String, Number, Date] as PropType<TimestampValue> },\n refreshInterval: { type: Number },\n translations: { type: Object as PropType<Partial<TimestampTranslations>> },\n },\n setup(props, { slots }) {\n const merged = withXhConfig('timestamp', props)\n const service = useMachine(timestampMachine, () => ({\n value: merged.value,\n type: merged.type,\n format: merged.format,\n locale: merged.locale,\n timeZone: merged.timeZone,\n now: merged.now,\n refreshInterval: merged.refreshInterval,\n translations: merged.translations,\n }), createScope(null, createVueIdGenerator()))\n const api = computed(() => connectTimestamp(service, vueNormalize))\n\n return () => {\n const content = slots.default?.()\n return h(\n 'time',\n api.value.getRootProps() as Record<string, unknown>,\n // 插槽里只剩注释或空白时不算写过东西,那种情况仍铺组件的文本\n slotPaints(content) ? content : api.value.text,\n )\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;AAyBA,MAAa,cAAc,gBAAgB;CACzC,MAAM;CAEN,OAAO;EACL,OAAO,EAAE,MAAM;GAAC;GAAQ;GAAQ;EAAI,EAA8B;EAClE,MAAM,EAAE,MAAM,OAAkC;EAChD,QAAQ,EAAE,MAAM,OAAO;EACvB,QAAQ,EAAE,MAAM,OAAO;EACvB,UAAU,EAAE,MAAM,OAAO;EACzB,KAAK,EAAE,MAAM;GAAC;GAAQ;GAAQ;EAAI,EAA8B;EAChE,iBAAiB,EAAE,MAAM,OAAO;EAChC,cAAc,EAAE,MAAM,OAAmD;CAC3E;CACA,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,SAAS,aAAa,aAAa,KAAK;EAC9C,MAAM,UAAU,WAAW,yBAAyB;GAClD,OAAO,OAAO;GACd,MAAM,OAAO;GACb,QAAQ,OAAO;GACf,QAAQ,OAAO;GACf,UAAU,OAAO;GACjB,KAAK,OAAO;GACZ,iBAAiB,OAAO;GACxB,cAAc,OAAO;EACvB,IAAI,YAAY,MAAM,qBAAqB,CAAC,CAAC;EAC7C,MAAM,MAAM,eAAe,iBAAiB,SAAS,YAAY,CAAC;EAElE,aAAa;GACX,MAAM,UAAU,MAAM,UAAU;GAChC,OAAO,EACL,QACA,IAAI,MAAM,aAAa,GAEvB,WAAW,OAAO,IAAI,UAAU,IAAI,MAAM,IAC5C;EACF;CACF;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.d.ts","names":[],"sources":["../../../src/components/toggle-group/toggle-group.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"toggle-group.d.ts","names":[],"sources":["../../../src/components/toggle-group/toggle-group.ts"],"mappings":";;;;;KAiBK,mBAAmB;cAgBX,iCAAiB,8BAAA;;IAIG,MAAA,SAAS;;;IACJ,MAAA,SAAS;;;IACF,MAAA,SAAS;;;;;;;;;;;;;;;IAIvB,MAAA,SAAS;;;IACZ,MAAA,SAAS;;;IACT,MAAA,SAAS;;;;;;;;;;;;;;IAIF,MAAA,SAAS;;;IACjB,MAAA,SAAS;;;;;;;;;;;;;EAML,iBAAA,UAAA,UAAU;EACZ,iBAAA,QAAA,UAAU;;;IApBN,MAAA,SAAS;;;IACJ,MAAA,SAAS;;;IACF,MAAA,SAAS;;;;;;;;;;;;;;;IAIvB,MAAA,SAAS;;;IACZ,MAAA,SAAS;;;IACT,MAAA,SAAS;;;;;;;;;;;;;;IAIF,MAAA,SAAS;;;IACjB,MAAA,SAAS;;;;;;;;;;;;;;;;;;;;;qCAgClC;cAEW,iCAAiB,8BAAA;;;;;;;;;;;;;;;;;;;;;;qCAmC5B;;cA6BW,wCAAwB,0BAAA,oBAAA,4BAAA;;8BAMnC,qCAAA,iDAAA,aAAA,eAAA,oDAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useFormControlProps } from "../form/use-form-control.js";
|
|
2
|
+
import { useFieldGroupWiring, useFieldLabelWiring } from "../field/use-field-control.js";
|
|
2
3
|
import { provideToggleGroup, useToggleGroupContext } from "./context.js";
|
|
3
4
|
import { useToggleGroup } from "./use-toggle-group.js";
|
|
4
5
|
import { Comment, Fragment, Text, defineComponent, h, onBeforeUnmount, ref, watch } from "vue";
|
|
@@ -67,9 +68,14 @@ const XhToggleGroupRoot = defineComponent({
|
|
|
67
68
|
};
|
|
68
69
|
const ctx = useToggleGroup(useFormControlProps(props), notify);
|
|
69
70
|
provideToggleGroup(ctx);
|
|
71
|
+
const fieldWiring = useFieldGroupWiring();
|
|
72
|
+
const fieldLabel = useFieldLabelWiring();
|
|
70
73
|
return () => {
|
|
71
74
|
const children = slots.default ? slots.default() : props.collection ? renderDefaultTree(ctx.api.value.collection, slots.item) : [];
|
|
72
|
-
return h("div",
|
|
75
|
+
return h("div", fieldLabel.value({
|
|
76
|
+
...fieldWiring.value,
|
|
77
|
+
...ctx.api.value.getRootProps()
|
|
78
|
+
}), renderChildren(children, ctx.api.value));
|
|
73
79
|
};
|
|
74
80
|
}
|
|
75
81
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.js","names":[],"sources":["../../../src/components/toggle-group/toggle-group.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 toggle group 相关实现。\n\nimport type { ActionVariant, Direction, Orientation, Size, Tone } from '@xihan-ui/core'\nimport type { ToggleGroupNode, ToggleGroupNodeMeta, ToggleGroupSchema, ToggleGroupValue } from '@xihan-ui/headless'\nimport type { PropType, VNode } from 'vue'\nimport type { PayloadOf } from '../../runtime/payload'\nimport { Comment, defineComponent, Fragment, h, onBeforeUnmount, ref, Text, watch } from 'vue'\nimport { useFormControlProps } from '../form/use-form-control'\nimport { provideToggleGroup, useToggleGroupContext } from './context'\nimport { useToggleGroup } from './use-toggle-group'\n\ntype ToggleGroupProps = ToggleGroupSchema['props']\n\nfunction flattenChildren(children: readonly VNode[]): VNode[] {\n const result: VNode[] = []\n for (const child of children) {\n if (child.type === Comment || child.type === Text)\n continue\n if (child.type === Fragment && Array.isArray(child.children)) {\n result.push(...flattenChildren(child.children.filter(value => typeof value === 'object') as VNode[]))\n continue\n }\n result.push(child)\n }\n return result\n}\n\nexport const XhToggleGroupRoot = defineComponent({\n name: 'XhToggleGroupRoot',\n // 缺省值由 connect 决定;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n collection: { type: Array as PropType<ToggleGroupNode[]> },\n value: { type: [String, Array] as PropType<ToggleGroupValue> },\n defaultValue: { type: [String, Array] as PropType<ToggleGroupValue> },\n multiple: { type: Boolean, default: undefined },\n disabled: { type: Boolean, default: undefined },\n disallowEmpty: { type: Boolean, default: undefined },\n variant: { type: String as PropType<ActionVariant> },\n tone: { type: String as PropType<Tone> },\n size: { type: String as PropType<Size> },\n fullWidth: { type: Boolean, default: undefined },\n separators: { type: Boolean, default: undefined },\n name: { type: String },\n orientation: { type: String as PropType<Orientation> },\n dir: { type: String as PropType<Direction> },\n loop: { type: Boolean, default: undefined },\n rovingFocus: { type: Boolean, default: undefined },\n },\n // value-change 携带 { value },update:value 携带裸值;裸值形态跟随 multiple,单选为字符串、多选为数组\n emits: {\n 'value-change': (_details: PayloadOf<ToggleGroupProps, 'onValueChange'>) => true,\n 'update:value': (_value: PayloadOf<ToggleGroupProps, 'onValueChange'>['value']) => true,\n },\n setup(props, { slots, emit }) {\n const notify: ToggleGroupProps['onValueChange'] = (details) => {\n emit('value-change', details)\n emit('update:value', details.value)\n }\n const ctx = useToggleGroup(useFormControlProps(props) as ToggleGroupProps, notify)\n provideToggleGroup(ctx)\n return () => {\n const children = slots.default\n ? slots.default()\n : props.collection\n ? renderDefaultTree(ctx.api.value.collection, slots.item)\n : []\n return h(\n 'div',\n ctx.api.value.getRootProps() as Record<string, unknown
|
|
1
|
+
{"version":3,"file":"toggle-group.js","names":[],"sources":["../../../src/components/toggle-group/toggle-group.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 toggle group 相关实现。\n\nimport type { ActionVariant, Direction, Orientation, Size, Tone } from '@xihan-ui/core'\nimport type { ToggleGroupNode, ToggleGroupNodeMeta, ToggleGroupSchema, ToggleGroupValue } from '@xihan-ui/headless'\nimport type { PropType, VNode } from 'vue'\nimport type { PayloadOf } from '../../runtime/payload'\nimport { Comment, defineComponent, Fragment, h, onBeforeUnmount, ref, Text, watch } from 'vue'\nimport { useFieldGroupWiring, useFieldLabelWiring } from '../field/use-field-control'\nimport { useFormControlProps } from '../form/use-form-control'\nimport { provideToggleGroup, useToggleGroupContext } from './context'\nimport { useToggleGroup } from './use-toggle-group'\n\ntype ToggleGroupProps = ToggleGroupSchema['props']\n\nfunction flattenChildren(children: readonly VNode[]): VNode[] {\n const result: VNode[] = []\n for (const child of children) {\n if (child.type === Comment || child.type === Text)\n continue\n if (child.type === Fragment && Array.isArray(child.children)) {\n result.push(...flattenChildren(child.children.filter(value => typeof value === 'object') as VNode[]))\n continue\n }\n result.push(child)\n }\n return result\n}\n\nexport const XhToggleGroupRoot = defineComponent({\n name: 'XhToggleGroupRoot',\n // 缺省值由 connect 决定;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n collection: { type: Array as PropType<ToggleGroupNode[]> },\n value: { type: [String, Array] as PropType<ToggleGroupValue> },\n defaultValue: { type: [String, Array] as PropType<ToggleGroupValue> },\n multiple: { type: Boolean, default: undefined },\n disabled: { type: Boolean, default: undefined },\n disallowEmpty: { type: Boolean, default: undefined },\n variant: { type: String as PropType<ActionVariant> },\n tone: { type: String as PropType<Tone> },\n size: { type: String as PropType<Size> },\n fullWidth: { type: Boolean, default: undefined },\n separators: { type: Boolean, default: undefined },\n name: { type: String },\n orientation: { type: String as PropType<Orientation> },\n dir: { type: String as PropType<Direction> },\n loop: { type: Boolean, default: undefined },\n rovingFocus: { type: Boolean, default: undefined },\n },\n // value-change 携带 { value },update:value 携带裸值;裸值形态跟随 multiple,单选为字符串、多选为数组\n emits: {\n 'value-change': (_details: PayloadOf<ToggleGroupProps, 'onValueChange'>) => true,\n 'update:value': (_value: PayloadOf<ToggleGroupProps, 'onValueChange'>['value']) => true,\n },\n setup(props, { slots, emit }) {\n const notify: ToggleGroupProps['onValueChange'] = (details) => {\n emit('value-change', details)\n emit('update:value', details.value)\n }\n const ctx = useToggleGroup(useFormControlProps(props) as ToggleGroupProps, notify)\n provideToggleGroup(ctx)\n // 放进表单字段时,字段的标题与说明接到组上:读屏进组时念组名与说明\n const fieldWiring = useFieldGroupWiring()\n const fieldLabel = useFieldLabelWiring()\n return () => {\n const children = slots.default\n ? slots.default()\n : props.collection\n ? renderDefaultTree(ctx.api.value.collection, slots.item)\n : []\n return h(\n 'div',\n fieldLabel.value({ ...fieldWiring.value, ...ctx.api.value.getRootProps() as Record<string, unknown> }),\n renderChildren(children, ctx.api.value),\n )\n }\n },\n})\n\nexport const XhToggleGroupItem = defineComponent({\n name: 'XhToggleGroupItem',\n props: {\n value: { type: String, required: true },\n // 缺省交给 connect 回 collection 里查,写死 false 会盖掉数据里的禁用\n disabled: { type: Boolean, default: undefined },\n },\n setup(props, { slots }) {\n const ctx = useToggleGroupContext()\n // 本条目持有焦点时,value 变更重报焦点条目,卸载时上报整组失焦\n const itemEl = ref<HTMLElement | null>(null)\n watch(() => props.value, (next, prev) => {\n if (next === prev)\n return\n const { service } = ctx\n if (service.getStatus() !== 'Started')\n return\n if (itemEl.value && service.scope.getActiveElement() === itemEl.value)\n service.send({ type: 'ITEM.FOCUS', value: next })\n })\n onBeforeUnmount(() => {\n const { service } = ctx\n if (service.getStatus() !== 'Started')\n return\n // 按「本节点当下正持有焦点」判定,不按 value 比对\n if (itemEl.value && service.scope.getActiveElement() === itemEl.value)\n service.send({ type: 'GROUP.BLUR' })\n })\n // 用原生 button,激活交给平台\n return () => h(\n 'button',\n { ...ctx.api.value.getItemProps({ value: props.value, disabled: props.disabled }) as Record<string, unknown>, ref: itemEl },\n slots.default?.(),\n )\n },\n})\n\n// 分隔线按条目计数插在相邻条目之间;要认 XhToggleGroupItem 这个组件对象,所以放在它的定义之后\nfunction renderChildren(children: readonly VNode[], props: {\n disabled: boolean\n orientation: Orientation\n separators: boolean\n}): VNode[] {\n const result: VNode[] = []\n let itemCount = 0\n for (const child of flattenChildren(children)) {\n if (child.type === XhToggleGroupItem) {\n if (props.separators && itemCount > 0) {\n result.push(h('span', {\n 'key': `separator-${itemCount}`,\n 'aria-hidden': true,\n 'data-xh-toggle-group-separator': '',\n 'data-orientation': props.orientation === 'horizontal' ? 'vertical' : 'horizontal',\n 'data-disabled': props.disabled ? '' : undefined,\n }))\n }\n itemCount += 1\n }\n result.push(child)\n }\n return result\n}\n\n/** 表单出口:整组只有一份,提供 name 后才参与提交。 */\nexport const XhToggleGroupHiddenInput = defineComponent({\n name: 'XhToggleGroupHiddenInput',\n setup() {\n const ctx = useToggleGroupContext()\n return () => h('input', ctx.api.value.getHiddenInputProps() as Record<string, unknown>)\n },\n})\n\n/**\n * 未写默认插槽时按 collection 铺开的整套结构,作者只提供数据。\n * 与手写部件产出的 DOM 完全一致,需要修改结构时写默认插槽,行为不变。\n * 条目下没有文本部件,文字直接落在条目中。\n */\nfunction renderDefaultTree(\n collection: readonly ToggleGroupNodeMeta[],\n itemSlot?: (node: ToggleGroupNodeMeta) => VNode[],\n): VNode[] {\n return collection.map(node => h(\n XhToggleGroupItem,\n { key: node.value, value: node.value },\n () => itemSlot?.(node) ?? node.label,\n ))\n}\n"],"mappings":";;;;;;AAmBA,SAAS,gBAAgB,UAAqC;CAC5D,MAAM,SAAkB,CAAC;CACzB,KAAK,MAAM,SAAS,UAAU;EAC5B,IAAI,MAAM,SAAS,WAAW,MAAM,SAAS,MAC3C;EACF,IAAI,MAAM,SAAS,YAAY,MAAM,QAAQ,MAAM,QAAQ,GAAG;GAC5D,OAAO,KAAK,GAAG,gBAAgB,MAAM,SAAS,QAAO,UAAS,OAAO,UAAU,QAAQ,CAAY,CAAC;GACpG;EACF;EACA,OAAO,KAAK,KAAK;CACnB;CACA,OAAO;AACT;AAEA,MAAa,oBAAoB,gBAAgB;CAC/C,MAAM;CAEN,OAAO;EACL,YAAY,EAAE,MAAM,MAAqC;EACzD,OAAO,EAAE,MAAM,CAAC,QAAQ,KAAK,EAAgC;EAC7D,cAAc,EAAE,MAAM,CAAC,QAAQ,KAAK,EAAgC;EACpE,UAAU;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;EAC9C,UAAU;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;EAC9C,eAAe;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;EACnD,SAAS,EAAE,MAAM,OAAkC;EACnD,MAAM,EAAE,MAAM,OAAyB;EACvC,MAAM,EAAE,MAAM,OAAyB;EACvC,WAAW;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;EAC/C,YAAY;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;EAChD,MAAM,EAAE,MAAM,OAAO;EACrB,aAAa,EAAE,MAAM,OAAgC;EACrD,KAAK,EAAE,MAAM,OAA8B;EAC3C,MAAM;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;EAC1C,aAAa;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;CACnD;CAEA,OAAO;EACL,iBAAiB,aAA2D;EAC5E,iBAAiB,WAAkE;CACrF;CACA,MAAM,OAAO,EAAE,OAAO,QAAQ;EAC5B,MAAM,UAA6C,YAAY;GAC7D,KAAK,gBAAgB,OAAO;GAC5B,KAAK,gBAAgB,QAAQ,KAAK;EACpC;EACA,MAAM,MAAM,eAAe,oBAAoB,KAAK,GAAuB,MAAM;EACjF,mBAAmB,GAAG;EAEtB,MAAM,cAAc,oBAAoB;EACxC,MAAM,aAAa,oBAAoB;EACvC,aAAa;GACX,MAAM,WAAW,MAAM,UACnB,MAAM,QAAQ,IACd,MAAM,aACJ,kBAAkB,IAAI,IAAI,MAAM,YAAY,MAAM,IAAI,IACtD,CAAC;GACP,OAAO,EACL,OACA,WAAW,MAAM;IAAE,GAAG,YAAY;IAAO,GAAG,IAAI,IAAI,MAAM,aAAa;GAA6B,CAAC,GACrG,eAAe,UAAU,IAAI,IAAI,KAAK,CACxC;EACF;CACF;AACF,CAAC;AAED,MAAa,oBAAoB,gBAAgB;CAC/C,MAAM;CACN,OAAO;EACL,OAAO;GAAE,MAAM;GAAQ,UAAU;EAAK;EAEtC,UAAU;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;CAChD;CACA,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,MAAM,sBAAsB;EAElC,MAAM,SAAS,IAAwB,IAAI;EAC3C,YAAY,MAAM,QAAQ,MAAM,SAAS;GACvC,IAAI,SAAS,MACX;GACF,MAAM,EAAE,YAAY;GACpB,IAAI,QAAQ,UAAU,MAAM,WAC1B;GACF,IAAI,OAAO,SAAS,QAAQ,MAAM,iBAAiB,MAAM,OAAO,OAC9D,QAAQ,KAAK;IAAE,MAAM;IAAc,OAAO;GAAK,CAAC;EACpD,CAAC;EACD,sBAAsB;GACpB,MAAM,EAAE,YAAY;GACpB,IAAI,QAAQ,UAAU,MAAM,WAC1B;GAEF,IAAI,OAAO,SAAS,QAAQ,MAAM,iBAAiB,MAAM,OAAO,OAC9D,QAAQ,KAAK,EAAE,MAAM,aAAa,CAAC;EACvC,CAAC;EAED,aAAa,EACX,UACA;GAAE,GAAG,IAAI,IAAI,MAAM,aAAa;IAAE,OAAO,MAAM;IAAO,UAAU,MAAM;GAAS,CAAC;GAA8B,KAAK;EAAO,GAC1H,MAAM,UAAU,CAClB;CACF;AACF,CAAC;AAGD,SAAS,eAAe,UAA4B,OAIxC;CACV,MAAM,SAAkB,CAAC;CACzB,IAAI,YAAY;CAChB,KAAK,MAAM,SAAS,gBAAgB,QAAQ,GAAG;EAC7C,IAAI,MAAM,SAAS,mBAAmB;GACpC,IAAI,MAAM,cAAc,YAAY,GAClC,OAAO,KAAK,EAAE,QAAQ;IACpB,OAAO,aAAa;IACpB,eAAe;IACf,kCAAkC;IAClC,oBAAoB,MAAM,gBAAgB,eAAe,aAAa;IACtE,iBAAiB,MAAM,WAAW,KAAK,KAAA;GACzC,CAAC,CAAC;GAEJ,aAAa;EACf;EACA,OAAO,KAAK,KAAK;CACnB;CACA,OAAO;AACT;;AAGA,MAAa,2BAA2B,gBAAgB;CACtD,MAAM;CACN,QAAQ;EACN,MAAM,MAAM,sBAAsB;EAClC,aAAa,EAAE,SAAS,IAAI,IAAI,MAAM,oBAAoB,CAA4B;CACxF;AACF,CAAC;;;;;;AAOD,SAAS,kBACP,YACA,UACS;CACT,OAAO,WAAW,KAAI,SAAQ,EAC5B,mBACA;EAAE,KAAK,KAAK;EAAO,OAAO,KAAK;CAAM,SAC/B,WAAW,IAAI,KAAK,KAAK,KACjC,CAAC;AACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType, SlotsType, VNode } from "vue";
|
|
2
2
|
import { ControlVariant, Direction, Orientation, Size } from "@xihan-ui/core";
|
|
3
|
-
import { ToolbarApi } from "@xihan-ui/headless";
|
|
3
|
+
import { ToolbarApi, ToolbarTranslations } from "@xihan-ui/headless";
|
|
4
4
|
//#region src/components/toolbar/toolbar.d.ts
|
|
5
5
|
/** 默认插槽的载荷:焦点锚点、生效的主轴与整条工具条的禁用态。 */
|
|
6
6
|
type ToolbarRootSlotProps = Pick<ToolbarApi, 'focusedValue' | 'orientation' | 'disabled'>;
|
|
@@ -25,6 +25,9 @@ declare const XhToolbarRoot: import("vue").DefineComponent<import("vue").Extract
|
|
|
25
25
|
size: {
|
|
26
26
|
type: PropType<Size>;
|
|
27
27
|
};
|
|
28
|
+
translations: {
|
|
29
|
+
type: PropType<Partial<ToolbarTranslations>>;
|
|
30
|
+
};
|
|
28
31
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
29
32
|
[key: string]: any;
|
|
30
33
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -48,6 +51,9 @@ declare const XhToolbarRoot: import("vue").DefineComponent<import("vue").Extract
|
|
|
48
51
|
size: {
|
|
49
52
|
type: PropType<Size>;
|
|
50
53
|
};
|
|
54
|
+
translations: {
|
|
55
|
+
type: PropType<Partial<ToolbarTranslations>>;
|
|
56
|
+
};
|
|
51
57
|
}>> & Readonly<{}>, {
|
|
52
58
|
loop: boolean;
|
|
53
59
|
disabled: boolean;
|
|
@@ -88,6 +94,15 @@ declare const XhToolbarItem: import("vue").DefineComponent<import("vue").Extract
|
|
|
88
94
|
as: string;
|
|
89
95
|
disabled: boolean;
|
|
90
96
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
97
|
+
/**
|
|
98
|
+
* 行尾的「更多」钮:放不下的条目按次序收进它弹出的菜单,全部放得下时它收着。
|
|
99
|
+
* 放在 root 的最后。它同时是一张 Menu 的触发器——菜单的条目、勾选态与落位都由工具条的机器现给
|
|
100
|
+
* (toolbarOverflowMenuProps),钮按 asChild 接菜单的开合接线,自己的解剖与工具条的处理器不让位。
|
|
101
|
+
* 不写内容时由皮肤画一枚横排三点。
|
|
102
|
+
*/
|
|
103
|
+
declare const XhToolbarOverflowTrigger: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
104
|
+
[key: string]: any;
|
|
105
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
91
106
|
//#endregion
|
|
92
|
-
export { ToolbarRootSlotProps, XhToolbarGroup, XhToolbarItem, XhToolbarRoot, XhToolbarSeparator };
|
|
107
|
+
export { ToolbarRootSlotProps, XhToolbarGroup, XhToolbarItem, XhToolbarOverflowTrigger, XhToolbarRoot, XhToolbarSeparator };
|
|
93
108
|
//# sourceMappingURL=toolbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.d.ts","names":[],"sources":["../../../src/components/toolbar/toolbar.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"toolbar.d.ts","names":[],"sources":["../../../src/components/toolbar/toolbar.ts"],"mappings":";;;;;KAqBY,uBAAuB,KAAK;cAE3B,6BAAa,8BAAA;;IAIS,MAAA,SAAS;;;IACjB,MAAA,SAAS;;;;;;;;;;;IAGL,MAAA,SAAS;;;IACZ,MAAA,SAAS;;;IACD,MAAA,SAAS,QAAQ;;;;;;IANlB,MAAA,SAAS;;;IACjB,MAAA,SAAS;;;;;;;;;;;IAGL,MAAA,SAAS;;;IACZ,MAAA,SAAS;;;IACD,MAAA,SAAS,QAAQ;;;;;;EAGvC,WAAC,OAAO,yBAAyB;kCAe7C;cAEW,8BAAc,0BAAA,oBAAA,4BAAA;;8BAMzB,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,kCAAkB,0BAAA,oBAAA,4BAAA;;8BAO7B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,6BAAa,8BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAoCxB;;;;;;;cAQW,wCAAwB,0BAAA,oBAAA,4BAAA;;8BAUnC,qCAAA,iDAAA,aAAA,eAAA,oDAAA"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { withXhConfig } from "../../config/config.js";
|
|
2
|
+
import { mergePartProps } from "../../runtime/merge-props.js";
|
|
3
|
+
import { XhMenuRoot } from "../menu/menu.js";
|
|
1
4
|
import { provideToolbar, useToolbarContext } from "./context.js";
|
|
2
5
|
import { useToolbar } from "./use-toolbar.js";
|
|
3
6
|
import { defineComponent, h, onBeforeUnmount, ref, watch } from "vue";
|
|
7
|
+
import { toolbarOverflowMenuProps } from "@xihan-ui/headless";
|
|
4
8
|
//#region src/components/toolbar/toolbar.ts
|
|
5
9
|
const XhToolbarRoot = defineComponent({
|
|
6
10
|
name: "XhToolbarRoot",
|
|
@@ -16,13 +20,19 @@ const XhToolbarRoot = defineComponent({
|
|
|
16
20
|
default: void 0
|
|
17
21
|
},
|
|
18
22
|
variant: { type: String },
|
|
19
|
-
size: { type: String }
|
|
23
|
+
size: { type: String },
|
|
24
|
+
translations: { type: Object }
|
|
20
25
|
},
|
|
21
26
|
slots: Object,
|
|
22
27
|
setup(props, { slots }) {
|
|
23
|
-
const ctx = useToolbar(props);
|
|
28
|
+
const ctx = useToolbar(withXhConfig("toolbar", props));
|
|
24
29
|
provideToolbar(ctx);
|
|
25
|
-
return () => h("div",
|
|
30
|
+
return () => h("div", {
|
|
31
|
+
...ctx.api.value.getRootProps(),
|
|
32
|
+
ref: (el) => {
|
|
33
|
+
ctx.rootRef.value = el;
|
|
34
|
+
}
|
|
35
|
+
}, slots.default?.({
|
|
26
36
|
focusedValue: ctx.api.value.focusedValue,
|
|
27
37
|
orientation: ctx.api.value.orientation,
|
|
28
38
|
disabled: ctx.api.value.disabled
|
|
@@ -83,7 +93,24 @@ const XhToolbarItem = defineComponent({
|
|
|
83
93
|
}, slots.default?.());
|
|
84
94
|
}
|
|
85
95
|
});
|
|
96
|
+
/**
|
|
97
|
+
* 行尾的「更多」钮:放不下的条目按次序收进它弹出的菜单,全部放得下时它收着。
|
|
98
|
+
* 放在 root 的最后。它同时是一张 Menu 的触发器——菜单的条目、勾选态与落位都由工具条的机器现给
|
|
99
|
+
* (toolbarOverflowMenuProps),钮按 asChild 接菜单的开合接线,自己的解剖与工具条的处理器不让位。
|
|
100
|
+
* 不写内容时由皮肤画一枚横排三点。
|
|
101
|
+
*/
|
|
102
|
+
const XhToolbarOverflowTrigger = defineComponent({
|
|
103
|
+
name: "XhToolbarOverflowTrigger",
|
|
104
|
+
inheritAttrs: false,
|
|
105
|
+
setup(_, { slots, attrs }) {
|
|
106
|
+
const ctx = useToolbarContext();
|
|
107
|
+
return () => h(XhMenuRoot, {
|
|
108
|
+
...toolbarOverflowMenuProps(ctx.service),
|
|
109
|
+
triggerAsChild: true
|
|
110
|
+
}, { trigger: () => [h("button", mergePartProps(ctx.api.value.getOverflowTriggerProps(), attrs), slots.default?.())] });
|
|
111
|
+
}
|
|
112
|
+
});
|
|
86
113
|
//#endregion
|
|
87
|
-
export { XhToolbarGroup, XhToolbarItem, XhToolbarRoot, XhToolbarSeparator };
|
|
114
|
+
export { XhToolbarGroup, XhToolbarItem, XhToolbarOverflowTrigger, XhToolbarRoot, XhToolbarSeparator };
|
|
88
115
|
|
|
89
116
|
//# sourceMappingURL=toolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.js","names":[],"sources":["../../../src/components/toolbar/toolbar.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 toolbar 相关实现。\n\nimport type { ControlVariant, Direction, Orientation, Size } from '@xihan-ui/core'\nimport type { ToolbarApi, ToolbarSchema } from '@xihan-ui/headless'\nimport type { PropType, SlotsType, VNode } from 'vue'\nimport { defineComponent, h, onBeforeUnmount, ref, watch } from 'vue'\nimport { provideToolbar, useToolbarContext } from './context'\nimport { useToolbar } from './use-toolbar'\n\ntype ToolbarProps = ToolbarSchema['props']\n\n/** 默认插槽的载荷:焦点锚点、生效的主轴与整条工具条的禁用态。 */\nexport type ToolbarRootSlotProps = Pick<ToolbarApi, 'focusedValue' | 'orientation' | 'disabled'>\n\nexport const XhToolbarRoot = defineComponent({\n name: 'XhToolbarRoot',\n // 缺省值由 connect 决定;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n orientation: { type: String as PropType<Orientation> },\n dir: { type: String as PropType<Direction> },\n loop: { type: Boolean, default: undefined },\n disabled: { type: Boolean, default: undefined },\n variant: { type: String as PropType<ControlVariant> },\n size: { type: String as PropType<Size> },\n },\n slots: Object as SlotsType<{\n default?: (props: ToolbarRootSlotProps) => VNode[]\n }>,\n // 无对外事件,条目的点击与切换由条目自行派发\n setup(props, { slots }) {\n const ctx = useToolbar(props as ToolbarProps)\n provideToolbar(ctx)\n return () => h('div', ctx.api.value.getRootProps() as Record<string, unknown
|
|
1
|
+
{"version":3,"file":"toolbar.js","names":[],"sources":["../../../src/components/toolbar/toolbar.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 toolbar 相关实现。\n\nimport type { ControlVariant, Direction, Orientation, Size } from '@xihan-ui/core'\nimport type { ToolbarApi, ToolbarSchema, ToolbarTranslations } from '@xihan-ui/headless'\nimport type { PropType, SlotsType, VNode } from 'vue'\nimport { toolbarOverflowMenuProps } from '@xihan-ui/headless'\nimport { defineComponent, h, onBeforeUnmount, ref, watch } from 'vue'\nimport { withXhConfig } from '../../config/config'\nimport { mergePartProps } from '../../runtime/merge-props'\nimport { XhMenuRoot } from '../menu/menu'\nimport { provideToolbar, useToolbarContext } from './context'\nimport { useToolbar } from './use-toolbar'\n\ntype ToolbarProps = ToolbarSchema['props']\n\n/** 默认插槽的载荷:焦点锚点、生效的主轴与整条工具条的禁用态。 */\nexport type ToolbarRootSlotProps = Pick<ToolbarApi, 'focusedValue' | 'orientation' | 'disabled'>\n\nexport const XhToolbarRoot = defineComponent({\n name: 'XhToolbarRoot',\n // 缺省值由 connect 决定;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n orientation: { type: String as PropType<Orientation> },\n dir: { type: String as PropType<Direction> },\n loop: { type: Boolean, default: undefined },\n disabled: { type: Boolean, default: undefined },\n variant: { type: String as PropType<ControlVariant> },\n size: { type: String as PropType<Size> },\n translations: { type: Object as PropType<Partial<ToolbarTranslations>> },\n },\n slots: Object as SlotsType<{\n default?: (props: ToolbarRootSlotProps) => VNode[]\n }>,\n // 无对外事件,条目的点击与切换由条目自行派发\n setup(props, { slots }) {\n const ctx = useToolbar(withXhConfig('toolbar', props) as ToolbarProps)\n provideToolbar(ctx)\n return () => h('div', {\n ...ctx.api.value.getRootProps() as Record<string, unknown>,\n ref: (el: unknown) => { ctx.rootRef.value = el as HTMLElement | null },\n }, slots.default?.({\n focusedValue: ctx.api.value.focusedValue,\n orientation: ctx.api.value.orientation,\n disabled: ctx.api.value.disabled,\n }))\n },\n})\n\nexport const XhToolbarGroup = defineComponent({\n name: 'XhToolbarGroup',\n setup(_, { slots }) {\n const ctx = useToolbarContext()\n return () => h('div', ctx.api.value.getGroupProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhToolbarSeparator = defineComponent({\n name: 'XhToolbarSeparator',\n setup() {\n const ctx = useToolbarContext()\n // 分隔线不渲染内容\n return () => h('div', ctx.api.value.getSeparatorProps() as Record<string, unknown>)\n },\n})\n\nexport const XhToolbarItem = defineComponent({\n name: 'XhToolbarItem',\n props: {\n value: { type: String, required: true },\n disabled: Boolean,\n /** 条目渲染为哪个标签,默认 button;不自动补 type=\"button\",表单内需自行声明。 */\n as: { type: String, default: 'button' },\n },\n setup(props, { slots }) {\n const ctx = useToolbarContext()\n // 本条目持有焦点时,value 变更重报焦点条目,卸载时上报工具条失焦\n const itemEl = ref<HTMLElement | null>(null)\n watch(() => props.value, (next, prev) => {\n if (next === prev)\n return\n const { service } = ctx\n if (service.getStatus() !== 'Started')\n return\n if (itemEl.value && service.scope.getActiveElement() === itemEl.value)\n service.send({ type: 'ITEM.FOCUS', value: next })\n })\n onBeforeUnmount(() => {\n const { service } = ctx\n // 整组一起卸载时根部件先停机,此刻送事件会在 dev 下抛\n if (service.getStatus() !== 'Started')\n return\n // 按「本节点当下正持有焦点」判定,不按 value 比对\n if (itemEl.value && service.scope.getActiveElement() === itemEl.value)\n service.send({ type: 'TOOLBAR.BLUR' })\n })\n return () => h(\n props.as,\n { ...ctx.api.value.getItemProps({ value: props.value, disabled: props.disabled }) as Record<string, unknown>, ref: itemEl },\n slots.default?.(),\n )\n },\n})\n\n/**\n * 行尾的「更多」钮:放不下的条目按次序收进它弹出的菜单,全部放得下时它收着。\n * 放在 root 的最后。它同时是一张 Menu 的触发器——菜单的条目、勾选态与落位都由工具条的机器现给\n * (toolbarOverflowMenuProps),钮按 asChild 接菜单的开合接线,自己的解剖与工具条的处理器不让位。\n * 不写内容时由皮肤画一枚横排三点。\n */\nexport const XhToolbarOverflowTrigger = defineComponent({\n name: 'XhToolbarOverflowTrigger',\n // 直通属性合到钮上,而不是落到菜单的根组件上\n inheritAttrs: false,\n setup(_, { slots, attrs }) {\n const ctx = useToolbarContext()\n return () => h(XhMenuRoot, { ...toolbarOverflowMenuProps(ctx.service), triggerAsChild: true }, {\n trigger: () => [h('button', mergePartProps(ctx.api.value.getOverflowTriggerProps() as Record<string, unknown>, attrs), slots.default?.())],\n })\n },\n})\n"],"mappings":";;;;;;;;AAuBA,MAAa,gBAAgB,gBAAgB;CAC3C,MAAM;CAEN,OAAO;EACL,aAAa,EAAE,MAAM,OAAgC;EACrD,KAAK,EAAE,MAAM,OAA8B;EAC3C,MAAM;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;EAC1C,UAAU;GAAE,MAAM;GAAS,SAAS,KAAA;EAAU;EAC9C,SAAS,EAAE,MAAM,OAAmC;EACpD,MAAM,EAAE,MAAM,OAAyB;EACvC,cAAc,EAAE,MAAM,OAAiD;CACzE;CACA,OAAO;CAIP,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,MAAM,WAAW,aAAa,WAAW,KAAK,CAAiB;EACrE,eAAe,GAAG;EAClB,aAAa,EAAE,OAAO;GACpB,GAAG,IAAI,IAAI,MAAM,aAAa;GAC9B,MAAM,OAAgB;IAAE,IAAI,QAAQ,QAAQ;GAAyB;EACvE,GAAG,MAAM,UAAU;GACjB,cAAc,IAAI,IAAI,MAAM;GAC5B,aAAa,IAAI,IAAI,MAAM;GAC3B,UAAU,IAAI,IAAI,MAAM;EAC1B,CAAC,CAAC;CACJ;AACF,CAAC;AAED,MAAa,iBAAiB,gBAAgB;CAC5C,MAAM;CACN,MAAM,GAAG,EAAE,SAAS;EAClB,MAAM,MAAM,kBAAkB;EAC9B,aAAa,EAAE,OAAO,IAAI,IAAI,MAAM,cAAc,GAA8B,MAAM,UAAU,CAAC;CACnG;AACF,CAAC;AAED,MAAa,qBAAqB,gBAAgB;CAChD,MAAM;CACN,QAAQ;EACN,MAAM,MAAM,kBAAkB;EAE9B,aAAa,EAAE,OAAO,IAAI,IAAI,MAAM,kBAAkB,CAA4B;CACpF;AACF,CAAC;AAED,MAAa,gBAAgB,gBAAgB;CAC3C,MAAM;CACN,OAAO;EACL,OAAO;GAAE,MAAM;GAAQ,UAAU;EAAK;EACtC,UAAU;;EAEV,IAAI;GAAE,MAAM;GAAQ,SAAS;EAAS;CACxC;CACA,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,MAAM,kBAAkB;EAE9B,MAAM,SAAS,IAAwB,IAAI;EAC3C,YAAY,MAAM,QAAQ,MAAM,SAAS;GACvC,IAAI,SAAS,MACX;GACF,MAAM,EAAE,YAAY;GACpB,IAAI,QAAQ,UAAU,MAAM,WAC1B;GACF,IAAI,OAAO,SAAS,QAAQ,MAAM,iBAAiB,MAAM,OAAO,OAC9D,QAAQ,KAAK;IAAE,MAAM;IAAc,OAAO;GAAK,CAAC;EACpD,CAAC;EACD,sBAAsB;GACpB,MAAM,EAAE,YAAY;GAEpB,IAAI,QAAQ,UAAU,MAAM,WAC1B;GAEF,IAAI,OAAO,SAAS,QAAQ,MAAM,iBAAiB,MAAM,OAAO,OAC9D,QAAQ,KAAK,EAAE,MAAM,eAAe,CAAC;EACzC,CAAC;EACD,aAAa,EACX,MAAM,IACN;GAAE,GAAG,IAAI,IAAI,MAAM,aAAa;IAAE,OAAO,MAAM;IAAO,UAAU,MAAM;GAAS,CAAC;GAA8B,KAAK;EAAO,GAC1H,MAAM,UAAU,CAClB;CACF;AACF,CAAC;;;;;;;AAQD,MAAa,2BAA2B,gBAAgB;CACtD,MAAM;CAEN,cAAc;CACd,MAAM,GAAG,EAAE,OAAO,SAAS;EACzB,MAAM,MAAM,kBAAkB;EAC9B,aAAa,EAAE,YAAY;GAAE,GAAG,yBAAyB,IAAI,OAAO;GAAG,gBAAgB;EAAK,GAAG,EAC7F,eAAe,CAAC,EAAE,UAAU,eAAe,IAAI,IAAI,MAAM,wBAAwB,GAA8B,KAAK,GAAG,MAAM,UAAU,CAAC,CAAC,EAC3I,CAAC;CACH;AACF,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { ComputedRef } from "vue";
|
|
1
|
+
import { ComputedRef, Ref } from "vue";
|
|
2
2
|
import { Service } from "@xihan-ui/core";
|
|
3
3
|
import { ToolbarApi, ToolbarSchema } from "@xihan-ui/headless";
|
|
4
4
|
//#region src/components/toolbar/use-toolbar.d.ts
|
|
5
5
|
interface ToolbarContext {
|
|
6
6
|
api: ComputedRef<ToolbarApi>;
|
|
7
|
-
/** 状态机实例,供条目上报 DOM
|
|
7
|
+
/** 状态机实例,供条目上报 DOM 侧的事实(卸载带走了焦点),也喂「更多」菜单的机器 props。 */
|
|
8
8
|
service: Service<ToolbarSchema>;
|
|
9
|
+
/** root 节点:条目与「更多」钮的查询容器,也是收纳量测的参照系。 */
|
|
10
|
+
rootRef: Ref<HTMLElement | null>;
|
|
9
11
|
}
|
|
10
12
|
declare function useToolbar(props: ToolbarSchema['props']): ToolbarContext;
|
|
11
13
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-toolbar.d.ts","names":[],"sources":["../../../src/components/toolbar/use-toolbar.ts"],"mappings":";;;;UAeiB;EACf,KAAK,YAAY;;EAEjB,SAAS,QAAQ;;
|
|
1
|
+
{"version":3,"file":"use-toolbar.d.ts","names":[],"sources":["../../../src/components/toolbar/use-toolbar.ts"],"mappings":";;;;UAeiB;EACf,KAAK,YAAY;;EAEjB,SAAS,QAAQ;;EAEjB,SAAS,IAAI;;iBAIC,WAAW,OAAO,yBAAyB"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { vueNormalize } from "../../runtime/normalize-props.js";
|
|
2
2
|
import { useMachine } from "../../runtime/use-machine.js";
|
|
3
|
-
import { computed } from "vue";
|
|
3
|
+
import { computed, ref } from "vue";
|
|
4
4
|
import { connectToolbar, toolbarMachine } from "@xihan-ui/headless";
|
|
5
5
|
//#region src/components/toolbar/use-toolbar.ts
|
|
6
6
|
function useToolbar(props) {
|
|
7
|
+
const rootRef = ref(null);
|
|
7
8
|
const service = useMachine(toolbarMachine, () => ({ ...props }));
|
|
9
|
+
service.refs.set("getRootEl", () => rootRef.value);
|
|
8
10
|
return {
|
|
9
11
|
api: computed(() => connectToolbar(service, vueNormalize)),
|
|
10
|
-
service
|
|
12
|
+
service,
|
|
13
|
+
rootRef
|
|
11
14
|
};
|
|
12
15
|
}
|
|
13
16
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-toolbar.js","names":[],"sources":["../../../src/components/toolbar/use-toolbar.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 use toolbar 相关实现。\n\nimport type { Service } from '@xihan-ui/core'\nimport type { ToolbarApi, ToolbarSchema } from '@xihan-ui/headless'\nimport type { ComputedRef } from 'vue'\nimport { connectToolbar, toolbarMachine } from '@xihan-ui/headless'\nimport { computed } from 'vue'\nimport { vueNormalize } from '../../runtime/normalize-props'\nimport { useMachine } from '../../runtime/use-machine'\n\nexport interface ToolbarContext {\n api: ComputedRef<ToolbarApi>\n /** 状态机实例,供条目上报 DOM
|
|
1
|
+
{"version":3,"file":"use-toolbar.js","names":[],"sources":["../../../src/components/toolbar/use-toolbar.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 use toolbar 相关实现。\n\nimport type { Service } from '@xihan-ui/core'\nimport type { ToolbarApi, ToolbarSchema } from '@xihan-ui/headless'\nimport type { ComputedRef, Ref } from 'vue'\nimport { connectToolbar, toolbarMachine } from '@xihan-ui/headless'\nimport { computed, ref } from 'vue'\nimport { vueNormalize } from '../../runtime/normalize-props'\nimport { useMachine } from '../../runtime/use-machine'\n\nexport interface ToolbarContext {\n api: ComputedRef<ToolbarApi>\n /** 状态机实例,供条目上报 DOM 侧的事实(卸载带走了焦点),也喂「更多」菜单的机器 props。 */\n service: Service<ToolbarSchema>\n /** root 节点:条目与「更多」钮的查询容器,也是收纳量测的参照系。 */\n rootRef: Ref<HTMLElement | null>\n}\n\n// 不建 scope:connect 不派生任何 id\nexport function useToolbar(props: ToolbarSchema['props']): ToolbarContext {\n const rootRef = ref<HTMLElement | null>(null)\n const service = useMachine(toolbarMachine, () => ({ ...props }))\n // 收纳量测在机器的挂载效应里跑,取值口要赶在那之前交出去\n service.refs.set('getRootEl', () => rootRef.value)\n const api = computed(() => connectToolbar(service, vueNormalize))\n return { api, service, rootRef }\n}\n"],"mappings":";;;;;AAwBA,SAAgB,WAAW,OAA+C;CACxE,MAAM,UAAU,IAAwB,IAAI;CAC5C,MAAM,UAAU,WAAW,uBAAuB,EAAE,GAAG,MAAM,EAAE;CAE/D,QAAQ,KAAK,IAAI,mBAAmB,QAAQ,KAAK;CAEjD,OAAO;EAAE,KADG,eAAe,eAAe,SAAS,YAAY,CACpD;EAAG;EAAS;CAAQ;AACjC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from "vue";
|
|
2
|
+
import { Service } from "@xihan-ui/core";
|
|
3
|
+
import { TooltipApi, TooltipSchema } from "@xihan-ui/headless";
|
|
4
|
+
//#region src/components/tooltip/context.d.ts
|
|
5
|
+
interface TooltipContext {
|
|
6
|
+
service: Service<TooltipSchema>;
|
|
7
|
+
api: ComputedRef<TooltipApi>;
|
|
8
|
+
/** 定位锚点。 */
|
|
9
|
+
triggerRef: Ref<HTMLElement | null>;
|
|
10
|
+
/** 被定位的浮层。 */
|
|
11
|
+
positionerRef: Ref<HTMLElement | null>;
|
|
12
|
+
/** 浮层本体,退场动画从它上面探测。 */
|
|
13
|
+
contentRef: Ref<HTMLElement | null>;
|
|
14
|
+
/** 当前是否应当可见:退场动画播完之前仍为真。 */
|
|
15
|
+
visible: Ref<boolean>;
|
|
16
|
+
/** 浮层迁移到的位置:全局配置的容器 > 运行时的浮层落点 > body。 */
|
|
17
|
+
portalTarget: ComputedRef<string | Element>;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { TooltipContext };
|
|
21
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","names":[],"sources":["../../../src/components/tooltip/context.ts"],"mappings":";;;;UAYiB;EACf,SAAS,QAAQ;EACjB,KAAK,YAAY;;EAEjB,YAAY,IAAI;;EAEhB,eAAe,IAAI;;EAEnB,YAAY,IAAI;;EAEhB,SAAS;;EAET,cAAc,qBAAqB"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { inject, provide } from "vue";
|
|
2
2
|
//#region src/components/tooltip/context.ts
|
|
3
3
|
const KEY = Symbol.for("xh-tooltip");
|
|
4
|
+
const GROUP_KEY = Symbol.for("xh-tooltip-group");
|
|
5
|
+
/** XhTooltipProvider 把它那一组交给子树里的提示。 */
|
|
6
|
+
function provideTooltipGroup(group) {
|
|
7
|
+
provide(GROUP_KEY, group);
|
|
8
|
+
}
|
|
9
|
+
/** 最近的 XhTooltipProvider 建的那一组;不在 Provider 里时为 null,提示归页面级的那一组。 */
|
|
10
|
+
function useTooltipGroup() {
|
|
11
|
+
return inject(GROUP_KEY, null);
|
|
12
|
+
}
|
|
4
13
|
function provideTooltip(ctx) {
|
|
5
14
|
provide(KEY, ctx);
|
|
6
15
|
}
|
|
@@ -10,6 +19,6 @@ function useTooltipContext() {
|
|
|
10
19
|
return ctx;
|
|
11
20
|
}
|
|
12
21
|
//#endregion
|
|
13
|
-
export { provideTooltip, useTooltipContext };
|
|
22
|
+
export { provideTooltip, provideTooltipGroup, useTooltipContext, useTooltipGroup };
|
|
14
23
|
|
|
15
24
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/tooltip/context.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 context 相关实现。\n\nimport type {
|
|
1
|
+
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/tooltip/context.ts"],"sourcesContent":["/*\n * Copyright (c) 2021-Present XiHanFun and contributors.\n * Licensed under the MIT License. See LICENSE in the project root for license information.\n */\n\n// 提供 context 相关实现。\n\nimport type { Service } from '@xihan-ui/core'\nimport type { TooltipApi, TooltipGroup, TooltipSchema } from '@xihan-ui/headless'\nimport type { ComputedRef, InjectionKey, Ref } from 'vue'\nimport { inject, provide } from 'vue'\n\nexport interface TooltipContext {\n service: Service<TooltipSchema>\n api: ComputedRef<TooltipApi>\n /** 定位锚点。 */\n triggerRef: Ref<HTMLElement | null>\n /** 被定位的浮层。 */\n positionerRef: Ref<HTMLElement | null>\n /** 浮层本体,退场动画从它上面探测。 */\n contentRef: Ref<HTMLElement | null>\n /** 当前是否应当可见:退场动画播完之前仍为真。 */\n visible: Ref<boolean>\n /** 浮层迁移到的位置:全局配置的容器 > 运行时的浮层落点 > body。 */\n portalTarget: ComputedRef<string | Element>\n}\n\nconst KEY: InjectionKey<TooltipContext> = Symbol.for('xh-tooltip')\nconst GROUP_KEY: InjectionKey<TooltipGroup> = Symbol.for('xh-tooltip-group')\n\n/** XhTooltipProvider 把它那一组交给子树里的提示。 */\nexport function provideTooltipGroup(group: TooltipGroup): void {\n provide(GROUP_KEY, group)\n}\n\n/** 最近的 XhTooltipProvider 建的那一组;不在 Provider 里时为 null,提示归页面级的那一组。 */\nexport function useTooltipGroup(): TooltipGroup | null {\n return inject(GROUP_KEY, null)\n}\n\nexport function provideTooltip(ctx: TooltipContext): void {\n provide(KEY, ctx)\n}\n\nexport function useTooltipContext(): TooltipContext {\n const ctx = inject(KEY, null)\n if (!ctx)\n throw new Error('[xh] Tooltip 部件必须用在 XhTooltipRoot 内')\n return ctx\n}\n"],"mappings":";;AA2BA,MAAM,MAAoC,OAAO,IAAI,YAAY;AACjE,MAAM,YAAwC,OAAO,IAAI,kBAAkB;;AAG3E,SAAgB,oBAAoB,OAA2B;CAC7D,QAAQ,WAAW,KAAK;AAC1B;;AAGA,SAAgB,kBAAuC;CACrD,OAAO,OAAO,WAAW,IAAI;AAC/B;AAEA,SAAgB,eAAe,KAA2B;CACxD,QAAQ,KAAK,GAAG;AAClB;AAEA,SAAgB,oBAAoC;CAClD,MAAM,MAAM,OAAO,KAAK,IAAI;CAC5B,IAAI,CAAC,KACH,MAAM,IAAI,MAAM,qCAAqC;CACvD,OAAO;AACT"}
|
|
@@ -6,6 +6,39 @@ import { TooltipApi, TooltipSchema } from "@xihan-ui/headless";
|
|
|
6
6
|
type TooltipProps = TooltipSchema['props'];
|
|
7
7
|
/** 默认插槽的载荷:展开状态与开合方法。 */
|
|
8
8
|
type TooltipRootSlotProps = Pick<TooltipApi, 'open' | 'setOpen'>;
|
|
9
|
+
/**
|
|
10
|
+
* 提示组:子树里的提示归同一组,共用接替窗口、同一时刻只开一个,没写延时的取这里给的缺省。
|
|
11
|
+
* 本身不渲染节点,也不改动子节点的排布。
|
|
12
|
+
*/
|
|
13
|
+
declare const XhTooltipProvider: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
14
|
+
/** 组内提示悬停进入到展开的缺省等待毫秒;提示自己写了就以提示为准。 */
|
|
15
|
+
openDelay: {
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
};
|
|
18
|
+
/** 组内提示悬停移出到收起的缺省等待毫秒。 */
|
|
19
|
+
closeDelay: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
};
|
|
22
|
+
/** 组内提示的缺省接替窗口毫秒;0 表示组内不接替。 */
|
|
23
|
+
skipDelayDuration: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
};
|
|
26
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}>[] | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
/** 组内提示悬停进入到展开的缺省等待毫秒;提示自己写了就以提示为准。 */
|
|
30
|
+
openDelay: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
};
|
|
33
|
+
/** 组内提示悬停移出到收起的缺省等待毫秒。 */
|
|
34
|
+
closeDelay: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
};
|
|
37
|
+
/** 组内提示的缺省接替窗口毫秒;0 表示组内不接替。 */
|
|
38
|
+
skipDelayDuration: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
};
|
|
41
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
42
|
declare const XhTooltipRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
43
|
open: {
|
|
11
44
|
type: BooleanConstructor;
|
|
@@ -28,7 +61,16 @@ declare const XhTooltipRoot: import("vue").DefineComponent<import("vue").Extract
|
|
|
28
61
|
closeDelay: {
|
|
29
62
|
type: NumberConstructor;
|
|
30
63
|
};
|
|
64
|
+
/** 跳过等待的窗口毫秒,默认 300:另一个提示开着或刚收起时,指向这一个直接接替、不播进场;0 不参与。 */
|
|
65
|
+
skipDelayDuration: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
};
|
|
31
68
|
disabled: BooleanConstructor;
|
|
69
|
+
/** 跟随鼠标:由指针打开的提示锚在指针落点上并随移动更新;触屏与聚焦打开时锚回 trigger。 */
|
|
70
|
+
followCursor: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
32
74
|
tone: {
|
|
33
75
|
type: PropType<Tone>;
|
|
34
76
|
};
|
|
@@ -62,7 +104,16 @@ declare const XhTooltipRoot: import("vue").DefineComponent<import("vue").Extract
|
|
|
62
104
|
closeDelay: {
|
|
63
105
|
type: NumberConstructor;
|
|
64
106
|
};
|
|
107
|
+
/** 跳过等待的窗口毫秒,默认 300:另一个提示开着或刚收起时,指向这一个直接接替、不播进场;0 不参与。 */
|
|
108
|
+
skipDelayDuration: {
|
|
109
|
+
type: NumberConstructor;
|
|
110
|
+
};
|
|
65
111
|
disabled: BooleanConstructor;
|
|
112
|
+
/** 跟随鼠标:由指针打开的提示锚在指针落点上并随移动更新;触屏与聚焦打开时锚回 trigger。 */
|
|
113
|
+
followCursor: {
|
|
114
|
+
type: BooleanConstructor;
|
|
115
|
+
default: undefined;
|
|
116
|
+
};
|
|
66
117
|
tone: {
|
|
67
118
|
type: PropType<Tone>;
|
|
68
119
|
};
|
|
@@ -76,6 +127,7 @@ declare const XhTooltipRoot: import("vue").DefineComponent<import("vue").Extract
|
|
|
76
127
|
disabled: boolean;
|
|
77
128
|
open: boolean;
|
|
78
129
|
defaultOpen: boolean;
|
|
130
|
+
followCursor: boolean;
|
|
79
131
|
}, SlotsType<{
|
|
80
132
|
default?: (props: TooltipRootSlotProps) => VNode[];
|
|
81
133
|
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -110,5 +162,5 @@ declare const XhTooltipArrow: import("vue").DefineComponent<{}, () => VNode<impo
|
|
|
110
162
|
[key: string]: any;
|
|
111
163
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
112
164
|
//#endregion
|
|
113
|
-
export { TooltipRootSlotProps, XhTooltipArrow, XhTooltipContent, XhTooltipPositioner, XhTooltipRoot, XhTooltipTrigger };
|
|
165
|
+
export { TooltipRootSlotProps, XhTooltipArrow, XhTooltipContent, XhTooltipPositioner, XhTooltipProvider, XhTooltipRoot, XhTooltipTrigger };
|
|
114
166
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/tooltip/tooltip.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../src/components/tooltip/tooltip.ts"],"mappings":";;;;;KAmBK,eAAe;;KAGR,uBAAuB,KAAK;;;;;cAM3B,iCAAiB,8BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmB5B,oDAAA;cAEW,6BAAa,8BAAA;;;;;;;IAKO,MAAA,SAAS;;;;;;;IAGf,MAAA,SAAS;;;;;;;;;;;;;;;;;;;IAQR,MAAA,SAAS;;;IACT,MAAA,SAAS;;;;;EAIP,gBAAA,UAAA,UAAU;EACb,gBAAA,OAAA,UAAU;;;;;;;;IAjBJ,MAAA,SAAS;;;;;;;IAGf,MAAA,SAAS;;;;;;;;;;;;;;;;;;;IAQR,MAAA,SAAS;;;IACT,MAAA,SAAS;;;;;;;;;;;EAQvB,WAAC,OAAO,yBAAyB;kCAW7C;cAEW,gCAAgB,8BAAA;;;;;;;;;;qCAyB3B;cAEW,mCAAmB,8BAAA;;;IAIC,MAAA,SAAS;;;;;;;IAAT,MAAA,SAAS;;MAcxC,oDAAA;cAEW,gCAAgB,0BAAA,oBAAA,4BAAA;;8BAY3B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,8BAAc,0BAAA,oBAAA,4BAAA;;8BAMzB,qCAAA,iDAAA,aAAA,eAAA,oDAAA"}
|
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
import { XhPortal } from "../../runtime/portal.js";
|
|
2
1
|
import { mergePartProps } from "../../runtime/merge-props.js";
|
|
3
2
|
import { mergeIntoChild } from "../../runtime/as-child.js";
|
|
4
|
-
import {
|
|
3
|
+
import { XhPortal } from "../../runtime/portal.js";
|
|
4
|
+
import { provideTooltip, provideTooltipGroup, useTooltipContext } from "./context.js";
|
|
5
5
|
import { useTooltip } from "./use-tooltip.js";
|
|
6
6
|
import { defineComponent, h, mergeProps } from "vue";
|
|
7
|
+
import { createTooltipGroup } from "@xihan-ui/headless";
|
|
7
8
|
//#region src/components/tooltip/tooltip.ts
|
|
9
|
+
/**
|
|
10
|
+
* 提示组:子树里的提示归同一组,共用接替窗口、同一时刻只开一个,没写延时的取这里给的缺省。
|
|
11
|
+
* 本身不渲染节点,也不改动子节点的排布。
|
|
12
|
+
*/
|
|
13
|
+
const XhTooltipProvider = defineComponent({
|
|
14
|
+
name: "XhTooltipProvider",
|
|
15
|
+
props: {
|
|
16
|
+
/** 组内提示悬停进入到展开的缺省等待毫秒;提示自己写了就以提示为准。 */
|
|
17
|
+
openDelay: { type: Number },
|
|
18
|
+
/** 组内提示悬停移出到收起的缺省等待毫秒。 */
|
|
19
|
+
closeDelay: { type: Number },
|
|
20
|
+
/** 组内提示的缺省接替窗口毫秒;0 表示组内不接替。 */
|
|
21
|
+
skipDelayDuration: { type: Number }
|
|
22
|
+
},
|
|
23
|
+
setup(props, { slots }) {
|
|
24
|
+
provideTooltipGroup(createTooltipGroup(() => ({
|
|
25
|
+
openDelay: props.openDelay,
|
|
26
|
+
closeDelay: props.closeDelay,
|
|
27
|
+
skipDelayDuration: props.skipDelayDuration
|
|
28
|
+
})));
|
|
29
|
+
return () => slots.default?.();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
8
32
|
const XhTooltipRoot = defineComponent({
|
|
9
33
|
name: "XhTooltipRoot",
|
|
10
34
|
props: {
|
|
@@ -19,7 +43,14 @@ const XhTooltipRoot = defineComponent({
|
|
|
19
43
|
dir: { type: String },
|
|
20
44
|
openDelay: { type: Number },
|
|
21
45
|
closeDelay: { type: Number },
|
|
46
|
+
/** 跳过等待的窗口毫秒,默认 300:另一个提示开着或刚收起时,指向这一个直接接替、不播进场;0 不参与。 */
|
|
47
|
+
skipDelayDuration: { type: Number },
|
|
22
48
|
disabled: Boolean,
|
|
49
|
+
/** 跟随鼠标:由指针打开的提示锚在指针落点上并随移动更新;触屏与聚焦打开时锚回 trigger。 */
|
|
50
|
+
followCursor: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: void 0
|
|
53
|
+
},
|
|
23
54
|
tone: { type: String },
|
|
24
55
|
size: { type: String }
|
|
25
56
|
},
|
|
@@ -105,6 +136,6 @@ const XhTooltipArrow = defineComponent({
|
|
|
105
136
|
}
|
|
106
137
|
});
|
|
107
138
|
//#endregion
|
|
108
|
-
export { XhTooltipArrow, XhTooltipContent, XhTooltipPositioner, XhTooltipRoot, XhTooltipTrigger };
|
|
139
|
+
export { XhTooltipArrow, XhTooltipContent, XhTooltipPositioner, XhTooltipProvider, XhTooltipRoot, XhTooltipTrigger };
|
|
109
140
|
|
|
110
141
|
//# sourceMappingURL=tooltip.js.map
|