@skbkontur/colors 2.0.0-alpha.6 → 2.0.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 (43) hide show
  1. package/.gitignore +10 -0
  2. package/.npmignore +10 -0
  3. package/CHANGELOG.md +117 -0
  4. package/__docs__/Colors.docs.stories.tsx +1578 -0
  5. package/__docs__/Colors.mdx +228 -0
  6. package/__docs__/ColorsAPI.docs.stories.tsx +954 -0
  7. package/__docs__/ColorsAPI.mdx +133 -0
  8. package/__stories__/colors.stories.tsx +452 -0
  9. package/__tests__/convert-color.test.ts +23 -0
  10. package/__tests__/create-tokens-from-figma.test.ts +162 -0
  11. package/__tests__/format-variable.test.ts +16 -0
  12. package/__tests__/get-colors-base.test.ts +55 -0
  13. package/__tests__/get-colors.test.ts +75 -0
  14. package/__tests__/get-interactions.test.ts +37 -0
  15. package/__tests__/get-logo.test.ts +24 -0
  16. package/__tests__/get-palette.test.ts +43 -0
  17. package/__tests__/get-promo.test.ts +32 -0
  18. package/colors-default-dark.d.ts +319 -0
  19. package/colors-default-dark.js +319 -0
  20. package/colors-default-dark.ts +332 -0
  21. package/colors-default-light.d.ts +319 -0
  22. package/colors-default-light.js +319 -0
  23. package/colors-default-light.ts +336 -0
  24. package/package.json +25 -28
  25. package/scripts/create-tokens-files.ts +424 -0
  26. package/scripts/create-tokens-from-figma.ts +376 -0
  27. package/scripts/figma-tokens-base.json +3499 -0
  28. package/scripts/figma-tokens.json +710 -0
  29. package/tokens/brand-blue-deep_accent-brand.css +1 -1
  30. package/tokens/brand-blue-deep_accent-gray.css +1 -1
  31. package/tokens/brand-blue_accent-brand.css +1 -1
  32. package/tokens/brand-blue_accent-gray.css +1 -1
  33. package/tokens/brand-green_accent-brand.css +1 -1
  34. package/tokens/brand-green_accent-gray.css +1 -1
  35. package/tokens/brand-mint_accent-brand.css +1 -1
  36. package/tokens/brand-mint_accent-gray.css +1 -1
  37. package/tokens/brand-orange_accent-gray.css +1 -1
  38. package/tokens/brand-purple_accent-brand.css +1 -1
  39. package/tokens/brand-purple_accent-gray.css +1 -1
  40. package/tokens/brand-red_accent-gray.css +1 -1
  41. package/tokens/brand-violet_accent-brand.css +1 -1
  42. package/tokens/brand-violet_accent-gray.css +1 -1
  43. package/tsconfig.json +8 -0
