stk-table-vue 0.8.13 → 0.9.0-beta.1

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.
Files changed (38) hide show
  1. package/README.md +172 -180
  2. package/lib/src/StkTable/StkTable.vue.d.ts +22 -2
  3. package/lib/src/StkTable/useScrollbar.d.ts +57 -0
  4. package/lib/src/StkTable/utils/index.d.ts +10 -0
  5. package/lib/stk-table-vue.js +563 -294
  6. package/lib/style.css +49 -2
  7. package/package.json +74 -72
  8. package/src/StkTable/StkTable.vue +1730 -1653
  9. package/src/StkTable/components/DragHandle.vue +9 -9
  10. package/src/StkTable/components/SortIcon.vue +6 -6
  11. package/src/StkTable/components/TriangleIcon.vue +3 -3
  12. package/src/StkTable/const.ts +50 -50
  13. package/src/StkTable/index.ts +4 -4
  14. package/src/StkTable/style.less +627 -580
  15. package/src/StkTable/types/highlightDimOptions.ts +26 -26
  16. package/src/StkTable/types/index.ts +297 -297
  17. package/src/StkTable/useAutoResize.ts +91 -91
  18. package/src/StkTable/useColResize.ts +216 -216
  19. package/src/StkTable/useFixedCol.ts +150 -148
  20. package/src/StkTable/useFixedStyle.ts +75 -75
  21. package/src/StkTable/useGetFixedColPosition.ts +65 -65
  22. package/src/StkTable/useHighlight.ts +257 -257
  23. package/src/StkTable/useKeyboardArrowScroll.ts +112 -112
  24. package/src/StkTable/useMaxRowSpan.ts +55 -55
  25. package/src/StkTable/useMergeCells.ts +120 -123
  26. package/src/StkTable/useRowExpand.ts +88 -88
  27. package/src/StkTable/useScrollRowByRow.ts +114 -79
  28. package/src/StkTable/useScrollbar.ts +187 -0
  29. package/src/StkTable/useThDrag.ts +102 -102
  30. package/src/StkTable/useTrDrag.ts +113 -118
  31. package/src/StkTable/useTree.ts +161 -161
  32. package/src/StkTable/useVirtualScroll.ts +494 -494
  33. package/src/StkTable/utils/constRefUtils.ts +29 -29
  34. package/src/StkTable/utils/index.ts +287 -242
  35. package/src/StkTable/utils/useTriggerRef.ts +33 -33
  36. package/src/VirtualTree.vue +622 -622
  37. package/src/VirtualTreeSelect.vue +367 -367
  38. package/src/vite-env.d.ts +10 -10
