@xihan-ui/vue 4.1.0 → 5.0.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 +802 -0
- package/dist/components/accordion/accordion.d.ts +7 -1
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +17 -10
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/accordion/use-accordion.d.ts +1 -1
- package/dist/components/accordion/use-accordion.js +1 -1
- package/dist/components/affix/affix.d.ts +1 -1
- package/dist/components/affix/use-affix.d.ts +1 -1
- package/dist/components/affix/use-affix.js +1 -1
- package/dist/components/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +7 -1
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/use-alert.js +10 -3
- package/dist/components/alert/use-alert.js.map +1 -1
- package/dist/components/anchor/anchor.d.ts +1 -1
- package/dist/components/anchor/use-anchor.d.ts +1 -1
- package/dist/components/anchor/use-anchor.js +1 -1
- package/dist/components/approval/approval.d.ts +1 -1
- package/dist/components/approval/approval.d.ts.map +1 -1
- package/dist/components/approval/approval.js +7 -1
- package/dist/components/approval/approval.js.map +1 -1
- package/dist/components/approval/use-approval.d.ts +4 -1
- package/dist/components/approval/use-approval.d.ts.map +1 -1
- package/dist/components/approval/use-approval.js +10 -3
- package/dist/components/approval/use-approval.js.map +1 -1
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/use-avatar.d.ts +1 -1
- package/dist/components/avatar/use-avatar.js +1 -1
- package/dist/components/avatar-group/avatar-group.js +1 -1
- package/dist/components/avatar-group/context.d.ts +1 -1
- package/dist/components/back-top/back-top.d.ts +1 -1
- package/dist/components/back-top/use-back-top.d.ts +1 -1
- package/dist/components/back-top/use-back-top.js +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/bar-code/bar-code.d.ts +2 -2
- package/dist/components/bar-code/bar-code.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +19 -23
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/use-breadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/use-breadcrumb.js +1 -1
- package/dist/components/button-group/button-group.js +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/calendar-picker/calendar-picker.d.ts +2 -2
- package/dist/components/calendar-picker/calendar-picker.d.ts.map +1 -1
- package/dist/components/calendar-picker/calendar-picker.js +1 -0
- package/dist/components/calendar-picker/calendar-picker.js.map +1 -1
- package/dist/components/calendar-picker/use-calendar-picker.d.ts +1 -1
- package/dist/components/calendar-picker/use-calendar-picker.js +1 -1
- package/dist/components/calendar-range-picker/calendar-range-picker.d.ts +2 -2
- package/dist/components/calendar-range-picker/calendar-range-picker.d.ts.map +1 -1
- package/dist/components/calendar-range-picker/calendar-range-picker.js +1 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.js.map +1 -1
- package/dist/components/calendar-range-picker/use-calendar-range-picker.d.ts +1 -1
- package/dist/components/calendar-range-picker/use-calendar-range-picker.js +1 -1
- package/dist/components/card/card.d.ts +15 -9
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +24 -2
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/card/context.d.ts +1 -1
- package/dist/components/carousel/carousel.d.ts +1 -1
- package/dist/components/carousel/use-carousel.d.ts +1 -1
- package/dist/components/carousel/use-carousel.js +1 -1
- package/dist/components/cartesian-chart/cartesian-chart.d.ts +6 -6
- package/dist/components/cartesian-chart/use-cartesian-chart.d.ts +1 -1
- package/dist/components/cartesian-chart/use-cartesian-chart.js +1 -1
- package/dist/components/cascader/cascader.d.ts +32 -1
- package/dist/components/cascader/cascader.d.ts.map +1 -1
- package/dist/components/cascader/cascader.js +105 -28
- package/dist/components/cascader/cascader.js.map +1 -1
- package/dist/components/cascader/use-cascader.d.ts +6 -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.d.ts +9 -1
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.js +33 -2
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/checkbox/use-checkbox.d.ts +1 -1
- package/dist/components/checkbox/use-checkbox.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +18 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.js +46 -18
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.d.ts +1 -1
- package/dist/components/checkbox-group/use-checkbox-group.js +1 -1
- package/dist/components/citation/citation.d.ts +1 -1
- package/dist/components/citation/citation.js +1 -1
- package/dist/components/citation/context.d.ts +1 -1
- package/dist/components/citation/use-citation.d.ts +1 -1
- package/dist/components/citation/use-citation.js +1 -1
- package/dist/components/clipboard/clipboard.d.ts +1 -1
- package/dist/components/clipboard/clipboard.d.ts.map +1 -1
- package/dist/components/clipboard/clipboard.js +5 -1
- package/dist/components/clipboard/clipboard.js.map +1 -1
- package/dist/components/clipboard/use-clipboard.d.ts +6 -1
- package/dist/components/clipboard/use-clipboard.d.ts.map +1 -1
- package/dist/components/clipboard/use-clipboard.js +7 -2
- package/dist/components/clipboard/use-clipboard.js.map +1 -1
- package/dist/components/code-view/code-view.d.ts +1 -1
- package/dist/components/code-view/code-view.js +1 -1
- package/dist/components/code-view/use-code-view.d.ts +1 -1
- package/dist/components/code-view/use-code-view.js +1 -1
- package/dist/components/collapsible/collapsible.d.ts +1 -1
- package/dist/components/collapsible/use-collapsible.d.ts +1 -1
- package/dist/components/collapsible/use-collapsible.js +1 -1
- package/dist/components/color-field/color-field.d.ts +19 -1
- package/dist/components/color-field/color-field.d.ts.map +1 -1
- package/dist/components/color-field/color-field.js +46 -13
- package/dist/components/color-field/color-field.js.map +1 -1
- package/dist/components/color-field/use-color-field.d.ts +6 -1
- package/dist/components/color-field/use-color-field.d.ts.map +1 -1
- package/dist/components/color-field/use-color-field.js +7 -2
- package/dist/components/color-field/use-color-field.js.map +1 -1
- package/dist/components/color-picker/color-picker.d.ts +51 -2
- package/dist/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/color-picker.js +116 -25
- package/dist/components/color-picker/color-picker.js.map +1 -1
- package/dist/components/color-picker/use-color-picker.d.ts +7 -2
- package/dist/components/color-picker/use-color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/use-color-picker.js +15 -5
- package/dist/components/color-picker/use-color-picker.js.map +1 -1
- package/dist/components/color-slider/color-slider.d.ts +10 -1
- package/dist/components/color-slider/color-slider.d.ts.map +1 -1
- package/dist/components/color-slider/color-slider.js +7 -1
- package/dist/components/color-slider/color-slider.js.map +1 -1
- package/dist/components/color-slider/use-color-slider.d.ts +6 -1
- package/dist/components/color-slider/use-color-slider.d.ts.map +1 -1
- package/dist/components/color-slider/use-color-slider.js +4 -1
- package/dist/components/color-slider/use-color-slider.js.map +1 -1
- package/dist/components/color-swatch/color-swatch.js +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker.d.ts +9 -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 +36 -13
- 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 +1 -1
- package/dist/components/color-swatch-picker/use-color-swatch-picker.js +1 -1
- package/dist/components/combobox/combobox.d.ts +18 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +68 -29
- package/dist/components/combobox/combobox.js.map +1 -1
- package/dist/components/combobox/use-combobox.d.ts +6 -1
- package/dist/components/combobox/use-combobox.d.ts.map +1 -1
- package/dist/components/combobox/use-combobox.js +4 -1
- package/dist/components/combobox/use-combobox.js.map +1 -1
- package/dist/components/command/command.d.ts +5 -5
- package/dist/components/command/command.d.ts.map +1 -1
- package/dist/components/command/command.js +57 -28
- package/dist/components/command/command.js.map +1 -1
- package/dist/components/command/use-command.d.ts +2 -2
- package/dist/components/command/use-command.d.ts.map +1 -1
- package/dist/components/command/use-command.js +1 -1
- package/dist/components/command/use-command.js.map +1 -1
- package/dist/components/context-menu/context-menu.d.ts +57 -7
- package/dist/components/context-menu/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu/context-menu.js +110 -62
- package/dist/components/context-menu/context-menu.js.map +1 -1
- package/dist/components/context-menu/context.d.ts +1 -1
- package/dist/components/context-menu/use-context-menu.d.ts +2 -2
- package/dist/components/context-menu/use-context-menu.d.ts.map +1 -1
- package/dist/components/context-menu/use-context-menu.js +4 -4
- package/dist/components/context-menu/use-context-menu.js.map +1 -1
- package/dist/components/date-field/date-field.d.ts +18 -1
- package/dist/components/date-field/date-field.d.ts.map +1 -1
- package/dist/components/date-field/date-field.js +45 -13
- package/dist/components/date-field/date-field.js.map +1 -1
- package/dist/components/date-field/use-date-field.d.ts +6 -1
- package/dist/components/date-field/use-date-field.d.ts.map +1 -1
- package/dist/components/date-field/use-date-field.js +10 -4
- package/dist/components/date-field/use-date-field.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +62 -3
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +108 -21
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/date-picker/use-date-picker.d.ts +6 -1
- package/dist/components/date-picker/use-date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/use-date-picker.js +4 -1
- package/dist/components/date-picker/use-date-picker.js.map +1 -1
- package/dist/components/date-range-picker/context.js +19 -1
- package/dist/components/date-range-picker/context.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +93 -3
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +157 -40
- 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 +6 -1
- package/dist/components/date-range-picker/use-date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/use-date-range-picker.js +4 -1
- package/dist/components/date-range-picker/use-date-range-picker.js.map +1 -1
- package/dist/components/descriptions/context.d.ts +1 -1
- package/dist/components/descriptions/descriptions.d.ts +1 -1
- package/dist/components/descriptions/descriptions.js +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/dialog.js +7 -1
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/dialog/use-dialog.d.ts +4 -1
- package/dist/components/dialog/use-dialog.d.ts.map +1 -1
- package/dist/components/dialog/use-dialog.js +6 -2
- package/dist/components/dialog/use-dialog.js.map +1 -1
- package/dist/components/diff-view/diff-view.d.ts +1 -1
- package/dist/components/diff-view/diff-view.js +1 -1
- package/dist/components/diff-view/use-diff-view.d.ts +1 -1
- package/dist/components/diff-view/use-diff-view.js +1 -1
- package/dist/components/download-trigger/download-trigger.d.ts +1 -1
- package/dist/components/download-trigger/use-download-trigger.d.ts +1 -1
- package/dist/components/download-trigger/use-download-trigger.js +1 -1
- package/dist/components/drawer/drawer.d.ts +2 -2
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/drawer.js +7 -1
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/drawer/use-drawer.d.ts +4 -1
- package/dist/components/drawer/use-drawer.d.ts.map +1 -1
- package/dist/components/drawer/use-drawer.js +6 -2
- package/dist/components/drawer/use-drawer.js.map +1 -1
- package/dist/components/editable/editable.d.ts +9 -1
- package/dist/components/editable/editable.d.ts.map +1 -1
- package/dist/components/editable/editable.js +7 -1
- package/dist/components/editable/editable.js.map +1 -1
- package/dist/components/editable/use-editable.d.ts +6 -1
- package/dist/components/editable/use-editable.d.ts.map +1 -1
- package/dist/components/editable/use-editable.js +6 -2
- package/dist/components/editable/use-editable.js.map +1 -1
- package/dist/components/empty-state/empty-state.d.ts +1 -1
- package/dist/components/empty-state/use-empty-state.js +1 -1
- package/dist/components/expression-input/context.d.ts +7 -0
- package/dist/components/expression-input/context.d.ts.map +1 -0
- package/dist/components/expression-input/context.js +15 -0
- package/dist/components/expression-input/context.js.map +1 -0
- package/dist/components/expression-input/expression-input.d.ts +294 -0
- package/dist/components/expression-input/expression-input.d.ts.map +1 -0
- package/dist/components/expression-input/expression-input.js +307 -0
- package/dist/components/expression-input/expression-input.js.map +1 -0
- package/dist/components/expression-input/use-expression-input.d.ts +26 -0
- package/dist/components/expression-input/use-expression-input.d.ts.map +1 -0
- package/dist/components/expression-input/use-expression-input.js +72 -0
- package/dist/components/expression-input/use-expression-input.js.map +1 -0
- package/dist/components/field/boundary.d.ts +12 -0
- package/dist/components/field/boundary.d.ts.map +1 -0
- package/dist/components/field/boundary.js +19 -0
- package/dist/components/field/boundary.js.map +1 -0
- package/dist/components/field/field.d.ts +32 -10
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +51 -20
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/use-field-control.d.ts.map +1 -1
- package/dist/components/field/use-field-control.js +5 -25
- package/dist/components/field/use-field-control.js.map +1 -1
- package/dist/components/field/use-field.d.ts +6 -2
- package/dist/components/field/use-field.d.ts.map +1 -1
- package/dist/components/field/use-field.js +45 -4
- package/dist/components/field/use-field.js.map +1 -1
- package/dist/components/field-array/context.d.ts +1 -1
- package/dist/components/field-array/field-array.d.ts +87 -2
- package/dist/components/field-array/field-array.d.ts.map +1 -1
- package/dist/components/field-array/field-array.js +107 -3
- package/dist/components/field-array/field-array.js.map +1 -1
- package/dist/components/field-array/use-field-array.d.ts +4 -2
- package/dist/components/field-array/use-field-array.d.ts.map +1 -1
- package/dist/components/field-array/use-field-array.js +6 -2
- package/dist/components/field-array/use-field-array.js.map +1 -1
- package/dist/components/fieldset/fieldset.d.ts +23 -8
- package/dist/components/fieldset/fieldset.d.ts.map +1 -1
- package/dist/components/fieldset/fieldset.js +39 -4
- package/dist/components/fieldset/fieldset.js.map +1 -1
- package/dist/components/fieldset/use-fieldset.d.ts +6 -2
- package/dist/components/fieldset/use-fieldset.d.ts.map +1 -1
- package/dist/components/fieldset/use-fieldset.js +38 -4
- package/dist/components/fieldset/use-fieldset.js.map +1 -1
- package/dist/components/file-upload/file-upload.d.ts +56 -2
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/file-upload.js +81 -6
- package/dist/components/file-upload/file-upload.js.map +1 -1
- package/dist/components/file-upload/use-file-upload.d.ts +6 -1
- package/dist/components/file-upload/use-file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/use-file-upload.js +10 -4
- package/dist/components/file-upload/use-file-upload.js.map +1 -1
- package/dist/components/filter-builder/context.js +35 -0
- package/dist/components/filter-builder/context.js.map +1 -0
- package/dist/components/filter-builder/filter-builder.d.ts +216 -0
- package/dist/components/filter-builder/filter-builder.d.ts.map +1 -0
- package/dist/components/filter-builder/filter-builder.js +322 -0
- package/dist/components/filter-builder/filter-builder.js.map +1 -0
- package/dist/components/filter-builder/use-filter-builder.d.ts +16 -0
- package/dist/components/filter-builder/use-filter-builder.d.ts.map +1 -0
- package/dist/components/filter-builder/use-filter-builder.js +27 -0
- package/dist/components/filter-builder/use-filter-builder.js.map +1 -0
- package/dist/components/flex/context.d.ts +1 -1
- package/dist/components/flex/flex.d.ts +1 -1
- package/dist/components/flex/flex.js +1 -1
- package/dist/components/float-button/float-button.d.ts +1 -1
- package/dist/components/float-button/use-float-button.d.ts +1 -1
- package/dist/components/float-button/use-float-button.js +1 -1
- package/dist/components/floating-panel/floating-panel.d.ts +5 -1
- package/dist/components/floating-panel/floating-panel.d.ts.map +1 -1
- package/dist/components/floating-panel/floating-panel.js +8 -2
- package/dist/components/floating-panel/floating-panel.js.map +1 -1
- package/dist/components/floating-panel/use-floating-panel.d.ts +6 -3
- package/dist/components/floating-panel/use-floating-panel.d.ts.map +1 -1
- package/dist/components/floating-panel/use-floating-panel.js +6 -2
- package/dist/components/floating-panel/use-floating-panel.js.map +1 -1
- package/dist/components/form/form.d.ts +1 -1
- package/dist/components/form/form.js +1 -1
- package/dist/components/form/use-form.d.ts +1 -1
- package/dist/components/form/use-form.js +1 -1
- package/dist/components/format-input/context.js +15 -0
- package/dist/components/format-input/context.js.map +1 -0
- package/dist/components/format-input/format-input.d.ts +189 -0
- package/dist/components/format-input/format-input.d.ts.map +1 -0
- package/dist/components/format-input/format-input.js +189 -0
- package/dist/components/format-input/format-input.js.map +1 -0
- package/dist/components/format-input/use-format-input.d.ts +16 -0
- package/dist/components/format-input/use-format-input.d.ts.map +1 -0
- package/dist/components/format-input/use-format-input.js +27 -0
- package/dist/components/format-input/use-format-input.js.map +1 -0
- package/dist/components/funnel-chart/funnel-chart.d.ts +6 -6
- package/dist/components/funnel-chart/use-funnel-chart.d.ts +1 -1
- package/dist/components/funnel-chart/use-funnel-chart.js +1 -1
- package/dist/components/graph-chart/graph-chart.d.ts +6 -6
- package/dist/components/graph-chart/use-graph-chart.d.ts +1 -1
- package/dist/components/graph-chart/use-graph-chart.js +1 -1
- package/dist/components/grid/context.d.ts +1 -1
- package/dist/components/grid/grid.d.ts +12 -2
- package/dist/components/grid/grid.d.ts.map +1 -1
- package/dist/components/grid/grid.js +8 -3
- package/dist/components/grid/grid.js.map +1 -1
- package/dist/components/grid-list/context.d.ts +1 -1
- package/dist/components/grid-list/grid-list.d.ts +1 -1
- package/dist/components/grid-list/grid-list.d.ts.map +1 -1
- package/dist/components/grid-list/grid-list.js +5 -1
- package/dist/components/grid-list/grid-list.js.map +1 -1
- package/dist/components/grid-list/use-grid-list.d.ts +7 -2
- package/dist/components/grid-list/use-grid-list.d.ts.map +1 -1
- package/dist/components/grid-list/use-grid-list.js +4 -1
- package/dist/components/grid-list/use-grid-list.js.map +1 -1
- package/dist/components/heatmap/heatmap.d.ts +40 -11
- package/dist/components/heatmap/heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/heatmap.js +56 -90
- package/dist/components/heatmap/heatmap.js.map +1 -1
- package/dist/components/heatmap/use-heatmap.d.ts +2 -2
- package/dist/components/heatmap/use-heatmap.d.ts.map +1 -1
- package/dist/components/heatmap/use-heatmap.js +3 -5
- package/dist/components/heatmap/use-heatmap.js.map +1 -1
- package/dist/components/hierarchy-chart/hierarchy-chart.d.ts +4 -4
- package/dist/components/hierarchy-chart/use-hierarchy-chart.d.ts +1 -1
- package/dist/components/hierarchy-chart/use-hierarchy-chart.js +1 -1
- package/dist/components/highlight/highlight.js +1 -1
- package/dist/components/hover-card/hover-card.d.ts +1 -1
- package/dist/components/hover-card/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card/hover-card.js +5 -9
- package/dist/components/hover-card/hover-card.js.map +1 -1
- package/dist/components/hover-card/use-hover-card.d.ts +4 -5
- package/dist/components/hover-card/use-hover-card.d.ts.map +1 -1
- package/dist/components/hover-card/use-hover-card.js +5 -7
- package/dist/components/hover-card/use-hover-card.js.map +1 -1
- package/dist/components/icon/icon.d.ts +2 -2
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/components/icon/icon.js +10 -2
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/components/icon/use-icon.d.ts +1 -1
- package/dist/components/icon/use-icon.js +1 -1
- package/dist/components/image/image.d.ts +1 -1
- package/dist/components/image/use-image.d.ts +1 -1
- package/dist/components/image/use-image.js +1 -1
- package/dist/components/image-cropper/image-cropper.d.ts +9 -1
- package/dist/components/image-cropper/image-cropper.d.ts.map +1 -1
- package/dist/components/image-cropper/image-cropper.js +2 -0
- package/dist/components/image-cropper/image-cropper.js.map +1 -1
- package/dist/components/image-cropper/use-image-cropper.d.ts +1 -1
- package/dist/components/image-cropper/use-image-cropper.js +1 -1
- package/dist/components/image-viewer/image-viewer.d.ts +1 -1
- package/dist/components/image-viewer/image-viewer.js +1 -1
- package/dist/components/image-viewer/use-image-viewer.d.ts +1 -1
- package/dist/components/image-viewer/use-image-viewer.js +1 -1
- package/dist/components/infinite-scroll/infinite-scroll.d.ts +1 -1
- package/dist/components/infinite-scroll/use-infinite-scroll.d.ts +1 -1
- package/dist/components/infinite-scroll/use-infinite-scroll.js +1 -1
- package/dist/components/input-group/context.d.ts +1 -1
- package/dist/components/input-group/input-group.js +1 -1
- package/dist/components/json-viewer/json-viewer.d.ts +60 -1
- package/dist/components/json-viewer/json-viewer.d.ts.map +1 -1
- package/dist/components/json-viewer/json-viewer.js +68 -5
- package/dist/components/json-viewer/json-viewer.js.map +1 -1
- package/dist/components/json-viewer/use-json-viewer.d.ts +5 -3
- package/dist/components/json-viewer/use-json-viewer.d.ts.map +1 -1
- package/dist/components/json-viewer/use-json-viewer.js +4 -3
- package/dist/components/json-viewer/use-json-viewer.js.map +1 -1
- package/dist/components/kbd/kbd.d.ts +2 -1
- package/dist/components/kbd/kbd.d.ts.map +1 -1
- package/dist/components/kbd/kbd.js +1 -1
- package/dist/components/kbd/kbd.js.map +1 -1
- package/dist/components/kbd/use-kbd-platform.js +1 -1
- package/dist/components/kbd/use-kbd-platform.js.map +1 -1
- package/dist/components/layout/layout.d.ts +1 -1
- package/dist/components/layout/use-layout.d.ts +1 -1
- package/dist/components/layout/use-layout.js +1 -1
- package/dist/components/list/context.d.ts +1 -1
- package/dist/components/list/list.js +1 -1
- package/dist/components/listbox/listbox.d.ts +17 -1
- package/dist/components/listbox/listbox.d.ts.map +1 -1
- package/dist/components/listbox/listbox.js +57 -18
- package/dist/components/listbox/listbox.js.map +1 -1
- package/dist/components/listbox/use-listbox.d.ts +7 -2
- package/dist/components/listbox/use-listbox.d.ts.map +1 -1
- package/dist/components/listbox/use-listbox.js +7 -3
- package/dist/components/listbox/use-listbox.js.map +1 -1
- package/dist/components/loading-bar/loading-bar.d.ts +1 -1
- package/dist/components/loading-bar/use-loading-bar.d.ts +1 -1
- package/dist/components/loading-bar/use-loading-bar.js +1 -1
- package/dist/components/log/log.d.ts +1 -1
- package/dist/components/log/log.js +1 -1
- package/dist/components/log/use-log.d.ts +1 -1
- package/dist/components/log/use-log.js +1 -1
- package/dist/components/markdown-stream/markdown-stream.d.ts +1 -1
- package/dist/components/markdown-stream/markdown-stream.js +1 -1
- package/dist/components/markdown-stream/use-markdown-stream.d.ts +1 -1
- package/dist/components/markdown-stream/use-markdown-stream.js +1 -1
- package/dist/components/marquee/context.d.ts +1 -1
- package/dist/components/marquee/marquee.d.ts +1 -1
- package/dist/components/marquee/marquee.js +1 -1
- package/dist/components/masonry/masonry.d.ts +1 -1
- package/dist/components/masonry/masonry.js +1 -1
- package/dist/components/matrix-code/context.d.ts +1 -1
- package/dist/components/matrix-code/matrix-code.d.ts +1 -1
- package/dist/components/matrix-code/matrix-code.js +1 -1
- package/dist/components/mention/context.d.ts +1 -1
- package/dist/components/mention/mention.d.ts +25 -3
- package/dist/components/mention/mention.d.ts.map +1 -1
- package/dist/components/mention/mention.js +70 -17
- package/dist/components/mention/mention.js.map +1 -1
- package/dist/components/mention/use-mention.d.ts +7 -2
- package/dist/components/mention/use-mention.d.ts.map +1 -1
- package/dist/components/mention/use-mention.js +4 -1
- package/dist/components/mention/use-mention.js.map +1 -1
- package/dist/components/menu/context.d.ts +1 -1
- package/dist/components/menu/menu.d.ts +64 -7
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.js +184 -72
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/menu/use-menu.d.ts +6 -2
- package/dist/components/menu/use-menu.d.ts.map +1 -1
- package/dist/components/menu/use-menu.js +14 -8
- package/dist/components/menu/use-menu.js.map +1 -1
- package/dist/components/menubar/context.d.ts +1 -1
- package/dist/components/menubar/menubar.d.ts +57 -7
- package/dist/components/menubar/menubar.d.ts.map +1 -1
- package/dist/components/menubar/menubar.js +121 -74
- package/dist/components/menubar/menubar.js.map +1 -1
- package/dist/components/menubar/use-menubar.d.ts +2 -2
- package/dist/components/menubar/use-menubar.d.ts.map +1 -1
- package/dist/components/menubar/use-menubar.js +4 -4
- package/dist/components/menubar/use-menubar.js.map +1 -1
- package/dist/components/message-feed/message-feed.d.ts +1 -1
- package/dist/components/message-feed/use-message-feed.d.ts +1 -1
- package/dist/components/message-feed/use-message-feed.js +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +22 -24
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/navigation-menu/use-navigation-menu.d.ts +1 -1
- package/dist/components/navigation-menu/use-navigation-menu.js +1 -1
- package/dist/components/notification/context.d.ts +4 -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 +1 -1
- package/dist/components/notification/notification.d.ts.map +1 -1
- package/dist/components/notification/notification.js +7 -1
- package/dist/components/notification/notification.js.map +1 -1
- package/dist/components/notification/use-notification.d.ts +1 -1
- package/dist/components/notification/use-notification.d.ts.map +1 -1
- package/dist/components/notification/use-notification.js +6 -2
- package/dist/components/notification/use-notification.js.map +1 -1
- package/dist/components/number-animation/number-animation.d.ts +1 -1
- package/dist/components/number-animation/number-animation.js +1 -1
- package/dist/components/number-field/number-field.d.ts +24 -1
- package/dist/components/number-field/number-field.d.ts.map +1 -1
- package/dist/components/number-field/number-field.js +44 -12
- package/dist/components/number-field/number-field.js.map +1 -1
- package/dist/components/number-field/use-number-field.d.ts +6 -1
- package/dist/components/number-field/use-number-field.d.ts.map +1 -1
- package/dist/components/number-field/use-number-field.js +7 -2
- package/dist/components/number-field/use-number-field.js.map +1 -1
- package/dist/components/page-header/context.d.ts +1 -1
- package/dist/components/page-header/page-header.js +1 -1
- package/dist/components/pagination/pagination.d.ts +1 -1
- package/dist/components/pagination/use-pagination.d.ts +1 -1
- package/dist/components/pagination/use-pagination.js +1 -1
- package/dist/components/password-input/password-input.d.ts +19 -1
- package/dist/components/password-input/password-input.d.ts.map +1 -1
- package/dist/components/password-input/password-input.js +45 -13
- package/dist/components/password-input/password-input.js.map +1 -1
- package/dist/components/password-input/use-password-input.d.ts +6 -1
- package/dist/components/password-input/use-password-input.d.ts.map +1 -1
- package/dist/components/password-input/use-password-input.js +10 -4
- package/dist/components/password-input/use-password-input.js.map +1 -1
- package/dist/components/pie-chart/pie-chart.d.ts +6 -6
- package/dist/components/pie-chart/use-pie-chart.d.ts +1 -1
- package/dist/components/pie-chart/use-pie-chart.js +1 -1
- package/dist/components/pin-input/pin-input.d.ts +19 -1
- package/dist/components/pin-input/pin-input.d.ts.map +1 -1
- package/dist/components/pin-input/pin-input.js +33 -3
- package/dist/components/pin-input/pin-input.js.map +1 -1
- package/dist/components/pin-input/use-pin-input.d.ts +6 -1
- package/dist/components/pin-input/use-pin-input.d.ts.map +1 -1
- package/dist/components/pin-input/use-pin-input.js +10 -4
- package/dist/components/pin-input/use-pin-input.js.map +1 -1
- package/dist/components/popconfirm/popconfirm.d.ts +3 -3
- package/dist/components/popconfirm/popconfirm.d.ts.map +1 -1
- package/dist/components/popconfirm/popconfirm.js +10 -4
- package/dist/components/popconfirm/popconfirm.js.map +1 -1
- package/dist/components/popconfirm/use-popconfirm.d.ts +4 -1
- package/dist/components/popconfirm/use-popconfirm.d.ts.map +1 -1
- package/dist/components/popconfirm/use-popconfirm.js +8 -4
- package/dist/components/popconfirm/use-popconfirm.js.map +1 -1
- package/dist/components/popover/popover.d.ts +10 -2
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +10 -2
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/popover/use-popover.d.ts +8 -1
- package/dist/components/popover/use-popover.d.ts.map +1 -1
- package/dist/components/popover/use-popover.js +12 -3
- package/dist/components/popover/use-popover.js.map +1 -1
- package/dist/components/progress/progress.d.ts +2 -2
- package/dist/components/progress/progress.js +1 -1
- package/dist/components/prompt-input/prompt-input.d.ts +1 -1
- package/dist/components/prompt-input/use-prompt-input.d.ts +1 -1
- package/dist/components/prompt-input/use-prompt-input.js +1 -1
- package/dist/components/question-flow/question-flow.d.ts +1 -1
- package/dist/components/question-flow/use-question-flow.d.ts +1 -1
- package/dist/components/question-flow/use-question-flow.js +1 -1
- package/dist/components/radar-chart/radar-chart.d.ts +6 -6
- package/dist/components/radar-chart/use-radar-chart.d.ts +1 -1
- package/dist/components/radar-chart/use-radar-chart.js +1 -1
- package/dist/components/radio-group/radio-group.d.ts +9 -1
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +44 -22
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/radio-group/use-radio-group.d.ts +1 -1
- package/dist/components/radio-group/use-radio-group.js +1 -1
- package/dist/components/rating/rating.d.ts +27 -1
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/rating/rating.js +56 -12
- package/dist/components/rating/rating.js.map +1 -1
- package/dist/components/rating/use-rating.d.ts +7 -2
- package/dist/components/rating/use-rating.d.ts.map +1 -1
- package/dist/components/rating/use-rating.js +7 -3
- package/dist/components/rating/use-rating.js.map +1 -1
- package/dist/components/reasoning/reasoning.d.ts +2 -2
- package/dist/components/reasoning/use-reasoning.d.ts +1 -1
- package/dist/components/reasoning/use-reasoning.js +1 -1
- package/dist/components/resizable/resizable.d.ts +1 -1
- package/dist/components/resizable/use-resizable.d.ts +1 -1
- package/dist/components/resizable/use-resizable.js +1 -1
- package/dist/components/sankey-chart/sankey-chart.d.ts +6 -6
- package/dist/components/sankey-chart/use-sankey-chart.d.ts +1 -1
- package/dist/components/sankey-chart/use-sankey-chart.js +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area/use-scroll-area.d.ts +1 -1
- package/dist/components/scroll-area/use-scroll-area.js +1 -1
- package/dist/components/scrollbar/scrollbar.d.ts +3 -3
- package/dist/components/scrollbar/use-scrollbar.d.ts +1 -1
- package/dist/components/scrollbar/use-scrollbar.js +1 -1
- package/dist/components/select/select.d.ts +33 -2
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +115 -49
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/use-select.d.ts +6 -1
- package/dist/components/select/use-select.d.ts.map +1 -1
- package/dist/components/select/use-select.js +4 -1
- package/dist/components/select/use-select.js.map +1 -1
- package/dist/components/separator/separator.d.ts +3 -2
- package/dist/components/separator/separator.d.ts.map +1 -1
- package/dist/components/separator/separator.js +12 -8
- package/dist/components/separator/separator.js.map +1 -1
- package/dist/components/side-nav/side-nav.d.ts +1 -1
- package/dist/components/side-nav/side-nav.js +1 -1
- package/dist/components/side-nav/use-side-nav.d.ts +1 -1
- package/dist/components/side-nav/use-side-nav.js +1 -1
- package/dist/components/signature-pad/signature-pad.d.ts +18 -1
- package/dist/components/signature-pad/signature-pad.d.ts.map +1 -1
- package/dist/components/signature-pad/signature-pad.js +57 -17
- package/dist/components/signature-pad/signature-pad.js.map +1 -1
- package/dist/components/signature-pad/use-signature-pad.d.ts +6 -1
- package/dist/components/signature-pad/use-signature-pad.d.ts.map +1 -1
- package/dist/components/signature-pad/use-signature-pad.js +6 -2
- package/dist/components/signature-pad/use-signature-pad.js.map +1 -1
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/components/skeleton/use-skeleton.js +1 -1
- package/dist/components/slider/slider.d.ts +27 -1
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/slider/slider.js +58 -9
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/slider/use-slider.d.ts +6 -1
- package/dist/components/slider/use-slider.d.ts.map +1 -1
- package/dist/components/slider/use-slider.js +6 -2
- package/dist/components/slider/use-slider.js.map +1 -1
- package/dist/components/sortable/sortable.d.ts +2 -2
- package/dist/components/sortable/use-sortable.d.ts +1 -1
- package/dist/components/sortable/use-sortable.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +1 -1
- package/dist/components/sparkline/use-sparkline.d.ts +1 -1
- package/dist/components/sparkline/use-sparkline.js +1 -1
- package/dist/components/spinner/spinner.d.ts +1 -1
- package/dist/components/spinner/use-spinner.js +1 -1
- package/dist/components/splitter/splitter.d.ts +1 -1
- package/dist/components/splitter/use-splitter.d.ts +1 -1
- package/dist/components/splitter/use-splitter.js +1 -1
- package/dist/components/statistic/context.d.ts +1 -1
- package/dist/components/statistic/statistic.d.ts +1 -1
- package/dist/components/statistic/statistic.js +1 -1
- package/dist/components/steps/steps.d.ts +1 -1
- package/dist/components/steps/use-steps.d.ts +1 -1
- package/dist/components/steps/use-steps.js +1 -1
- package/dist/components/switch/switch.d.ts +9 -1
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/switch/switch.js +30 -2
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/switch/use-switch.d.ts +1 -1
- package/dist/components/switch/use-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 +42 -9
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +28 -7
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/use-table.d.ts +4 -2
- package/dist/components/table/use-table.d.ts.map +1 -1
- package/dist/components/table/use-table.js +10 -5
- package/dist/components/table/use-table.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +16 -15
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/tabs/use-tabs.d.ts +1 -1
- package/dist/components/tabs/use-tabs.js +1 -1
- package/dist/components/tag/tag.d.ts +1 -1
- package/dist/components/tag/use-tag.d.ts +1 -1
- package/dist/components/tag/use-tag.js +1 -1
- package/dist/components/tag-group/context.d.ts +1 -1
- package/dist/components/tag-group/tag-group.d.ts +32 -2
- package/dist/components/tag-group/tag-group.d.ts.map +1 -1
- package/dist/components/tag-group/tag-group.js +55 -15
- package/dist/components/tag-group/tag-group.js.map +1 -1
- package/dist/components/tag-group/use-tag-group.d.ts +7 -2
- package/dist/components/tag-group/use-tag-group.d.ts.map +1 -1
- package/dist/components/tag-group/use-tag-group.js +7 -3
- package/dist/components/tag-group/use-tag-group.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +22 -1
- package/dist/components/tags-input/tags-input.d.ts.map +1 -1
- package/dist/components/tags-input/tags-input.js +66 -19
- package/dist/components/tags-input/tags-input.js.map +1 -1
- package/dist/components/tags-input/use-tags-input.d.ts +6 -1
- package/dist/components/tags-input/use-tags-input.d.ts.map +1 -1
- package/dist/components/tags-input/use-tags-input.js +6 -2
- package/dist/components/tags-input/use-tags-input.js.map +1 -1
- package/dist/components/text-field/text-field.d.ts +24 -2
- package/dist/components/text-field/text-field.d.ts.map +1 -1
- package/dist/components/text-field/text-field.js +60 -11
- package/dist/components/text-field/text-field.js.map +1 -1
- package/dist/components/text-field/use-text-field.d.ts +6 -1
- package/dist/components/text-field/use-text-field.d.ts.map +1 -1
- package/dist/components/text-field/use-text-field.js +7 -2
- package/dist/components/text-field/use-text-field.js.map +1 -1
- package/dist/components/time-field/time-field.d.ts +9 -1
- package/dist/components/time-field/time-field.d.ts.map +1 -1
- package/dist/components/time-field/time-field.js +7 -1
- package/dist/components/time-field/time-field.js.map +1 -1
- package/dist/components/time-field/use-time-field.d.ts +6 -1
- package/dist/components/time-field/use-time-field.d.ts.map +1 -1
- package/dist/components/time-field/use-time-field.js +10 -4
- package/dist/components/time-field/use-time-field.js.map +1 -1
- package/dist/components/time-picker/time-picker.d.ts +25 -1
- package/dist/components/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/time-picker/time-picker.js +48 -4
- package/dist/components/time-picker/time-picker.js.map +1 -1
- package/dist/components/time-picker/use-time-picker.d.ts +6 -1
- package/dist/components/time-picker/use-time-picker.d.ts.map +1 -1
- package/dist/components/time-picker/use-time-picker.js +4 -1
- package/dist/components/time-picker/use-time-picker.js.map +1 -1
- package/dist/components/time-range-picker/time-range-picker.d.ts +35 -1
- package/dist/components/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/components/time-range-picker/time-range-picker.js +47 -5
- package/dist/components/time-range-picker/time-range-picker.js.map +1 -1
- package/dist/components/time-range-picker/use-time-range-picker.d.ts +6 -1
- package/dist/components/time-range-picker/use-time-range-picker.d.ts.map +1 -1
- package/dist/components/time-range-picker/use-time-range-picker.js +4 -1
- package/dist/components/time-range-picker/use-time-range-picker.js.map +1 -1
- package/dist/components/timeline/context.d.ts +1 -1
- package/dist/components/timeline/timeline.d.ts +1 -1
- package/dist/components/timeline/timeline.js +1 -1
- package/dist/components/timer/timer.d.ts +1 -1
- package/dist/components/timer/use-timer.d.ts +1 -1
- package/dist/components/timer/use-timer.js +1 -1
- package/dist/components/timestamp/timestamp.d.ts +1 -1
- package/dist/components/timestamp/timestamp.js +1 -1
- package/dist/components/toggle/toggle.d.ts +1 -1
- package/dist/components/toggle/use-toggle.d.ts +1 -1
- package/dist/components/toggle/use-toggle.js +1 -1
- package/dist/components/toggle-group/toggle-group.d.ts +36 -1
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group/toggle-group.js +30 -9
- package/dist/components/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/toggle-group/use-toggle-group.d.ts +1 -1
- package/dist/components/toggle-group/use-toggle-group.js +1 -1
- package/dist/components/tool-call/tool-call.d.ts +1 -1
- package/dist/components/tool-call/tool-call.js +1 -1
- package/dist/components/tool-call/use-tool-call.d.ts +1 -1
- package/dist/components/tool-call/use-tool-call.js +1 -1
- package/dist/components/toolbar/toolbar.d.ts +13 -2
- package/dist/components/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/toolbar.js +7 -3
- package/dist/components/toolbar/toolbar.js.map +1 -1
- package/dist/components/toolbar/use-toolbar.d.ts +1 -1
- package/dist/components/toolbar/use-toolbar.js +1 -1
- package/dist/components/tooltip/context.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.ts +33 -2
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +33 -6
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/components/tooltip/use-tooltip.js +1 -1
- package/dist/components/tour/tour.d.ts +10 -2
- package/dist/components/tour/tour.d.ts.map +1 -1
- package/dist/components/tour/tour.js +13 -1
- package/dist/components/tour/tour.js.map +1 -1
- package/dist/components/tour/use-tour.d.ts +4 -1
- package/dist/components/tour/use-tour.d.ts.map +1 -1
- package/dist/components/tour/use-tour.js +14 -3
- package/dist/components/tour/use-tour.js.map +1 -1
- package/dist/components/transfer/transfer.d.ts +18 -1
- package/dist/components/transfer/transfer.d.ts.map +1 -1
- package/dist/components/transfer/transfer.js +65 -18
- package/dist/components/transfer/transfer.js.map +1 -1
- package/dist/components/transfer/use-transfer.d.ts +1 -1
- package/dist/components/transfer/use-transfer.js +1 -1
- package/dist/components/tree/tree.d.ts +12 -9
- package/dist/components/tree/tree.d.ts.map +1 -1
- package/dist/components/tree/tree.js +17 -6
- package/dist/components/tree/tree.js.map +1 -1
- package/dist/components/tree/use-tree.d.ts +7 -2
- package/dist/components/tree/use-tree.d.ts.map +1 -1
- package/dist/components/tree/use-tree.js +7 -3
- package/dist/components/tree/use-tree.js.map +1 -1
- package/dist/components/tree-select/tree-select.d.ts +19 -2
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/components/tree-select/tree-select.js +54 -35
- package/dist/components/tree-select/tree-select.js.map +1 -1
- package/dist/components/tree-select/use-tree-select.d.ts +6 -1
- package/dist/components/tree-select/use-tree-select.d.ts.map +1 -1
- package/dist/components/tree-select/use-tree-select.js +4 -1
- package/dist/components/tree-select/use-tree-select.js.map +1 -1
- package/dist/components/truncate/truncate.d.ts +2 -2
- package/dist/components/truncate/use-truncate.d.ts +1 -1
- package/dist/components/truncate/use-truncate.js +1 -1
- package/dist/components/typography/context.d.ts +1 -1
- package/dist/components/typography/typography.d.ts +1 -1
- package/dist/components/typography/typography.js +1 -1
- package/dist/components/virtualizer/use-virtualizer.d.ts +1 -1
- package/dist/components/virtualizer/use-virtualizer.js +1 -1
- package/dist/components/virtualizer/virtualizer.d.ts +10 -1
- package/dist/components/virtualizer/virtualizer.d.ts.map +1 -1
- package/dist/components/virtualizer/virtualizer.js +5 -1
- package/dist/components/virtualizer/virtualizer.js.map +1 -1
- package/dist/components/watermark/context.d.ts +1 -1
- package/dist/components/watermark/watermark.d.ts +1 -1
- package/dist/components/watermark/watermark.js +1 -1
- package/dist/config/config.d.ts +1 -1
- package/dist/config/config.js +2 -2
- package/dist/config/config.js.map +1 -1
- package/dist/index.d.ts +23 -15
- package/dist/index.js +36 -28
- package/dist/package.js +1 -1
- package/dist/runtime/live-props.js +27 -0
- package/dist/runtime/live-props.js.map +1 -0
- package/dist/runtime/merge-props.js +23 -3
- package/dist/runtime/merge-props.js.map +1 -1
- package/dist/runtime/structure.js +36 -0
- package/dist/runtime/structure.js.map +1 -0
- package/dist/runtime/title-description.d.ts +13 -0
- package/dist/runtime/title-description.d.ts.map +1 -0
- package/dist/runtime/title-description.js +47 -0
- package/dist/runtime/title-description.js.map +1 -0
- package/dist/runtime/use-scrollbars.js +1 -1
- package/dist/services/dialog-service.d.ts +1 -1
- package/dist/services/dialog-service.js +1 -1
- package/dist/services/loading-bar-service.d.ts +1 -1
- package/dist/services/loading-bar-service.js +1 -1
- package/dist/services/notification-service.d.ts +1 -1
- package/dist/services/notification-service.js +1 -1
- package/package.json +18 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PayloadOf } from "../../runtime/payload.js";
|
|
2
|
-
import { PropType, SlotsType, VNode } from "vue";
|
|
3
2
|
import { NotificationDedupe, NotificationItemApi, NotificationItemSchema, NotificationOptions, NotificationPlacement, NotificationPreset, NotificationRecord, NotificationSchema, NotificationTone, NotificationTranslations, ResolvedNotification } from "@xihan-ui/headless";
|
|
3
|
+
import { PropType, SlotsType, VNode } from "vue";
|
|
4
4
|
//#region src/components/notification/notification.d.ts
|
|
5
5
|
type NotificationProps = NotificationSchema['props'];
|
|
6
6
|
type NotificationItemProps = NotificationItemSchema['props'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","names":[],"sources":["../../../src/components/notification/notification.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"notification.d.ts","names":[],"sources":["../../../src/components/notification/notification.ts"],"mappings":";;;;KA4BK,oBAAoB;KACpB,wBAAwB;;UAGZ;EACf,OAAO;EACP,YAAY;EACZ;EACA,sBAAsB,WAAW,0BAA0B;EAC3D,SAAS,UAAU;EACnB,SAAS,YAAY,SAAS,QAAQ;EACtC,UAAU;EACV;;cAGW,kCAAkB,8BAAA;;IAIH,MAAA,SAAS;;;IACF,MAAA,SAAS;;;IACd,MAAA,SAAS;;;IACN,MAAA,SAAS;;;;;;IAEZ,MAAA,SAAS;;;;;;;;;;;;;;;;;IAKH,MAAA,SAAS,QAAQ;;;;;EAItB,iBAAA,UAAA,UAAU;EACZ,iBAAA,QAAA,UAAU;;;IAfX,MAAA,SAAS;;;IACF,MAAA,SAAS;;;IACd,MAAA,SAAS;;;IACN,MAAA,SAAS;;;;;;IAEZ,MAAA,SAAS;;;;;;;;;;;;;;;;;IAKH,MAAA,SAAS,QAAQ;;;;;;;;;EAQvC,WAAC,OAAO,8BAA8B;kCAqBlD;;UAGe;EACf,MAAM;;cAGK,mCAAmB,8BAAA;;IAIC,MAAA,SAAS;;;;;;IAAT,MAAA,SAAS;;;EAG5B,WAAC,OAAO,+BAA+B;kCAkBnD;;UAGe;EACf,MAAM;;;cAIK,kCAAkB,8BAAA;;;;;IAMD,MAAA,SAAS;;;;;;;;;IAGX,MAAA,SAAS;;;;;;;;;;;;;;;;;;;;;;IAOD,MAAA,SAAS,QAAQ;;;;;EAIrB,kBAAA,UAAA,UAAU;EACjB,SAAA,UAAA,UAAU;;;;;;IAfL,MAAA,SAAS;;;;;;;;;IAGX,MAAA,SAAS;;;;;;;;;;;;;;;;;;;;;;IAOD,MAAA,SAAS,QAAQ;;;;;;;;;;;EAQvC,WAAC,OAAO,8BAA8B;kCAelD;;cAGW,2CAA2B,0BAAA,oBAAA,4BAAA;;8BAMtC,qCAAA,iDAAA,aAAA,eAAA,oDAAA;;cAGW,yCAAyB,0BAAA,oBAAA,4BAAA;;8BAMpC,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,uCAAuB,0BAAA,oBAAA,4BAAA;;8BAYlC,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,6CAA6B,0BAAA,oBAAA,4BAAA;;8BAYxC,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,+CAA+B,0BAAA,oBAAA,4BAAA;;8BAO1C,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,0CAA0B,0BAAA,oBAAA,4BAAA;;8BAMrC,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,8CAA8B,0BAAA,oBAAA,4BAAA;;8BAMzC,qCAAA,iDAAA,aAAA,eAAA,oDAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { withXhConfig } from "../../config/config.js";
|
|
2
|
+
import { useDescriptionPart, useTitleDescriptionPart } from "../../runtime/title-description.js";
|
|
2
3
|
import { provideNotification, provideNotificationItem, useNotificationContext, useNotificationItemContext } from "./context.js";
|
|
3
4
|
import { useNotification, useNotificationItem } from "./use-notification.js";
|
|
4
5
|
import { Fragment, defineComponent, h } from "vue";
|
|
@@ -128,6 +129,7 @@ const XhNotificationItemTitle = defineComponent({
|
|
|
128
129
|
name: "XhNotificationItemTitle",
|
|
129
130
|
setup(_, { slots }) {
|
|
130
131
|
const ctx = useNotificationItemContext();
|
|
132
|
+
useTitleDescriptionPart(ctx.presence, "title");
|
|
131
133
|
return () => h("div", ctx.api.value.getItemTitleProps(), slots.default?.() ?? ctx.api.value.title);
|
|
132
134
|
}
|
|
133
135
|
});
|
|
@@ -135,7 +137,11 @@ const XhNotificationItemDescription = defineComponent({
|
|
|
135
137
|
name: "XhNotificationItemDescription",
|
|
136
138
|
setup(_, { slots }) {
|
|
137
139
|
const ctx = useNotificationItemContext();
|
|
138
|
-
|
|
140
|
+
const el = useDescriptionPart(ctx.presence);
|
|
141
|
+
return () => h("div", {
|
|
142
|
+
...ctx.api.value.getItemDescriptionProps(),
|
|
143
|
+
ref: el
|
|
144
|
+
}, slots.default?.() ?? ctx.api.value.description);
|
|
139
145
|
}
|
|
140
146
|
});
|
|
141
147
|
const XhNotificationItemActionTrigger = defineComponent({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","names":[],"sources":["../../../src/components/notification/notification.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// 提供 notification 相关实现。\n\nimport type {\n NotificationDedupe,\n NotificationItemApi,\n NotificationItemSchema,\n NotificationOptions,\n NotificationPlacement,\n NotificationPreset,\n NotificationRecord,\n NotificationSchema,\n NotificationTone,\n NotificationTranslations,\n ResolvedNotification,\n} from '@xihan-ui/headless'\nimport type { PropType, SlotsType, VNode } from 'vue'\nimport type { PayloadOf } from '../../runtime/payload'\nimport { defineComponent, Fragment, h } from 'vue'\nimport { withXhConfig } from '../../config/config'\nimport { provideNotification, provideNotificationItem, useNotificationContext, useNotificationItemContext } from './context'\nimport { useNotification, useNotificationItem } from './use-notification'\n\ntype NotificationProps = NotificationSchema['props']\ntype NotificationItemProps = NotificationItemSchema['props']\n\n/** 默认插槽的载荷:当前可见的通知队列与它的落位分组,以及入队、改写、关闭的命令。 */\nexport interface NotificationRootSlotProps {\n items: ResolvedNotification[]\n placements: NotificationPlacement[]\n count: number\n getItemsByPlacement: (placement: NotificationPlacement) => ResolvedNotification[]\n create: (options?: NotificationOptions) => string\n update: (id: string, options: Partial<NotificationOptions>) => void\n dismiss: (id: string) => void\n dismissAll: () => void\n}\n\nexport const XhNotificationRoot = defineComponent({\n name: 'XhNotificationRoot',\n // 缺省值由 connect 决定;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n items: { type: Array as PropType<NotificationRecord[]> },\n defaultItems: { type: Array as PropType<NotificationRecord[]> },\n preset: { type: String as PropType<NotificationPreset> },\n placement: { type: String as PropType<NotificationPlacement> },\n max: { type: Number },\n dedupe: { type: String as PropType<NotificationDedupe> },\n gap: { type: Number },\n duration: { type: Number },\n stacked: { type: Boolean, default: undefined },\n pauseOnPageIdle: { type: Boolean, default: undefined },\n translations: { type: Object as PropType<Partial<NotificationTranslations>> },\n },\n // items-change 携带 { items },update:items 携带裸队列以支持 v-model:items\n emits: {\n 'items-change': (_details: PayloadOf<NotificationProps, 'onItemsChange'>) => true,\n 'update:items': (_items: PayloadOf<NotificationProps, 'onItemsChange'>['items']) => true,\n },\n slots: Object as SlotsType<{\n default?: (props: NotificationRootSlotProps) => VNode[]\n }>,\n setup(props, { slots, emit }) {\n const notify: NotificationProps['onItemsChange'] = (details) => {\n emit('items-change', details)\n emit('update:items', details.items)\n }\n const ctx = useNotification(withXhConfig('notification', props) as NotificationProps, notify)\n provideNotification(ctx)\n // 根节点是地标容器,插槽作用域里一并暴露队列与增删改命令\n return () => h('div', { ...ctx.api.value.getRootProps() as Record<string, unknown>, ref: ctx.rootRef }, slots.default?.({\n items: ctx.api.value.visibleNotifications,\n placements: ctx.api.value.placements,\n count: ctx.api.value.count,\n getItemsByPlacement: ctx.api.value.getItemsByPlacement,\n create: ctx.create,\n update: ctx.update,\n dismiss: ctx.dismiss,\n dismissAll: ctx.dismissAll,\n }))\n },\n})\n\n/** 默认插槽的载荷:该组中逐条铺开的通知。 */\nexport interface NotificationGroupSlotProps {\n item: ResolvedNotification\n}\n\nexport const XhNotificationGroup = defineComponent({\n name: 'XhNotificationGroup',\n props: {\n // 不写就用 notification 的 placement;写了就只收这个位置上的条目\n placement: { type: String as PropType<NotificationPlacement> },\n },\n slots: Object as SlotsType<{\n default?: (props: NotificationGroupSlotProps) => VNode[]\n }>,\n setup(props, { slots }) {\n const ctx = useNotificationContext()\n return () => {\n const api = ctx.api.value\n const groupProps = api.getGroupProps({ placement: props.placement }) as Record<string, unknown>\n // 落位从 group 自己的产出里读回,不在这边重算缺省\n const placement = groupProps['data-placement'] as NotificationPlacement\n const list = api.getItemsByPlacement(placement)\n // 每条通知按队列身份 id 给 key,避免节点被就地复用\n return h(\n 'div',\n groupProps,\n slots.default ? list.map(item => h(Fragment, { key: item.id }, slots.default!({ item }))) : undefined,\n )\n }\n },\n})\n\n/** 默认插槽的载荷:该卡片自己的 api。 */\nexport interface NotificationItemSlotProps {\n item: NotificationItemApi\n}\n\n/** 单条卡片:到期自行消失的一条消息,计时、暂停、按压与退场都在它自己身上。 */\nexport const XhNotificationItem = defineComponent({\n name: 'XhNotificationItem',\n // 缺省值由 connect 决定;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n // 队列身份,不是 DOM id;不给则回落到实例的 scope id\n id: { type: String },\n preset: { type: String as PropType<NotificationPreset> },\n title: { type: String },\n description: { type: String },\n tone: { type: String as PropType<NotificationTone> },\n loading: { type: Boolean, default: undefined },\n duration: { type: Number },\n closable: { type: Boolean, default: undefined },\n pauseOnPageIdle: { type: Boolean, default: undefined },\n // 由宿主整摞一起按住计时;与指针、焦点那几路并存,最后一个松开才继续走\n paused: { type: Boolean, default: undefined },\n translations: { type: Object as PropType<Partial<NotificationTranslations>> },\n },\n // status-change 携带 { id, status },action 携带 { id }\n emits: {\n 'status-change': (_details: PayloadOf<NotificationItemProps, 'onStatusChange'>) => true,\n 'action': (_details: PayloadOf<NotificationItemProps, 'onAction'>) => true,\n },\n slots: Object as SlotsType<{\n default?: (props: NotificationItemSlotProps) => VNode[]\n }>,\n setup(props, { slots, emit }) {\n const ctx = useNotificationItem(\n withXhConfig('notification', props) as NotificationItemProps,\n details => emit('status-change', details),\n details => emit('action', details),\n )\n provideNotificationItem(ctx)\n return () => h(\n 'div',\n { ...ctx.api.value.getItemProps() as Record<string, unknown>, ref: ctx.rootRef },\n slots.default?.({ item: ctx.api.value }),\n )\n },\n})\n\n/** 语气指示符。作者未写内容时由皮肤按 data-tone 绘制兜底字形,data-loading 时换为加载环。 */\nexport const XhNotificationItemIndicator = defineComponent({\n name: 'XhNotificationItemIndicator',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n return () => h('span', ctx.api.value.getItemIndicatorProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\n/** 标题与说明的文本列。 */\nexport const XhNotificationItemContent = defineComponent({\n name: 'XhNotificationItemContent',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n return () => h('div', ctx.api.value.getItemContentProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNotificationItemTitle = defineComponent({\n name: 'XhNotificationItemTitle',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n // 作者没写内容就用队列里那条记录的标题\n return () => h(\n 'div',\n ctx.api.value.getItemTitleProps() as Record<string, unknown>,\n slots.default?.() ?? ctx.api.value.title,\n )\n },\n})\n\nexport const XhNotificationItemDescription = defineComponent({\n name: 'XhNotificationItemDescription',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n return () => h(\n 'div',\n ctx.api.value.getItemDescriptionProps() as Record<string, unknown>,\n slots.default?.() ?? ctx.api.value.description,\n )\n },\n})\n\nexport const XhNotificationItemActionTrigger = defineComponent({\n name: 'XhNotificationItemActionTrigger',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n // 原生 <button>,激活行为交给平台\n return () => h('button', ctx.api.value.getItemActionTriggerProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNotificationItemProgress = defineComponent({\n name: 'XhNotificationItemProgress',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n return () => h('div', ctx.api.value.getItemProgressProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNotificationItemCloseTrigger = defineComponent({\n name: 'XhNotificationItemCloseTrigger',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n return () => h('button', ctx.api.value.getItemCloseTriggerProps() as Record<string, unknown>, slots.default?.())\n },\n})\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"notification.js","names":[],"sources":["../../../src/components/notification/notification.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// 提供 notification 相关实现。\n\nimport type {\n NotificationDedupe,\n NotificationItemApi,\n NotificationItemSchema,\n NotificationOptions,\n NotificationPlacement,\n NotificationPreset,\n NotificationRecord,\n NotificationSchema,\n NotificationTone,\n NotificationTranslations,\n ResolvedNotification,\n} from '@xihan-ui/headless'\nimport type { PropType, SlotsType, VNode } from 'vue'\nimport type { PayloadOf } from '../../runtime/payload'\nimport { defineComponent, Fragment, h } from 'vue'\nimport { withXhConfig } from '../../config/config'\nimport { useDescriptionPart, useTitleDescriptionPart } from '../../runtime/title-description'\nimport { provideNotification, provideNotificationItem, useNotificationContext, useNotificationItemContext } from './context'\nimport { useNotification, useNotificationItem } from './use-notification'\n\ntype NotificationProps = NotificationSchema['props']\ntype NotificationItemProps = NotificationItemSchema['props']\n\n/** 默认插槽的载荷:当前可见的通知队列与它的落位分组,以及入队、改写、关闭的命令。 */\nexport interface NotificationRootSlotProps {\n items: ResolvedNotification[]\n placements: NotificationPlacement[]\n count: number\n getItemsByPlacement: (placement: NotificationPlacement) => ResolvedNotification[]\n create: (options?: NotificationOptions) => string\n update: (id: string, options: Partial<NotificationOptions>) => void\n dismiss: (id: string) => void\n dismissAll: () => void\n}\n\nexport const XhNotificationRoot = defineComponent({\n name: 'XhNotificationRoot',\n // 缺省值由 connect 决定;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n items: { type: Array as PropType<NotificationRecord[]> },\n defaultItems: { type: Array as PropType<NotificationRecord[]> },\n preset: { type: String as PropType<NotificationPreset> },\n placement: { type: String as PropType<NotificationPlacement> },\n max: { type: Number },\n dedupe: { type: String as PropType<NotificationDedupe> },\n gap: { type: Number },\n duration: { type: Number },\n stacked: { type: Boolean, default: undefined },\n pauseOnPageIdle: { type: Boolean, default: undefined },\n translations: { type: Object as PropType<Partial<NotificationTranslations>> },\n },\n // items-change 携带 { items },update:items 携带裸队列以支持 v-model:items\n emits: {\n 'items-change': (_details: PayloadOf<NotificationProps, 'onItemsChange'>) => true,\n 'update:items': (_items: PayloadOf<NotificationProps, 'onItemsChange'>['items']) => true,\n },\n slots: Object as SlotsType<{\n default?: (props: NotificationRootSlotProps) => VNode[]\n }>,\n setup(props, { slots, emit }) {\n const notify: NotificationProps['onItemsChange'] = (details) => {\n emit('items-change', details)\n emit('update:items', details.items)\n }\n const ctx = useNotification(withXhConfig('notification', props) as NotificationProps, notify)\n provideNotification(ctx)\n // 根节点是地标容器,插槽作用域里一并暴露队列与增删改命令\n return () => h('div', { ...ctx.api.value.getRootProps() as Record<string, unknown>, ref: ctx.rootRef }, slots.default?.({\n items: ctx.api.value.visibleNotifications,\n placements: ctx.api.value.placements,\n count: ctx.api.value.count,\n getItemsByPlacement: ctx.api.value.getItemsByPlacement,\n create: ctx.create,\n update: ctx.update,\n dismiss: ctx.dismiss,\n dismissAll: ctx.dismissAll,\n }))\n },\n})\n\n/** 默认插槽的载荷:该组中逐条铺开的通知。 */\nexport interface NotificationGroupSlotProps {\n item: ResolvedNotification\n}\n\nexport const XhNotificationGroup = defineComponent({\n name: 'XhNotificationGroup',\n props: {\n // 不写就用 notification 的 placement;写了就只收这个位置上的条目\n placement: { type: String as PropType<NotificationPlacement> },\n },\n slots: Object as SlotsType<{\n default?: (props: NotificationGroupSlotProps) => VNode[]\n }>,\n setup(props, { slots }) {\n const ctx = useNotificationContext()\n return () => {\n const api = ctx.api.value\n const groupProps = api.getGroupProps({ placement: props.placement }) as Record<string, unknown>\n // 落位从 group 自己的产出里读回,不在这边重算缺省\n const placement = groupProps['data-placement'] as NotificationPlacement\n const list = api.getItemsByPlacement(placement)\n // 每条通知按队列身份 id 给 key,避免节点被就地复用\n return h(\n 'div',\n groupProps,\n slots.default ? list.map(item => h(Fragment, { key: item.id }, slots.default!({ item }))) : undefined,\n )\n }\n },\n})\n\n/** 默认插槽的载荷:该卡片自己的 api。 */\nexport interface NotificationItemSlotProps {\n item: NotificationItemApi\n}\n\n/** 单条卡片:到期自行消失的一条消息,计时、暂停、按压与退场都在它自己身上。 */\nexport const XhNotificationItem = defineComponent({\n name: 'XhNotificationItem',\n // 缺省值由 connect 决定;普通类型省略 default,Boolean 显式保留 undefined\n props: {\n // 队列身份,不是 DOM id;不给则回落到实例的 scope id\n id: { type: String },\n preset: { type: String as PropType<NotificationPreset> },\n title: { type: String },\n description: { type: String },\n tone: { type: String as PropType<NotificationTone> },\n loading: { type: Boolean, default: undefined },\n duration: { type: Number },\n closable: { type: Boolean, default: undefined },\n pauseOnPageIdle: { type: Boolean, default: undefined },\n // 由宿主整摞一起按住计时;与指针、焦点那几路并存,最后一个松开才继续走\n paused: { type: Boolean, default: undefined },\n translations: { type: Object as PropType<Partial<NotificationTranslations>> },\n },\n // status-change 携带 { id, status },action 携带 { id }\n emits: {\n 'status-change': (_details: PayloadOf<NotificationItemProps, 'onStatusChange'>) => true,\n 'action': (_details: PayloadOf<NotificationItemProps, 'onAction'>) => true,\n },\n slots: Object as SlotsType<{\n default?: (props: NotificationItemSlotProps) => VNode[]\n }>,\n setup(props, { slots, emit }) {\n const ctx = useNotificationItem(\n withXhConfig('notification', props) as NotificationItemProps,\n details => emit('status-change', details),\n details => emit('action', details),\n )\n provideNotificationItem(ctx)\n return () => h(\n 'div',\n { ...ctx.api.value.getItemProps() as Record<string, unknown>, ref: ctx.rootRef },\n slots.default?.({ item: ctx.api.value }),\n )\n },\n})\n\n/** 语气指示符。作者未写内容时由皮肤按 data-tone 绘制兜底字形,data-loading 时换为加载环。 */\nexport const XhNotificationItemIndicator = defineComponent({\n name: 'XhNotificationItemIndicator',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n return () => h('span', ctx.api.value.getItemIndicatorProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\n/** 标题与说明的文本列。 */\nexport const XhNotificationItemContent = defineComponent({\n name: 'XhNotificationItemContent',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n return () => h('div', ctx.api.value.getItemContentProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNotificationItemTitle = defineComponent({\n name: 'XhNotificationItemTitle',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n useTitleDescriptionPart(ctx.presence, 'title')\n // 作者没写内容就用队列里那条记录的标题\n return () => h(\n 'div',\n ctx.api.value.getItemTitleProps() as Record<string, unknown>,\n slots.default?.() ?? ctx.api.value.title,\n )\n },\n})\n\nexport const XhNotificationItemDescription = defineComponent({\n name: 'XhNotificationItemDescription',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n // 读不出一句话的说明不进描述链:记录没写 description 时它是空的\n const el = useDescriptionPart(ctx.presence)\n return () => h(\n 'div',\n { ...ctx.api.value.getItemDescriptionProps() as Record<string, unknown>, ref: el },\n slots.default?.() ?? ctx.api.value.description,\n )\n },\n})\n\nexport const XhNotificationItemActionTrigger = defineComponent({\n name: 'XhNotificationItemActionTrigger',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n // 原生 <button>,激活行为交给平台\n return () => h('button', ctx.api.value.getItemActionTriggerProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNotificationItemProgress = defineComponent({\n name: 'XhNotificationItemProgress',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n return () => h('div', ctx.api.value.getItemProgressProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNotificationItemCloseTrigger = defineComponent({\n name: 'XhNotificationItemCloseTrigger',\n setup(_, { slots }) {\n const ctx = useNotificationItemContext()\n return () => h('button', ctx.api.value.getItemCloseTriggerProps() as Record<string, unknown>, slots.default?.())\n },\n})\n"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NotificationContext, NotificationItemContext } from "./context.js";
|
|
2
|
-
import { MaybeRefOrGetter } from "vue";
|
|
3
2
|
import { NotificationItemSchema, NotificationSchema } from "@xihan-ui/headless";
|
|
3
|
+
import { MaybeRefOrGetter } from "vue";
|
|
4
4
|
//#region src/components/notification/use-notification.d.ts
|
|
5
5
|
/** props 接收 ref/getter 时每帧现取,文案等值可以在运行期更换。 */
|
|
6
6
|
declare function useNotification(props: MaybeRefOrGetter<NotificationSchema['props']>, onItemsChange?: NotificationSchema['props']['onItemsChange']): NotificationContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-notification.d.ts","names":[],"sources":["../../../src/components/notification/use-notification.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"use-notification.d.ts","names":[],"sources":["../../../src/components/notification/use-notification.ts"],"mappings":";;;;;iBAmBgB,gBACd,OAAO,iBAAiB,8BACxB,gBAAgB,+CACf;;;;;iBAqBa,oBACd,OAAO,iCACP,iBAAiB,mDACjB,WAAW,8CACV"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { vueNormalize } from "../../runtime/normalize-props.js";
|
|
2
2
|
import { useMachine } from "../../runtime/use-machine.js";
|
|
3
|
+
import { useTitleDescriptionPresence } from "../../runtime/title-description.js";
|
|
3
4
|
import { useNotificationContextOptional } from "./context.js";
|
|
4
5
|
import { useNotificationItemExit } from "./use-item-exit.js";
|
|
5
|
-
import { computed, ref, toValue } from "vue";
|
|
6
6
|
import { connectNotification, connectNotificationItem, notificationItemMachine, notificationMachine } from "@xihan-ui/headless";
|
|
7
|
+
import { computed, ref, toValue } from "vue";
|
|
7
8
|
//#region src/components/notification/use-notification.ts
|
|
8
9
|
/** props 接收 ref/getter 时每帧现取,文案等值可以在运行期更换。 */
|
|
9
10
|
function useNotification(props, onItemsChange) {
|
|
@@ -33,8 +34,10 @@ function useNotificationItem(props, onStatusChange, onAction) {
|
|
|
33
34
|
onStatusChange?.(details);
|
|
34
35
|
if (details.status === "unmounted") queue?.dismiss(details.id);
|
|
35
36
|
};
|
|
37
|
+
const presence = useTitleDescriptionPresence();
|
|
36
38
|
const service = useMachine(notificationItemMachine, () => ({
|
|
37
39
|
...props,
|
|
40
|
+
parts: presence.parts.value,
|
|
38
41
|
onStatusChange: notifyStatus,
|
|
39
42
|
onAction
|
|
40
43
|
}));
|
|
@@ -48,7 +51,8 @@ function useNotificationItem(props, onStatusChange, onAction) {
|
|
|
48
51
|
});
|
|
49
52
|
return {
|
|
50
53
|
api,
|
|
51
|
-
rootRef
|
|
54
|
+
rootRef,
|
|
55
|
+
presence
|
|
52
56
|
};
|
|
53
57
|
}
|
|
54
58
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-notification.js","names":[],"sources":["../../../src/components/notification/use-notification.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 notification 相关实现。\n\nimport type { NotificationItemSchema, NotificationSchema } from '@xihan-ui/headless'\nimport type { MaybeRefOrGetter } from 'vue'\nimport type { NotificationContext, NotificationItemContext } from './context'\nimport { connectNotification, connectNotificationItem, notificationItemMachine, notificationMachine } from '@xihan-ui/headless'\nimport { computed, ref, toValue } from 'vue'\nimport { vueNormalize } from '../../runtime/normalize-props'\nimport { useMachine } from '../../runtime/use-machine'\nimport { useNotificationContextOptional } from './context'\nimport { useNotificationItemExit } from './use-item-exit'\n\n/** props 接收 ref/getter 时每帧现取,文案等值可以在运行期更换。 */\nexport function useNotification(\n props: MaybeRefOrGetter<NotificationSchema['props']>,\n onItemsChange?: NotificationSchema['props']['onItemsChange'],\n): NotificationContext {\n const service = useMachine(notificationMachine, () => ({ ...toValue(props), onItemsChange }))\n const api = computed(() => connectNotification(service, vueNormalize))\n const rootRef = ref<HTMLElement | null>(null)\n // 传 getter 而非节点本身,ref 在挂载后才有值\n service.refs.set('getRootEl', () => rootRef.value)\n // 四个命令在顶层摊平,函数身份稳定,可解构后随时调用且不读取队列\n return {\n api,\n rootRef,\n create: options => api.value.create(options),\n update: (id, options) => api.value.update(id, options),\n dismiss: id => api.value.dismiss(id),\n dismissAll: () => api.value.dismissAll(),\n }\n}\n\n/**\n * 单条卡片:计时、暂停、按压与退场都在它自己的机器上。\n * 退场完成后由这里通知队列删除记录:队列在外层,卡片自身不知道它。\n */\nexport function useNotificationItem(\n props: NotificationItemSchema['props'],\n onStatusChange?: NotificationItemSchema['props']['onStatusChange'],\n onAction?: NotificationItemSchema['props']['onAction'],\n): NotificationItemContext {\n const queue = useNotificationContextOptional()\n const notifyStatus: NotificationItemSchema['props']['onStatusChange'] = (details) => {\n onStatusChange?.(details)\n if (details.status === 'unmounted')\n queue?.dismiss(details.id)\n }\n const service = useMachine(notificationItemMachine, () => ({ ...props, onStatusChange: notifyStatus, onAction }))\n const api = computed(() => connectNotificationItem(service, vueNormalize))\n const rootRef = ref<HTMLElement | null>(null)\n // 传 getter 而非节点本身,ref 在挂载后才有值;叠摞展开的追踪从它找所在的那一摞\n service.refs.set('getRootEl', () => rootRef.value)\n useNotificationItemExit({ service, isOpen: () => api.value.status === 'visible', rootRef })\n return { api, rootRef }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-notification.js","names":[],"sources":["../../../src/components/notification/use-notification.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 notification 相关实现。\n\nimport type { NotificationItemSchema, NotificationSchema } from '@xihan-ui/headless'\nimport type { MaybeRefOrGetter } from 'vue'\nimport type { NotificationContext, NotificationItemContext } from './context'\nimport { connectNotification, connectNotificationItem, notificationItemMachine, notificationMachine } from '@xihan-ui/headless'\nimport { computed, ref, toValue } from 'vue'\nimport { vueNormalize } from '../../runtime/normalize-props'\nimport { useTitleDescriptionPresence } from '../../runtime/title-description'\nimport { useMachine } from '../../runtime/use-machine'\nimport { useNotificationContextOptional } from './context'\nimport { useNotificationItemExit } from './use-item-exit'\n\n/** props 接收 ref/getter 时每帧现取,文案等值可以在运行期更换。 */\nexport function useNotification(\n props: MaybeRefOrGetter<NotificationSchema['props']>,\n onItemsChange?: NotificationSchema['props']['onItemsChange'],\n): NotificationContext {\n const service = useMachine(notificationMachine, () => ({ ...toValue(props), onItemsChange }))\n const api = computed(() => connectNotification(service, vueNormalize))\n const rootRef = ref<HTMLElement | null>(null)\n // 传 getter 而非节点本身,ref 在挂载后才有值\n service.refs.set('getRootEl', () => rootRef.value)\n // 四个命令在顶层摊平,函数身份稳定,可解构后随时调用且不读取队列\n return {\n api,\n rootRef,\n create: options => api.value.create(options),\n update: (id, options) => api.value.update(id, options),\n dismiss: id => api.value.dismiss(id),\n dismissAll: () => api.value.dismissAll(),\n }\n}\n\n/**\n * 单条卡片:计时、暂停、按压与退场都在它自己的机器上。\n * 退场完成后由这里通知队列删除记录:队列在外层,卡片自身不知道它。\n */\nexport function useNotificationItem(\n props: NotificationItemSchema['props'],\n onStatusChange?: NotificationItemSchema['props']['onStatusChange'],\n onAction?: NotificationItemSchema['props']['onAction'],\n): NotificationItemContext {\n const queue = useNotificationContextOptional()\n const notifyStatus: NotificationItemSchema['props']['onStatusChange'] = (details) => {\n onStatusChange?.(details)\n if (details.status === 'unmounted')\n queue?.dismiss(details.id)\n }\n const presence = useTitleDescriptionPresence()\n const service = useMachine(notificationItemMachine, () => ({ ...props, parts: presence.parts.value, onStatusChange: notifyStatus, onAction }))\n const api = computed(() => connectNotificationItem(service, vueNormalize))\n const rootRef = ref<HTMLElement | null>(null)\n // 传 getter 而非节点本身,ref 在挂载后才有值;叠摞展开的追踪从它找所在的那一摞\n service.refs.set('getRootEl', () => rootRef.value)\n useNotificationItemExit({ service, isOpen: () => api.value.status === 'visible', rootRef })\n return { api, rootRef, presence }\n}\n"],"mappings":";;;;;;;;;AAmBA,SAAgB,gBACd,OACA,eACqB;CACrB,MAAM,UAAU,WAAW,4BAA4B;EAAE,GAAG,QAAQ,KAAK;EAAG;CAAc,EAAE;CAC5F,MAAM,MAAM,eAAe,oBAAoB,SAAS,YAAY,CAAC;CACrE,MAAM,UAAU,IAAwB,IAAI;CAE5C,QAAQ,KAAK,IAAI,mBAAmB,QAAQ,KAAK;CAEjD,OAAO;EACL;EACA;EACA,SAAQ,YAAW,IAAI,MAAM,OAAO,OAAO;EAC3C,SAAS,IAAI,YAAY,IAAI,MAAM,OAAO,IAAI,OAAO;EACrD,UAAS,OAAM,IAAI,MAAM,QAAQ,EAAE;EACnC,kBAAkB,IAAI,MAAM,WAAW;CACzC;AACF;;;;;AAMA,SAAgB,oBACd,OACA,gBACA,UACyB;CACzB,MAAM,QAAQ,+BAA+B;CAC7C,MAAM,gBAAmE,YAAY;EACnF,iBAAiB,OAAO;EACxB,IAAI,QAAQ,WAAW,aACrB,OAAO,QAAQ,QAAQ,EAAE;CAC7B;CACA,MAAM,WAAW,4BAA4B;CAC7C,MAAM,UAAU,WAAW,gCAAgC;EAAE,GAAG;EAAO,OAAO,SAAS,MAAM;EAAO,gBAAgB;EAAc;CAAS,EAAE;CAC7I,MAAM,MAAM,eAAe,wBAAwB,SAAS,YAAY,CAAC;CACzE,MAAM,UAAU,IAAwB,IAAI;CAE5C,QAAQ,KAAK,IAAI,mBAAmB,QAAQ,KAAK;CACjD,wBAAwB;EAAE;EAAS,cAAc,IAAI,MAAM,WAAW;EAAW;CAAQ,CAAC;CAC1F,OAAO;EAAE;EAAK;EAAS;CAAS;AAClC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PayloadOf } from "../../runtime/payload.js";
|
|
2
|
+
import { NumberAnimationApi, NumberAnimationCompleteDetails, NumberAnimationEasing, NumberAnimationFormatOptions, NumberAnimationLive, NumberAnimationSchema } from "@xihan-ui/headless";
|
|
2
3
|
import { PropType, SlotsType, VNode } from "vue";
|
|
3
4
|
import { Size, Tone } from "@xihan-ui/core";
|
|
4
|
-
import { NumberAnimationApi, NumberAnimationCompleteDetails, NumberAnimationEasing, NumberAnimationFormatOptions, NumberAnimationLive, NumberAnimationSchema } from "@xihan-ui/headless";
|
|
5
5
|
//#region src/components/number-animation/number-animation.d.ts
|
|
6
6
|
type NumberAnimationProps = NumberAnimationSchema['props'];
|
|
7
7
|
/** 默认插槽的载荷:当前帧的数值,以及它按 locale、precision、separator 与 formatOptions 格式化后的文本。 */
|
|
@@ -2,9 +2,9 @@ import { vueNormalize } from "../../runtime/normalize-props.js";
|
|
|
2
2
|
import { useMachine } from "../../runtime/use-machine.js";
|
|
3
3
|
import { createVueIdGenerator } from "../../runtime/vue-id.js";
|
|
4
4
|
import { slotPaints } from "../../runtime/slot-content.js";
|
|
5
|
+
import { connectNumberAnimation, numberAnimationMachine } from "@xihan-ui/headless";
|
|
5
6
|
import { computed, defineComponent, h } from "vue";
|
|
6
7
|
import { createScope } from "@xihan-ui/core";
|
|
7
|
-
import { connectNumberAnimation, numberAnimationMachine } from "@xihan-ui/headless";
|
|
8
8
|
//#region src/components/number-animation/number-animation.ts
|
|
9
9
|
/**
|
|
10
10
|
* 一段自动变化的数字:从 from 补间到 to,逐帧计算值,格式化后写入根中。
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { PayloadOf } from "../../runtime/payload.js";
|
|
2
|
+
import { NumberFieldApi, NumberFieldSchema } from "@xihan-ui/headless";
|
|
2
3
|
import { PropType, SlotsType, VNode } from "vue";
|
|
3
4
|
import { ControlVariant, Size, Tone } from "@xihan-ui/core";
|
|
4
|
-
import { NumberFieldApi, NumberFieldSchema } from "@xihan-ui/headless";
|
|
5
5
|
//#region src/components/number-field/number-field.d.ts
|
|
6
6
|
type NumberFieldProps = NumberFieldSchema['props'];
|
|
7
7
|
/** 默认插槽的载荷:原始输入串与其数值、增减是否仍可进行,以及写值、增减的命令。 */
|
|
8
8
|
type NumberFieldRootSlotProps = Pick<NumberFieldApi, 'value' | 'valueAsNumber' | 'empty' | 'canIncrement' | 'canDecrement' | 'outOfRange' | 'setValue' | 'increment' | 'decrement'>;
|
|
9
9
|
declare const XhNumberFieldRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
/** 不显示出来的名字,写成 aria-label 落在与字段标签同一个部件上;放进字段或渲染了 label 部件时以它们为准。 */
|
|
11
|
+
ariaLabel: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
};
|
|
14
|
+
/** 标题文字。不写默认插槽时铺 label 部件;需要放置其他内容时改用 label 插槽。 */
|
|
15
|
+
label: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
10
18
|
value: {
|
|
11
19
|
type: StringConstructor;
|
|
12
20
|
};
|
|
@@ -44,6 +52,9 @@ declare const XhNumberFieldRoot: import("vue").DefineComponent<import("vue").Ext
|
|
|
44
52
|
name: {
|
|
45
53
|
type: StringConstructor;
|
|
46
54
|
};
|
|
55
|
+
placeholder: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
};
|
|
47
58
|
changeDelay: {
|
|
48
59
|
type: NumberConstructor;
|
|
49
60
|
};
|
|
@@ -78,6 +89,14 @@ declare const XhNumberFieldRoot: import("vue").DefineComponent<import("vue").Ext
|
|
|
78
89
|
'value-change': (_details: PayloadOf<NumberFieldProps, "onValueChange">) => true;
|
|
79
90
|
'update:value': (_value: PayloadOf<NumberFieldProps, "onValueChange">["value"]) => true;
|
|
80
91
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
92
|
+
/** 不显示出来的名字,写成 aria-label 落在与字段标签同一个部件上;放进字段或渲染了 label 部件时以它们为准。 */
|
|
93
|
+
ariaLabel: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
};
|
|
96
|
+
/** 标题文字。不写默认插槽时铺 label 部件;需要放置其他内容时改用 label 插槽。 */
|
|
97
|
+
label: {
|
|
98
|
+
type: StringConstructor;
|
|
99
|
+
};
|
|
81
100
|
value: {
|
|
82
101
|
type: StringConstructor;
|
|
83
102
|
};
|
|
@@ -115,6 +134,9 @@ declare const XhNumberFieldRoot: import("vue").DefineComponent<import("vue").Ext
|
|
|
115
134
|
name: {
|
|
116
135
|
type: StringConstructor;
|
|
117
136
|
};
|
|
137
|
+
placeholder: {
|
|
138
|
+
type: StringConstructor;
|
|
139
|
+
};
|
|
118
140
|
changeDelay: {
|
|
119
141
|
type: NumberConstructor;
|
|
120
142
|
};
|
|
@@ -154,6 +176,7 @@ declare const XhNumberFieldRoot: import("vue").DefineComponent<import("vue").Ext
|
|
|
154
176
|
clampValueOnBlur: boolean;
|
|
155
177
|
}, SlotsType<{
|
|
156
178
|
default?: (props: NumberFieldRootSlotProps) => VNode[];
|
|
179
|
+
label?: () => VNode[];
|
|
157
180
|
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
158
181
|
declare const XhNumberFieldLabel: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
159
182
|
[key: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field.d.ts","names":[],"sources":["../../../src/components/number-field/number-field.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"number-field.d.ts","names":[],"sources":["../../../src/components/number-field/number-field.ts"],"mappings":";;;;;KAmBK,mBAAmB;;KAGZ,2BAA2B,KACrC;cAIW,iCAAiB,8BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwBC,MAAA,SAAS;;;IACZ,MAAA,SAAS;;;IACT,MAAA,SAAS;;;IACN,MAAA,SAAS;;;IACR,MAAA,SAAS;;;;;EAIV,iBAAA,UAAA,UAAU;EACZ,iBAAA,QAAA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IATR,MAAA,SAAS;;;IACZ,MAAA,SAAS;;;IACT,MAAA,SAAS;;;IACN,MAAA,SAAS;;;IACR,MAAA,SAAS;;;;;;;;;;;;EAQ3B,WAAC,OAAO,6BAA6B;EACvC,cAAM;kCA0BhB;cAEW,kCAAkB,0BAAA,oBAAA,4BAAA;;8BAW7B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,oCAAoB,0BAAA,oBAAA,4BAAA;;8BAO/B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,mCAAmB,0BAAA,oBAAA,4BAAA;;8BAM9B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,mCAAmB,0BAAA,oBAAA,4BAAA;;8BAM9B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,kCAAkB,0BAAA,oBAAA,4BAAA;;8BAU7B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,6CAA6B,0BAAA,oBAAA,4BAAA;;8BAMxC,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,6CAA6B,0BAAA,oBAAA,4BAAA;;8BAMxC,qCAAA,iDAAA,aAAA,eAAA,oDAAA"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import { renderStructure } from "../../runtime/structure.js";
|
|
1
2
|
import { useFormControlProps } from "../form/use-form-control.js";
|
|
2
3
|
import { useFieldLabelWiring, useFieldStateWiring } from "../field/use-field-control.js";
|
|
3
4
|
import { provideNumberField, useNumberFieldContext } from "./context.js";
|
|
4
5
|
import { useNumberField } from "./use-number-field.js";
|
|
5
|
-
import {
|
|
6
|
+
import { numberFieldStructure } from "@xihan-ui/headless";
|
|
7
|
+
import { defineComponent, h, onUnmounted } from "vue";
|
|
6
8
|
//#region src/components/number-field/number-field.ts
|
|
7
9
|
const XhNumberFieldRoot = defineComponent({
|
|
8
10
|
name: "XhNumberFieldRoot",
|
|
9
11
|
props: {
|
|
12
|
+
/** 不显示出来的名字,写成 aria-label 落在与字段标签同一个部件上;放进字段或渲染了 label 部件时以它们为准。 */
|
|
13
|
+
ariaLabel: { type: String },
|
|
14
|
+
/** 标题文字。不写默认插槽时铺 label 部件;需要放置其他内容时改用 label 插槽。 */
|
|
15
|
+
label: { type: String },
|
|
10
16
|
value: { type: String },
|
|
11
17
|
defaultValue: { type: String },
|
|
12
18
|
min: { type: Number },
|
|
@@ -30,6 +36,7 @@ const XhNumberFieldRoot = defineComponent({
|
|
|
30
36
|
default: void 0
|
|
31
37
|
},
|
|
32
38
|
name: { type: String },
|
|
39
|
+
placeholder: { type: String },
|
|
33
40
|
changeDelay: { type: Number },
|
|
34
41
|
changeInterval: { type: Number },
|
|
35
42
|
minChangeInterval: { type: Number },
|
|
@@ -55,23 +62,30 @@ const XhNumberFieldRoot = defineComponent({
|
|
|
55
62
|
};
|
|
56
63
|
const ctx = useNumberField(useFormControlProps(props), notify);
|
|
57
64
|
provideNumberField(ctx);
|
|
58
|
-
return () =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
return () => {
|
|
66
|
+
const api = ctx.api.value;
|
|
67
|
+
return h("div", api.getRootProps(), slots.default ? slots.default({
|
|
68
|
+
value: api.value,
|
|
69
|
+
valueAsNumber: api.valueAsNumber,
|
|
70
|
+
empty: api.empty,
|
|
71
|
+
canIncrement: api.canIncrement,
|
|
72
|
+
canDecrement: api.canDecrement,
|
|
73
|
+
outOfRange: api.outOfRange,
|
|
74
|
+
setValue: api.setValue,
|
|
75
|
+
increment: api.increment,
|
|
76
|
+
decrement: api.decrement
|
|
77
|
+
}) : renderDefaultStructure(props.label, slots.label));
|
|
78
|
+
};
|
|
69
79
|
}
|
|
70
80
|
});
|
|
71
81
|
const XhNumberFieldLabel = defineComponent({
|
|
72
82
|
name: "XhNumberFieldLabel",
|
|
73
83
|
setup(_, { slots }) {
|
|
74
84
|
const ctx = useNumberFieldContext();
|
|
85
|
+
ctx.labelCount.value++;
|
|
86
|
+
onUnmounted(() => {
|
|
87
|
+
ctx.labelCount.value--;
|
|
88
|
+
});
|
|
75
89
|
return () => h("label", ctx.api.value.getLabelProps(), slots.default?.());
|
|
76
90
|
}
|
|
77
91
|
});
|
|
@@ -122,6 +136,24 @@ const XhNumberFieldDecrementTrigger = defineComponent({
|
|
|
122
136
|
return () => h("button", ctx.api.value.getDecrementTriggerProps(), slots.default?.());
|
|
123
137
|
}
|
|
124
138
|
});
|
|
139
|
+
/** 标准结构里各部件对应的组件。 */
|
|
140
|
+
const NUMBER_FIELD_PARTS = {
|
|
141
|
+
"label": XhNumberFieldLabel,
|
|
142
|
+
"control": XhNumberFieldControl,
|
|
143
|
+
"decrement-trigger": XhNumberFieldDecrementTrigger,
|
|
144
|
+
"input": XhNumberFieldInput,
|
|
145
|
+
"increment-trigger": XhNumberFieldIncrementTrigger
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* 未写默认插槽时铺开的整套结构:照 headless 的 numberFieldStructure 渲,
|
|
149
|
+
* 与 Web Components 不写部件时元素生成的节点出自同一份。标题由 label 插槽接管。
|
|
150
|
+
*/
|
|
151
|
+
function renderDefaultStructure(label, labelSlot) {
|
|
152
|
+
return renderStructure(numberFieldStructure({
|
|
153
|
+
label,
|
|
154
|
+
slotted: (name) => name === "label" && labelSlot != null
|
|
155
|
+
}), NUMBER_FIELD_PARTS, (node) => node.slot ? labelSlot?.() : void 0);
|
|
156
|
+
}
|
|
125
157
|
//#endregion
|
|
126
158
|
export { XhNumberFieldControl, XhNumberFieldDecrementTrigger, XhNumberFieldIncrementTrigger, XhNumberFieldInput, XhNumberFieldLabel, XhNumberFieldPrefix, XhNumberFieldRoot, XhNumberFieldSuffix };
|
|
127
159
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field.js","names":[],"sources":["../../../src/components/number-field/number-field.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// 提供 number field 相关实现。\n\nimport type { ControlVariant, Size, Tone } from '@xihan-ui/core'\nimport type { NumberFieldApi, NumberFieldSchema } from '@xihan-ui/headless'\nimport type { PropType, SlotsType, VNode } from 'vue'\nimport type { PayloadOf } from '../../runtime/payload'\nimport { defineComponent, h } from 'vue'\nimport { useFieldLabelWiring, useFieldStateWiring } from '../field/use-field-control'\nimport { useFormControlProps } from '../form/use-form-control'\nimport { provideNumberField, useNumberFieldContext } from './context'\nimport { useNumberField } from './use-number-field'\n\ntype NumberFieldProps = NumberFieldSchema['props']\n\n/** 默认插槽的载荷:原始输入串与其数值、增减是否仍可进行,以及写值、增减的命令。 */\nexport type NumberFieldRootSlotProps = Pick<\n NumberFieldApi,\n 'value' | 'valueAsNumber' | 'empty' | 'canIncrement' | 'canDecrement' | 'outOfRange' | 'setValue' | 'increment' | 'decrement'\n>\n\nexport const XhNumberFieldRoot = defineComponent({\n name: 'XhNumberFieldRoot',\n props: {\n // 值是原始输入串;缺席值 undefined 表示非受控\n value: { type: String },\n defaultValue: { type: String },\n min: { type: Number },\n max: { type: Number },\n step: { type: Number },\n largeStep: { type: Number },\n disabled: { type: Boolean, default: undefined },\n readOnly: { type: Boolean, default: undefined },\n required: { type: Boolean, default: undefined },\n invalid: { type: Boolean, default: undefined },\n name: { type: String },\n changeDelay: { type: Number },\n changeInterval: { type: Number },\n minChangeInterval: { type: Number },\n clampValueOnBlur: { type: Boolean, default: undefined },\n variant: { type: String as PropType<ControlVariant> },\n tone: { type: String as PropType<Tone> },\n size: { type: String as PropType<Size> },\n parse: { type: Function as PropType<NumberFieldProps['parse']> },\n format: { type: Function as PropType<NumberFieldProps['format']> },\n },\n // value-change 携带 { value, valueAsNumber },update:value 携带裸串\n emits: {\n 'value-change': (_details: PayloadOf<NumberFieldProps, 'onValueChange'>) => true,\n 'update:value': (_value: PayloadOf<NumberFieldProps, 'onValueChange'>['value']) => true,\n },\n slots: Object as SlotsType<{\n default?: (props: NumberFieldRootSlotProps) => VNode[]\n }>,\n setup(props, { slots, emit }) {\n const notify: NumberFieldProps['onValueChange'] = (details) => {\n emit('value-change', details)\n emit('update:value', details.value)\n }\n const ctx = useNumberField(useFormControlProps(props) as NumberFieldProps, notify)\n provideNumberField(ctx)\n return () => h('div',
|
|
1
|
+
{"version":3,"file":"number-field.js","names":[],"sources":["../../../src/components/number-field/number-field.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// 提供 number field 相关实现。\n\nimport type { ControlVariant, Size, Tone } from '@xihan-ui/core'\nimport type { NumberFieldApi, NumberFieldSchema } from '@xihan-ui/headless'\nimport type { PropType, SlotsType, VNode } from 'vue'\nimport type { PayloadOf } from '../../runtime/payload'\nimport { numberFieldStructure } from '@xihan-ui/headless'\nimport { defineComponent, h, onUnmounted } from 'vue'\nimport { renderStructure } from '../../runtime/structure'\nimport { useFieldLabelWiring, useFieldStateWiring } from '../field/use-field-control'\nimport { useFormControlProps } from '../form/use-form-control'\nimport { provideNumberField, useNumberFieldContext } from './context'\nimport { useNumberField } from './use-number-field'\n\ntype NumberFieldProps = NumberFieldSchema['props']\n\n/** 默认插槽的载荷:原始输入串与其数值、增减是否仍可进行,以及写值、增减的命令。 */\nexport type NumberFieldRootSlotProps = Pick<\n NumberFieldApi,\n 'value' | 'valueAsNumber' | 'empty' | 'canIncrement' | 'canDecrement' | 'outOfRange' | 'setValue' | 'increment' | 'decrement'\n>\n\nexport const XhNumberFieldRoot = defineComponent({\n name: 'XhNumberFieldRoot',\n props: {\n /** 不显示出来的名字,写成 aria-label 落在与字段标签同一个部件上;放进字段或渲染了 label 部件时以它们为准。 */\n ariaLabel: { type: String },\n /** 标题文字。不写默认插槽时铺 label 部件;需要放置其他内容时改用 label 插槽。 */\n label: { type: String },\n // 值是原始输入串;缺席值 undefined 表示非受控\n value: { type: String },\n defaultValue: { type: String },\n min: { type: Number },\n max: { type: Number },\n step: { type: Number },\n largeStep: { type: Number },\n disabled: { type: Boolean, default: undefined },\n readOnly: { type: Boolean, default: undefined },\n required: { type: Boolean, default: undefined },\n invalid: { type: Boolean, default: undefined },\n name: { type: String },\n placeholder: { type: String },\n changeDelay: { type: Number },\n changeInterval: { type: Number },\n minChangeInterval: { type: Number },\n clampValueOnBlur: { type: Boolean, default: undefined },\n variant: { type: String as PropType<ControlVariant> },\n tone: { type: String as PropType<Tone> },\n size: { type: String as PropType<Size> },\n parse: { type: Function as PropType<NumberFieldProps['parse']> },\n format: { type: Function as PropType<NumberFieldProps['format']> },\n },\n // value-change 携带 { value, valueAsNumber },update:value 携带裸串\n emits: {\n 'value-change': (_details: PayloadOf<NumberFieldProps, 'onValueChange'>) => true,\n 'update:value': (_value: PayloadOf<NumberFieldProps, 'onValueChange'>['value']) => true,\n },\n slots: Object as SlotsType<{\n default?: (props: NumberFieldRootSlotProps) => VNode[]\n label?: () => VNode[]\n }>,\n setup(props, { slots, emit }) {\n const notify: NumberFieldProps['onValueChange'] = (details) => {\n emit('value-change', details)\n emit('update:value', details.value)\n }\n const ctx = useNumberField(useFormControlProps(props) as NumberFieldProps, notify)\n provideNumberField(ctx)\n return () => {\n const api = ctx.api.value\n return h('div', api.getRootProps() as Record<string, unknown>, slots.default\n ? slots.default({\n value: api.value,\n valueAsNumber: api.valueAsNumber,\n empty: api.empty,\n canIncrement: api.canIncrement,\n canDecrement: api.canDecrement,\n outOfRange: api.outOfRange,\n setValue: api.setValue,\n increment: api.increment,\n decrement: api.decrement,\n })\n : renderDefaultStructure(props.label, slots.label))\n }\n },\n})\n\nexport const XhNumberFieldLabel = defineComponent({\n name: 'XhNumberFieldLabel',\n setup(_, { slots }) {\n const ctx = useNumberFieldContext()\n // 渲出来就登记,在 setup 里同步做:排在输入之前时首帧与服务端直出就带上名字\n ctx.labelCount.value++\n onUnmounted(() => {\n ctx.labelCount.value--\n })\n return () => h('label', ctx.api.value.getLabelProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNumberFieldControl = defineComponent({\n name: 'XhNumberFieldControl',\n setup(_, { slots }) {\n const ctx = useNumberFieldContext()\n // 视觉盒:输入框与加减钮都放进来,皮肤把描边、底色、聚焦环画在它身上\n return () => h('div', ctx.api.value.getControlProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNumberFieldPrefix = defineComponent({\n name: 'XhNumberFieldPrefix',\n setup(_, { slots }) {\n const ctx = useNumberFieldContext()\n return () => h('span', ctx.api.value.getPrefixProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNumberFieldSuffix = defineComponent({\n name: 'XhNumberFieldSuffix',\n setup(_, { slots }) {\n const ctx = useNumberFieldContext()\n return () => h('span', ctx.api.value.getSuffixProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNumberFieldInput = defineComponent({\n name: 'XhNumberFieldInput',\n setup() {\n // 字段的说明与校验状态要落在真控件上,不能停在封装根的 div 上\n const fieldWiring = useFieldStateWiring()\n // 字段的标签也得并进名字链:控件自带的那条指的是它自己那个没渲染的 label 部件\n const fieldLabel = useFieldLabelWiring()\n const ctx = useNumberFieldContext()\n return () => h('input', fieldLabel.value({ ...fieldWiring.value, ...ctx.api.value.getInputProps() as Record<string, unknown> }))\n },\n})\n\nexport const XhNumberFieldIncrementTrigger = defineComponent({\n name: 'XhNumberFieldIncrementTrigger',\n setup(_, { slots }) {\n const ctx = useNumberFieldContext()\n return () => h('button', ctx.api.value.getIncrementTriggerProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\nexport const XhNumberFieldDecrementTrigger = defineComponent({\n name: 'XhNumberFieldDecrementTrigger',\n setup(_, { slots }) {\n const ctx = useNumberFieldContext()\n return () => h('button', ctx.api.value.getDecrementTriggerProps() as Record<string, unknown>, slots.default?.())\n },\n})\n\n/** 标准结构里各部件对应的组件。 */\nconst NUMBER_FIELD_PARTS = {\n 'label': XhNumberFieldLabel,\n 'control': XhNumberFieldControl,\n 'decrement-trigger': XhNumberFieldDecrementTrigger,\n 'input': XhNumberFieldInput,\n 'increment-trigger': XhNumberFieldIncrementTrigger,\n}\n\n/**\n * 未写默认插槽时铺开的整套结构:照 headless 的 numberFieldStructure 渲,\n * 与 Web Components 不写部件时元素生成的节点出自同一份。标题由 label 插槽接管。\n */\nfunction renderDefaultStructure(label: string | undefined, labelSlot?: () => VNode[]): VNode[] {\n const nodes = numberFieldStructure({ label, slotted: name => name === 'label' && labelSlot != null })\n return renderStructure(nodes, NUMBER_FIELD_PARTS, node => (node.slot ? labelSlot?.() : undefined))\n}\n"],"mappings":"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"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { ComputedRef } from "vue";
|
|
2
1
|
import { NumberFieldApi, NumberFieldSchema } from "@xihan-ui/headless";
|
|
2
|
+
import { ComputedRef, Ref } from "vue";
|
|
3
3
|
//#region src/components/number-field/use-number-field.d.ts
|
|
4
4
|
interface NumberFieldContext {
|
|
5
|
+
/**
|
|
6
|
+
* 已渲染的 label 部件数量,由 XhNumberFieldLabel 在 setup 里同步登记、卸载时撤销。
|
|
7
|
+
* 可聚焦部件的 aria-labelledby 据此决定指不指过去:label 排在输入之前时,首帧与服务端直出就带上名字。
|
|
8
|
+
*/
|
|
9
|
+
labelCount: Ref<number>;
|
|
5
10
|
api: ComputedRef<NumberFieldApi>;
|
|
6
11
|
}
|
|
7
12
|
declare function useNumberField(props: NumberFieldSchema['props'], onValueChange?: NumberFieldSchema['props']['onValueChange']): NumberFieldContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-number-field.d.ts","names":[],"sources":["../../../src/components/number-field/use-number-field.ts"],"mappings":";;;UAciB;
|
|
1
|
+
{"version":3,"file":"use-number-field.d.ts","names":[],"sources":["../../../src/components/number-field/use-number-field.ts"],"mappings":";;;UAciB;;;;;EAKf,YAAY;EACZ,KAAK,YAAY;;iBAGH,eACd,OAAO,4BACP,gBAAgB,8CACf"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { vueNormalize } from "../../runtime/normalize-props.js";
|
|
2
2
|
import { useMachine } from "../../runtime/use-machine.js";
|
|
3
|
-
import { computed } from "vue";
|
|
4
3
|
import { connectNumberField, numberFieldMachine } from "@xihan-ui/headless";
|
|
4
|
+
import { computed, ref } from "vue";
|
|
5
5
|
//#region src/components/number-field/use-number-field.ts
|
|
6
6
|
function useNumberField(props, onValueChange) {
|
|
7
|
+
const labelCount = ref(0);
|
|
7
8
|
const service = useMachine(numberFieldMachine, () => ({
|
|
8
9
|
...props,
|
|
10
|
+
labelled: labelCount.value > 0,
|
|
9
11
|
onValueChange
|
|
10
12
|
}));
|
|
11
|
-
return {
|
|
13
|
+
return {
|
|
14
|
+
labelCount,
|
|
15
|
+
api: computed(() => connectNumberField(service, vueNormalize))
|
|
16
|
+
};
|
|
12
17
|
}
|
|
13
18
|
//#endregion
|
|
14
19
|
export { useNumberField };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-number-field.js","names":[],"sources":["../../../src/components/number-field/use-number-field.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 number field 相关实现。\n\nimport type { NumberFieldApi, NumberFieldSchema } from '@xihan-ui/headless'\nimport type { ComputedRef } from 'vue'\nimport { connectNumberField, numberFieldMachine } from '@xihan-ui/headless'\nimport { computed } from 'vue'\nimport { vueNormalize } from '../../runtime/normalize-props'\nimport { useMachine } from '../../runtime/use-machine'\n\nexport interface NumberFieldContext {\n api: ComputedRef<NumberFieldApi>\n}\n\nexport function useNumberField(\n props: NumberFieldSchema['props'],\n onValueChange?: NumberFieldSchema['props']['onValueChange'],\n): NumberFieldContext {\n const service = useMachine(numberFieldMachine, () => ({ ...props, onValueChange }))\n const api = computed(() => connectNumberField(service, vueNormalize))\n return { api }\n}\n"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"use-number-field.js","names":[],"sources":["../../../src/components/number-field/use-number-field.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 number field 相关实现。\n\nimport type { NumberFieldApi, NumberFieldSchema } from '@xihan-ui/headless'\nimport type { ComputedRef, Ref } from 'vue'\nimport { connectNumberField, numberFieldMachine } from '@xihan-ui/headless'\nimport { computed, ref } from 'vue'\nimport { vueNormalize } from '../../runtime/normalize-props'\nimport { useMachine } from '../../runtime/use-machine'\n\nexport interface NumberFieldContext {\n /**\n * 已渲染的 label 部件数量,由 XhNumberFieldLabel 在 setup 里同步登记、卸载时撤销。\n * 可聚焦部件的 aria-labelledby 据此决定指不指过去:label 排在输入之前时,首帧与服务端直出就带上名字。\n */\n labelCount: Ref<number>\n api: ComputedRef<NumberFieldApi>\n}\n\nexport function useNumberField(\n props: NumberFieldSchema['props'],\n onValueChange?: NumberFieldSchema['props']['onValueChange'],\n): NumberFieldContext {\n const labelCount = ref(0)\n const service = useMachine(numberFieldMachine, () => ({ ...props, labelled: labelCount.value > 0, onValueChange }))\n const api = computed(() => connectNumberField(service, vueNormalize))\n return { labelCount, api }\n}\n"],"mappings":";;;;;AAuBA,SAAgB,eACd,OACA,eACoB;CACpB,MAAM,aAAa,IAAI,CAAC;CACxB,MAAM,UAAU,WAAW,2BAA2B;EAAE,GAAG;EAAO,UAAU,WAAW,QAAQ;EAAG;CAAc,EAAE;CAElH,OAAO;EAAE;EAAY,KADT,eAAe,mBAAmB,SAAS,YAAY,CAC5C;CAAE;AAC3B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { vueNormalize } from "../../runtime/normalize-props.js";
|
|
2
2
|
import { withXhConfig } from "../../config/config.js";
|
|
3
3
|
import { providePageHeader, usePageHeaderContext } from "./context.js";
|
|
4
|
-
import { computed, defineComponent, h } from "vue";
|
|
5
4
|
import { connectPageHeader } from "@xihan-ui/headless";
|
|
5
|
+
import { computed, defineComponent, h } from "vue";
|
|
6
6
|
//#region src/components/page-header/page-header.ts
|
|
7
7
|
/** 根节点渲染为 div,默认值由 connect 给出;普通类型省略 default,Boolean 显式保留 undefined */
|
|
8
8
|
const XhPageHeaderRoot = defineComponent({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PayloadOf } from "../../runtime/payload.js";
|
|
2
|
+
import { PaginationApi, PaginationEllipsisSide, PaginationPageSizeChangeDetails, PaginationSchema, PaginationTranslations } from "@xihan-ui/headless";
|
|
2
3
|
import { PropType, SlotsType, VNode } from "vue";
|
|
3
4
|
import { Direction, Placement, Size, Tone } from "@xihan-ui/core";
|
|
4
|
-
import { PaginationApi, PaginationEllipsisSide, PaginationPageSizeChangeDetails, PaginationSchema, PaginationTranslations } from "@xihan-ui/headless";
|
|
5
5
|
//#region src/components/pagination/pagination.d.ts
|
|
6
6
|
type PaginationProps = PaginationSchema['props'];
|
|
7
7
|
/** 默认插槽的载荷:当前页与总量口径、页码序列与条目区间、前后页页码,以及翻页与按当前页切分数据的动作。 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComputedRef, Ref } from "vue";
|
|
2
1
|
import { PaginationApi, PaginationSchema } from "@xihan-ui/headless";
|
|
2
|
+
import { ComputedRef, Ref } from "vue";
|
|
3
3
|
//#region src/components/pagination/use-pagination.d.ts
|
|
4
4
|
interface PaginationContext {
|
|
5
5
|
api: ComputedRef<PaginationApi>;
|
|
@@ -3,9 +3,9 @@ import { vueNormalize } from "../../runtime/normalize-props.js";
|
|
|
3
3
|
import { useXhConfig } from "../../config/config.js";
|
|
4
4
|
import { useMachine } from "../../runtime/use-machine.js";
|
|
5
5
|
import { createVueIdGenerator } from "../../runtime/vue-id.js";
|
|
6
|
+
import { connectPagination, paginationMachine, paginationPageSizeSelectProps, selectMachine } from "@xihan-ui/headless";
|
|
6
7
|
import { computed, ref } from "vue";
|
|
7
8
|
import { createRuntimeConfig, createScope } from "@xihan-ui/core";
|
|
8
|
-
import { connectPagination, paginationMachine, paginationPageSizeSelectProps, selectMachine } from "@xihan-ui/headless";
|
|
9
9
|
import { createPositionEngine } from "@xihan-ui/position";
|
|
10
10
|
//#region src/components/pagination/use-pagination.ts
|
|
11
11
|
function usePagination(props, onPageChange, onPageSizeChange) {
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { PayloadOf } from "../../runtime/payload.js";
|
|
2
|
+
import { PasswordInputApi, PasswordInputSchema, PasswordInputTranslations } from "@xihan-ui/headless";
|
|
2
3
|
import { PropType, SlotsType, VNode } from "vue";
|
|
3
4
|
import { ControlVariant, Size, Tone } from "@xihan-ui/core";
|
|
4
|
-
import { PasswordInputApi, PasswordInputSchema, PasswordInputTranslations } from "@xihan-ui/headless";
|
|
5
5
|
//#region src/components/password-input/password-input.d.ts
|
|
6
6
|
type PasswordInputProps = PasswordInputSchema['props'];
|
|
7
7
|
/** 默认插槽的载荷:当前值与空标志、明暗与大写锁定,以及写值与切换明暗的动作。 */
|
|
8
8
|
type PasswordInputRootSlotProps = Pick<PasswordInputApi, 'value' | 'empty' | 'revealed' | 'capsLock' | 'inputType' | 'setValue' | 'setRevealed' | 'toggleRevealed'>;
|
|
9
9
|
declare const XhPasswordInputRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
/** 标题文字。不写默认插槽时铺 label 部件;需要放置其他内容时改用 label 插槽。 */
|
|
11
|
+
label: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
};
|
|
14
|
+
/** 不显示出来的名字,写成 aria-label 落在与字段标签同一个部件上;放进字段或渲染了 label 部件时以它们为准。 */
|
|
15
|
+
ariaLabel: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
10
18
|
value: {
|
|
11
19
|
type: StringConstructor;
|
|
12
20
|
};
|
|
@@ -69,6 +77,14 @@ declare const XhPasswordInputRoot: import("vue").DefineComponent<import("vue").E
|
|
|
69
77
|
'revealed-change': (_details: PayloadOf<PasswordInputProps, "onRevealedChange">) => true;
|
|
70
78
|
'update:revealed': (_revealed: PayloadOf<PasswordInputProps, "onRevealedChange">["revealed"]) => true;
|
|
71
79
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
80
|
+
/** 标题文字。不写默认插槽时铺 label 部件;需要放置其他内容时改用 label 插槽。 */
|
|
81
|
+
label: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
};
|
|
84
|
+
/** 不显示出来的名字,写成 aria-label 落在与字段标签同一个部件上;放进字段或渲染了 label 部件时以它们为准。 */
|
|
85
|
+
ariaLabel: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
};
|
|
72
88
|
value: {
|
|
73
89
|
type: StringConstructor;
|
|
74
90
|
};
|
|
@@ -137,6 +153,8 @@ declare const XhPasswordInputRoot: import("vue").DefineComponent<import("vue").E
|
|
|
137
153
|
defaultRevealed: boolean;
|
|
138
154
|
}, SlotsType<{
|
|
139
155
|
default?: (props: PasswordInputRootSlotProps) => VNode[];
|
|
156
|
+
/** 不写默认插槽时标题的内容,代替 label 文字。 */
|
|
157
|
+
label?: () => VNode[];
|
|
140
158
|
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
141
159
|
declare const XhPasswordInputLabel: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
142
160
|
[key: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-input.d.ts","names":[],"sources":["../../../src/components/password-input/password-input.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"password-input.d.ts","names":[],"sources":["../../../src/components/password-input/password-input.ts"],"mappings":";;;;;KAoBK,qBAAqB;;KAGd,6BAA6B,KACvC;cAIW,mCAAmB,8BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoBD,MAAA,SAAS;;;IACZ,MAAA,SAAS;;;IACT,MAAA,SAAS;;;IACD,MAAA,SAAS,QAAQ;;;;;EAItB,iBAAA,UAAA,UAAU;EACZ,iBAAA,QAAA,UAAU;EACL,oBAAA,UAAA,UAAU;EACT,oBAAA,WAAA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAVd,MAAA,SAAS;;;IACZ,MAAA,SAAS;;;IACT,MAAA,SAAS;;;IACD,MAAA,SAAS,QAAQ;;;;;;;;;;;;;;;EAUvC,WAAC,OAAO,+BAA+B;;EAEzC,cAAM;kCAgChB;cAEW,oCAAoB,0BAAA,oBAAA,4BAAA;;8BAY/B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,sCAAsB,0BAAA,oBAAA,4BAAA;;8BAOjC,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,oCAAoB,0BAAA,oBAAA,4BAAA;;8BAe/B,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,gDAAgC,0BAAA,oBAAA,4BAAA;;8BAO3C,qCAAA,iDAAA,aAAA,eAAA,oDAAA;cAEW,gDAAgC,0BAAA,oBAAA,4BAAA;;8BAO3C,qCAAA,iDAAA,aAAA,eAAA,oDAAA;;cAGW,4CAA4B,0BAAA,oBAAA,4BAAA;;8BAMvC,qCAAA,iDAAA,aAAA,eAAA,oDAAA"}
|