@icomponents/theme 0.4.0 → 0.7.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/package.json +3 -3
- package/src/cabinet.css +12 -6
- package/src/cabinet.test.ts +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icomponents/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Вид кабинета платформы: палитры светлая и тёмная, темы выбора, строка <head>, переключатель палитры",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lucide-react": "^1.28.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@icomponents/react": "^0.
|
|
29
|
+
"@icomponents/react": "^0.7.0",
|
|
30
30
|
"@types/react": ">=19.2.0",
|
|
31
31
|
"react": ">=19",
|
|
32
32
|
"react-dom": ">=19"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@icomponents/react": "0.
|
|
40
|
+
"@icomponents/react": "0.7.0",
|
|
41
41
|
"@icomponents/typescript-config": "0.0.0",
|
|
42
42
|
"@types/bun": "latest",
|
|
43
43
|
"@types/node": "latest",
|
package/src/cabinet.css
CHANGED
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
* на белом. Насыщенный цвет со смыслом модуль держит в своём токене. Сторожит `cabinet.test.ts`.
|
|
41
41
|
* ------------------------------------------------------------------------------------------- */
|
|
42
42
|
:root {
|
|
43
|
-
|
|
43
|
+
/* Скругления по образцу владельца 16.11.2026: карточки 16px, поля и кнопки 8px. */
|
|
44
|
+
--radius: 10px;
|
|
44
45
|
|
|
45
46
|
--background: #eff4f5;
|
|
46
47
|
--foreground: #131a20;
|
|
@@ -67,8 +68,9 @@
|
|
|
67
68
|
--warning: #b05503;
|
|
68
69
|
--warning-foreground: #fbfcfc;
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
--
|
|
71
|
+
/* Рамки светлые и мягкие: делят, а не чертят. */
|
|
72
|
+
--border: #e2e9eb;
|
|
73
|
+
--input: #d9e2e5;
|
|
72
74
|
--ring: #027a6b;
|
|
73
75
|
|
|
74
76
|
--sidebar: #ffffff;
|
|
@@ -177,9 +179,13 @@
|
|
|
177
179
|
--font-code:
|
|
178
180
|
ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
179
181
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
--radius-
|
|
182
|
+
/* Абсолютные, не от радиуса палитры: палитры и модули со своим радиусом не меняют образец владельца.
|
|
183
|
+
rounded-sm — чекбоксы и метки, rounded-md — поля и кнопки, rounded-xl — карточки и панели. */
|
|
184
|
+
--radius-sm: 4px;
|
|
185
|
+
--radius-md: 8px;
|
|
186
|
+
--radius-lg: 10px;
|
|
187
|
+
--radius-xl: 16px;
|
|
188
|
+
--radius-2xl: 20px;
|
|
183
189
|
}
|
|
184
190
|
|
|
185
191
|
@layer base {
|
package/src/cabinet.test.ts
CHANGED
|
@@ -150,3 +150,16 @@ describe("шрифты по ролям", () => {
|
|
|
150
150
|
expect(/--font-mono:\s*"Geologica"/.test(CODE)).toBe(true);
|
|
151
151
|
});
|
|
152
152
|
});
|
|
153
|
+
|
|
154
|
+
// Образец владельца 16.11.2026: чекбоксы 4px, поля и кнопки 8px, карточки 16px — в любой палитре.
|
|
155
|
+
describe("скругления кабинета", () => {
|
|
156
|
+
const theme = block("@theme inline");
|
|
157
|
+
|
|
158
|
+
test.each([
|
|
159
|
+
["--radius-sm", "4px"],
|
|
160
|
+
["--radius-md", "8px"],
|
|
161
|
+
["--radius-xl", "16px"],
|
|
162
|
+
])("%s = %s и не зависит от --radius палитры", (name, value) => {
|
|
163
|
+
expect(theme.get(name)).toBe(value);
|
|
164
|
+
});
|
|
165
|
+
});
|