@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
package/README.md
CHANGED
|
@@ -2,269 +2,97 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<img src="https://img.shields.io/npm/v/@talex-touch/tuffex?style=flat-square&logo=npm&color=ff6b6b" alt="NPM Version">
|
|
5
|
-
<img src="https://img.shields.io/badge/
|
|
6
|
-
<img src="https://img.shields.io/badge/
|
|
7
|
-
<img src="https://img.shields.io/badge/TypeScript-5.8-3178c6?style=flat-square&logo=typescript" alt="TypeScript">
|
|
8
|
-
<img src="https://img.shields.io/github/license/talex-touch/tuff?style=flat-square" alt="License">
|
|
9
|
-
<img src="https://img.shields.io/badge/bundle%20size-<50kb-brightgreen?style=flat-square" alt="Bundle Size">
|
|
10
|
-
<img src="https://img.shields.io/badge/tree%20shaking-✓-success?style=flat-square" alt="Tree Shaking">
|
|
5
|
+
<img src="https://img.shields.io/badge/Vue-3.5+-4fc08d?style=flat-square&logo=vue.js" alt="Vue 3.5+">
|
|
6
|
+
<img src="https://img.shields.io/badge/tree%20shaking-%E2%9C%93-success?style=flat-square" alt="Tree Shaking">
|
|
11
7
|
</p>
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
<strong>🎭 TuffEx · Beautiful Animations · Living Component Library</strong>
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
<p align="center">
|
|
18
|
-
A modern Vue3 component library focused on <strong>tactile experience</strong> and <strong>smooth animations</strong><br/>
|
|
19
|
-
Part of the <a href="https://tuffex.tagzxia.com">Tuff</a> ecosystem - bringing life to every interaction
|
|
20
|
-
</p>
|
|
21
|
-
|
|
22
|
-
<p align="center">
|
|
23
|
-
<a href="#-getting-started">Getting Started</a> ·
|
|
24
|
-
<a href="#-components">Components</a> ·
|
|
25
|
-
<a href="#-design-philosophy">Design Philosophy</a> ·
|
|
26
|
-
<a href="#%EF%B8%8F-tech-stack">Tech Stack</a> ·
|
|
27
|
-
<a href="#-documentation">Documentation</a>
|
|
28
|
-
</p>
|
|
29
|
-
|
|
30
|
-
<p align="center">
|
|
31
|
-
<strong>English</strong> | <a href="README_ZHCN.md">简体中文</a>
|
|
32
|
-
</p>
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## ✨ Core Features
|
|
37
|
-
|
|
38
|
-
| Feature | Description |
|
|
39
|
-
|---------|-------------|
|
|
40
|
-
| **🎭 Living Tactile Experience** | Life-like touch feedback with elastic responses and damping effects |
|
|
41
|
-
| **🌊 Silky Animation System** | 60fps smooth animations based on Bézier curves and physics |
|
|
42
|
-
| **💎 Modern Visual Language** | Glassmorphism aesthetics with frosted glass and material effects |
|
|
43
|
-
| **⚡ Performance Optimized** | Vue3 Composition API with Tree Shaking, 50%+ smaller bundles |
|
|
44
|
-
| **🎨 Enterprise Design System** | Complete Design Tokens with WCAG 2.1 AA accessibility |
|
|
45
|
-
| **📱 Cross-Platform Ready** | Responsive design, PWA and SSR friendly |
|
|
46
|
-
| **🔗 Tuff Ecosystem** | Seamlessly integrated with the Tuff desktop application |
|
|
9
|
+
TuffEx is a Vue 3 component library in the Tuff ecosystem, focused on tactile interaction, animation, and desktop-style UI composition.
|
|
47
10
|
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
### 📦 Installation
|
|
51
|
-
|
|
52
|
-
Choose your preferred package manager:
|
|
11
|
+
## Installation
|
|
53
12
|
|
|
54
13
|
```bash
|
|
55
|
-
# npm
|
|
56
|
-
npm install @talex-touch/tuffex
|
|
57
|
-
|
|
58
|
-
# yarn
|
|
59
|
-
yarn add @talex-touch/tuffex
|
|
60
|
-
|
|
61
|
-
# pnpm (recommended)
|
|
62
14
|
pnpm add @talex-touch/tuffex
|
|
63
15
|
```
|
|
64
16
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
import { createApp } from 'vue'
|
|
69
|
-
import TuffUI from '@talex-touch/tuffex'
|
|
70
|
-
import '@talex-touch/tuffex/style.css'
|
|
71
|
-
|
|
72
|
-
const app = createApp(App)
|
|
73
|
-
app.use(TuffUI)
|
|
74
|
-
app.mount('#app')
|
|
75
|
-
```
|
|
17
|
+
## Usage
|
|
76
18
|
|
|
77
|
-
###
|
|
19
|
+
### Full import
|
|
78
20
|
|
|
79
|
-
```
|
|
21
|
+
```ts
|
|
80
22
|
import { createApp } from 'vue'
|
|
81
|
-
import
|
|
23
|
+
import TuffEx from '@talex-touch/tuffex'
|
|
82
24
|
import '@talex-touch/tuffex/style.css'
|
|
83
25
|
|
|
84
26
|
const app = createApp(App)
|
|
85
|
-
app.use(
|
|
86
|
-
app.use(TxAvatar)
|
|
27
|
+
app.use(TuffEx)
|
|
87
28
|
```
|
|
88
29
|
|
|
89
|
-
###
|
|
30
|
+
### On-demand import
|
|
90
31
|
|
|
91
|
-
```
|
|
32
|
+
```ts
|
|
92
33
|
import { createApp } from 'vue'
|
|
93
|
-
import
|
|
34
|
+
import { TxButton, TxCard, TxDrawer } from '@talex-touch/tuffex'
|
|
94
35
|
import '@talex-touch/tuffex/style.css'
|
|
95
36
|
|
|
96
37
|
const app = createApp(App)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
app.use(
|
|
100
|
-
theme: {
|
|
101
|
-
primaryColor: '#6366f1',
|
|
102
|
-
borderRadius: '12px',
|
|
103
|
-
animationDuration: '0.3s'
|
|
104
|
-
}
|
|
105
|
-
})
|
|
38
|
+
app.use(TxButton)
|
|
39
|
+
app.use(TxCard)
|
|
40
|
+
app.use(TxDrawer)
|
|
106
41
|
```
|
|
107
42
|
|
|
108
|
-
###
|
|
109
|
-
|
|
110
|
-
```vue
|
|
111
|
-
<template>
|
|
112
|
-
<div class="demo">
|
|
113
|
-
<!-- Tactile Button -->
|
|
114
|
-
<TxButton type="primary" @click="handleClick">
|
|
115
|
-
Feel the Touch
|
|
116
|
-
</TxButton>
|
|
43
|
+
### Utilities
|
|
117
44
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
src="https://example.com/avatar.jpg"
|
|
121
|
-
size="large"
|
|
122
|
-
glow
|
|
123
|
-
/>
|
|
124
|
-
|
|
125
|
-
<!-- Glass Card -->
|
|
126
|
-
<TxCard glass blur>
|
|
127
|
-
<h3>TuffEx</h3>
|
|
128
|
-
<p>Bringing life to every interaction</p>
|
|
129
|
-
</TxCard>
|
|
130
|
-
</div>
|
|
131
|
-
</template>
|
|
132
|
-
|
|
133
|
-
<script setup>
|
|
134
|
-
const handleClick = () => {
|
|
135
|
-
console.log('Can you feel it? This is TuffEx!')
|
|
136
|
-
}
|
|
137
|
-
</script>
|
|
45
|
+
```ts
|
|
46
|
+
import { createToastManager, useVibrate } from '@talex-touch/tuffex/utils'
|
|
138
47
|
```
|
|
139
48
|
|
|
140
|
-
##
|
|
141
|
-
|
|
142
|
-
TuffEx embodies an **interaction philosophy** - interfaces should feel alive and respond with warmth.
|
|
143
|
-
|
|
144
|
-
**Touch First** - Every interaction has soul through warm, textured feedback systems.
|
|
145
|
-
**Vitality** - Components breathe, express emotions, and anticipate user intentions.
|
|
146
|
-
**Flow Aesthetics** - Functional animations guide users while maintaining visual continuity.
|
|
147
|
-
**Material Experience** - Digital interfaces deserve real material sensations and textures.
|
|
148
|
-
|
|
149
|
-
## 🎨 Components
|
|
150
|
-
|
|
151
|
-
> 🚧 **Beta Version** - Currently in beta testing, more components coming soon!
|
|
152
|
-
|
|
153
|
-
### Available Components
|
|
49
|
+
## Component Inventory
|
|
154
50
|
|
|
155
|
-
|
|
156
|
-
|-----------|-------------|--------|
|
|
157
|
-
| **TxButton** | Tactile buttons with elastic feedback and ripple effects | ✅ Stable |
|
|
158
|
-
| **TxFlatButton** | Flat buttons with hover effects and loading states | ✅ Stable |
|
|
159
|
-
| **TxSwitch** | Toggle switches with smooth animations | ✅ Stable |
|
|
51
|
+
Current source-of-truth export modules: **102**.
|
|
160
52
|
|
|
161
|
-
|
|
53
|
+
- `Foundation & Navigation (19)`: `alert`, `avatar`, `badge`, `base-anchor`, `base-surface`, `breadcrumb`, `button`, `corner-overlay`, `icon`, `nav-bar`, `outline-border`, `status-badge`, `tab-bar`, `tabs`, `tag`, `tooltip`, `popover`, `dropdown-menu`, `context-menu`
|
|
54
|
+
- `Form & Input (22)`: `cascader`, `checkbox`, `code-editor`, `date-picker`, `flat-button`, `flat-input`, `flat-radio`, `flat-select`, `form`, `input`, `picker`, `radio`, `rating`, `search-input`, `search-select`, `segmented-slider`, `select`, `slider`, `switch`, `tag-input`, `tree-select`, `transfer`
|
|
55
|
+
- `Layout & Structure (12)`: `agents`, `auto-sizer`, `card-item`, `container`, `flex`, `grid`, `grid-layout`, `group-block`, `scroll`, `splitter`, `stack`, `virtual-list`
|
|
56
|
+
- `Data & State (21)`: `blank-slate`, `card`, `collapse`, `data-table`, `empty`, `empty-state`, `error-state`, `guide-state`, `layout-skeleton`, `loading-state`, `markdown-view`, `no-data`, `no-selection`, `offline-state`, `pagination`, `permission-state`, `search-empty`, `stat-card`, `steps`, `timeline`, `tree`
|
|
57
|
+
- `Feedback & Overlay (12)`: `command-palette`, `dialog`, `drawer`, `flip-overlay`, `floating`, `loading-overlay`, `modal`, `progress`, `progress-bar`, `skeleton`, `spinner`, `toast`
|
|
58
|
+
- `AI & Content (4)`: `chat`, `file-uploader`, `image-gallery`, `image-uploader`
|
|
59
|
+
- `Animation & Visual (12)`: `edge-fade-mask`, `fusion`, `glass-surface`, `glow-text`, `gradient-border`, `gradual-blur`, `keyframe-stroke-text`, `sortable-list`, `stagger`, `text-transformer`, `transition`, `tuff-logo-stroke`
|
|
162
60
|
|
|
163
|
-
|
|
164
|
-
|-----------|-------------|--------|
|
|
165
|
-
| **TxSelect** | Dropdown select with floating positioning | 🚧 In Progress |
|
|
166
|
-
| **TxInput** | Input fields with smooth focus transitions | 🚧 In Progress |
|
|
167
|
-
| **TxModal** | Modal dialogs with entrance animations | 📋 Planned |
|
|
168
|
-
| **TxCard** | Glass-morphism cards with shadow systems | 📋 Planned |
|
|
169
|
-
| **TxScroll** | Custom scrollbar with native feel | 📋 Planned |
|
|
170
|
-
| **TxTabs** | Tab navigation with indicator animations | 📋 Planned |
|
|
171
|
-
| **TxMenu** | Menu components with route integration | 📋 Planned |
|
|
172
|
-
| **TxBadge** | Status badges with pulse effects | 📋 Planned |
|
|
61
|
+
Reference:
|
|
173
62
|
|
|
174
|
-
|
|
63
|
+
- Export entry: `packages/components/src/components.ts`
|
|
64
|
+
- Docs index: [docs/components/index.md](./docs/components/index.md)
|
|
175
65
|
|
|
176
|
-
##
|
|
66
|
+
## Export Convention
|
|
177
67
|
|
|
178
|
-
|
|
68
|
+
- Preferred public names use `Tx*` prefix, for example `TxButton`, `TxDialog`.
|
|
69
|
+
- Some modules also keep compatibility aliases (for example `Button` / `TxButton` in certain modules).
|
|
70
|
+
- Type exports are included and can be consumed directly from `@talex-touch/tuffex`.
|
|
179
71
|
|
|
180
|
-
|
|
181
|
-
|------------|---------|---------|
|
|
182
|
-
| **Vue** | 3.5+ | Composition API with `<script setup>` |
|
|
183
|
-
| **TypeScript** | 5.8+ | Complete type safety |
|
|
184
|
-
| **Vite** | 6.0+ | Lightning-fast development |
|
|
185
|
-
| **VitePress** | 1.5+ | Documentation site |
|
|
186
|
-
| **Sass** | 1.89+ | Advanced styling |
|
|
187
|
-
| **VueUse** | 13.0+ | Composition utilities |
|
|
72
|
+
## Documentation
|
|
188
73
|
|
|
189
|
-
|
|
190
|
-
-
|
|
191
|
-
- Tree Shaking for optimized bundle size
|
|
192
|
-
- SCSS Mixins for consistent styling
|
|
74
|
+
- Online docs: [tuffex.tagzxia.com/docs/dev/tuffex](https://tuffex.tagzxia.com/docs/dev/tuffex)
|
|
75
|
+
- Local docs: `pnpm -C "packages/tuffex" run docs:dev`
|
|
193
76
|
|
|
194
|
-
##
|
|
195
|
-
|
|
196
|
-
- **[TuffEx Documentation](https://tuffex.tagzxia.com/docs/dev/tuffex)** - Official docs in Tuff ecosystem
|
|
197
|
-
- **[Component Docs](http://localhost:8000)** - Local VitePress documentation (run `pnpm docs:dev`)
|
|
198
|
-
|
|
199
|
-
## 🛠️ Development
|
|
77
|
+
## Development
|
|
200
78
|
|
|
201
79
|
```bash
|
|
202
|
-
# In monorepo root
|
|
203
80
|
pnpm install
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
pnpm
|
|
207
|
-
pnpm build # Build library with Gulp
|
|
208
|
-
pnpm build:vite # Build library with Vite
|
|
209
|
-
pnpm docs:build # Build documentation
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## 🗂️ Project Structure
|
|
213
|
-
|
|
214
|
-
This repository is a pnpm monorepo. TuffEx lives under `packages/tuffex`.
|
|
215
|
-
|
|
81
|
+
pnpm -C "packages/tuffex" run lint
|
|
82
|
+
pnpm -C "packages/tuffex" run build
|
|
83
|
+
pnpm -C "packages/tuffex" run docs:build
|
|
216
84
|
```
|
|
217
|
-
talex-touch/tuff
|
|
218
|
-
├── apps/ # Applications (Electron app, Nexus site, ...)
|
|
219
|
-
├── packages/
|
|
220
|
-
│ ├── tuffex/ # TuffEx package (this)
|
|
221
|
-
│ │ ├── packages/components/ # Component source
|
|
222
|
-
│ │ ├── packages/script/ # Build scripts (gulp/vite)
|
|
223
|
-
│ │ ├── docs/ # VitePress docs
|
|
224
|
-
│ │ └── utils/ # Scaffolding utilities
|
|
225
|
-
│ └── utils/ # Shared utilities
|
|
226
|
-
├── plugins/ # Example plugins
|
|
227
|
-
└── docs/ # Repo-level docs
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## 🔗 Integration with Tuff
|
|
231
|
-
|
|
232
|
-
TuffEx is designed to work seamlessly with the Tuff desktop application. Components are gradually being migrated from the core renderer to this standalone library for:
|
|
233
|
-
|
|
234
|
-
1. **Code Reuse** - Share UI components across projects
|
|
235
|
-
2. **Plugin Development** - Enable plugin developers to use consistent UI
|
|
236
|
-
3. **Community** - Allow external projects to adopt Tuff's design language
|
|
237
|
-
## 🤖 Intelligence & AI
|
|
238
|
-
|
|
239
|
-
- Pair TuffEx with `@talex-touch/tuff-intelligence` to build AI-driven flows (capabilities, prompts, provider routing).
|
|
240
|
-
- Frontend can call the unified intelligence client while reusing TuffEx components for configuration, testing, and auditing views.
|
|
241
|
-
|
|
242
|
-
## 🤝 Contributing
|
|
243
|
-
|
|
244
|
-
We welcome all contributions! Please read our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
245
85
|
|
|
246
|
-
|
|
247
|
-
- 💡 [Feature Requests](https://github.com/talex-touch/tuff/discussions)
|
|
248
|
-
- 🔧 [Submit PRs](https://github.com/talex-touch/tuff/pulls)
|
|
86
|
+
## Integration with Tuff
|
|
249
87
|
|
|
250
|
-
|
|
88
|
+
TuffEx is the UI foundation of the [Tuff](https://tuff.tagzxia.com) desktop application. Components are shared between the core app and external plugin developers through this standalone library.
|
|
251
89
|
|
|
252
|
-
|
|
90
|
+
## Contributing
|
|
253
91
|
|
|
254
|
-
|
|
92
|
+
- [Report Issues](https://github.com/talex-touch/tuff/issues)
|
|
93
|
+
- [Feature Requests](https://github.com/talex-touch/tuff/discussions)
|
|
94
|
+
- [Submit PRs](https://github.com/talex-touch/tuff/pulls)
|
|
255
95
|
|
|
256
|
-
|
|
257
|
-
<img src="https://i.imgur.com/pd3YUxf.png" width="120" height="120" alt="TuffEx Logo">
|
|
258
|
-
</p>
|
|
96
|
+
## License
|
|
259
97
|
|
|
260
|
-
|
|
261
|
-
<strong>🎭 Bringing life to every touch</strong><br/>
|
|
262
|
-
<em>TuffEx - Touchable Beautiful Animations</em>
|
|
263
|
-
</p>
|
|
264
|
-
|
|
265
|
-
<p align="center">
|
|
266
|
-
<a href="https://tuffex.tagzxia.com/docs/dev/tuffex">📖 Documentation</a> ·
|
|
267
|
-
<a href="https://github.com/talex-touch/tuff/tree/master/packages/tuffex">⭐ GitHub</a> ·
|
|
268
|
-
<a href="https://www.npmjs.com/package/@talex-touch/tuffex">📦 NPM</a> ·
|
|
269
|
-
<a href="https://github.com/talex-touch/tuff/discussions">💬 Discussions</a>
|
|
270
|
-
</p>
|
|
98
|
+
[MIT License](LICENSE) © 2025 TalexDreamSoul
|
package/dist/es/agents/index.js
CHANGED
package/dist/es/alert/index.d.ts
CHANGED
|
@@ -1 +1,104 @@
|
|
|
1
|
-
|
|
1
|
+
import { AlertEmits, AlertProps, AlertType } from './src/types';
|
|
2
|
+
import { default as component } from './src/TxAlert.vue';
|
|
3
|
+
|
|
4
|
+
declare const TxAlert: {
|
|
5
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
6
|
+
title: {
|
|
7
|
+
type: import('vue').PropType<string>;
|
|
8
|
+
};
|
|
9
|
+
type: {
|
|
10
|
+
type: import('vue').PropType<AlertType>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
message: {
|
|
14
|
+
type: import('vue').PropType<string>;
|
|
15
|
+
};
|
|
16
|
+
closable: {
|
|
17
|
+
type: import('vue').PropType<boolean>;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
showIcon: {
|
|
21
|
+
type: import('vue').PropType<boolean>;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{
|
|
25
|
+
onClose?: (() => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
27
|
+
close: () => void;
|
|
28
|
+
}, import('vue').PublicProps, {
|
|
29
|
+
type: AlertType;
|
|
30
|
+
closable: boolean;
|
|
31
|
+
showIcon: boolean;
|
|
32
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
33
|
+
P: {};
|
|
34
|
+
B: {};
|
|
35
|
+
D: {};
|
|
36
|
+
C: {};
|
|
37
|
+
M: {};
|
|
38
|
+
Defaults: {};
|
|
39
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
40
|
+
title: {
|
|
41
|
+
type: import('vue').PropType<string>;
|
|
42
|
+
};
|
|
43
|
+
type: {
|
|
44
|
+
type: import('vue').PropType<AlertType>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
message: {
|
|
48
|
+
type: import('vue').PropType<string>;
|
|
49
|
+
};
|
|
50
|
+
closable: {
|
|
51
|
+
type: import('vue').PropType<boolean>;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
showIcon: {
|
|
55
|
+
type: import('vue').PropType<boolean>;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
}>> & Readonly<{
|
|
59
|
+
onClose?: (() => any) | undefined;
|
|
60
|
+
}>, {}, {}, {}, {}, {
|
|
61
|
+
type: AlertType;
|
|
62
|
+
closable: boolean;
|
|
63
|
+
showIcon: boolean;
|
|
64
|
+
}>;
|
|
65
|
+
__isFragment?: never;
|
|
66
|
+
__isTeleport?: never;
|
|
67
|
+
__isSuspense?: never;
|
|
68
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
69
|
+
title: {
|
|
70
|
+
type: import('vue').PropType<string>;
|
|
71
|
+
};
|
|
72
|
+
type: {
|
|
73
|
+
type: import('vue').PropType<AlertType>;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
message: {
|
|
77
|
+
type: import('vue').PropType<string>;
|
|
78
|
+
};
|
|
79
|
+
closable: {
|
|
80
|
+
type: import('vue').PropType<boolean>;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
showIcon: {
|
|
84
|
+
type: import('vue').PropType<boolean>;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
}>> & Readonly<{
|
|
88
|
+
onClose?: (() => any) | undefined;
|
|
89
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
90
|
+
close: () => void;
|
|
91
|
+
}, string, {
|
|
92
|
+
type: AlertType;
|
|
93
|
+
closable: boolean;
|
|
94
|
+
showIcon: boolean;
|
|
95
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
96
|
+
$slots: {
|
|
97
|
+
title?(_: {}): any;
|
|
98
|
+
default?(_: {}): any;
|
|
99
|
+
};
|
|
100
|
+
}) & import('vue').Plugin;
|
|
101
|
+
export { TxAlert };
|
|
102
|
+
export type { AlertEmits, AlertProps, AlertType };
|
|
103
|
+
export type TxAlertInstance = InstanceType<typeof component>;
|
|
104
|
+
export default TxAlert;
|
|
@@ -8,6 +8,7 @@ interface Props {
|
|
|
8
8
|
showIcon?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare function __VLS_template(): {
|
|
11
|
+
title?(_: {}): any;
|
|
11
12
|
default?(_: {}): any;
|
|
12
13
|
};
|
|
13
14
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
@@ -2,6 +2,6 @@ import _sfc_main from './TxAlert.vue2.js';
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.js';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const component = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3824654e"]]);
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { component as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, createBlock, resolveDynamicComponent,
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, createBlock, resolveDynamicComponent, renderSlot, createTextVNode, toDisplayString, createVNode, unref } from 'vue';
|
|
2
2
|
import { TxIcon } from '../../icon/index.js';
|
|
3
3
|
|
|
4
4
|
const _hoisted_1 = {
|
|
@@ -48,7 +48,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
48
|
(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))
|
|
49
49
|
])) : createCommentVNode("", true),
|
|
50
50
|
createElementVNode("div", _hoisted_2, [
|
|
51
|
-
__props.title ? (openBlock(), createElementBlock("div", _hoisted_3,
|
|
51
|
+
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
52
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
53
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
54
|
+
], true)
|
|
55
|
+
])) : createCommentVNode("", true),
|
|
52
56
|
createElementVNode("div", _hoisted_4, [
|
|
53
57
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
54
58
|
createTextVNode(toDisplayString(__props.message), 1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, useAttrs, ref, computed, createBlock, openBlock, resolveDynamicComponent, mergeProps, withCtx, normalizeClass, renderSlot, nextTick } from 'vue';
|
|
2
|
-
import { useAutoResize } from '../../utils/animation/auto-resize.js';
|
|
3
|
-
import { useFlip } from '../../utils/animation/flip.js';
|
|
2
|
+
import { useAutoResize } from '../../packages/tuffex/packages/utils/animation/auto-resize.js';
|
|
3
|
+
import { useFlip } from '../../packages/tuffex/packages/utils/animation/flip.js';
|
|
4
4
|
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
...{
|
package/dist/es/avatar/index.js
CHANGED
|
@@ -2,6 +2,6 @@ import _sfc_main from './TxAvatar.vue2.js';
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.js';
|
|
4
4
|
|
|
5
|
-
const TxAvatarComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const TxAvatarComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-173e1d49"]]);
|
|
6
6
|
|
|
7
7
|
export { TxAvatarComponent as default };
|
|
@@ -32,14 +32,55 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
const props = __props;
|
|
33
33
|
const emit = __emit;
|
|
34
34
|
const imageError = ref(false);
|
|
35
|
+
const sizePresets = /* @__PURE__ */ new Set(["small", "medium", "large", "xlarge"]);
|
|
36
|
+
const normalizedSize = computed(() => {
|
|
37
|
+
const size = props.size;
|
|
38
|
+
if (typeof size === "number") {
|
|
39
|
+
return size > 0 ? size : null;
|
|
40
|
+
}
|
|
41
|
+
if (typeof size === "string") {
|
|
42
|
+
if (sizePresets.has(size))
|
|
43
|
+
return null;
|
|
44
|
+
const pxMatch = size.match(/^(\d+(?:\.\d+)?)px$/);
|
|
45
|
+
if (pxMatch) {
|
|
46
|
+
const value2 = Number(pxMatch[1]);
|
|
47
|
+
return value2 > 0 ? value2 : null;
|
|
48
|
+
}
|
|
49
|
+
const value = Number(size);
|
|
50
|
+
if (!Number.isNaN(value) && value > 0)
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
});
|
|
55
|
+
const sizeClass = computed(() => {
|
|
56
|
+
const size = props.size;
|
|
57
|
+
if (typeof size === "string" && sizePresets.has(size))
|
|
58
|
+
return `tx-avatar--${size}`;
|
|
59
|
+
return void 0;
|
|
60
|
+
});
|
|
61
|
+
const sizeVars = computed(() => {
|
|
62
|
+
const size = normalizedSize.value;
|
|
63
|
+
if (!size)
|
|
64
|
+
return {};
|
|
65
|
+
const statusSize = Math.max(4, Math.round(size * 0.25));
|
|
66
|
+
const fontSize = Math.round(size * 0.25 + 4);
|
|
67
|
+
const statusBorder = Math.max(1, Math.round(statusSize * 0.16 * 2) / 2);
|
|
68
|
+
return {
|
|
69
|
+
"--tx-avatar-size": `${size}px`,
|
|
70
|
+
"--tx-avatar-font-size": `${fontSize}px`,
|
|
71
|
+
"--tx-avatar-status-size": `${statusSize}px`,
|
|
72
|
+
"--tx-avatar-status-border": `${statusBorder}px`
|
|
73
|
+
};
|
|
74
|
+
});
|
|
35
75
|
const customStyle = computed(() => {
|
|
76
|
+
const style = {
|
|
77
|
+
...sizeVars.value
|
|
78
|
+
};
|
|
36
79
|
if (props.backgroundColor) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"--tx-avatar-text": props.textColor || "#ffffff"
|
|
40
|
-
};
|
|
80
|
+
style["--tx-avatar-bg"] = props.backgroundColor;
|
|
81
|
+
style["--tx-avatar-text"] = props.textColor || "#ffffff";
|
|
41
82
|
}
|
|
42
|
-
return
|
|
83
|
+
return style;
|
|
43
84
|
});
|
|
44
85
|
const fallbackText = computed(() => {
|
|
45
86
|
const name = props.name?.trim();
|
|
@@ -65,7 +106,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
106
|
return (_ctx, _cache) => {
|
|
66
107
|
return openBlock(), createElementBlock("div", {
|
|
67
108
|
class: normalizeClass(["tx-avatar", [
|
|
68
|
-
|
|
109
|
+
sizeClass.value,
|
|
69
110
|
`tx-avatar--${__props.shape}`,
|
|
70
111
|
{ "tx-avatar--clickable": __props.clickable }
|
|
71
112
|
]]),
|
|
@@ -2,6 +2,6 @@ import _sfc_main from './TxAvatarGroup.vue2.js';
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.js';
|
|
4
4
|
|
|
5
|
-
const TxAvatarGroupComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const TxAvatarGroupComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d7754205"]]);
|
|
6
6
|
|
|
7
7
|
export { TxAvatarGroupComponent as default };
|
|
@@ -5,7 +5,7 @@ const _sfc_main = defineComponent({
|
|
|
5
5
|
name: "TxAvatarGroup",
|
|
6
6
|
props: {
|
|
7
7
|
max: { type: Number, required: false },
|
|
8
|
-
size: { type: String, required: false },
|
|
8
|
+
size: { type: [String, Number], required: false },
|
|
9
9
|
overlap: { type: [Number, String], default: 8 }
|
|
10
10
|
},
|
|
11
11
|
setup(props, { slots }) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type AvatarPresetSize = 'small' | 'medium' | 'large' | 'xlarge';
|
|
2
|
+
export type AvatarSize = AvatarPresetSize | number | `${number}` | `${number}px`;
|
|
2
3
|
export type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
3
4
|
export type AvatarShape = 'circle' | 'square' | 'rounded';
|
|
4
5
|
export interface AvatarProps {
|