@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
|
@@ -0,0 +1,986 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
|
+
|
|
5
|
+
const vue = require('vue');
|
|
6
|
+
const button_vue_vue_type_script_setup_true_lang = require('../../button/src/button.vue.js');
|
|
7
|
+
const gsap = require('gsap');
|
|
8
|
+
const TxBaseSurface_vue_vue_type_script_setup_true_lang = require('../../base-surface/src/TxBaseSurface.vue.js');
|
|
9
|
+
;/* empty css */
|
|
10
|
+
const env = require('../../packages/tuffex/packages/utils/env.js');
|
|
11
|
+
const zIndexManager = require('../../packages/tuffex/packages/utils/z-index-manager.js');
|
|
12
|
+
|
|
13
|
+
const _hoisted_1 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "TxFlipOverlay-GlobalMask"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_2 = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "TxFlipOverlay-Header"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_3 = { class: "TxFlipOverlay-HeaderDisplay" };
|
|
22
|
+
const _hoisted_4 = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "TxFlipOverlay-HeaderTitle"
|
|
25
|
+
};
|
|
26
|
+
const _hoisted_5 = {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "TxFlipOverlay-HeaderDesc"
|
|
29
|
+
};
|
|
30
|
+
const _hoisted_6 = { class: "TxFlipOverlay-HeaderActions" };
|
|
31
|
+
const STACK_MATCH_PIXEL_THRESHOLD = 8;
|
|
32
|
+
const STACK_MATCH_RATIO_THRESHOLD = 0.05;
|
|
33
|
+
const STACK_LAYER_OFFSET_Y = -18;
|
|
34
|
+
const STACK_LAYER_SCALE_STEP = 0.05;
|
|
35
|
+
const STACK_LAYER_MAX_DEPTH = 3;
|
|
36
|
+
const STACK_OPACITY_BY_DEPTH = [1, 0.92, 0.78, 0.62, 0.38, 0.16, 0];
|
|
37
|
+
const STACK_STATE_EPSILON = 1e-3;
|
|
38
|
+
const overlayStackRegistry = /* @__PURE__ */ new Map();
|
|
39
|
+
const overlayStackSubscribers = /* @__PURE__ */ new Set();
|
|
40
|
+
let overlayStackVersion = 0;
|
|
41
|
+
let overlayInstanceSeed = 0;
|
|
42
|
+
let overlayOpenSequenceSeed = 0;
|
|
43
|
+
let sharedGlobalMaskElement = null;
|
|
44
|
+
function canUseDom() {
|
|
45
|
+
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
46
|
+
}
|
|
47
|
+
function resolveVisibleStackBounds(entries) {
|
|
48
|
+
if (entries.length === 0)
|
|
49
|
+
return null;
|
|
50
|
+
let minZIndex = entries[0].zIndex;
|
|
51
|
+
for (const entry of entries) {
|
|
52
|
+
if (entry.zIndex < minZIndex)
|
|
53
|
+
minZIndex = entry.zIndex;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
minZIndex,
|
|
57
|
+
topEntry: entries[entries.length - 1]
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function removeSharedGlobalMaskElement() {
|
|
61
|
+
if (!sharedGlobalMaskElement)
|
|
62
|
+
return;
|
|
63
|
+
sharedGlobalMaskElement.remove();
|
|
64
|
+
sharedGlobalMaskElement = null;
|
|
65
|
+
}
|
|
66
|
+
function ensureSharedGlobalMaskElement() {
|
|
67
|
+
if (!canUseDom())
|
|
68
|
+
return null;
|
|
69
|
+
if (!sharedGlobalMaskElement) {
|
|
70
|
+
sharedGlobalMaskElement = document.createElement("div");
|
|
71
|
+
sharedGlobalMaskElement.className = "TxFlipOverlay-GlobalMask";
|
|
72
|
+
document.body.appendChild(sharedGlobalMaskElement);
|
|
73
|
+
}
|
|
74
|
+
return sharedGlobalMaskElement;
|
|
75
|
+
}
|
|
76
|
+
function applySharedGlobalMaskState() {
|
|
77
|
+
if (!canUseDom())
|
|
78
|
+
return;
|
|
79
|
+
const visibleEntries = getVisibleOverlayStackEntries();
|
|
80
|
+
const bounds = resolveVisibleStackBounds(visibleEntries);
|
|
81
|
+
if (!bounds || visibleEntries.length <= 1 || !bounds.topEntry.globalMask) {
|
|
82
|
+
removeSharedGlobalMaskElement();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const maskElement = ensureSharedGlobalMaskElement();
|
|
86
|
+
if (!maskElement)
|
|
87
|
+
return;
|
|
88
|
+
maskElement.className = "TxFlipOverlay-GlobalMask";
|
|
89
|
+
maskElement.style.zIndex = String(Math.max(0, bounds.minZIndex - 1));
|
|
90
|
+
maskElement.style.opacity = "1";
|
|
91
|
+
}
|
|
92
|
+
function markOverlayStackChanged() {
|
|
93
|
+
overlayStackVersion += 1;
|
|
94
|
+
applySharedGlobalMaskState();
|
|
95
|
+
overlayStackSubscribers.forEach((listener) => {
|
|
96
|
+
try {
|
|
97
|
+
listener();
|
|
98
|
+
} catch {
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function subscribeOverlayStackChanged(listener) {
|
|
103
|
+
overlayStackSubscribers.add(listener);
|
|
104
|
+
return () => overlayStackSubscribers.delete(listener);
|
|
105
|
+
}
|
|
106
|
+
function getOverlayStackVersion() {
|
|
107
|
+
return overlayStackVersion;
|
|
108
|
+
}
|
|
109
|
+
function getVisibleOverlayStackEntries() {
|
|
110
|
+
return Array.from(overlayStackRegistry.values()).filter((entry) => entry.visible).sort((a, b) => {
|
|
111
|
+
if (a.zIndex !== b.zIndex)
|
|
112
|
+
return a.zIndex - b.zIndex;
|
|
113
|
+
return a.openSequence - b.openSequence;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function isOverlaySizeMatched(current, above) {
|
|
117
|
+
const widthDelta = Math.abs(current.width - above.width);
|
|
118
|
+
const heightDelta = Math.abs(current.height - above.height);
|
|
119
|
+
const widthTolerance = Math.max(STACK_MATCH_PIXEL_THRESHOLD, above.width * STACK_MATCH_RATIO_THRESHOLD);
|
|
120
|
+
const heightTolerance = Math.max(STACK_MATCH_PIXEL_THRESHOLD, above.height * STACK_MATCH_RATIO_THRESHOLD);
|
|
121
|
+
return widthDelta <= widthTolerance && heightDelta <= heightTolerance;
|
|
122
|
+
}
|
|
123
|
+
function resolveStackOpacity(depth) {
|
|
124
|
+
if (depth < 0)
|
|
125
|
+
return 1;
|
|
126
|
+
if (depth >= STACK_OPACITY_BY_DEPTH.length)
|
|
127
|
+
return 0;
|
|
128
|
+
return STACK_OPACITY_BY_DEPTH[depth] ?? 0;
|
|
129
|
+
}
|
|
130
|
+
function nextOverlayInstanceId() {
|
|
131
|
+
overlayInstanceSeed += 1;
|
|
132
|
+
return `tx-flip-overlay-${overlayInstanceSeed}`;
|
|
133
|
+
}
|
|
134
|
+
function nextOverlayOpenSequence() {
|
|
135
|
+
overlayOpenSequenceSeed += 1;
|
|
136
|
+
return overlayOpenSequenceSeed;
|
|
137
|
+
}
|
|
138
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
139
|
+
...{
|
|
140
|
+
name: "TxFlipOverlay"
|
|
141
|
+
},
|
|
142
|
+
__name: "TxFlipOverlay",
|
|
143
|
+
props: {
|
|
144
|
+
modelValue: { type: Boolean, default: false },
|
|
145
|
+
source: { default: null },
|
|
146
|
+
sourceRadius: { default: null },
|
|
147
|
+
duration: { default: 480 },
|
|
148
|
+
rotateX: { default: 6 },
|
|
149
|
+
rotateY: { default: 8 },
|
|
150
|
+
tiltRange: { default: 2 },
|
|
151
|
+
perspective: { default: 1200 },
|
|
152
|
+
speedBoost: { default: 1.12 },
|
|
153
|
+
speedBoostAt: { default: 0.7 },
|
|
154
|
+
easeOut: { default: "back.out(1.25)" },
|
|
155
|
+
easeIn: { default: "back.in(1)" },
|
|
156
|
+
maskClosable: { type: Boolean, default: true },
|
|
157
|
+
preventAccidentalClose: { type: Boolean, default: false },
|
|
158
|
+
transitionName: { default: "TxFlipOverlay-Mask" },
|
|
159
|
+
maskClass: { default: "" },
|
|
160
|
+
cardClass: { default: "" },
|
|
161
|
+
cardStyle: {},
|
|
162
|
+
globalMask: { type: Boolean, default: true },
|
|
163
|
+
border: { default: "solid" },
|
|
164
|
+
surface: { default: "mask" },
|
|
165
|
+
surfaceColor: { default: "" },
|
|
166
|
+
surfaceOpacity: { default: 0.96 },
|
|
167
|
+
header: { type: Boolean, default: true },
|
|
168
|
+
headerTitle: { default: "" },
|
|
169
|
+
headerDesc: { default: "" },
|
|
170
|
+
closable: { type: Boolean, default: true },
|
|
171
|
+
closeAriaLabel: { default: "Close" },
|
|
172
|
+
scrollable: { type: Boolean, default: true },
|
|
173
|
+
randomTilt: { type: Boolean, default: true },
|
|
174
|
+
expanded: { type: Boolean },
|
|
175
|
+
animating: { type: Boolean }
|
|
176
|
+
},
|
|
177
|
+
emits: ["update:modelValue", "update:expanded", "update:animating", "open", "opened", "close", "closed"],
|
|
178
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
179
|
+
const props = __props;
|
|
180
|
+
const emit = __emit;
|
|
181
|
+
const slots = vue.useSlots();
|
|
182
|
+
const instanceId = nextOverlayInstanceId();
|
|
183
|
+
const cardRef = vue.ref(null);
|
|
184
|
+
const visible = vue.ref(Boolean(props.modelValue));
|
|
185
|
+
const expanded = vue.ref(typeof props.expanded === "boolean" ? props.expanded : false);
|
|
186
|
+
const animating = vue.ref(typeof props.animating === "boolean" ? props.animating : false);
|
|
187
|
+
const zIndex = vue.ref(zIndexManager.getZIndex());
|
|
188
|
+
const sourceRect = vue.ref(null);
|
|
189
|
+
const sourceRadius = vue.ref(null);
|
|
190
|
+
const tilt = vue.ref({ x: 0, y: 0 });
|
|
191
|
+
const blockedCloseWarning = vue.ref(false);
|
|
192
|
+
const openSequence = vue.ref(0);
|
|
193
|
+
const localStackVersion = vue.ref(getOverlayStackVersion());
|
|
194
|
+
const unsubscribeStackChange = env.hasWindow() ? subscribeOverlayStackChanged(() => {
|
|
195
|
+
localStackVersion.value += 1;
|
|
196
|
+
}) : () => {
|
|
197
|
+
};
|
|
198
|
+
let tween = null;
|
|
199
|
+
let stackTween = null;
|
|
200
|
+
let appliedStackState = null;
|
|
201
|
+
let runId = 0;
|
|
202
|
+
let blockedCloseTimer = null;
|
|
203
|
+
let pageExitGuardBound = false;
|
|
204
|
+
const stackMeta = vue.computed(() => {
|
|
205
|
+
localStackVersion.value;
|
|
206
|
+
if (!visible.value) {
|
|
207
|
+
return {
|
|
208
|
+
depth: 0,
|
|
209
|
+
stackSize: 0,
|
|
210
|
+
isMaskOwner: true,
|
|
211
|
+
isLayered: false,
|
|
212
|
+
isDepthHidden: false,
|
|
213
|
+
translateY: 0,
|
|
214
|
+
scale: 1,
|
|
215
|
+
opacity: 1
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
const stackEntries = getVisibleOverlayStackEntries();
|
|
219
|
+
const selfIndex = stackEntries.findIndex((entry) => entry.id === instanceId);
|
|
220
|
+
if (selfIndex < 0) {
|
|
221
|
+
return {
|
|
222
|
+
depth: 0,
|
|
223
|
+
stackSize: stackEntries.length,
|
|
224
|
+
isMaskOwner: true,
|
|
225
|
+
isLayered: false,
|
|
226
|
+
isDepthHidden: false,
|
|
227
|
+
translateY: 0,
|
|
228
|
+
scale: 1,
|
|
229
|
+
opacity: 1
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
const topIndex = stackEntries.length - 1;
|
|
233
|
+
const depth = topIndex - selfIndex;
|
|
234
|
+
const selfEntry = stackEntries[selfIndex];
|
|
235
|
+
const aboveEntry = depth > 0 ? stackEntries[selfIndex + 1] : void 0;
|
|
236
|
+
let isLayered = false;
|
|
237
|
+
if (selfEntry && aboveEntry) {
|
|
238
|
+
const isSizeReady = selfEntry.width > 0 && selfEntry.height > 0 && aboveEntry.width > 0 && aboveEntry.height > 0;
|
|
239
|
+
isLayered = !isSizeReady || isOverlaySizeMatched(selfEntry, aboveEntry);
|
|
240
|
+
}
|
|
241
|
+
const layeredDepth = isLayered ? Math.min(depth, STACK_LAYER_MAX_DEPTH) : 0;
|
|
242
|
+
const scale = Math.max(0, 1 - STACK_LAYER_SCALE_STEP * layeredDepth);
|
|
243
|
+
const opacity = resolveStackOpacity(depth);
|
|
244
|
+
return {
|
|
245
|
+
depth,
|
|
246
|
+
stackSize: stackEntries.length,
|
|
247
|
+
isMaskOwner: depth === 0,
|
|
248
|
+
isLayered,
|
|
249
|
+
isDepthHidden: opacity <= 0,
|
|
250
|
+
translateY: STACK_LAYER_OFFSET_Y * layeredDepth,
|
|
251
|
+
scale,
|
|
252
|
+
opacity
|
|
253
|
+
};
|
|
254
|
+
});
|
|
255
|
+
const maskClassName = vue.computed(() => {
|
|
256
|
+
const classes = ["TxFlipOverlay-Mask"];
|
|
257
|
+
if (props.maskClass) {
|
|
258
|
+
const customMaskClasses = props.maskClass.split(/\s+/).map((token) => token.trim()).filter(Boolean);
|
|
259
|
+
classes.push(...customMaskClasses);
|
|
260
|
+
}
|
|
261
|
+
if (!stackMeta.value.isMaskOwner)
|
|
262
|
+
classes.push("is-stack-underlay-mask");
|
|
263
|
+
if (blockedCloseWarning.value)
|
|
264
|
+
classes.push("is-close-guard-warning");
|
|
265
|
+
if (props.maskClass)
|
|
266
|
+
classes.push(props.maskClass);
|
|
267
|
+
return classes;
|
|
268
|
+
});
|
|
269
|
+
const cardClassName = vue.computed(() => {
|
|
270
|
+
let borderStyle = "solid";
|
|
271
|
+
if (props.border === "none") {
|
|
272
|
+
borderStyle = "none";
|
|
273
|
+
} else if (props.border === "dashed" || props.border === "dash") {
|
|
274
|
+
borderStyle = "dashed";
|
|
275
|
+
}
|
|
276
|
+
const classes = [
|
|
277
|
+
"TxFlipOverlay-Card",
|
|
278
|
+
`is-border-${borderStyle}`,
|
|
279
|
+
{
|
|
280
|
+
"is-expanded": expanded.value,
|
|
281
|
+
"is-close-guard-warning": blockedCloseWarning.value,
|
|
282
|
+
"is-stack-layered": stackMeta.value.isLayered,
|
|
283
|
+
"is-stack-depth-hidden": stackMeta.value.isDepthHidden
|
|
284
|
+
}
|
|
285
|
+
];
|
|
286
|
+
if (props.cardClass)
|
|
287
|
+
classes.push(props.cardClass);
|
|
288
|
+
return classes;
|
|
289
|
+
});
|
|
290
|
+
const bodyClassName = vue.computed(() => {
|
|
291
|
+
const classes = [
|
|
292
|
+
"TxFlipOverlay-Body",
|
|
293
|
+
"TxFlipOverlay-Content",
|
|
294
|
+
{ "is-scrollable": props.scrollable }
|
|
295
|
+
];
|
|
296
|
+
return classes;
|
|
297
|
+
});
|
|
298
|
+
const shellClassName = vue.computed(() => {
|
|
299
|
+
const classes = [
|
|
300
|
+
"TxFlipOverlay-Shell",
|
|
301
|
+
{ "is-close-guard-focus": blockedCloseWarning.value }
|
|
302
|
+
];
|
|
303
|
+
return classes;
|
|
304
|
+
});
|
|
305
|
+
const maskStyle = vue.computed(() => {
|
|
306
|
+
const style = {
|
|
307
|
+
zIndex: zIndex.value,
|
|
308
|
+
pointerEvents: stackMeta.value.isMaskOwner ? "auto" : "none"
|
|
309
|
+
};
|
|
310
|
+
const usesSharedStackMask = props.globalMask && stackMeta.value.stackSize > 1;
|
|
311
|
+
if (usesSharedStackMask || !stackMeta.value.isMaskOwner) {
|
|
312
|
+
style.background = "transparent";
|
|
313
|
+
style.backdropFilter = "none";
|
|
314
|
+
style.WebkitBackdropFilter = "none";
|
|
315
|
+
}
|
|
316
|
+
return style;
|
|
317
|
+
});
|
|
318
|
+
const surfaceMode = vue.computed(() => {
|
|
319
|
+
if (props.surface === "pure" || props.surface === "mask" || props.surface === "blur" || props.surface === "glass" || props.surface === "refraction") {
|
|
320
|
+
return props.surface;
|
|
321
|
+
}
|
|
322
|
+
return "mask";
|
|
323
|
+
});
|
|
324
|
+
const surfaceColor = vue.computed(() => {
|
|
325
|
+
if (props.surfaceColor)
|
|
326
|
+
return props.surfaceColor;
|
|
327
|
+
return "var(--tx-bg-color-overlay, var(--tx-card-fake-background, #fff))";
|
|
328
|
+
});
|
|
329
|
+
const surfaceOpacity = vue.computed(() => {
|
|
330
|
+
const value = typeof props.surfaceOpacity === "number" ? props.surfaceOpacity : 0.96;
|
|
331
|
+
if (!Number.isFinite(value))
|
|
332
|
+
return 0.96;
|
|
333
|
+
return Math.max(0, Math.min(1, value));
|
|
334
|
+
});
|
|
335
|
+
const bodyLockCountKey = "txFlipOverlayLockCount";
|
|
336
|
+
const bodyLockOverflowKey = "txFlipOverlayLockOverflow";
|
|
337
|
+
const bodyLockPaddingKey = "txFlipOverlayLockPaddingRight";
|
|
338
|
+
const transitionName = vue.computed(() => props.transitionName || "TxFlipOverlay-Mask");
|
|
339
|
+
const useMaskCssTransition = vue.computed(() => {
|
|
340
|
+
if (!visible.value)
|
|
341
|
+
return true;
|
|
342
|
+
if (stackMeta.value.isMaskOwner && stackMeta.value.stackSize > 1)
|
|
343
|
+
return false;
|
|
344
|
+
return true;
|
|
345
|
+
});
|
|
346
|
+
const hasCustomHeaderSlot = vue.computed(() => Boolean(slots.header));
|
|
347
|
+
const hasHeaderDisplaySlot = vue.computed(() => Boolean(slots["header-display"]));
|
|
348
|
+
const hasHeaderActionsSlot = vue.computed(() => Boolean(slots["header-actions"]));
|
|
349
|
+
const hasHeaderContent = vue.computed(() => Boolean(props.headerTitle || props.headerDesc));
|
|
350
|
+
const shouldRenderBuiltInHeader = vue.computed(() => {
|
|
351
|
+
if (hasCustomHeaderSlot.value || !props.header)
|
|
352
|
+
return false;
|
|
353
|
+
if (props.closable)
|
|
354
|
+
return true;
|
|
355
|
+
return hasHeaderDisplaySlot.value || hasHeaderActionsSlot.value || hasHeaderContent.value;
|
|
356
|
+
});
|
|
357
|
+
function syncExpanded(value) {
|
|
358
|
+
if (expanded.value === value)
|
|
359
|
+
return;
|
|
360
|
+
expanded.value = value;
|
|
361
|
+
}
|
|
362
|
+
function syncAnimating(value) {
|
|
363
|
+
if (animating.value === value)
|
|
364
|
+
return;
|
|
365
|
+
animating.value = value;
|
|
366
|
+
}
|
|
367
|
+
function clearBlockedCloseWarning() {
|
|
368
|
+
if (blockedCloseTimer) {
|
|
369
|
+
clearTimeout(blockedCloseTimer);
|
|
370
|
+
blockedCloseTimer = null;
|
|
371
|
+
}
|
|
372
|
+
blockedCloseWarning.value = false;
|
|
373
|
+
}
|
|
374
|
+
function triggerBlockedCloseWarning() {
|
|
375
|
+
if (!visible.value || !props.preventAccidentalClose)
|
|
376
|
+
return;
|
|
377
|
+
if (blockedCloseTimer) {
|
|
378
|
+
clearTimeout(blockedCloseTimer);
|
|
379
|
+
blockedCloseTimer = null;
|
|
380
|
+
}
|
|
381
|
+
blockedCloseWarning.value = false;
|
|
382
|
+
if (env.hasWindow())
|
|
383
|
+
void cardRef.value?.offsetWidth;
|
|
384
|
+
blockedCloseWarning.value = true;
|
|
385
|
+
blockedCloseTimer = setTimeout(() => {
|
|
386
|
+
blockedCloseWarning.value = false;
|
|
387
|
+
blockedCloseTimer = null;
|
|
388
|
+
}, 720);
|
|
389
|
+
}
|
|
390
|
+
vue.watch(
|
|
391
|
+
() => props.expanded,
|
|
392
|
+
(value) => {
|
|
393
|
+
if (typeof value === "boolean")
|
|
394
|
+
syncExpanded(value);
|
|
395
|
+
}
|
|
396
|
+
);
|
|
397
|
+
vue.watch(
|
|
398
|
+
() => props.animating,
|
|
399
|
+
(value) => {
|
|
400
|
+
if (typeof value === "boolean")
|
|
401
|
+
syncAnimating(value);
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
vue.watch(expanded, (value) => emit("update:expanded", value));
|
|
405
|
+
vue.watch(animating, (value) => emit("update:animating", value));
|
|
406
|
+
const bodyScrollLocked = vue.ref(false);
|
|
407
|
+
function clearTween() {
|
|
408
|
+
if (!tween)
|
|
409
|
+
return;
|
|
410
|
+
tween.kill();
|
|
411
|
+
tween = null;
|
|
412
|
+
}
|
|
413
|
+
function clearStackTween() {
|
|
414
|
+
if (!stackTween)
|
|
415
|
+
return;
|
|
416
|
+
stackTween.kill();
|
|
417
|
+
stackTween = null;
|
|
418
|
+
}
|
|
419
|
+
function isSameStackState(current, next) {
|
|
420
|
+
if (!current)
|
|
421
|
+
return false;
|
|
422
|
+
return Math.abs(current.y - next.y) <= STACK_STATE_EPSILON && Math.abs(current.scale - next.scale) <= STACK_STATE_EPSILON && Math.abs(current.opacity - next.opacity) <= STACK_STATE_EPSILON;
|
|
423
|
+
}
|
|
424
|
+
function resolveCardSize(card) {
|
|
425
|
+
if (!card)
|
|
426
|
+
return { width: 0, height: 0 };
|
|
427
|
+
const widthByOffset = card.offsetWidth || 0;
|
|
428
|
+
const heightByOffset = card.offsetHeight || 0;
|
|
429
|
+
if (widthByOffset > 0 && heightByOffset > 0) {
|
|
430
|
+
return {
|
|
431
|
+
width: widthByOffset,
|
|
432
|
+
height: heightByOffset
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
let widthByStyle = 0;
|
|
436
|
+
let heightByStyle = 0;
|
|
437
|
+
if (env.hasWindow()) {
|
|
438
|
+
const cardStyles = getComputedStyle(card);
|
|
439
|
+
widthByStyle = Number.parseFloat(cardStyles.width) || 0;
|
|
440
|
+
heightByStyle = Number.parseFloat(cardStyles.height) || 0;
|
|
441
|
+
}
|
|
442
|
+
if (widthByStyle > 0 && heightByStyle > 0) {
|
|
443
|
+
return {
|
|
444
|
+
width: widthByStyle,
|
|
445
|
+
height: heightByStyle
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
const rect = card.getBoundingClientRect();
|
|
449
|
+
return {
|
|
450
|
+
width: rect.width || 0,
|
|
451
|
+
height: rect.height || 0
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
function upsertStackEntry() {
|
|
455
|
+
if (!env.hasWindow()) {
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
if (!visible.value) {
|
|
459
|
+
removeStackEntry();
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
const size = resolveCardSize(cardRef.value);
|
|
463
|
+
const nextEntry = {
|
|
464
|
+
id: instanceId,
|
|
465
|
+
zIndex: zIndex.value,
|
|
466
|
+
openSequence: openSequence.value,
|
|
467
|
+
width: size.width,
|
|
468
|
+
height: size.height,
|
|
469
|
+
visible: true,
|
|
470
|
+
globalMask: props.globalMask,
|
|
471
|
+
maskClass: props.maskClass
|
|
472
|
+
};
|
|
473
|
+
const previousEntry = overlayStackRegistry.get(instanceId);
|
|
474
|
+
if (previousEntry && previousEntry.zIndex === nextEntry.zIndex && previousEntry.openSequence === nextEntry.openSequence && previousEntry.width === nextEntry.width && previousEntry.height === nextEntry.height && previousEntry.visible === nextEntry.visible && previousEntry.globalMask === nextEntry.globalMask && previousEntry.maskClass === nextEntry.maskClass) {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
overlayStackRegistry.set(instanceId, nextEntry);
|
|
478
|
+
markOverlayStackChanged();
|
|
479
|
+
}
|
|
480
|
+
function removeStackEntry() {
|
|
481
|
+
if (!overlayStackRegistry.has(instanceId))
|
|
482
|
+
return;
|
|
483
|
+
overlayStackRegistry.delete(instanceId);
|
|
484
|
+
markOverlayStackChanged();
|
|
485
|
+
}
|
|
486
|
+
function applyStackCardState(forceImmediate = false) {
|
|
487
|
+
const card = cardRef.value;
|
|
488
|
+
if (!card)
|
|
489
|
+
return;
|
|
490
|
+
if (!visible.value || !expanded.value || animating.value) {
|
|
491
|
+
clearStackTween();
|
|
492
|
+
appliedStackState = null;
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
const { translateY, scale, opacity } = stackMeta.value;
|
|
496
|
+
const nextState = {
|
|
497
|
+
y: translateY,
|
|
498
|
+
scale,
|
|
499
|
+
opacity
|
|
500
|
+
};
|
|
501
|
+
if (!forceImmediate && isSameStackState(appliedStackState, nextState))
|
|
502
|
+
return;
|
|
503
|
+
clearStackTween();
|
|
504
|
+
if (forceImmediate || stackMeta.value.depth === 0) {
|
|
505
|
+
gsap.set(card, {
|
|
506
|
+
y: translateY,
|
|
507
|
+
scaleX: scale,
|
|
508
|
+
scaleY: scale,
|
|
509
|
+
opacity
|
|
510
|
+
});
|
|
511
|
+
appliedStackState = nextState;
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
appliedStackState = nextState;
|
|
515
|
+
stackTween = gsap.to(card, {
|
|
516
|
+
y: translateY,
|
|
517
|
+
scaleX: scale,
|
|
518
|
+
scaleY: scale,
|
|
519
|
+
opacity,
|
|
520
|
+
duration: 0.26,
|
|
521
|
+
ease: "power2.out",
|
|
522
|
+
overwrite: "auto",
|
|
523
|
+
onComplete: () => {
|
|
524
|
+
stackTween = null;
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
function lockBodyScroll() {
|
|
529
|
+
if (!env.hasWindow())
|
|
530
|
+
return;
|
|
531
|
+
const body = window.document.body;
|
|
532
|
+
if (!body)
|
|
533
|
+
return;
|
|
534
|
+
const currentCount = Number.parseInt(body.dataset[bodyLockCountKey] || "0", 10);
|
|
535
|
+
if (currentCount === 0) {
|
|
536
|
+
body.dataset[bodyLockOverflowKey] = body.style.overflow || "";
|
|
537
|
+
body.dataset[bodyLockPaddingKey] = body.style.paddingRight || "";
|
|
538
|
+
const scrollbarWidth = window.innerWidth - window.document.documentElement.clientWidth;
|
|
539
|
+
body.style.overflow = "hidden";
|
|
540
|
+
if (scrollbarWidth > 0)
|
|
541
|
+
body.style.paddingRight = `${scrollbarWidth}px`;
|
|
542
|
+
}
|
|
543
|
+
body.dataset[bodyLockCountKey] = String(currentCount + 1);
|
|
544
|
+
}
|
|
545
|
+
function unlockBodyScroll() {
|
|
546
|
+
if (!env.hasWindow())
|
|
547
|
+
return;
|
|
548
|
+
const body = window.document.body;
|
|
549
|
+
if (!body)
|
|
550
|
+
return;
|
|
551
|
+
const currentCount = Number.parseInt(body.dataset[bodyLockCountKey] || "0", 10);
|
|
552
|
+
if (currentCount <= 0)
|
|
553
|
+
return;
|
|
554
|
+
const nextCount = currentCount - 1;
|
|
555
|
+
if (nextCount === 0) {
|
|
556
|
+
body.style.overflow = body.dataset[bodyLockOverflowKey] || "";
|
|
557
|
+
body.style.paddingRight = body.dataset[bodyLockPaddingKey] || "";
|
|
558
|
+
delete body.dataset[bodyLockCountKey];
|
|
559
|
+
delete body.dataset[bodyLockOverflowKey];
|
|
560
|
+
delete body.dataset[bodyLockPaddingKey];
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
body.dataset[bodyLockCountKey] = String(nextCount);
|
|
564
|
+
}
|
|
565
|
+
function resolveSource() {
|
|
566
|
+
if (!env.hasWindow()) {
|
|
567
|
+
sourceRect.value = null;
|
|
568
|
+
sourceRadius.value = null;
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
const source = props.source;
|
|
572
|
+
if (!source) {
|
|
573
|
+
sourceRect.value = null;
|
|
574
|
+
sourceRadius.value = props.sourceRadius ?? null;
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
if (source instanceof HTMLElement) {
|
|
578
|
+
sourceRect.value = source.getBoundingClientRect();
|
|
579
|
+
sourceRadius.value = props.sourceRadius ?? getComputedStyle(source).borderRadius;
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
sourceRect.value = source;
|
|
583
|
+
sourceRadius.value = props.sourceRadius ?? null;
|
|
584
|
+
}
|
|
585
|
+
function resolveTilt() {
|
|
586
|
+
if (!props.randomTilt) {
|
|
587
|
+
tilt.value = { x: 0, y: 0 };
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
const tiltX = (Math.random() > 0.5 ? 1 : -1) * (props.rotateX + Math.random() * props.tiltRange);
|
|
591
|
+
const tiltY = (Math.random() > 0.5 ? 1 : -1) * (props.rotateY + Math.random() * props.tiltRange);
|
|
592
|
+
tilt.value = { x: tiltX, y: tiltY };
|
|
593
|
+
}
|
|
594
|
+
function applySpeedBoost() {
|
|
595
|
+
if (!tween)
|
|
596
|
+
return;
|
|
597
|
+
if (tween.progress() > props.speedBoostAt)
|
|
598
|
+
tween.timeScale(props.speedBoost);
|
|
599
|
+
}
|
|
600
|
+
function startOpenAnimation(currentRunId) {
|
|
601
|
+
const card = cardRef.value;
|
|
602
|
+
const from = sourceRect.value;
|
|
603
|
+
if (!card || !env.hasWindow()) {
|
|
604
|
+
syncExpanded(true);
|
|
605
|
+
syncAnimating(false);
|
|
606
|
+
emit("opened");
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
if (!from) {
|
|
610
|
+
const visibleStackCount = getVisibleOverlayStackEntries().length;
|
|
611
|
+
const isStackPushOpen = visibleStackCount > 1;
|
|
612
|
+
if (isStackPushOpen) {
|
|
613
|
+
clearTween();
|
|
614
|
+
clearStackTween();
|
|
615
|
+
syncAnimating(true);
|
|
616
|
+
gsap.set(card, {
|
|
617
|
+
autoAlpha: 0,
|
|
618
|
+
xPercent: -50,
|
|
619
|
+
yPercent: -50,
|
|
620
|
+
x: 0,
|
|
621
|
+
y: 10,
|
|
622
|
+
scaleX: 0.985,
|
|
623
|
+
scaleY: 0.985
|
|
624
|
+
});
|
|
625
|
+
syncExpanded(true);
|
|
626
|
+
tween = gsap.to(card, {
|
|
627
|
+
autoAlpha: 1,
|
|
628
|
+
y: 0,
|
|
629
|
+
scaleX: 1,
|
|
630
|
+
scaleY: 1,
|
|
631
|
+
duration: 0.22,
|
|
632
|
+
ease: "power2.out",
|
|
633
|
+
overwrite: true,
|
|
634
|
+
onComplete: () => {
|
|
635
|
+
if (currentRunId !== runId)
|
|
636
|
+
return;
|
|
637
|
+
syncAnimating(false);
|
|
638
|
+
tween = null;
|
|
639
|
+
emit("opened");
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
gsap.set(card, {
|
|
645
|
+
autoAlpha: 1,
|
|
646
|
+
xPercent: -50,
|
|
647
|
+
yPercent: -50,
|
|
648
|
+
x: 0,
|
|
649
|
+
y: 0,
|
|
650
|
+
scaleX: 1,
|
|
651
|
+
scaleY: 1
|
|
652
|
+
});
|
|
653
|
+
syncExpanded(true);
|
|
654
|
+
syncAnimating(false);
|
|
655
|
+
emit("opened");
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
const fromCenterX = from.left + from.width / 2;
|
|
659
|
+
const fromCenterY = from.top + from.height / 2;
|
|
660
|
+
const viewportCenterX = window.innerWidth / 2;
|
|
661
|
+
const viewportCenterY = window.innerHeight / 2;
|
|
662
|
+
const translateX = fromCenterX - viewportCenterX;
|
|
663
|
+
const translateY = fromCenterY - viewportCenterY;
|
|
664
|
+
const to = card.getBoundingClientRect();
|
|
665
|
+
const scaleX = from.width / to.width;
|
|
666
|
+
const scaleY = from.height / to.height;
|
|
667
|
+
const targetRadius = getComputedStyle(card).borderRadius;
|
|
668
|
+
const initialRadius = sourceRadius.value || targetRadius;
|
|
669
|
+
const tiltValue = tilt.value;
|
|
670
|
+
clearTween();
|
|
671
|
+
clearStackTween();
|
|
672
|
+
syncAnimating(true);
|
|
673
|
+
gsap.set(card, {
|
|
674
|
+
xPercent: -50,
|
|
675
|
+
yPercent: -50,
|
|
676
|
+
x: translateX,
|
|
677
|
+
y: translateY,
|
|
678
|
+
scaleX,
|
|
679
|
+
scaleY,
|
|
680
|
+
rotateX: tiltValue.x,
|
|
681
|
+
rotateY: tiltValue.y,
|
|
682
|
+
transformPerspective: props.perspective,
|
|
683
|
+
borderRadius: initialRadius,
|
|
684
|
+
autoAlpha: 1
|
|
685
|
+
});
|
|
686
|
+
syncExpanded(true);
|
|
687
|
+
tween = gsap.to(card, {
|
|
688
|
+
x: 0,
|
|
689
|
+
y: 0,
|
|
690
|
+
scaleX: 1,
|
|
691
|
+
scaleY: 1,
|
|
692
|
+
rotateX: 0,
|
|
693
|
+
rotateY: 0,
|
|
694
|
+
borderRadius: targetRadius,
|
|
695
|
+
duration: props.duration / 1e3,
|
|
696
|
+
ease: props.easeOut,
|
|
697
|
+
overwrite: true,
|
|
698
|
+
onUpdate: applySpeedBoost,
|
|
699
|
+
onComplete: () => {
|
|
700
|
+
if (currentRunId !== runId)
|
|
701
|
+
return;
|
|
702
|
+
syncAnimating(false);
|
|
703
|
+
tween = null;
|
|
704
|
+
emit("opened");
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
tween.timeScale(1);
|
|
708
|
+
}
|
|
709
|
+
function startCloseAnimation(currentRunId) {
|
|
710
|
+
const card = cardRef.value;
|
|
711
|
+
const from = sourceRect.value;
|
|
712
|
+
if (!card || !env.hasWindow() || !from) {
|
|
713
|
+
visible.value = false;
|
|
714
|
+
syncAnimating(false);
|
|
715
|
+
removeStackEntry();
|
|
716
|
+
if (props.modelValue)
|
|
717
|
+
emit("update:modelValue", false);
|
|
718
|
+
emit("closed");
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
const fromCenterX = from.left + from.width / 2;
|
|
722
|
+
const fromCenterY = from.top + from.height / 2;
|
|
723
|
+
const viewportCenterX = window.innerWidth / 2;
|
|
724
|
+
const viewportCenterY = window.innerHeight / 2;
|
|
725
|
+
const translateX = fromCenterX - viewportCenterX;
|
|
726
|
+
const translateY = fromCenterY - viewportCenterY;
|
|
727
|
+
const to = card.getBoundingClientRect();
|
|
728
|
+
const scaleX = from.width / to.width;
|
|
729
|
+
const scaleY = from.height / to.height;
|
|
730
|
+
const tiltValue = tilt.value;
|
|
731
|
+
clearTween();
|
|
732
|
+
clearStackTween();
|
|
733
|
+
syncAnimating(true);
|
|
734
|
+
tween = gsap.to(card, {
|
|
735
|
+
x: translateX,
|
|
736
|
+
y: translateY,
|
|
737
|
+
scaleX,
|
|
738
|
+
scaleY,
|
|
739
|
+
rotateX: tiltValue.x,
|
|
740
|
+
rotateY: tiltValue.y,
|
|
741
|
+
borderRadius: sourceRadius.value || getComputedStyle(card).borderRadius,
|
|
742
|
+
duration: props.duration / 1e3,
|
|
743
|
+
ease: props.easeIn,
|
|
744
|
+
overwrite: true,
|
|
745
|
+
onUpdate: applySpeedBoost,
|
|
746
|
+
onComplete: () => {
|
|
747
|
+
if (currentRunId !== runId)
|
|
748
|
+
return;
|
|
749
|
+
visible.value = false;
|
|
750
|
+
syncAnimating(false);
|
|
751
|
+
removeStackEntry();
|
|
752
|
+
tween = null;
|
|
753
|
+
emit("update:modelValue", false);
|
|
754
|
+
emit("closed");
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
tween.timeScale(1);
|
|
758
|
+
}
|
|
759
|
+
function requestOpen() {
|
|
760
|
+
zIndex.value = zIndexManager.nextZIndex();
|
|
761
|
+
openSequence.value = nextOverlayOpenSequence();
|
|
762
|
+
if (!env.hasWindow()) {
|
|
763
|
+
visible.value = true;
|
|
764
|
+
syncExpanded(true);
|
|
765
|
+
emit("opened");
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
visible.value = true;
|
|
769
|
+
upsertStackEntry();
|
|
770
|
+
runId += 1;
|
|
771
|
+
const currentRunId = runId;
|
|
772
|
+
resolveSource();
|
|
773
|
+
resolveTilt();
|
|
774
|
+
syncExpanded(false);
|
|
775
|
+
emit("open");
|
|
776
|
+
vue.nextTick(() => {
|
|
777
|
+
if (currentRunId !== runId)
|
|
778
|
+
return;
|
|
779
|
+
upsertStackEntry();
|
|
780
|
+
startOpenAnimation(currentRunId);
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
function requestClose() {
|
|
784
|
+
if (!visible.value)
|
|
785
|
+
return;
|
|
786
|
+
runId += 1;
|
|
787
|
+
const currentRunId = runId;
|
|
788
|
+
syncExpanded(false);
|
|
789
|
+
emit("close");
|
|
790
|
+
vue.nextTick(() => {
|
|
791
|
+
if (currentRunId !== runId)
|
|
792
|
+
return;
|
|
793
|
+
startCloseAnimation(currentRunId);
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
function handleMaskClick() {
|
|
797
|
+
if (props.preventAccidentalClose) {
|
|
798
|
+
triggerBlockedCloseWarning();
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
if (!props.maskClosable)
|
|
802
|
+
return;
|
|
803
|
+
requestClose();
|
|
804
|
+
}
|
|
805
|
+
function handleBeforeUnload(event) {
|
|
806
|
+
if (!visible.value || !props.preventAccidentalClose)
|
|
807
|
+
return;
|
|
808
|
+
triggerBlockedCloseWarning();
|
|
809
|
+
event.preventDefault();
|
|
810
|
+
event.returnValue = "";
|
|
811
|
+
}
|
|
812
|
+
function bindPageExitGuard() {
|
|
813
|
+
if (!env.hasWindow() || pageExitGuardBound)
|
|
814
|
+
return;
|
|
815
|
+
window.addEventListener("beforeunload", handleBeforeUnload);
|
|
816
|
+
pageExitGuardBound = true;
|
|
817
|
+
}
|
|
818
|
+
function unbindPageExitGuard() {
|
|
819
|
+
if (!env.hasWindow() || !pageExitGuardBound)
|
|
820
|
+
return;
|
|
821
|
+
window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
822
|
+
pageExitGuardBound = false;
|
|
823
|
+
}
|
|
824
|
+
vue.watch(
|
|
825
|
+
() => props.modelValue,
|
|
826
|
+
(value) => {
|
|
827
|
+
if (value) {
|
|
828
|
+
requestOpen();
|
|
829
|
+
} else if (visible.value) {
|
|
830
|
+
requestClose();
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
{ immediate: true }
|
|
834
|
+
);
|
|
835
|
+
vue.watch(
|
|
836
|
+
() => [
|
|
837
|
+
visible.value,
|
|
838
|
+
expanded.value,
|
|
839
|
+
animating.value,
|
|
840
|
+
zIndex.value,
|
|
841
|
+
openSequence.value,
|
|
842
|
+
props.globalMask,
|
|
843
|
+
props.maskClass,
|
|
844
|
+
localStackVersion.value
|
|
845
|
+
],
|
|
846
|
+
() => {
|
|
847
|
+
upsertStackEntry();
|
|
848
|
+
applyStackCardState();
|
|
849
|
+
},
|
|
850
|
+
{ immediate: true, flush: "post" }
|
|
851
|
+
);
|
|
852
|
+
vue.watch(
|
|
853
|
+
cardRef,
|
|
854
|
+
() => {
|
|
855
|
+
upsertStackEntry();
|
|
856
|
+
applyStackCardState(true);
|
|
857
|
+
},
|
|
858
|
+
{ flush: "post" }
|
|
859
|
+
);
|
|
860
|
+
vue.watch(
|
|
861
|
+
visible,
|
|
862
|
+
(value) => {
|
|
863
|
+
if (value && !bodyScrollLocked.value) {
|
|
864
|
+
lockBodyScroll();
|
|
865
|
+
bodyScrollLocked.value = true;
|
|
866
|
+
return;
|
|
867
|
+
}
|
|
868
|
+
if (!value && bodyScrollLocked.value) {
|
|
869
|
+
unlockBodyScroll();
|
|
870
|
+
bodyScrollLocked.value = false;
|
|
871
|
+
}
|
|
872
|
+
},
|
|
873
|
+
{ immediate: true }
|
|
874
|
+
);
|
|
875
|
+
vue.watch(
|
|
876
|
+
[visible, () => props.preventAccidentalClose],
|
|
877
|
+
([isVisible, preventAccidentalClose]) => {
|
|
878
|
+
if (isVisible && preventAccidentalClose) {
|
|
879
|
+
bindPageExitGuard();
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
882
|
+
unbindPageExitGuard();
|
|
883
|
+
if (!isVisible)
|
|
884
|
+
clearBlockedCloseWarning();
|
|
885
|
+
},
|
|
886
|
+
{ immediate: true }
|
|
887
|
+
);
|
|
888
|
+
vue.onBeforeUnmount(() => {
|
|
889
|
+
unsubscribeStackChange();
|
|
890
|
+
clearTween();
|
|
891
|
+
clearStackTween();
|
|
892
|
+
unbindPageExitGuard();
|
|
893
|
+
clearBlockedCloseWarning();
|
|
894
|
+
removeStackEntry();
|
|
895
|
+
if (bodyScrollLocked.value) {
|
|
896
|
+
unlockBodyScroll();
|
|
897
|
+
bodyScrollLocked.value = false;
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
__expose({
|
|
901
|
+
close: requestClose
|
|
902
|
+
});
|
|
903
|
+
const slotProps = vue.computed(() => ({
|
|
904
|
+
close: requestClose,
|
|
905
|
+
expanded: expanded.value,
|
|
906
|
+
animating: animating.value,
|
|
907
|
+
closable: props.closable,
|
|
908
|
+
headerTitle: props.headerTitle || void 0,
|
|
909
|
+
headerDesc: props.headerDesc || void 0
|
|
910
|
+
}));
|
|
911
|
+
return (_ctx, _cache) => {
|
|
912
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
913
|
+
name: transitionName.value,
|
|
914
|
+
css: useMaskCssTransition.value
|
|
915
|
+
}, {
|
|
916
|
+
default: vue.withCtx(() => [
|
|
917
|
+
visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
918
|
+
key: 0,
|
|
919
|
+
class: vue.normalizeClass(maskClassName.value),
|
|
920
|
+
style: vue.normalizeStyle(maskStyle.value),
|
|
921
|
+
onClick: handleMaskClick
|
|
922
|
+
}, [
|
|
923
|
+
props.globalMask && stackMeta.value.isMaskOwner && stackMeta.value.stackSize <= 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1)) : vue.createCommentVNode("", true),
|
|
924
|
+
vue.createElementVNode("div", {
|
|
925
|
+
ref_key: "cardRef",
|
|
926
|
+
ref: cardRef,
|
|
927
|
+
class: vue.normalizeClass(cardClassName.value),
|
|
928
|
+
style: vue.normalizeStyle(props.cardStyle),
|
|
929
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
930
|
+
}, ["stop"]))
|
|
931
|
+
}, [
|
|
932
|
+
vue.createVNode(TxBaseSurface_vue_vue_type_script_setup_true_lang.default, {
|
|
933
|
+
class: "TxFlipOverlay-Surface",
|
|
934
|
+
preset: "card",
|
|
935
|
+
fake: "",
|
|
936
|
+
mode: surfaceMode.value,
|
|
937
|
+
color: surfaceColor.value,
|
|
938
|
+
opacity: surfaceOpacity.value,
|
|
939
|
+
moving: animating.value
|
|
940
|
+
}, null, 8, ["mode", "color", "opacity", "moving"]),
|
|
941
|
+
vue.createElementVNode("div", {
|
|
942
|
+
class: vue.normalizeClass(shellClassName.value)
|
|
943
|
+
}, [
|
|
944
|
+
hasCustomHeaderSlot.value ? vue.renderSlot(_ctx.$slots, "header", vue.normalizeProps(vue.mergeProps({ key: 0 }, slotProps.value))) : shouldRenderBuiltInHeader.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
945
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
946
|
+
vue.renderSlot(_ctx.$slots, "header-display", vue.normalizeProps(vue.guardReactiveProps(slotProps.value)), () => [
|
|
947
|
+
props.headerTitle ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_4, vue.toDisplayString(props.headerTitle), 1)) : vue.createCommentVNode("", true),
|
|
948
|
+
props.headerDesc ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5, vue.toDisplayString(props.headerDesc), 1)) : vue.createCommentVNode("", true)
|
|
949
|
+
])
|
|
950
|
+
]),
|
|
951
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
952
|
+
vue.renderSlot(_ctx.$slots, "header-actions", vue.normalizeProps(vue.guardReactiveProps(slotProps.value))),
|
|
953
|
+
props.closable ? vue.renderSlot(_ctx.$slots, "header-close", vue.normalizeProps(vue.mergeProps({ key: 0 }, slotProps.value)), () => [
|
|
954
|
+
vue.createVNode(button_vue_vue_type_script_setup_true_lang.default, {
|
|
955
|
+
circle: "",
|
|
956
|
+
class: "TxFlipOverlay-Close",
|
|
957
|
+
"aria-label": props.closeAriaLabel,
|
|
958
|
+
onClick: requestClose
|
|
959
|
+
}, {
|
|
960
|
+
default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
961
|
+
vue.createElementVNode("span", {
|
|
962
|
+
class: "i-carbon-close w-4 h-4 text-lg inline-flex",
|
|
963
|
+
"aria-hidden": "true"
|
|
964
|
+
}, null, -1)
|
|
965
|
+
])]),
|
|
966
|
+
_: 1
|
|
967
|
+
}, 8, ["aria-label"])
|
|
968
|
+
]) : vue.createCommentVNode("", true)
|
|
969
|
+
])
|
|
970
|
+
])) : vue.createCommentVNode("", true),
|
|
971
|
+
vue.createElementVNode("div", {
|
|
972
|
+
class: vue.normalizeClass(bodyClassName.value)
|
|
973
|
+
}, [
|
|
974
|
+
vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(slotProps.value)))
|
|
975
|
+
], 2)
|
|
976
|
+
], 2)
|
|
977
|
+
], 6)
|
|
978
|
+
], 6)) : vue.createCommentVNode("", true)
|
|
979
|
+
]),
|
|
980
|
+
_: 3
|
|
981
|
+
}, 8, ["name", "css"]);
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
});
|
|
985
|
+
|
|
986
|
+
exports.default = _sfc_main;
|