package/lib/style.css CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * name: stk-table-vue
3
+ * version: v0.9.0-beta.1
4
+ * description: High performance realtime virtual table for vue3 and vue2.7
5
+ * author: japlus
6
+ * homepage: https://ja-plus.github.io/stk-table-vue/
7
+ * license: MIT
8
+ */
1
9
  @keyframes stk-table-dim{
2
10
  from{
3
11
  background-color:var(--highlight-color);
@@ -36,6 +44,8 @@
36
44
  --fixed-col-shadow-color-from:rgba(0, 0, 0, 0.1);
37
45
  --fixed-col-shadow-color-to:rgba(0, 0, 0, 0);
38
46
  --drag-handle-hover-color:#d0d1e0;
47
+ --sb-thumb-color:#c1c1d7;
48
+ --sb-thumb-hover-color:#a8a8c1;
39
49
  position:relative;
40
50
  overflow:auto;
41
51
  display:flex;
@@ -64,8 +74,13 @@
64
74
  --fixed-col-shadow-color-from:rgba(135, 135, 156, 0.1);
65
75
  --fixed-col-shadow-color-to:rgba(135, 135, 156, 0);
66
76
  --drag-handle-hover-color:#5d6064;
77
+ --sb-thumb-color:rgba(93, 96, 100, 0.9);
78
+ --sb-thumb-hover-color:#727782;
67
79
  color:#d1d1e0;
68
80
  }
81
+ .stk-table.scrollbar-on{
82
+ overflow:hidden;
83
+ }
69
84
  .stk-table.headless.bordered{
70
85
  border-top:1px solid var(--border-color);
71
86
  background-image:var(--bg-border-right), var(--bg-border-bottom);
@@ -242,8 +257,6 @@
242
257
  .stk-table .vt-x-left,
243
258
  .stk-table .vt-x-right{
244
259
  padding:0;
245
- background:none;
246
- pointer-events:none;
247
260
  }
248
261
  .stk-table .column-resize-indicator{
249
262
  width:0;
@@ -415,3 +428,37 @@
415
428
  .stk-table td.cell-active{
416
429
  background-color:var(--tr-active-bgc);
417
430
  }
431
+ .stk-table:hover .stk-sb-thumb{
432
+ opacity:0.7;
433
+ }
434
+ .stk-sb-thumb{
435
+ z-index:100;
436
+ position:sticky;
437
+ background-color:var(--sb-thumb-color);
438
+ border-radius:4px;
439
+ transition:transform 0.1s ease, opacity 0.5s ease;
440
+ -webkit-user-select:none;
441
+ -moz-user-select:none;
442
+ user-select:none;
443
+ opacity:0;
444
+ flex-shrink:0;
445
+ }
446
+ .stk-sb-thumb:hover{
447
+ background-color:var(--sb-thumb-hover-color);
448
+ }
449
+ .stk-sb-thumb:active{
450
+ opacity:1;
451
+ background-color:var(--sb-thumb-hover-color);
452
+ }
453
+ .stk-sb-thumb.vertical{
454
+ margin-left:auto;
455
+ top:0;
456
+ right:0;
457
+ width:var(--sb-width);
458
+ }
459
+ .stk-sb-thumb.horizontal{
460
+ margin-top:auto;
461
+ bottom:0;
462
+ left:0;
463
+ height:var(--sb-height);
464
+ }
package/package.json CHANGED
@@ -1,73 +1,75 @@
1
- {
2
- "name": "stk-table-vue",
3
- "version": "0.8.13",
4
- "description": "High performance realtime virtual table for vue3 and vue2.7",
5
- "main": "./lib/stk-table-vue.js",
6
- "types": "./lib/src/StkTable/index.d.ts",
7
- "packageManager": "pnpm@10.7.0",
8
- "directories": {
9
- "test": "test"
10
- },
11
- "type": "module",
12
- "scripts": {
13
- "dev": "vite",
14
- "build": "vite build",
15
- "test": "vitest",
16
- "docs:dev": "vitepress dev docs-src",
17
- "docs:build": "vitepress build docs-src",
18
- "docs:preview": "vitepress preview docs-src",
19
- "docs:update": "cp -rf ./docs-src/.vitepress/dist/* ./docs"
20
- },
21
- "keywords": [
22
- "virtual table",
23
- "vue",
24
- "vue2",
25
- "vue3",
26
- "highlight",
27
- "sticky",
28
- "virtual",
29
- "table",
30
- "list"
31
- ],
32
- "files": [
33
- "lib",
34
- "src"
35
- ],
36
- "author": "japlus",
37
- "repository": {
38
- "type": "git",
39
- "url": "https://github.com/ja-plus/stk-table-vue"
40
- },
41
- "license": "MIT",
42
- "devDependencies": {
43
- "@types/mockjs": "^1.0.10",
44
- "@types/node": "^22.18.10",
45
- "@typescript-eslint/eslint-plugin": "^7.7.0",
46
- "@typescript-eslint/parser": "^7.7.0",
47
- "@vitejs/plugin-vue": "^6.0.2",
48
- "@vue/test-utils": "^2.4.6",
49
- "eslint": "^8.57.0",
50
- "eslint-config-prettier": "^9.1.0",
51
- "eslint-plugin-html": "^8.1.0",
52
- "eslint-plugin-prettier": "^5.1.3",
53
- "eslint-plugin-vue": "^9.25.0",
54
- "happy-dom": "^18.0.1",
55
- "less": "^4.2.0",
56
- "mitt": "^3.0.1",
57
- "mockjs": "^1.1.0",
58
- "postcss": "^8.4.47",
59
- "postcss-discard-comments": "^6.0.2",
60
- "postcss-preset-env": "^9.5.11",
61
- "prettier": "^3.2.5",
62
- "stk-table-vue": "^0.8.7",
63
- "typescript": "^5.8.3",
64
- "vite": "^7.2.2",
65
- "vite-plugin-dts": "3.9.1",
66
- "vitepress": "^1.6.4",
67
- "vitepress-demo-plugin": "^1.4.7",
68
- "vitepress-plugin-llms": "^1.7.5",
69
- "vitest": "^3.2.4",
70
- "vue": "^3.5.22",
71
- "vue-eslint-parser": "^9.4.2"
72
- }
1
+ {
2
+ "name": "stk-table-vue",
3
+ "version": "0.9.0-beta.1",
4
+ "description": "High performance realtime virtual table for vue3 and vue2.7",
5
+ "main": "./lib/stk-table-vue.js",
6
+ "types": "./lib/src/StkTable/index.d.ts",
7
+ "homepage": "https://ja-plus.github.io/stk-table-vue/",
8
+ "packageManager": "pnpm@10.7.0",
9
+ "directories": {
10
+ "test": "test"
11
+ },
12
+ "type": "module",
13
+ "scripts": {
14
+ "dev": "vite",
15
+ "build": "vite build",
16
+ "test": "vitest",
17
+ "docs:dev": "vitepress dev docs-src",
18
+ "docs:build": "vitepress build docs-src",
19
+ "docs:preview": "vitepress preview docs-src",
20
+ "docs:update": "cp -rf ./docs-src/.vitepress/dist/* ./docs"
21
+ },
22
+ "keywords": [
23
+ "virtual table",
24
+ "vue",
25
+ "vue2",
26
+ "vue3",
27
+ "highlight",
28
+ "sticky",
29
+ "virtual",
30
+ "table",
31
+ "list"
32
+ ],
33
+ "files": [
34
+ "lib",
35
+ "src"
36
+ ],
37
+ "author": "japlus",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/ja-plus/stk-table-vue"
41
+ },
42
+ "license": "MIT",
43
+ "devDependencies": {
44
+ "@types/mockjs": "^1.0.10",
45
+ "@types/node": "^22.18.10",
46
+ "@typescript-eslint/eslint-plugin": "^7.7.0",
47
+ "@typescript-eslint/parser": "^7.7.0",
48
+ "@vitejs/plugin-vue": "^6.0.2",
49
+ "@vue/test-utils": "^2.4.6",
50
+ "eslint": "^8.57.0",
51
+ "eslint-config-prettier": "^9.1.0",
52
+ "eslint-plugin-html": "^8.1.0",
53
+ "eslint-plugin-prettier": "^5.1.3",
54
+ "eslint-plugin-vue": "^9.25.0",
55
+ "happy-dom": "^18.0.1",
56
+ "less": "^4.2.0",
57
+ "mitt": "^3.0.1",
58
+ "mockjs": "^1.1.0",
59
+ "postcss": "^8.4.47",
60
+ "postcss-discard-comments": "^6.0.2",
61
+ "postcss-preset-env": "^9.5.11",
62
+ "prettier": "^3.2.5",
63
+ "stk-table-vue": "^0.8.14",
64
+ "typescript": "^5.8.3",
65
+ "vite": "^7.2.2",
66
+ "vite-plugin-banner": "^0.8.1",
67
+ "vite-plugin-dts": "3.9.1",
68
+ "vitepress": "^1.6.4",
69
+ "vitepress-demo-plugin": "^1.5.1",
70
+ "vitepress-plugin-llms": "^1.10.0",
71
+ "vitest": "^3.2.4",
72
+ "vue": "^3.5.22",
73
+ "vue-eslint-parser": "^9.4.2"
74
+ }
73
75
  }