package/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ **/tokens
2
+ **/tokens-mobile
3
+ **/*.js
4
+ **/*.js.map
5
+ **/*.d.ts
6
+ **/*.less
7
+ **/*.scss
8
+ colors.ts
9
+ colors-dark-default.ts
10
+ colors-light-default.ts
package/.npmignore ADDED
@@ -0,0 +1,10 @@
1
+ __tests__/
2
+ __stories__/
3
+ yarn.lock
4
+ tsconfig.json
5
+ scripts
6
+ **/*.tsx
7
+ **/*.ts
8
+ **/*.mdx
9
+ !**/*.d.ts
10
+ CHANGELOG.md
package/CHANGELOG.md ADDED
@@ -0,0 +1,117 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [2.0.1](https://git.skbkontur.ru/ui/ui-parking-2/compare/@skbkontur/colors@2.0.0...@skbkontur/colors@2.0.1) (2025-12-22)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **Colors:** fix package.json exports ([d209f14](https://git.skbkontur.ru/ui/ui-parking-2/commits/d209f14e927c33a832bf3c4ce38cc8ecfabe8f74))
11
+
12
+ # [2.0.0](https://git.skbkontur.ru/ui/ui-parking-2/compare/@skbkontur/colors@1.1.1...@skbkontur/colors@2.0.0) (2025-12-22)
13
+
14
+ ### Features
15
+
16
+ - **Colors:** add new semantic tokens with color shemes & dark themes (v2) ([6214338](https://git.skbkontur.ru/ui/ui-parking-2/commits/62143381754449459234e0508e5fd414f9d90f07))
17
+
18
+ * Color Schemes: Includes specific palettes for every brand color.
19
+ * Semantic Tokens: Built using a semantic logic for easier naming and use.
20
+ * Dark Mode: Full support for dark themes.
21
+ * Accessibility: Color contrast follows APCA W3 standards.
22
+ * Figma Sync: Completely synchronized with Figma Variables.
23
+ * Framework Agnostic: Compatible with any web framework.
24
+
25
+ **API**
26
+
27
+ - CSS Variables: Powered by standard variables like `var(--k-color-token-name)`, accessible via JS/TS, SCSS/Less.
28
+ - Multi-Scheme Config: Configure multiple schemes simultaneously using HTML attributes: `data-k-brand`, `data-k-accent`, and `data-k-theme`.
29
+ - Advanced JS API `getColors`: Generate custom palettes for any shade and create your own tokens via JS.
30
+
31
+ **Core Settings**
32
+
33
+ Both Figma and the code package rely on three main settings:
34
+
35
+ - brand: primary brand color (red, orange, green, mint, blue, blueDeep, violet, purple, or any #custom-hex).
36
+ - accent: UI accent color (gray, brand, or #custom-hex). Default is gray.
37
+ - theme: mode light or dark. Default is light.
38
+
39
+ ## [1.1.1](https://git.skbkontur.ru/ui/ui-parking-2/compare/@skbkontur/colors@1.1.0...@skbkontur/colors@1.1.1) (2025-05-06)
40
+
41
+ **Note:** Version bump only for package @skbkontur/colors
42
+
43
+ # [1.1.0](https://git.skbkontur.ru/ui/ui-parking-2/compare/@skbkontur/colors@1.0.0...@skbkontur/colors@1.1.0) (2025-03-17)
44
+
45
+ ### Features
46
+
47
+ - add new storybook documentation ([c267b12](https://git.skbkontur.ru/ui/ui-parking-2/commits/c267b12a86e845a219b173a4e69be6a04b972df8))
48
+
49
+ # [1.0.0](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.5.1...@skbkontur/colors@1.0.0) (2024-08-08)
50
+
51
+ ### Features
52
+
53
+ - **colors:** add scss and change naming ([ef3345f](https://git.skbkontur.ru/ui/ui-parking/commits/ef3345f5f54be830f284c9a2a53991e117b8ba0b))
54
+ - **colors:** add scss and change naming ([78b32b7](https://git.skbkontur.ru/ui/ui-parking/commits/78b32b7a22d260baf166195e7eb1adeea5b2c9f7))
55
+
56
+ ### BREAKING CHANGES
57
+
58
+ - **colors:** change naming from camelCase to dash-case
59
+ - **colors:** change naming from camelCase to dash-case
60
+
61
+ ## [0.5.1](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.5.0...@skbkontur/colors@0.5.1) (2024-08-08)
62
+
63
+ **Note:** Version bump only for package @skbkontur/colors
64
+
65
+ # [0.5.0](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.4.4...@skbkontur/colors@0.5.0) (2024-06-25)
66
+
67
+ ### Features
68
+
69
+ - **colors:** update colors 2024 ([7020c9b](https://git.skbkontur.ru/ui/ui-parking/commits/7020c9b1311e4e37973847af70bad28cbbd2902d))
70
+
71
+ ### Reverts
72
+
73
+ - remove screenshots in ie11 and obsolete packages ([57a6e89](https://git.skbkontur.ru/ui/ui-parking/commits/57a6e8962089825b6c71c1b96f4d09bc8a5a4ef7))
74
+
75
+ ## [0.4.4](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.4.3...@skbkontur/colors@0.4.4) (2023-08-11)
76
+
77
+ **Note:** Version bump only for package @skbkontur/colors
78
+
79
+ ## [0.4.3](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.4.2...@skbkontur/colors@0.4.3) (2023-08-11)
80
+
81
+ **Note:** Version bump only for package @skbkontur/colors
82
+
83
+ ## [0.4.2](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.4.1...@skbkontur/colors@0.4.2) (2023-08-11)
84
+
85
+ **Note:** Version bump only for package @skbkontur/colors
86
+
87
+ ## [0.4.1](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.4.0...@skbkontur/colors@0.4.1) (2023-06-29)
88
+
89
+ **Note:** Version bump only for package @skbkontur/colors
90
+
91
+ # [0.4.0](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.3.0...@skbkontur/colors@0.4.0) (2023-05-22)
92
+
93
+ ### Features
94
+
95
+ - **colors:** обновление grayscaleSecondaryText с [#858585](https://git.skbkontur.ru/ui/ui-parking/issues/858585) на [#757575](https://git.skbkontur.ru/ui/ui-parking/issues/757575) ([8f27457](https://git.skbkontur.ru/ui/ui-parking/commits/8f27457477e25ecd52dfb7ab9b1f521145b25125))
96
+
97
+ # [0.3.0](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.1.1...@skbkontur/colors@0.3.0) (2023-05-12)
98
+
99
+ ### Features
100
+
101
+ - **colors:** добавила новые цвета с прозрачностью ([9cd91ef](https://git.skbkontur.ru/ui/ui-parking/commits/9cd91ef608a9f619d02cfb818cf2a4dc2c410929))
102
+
103
+ # [0.2.0](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.1.1...@skbkontur/colors@0.2.0) (2023-05-12)
104
+
105
+ ### Features
106
+
107
+ - **colors:** добавила новые цвета с прозрачностью ([9cd91ef](https://git.skbkontur.ru/ui/ui-parking/commits/9cd91ef608a9f619d02cfb818cf2a4dc2c410929))
108
+
109
+ ## [0.1.1](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/colors@0.1.0...@skbkontur/colors@0.1.1) (2023-02-06)
110
+
111
+ **Note:** Version bump only for package @skbkontur/colors
112
+
113
+ # 0.1.0 (2023-02-03)
114
+
115
+ ### Features
116
+
117
+ - new package @skbkontur/colors ([e9e1a88](https://git.skbkontur.ru/ui/ui-parking/commits/e9e1a88b3f5cea124a770a9e18c5eef2524521dc))