@talex-touch/tuffex 0.3.3 → 0.3.4
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/README.md +49 -221
- package/dist/es/agents/index.js +1 -1
- package/dist/es/alert/index.d.ts +104 -1
- package/dist/es/alert/index.js +6 -0
- package/dist/es/alert/src/TxAlert.vue.d.ts +1 -0
- package/dist/es/alert/src/TxAlert.vue.js +2 -2
- package/dist/es/alert/src/TxAlert.vue2.js +6 -2
- package/dist/es/auto-sizer/index.js +1 -1
- package/dist/es/auto-sizer/src/TxAutoSizer.vue.js +2 -2
- package/dist/es/avatar/index.js +1 -1
- package/dist/es/avatar/src/TxAvatar.vue.js +1 -1
- package/dist/es/avatar/src/TxAvatar.vue2.js +47 -6
- package/dist/es/avatar/src/TxAvatarGroup.vue.js +1 -1
- package/dist/es/avatar/src/TxAvatarGroup.vue2.js +1 -1
- package/dist/es/avatar/src/types.d.ts +2 -1
- package/dist/es/badge/index.d.ts +78 -1
- package/dist/es/badge/index.js +6 -0
- package/dist/es/badge/src/TxBadge.vue.js +2 -2
- package/dist/es/base-anchor/index.d.ts +464 -0
- package/dist/es/base-anchor/index.js +6 -0
- package/dist/es/base-anchor/src/TxBaseAnchor.vue.d.ts +124 -0
- package/dist/es/base-anchor/src/TxBaseAnchor.vue.js +7 -0
- package/dist/es/base-anchor/src/TxBaseAnchor.vue2.js +798 -0
- package/dist/es/base-anchor/src/types.d.ts +36 -0
- package/dist/es/base-surface/index.d.ts +561 -0
- package/dist/es/base-surface/index.js +7 -0
- package/dist/es/base-surface/src/TxBaseSurface.vue.d.ts +123 -0
- package/dist/es/base-surface/src/TxBaseSurface.vue.js +1012 -0
- package/dist/es/base-surface/src/TxBaseSurface.vue2.js +6 -0
- package/dist/es/base-surface/src/style/index.css +105 -0
- package/dist/es/base-surface/src/types.d.ts +87 -0
- package/dist/es/blank-slate/index.d.ts +9 -9
- package/dist/es/blank-slate/index.js +1 -1
- package/dist/es/button/index.d.ts +45 -15
- package/dist/es/button/index.js +2 -1
- package/dist/es/button/src/button.vue.d.ts +7 -1
- package/dist/es/button/src/button.vue.js +50 -20
- package/dist/es/button/src/split-button.vue.js +31 -5
- package/dist/es/button/src/style/index.css +72 -15
- package/dist/es/button/src/types.d.ts +4 -0
- package/dist/es/card/index.d.ts +236 -56
- package/dist/es/card/index.js +1 -1
- package/dist/es/card/src/TxCard.vue.d.ts +40 -4
- package/dist/es/card/src/TxCard.vue.js +1 -1
- package/dist/es/card/src/TxCard.vue2.js +288 -57
- package/dist/es/card/src/types.d.ts +14 -1
- package/dist/es/card-item/index.d.ts +7 -7
- package/dist/es/card-item/index.js +1 -1
- package/dist/es/cascader/index.d.ts +15 -15
- package/dist/es/cascader/index.js +1 -1
- package/dist/es/cascader/src/TxCascader.vue.d.ts +1 -1
- package/dist/es/cascader/src/TxCascader.vue.js +1 -1
- package/dist/es/cascader/src/TxCascader.vue2.js +1 -3
- package/dist/es/chat/index.d.ts +18 -18
- package/dist/es/chat/index.js +1 -1
- package/dist/es/chat/src/TxChatComposer.vue.js +1 -1
- package/dist/es/chat/src/TxChatComposer.vue2.js +1 -0
- package/dist/es/chat/src/TxTypingIndicator.vue.d.ts +1 -1
- package/dist/es/code-editor/index.d.ts +387 -0
- package/dist/es/code-editor/index.js +8 -0
- package/dist/es/code-editor/src/TxCodeEditor.vue.d.ts +117 -0
- package/dist/es/code-editor/src/TxCodeEditor.vue.js +7 -0
- package/dist/es/code-editor/src/TxCodeEditor.vue2.js +658 -0
- package/dist/es/code-editor/src/TxCodeEditorToolbar.vue.d.ts +40 -0
- package/dist/es/code-editor/src/TxCodeEditorToolbar.vue.js +7 -0
- package/dist/es/code-editor/src/TxCodeEditorToolbar.vue2.js +89 -0
- package/dist/es/code-editor/src/types.d.ts +47 -0
- package/dist/es/command-palette/index.js +1 -1
- package/dist/es/command-palette/src/TxCommandPalette.vue.js +1 -1
- package/dist/es/command-palette/src/TxCommandPalette.vue2.js +128 -21
- package/dist/es/components.css +4253 -3117
- package/dist/es/components.d.ts +15 -2
- package/dist/es/components.js +44 -7
- package/dist/es/container/src/TxCol.vue.d.ts +1 -1
- package/dist/es/container/src/TxCol.vue2.js +1 -1
- package/dist/es/container/src/TxContainer.vue.d.ts +1 -1
- package/dist/es/container/src/TxRow.vue.d.ts +2 -2
- package/dist/es/container/src/TxRow.vue2.js +1 -1
- package/dist/es/context-menu/index.js +1 -1
- package/dist/es/context-menu/src/TxContextMenu.vue.js +1 -1
- package/dist/es/context-menu/src/TxContextMenu.vue2.js +4 -1
- package/dist/es/corner-overlay/index.js +1 -1
- package/dist/es/data-table/index.d.ts +15 -15
- package/dist/es/data-table/index.js +1 -1
- package/dist/es/data-table/src/TxDataTable.vue.d.ts +1 -1
- package/dist/es/date-picker/index.js +1 -1
- package/dist/es/dialog/index.js +1 -1
- package/dist/es/dialog/src/TxBlowDialog.vue.js +6 -2
- package/dist/es/dialog/src/TxBottomDialog.vue.js +1 -1
- package/dist/es/dialog/src/TxBottomDialog.vue2.js +6 -2
- package/dist/es/dialog/src/TxPopperDialog.vue.js +6 -2
- package/dist/es/dialog/src/TxTouchTip.vue.js +1 -1
- package/dist/es/dialog/src/TxTouchTip.vue2.js +25 -22
- package/dist/es/dialog/src/types.d.ts +1 -1
- package/dist/es/drawer/index.d.ts +24 -30
- package/dist/es/drawer/index.js +1 -1
- package/dist/es/drawer/src/TxDrawer.vue.d.ts +1 -4
- package/dist/es/drawer/src/TxDrawer.vue.js +8 -2
- package/dist/es/dropdown-menu/index.d.ts +81 -18
- package/dist/es/dropdown-menu/index.js +1 -1
- package/dist/es/dropdown-menu/src/TxDropdownMenu.vue.d.ts +11 -2
- package/dist/es/dropdown-menu/src/TxDropdownMenu.vue.js +1 -1
- package/dist/es/dropdown-menu/src/TxDropdownMenu.vue2.js +13 -3
- package/dist/es/dropdown-menu/src/types.d.ts +8 -1
- package/dist/es/edge-fade-mask/index.d.ts +120 -0
- package/dist/es/edge-fade-mask/index.js +6 -0
- package/dist/es/edge-fade-mask/src/TxEdgeFadeMask.vue.d.ts +51 -0
- package/dist/es/edge-fade-mask/src/TxEdgeFadeMask.vue.js +7 -0
- package/dist/es/edge-fade-mask/src/TxEdgeFadeMask.vue2.js +154 -0
- package/dist/es/edge-fade-mask/src/types.d.ts +9 -0
- package/dist/es/empty/index.js +1 -1
- package/dist/es/empty-state/index.d.ts +9 -9
- package/dist/es/empty-state/index.js +1 -1
- package/dist/es/empty-state/src/TxEmptyState.vue.js +1 -1
- package/dist/es/empty-state/src/TxEmptyState.vue2.js +25 -17
- package/dist/es/error-state/index.d.ts +131 -0
- package/dist/es/error-state/index.js +6 -0
- package/dist/es/error-state/src/TxErrorState.vue.d.ts +13 -0
- package/dist/es/error-state/src/TxErrorState.vue.js +35 -0
- package/dist/es/error-state/src/TxErrorState.vue2.js +5 -0
- package/dist/es/error-state/src/types.d.ts +3 -0
- package/dist/es/file-uploader/index.js +1 -1
- package/dist/es/flat-radio/index.d.ts +201 -0
- package/dist/es/flat-radio/index.js +8 -0
- package/dist/es/flat-radio/src/TxFlatRadio.vue.d.ts +51 -0
- package/dist/es/flat-radio/src/TxFlatRadio.vue.js +7 -0
- package/dist/es/flat-radio/src/TxFlatRadio.vue2.js +237 -0
- package/dist/es/flat-radio/src/TxFlatRadioItem.vue.d.ts +43 -0
- package/dist/es/flat-radio/src/TxFlatRadioItem.vue.js +7 -0
- package/dist/es/flat-radio/src/TxFlatRadioItem.vue2.js +87 -0
- package/dist/es/flat-radio/src/types.d.ts +28 -0
- package/dist/es/flat-radio/src/types.js +3 -0
- package/dist/es/flat-select/index.d.ts +159 -0
- package/dist/es/flat-select/index.js +8 -0
- package/dist/es/flat-select/src/TxFlatSelect.vue.d.ts +56 -0
- package/dist/es/flat-select/src/TxFlatSelect.vue.js +7 -0
- package/dist/es/flat-select/src/TxFlatSelect.vue2.js +208 -0
- package/dist/es/flat-select/src/TxFlatSelectItem.vue.d.ts +47 -0
- package/dist/es/flat-select/src/TxFlatSelectItem.vue.js +7 -0
- package/dist/es/flat-select/src/TxFlatSelectItem.vue2.js +71 -0
- package/dist/es/flat-select/src/types.d.ts +21 -0
- package/dist/es/flat-select/src/types.js +3 -0
- package/dist/es/flex/index.d.ts +33 -33
- package/dist/es/flex/index.js +1 -1
- package/dist/es/flex/src/TxFlex.vue.d.ts +3 -3
- package/dist/es/flip-overlay/index.d.ts +579 -0
- package/dist/es/flip-overlay/index.js +7 -0
- package/dist/es/flip-overlay/src/TxFlipOverlay.vue.d.ts +175 -0
- package/dist/es/flip-overlay/src/TxFlipOverlay.vue.js +982 -0
- package/dist/es/flip-overlay/src/TxFlipOverlay.vue3.js +6 -0
- package/dist/es/flip-overlay/src/types.d.ts +53 -0
- package/dist/es/floating/index.d.ts +145 -0
- package/dist/es/floating/index.js +8 -0
- package/dist/es/floating/src/TxFloating.vue.d.ts +45 -0
- package/dist/es/floating/src/TxFloating.vue.js +7 -0
- package/dist/es/floating/src/TxFloating.vue2.js +118 -0
- package/dist/es/floating/src/TxFloatingElement.vue.d.ts +39 -0
- package/dist/es/floating/src/TxFloatingElement.vue.js +7 -0
- package/dist/es/floating/src/TxFloatingElement.vue2.js +43 -0
- package/dist/es/floating/src/context.d.ts +7 -0
- package/dist/es/floating/src/context.js +3 -0
- package/dist/es/floating/src/types.d.ts +10 -0
- package/dist/es/form/index.d.ts +9 -9
- package/dist/es/form/index.js +1 -1
- package/dist/es/fusion/index.d.ts +15 -15
- package/dist/es/fusion/index.js +1 -1
- package/dist/es/fusion/src/TxFusion.vue.d.ts +1 -1
- package/dist/es/glass-surface/index.d.ts +30 -30
- package/dist/es/glass-surface/index.js +1 -1
- package/dist/es/glass-surface/src/TxGlassSurface.vue.d.ts +2 -2
- package/dist/es/glass-surface/src/TxGlassSurface.vue.js +16 -38
- package/dist/es/glow-text/index.d.ts +24 -6
- package/dist/es/glow-text/index.js +1 -1
- package/dist/es/glow-text/src/TxGlowText.vue.d.ts +3 -3
- package/dist/es/glow-text/src/TxGlowText.vue.js +1 -1
- package/dist/es/glow-text/src/TxGlowText.vue2.js +93 -10
- package/dist/es/glow-text/src/types.d.ts +2 -0
- package/dist/es/gradient-border/index.js +1 -1
- package/dist/es/gradual-blur/index.d.ts +42 -42
- package/dist/es/gradual-blur/index.js +1 -1
- package/dist/es/gradual-blur/src/TxGradualBlur.vue.d.ts +3 -3
- package/dist/es/gradual-blur/src/TxGradualBlur.vue.js +1 -1
- package/dist/es/grid/src/TxGrid.vue.d.ts +2 -2
- package/dist/es/grid/src/TxGrid.vue2.js +1 -1
- package/dist/es/grid-layout/index.js +1 -1
- package/dist/es/group-block/index.d.ts +321 -4
- package/dist/es/group-block/index.js +8 -2
- package/dist/es/group-block/src/TxBlockInput.vue.d.ts +90 -0
- package/dist/es/group-block/src/TxBlockInput.vue.js +94 -0
- package/dist/es/group-block/src/TxBlockInput.vue3.js +6 -0
- package/dist/es/group-block/src/TxBlockSelect.vue.d.ts +73 -0
- package/dist/es/group-block/src/TxBlockSelect.vue.js +76 -0
- package/dist/es/group-block/src/TxBlockSelect.vue3.js +6 -0
- package/dist/es/group-block/src/TxGroupBlock.vue.js +1 -1
- package/dist/es/group-block/src/types.d.ts +138 -0
- package/dist/es/guide-state/index.d.ts +131 -0
- package/dist/es/guide-state/index.js +6 -0
- package/dist/es/guide-state/src/TxGuideState.vue.d.ts +13 -0
- package/dist/es/guide-state/src/TxGuideState.vue.js +35 -0
- package/dist/es/guide-state/src/TxGuideState.vue2.js +5 -0
- package/dist/es/guide-state/src/types.d.ts +3 -0
- package/dist/es/icon/index.js +1 -1
- package/dist/es/icon/src/TxIcon.vue.js +1 -1
- package/dist/es/icon/src/TxIcon.vue2.js +10 -4
- package/dist/es/image-gallery/index.js +1 -1
- package/dist/es/image-uploader/index.js +1 -1
- package/dist/es/index.js +53 -13
- package/dist/es/input/index.d.ts +211 -1
- package/dist/es/input/index.js +2 -1
- package/dist/es/input/src/TxInput.vue.d.ts +21 -11
- package/dist/es/input/src/TxInput.vue.js +1 -1
- package/dist/es/input/src/TxInput.vue2.js +80 -23
- package/dist/es/keyframe-stroke-text/index.d.ts +146 -0
- package/dist/es/keyframe-stroke-text/index.js +6 -0
- package/dist/es/keyframe-stroke-text/src/TxKeyframeStrokeText.vue.d.ts +48 -0
- package/dist/es/keyframe-stroke-text/src/TxKeyframeStrokeText.vue.js +7 -0
- package/dist/es/keyframe-stroke-text/src/TxKeyframeStrokeText.vue2.js +102 -0
- package/dist/es/keyframe-stroke-text/src/types.d.ts +10 -0
- package/dist/es/layout-skeleton/index.js +1 -1
- package/dist/es/loading-overlay/index.d.ts +15 -15
- package/dist/es/loading-overlay/index.js +1 -1
- package/dist/es/loading-overlay/src/TxLoadingOverlay.vue.d.ts +1 -1
- package/dist/es/loading-overlay/src/TxLoadingOverlay.vue.js +12 -2
- package/dist/es/loading-state/index.d.ts +9 -9
- package/dist/es/loading-state/index.js +1 -1
- package/dist/es/markdown-view/index.d.ts +3 -3
- package/dist/es/markdown-view/index.js +1 -1
- package/dist/es/markdown-view/src/TxMarkdownView.vue.js +3 -2
- package/dist/es/modal/index.js +1 -1
- package/dist/es/modal/src/TxModal.vue.js +1 -1
- package/dist/es/modal/src/TxModal.vue2.js +26 -4
- package/dist/es/nav-bar/index.js +1 -1
- package/dist/es/no-data/index.d.ts +9 -9
- package/dist/es/no-data/index.js +1 -1
- package/dist/es/no-selection/index.d.ts +9 -9
- package/dist/es/no-selection/index.js +1 -1
- package/dist/es/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/properties.js +62 -0
- package/dist/es/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/toml.js +76 -0
- package/dist/es/node_modules/.pnpm/@lezer_common@1.5.0/node_modules/@lezer/common/dist/index.js +252 -0
- package/dist/es/node_modules/.pnpm/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js +682 -0
- package/dist/es/offline-state/index.d.ts +9 -9
- package/dist/es/offline-state/index.js +1 -1
- package/dist/es/outline-border/index.d.ts +18 -18
- package/dist/es/outline-border/index.js +1 -1
- package/dist/es/outline-border/src/TxOutlineBorder.vue.d.ts +1 -1
- package/dist/es/{utils → packages/tuffex/packages/utils}/toast.js +4 -1
- package/dist/es/packages/tuffex/packages/utils/z-index-manager.js +114 -0
- package/dist/es/packages/utils/env/index.js +8 -0
- package/dist/es/permission-state/index.d.ts +9 -9
- package/dist/es/permission-state/index.js +1 -1
- package/dist/es/picker/index.js +1 -1
- package/dist/es/picker/src/TxPicker.vue.js +1 -1
- package/dist/es/picker/src/TxPicker.vue2.js +6 -1
- package/dist/es/popover/index.d.ts +195 -82
- package/dist/es/popover/index.js +1 -1
- package/dist/es/popover/src/TxPopover.vue.d.ts +33 -16
- package/dist/es/popover/src/TxPopover.vue.js +1 -1
- package/dist/es/popover/src/TxPopover.vue2.js +147 -317
- package/dist/es/popover/src/types.d.ts +14 -3
- package/dist/es/progress-bar/index.d.ts +21 -21
- package/dist/es/progress-bar/index.js +1 -1
- package/dist/es/progress-bar/src/TxProgressBar.vue.d.ts +1 -1
- package/dist/es/radio/index.js +1 -1
- package/dist/es/radio/src/TxRadioGroup.vue2.js +1 -1
- package/dist/es/scroll/index.d.ts +42 -12
- package/dist/es/scroll/index.js +1 -1
- package/dist/es/scroll/src/TxScroll.vue.d.ts +11 -1
- package/dist/es/scroll/src/TxScroll.vue.js +1 -1
- package/dist/es/scroll/src/TxScroll.vue2.js +25 -13
- package/dist/es/scroll/src/runtime-capabilities.d.ts +2 -0
- package/dist/es/scroll/src/runtime-capabilities.js +67 -0
- package/dist/es/search-empty/index.d.ts +9 -9
- package/dist/es/search-empty/index.js +1 -1
- package/dist/es/search-input/index.js +1 -1
- package/dist/es/search-select/index.d.ts +9 -9
- package/dist/es/search-select/index.js +1 -1
- package/dist/es/search-select/src/TxSearchSelect.vue.d.ts +1 -1
- package/dist/es/search-select/src/TxSearchSelect.vue.js +1 -1
- package/dist/es/search-select/src/TxSearchSelect.vue2.js +105 -178
- package/dist/es/search-select/src/types.d.ts +1 -1
- package/dist/es/segmented-slider/index.js +1 -1
- package/dist/es/segmented-slider/src/TxSegmentedSlider.vue.js +1 -0
- package/dist/es/select/index.d.ts +366 -4
- package/dist/es/select/index.js +6 -9
- package/dist/es/select/src/TxSelect.vue.d.ts +23 -23
- package/dist/es/select/src/TxSelect.vue.js +2 -2
- package/dist/es/select/src/TxSelect.vue2.js +203 -152
- package/dist/es/select/src/TxSelectItem.vue.js +2 -2
- package/dist/es/select/src/TxSelectItem.vue2.js +44 -7
- package/dist/es/select/src/types.d.ts +34 -0
- package/dist/es/select/src/types.js +3 -0
- package/dist/es/skeleton/index.d.ts +7 -7
- package/dist/es/skeleton/index.js +1 -1
- package/dist/es/slider/index.d.ts +4 -4
- package/dist/es/slider/index.js +1 -1
- package/dist/es/sortable-list/index.js +1 -1
- package/dist/es/sortable-list/src/TxSortableList.vue.js +1 -1
- package/dist/es/sortable-list/src/TxSortableList.vue2.js +1 -1
- package/dist/es/spinner/index.d.ts +1 -1
- package/dist/es/spinner/index.js +1 -1
- package/dist/es/splitter/index.d.ts +15 -15
- package/dist/es/splitter/index.js +1 -1
- package/dist/es/splitter/src/TxSplitter.vue.d.ts +1 -1
- package/dist/es/stack/index.d.ts +33 -33
- package/dist/es/stack/index.js +1 -1
- package/dist/es/stack/src/TxStack.vue.d.ts +3 -3
- package/dist/es/stagger/index.d.ts +15 -15
- package/dist/es/stagger/index.js +1 -1
- package/dist/es/stagger/src/TxStagger.vue.d.ts +1 -1
- package/dist/es/stat-card/index.d.ts +46 -3
- package/dist/es/stat-card/index.js +1 -1
- package/dist/es/stat-card/src/TxStatCard.vue.d.ts +5 -1
- package/dist/es/stat-card/src/TxStatCard.vue.js +1 -1
- package/dist/es/stat-card/src/TxStatCard.vue2.js +247 -19
- package/dist/es/stat-card/src/types.d.ts +15 -0
- package/dist/es/status-badge/index.js +1 -1
- package/dist/es/switch/index.js +1 -0
- package/dist/es/tab-bar/index.d.ts +15 -15
- package/dist/es/tab-bar/index.js +1 -1
- package/dist/es/tab-bar/src/TxTabBar.vue.d.ts +1 -1
- package/dist/es/tabs/index.d.ts +18 -3
- package/dist/es/tabs/index.js +1 -1
- package/dist/es/tabs/src/TxTabs.vue.d.ts +10 -1
- package/dist/es/tabs/src/TxTabs.vue.js +1 -1
- package/dist/es/tabs/src/TxTabs.vue2.js +3 -1
- package/dist/es/tabs/src/types.d.ts +1 -0
- package/dist/es/tag/index.js +1 -1
- package/dist/es/tag-input/index.js +1 -1
- package/dist/es/text-transformer/index.d.ts +1 -1
- package/dist/es/text-transformer/index.js +1 -1
- package/dist/es/toast/index.js +1 -1
- package/dist/es/toast/src/TxToastHost.vue.js +18 -17
- package/dist/es/tooltip/index.d.ts +75 -178
- package/dist/es/tooltip/index.js +1 -1
- package/dist/es/tooltip/src/TxTooltip.vue.d.ts +21 -40
- package/dist/es/tooltip/src/TxTooltip.vue.js +1 -1
- package/dist/es/tooltip/src/TxTooltip.vue2.js +102 -350
- package/dist/es/tooltip/src/types.d.ts +8 -13
- package/dist/es/transfer/index.d.ts +131 -0
- package/dist/es/transfer/index.js +6 -0
- package/dist/es/transfer/src/TxTransfer.vue.d.ts +48 -0
- package/dist/es/transfer/src/TxTransfer.vue.js +7 -0
- package/dist/es/transfer/src/TxTransfer.vue2.js +217 -0
- package/dist/es/transfer/src/types.d.ts +17 -0
- package/dist/es/transition/index.d.ts +30 -30
- package/dist/es/transition/index.js +1 -1
- package/dist/es/transition/src/TxTransition.vue.d.ts +1 -1
- package/dist/es/transition/src/TxTransitionSmoothSize.vue.d.ts +1 -1
- package/dist/es/tree/index.d.ts +15 -15
- package/dist/es/tree/index.js +1 -1
- package/dist/es/tree/src/TxTree.vue.d.ts +1 -1
- package/dist/es/tree/src/TxTree.vue.js +1 -1
- package/dist/es/tree/src/TxTree.vue2.js +3 -2
- package/dist/es/tree/src/types.d.ts +1 -0
- package/dist/es/tree-select/index.d.ts +9 -9
- package/dist/es/tree-select/index.js +1 -1
- package/dist/es/tree-select/src/TxTreeSelect.vue.d.ts +1 -1
- package/dist/es/tree-select/src/TxTreeSelect.vue.js +1 -1
- package/dist/es/tree-select/src/TxTreeSelect.vue2.js +0 -2
- package/dist/es/tuff-logo-stroke/index.d.ts +146 -0
- package/dist/es/tuff-logo-stroke/index.js +6 -0
- package/dist/es/tuff-logo-stroke/src/TxTuffLogoStroke.vue.d.ts +48 -0
- package/dist/es/tuff-logo-stroke/src/TxTuffLogoStroke.vue.js +7 -0
- package/dist/es/tuff-logo-stroke/src/TxTuffLogoStroke.vue2.js +147 -0
- package/dist/es/tuff-logo-stroke/src/types.d.ts +10 -0
- package/dist/es/virtual-list/index.js +1 -1
- package/dist/lib/agents/index.js +1 -1
- package/dist/lib/alert/index.js +11 -0
- package/dist/lib/alert/src/TxAlert.vue.js +2 -2
- package/dist/lib/alert/src/TxAlert.vue2.js +5 -1
- package/dist/lib/auto-sizer/index.js +1 -1
- package/dist/lib/auto-sizer/src/TxAutoSizer.vue.js +2 -2
- package/dist/lib/avatar/index.js +1 -1
- package/dist/lib/avatar/src/TxAvatar.vue.js +1 -1
- package/dist/lib/avatar/src/TxAvatar.vue2.js +47 -6
- package/dist/lib/avatar/src/TxAvatarGroup.vue.js +1 -1
- package/dist/lib/avatar/src/TxAvatarGroup.vue2.js +1 -1
- package/dist/lib/badge/index.js +11 -0
- package/dist/lib/badge/src/TxBadge.vue.js +2 -2
- package/dist/lib/base-anchor/index.js +12 -0
- package/dist/lib/base-anchor/src/TxBaseAnchor.vue.js +11 -0
- package/dist/lib/base-anchor/src/TxBaseAnchor.vue2.js +802 -0
- package/dist/lib/base-surface/index.js +13 -0
- package/dist/lib/base-surface/src/TxBaseSurface.vue.js +1016 -0
- package/dist/lib/base-surface/src/TxBaseSurface.vue2.js +10 -0
- package/dist/lib/base-surface/src/style/index.css +105 -0
- package/dist/lib/blank-slate/index.js +1 -1
- package/dist/lib/button/index.js +2 -1
- package/dist/lib/button/src/button.vue.js +49 -19
- package/dist/lib/button/src/split-button.vue.js +30 -4
- package/dist/lib/button/src/style/index.css +72 -15
- package/dist/lib/card/index.js +1 -1
- package/dist/lib/card/src/TxCard.vue.js +1 -1
- package/dist/lib/card/src/TxCard.vue2.js +285 -54
- package/dist/lib/card-item/index.js +1 -1
- package/dist/lib/cascader/index.js +1 -1
- package/dist/lib/cascader/src/TxCascader.vue.js +1 -1
- package/dist/lib/cascader/src/TxCascader.vue2.js +1 -3
- package/dist/lib/chat/index.js +1 -1
- package/dist/lib/chat/src/TxChatComposer.vue.js +1 -1
- package/dist/lib/chat/src/TxChatComposer.vue2.js +1 -0
- package/dist/lib/code-editor/index.js +16 -0
- package/dist/lib/code-editor/src/TxCodeEditor.vue.js +11 -0
- package/dist/lib/code-editor/src/TxCodeEditor.vue2.js +662 -0
- package/dist/lib/code-editor/src/TxCodeEditorToolbar.vue.js +11 -0
- package/dist/lib/code-editor/src/TxCodeEditorToolbar.vue2.js +93 -0
- package/dist/lib/command-palette/index.js +1 -1
- package/dist/lib/command-palette/src/TxCommandPalette.vue.js +1 -1
- package/dist/lib/command-palette/src/TxCommandPalette.vue2.js +127 -20
- package/dist/lib/components.css +4253 -3117
- package/dist/lib/components.js +255 -178
- package/dist/lib/container/src/TxCol.vue2.js +1 -1
- package/dist/lib/container/src/TxRow.vue2.js +1 -1
- package/dist/lib/context-menu/index.js +1 -1
- package/dist/lib/context-menu/src/TxContextMenu.vue.js +1 -1
- package/dist/lib/context-menu/src/TxContextMenu.vue2.js +4 -1
- package/dist/lib/corner-overlay/index.js +1 -1
- package/dist/lib/data-table/index.js +1 -1
- package/dist/lib/date-picker/index.js +1 -1
- package/dist/lib/dialog/index.js +1 -1
- package/dist/lib/dialog/src/TxBlowDialog.vue.js +5 -1
- package/dist/lib/dialog/src/TxBottomDialog.vue.js +1 -1
- package/dist/lib/dialog/src/TxBottomDialog.vue2.js +5 -1
- package/dist/lib/dialog/src/TxPopperDialog.vue.js +5 -1
- package/dist/lib/dialog/src/TxTouchTip.vue.js +1 -1
- package/dist/lib/dialog/src/TxTouchTip.vue2.js +24 -21
- package/dist/lib/drawer/index.js +1 -1
- package/dist/lib/drawer/src/TxDrawer.vue.js +8 -2
- package/dist/lib/dropdown-menu/index.js +1 -1
- package/dist/lib/dropdown-menu/src/TxDropdownMenu.vue.js +1 -1
- package/dist/lib/dropdown-menu/src/TxDropdownMenu.vue2.js +13 -3
- package/dist/lib/edge-fade-mask/index.js +12 -0
- package/dist/lib/edge-fade-mask/src/TxEdgeFadeMask.vue.js +11 -0
- package/dist/lib/edge-fade-mask/src/TxEdgeFadeMask.vue2.js +158 -0
- package/dist/lib/empty/index.js +1 -1
- package/dist/lib/empty-state/index.js +1 -1
- package/dist/lib/empty-state/src/TxEmptyState.vue.js +1 -1
- package/dist/lib/empty-state/src/TxEmptyState.vue2.js +25 -17
- package/dist/lib/error-state/index.js +11 -0
- package/dist/lib/error-state/src/TxErrorState.vue.js +39 -0
- package/dist/lib/error-state/src/TxErrorState.vue2.js +9 -0
- package/dist/lib/file-uploader/index.js +1 -1
- package/dist/lib/flat-radio/index.js +16 -0
- package/dist/lib/flat-radio/src/TxFlatRadio.vue.js +11 -0
- package/dist/lib/flat-radio/src/TxFlatRadio.vue2.js +241 -0
- package/dist/lib/flat-radio/src/TxFlatRadioItem.vue.js +11 -0
- package/dist/lib/flat-radio/src/TxFlatRadioItem.vue2.js +91 -0
- package/dist/lib/flat-radio/src/types.js +7 -0
- package/dist/lib/flat-select/index.js +16 -0
- package/dist/lib/flat-select/src/TxFlatSelect.vue.js +11 -0
- package/dist/lib/flat-select/src/TxFlatSelect.vue2.js +212 -0
- package/dist/lib/flat-select/src/TxFlatSelectItem.vue.js +11 -0
- package/dist/lib/flat-select/src/TxFlatSelectItem.vue2.js +75 -0
- package/dist/lib/flat-select/src/types.js +7 -0
- package/dist/lib/flex/index.js +1 -1
- package/dist/lib/flip-overlay/index.js +13 -0
- package/dist/lib/flip-overlay/src/TxFlipOverlay.vue.js +986 -0
- package/dist/lib/flip-overlay/src/TxFlipOverlay.vue3.js +10 -0
- package/dist/lib/floating/index.js +16 -0
- package/dist/lib/floating/src/TxFloating.vue.js +11 -0
- package/dist/lib/floating/src/TxFloating.vue2.js +122 -0
- package/dist/lib/floating/src/TxFloatingElement.vue.js +11 -0
- package/dist/lib/floating/src/TxFloatingElement.vue2.js +47 -0
- package/dist/lib/floating/src/context.js +7 -0
- package/dist/lib/form/index.js +1 -1
- package/dist/lib/fusion/index.js +1 -1
- package/dist/lib/glass-surface/index.js +1 -1
- package/dist/lib/glass-surface/src/TxGlassSurface.vue.js +15 -37
- package/dist/lib/glow-text/index.js +1 -1
- package/dist/lib/glow-text/src/TxGlowText.vue.js +1 -1
- package/dist/lib/glow-text/src/TxGlowText.vue2.js +92 -9
- package/dist/lib/gradient-border/index.js +1 -1
- package/dist/lib/gradual-blur/index.js +1 -1
- package/dist/lib/gradual-blur/src/TxGradualBlur.vue.js +1 -1
- package/dist/lib/grid/src/TxGrid.vue2.js +1 -1
- package/dist/lib/grid-layout/index.js +1 -1
- package/dist/lib/group-block/index.js +11 -1
- package/dist/lib/group-block/src/TxBlockInput.vue.js +98 -0
- package/dist/lib/group-block/src/TxBlockInput.vue3.js +10 -0
- package/dist/lib/group-block/src/TxBlockSelect.vue.js +80 -0
- package/dist/lib/group-block/src/TxBlockSelect.vue3.js +10 -0
- package/dist/lib/group-block/src/TxGroupBlock.vue.js +1 -1
- package/dist/lib/guide-state/index.js +11 -0
- package/dist/lib/guide-state/src/TxGuideState.vue.js +39 -0
- package/dist/lib/guide-state/src/TxGuideState.vue2.js +9 -0
- package/dist/lib/icon/index.js +1 -1
- package/dist/lib/icon/src/TxIcon.vue.js +1 -1
- package/dist/lib/icon/src/TxIcon.vue2.js +9 -3
- package/dist/lib/image-gallery/index.js +1 -1
- package/dist/lib/image-uploader/index.js +1 -1
- package/dist/lib/index.js +269 -182
- package/dist/lib/input/index.js +7 -5
- package/dist/lib/input/src/TxInput.vue.js +1 -1
- package/dist/lib/input/src/TxInput.vue2.js +79 -22
- package/dist/lib/keyframe-stroke-text/index.js +12 -0
- package/dist/lib/keyframe-stroke-text/src/TxKeyframeStrokeText.vue.js +11 -0
- package/dist/lib/keyframe-stroke-text/src/TxKeyframeStrokeText.vue2.js +106 -0
- package/dist/lib/layout-skeleton/index.js +1 -1
- package/dist/lib/loading-overlay/index.js +1 -1
- package/dist/lib/loading-overlay/src/TxLoadingOverlay.vue.js +11 -1
- package/dist/lib/loading-state/index.js +1 -1
- package/dist/lib/markdown-view/index.js +1 -1
- package/dist/lib/markdown-view/src/TxMarkdownView.vue.js +3 -2
- package/dist/lib/modal/index.js +1 -1
- package/dist/lib/modal/src/TxModal.vue.js +1 -1
- package/dist/lib/modal/src/TxModal.vue2.js +25 -3
- package/dist/lib/nav-bar/index.js +1 -1
- package/dist/lib/no-data/index.js +1 -1
- package/dist/lib/no-selection/index.js +1 -1
- package/dist/lib/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/properties.js +66 -0
- package/dist/lib/node_modules/.pnpm/@codemirror_legacy-modes@6.5.2/node_modules/@codemirror/legacy-modes/mode/toml.js +80 -0
- package/dist/lib/node_modules/.pnpm/@lezer_common@1.5.0/node_modules/@lezer/common/dist/index.js +257 -0
- package/dist/lib/node_modules/.pnpm/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js +688 -0
- package/dist/lib/offline-state/index.js +1 -1
- package/dist/lib/outline-border/index.js +1 -1
- package/dist/lib/{utils → packages/tuffex/packages/utils}/toast.js +4 -1
- package/dist/lib/packages/tuffex/packages/utils/z-index-manager.js +124 -0
- package/dist/lib/packages/utils/env/index.js +13 -0
- package/dist/lib/permission-state/index.js +1 -1
- package/dist/lib/picker/index.js +1 -1
- package/dist/lib/picker/src/TxPicker.vue.js +1 -1
- package/dist/lib/picker/src/TxPicker.vue2.js +6 -1
- package/dist/lib/popover/index.js +1 -1
- package/dist/lib/popover/src/TxPopover.vue.js +1 -1
- package/dist/lib/popover/src/TxPopover.vue2.js +146 -316
- package/dist/lib/progress-bar/index.js +1 -1
- package/dist/lib/radio/index.js +1 -1
- package/dist/lib/radio/src/TxRadioGroup.vue2.js +1 -1
- package/dist/lib/scroll/index.js +1 -1
- package/dist/lib/scroll/src/TxScroll.vue.js +1 -1
- package/dist/lib/scroll/src/TxScroll.vue2.js +25 -13
- package/dist/lib/scroll/src/runtime-capabilities.js +72 -0
- package/dist/lib/search-empty/index.js +1 -1
- package/dist/lib/search-input/index.js +1 -1
- package/dist/lib/search-select/index.js +1 -1
- package/dist/lib/search-select/src/TxSearchSelect.vue.js +1 -1
- package/dist/lib/search-select/src/TxSearchSelect.vue2.js +104 -177
- package/dist/lib/segmented-slider/index.js +1 -1
- package/dist/lib/segmented-slider/src/TxSegmentedSlider.vue.js +1 -0
- package/dist/lib/select/index.js +6 -9
- package/dist/lib/select/src/TxSelect.vue.js +2 -2
- package/dist/lib/select/src/TxSelect.vue2.js +202 -151
- package/dist/lib/select/src/TxSelectItem.vue.js +2 -2
- package/dist/lib/select/src/TxSelectItem.vue2.js +43 -6
- package/dist/lib/select/src/types.js +7 -0
- package/dist/lib/skeleton/index.js +1 -1
- package/dist/lib/slider/index.js +1 -1
- package/dist/lib/sortable-list/index.js +1 -1
- package/dist/lib/sortable-list/src/TxSortableList.vue.js +1 -1
- package/dist/lib/sortable-list/src/TxSortableList.vue2.js +1 -1
- package/dist/lib/spinner/index.js +1 -1
- package/dist/lib/splitter/index.js +1 -1
- package/dist/lib/stack/index.js +1 -1
- package/dist/lib/stagger/index.js +1 -1
- package/dist/lib/stat-card/index.js +1 -1
- package/dist/lib/stat-card/src/TxStatCard.vue.js +1 -1
- package/dist/lib/stat-card/src/TxStatCard.vue2.js +246 -18
- package/dist/lib/status-badge/index.js +1 -1
- package/dist/lib/switch/index.js +1 -0
- package/dist/lib/tab-bar/index.js +1 -1
- package/dist/lib/tabs/index.js +1 -1
- package/dist/lib/tabs/src/TxTabs.vue.js +1 -1
- package/dist/lib/tabs/src/TxTabs.vue2.js +3 -1
- package/dist/lib/tag/index.js +1 -1
- package/dist/lib/tag-input/index.js +1 -1
- package/dist/lib/text-transformer/index.js +1 -1
- package/dist/lib/toast/index.js +1 -1
- package/dist/lib/toast/src/TxToastHost.vue.js +17 -16
- package/dist/lib/tooltip/index.js +1 -1
- package/dist/lib/tooltip/src/TxTooltip.vue.js +1 -1
- package/dist/lib/tooltip/src/TxTooltip.vue2.js +101 -349
- package/dist/lib/transfer/index.js +12 -0
- package/dist/lib/transfer/src/TxTransfer.vue.js +11 -0
- package/dist/lib/transfer/src/TxTransfer.vue2.js +221 -0
- package/dist/lib/transition/index.js +1 -1
- package/dist/lib/tree/index.js +1 -1
- package/dist/lib/tree/src/TxTree.vue.js +1 -1
- package/dist/lib/tree/src/TxTree.vue2.js +3 -2
- package/dist/lib/tree-select/index.js +1 -1
- package/dist/lib/tree-select/src/TxTreeSelect.vue.js +1 -1
- package/dist/lib/tree-select/src/TxTreeSelect.vue2.js +0 -2
- package/dist/lib/tuff-logo-stroke/index.js +12 -0
- package/dist/lib/tuff-logo-stroke/src/TxTuffLogoStroke.vue.js +11 -0
- package/dist/lib/tuff-logo-stroke/src/TxTuffLogoStroke.vue2.js +151 -0
- package/dist/lib/virtual-list/index.js +1 -1
- package/package.json +37 -25
- package/dist/es/button/__tests__/button.test.d.ts +0 -1
- package/dist/es/button/__tests__/split-button.test.d.ts +0 -1
- package/dist/es/cascader/__tests__/cascader.test.d.ts +0 -1
- package/dist/es/command-palette/__tests__/command-palette.test.d.ts +0 -1
- package/dist/es/data-table/__tests__/data-table.test.d.ts +0 -1
- package/dist/es/file-uploader/__tests__/file-uploader.test.d.ts +0 -1
- package/dist/es/form/__tests__/form.test.d.ts +0 -1
- package/dist/es/search-select/__tests__/search-select.test.d.ts +0 -1
- package/dist/es/tag-input/__tests__/tag-input.test.d.ts +0 -1
- package/dist/es/tree/__tests__/tree.test.d.ts +0 -1
- package/dist/es/tree-select/__tests__/tree-select.test.d.ts +0 -1
- package/dist/es/virtual-list/__tests__/virtual-list.test.d.ts +0 -1
- /package/dist/es/{utils → packages/tuffex/packages/utils}/animation/auto-resize.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/animation/flip.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/dialog-manager.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/env.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/vibrate.js +0 -0
- /package/dist/es/{utils → packages/tuffex/packages/utils}/withInstall.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/animation/auto-resize.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/animation/flip.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/dialog-manager.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/env.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/vibrate.js +0 -0
- /package/dist/lib/{utils → packages/tuffex/packages/utils}/withInstall.js +0 -0
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { defineComponent, ref, computed,
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent, useSlots, ref, computed, watch, onBeforeUnmount, createBlock, openBlock, unref, mergeProps, withCtx, createElementVNode, normalizeStyle, renderSlot, createTextVNode, toDisplayString, normalizeClass } from 'vue';
|
|
2
|
+
import '../../base-anchor/index.js';
|
|
3
|
+
import TxBaseAnchor from '../../base-anchor/src/TxBaseAnchor.vue.js';
|
|
3
4
|
|
|
4
5
|
const _hoisted_1 = ["data-side"];
|
|
5
|
-
const _hoisted_2 = {
|
|
6
|
-
class: "tx-tooltip__fusion-filters",
|
|
7
|
-
width: "0",
|
|
8
|
-
height: "0",
|
|
9
|
-
"aria-hidden": "true"
|
|
10
|
-
};
|
|
11
|
-
const _hoisted_3 = ["values"];
|
|
12
|
-
const _hoisted_4 = ["data-side"];
|
|
6
|
+
const _hoisted_2 = { class: "tx-tooltip__content" };
|
|
13
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
8
|
...{ name: "TxTooltip" },
|
|
15
9
|
__name: "TxTooltip",
|
|
@@ -18,32 +12,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
12
|
content: { default: "" },
|
|
19
13
|
disabled: { type: Boolean, default: false },
|
|
20
14
|
trigger: { default: "hover" },
|
|
21
|
-
placement: { default: "top" },
|
|
22
|
-
offset: { default: 8 },
|
|
23
15
|
openDelay: { default: 200 },
|
|
24
16
|
closeDelay: { default: 120 },
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
arrowSize: { default: 12 },
|
|
17
|
+
maxHeight: { default: 320 },
|
|
18
|
+
referenceFullWidth: { type: Boolean, default: false },
|
|
28
19
|
interactive: { type: Boolean, default: false },
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
panelBackground: { default: "blur" },
|
|
34
|
-
panelShadow: { default: "soft" },
|
|
35
|
-
panelRadius: { default: 10 },
|
|
36
|
-
panelPadding: { default: 8 }
|
|
20
|
+
keepAliveContent: { type: Boolean, default: false },
|
|
21
|
+
closeOnClickOutside: { type: Boolean, default: void 0 },
|
|
22
|
+
toggleOnReferenceClick: { type: Boolean, default: void 0 },
|
|
23
|
+
anchor: { default: () => ({}) }
|
|
37
24
|
},
|
|
38
25
|
emits: ["update:modelValue", "open", "close"],
|
|
39
26
|
setup(__props, { emit: __emit }) {
|
|
40
27
|
const props = __props;
|
|
41
28
|
const emit = __emit;
|
|
29
|
+
const slots = useSlots();
|
|
42
30
|
const internalOpen = ref(false);
|
|
43
31
|
const open = computed({
|
|
44
32
|
get: () => typeof props.modelValue === "boolean" ? props.modelValue : internalOpen.value,
|
|
45
33
|
set: (v) => {
|
|
46
|
-
if (props.disabled)
|
|
34
|
+
if (props.disabled && v)
|
|
35
|
+
return;
|
|
36
|
+
const current = typeof props.modelValue === "boolean" ? props.modelValue : internalOpen.value;
|
|
37
|
+
if (current === v)
|
|
47
38
|
return;
|
|
48
39
|
internalOpen.value = v;
|
|
49
40
|
emit("update:modelValue", v);
|
|
@@ -53,92 +44,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
44
|
emit("close");
|
|
54
45
|
}
|
|
55
46
|
});
|
|
56
|
-
const referenceRef = ref(null);
|
|
57
|
-
const floatingRef = ref(null);
|
|
58
|
-
const arrowRef = ref(null);
|
|
59
|
-
const cleanupAutoUpdate = ref(null);
|
|
60
|
-
const lastOpenedAt = ref(0);
|
|
61
|
-
const stablePlacement = ref(null);
|
|
62
|
-
const { floatingStyles, middlewareData, placement, update } = useFloating(referenceRef, floatingRef, {
|
|
63
|
-
placement: computed(() => props.placement),
|
|
64
|
-
strategy: "fixed",
|
|
65
|
-
transform: false,
|
|
66
|
-
middleware: [
|
|
67
|
-
offset(() => props.offset),
|
|
68
|
-
flip({ padding: 8 }),
|
|
69
|
-
shift({ padding: 8 }),
|
|
70
|
-
size({
|
|
71
|
-
padding: 8,
|
|
72
|
-
apply({ elements }) {
|
|
73
|
-
Object.assign(elements.floating.style, {
|
|
74
|
-
maxWidth: `${props.maxWidth}px`
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}),
|
|
78
|
-
arrow({
|
|
79
|
-
element: computed(() => arrowRef.value),
|
|
80
|
-
padding: 6
|
|
81
|
-
})
|
|
82
|
-
]
|
|
83
|
-
});
|
|
84
|
-
const splitX = ref(0);
|
|
85
|
-
const splitY = ref(0);
|
|
86
|
-
const motion = computed(() => props.motion === "fade" ? "fade" : "split");
|
|
87
|
-
const tooltipClass = computed(() => {
|
|
88
|
-
return [
|
|
89
|
-
"tx-tooltip",
|
|
90
|
-
`is-variant-${props.panelVariant}`,
|
|
91
|
-
`is-bg-${props.panelBackground}`,
|
|
92
|
-
`is-shadow-${props.panelShadow}`,
|
|
93
|
-
{ "is-fusion": !!props.fusion, "is-motion-split": motion.value === "split" }
|
|
94
|
-
];
|
|
95
|
-
});
|
|
96
|
-
const tooltipVars = computed(() => {
|
|
97
|
-
const side = String(stablePlacement.value || placement.value || props.placement || "top").split("-")[0];
|
|
98
|
-
const arrowData = middlewareData.value?.arrow;
|
|
99
|
-
const arrowSize = props.arrowSize || 12;
|
|
100
|
-
let fusionX = "50%";
|
|
101
|
-
let fusionY = "50%";
|
|
102
|
-
if (props.showArrow && arrowData) {
|
|
103
|
-
if (side === "top" || side === "bottom") {
|
|
104
|
-
if (arrowData.x != null)
|
|
105
|
-
fusionX = `${arrowData.x + arrowSize * 0.5}px`;
|
|
106
|
-
} else {
|
|
107
|
-
if (arrowData.y != null)
|
|
108
|
-
fusionY = `${arrowData.y + arrowSize * 0.5}px`;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return {
|
|
112
|
-
"--tx-tooltip-radius": `${props.panelRadius}px`,
|
|
113
|
-
"--tx-tooltip-padding": `${props.panelPadding}px`,
|
|
114
|
-
"--tx-tooltip-arrow-size": `${props.arrowSize}px`,
|
|
115
|
-
"--tx-tooltip-split-x": `${splitX.value}px`,
|
|
116
|
-
"--tx-tooltip-split-y": `${splitY.value}px`,
|
|
117
|
-
"--tx-tooltip-fusion-x": fusionX,
|
|
118
|
-
"--tx-tooltip-fusion-y": fusionY
|
|
119
|
-
};
|
|
120
|
-
});
|
|
121
|
-
const uid = useId();
|
|
122
|
-
const gooFilterId = `tx-tooltip-goo-${uid}`;
|
|
123
|
-
const gooMatrixValues = computed(() => {
|
|
124
|
-
const alpha = 26;
|
|
125
|
-
const alphaOffset = -12;
|
|
126
|
-
return `1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${alpha} ${alphaOffset}`;
|
|
127
|
-
});
|
|
128
|
-
const fusionVars = computed(() => {
|
|
129
|
-
const out = Math.max(12, (props.offset ?? 8) + (props.arrowSize ?? 12) * 0.8);
|
|
130
|
-
const size2 = Math.max(26, (props.arrowSize ?? 12) * 3.2);
|
|
131
|
-
return {
|
|
132
|
-
"--tx-tooltip-goo-out": `${out}px`,
|
|
133
|
-
"--tx-tooltip-goo-size": `${size2}px`
|
|
134
|
-
};
|
|
135
|
-
});
|
|
136
47
|
let openTimer = null;
|
|
137
48
|
let closeTimer = null;
|
|
138
49
|
function clearTimers() {
|
|
139
|
-
if (openTimer)
|
|
50
|
+
if (openTimer != null)
|
|
140
51
|
window.clearTimeout(openTimer);
|
|
141
|
-
if (closeTimer)
|
|
52
|
+
if (closeTimer != null)
|
|
142
53
|
window.clearTimeout(closeTimer);
|
|
143
54
|
openTimer = null;
|
|
144
55
|
closeTimer = null;
|
|
@@ -147,18 +58,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
147
58
|
if (props.disabled)
|
|
148
59
|
return;
|
|
149
60
|
clearTimers();
|
|
150
|
-
openTimer = window.setTimeout(
|
|
151
|
-
lastOpenedAt.value = performance.now();
|
|
61
|
+
openTimer = window.setTimeout(() => {
|
|
152
62
|
open.value = true;
|
|
153
|
-
|
|
154
|
-
await update();
|
|
155
|
-
}, props.openDelay);
|
|
63
|
+
}, Math.max(0, props.openDelay));
|
|
156
64
|
}
|
|
157
65
|
function scheduleClose() {
|
|
158
66
|
clearTimers();
|
|
159
67
|
closeTimer = window.setTimeout(() => {
|
|
160
68
|
open.value = false;
|
|
161
|
-
}, props.closeDelay);
|
|
69
|
+
}, Math.max(0, props.closeDelay));
|
|
162
70
|
}
|
|
163
71
|
function onEnter() {
|
|
164
72
|
if (props.trigger !== "hover")
|
|
@@ -170,20 +78,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
170
78
|
return;
|
|
171
79
|
scheduleClose();
|
|
172
80
|
}
|
|
173
|
-
function onFloatingEnter() {
|
|
174
|
-
if (!props.interactive)
|
|
175
|
-
return;
|
|
176
|
-
if (props.trigger !== "hover")
|
|
177
|
-
return;
|
|
178
|
-
clearTimers();
|
|
179
|
-
}
|
|
180
|
-
function onFloatingLeave() {
|
|
181
|
-
if (!props.interactive)
|
|
182
|
-
return;
|
|
183
|
-
if (props.trigger !== "hover")
|
|
184
|
-
return;
|
|
185
|
-
scheduleClose();
|
|
186
|
-
}
|
|
187
81
|
function onFocusIn() {
|
|
188
82
|
if (props.trigger !== "focus")
|
|
189
83
|
return;
|
|
@@ -194,243 +88,101 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
194
88
|
return;
|
|
195
89
|
scheduleClose();
|
|
196
90
|
}
|
|
197
|
-
function
|
|
198
|
-
if (props.
|
|
199
|
-
return;
|
|
200
|
-
clearTimers();
|
|
201
|
-
if (!open.value)
|
|
202
|
-
lastOpenedAt.value = performance.now();
|
|
203
|
-
open.value = !open.value;
|
|
204
|
-
}
|
|
205
|
-
function isEventInside(e, el) {
|
|
206
|
-
if (!el)
|
|
207
|
-
return false;
|
|
208
|
-
const anyE = e;
|
|
209
|
-
const path = typeof anyE.composedPath === "function" ? anyE.composedPath() : void 0;
|
|
210
|
-
if (path && path.length)
|
|
211
|
-
return path.includes(el);
|
|
212
|
-
const t = e.target ?? null;
|
|
213
|
-
return !!t && el.contains(t);
|
|
214
|
-
}
|
|
215
|
-
function handleOutside(e) {
|
|
216
|
-
if (!props.closeOnClickOutside)
|
|
217
|
-
return;
|
|
218
|
-
if (props.trigger !== "click")
|
|
219
|
-
return;
|
|
220
|
-
if (!open.value)
|
|
91
|
+
function onFloatingEnter() {
|
|
92
|
+
if (!props.interactive)
|
|
221
93
|
return;
|
|
222
|
-
if (
|
|
94
|
+
if (props.trigger !== "hover")
|
|
223
95
|
return;
|
|
224
|
-
|
|
225
|
-
const inFloat = isEventInside(e, floatingRef.value);
|
|
226
|
-
if (!inRef && !inFloat)
|
|
227
|
-
open.value = false;
|
|
96
|
+
clearTimers();
|
|
228
97
|
}
|
|
229
|
-
function
|
|
230
|
-
if (
|
|
98
|
+
function onFloatingLeave() {
|
|
99
|
+
if (!props.interactive)
|
|
231
100
|
return;
|
|
232
|
-
if (
|
|
101
|
+
if (props.trigger !== "hover")
|
|
233
102
|
return;
|
|
234
|
-
|
|
103
|
+
scheduleClose();
|
|
235
104
|
}
|
|
105
|
+
const resolvedAnchorProps = computed(() => {
|
|
106
|
+
const anchor = props.anchor ?? {};
|
|
107
|
+
const closeOnClickOutside = typeof props.closeOnClickOutside === "boolean" ? props.closeOnClickOutside : typeof anchor.closeOnClickOutside === "boolean" ? anchor.closeOnClickOutside : props.trigger === "click";
|
|
108
|
+
const toggleOnReferenceClick = typeof props.toggleOnReferenceClick === "boolean" ? props.toggleOnReferenceClick : typeof anchor.toggleOnReferenceClick === "boolean" ? anchor.toggleOnReferenceClick : props.trigger === "click";
|
|
109
|
+
return {
|
|
110
|
+
placement: "top",
|
|
111
|
+
offset: 8,
|
|
112
|
+
width: 0,
|
|
113
|
+
minWidth: 0,
|
|
114
|
+
maxWidth: 280,
|
|
115
|
+
matchReferenceWidth: false,
|
|
116
|
+
duration: 432,
|
|
117
|
+
ease: "back.out(2)",
|
|
118
|
+
useCard: true,
|
|
119
|
+
panelVariant: "solid",
|
|
120
|
+
panelBackground: "refraction",
|
|
121
|
+
panelShadow: "soft",
|
|
122
|
+
panelRadius: 10,
|
|
123
|
+
panelPadding: 8,
|
|
124
|
+
showArrow: true,
|
|
125
|
+
arrowSize: 10,
|
|
126
|
+
keepAliveContent: props.keepAliveContent,
|
|
127
|
+
closeOnEsc: true,
|
|
128
|
+
...anchor,
|
|
129
|
+
closeOnClickOutside,
|
|
130
|
+
toggleOnReferenceClick
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
const tooltipVars = computed(() => {
|
|
134
|
+
const maxHeight = props.maxHeight <= 0 ? "none" : slots.content && props.maxHeight === 320 ? "none" : `${props.maxHeight}px`;
|
|
135
|
+
return {
|
|
136
|
+
"--tx-tooltip-max-height": maxHeight
|
|
137
|
+
};
|
|
138
|
+
});
|
|
236
139
|
watch(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
if (!
|
|
240
|
-
stablePlacement.value = null;
|
|
241
|
-
cleanupAutoUpdate.value?.();
|
|
242
|
-
cleanupAutoUpdate.value = null;
|
|
140
|
+
() => props.disabled,
|
|
141
|
+
(disabled) => {
|
|
142
|
+
if (!disabled)
|
|
243
143
|
return;
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
await update();
|
|
247
|
-
stablePlacement.value = placement.value;
|
|
248
|
-
if (referenceRef.value && floatingRef.value) {
|
|
249
|
-
cleanupAutoUpdate.value?.();
|
|
250
|
-
cleanupAutoUpdate.value = autoUpdate(referenceRef.value, floatingRef.value, () => update());
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
{ flush: "post" }
|
|
254
|
-
);
|
|
255
|
-
onMounted(async () => {
|
|
256
|
-
document.addEventListener("pointerdown", handleOutside, true);
|
|
257
|
-
document.addEventListener("keydown", onEsc);
|
|
258
|
-
await nextTick();
|
|
259
|
-
if (referenceRef.value) {
|
|
260
|
-
await update();
|
|
144
|
+
clearTimers();
|
|
145
|
+
open.value = false;
|
|
261
146
|
}
|
|
262
|
-
|
|
147
|
+
);
|
|
263
148
|
onBeforeUnmount(() => {
|
|
264
|
-
document.removeEventListener("pointerdown", handleOutside, true);
|
|
265
|
-
document.removeEventListener("keydown", onEsc);
|
|
266
149
|
clearTimers();
|
|
267
|
-
cleanupAutoUpdate.value?.();
|
|
268
|
-
cleanupAutoUpdate.value = null;
|
|
269
150
|
});
|
|
270
|
-
const arrowStyle = computed(() => {
|
|
271
|
-
if (!props.showArrow || !arrowRef.value)
|
|
272
|
-
return { display: "none" };
|
|
273
|
-
const data = middlewareData.value?.arrow;
|
|
274
|
-
if (!data || data.x == null && data.y == null) {
|
|
275
|
-
return { display: "none" };
|
|
276
|
-
}
|
|
277
|
-
const x = data.x;
|
|
278
|
-
const y = data.y;
|
|
279
|
-
const side = String(placement.value || props.placement || "top").split("-")[0];
|
|
280
|
-
const base = {
|
|
281
|
-
display: "block",
|
|
282
|
-
position: "absolute"
|
|
283
|
-
};
|
|
284
|
-
if (x != null)
|
|
285
|
-
base.left = `${x}px`;
|
|
286
|
-
if (y != null)
|
|
287
|
-
base.top = `${y}px`;
|
|
288
|
-
let staticSide = "bottom";
|
|
289
|
-
switch (side) {
|
|
290
|
-
case "top":
|
|
291
|
-
staticSide = "bottom";
|
|
292
|
-
break;
|
|
293
|
-
case "right":
|
|
294
|
-
staticSide = "left";
|
|
295
|
-
break;
|
|
296
|
-
case "bottom":
|
|
297
|
-
staticSide = "top";
|
|
298
|
-
break;
|
|
299
|
-
case "left":
|
|
300
|
-
staticSide = "right";
|
|
301
|
-
break;
|
|
302
|
-
}
|
|
303
|
-
const half = Math.round((props.arrowSize || 12) / 2);
|
|
304
|
-
base[staticSide] = `calc(-${half}px + 1px)`;
|
|
305
|
-
return base;
|
|
306
|
-
});
|
|
307
|
-
const arrowSide = computed(() => String(stablePlacement.value || placement.value || props.placement || "top").split("-")[0]);
|
|
308
|
-
function onBeforeEnter(el) {
|
|
309
|
-
if (motion.value !== "split") {
|
|
310
|
-
splitX.value = 0;
|
|
311
|
-
splitY.value = 0;
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
const node = el;
|
|
315
|
-
const refEl = referenceRef.value;
|
|
316
|
-
if (!refEl)
|
|
317
|
-
return;
|
|
318
|
-
const refRect = refEl.getBoundingClientRect();
|
|
319
|
-
const side = arrowSide.value;
|
|
320
|
-
const refCx = refRect.left + refRect.width * 0.5;
|
|
321
|
-
const refCy = refRect.top + refRect.height * 0.5;
|
|
322
|
-
let tipX = refCx;
|
|
323
|
-
let tipY = refCy;
|
|
324
|
-
const arrowEl = props.showArrow ? arrowRef.value : null;
|
|
325
|
-
if (arrowEl) {
|
|
326
|
-
const arrowRect = arrowEl.getBoundingClientRect();
|
|
327
|
-
tipX = arrowRect.left + arrowRect.width * 0.5;
|
|
328
|
-
tipY = arrowRect.top + arrowRect.height * 0.5;
|
|
329
|
-
if (side === "top")
|
|
330
|
-
tipY = arrowRect.bottom;
|
|
331
|
-
if (side === "bottom")
|
|
332
|
-
tipY = arrowRect.top;
|
|
333
|
-
if (side === "left")
|
|
334
|
-
tipX = arrowRect.right;
|
|
335
|
-
if (side === "right")
|
|
336
|
-
tipX = arrowRect.left;
|
|
337
|
-
} else {
|
|
338
|
-
const floatRect = node.getBoundingClientRect();
|
|
339
|
-
tipX = floatRect.left + floatRect.width * 0.5;
|
|
340
|
-
tipY = floatRect.top + floatRect.height * 0.5;
|
|
341
|
-
}
|
|
342
|
-
const dx = refCx - tipX;
|
|
343
|
-
const dy = refCy - tipY;
|
|
344
|
-
const limit = 18;
|
|
345
|
-
const clamp = (v) => Math.min(limit, Math.max(-limit, v));
|
|
346
|
-
splitX.value = side === "left" || side === "right" ? clamp(dx) : 0;
|
|
347
|
-
splitY.value = side === "top" || side === "bottom" ? clamp(dy) : 0;
|
|
348
|
-
}
|
|
349
151
|
return (_ctx, _cache) => {
|
|
350
|
-
return openBlock(),
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
in: "SourceGraphic",
|
|
385
|
-
stdDeviation: "12",
|
|
386
|
-
result: "blur"
|
|
387
|
-
}, null, -1)),
|
|
388
|
-
createElementVNode("feColorMatrix", {
|
|
389
|
-
in: "blur",
|
|
390
|
-
mode: "matrix",
|
|
391
|
-
values: gooMatrixValues.value,
|
|
392
|
-
result: "goo"
|
|
393
|
-
}, null, 8, _hoisted_3),
|
|
394
|
-
_cache[1] || (_cache[1] = createElementVNode("feComposite", {
|
|
395
|
-
in: "SourceGraphic",
|
|
396
|
-
in2: "goo",
|
|
397
|
-
operator: "atop"
|
|
398
|
-
}, null, -1))
|
|
399
|
-
])
|
|
400
|
-
])
|
|
401
|
-
])),
|
|
402
|
-
props.showArrow ? (openBlock(), createElementBlock("div", {
|
|
403
|
-
key: 0,
|
|
404
|
-
ref_key: "arrowRef",
|
|
405
|
-
ref: arrowRef,
|
|
406
|
-
class: "tx-tooltip__arrow",
|
|
407
|
-
"data-side": arrowSide.value,
|
|
408
|
-
style: normalizeStyle(arrowStyle.value),
|
|
409
|
-
"aria-hidden": "true"
|
|
410
|
-
}, null, 12, _hoisted_4)) : createCommentVNode("", true),
|
|
411
|
-
props.fusion && motion.value === "split" ? (openBlock(), createElementBlock("div", {
|
|
412
|
-
key: 1,
|
|
413
|
-
class: "tx-tooltip__fusion",
|
|
414
|
-
style: normalizeStyle(fusionVars.value),
|
|
415
|
-
"aria-hidden": "true"
|
|
416
|
-
}, [
|
|
417
|
-
createElementVNode("div", {
|
|
418
|
-
class: "tx-tooltip__fusion-goo",
|
|
419
|
-
style: normalizeStyle({ filter: `url(#${gooFilterId})` })
|
|
420
|
-
}, [..._cache[2] || (_cache[2] = [
|
|
421
|
-
createElementVNode("div", { class: "tx-tooltip__fusion-blob tx-tooltip__fusion-blob--tip" }, null, -1),
|
|
422
|
-
createElementVNode("div", { class: "tx-tooltip__fusion-blob tx-tooltip__fusion-blob--ref" }, null, -1)
|
|
423
|
-
])], 4)
|
|
424
|
-
], 4)) : createCommentVNode("", true),
|
|
425
|
-
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
426
|
-
createTextVNode(toDisplayString(__props.content), 1)
|
|
427
|
-
], true)
|
|
428
|
-
], 46, _hoisted_1)) : createCommentVNode("", true)
|
|
429
|
-
]),
|
|
430
|
-
_: 3
|
|
431
|
-
})
|
|
432
|
-
]))
|
|
433
|
-
], 64);
|
|
152
|
+
return openBlock(), createBlock(unref(TxBaseAnchor), mergeProps({
|
|
153
|
+
modelValue: open.value,
|
|
154
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
155
|
+
disabled: props.disabled
|
|
156
|
+
}, resolvedAnchorProps.value), {
|
|
157
|
+
reference: withCtx(() => [
|
|
158
|
+
createElementVNode("span", {
|
|
159
|
+
class: normalizeClass(["tx-tooltip__reference", { "is-full-width": props.referenceFullWidth }]),
|
|
160
|
+
onMouseenter: onEnter,
|
|
161
|
+
onMouseleave: onLeave,
|
|
162
|
+
onFocusin: onFocusIn,
|
|
163
|
+
onFocusout: onFocusOut
|
|
164
|
+
}, [
|
|
165
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
166
|
+
], 34)
|
|
167
|
+
]),
|
|
168
|
+
default: withCtx(({ side }) => [
|
|
169
|
+
createElementVNode("div", {
|
|
170
|
+
class: "tx-tooltip",
|
|
171
|
+
"data-side": side,
|
|
172
|
+
role: "tooltip",
|
|
173
|
+
style: normalizeStyle(tooltipVars.value),
|
|
174
|
+
onMouseenter: onFloatingEnter,
|
|
175
|
+
onMouseleave: onFloatingLeave
|
|
176
|
+
}, [
|
|
177
|
+
createElementVNode("div", _hoisted_2, [
|
|
178
|
+
renderSlot(_ctx.$slots, "content", { side }, () => [
|
|
179
|
+
createTextVNode(toDisplayString(props.content), 1)
|
|
180
|
+
], true)
|
|
181
|
+
])
|
|
182
|
+
], 44, _hoisted_1)
|
|
183
|
+
]),
|
|
184
|
+
_: 3
|
|
185
|
+
}, 16, ["modelValue", "disabled"]);
|
|
434
186
|
};
|
|
435
187
|
}
|
|
436
188
|
});
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { BaseAnchorProps } from '../../base-anchor/src/types';
|
|
2
|
+
|
|
3
|
+
export type TooltipAnchorProps = Omit<BaseAnchorProps, 'modelValue' | 'disabled'>;
|
|
2
4
|
export interface TooltipProps {
|
|
3
5
|
modelValue?: boolean;
|
|
4
6
|
content?: string;
|
|
5
7
|
disabled?: boolean;
|
|
6
8
|
trigger?: 'hover' | 'click' | 'focus';
|
|
7
|
-
placement?: TooltipPlacement;
|
|
8
|
-
offset?: number;
|
|
9
9
|
openDelay?: number;
|
|
10
10
|
closeDelay?: number;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
arrowSize?: number;
|
|
11
|
+
maxHeight?: number;
|
|
12
|
+
referenceFullWidth?: boolean;
|
|
14
13
|
interactive?: boolean;
|
|
14
|
+
keepAliveContent?: boolean;
|
|
15
15
|
closeOnClickOutside?: boolean;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
panelVariant?: 'solid' | 'dashed' | 'plain';
|
|
19
|
-
panelBackground?: 'blur' | 'glass' | 'mask';
|
|
20
|
-
panelShadow?: 'none' | 'soft' | 'medium';
|
|
21
|
-
panelRadius?: number;
|
|
22
|
-
panelPadding?: number;
|
|
16
|
+
toggleOnReferenceClick?: boolean;
|
|
17
|
+
anchor?: Partial<TooltipAnchorProps>;
|
|
23
18
|
}
|