compote-ui 0.43.0 → 0.43.2
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/dist/components/data-table-v8/create-table.svelte.js +7 -2
- package/dist/components/data-table-v8/data-table-head.svelte +0 -4
- package/dist/components/data-table-v8/data-table-virtual-rows.svelte +0 -4
- package/dist/components/data-table-v8/data-table.svelte +0 -4
- package/dist/theme.css +45 -0
- package/package.json +4 -4
- package/dist/components/data-table-v8/data-table-checkbox.css +0 -44
|
@@ -35,8 +35,13 @@ export function createTable(options) {
|
|
|
35
35
|
...(options.onColumnVisibilityChange
|
|
36
36
|
? {
|
|
37
37
|
onColumnVisibilityChange: (updater) => {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
// Without this, overriding onColumnVisibilityChange bypasses makeStateUpdater,
|
|
39
|
+
// so createSvelteTable's $state never updates and Svelte doesn't re-render.
|
|
40
|
+
table.options.onStateChange?.((old) => ({
|
|
41
|
+
...old,
|
|
42
|
+
columnVisibility: typeof updater === 'function' ? updater(old.columnVisibility) : updater
|
|
43
|
+
}));
|
|
44
|
+
options.onColumnVisibilityChange(table.getState().columnVisibility);
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
47
|
: {}),
|
package/dist/theme.css
CHANGED
|
@@ -79,3 +79,48 @@
|
|
|
79
79
|
@apply bg-surface-document text-ink;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
.table-checkbox {
|
|
84
|
+
appearance: none;
|
|
85
|
+
-webkit-appearance: none;
|
|
86
|
+
flex-shrink: 0;
|
|
87
|
+
border-radius: 2px;
|
|
88
|
+
border: 1px solid var(--compote-border);
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
transition:
|
|
92
|
+
border-color 150ms ease,
|
|
93
|
+
background-color 150ms ease;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.table-checkbox:hover:not(:disabled) {
|
|
97
|
+
border-color: color-mix(in srgb, var(--compote-primary) 50%, transparent);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.table-checkbox:checked {
|
|
101
|
+
border-color: var(--compote-primary);
|
|
102
|
+
background-color: var(--compote-primary);
|
|
103
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3e%3cpolyline points='216 72 104 184 48 128' fill='none' stroke='white' stroke-width='32' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
|
|
104
|
+
background-repeat: no-repeat;
|
|
105
|
+
background-position: center;
|
|
106
|
+
background-size: 70%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.table-checkbox:indeterminate {
|
|
110
|
+
border-color: var(--compote-primary);
|
|
111
|
+
background-color: var(--compote-primary);
|
|
112
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3e%3cline x1='40' y1='128' x2='216' y2='128' stroke='white' stroke-width='32' stroke-linecap='round'/%3e%3c/svg%3e");
|
|
113
|
+
background-repeat: no-repeat;
|
|
114
|
+
background-position: center;
|
|
115
|
+
background-size: 70%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.table-checkbox:disabled {
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
opacity: 0.5;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.table-checkbox:focus-visible {
|
|
124
|
+
outline: 2px solid var(--compote-ring);
|
|
125
|
+
outline-offset: 2px;
|
|
126
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compote-ui",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev --open",
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"@faker-js/faker": "^10.4.0",
|
|
61
61
|
"@iconify-json/ph": "^1.2.2",
|
|
62
62
|
"@sveltejs/adapter-auto": "^7.0.0",
|
|
63
|
-
"@sveltejs/kit": "^2.
|
|
63
|
+
"@sveltejs/kit": "^2.60.1",
|
|
64
64
|
"@sveltejs/package": "^2.5.7",
|
|
65
65
|
"@sveltejs/vite-plugin-svelte": "7.1.2",
|
|
66
66
|
"@tailwindcss/vite": "^4.2.4",
|
|
67
67
|
"@tanstack/svelte-virtual": "^3.13.24",
|
|
68
68
|
"@types/node": "^22.19.18",
|
|
69
|
-
"eslint": "^10.
|
|
69
|
+
"eslint": "^10.4.0",
|
|
70
70
|
"eslint-config-prettier": "^10.1.8",
|
|
71
71
|
"eslint-plugin-svelte": "^3.17.0",
|
|
72
72
|
"globals": "^17.5.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"prettier-plugin-svelte": "^3.5.2",
|
|
75
75
|
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
76
76
|
"publint": "^0.3.21",
|
|
77
|
-
"svelte": "^5.55.
|
|
77
|
+
"svelte": "^5.55.7",
|
|
78
78
|
"svelte-check": "^4.4.6",
|
|
79
79
|
"tailwindcss": "^4.2.4",
|
|
80
80
|
"tw-animate-css": "^1.4.0",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
.table-checkbox {
|
|
2
|
-
appearance: none;
|
|
3
|
-
-webkit-appearance: none;
|
|
4
|
-
flex-shrink: 0;
|
|
5
|
-
border-radius: 2px;
|
|
6
|
-
border: 1px solid var(--compote-border);
|
|
7
|
-
background-color: transparent;
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
transition:
|
|
10
|
-
border-color 150ms ease,
|
|
11
|
-
background-color 150ms ease;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.table-checkbox:hover:not(:disabled) {
|
|
15
|
-
border-color: color-mix(in srgb, var(--compote-primary) 50%, transparent);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.table-checkbox:checked {
|
|
19
|
-
border-color: var(--compote-primary);
|
|
20
|
-
background-color: var(--compote-primary);
|
|
21
|
-
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3e%3cpolyline points='216 72 104 184 48 128' fill='none' stroke='white' stroke-width='32' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
|
|
22
|
-
background-repeat: no-repeat;
|
|
23
|
-
background-position: center;
|
|
24
|
-
background-size: 70%;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.table-checkbox:indeterminate {
|
|
28
|
-
border-color: var(--compote-primary);
|
|
29
|
-
background-color: var(--compote-primary);
|
|
30
|
-
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3e%3cline x1='40' y1='128' x2='216' y2='128' stroke='white' stroke-width='32' stroke-linecap='round'/%3e%3c/svg%3e");
|
|
31
|
-
background-repeat: no-repeat;
|
|
32
|
-
background-position: center;
|
|
33
|
-
background-size: 70%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.table-checkbox:disabled {
|
|
37
|
-
pointer-events: none;
|
|
38
|
-
opacity: 0.5;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.table-checkbox:focus-visible {
|
|
42
|
-
outline: 2px solid var(--compote-ring);
|
|
43
|
-
outline-offset: 2px;
|
|
44
|
-
}
|