@caspeco/casper-ui-library 5.6.1 → 6.1.0
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/button/types.d.ts +1 -1
- package/dist/components/button/types.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.d.ts +1 -1
- package/dist/components/icon-button/types.d.ts +3 -2
- package/dist/components/icon-button/types.d.ts.map +1 -1
- package/dist/components/table/index.d.ts +2 -3
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/table-cell.d.ts +11 -6
- package/dist/components/table/table-cell.d.ts.map +1 -1
- package/dist/components/table/table-cell.js +118 -69
- package/dist/components/table/table-content.d.ts +4 -4
- package/dist/components/table/table-content.d.ts.map +1 -1
- package/dist/components/table/table-content.js +17 -20
- package/dist/components/table/table-context-provider.d.ts +57 -0
- package/dist/components/table/table-context-provider.d.ts.map +1 -0
- package/dist/components/table/table-context-provider.js +115 -0
- package/dist/components/table/table-context.d.ts +4 -54
- package/dist/components/table/table-context.d.ts.map +1 -1
- package/dist/components/table/table-context.js +10 -108
- package/dist/components/table/table-header-dropdown.d.ts +6 -4
- package/dist/components/table/table-header-dropdown.d.ts.map +1 -1
- package/dist/components/table/table-header-dropdown.js +98 -103
- package/dist/components/table/table-header-row.d.ts +5 -3
- package/dist/components/table/table-header-row.d.ts.map +1 -1
- package/dist/components/table/table-header-row.js +32 -33
- package/dist/components/table/table-row-expand-toggle-button.d.ts +2 -2
- package/dist/components/table/table-row-expand-toggle-button.d.ts.map +1 -1
- package/dist/components/table/table-row-expand-toggle-button.js +14 -13
- package/dist/components/table/table-row.d.ts +6 -6
- package/dist/components/table/table-row.d.ts.map +1 -1
- package/dist/components/table/table-row.js +41 -43
- package/dist/components/table/table-toolbar.d.ts +2 -3
- package/dist/components/table/table-toolbar.d.ts.map +1 -1
- package/dist/components/table/table-toolbar.js +38 -40
- package/dist/components/table/table.composition.d.ts +3 -3
- package/dist/components/table/table.composition.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +2 -2
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +20 -18
- package/dist/components/table/translations.d.ts +5 -0
- package/dist/components/table/translations.d.ts.map +1 -1
- package/dist/components/table/translations.js +8 -4
- package/dist/components/table/types.d.ts +29 -11
- package/dist/components/table/types.d.ts.map +1 -1
- package/dist/index.js +26 -24
- package/dist/theme/theme-config/components/button-theme.d.ts.map +1 -1
- package/dist/theme/theme-config/components/button-theme.js +35 -20
- package/package.json +15 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineStyleConfig as i } from "@chakra-ui/react";
|
|
2
|
-
import { isTouchScreenDevice as
|
|
2
|
+
import { isTouchScreenDevice as r } from "../../theme-helper.js";
|
|
3
3
|
import { ThemeColorToken as o, ThemeBorderToken as a, ThemeRadiusToken as d, ThemeFontToken as t, ThemeFontSizeToken as c } from "../theme-tokens.js";
|
|
4
4
|
const l = {
|
|
5
5
|
fontFamily: t.SubHeader,
|
|
@@ -21,7 +21,7 @@ const l = {
|
|
|
21
21
|
background: o.Accent,
|
|
22
22
|
color: o.OnAccent,
|
|
23
23
|
_hover: {
|
|
24
|
-
background:
|
|
24
|
+
background: r() ? o.Accent : o.AccentHover,
|
|
25
25
|
_disabled: {
|
|
26
26
|
background: o.Accent,
|
|
27
27
|
color: o.OnAccent
|
|
@@ -31,12 +31,12 @@ const l = {
|
|
|
31
31
|
background: o.AccentActive,
|
|
32
32
|
color: o.OnAccent
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, b = {
|
|
35
35
|
background: o.AccentContainer,
|
|
36
36
|
color: o.OnAccentContainer,
|
|
37
37
|
_hover: {
|
|
38
|
-
background:
|
|
39
|
-
color:
|
|
38
|
+
background: r() ? o.AccentContainer : o.AccentHover,
|
|
39
|
+
color: r() ? o.OnAccentContainer : o.OnAccent,
|
|
40
40
|
_disabled: {
|
|
41
41
|
background: o.AccentContainer,
|
|
42
42
|
color: o.OnAccentContainer
|
|
@@ -46,18 +46,32 @@ const l = {
|
|
|
46
46
|
background: o.AccentActive,
|
|
47
47
|
color: o.OnAccent
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, g = {
|
|
50
50
|
color: o.OnBackground,
|
|
51
51
|
fontWeight: "medium",
|
|
52
52
|
_hover: {
|
|
53
53
|
color: o.OnBackground,
|
|
54
|
-
bg:
|
|
54
|
+
bg: r() ? "none" : o.AccentHoverAlpha,
|
|
55
55
|
textDecoration: "none"
|
|
56
56
|
},
|
|
57
57
|
_active: {
|
|
58
58
|
bg: o.AccentActiveAlpha,
|
|
59
59
|
color: o.OnBackground
|
|
60
60
|
}
|
|
61
|
+
}, A = {
|
|
62
|
+
background: o.Error,
|
|
63
|
+
color: o.OnAccent,
|
|
64
|
+
_hover: {
|
|
65
|
+
background: r() ? o.Error : o.ErrorHover,
|
|
66
|
+
_disabled: {
|
|
67
|
+
background: o.Error,
|
|
68
|
+
color: o.OnAccent
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
_active: {
|
|
72
|
+
background: o.ErrorActive,
|
|
73
|
+
color: o.OnAccent
|
|
74
|
+
}
|
|
61
75
|
}, s = {
|
|
62
76
|
color: o.OnBackground,
|
|
63
77
|
fontFamily: t.Body,
|
|
@@ -69,7 +83,7 @@ const l = {
|
|
|
69
83
|
width: "fit-content",
|
|
70
84
|
border: 0,
|
|
71
85
|
_hover: {
|
|
72
|
-
color:
|
|
86
|
+
color: r() ? o.OnBackground : o.AccentHover
|
|
73
87
|
},
|
|
74
88
|
_active: {
|
|
75
89
|
color: o.AccentActive,
|
|
@@ -78,7 +92,7 @@ const l = {
|
|
|
78
92
|
_disabled: {
|
|
79
93
|
textDecoration: "none"
|
|
80
94
|
}
|
|
81
|
-
},
|
|
95
|
+
}, v = {
|
|
82
96
|
flex: "1",
|
|
83
97
|
fontWeight: "normal",
|
|
84
98
|
font: t.Body,
|
|
@@ -108,7 +122,7 @@ const l = {
|
|
|
108
122
|
bg: o.AccentHoverAlpha,
|
|
109
123
|
color: o.OnAccentContainer
|
|
110
124
|
}
|
|
111
|
-
},
|
|
125
|
+
}, k = {
|
|
112
126
|
background: "transparent",
|
|
113
127
|
color: o.OnBackground,
|
|
114
128
|
borderColor: o.OnBackgroundBorder,
|
|
@@ -134,13 +148,13 @@ const l = {
|
|
|
134
148
|
}
|
|
135
149
|
}
|
|
136
150
|
}
|
|
137
|
-
},
|
|
151
|
+
}, e = '&[aria-pressed="true"]', n = '&[aria-pressed="false"]', h = {
|
|
138
152
|
// Base style
|
|
139
153
|
borderRadius: d.Small,
|
|
140
154
|
borderWidth: a.XSmall,
|
|
141
155
|
borderColor: o.OnSurfaceBorder,
|
|
142
156
|
// Pressed state
|
|
143
|
-
[`${
|
|
157
|
+
[`${e}`]: {
|
|
144
158
|
background: o.Accent,
|
|
145
159
|
color: o.OnAccent
|
|
146
160
|
},
|
|
@@ -151,7 +165,7 @@ const l = {
|
|
|
151
165
|
},
|
|
152
166
|
// Hover styles
|
|
153
167
|
"@media(hover: hover)": {
|
|
154
|
-
[`${
|
|
168
|
+
[`${e}&:hover`]: {
|
|
155
169
|
background: o.AccentHover,
|
|
156
170
|
borderColor: o.AccentHover,
|
|
157
171
|
_disabled: {
|
|
@@ -169,7 +183,7 @@ const l = {
|
|
|
169
183
|
}
|
|
170
184
|
},
|
|
171
185
|
// Active styles
|
|
172
|
-
[`${
|
|
186
|
+
[`${e}:active`]: {
|
|
173
187
|
color: o.OnAccent,
|
|
174
188
|
background: o.AccentActive
|
|
175
189
|
},
|
|
@@ -178,7 +192,7 @@ const l = {
|
|
|
178
192
|
background: o.AccentActiveAlpha
|
|
179
193
|
},
|
|
180
194
|
// Define general disabled styles last to ensure they are not overridden
|
|
181
|
-
[`${
|
|
195
|
+
[`${e}:disabled`]: {
|
|
182
196
|
color: o.OnAccent,
|
|
183
197
|
background: o.Accent,
|
|
184
198
|
borderColor: o.Accent
|
|
@@ -211,12 +225,13 @@ const l = {
|
|
|
211
225
|
},
|
|
212
226
|
variants: {
|
|
213
227
|
primary: u,
|
|
214
|
-
secondary:
|
|
215
|
-
ghost:
|
|
228
|
+
secondary: b,
|
|
229
|
+
ghost: g,
|
|
216
230
|
link: s,
|
|
217
|
-
segmentedControl:
|
|
218
|
-
tertiary:
|
|
219
|
-
toggle:
|
|
231
|
+
segmentedControl: v,
|
|
232
|
+
tertiary: k,
|
|
233
|
+
toggle: h,
|
|
234
|
+
alert: A
|
|
220
235
|
}
|
|
221
236
|
});
|
|
222
237
|
export {
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caspeco/casper-ui-library",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"prettier": "@caspeco/prettier-config",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
+
"homepage": "https://github.com/Caspeco/casper-ui-library",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Caspeco/casper-ui-library.git"
|
|
11
|
+
},
|
|
7
12
|
"files": [
|
|
8
13
|
"dist"
|
|
9
14
|
],
|
|
@@ -25,23 +30,24 @@
|
|
|
25
30
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
26
31
|
"@caspeco/eslint-config": "^4.0.5",
|
|
27
32
|
"@caspeco/prettier-config": "^1.0.6",
|
|
28
|
-
"@eslint/js": "^9.
|
|
33
|
+
"@eslint/js": "^9.36.0",
|
|
29
34
|
"@testing-library/jest-dom": "^6.8.0",
|
|
30
35
|
"@testing-library/react": "^16.3.0",
|
|
36
|
+
"@testing-library/user-event": "^14.6.1",
|
|
31
37
|
"@types/jest": "^30.0.0",
|
|
32
|
-
"@types/node": "^24.
|
|
38
|
+
"@types/node": "^24.5.2",
|
|
33
39
|
"@types/react": "^18.3.12",
|
|
34
40
|
"@types/react-dom": "^18.3.1",
|
|
35
|
-
"@vitejs/plugin-react-swc": "^4.0
|
|
36
|
-
"eslint": "^9.
|
|
41
|
+
"@vitejs/plugin-react-swc": "^4.1.0",
|
|
42
|
+
"eslint": "^9.36.0",
|
|
37
43
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
38
44
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
39
|
-
"globals": "^16.
|
|
40
|
-
"jsdom": "^
|
|
45
|
+
"globals": "^16.4.0",
|
|
46
|
+
"jsdom": "^27.0.0",
|
|
41
47
|
"tsc-alias": "^1.8.16",
|
|
42
48
|
"typescript": "~5.9.2",
|
|
43
|
-
"typescript-eslint": "^8.
|
|
44
|
-
"vite": "^7.1.
|
|
49
|
+
"typescript-eslint": "^8.44.0",
|
|
50
|
+
"vite": "^7.1.6",
|
|
45
51
|
"vite-plugin-dts": "^4.5.4",
|
|
46
52
|
"vite-tsconfig-paths": "^5.1.4",
|
|
47
53
|
"vitest": "^3.2.4"
|