@invopop/popui 0.1.48 → 0.1.50
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.
|
@@ -5,7 +5,15 @@ export function reorderFrozenColumn(columnId, table, frozenColumns) {
|
|
|
5
5
|
const newOrder = [...currentOrder];
|
|
6
6
|
const columnIndex = newOrder.indexOf(columnId);
|
|
7
7
|
if (columnIndex > -1) {
|
|
8
|
-
|
|
8
|
+
// Remove the actions column if present (we'll add it back at the end)
|
|
9
|
+
const actionsIndex = newOrder.indexOf('actions');
|
|
10
|
+
const hasActions = actionsIndex > -1;
|
|
11
|
+
if (hasActions) {
|
|
12
|
+
newOrder.splice(actionsIndex, 1);
|
|
13
|
+
}
|
|
14
|
+
// Remove the column to be frozen from its current position
|
|
15
|
+
const updatedColumnIndex = newOrder.indexOf(columnId);
|
|
16
|
+
newOrder.splice(updatedColumnIndex, 1);
|
|
9
17
|
const selectIndex = newOrder.indexOf('select');
|
|
10
18
|
const insertIndex = selectIndex >= 0 ? selectIndex + 1 : 0;
|
|
11
19
|
let lastFrozenIndex = insertIndex;
|
|
@@ -18,6 +26,10 @@ export function reorderFrozenColumn(columnId, table, frozenColumns) {
|
|
|
18
26
|
}
|
|
19
27
|
}
|
|
20
28
|
newOrder.splice(lastFrozenIndex, 0, columnId);
|
|
29
|
+
// Add actions column back at the end
|
|
30
|
+
if (hasActions) {
|
|
31
|
+
newOrder.push('actions');
|
|
32
|
+
}
|
|
21
33
|
table.setColumnOrder(newOrder);
|
|
22
34
|
}
|
|
23
35
|
}
|
|
@@ -28,7 +40,15 @@ export function reorderUnfrozenColumn(columnId, table, frozenColumns) {
|
|
|
28
40
|
const newOrder = [...currentOrder];
|
|
29
41
|
const columnIndex = newOrder.indexOf(columnId);
|
|
30
42
|
if (columnIndex > -1) {
|
|
31
|
-
|
|
43
|
+
// Remove the actions column if present (we'll add it back at the end)
|
|
44
|
+
const actionsIndex = newOrder.indexOf('actions');
|
|
45
|
+
const hasActions = actionsIndex > -1;
|
|
46
|
+
if (hasActions) {
|
|
47
|
+
newOrder.splice(actionsIndex, 1);
|
|
48
|
+
}
|
|
49
|
+
// Remove the column to be unfrozen from its current position
|
|
50
|
+
const updatedColumnIndex = newOrder.indexOf(columnId);
|
|
51
|
+
newOrder.splice(updatedColumnIndex, 1);
|
|
32
52
|
const selectIndex = newOrder.indexOf('select');
|
|
33
53
|
const insertIndex = selectIndex >= 0 ? selectIndex + 1 : 0;
|
|
34
54
|
// Find the first unfrozen column position (after all frozen columns)
|
|
@@ -42,6 +62,10 @@ export function reorderUnfrozenColumn(columnId, table, frozenColumns) {
|
|
|
42
62
|
}
|
|
43
63
|
}
|
|
44
64
|
newOrder.splice(firstUnfrozenIndex, 0, columnId);
|
|
65
|
+
// Add actions column back at the end
|
|
66
|
+
if (hasActions) {
|
|
67
|
+
newOrder.push('actions');
|
|
68
|
+
}
|
|
45
69
|
table.setColumnOrder(newOrder);
|
|
46
70
|
}
|
|
47
71
|
}
|
package/dist/tailwind.theme.css
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PopUI Tailwind v4 Theme Configuration
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* This file can be imported in any project using:
|
|
5
5
|
* @import "@invopop/popui/tailwind.theme.css";
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
* Three-tier color system:
|
|
8
8
|
* 1. Primitive colors: Raw color values from Figma (e.g., mint-100)
|
|
9
9
|
* 2. Semantic colors: Named palettes using base colors (e.g., positive-100)
|
|
10
10
|
* 3. Token colors: Application-specific using semantic colors (e.g., foreground-default)
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&display=swap');
|
|
14
|
+
|
|
13
15
|
@theme {
|
|
14
16
|
/* ============================================
|
|
15
17
|
PRIMITIVE COLORS
|
|
@@ -799,7 +801,7 @@
|
|
|
799
801
|
|
|
800
802
|
/* Font Family */
|
|
801
803
|
--font-sans: Inter, sans-serif;
|
|
802
|
-
--font-mono: "Geist Mono", CommitMono, ui-monospace, Menlo, Monaco, Consolas, "
|
|
804
|
+
--font-mono: "Geist Mono", CommitMono, ui-monospace, Menlo, Monaco, Consolas, "Roboto Mono", "DejaVu Sans Mono", monospace;
|
|
803
805
|
|
|
804
806
|
/* Font Features for Monospace */
|
|
805
807
|
--font-mono-features: "ss02" on, "ss08" on, "ss09" on;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@invopop/popui",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.50",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/invopop/popui"
|
|
7
7
|
},
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
"@storybook/addon-links": "^9.1.3",
|
|
48
48
|
"@storybook/sveltekit": "^9.1.3",
|
|
49
49
|
"@storybook/testing-library": "^0.2.2",
|
|
50
|
-
"@sveltejs/adapter-auto": "^
|
|
51
|
-
"@sveltejs/kit": "^2.
|
|
50
|
+
"@sveltejs/adapter-auto": "^7.0.1",
|
|
51
|
+
"@sveltejs/kit": "^2.53.2",
|
|
52
52
|
"@sveltejs/package": "^2.3.7",
|
|
53
53
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
54
54
|
"@tailwindcss/cli": "^4.1.13",
|
|
55
55
|
"@tailwindcss/forms": "^0.5.9",
|
|
56
56
|
"@tailwindcss/typography": "^0.5.15",
|
|
57
57
|
"@types/lodash-es": "^4.17.12",
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
59
|
-
"@typescript-eslint/parser": "^
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
59
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
60
60
|
"eslint": "^8.28.0",
|
|
61
61
|
"eslint-config-prettier": "^8.5.0",
|
|
62
62
|
"eslint-plugin-storybook": "^9.1.3",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"tailwindcss": "^4.1.13",
|
|
75
75
|
"tslib": "^2.4.1",
|
|
76
76
|
"typescript": "^5.5.0",
|
|
77
|
-
"vite": "^5.4.
|
|
78
|
-
"vitest": "^1.
|
|
77
|
+
"vite": "^5.4.21",
|
|
78
|
+
"vitest": "^2.1.8"
|
|
79
79
|
},
|
|
80
80
|
"svelte": "./dist/index.js",
|
|
81
81
|
"types": "./dist/index.d.ts",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.5",
|
|
86
86
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
87
87
|
"@floating-ui/core": "^1.5.1",
|
|
88
|
-
"@invopop/ui-icons": "^0.0.
|
|
88
|
+
"@invopop/ui-icons": "^0.0.82",
|
|
89
89
|
"@steeze-ui/heroicons": "^2.2.3",
|
|
90
90
|
"@steeze-ui/svelte-icon": "^1.6.2",
|
|
91
91
|
"@tailwindcss/vite": "^4.1.12",
|
|
@@ -110,5 +110,8 @@
|
|
|
110
110
|
"tailwind-variants": "^1.0.0",
|
|
111
111
|
"tailwindcss-animate": "^1.0.7",
|
|
112
112
|
"zod": "^4.3.5"
|
|
113
|
+
},
|
|
114
|
+
"overrides": {
|
|
115
|
+
"cookie": "^0.7.0"
|
|
113
116
|
}
|
|
114
117
|
}
|