@skbkontur/colors 2.0.0-alpha.3 → 2.0.0-alpha.5

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 (130) hide show
  1. package/README.md +3 -3
  2. package/colors.d.ts +319 -0
  3. package/colors.js +319 -0
  4. package/colors.less +319 -0
  5. package/colors.scss +319 -0
  6. package/lib/consts/default-swatch.d.ts +108 -0
  7. package/lib/consts/default-swatch.js +108 -0
  8. package/{dist/esm/consts/default-swatch.js → lib/consts/default-swatch.ts} +11 -7
  9. package/lib/consts/params/abney-correction.js +1102 -0
  10. package/{dist/esm/consts/params/abney-correction.js → lib/consts/params/abney-correction.ts} +3 -1
  11. package/lib/consts/params/chroma-params.js +102 -0
  12. package/{dist/esm/consts/params/chroma-params.js → lib/consts/params/chroma-params.ts} +3 -1
  13. package/lib/consts/params/interactions.ts +9 -0
  14. package/lib/consts/params/logo-lightness.ts +1 -0
  15. package/{dist/esm → lib}/consts/params/promo-hue-shift.d.ts +1 -1
  16. package/lib/consts/params/promo-hue-shift.js +11 -0
  17. package/{dist/esm/consts/params/promo-hue-shift.js → lib/consts/params/promo-hue-shift.ts} +1 -1
  18. package/{dist/esm → lib}/consts/params/warning-hue-patch.d.ts +1 -1
  19. package/lib/consts/params/warning-hue-patch.js +22 -0
  20. package/{dist/esm/consts/params/warning-hue-patch.js → lib/consts/params/warning-hue-patch.ts} +1 -1
  21. package/lib/get-colors-base.d.ts +11 -0
  22. package/lib/get-colors-base.js +78 -0
  23. package/{dist/esm/get-colors-base.js → lib/get-colors-base.ts} +44 -26
  24. package/lib/get-colors-default-tokens.d.ts +645 -0
  25. package/lib/get-colors-default-tokens.js +647 -0
  26. package/lib/get-colors-default-tokens.ts +646 -0
  27. package/lib/get-colors.d.ts +39 -0
  28. package/lib/get-colors.js +24 -0
  29. package/lib/get-colors.ts +59 -0
  30. package/{dist/esm → lib}/helpers/get-interactions.d.ts +2 -2
  31. package/lib/helpers/get-interactions.js +35 -0
  32. package/lib/helpers/get-interactions.ts +64 -0
  33. package/{dist/esm → lib}/helpers/get-logo.d.ts +2 -2
  34. package/lib/helpers/get-logo.js +25 -0
  35. package/lib/helpers/get-logo.ts +40 -0
  36. package/lib/helpers/get-palette.d.ts +51 -0
  37. package/lib/helpers/get-palette.js +204 -0
  38. package/lib/helpers/get-palette.ts +261 -0
  39. package/lib/helpers/get-promo.d.ts +6 -0
  40. package/lib/helpers/get-promo.js +47 -0
  41. package/lib/helpers/get-promo.ts +55 -0
  42. package/lib/types/tokens-base-generator.d.ts +43 -0
  43. package/{dist/esm/types/tokens-base-generator.d.ts → lib/types/tokens-base-generator.ts} +10 -15
  44. package/lib/types/tokens-base.d.ts +55 -0
  45. package/{dist/esm/types/tokens-base.d.ts → lib/types/tokens-base.ts} +7 -2
  46. package/lib/types/tokens.d.ts +12 -0
  47. package/{dist/esm/types/tokens.d.ts → lib/types/tokens.ts} +6 -0
  48. package/lib/utils/convert-color.js +144 -0
  49. package/lib/utils/convert-color.ts +163 -0
  50. package/lib/utils/format-variable.js +6 -0
  51. package/lib/utils/format-variable.ts +7 -0
  52. package/package.json +66 -7
  53. package/{dist/tokens → tokens}/brand-blue-deep_accent-brand.css +2 -2
  54. package/{dist/tokens → tokens}/brand-blue-deep_accent-gray.css +2 -2
  55. package/{dist/tokens → tokens}/brand-blue_accent-brand.css +2 -2
  56. package/{dist/tokens → tokens}/brand-blue_accent-gray.css +2 -2
  57. package/{dist/tokens → tokens}/brand-green_accent-brand.css +2 -2
  58. package/{dist/tokens → tokens}/brand-green_accent-gray.css +2 -2
  59. package/{dist/tokens → tokens}/brand-mint_accent-brand.css +2 -2
  60. package/{dist/tokens → tokens}/brand-mint_accent-gray.css +2 -2
  61. package/{dist/tokens → tokens}/brand-orange_accent-gray.css +2 -2
  62. package/{dist/tokens → tokens}/brand-purple_accent-brand.css +2 -2
  63. package/{dist/tokens → tokens}/brand-purple_accent-gray.css +2 -2
  64. package/{dist/tokens → tokens}/brand-red_accent-gray.css +2 -2
  65. package/{dist/tokens → tokens}/brand-violet_accent-brand.css +2 -2
  66. package/{dist/tokens → tokens}/brand-violet_accent-gray.css +2 -2
  67. package/{dist/tokens-mobile → tokens-mobile}/brand-blue-deep_accent-brand.json +117 -117
  68. package/{dist/tokens-mobile → tokens-mobile}/brand-blue-deep_accent-gray.json +135 -135
  69. package/{dist/tokens-mobile → tokens-mobile}/brand-blue_accent-brand.json +117 -117
  70. package/{dist/tokens-mobile → tokens-mobile}/brand-blue_accent-gray.json +135 -135
  71. package/{dist/tokens-mobile → tokens-mobile}/brand-green_accent-brand.json +117 -117
  72. package/{dist/tokens-mobile → tokens-mobile}/brand-green_accent-gray.json +135 -135
  73. package/{dist/tokens-mobile → tokens-mobile}/brand-mint_accent-brand.json +117 -117
  74. package/{dist/tokens-mobile → tokens-mobile}/brand-mint_accent-gray.json +135 -135
  75. package/{dist/tokens-mobile → tokens-mobile}/brand-orange_accent-gray.json +135 -135
  76. package/{dist/tokens-mobile → tokens-mobile}/brand-purple_accent-brand.json +117 -117
  77. package/{dist/tokens-mobile → tokens-mobile}/brand-purple_accent-gray.json +135 -135
  78. package/{dist/tokens-mobile → tokens-mobile}/brand-red_accent-gray.json +135 -135
  79. package/{dist/tokens-mobile → tokens-mobile}/brand-violet_accent-brand.json +117 -117
  80. package/{dist/tokens-mobile → tokens-mobile}/brand-violet_accent-gray.json +135 -135
  81. package/CHANGELOG.md +0 -84
  82. package/dist/colors.default-dark.js +0 -332
  83. package/dist/colors.default-light.js +0 -336
  84. package/dist/colors.less +0 -319
  85. package/dist/colors.scss +0 -319
  86. package/dist/esm/consts/default-swatch.d.ts +0 -109
  87. package/dist/esm/get-colors-base.d.ts +0 -12
  88. package/dist/esm/get-colors-default-tokens.d.ts +0 -645
  89. package/dist/esm/get-colors-default-tokens.js +0 -992
  90. package/dist/esm/get-colors.d.ts +0 -13
  91. package/dist/esm/get-colors.js +0 -14
  92. package/dist/esm/get-default-tokens.d.ts +0 -645
  93. package/dist/esm/get-default-tokens.js +0 -992
  94. package/dist/esm/helpers/get-interactions.js +0 -49
  95. package/dist/esm/helpers/get-logo.js +0 -28
  96. package/dist/esm/helpers/get-palette.d.ts +0 -76
  97. package/dist/esm/helpers/get-palette.js +0 -232
  98. package/dist/esm/helpers/get-promo.d.ts +0 -12
  99. package/dist/esm/helpers/get-promo.js +0 -51
  100. package/dist/esm/utils/convert-color.js +0 -133
  101. package/dist/esm/utils/format-variable.js +0 -10
  102. package/dist/tokens-js/brand-blue-deep_accent-brand.js +0 -644
  103. package/dist/tokens-js/brand-blue-deep_accent-gray.js +0 -644
  104. package/dist/tokens-js/brand-blue_accent-brand.js +0 -644
  105. package/dist/tokens-js/brand-blue_accent-gray.js +0 -644
  106. package/dist/tokens-js/brand-green_accent-brand.js +0 -644
  107. package/dist/tokens-js/brand-green_accent-gray.js +0 -644
  108. package/dist/tokens-js/brand-mint_accent-brand.js +0 -644
  109. package/dist/tokens-js/brand-mint_accent-gray.js +0 -644
  110. package/dist/tokens-js/brand-orange_accent-gray.js +0 -644
  111. package/dist/tokens-js/brand-purple_accent-brand.js +0 -644
  112. package/dist/tokens-js/brand-purple_accent-gray.js +0 -644
  113. package/dist/tokens-js/brand-red_accent-gray.js +0 -644
  114. package/dist/tokens-js/brand-violet_accent-brand.js +0 -644
  115. package/dist/tokens-js/brand-violet_accent-gray.js +0 -644
  116. package/scripts/babel-register.js +0 -4
  117. package/scripts/tokens-base.json +0 -3499
  118. package/scripts/tokens.json +0 -710
  119. /package/{dist/colors.js → colors.ts} +0 -0
  120. /package/{dist/esm → lib}/consts/params/abney-correction.d.ts +0 -0
  121. /package/{dist/esm → lib}/consts/params/chroma-params.d.ts +0 -0
  122. /package/{dist/esm → lib}/consts/params/interactions.d.ts +0 -0
  123. /package/{dist/esm → lib}/consts/params/interactions.js +0 -0
  124. /package/{dist/esm → lib}/consts/params/logo-lightness.d.ts +0 -0
  125. /package/{dist/esm → lib}/consts/params/logo-lightness.js +0 -0
  126. /package/{dist/esm → lib}/types/tokens-base-generator.js +0 -0
  127. /package/{dist/esm → lib}/types/tokens-base.js +0 -0
  128. /package/{dist/esm → lib}/types/tokens.js +0 -0
  129. /package/{dist/esm → lib}/utils/convert-color.d.ts +0 -0
  130. /package/{dist/esm → lib}/utils/format-variable.d.ts +0 -0
@@ -0,0 +1,108 @@
1
+ export declare const brand: {
2
+ red: string;
3
+ orange: string;
4
+ green: string;
5
+ mint: string;
6
+ blue: string;
7
+ blueDeep: string;
8
+ violet: string;
9
+ purple: string;
10
+ };
11
+ export declare const system: {
12
+ warning: string;
13
+ error: string;
14
+ success: string;
15
+ };
16
+ export declare const customizable: {
17
+ red: string;
18
+ orange: string;
19
+ green: string;
20
+ mint: string;
21
+ blue: string;
22
+ blueDeep: string;
23
+ violet: string;
24
+ purple: string;
25
+ yellow: string;
26
+ };
27
+ export declare const gray: {
28
+ 0: string;
29
+ 16: string;
30
+ 20: string;
31
+ 24: string;
32
+ 28: string;
33
+ 32: string;
34
+ 36: string;
35
+ 40: string;
36
+ 44: string;
37
+ 48: string;
38
+ 52: string;
39
+ 56: string;
40
+ 60: string;
41
+ 64: string;
42
+ 68: string;
43
+ 72: string;
44
+ 76: string;
45
+ 80: string;
46
+ 84: string;
47
+ 88: string;
48
+ 92: string;
49
+ 96: string;
50
+ 98: string;
51
+ 100: string;
52
+ };
53
+ export declare const whiteAlpha: {
54
+ 4: string;
55
+ 6: string;
56
+ 8: string;
57
+ 12: string;
58
+ 16: string;
59
+ 20: string;
60
+ 24: string;
61
+ 28: string;
62
+ 32: string;
63
+ 36: string;
64
+ 40: string;
65
+ 44: string;
66
+ 48: string;
67
+ 52: string;
68
+ 56: string;
69
+ 60: string;
70
+ 64: string;
71
+ 68: string;
72
+ 72: string;
73
+ 76: string;
74
+ 80: string;
75
+ 84: string;
76
+ 88: string;
77
+ 92: string;
78
+ 96: string;
79
+ 100: string;
80
+ };
81
+ export declare const blackAlpha: {
82
+ 4: string;
83
+ 6: string;
84
+ 8: string;
85
+ 12: string;
86
+ 16: string;
87
+ 20: string;
88
+ 24: string;
89
+ 28: string;
90
+ 32: string;
91
+ 36: string;
92
+ 40: string;
93
+ 44: string;
94
+ 48: string;
95
+ 52: string;
96
+ 56: string;
97
+ 60: string;
98
+ 64: string;
99
+ 68: string;
100
+ 72: string;
101
+ 76: string;
102
+ 80: string;
103
+ 84: string;
104
+ 88: string;
105
+ 92: string;
106
+ 96: string;
107
+ 100: string;
108
+ };
@@ -0,0 +1,108 @@
1
+ export var brand = {
2
+ red: '#FE4C4C',
3
+ orange: '#FC7630',
4
+ green: '#26AD50',
5
+ mint: '#00BEA2',
6
+ blue: '#2291FF',
7
+ blueDeep: '#366AF3',
8
+ violet: '#844BEC',
9
+ purple: '#B750D1',
10
+ };
11
+ export var system = {
12
+ warning: '#FDAA00',
13
+ error: '#E62B34',
14
+ success: '#009A40',
15
+ };
16
+ export var customizable = {
17
+ red: '#FE4C4C',
18
+ orange: '#FC7630',
19
+ green: '#26AD50',
20
+ mint: '#00BEA2',
21
+ blue: '#2291FF',
22
+ blueDeep: '#366AF3',
23
+ violet: '#844BEC',
24
+ purple: '#B750D1',
25
+ yellow: '#FAB700',
26
+ };
27
+ export var gray = {
28
+ 0: 'oklch(0% 0 0)',
29
+ 16: 'oklch(16% 0 0)',
30
+ 20: 'oklch(20% 0 0)',
31
+ 24: 'oklch(24% 0 0)',
32
+ 28: 'oklch(28% 0 0)',
33
+ 32: 'oklch(32% 0 0)',
34
+ 36: 'oklch(36% 0 0)',
35
+ 40: 'oklch(40% 0 0)',
36
+ 44: 'oklch(44% 0 0)',
37
+ 48: 'oklch(48% 0 0)',
38
+ 52: 'oklch(52% 0 0)',
39
+ 56: 'oklch(56% 0 0)',
40
+ 60: 'oklch(60% 0 0)',
41
+ 64: 'oklch(64% 0 0)',
42
+ 68: 'oklch(68% 0 0)',
43
+ 72: 'oklch(72% 0 0)',
44
+ 76: 'oklch(76% 0 0)',
45
+ 80: 'oklch(80% 0 0)',
46
+ 84: 'oklch(84% 0 0)',
47
+ 88: 'oklch(88% 0 0)',
48
+ 92: 'oklch(92% 0 0)',
49
+ 96: 'oklch(96% 0 0)',
50
+ 98: 'oklch(98% 0 0)',
51
+ 100: 'oklch(100% 0 0)',
52
+ };
53
+ export var whiteAlpha = {
54
+ 4: 'oklch(100% 0 0 / 0.04)',
55
+ 6: 'oklch(100% 0 0 / 0.06)',
56
+ 8: 'oklch(100% 0 0 / 0.08)',
57
+ 12: 'oklch(100% 0 0 / 0.12)',
58
+ 16: 'oklch(100% 0 0 / 0.16)',
59
+ 20: 'oklch(100% 0 0 / 0.2)',
60
+ 24: 'oklch(100% 0 0 / 0.24)',
61
+ 28: 'oklch(100% 0 0 / 0.28)',
62
+ 32: 'oklch(100% 0 0 / 0.32)',
63
+ 36: 'oklch(100% 0 0 / 0.36)',
64
+ 40: 'oklch(100% 0 0 / 0.4)',
65
+ 44: 'oklch(100% 0 0 / 0.44)',
66
+ 48: 'oklch(100% 0 0 / 0.48)',
67
+ 52: 'oklch(100% 0 0 / 0.52)',
68
+ 56: 'oklch(100% 0 0 / 0.56)',
69
+ 60: 'oklch(100% 0 0 / 0.6)',
70
+ 64: 'oklch(100% 0 0 / 0.64)',
71
+ 68: 'oklch(100% 0 0 / 0.68)',
72
+ 72: 'oklch(100% 0 0 / 0.72)',
73
+ 76: 'oklch(100% 0 0 / 0.76)',
74
+ 80: 'oklch(100% 0 0 / 0.8)',
75
+ 84: 'oklch(100% 0 0 / 0.84)',
76
+ 88: 'oklch(100% 0 0 / 0.88)',
77
+ 92: 'oklch(100% 0 0 / 0.92)',
78
+ 96: 'oklch(100% 0 0 / 0.96)',
79
+ 100: 'oklch(100% 0 0 / 1)',
80
+ };
81
+ export var blackAlpha = {
82
+ 4: 'oklch(0% 0 0 / 0.04)',
83
+ 6: 'oklch(0% 0 0 / 0.06)',
84
+ 8: 'oklch(0% 0 0 / 0.08)',
85
+ 12: 'oklch(0% 0 0 / 0.12)',
86
+ 16: 'oklch(0% 0 0 / 0.16)',
87
+ 20: 'oklch(0% 0 0 / 0.2)',
88
+ 24: 'oklch(0% 0 0 / 0.24)',
89
+ 28: 'oklch(0% 0 0 / 0.28)',
90
+ 32: 'oklch(0% 0 0 / 0.32)',
91
+ 36: 'oklch(0% 0 0 / 0.36)',
92
+ 40: 'oklch(0% 0 0 / 0.4)',
93
+ 44: 'oklch(0% 0 0 / 0.44)',
94
+ 48: 'oklch(0% 0 0 / 0.48)',
95
+ 52: 'oklch(0% 0 0 / 0.52)',
96
+ 56: 'oklch(0% 0 0 / 0.56)',
97
+ 60: 'oklch(0% 0 0 / 0.6)',
98
+ 64: 'oklch(0% 0 0 / 0.64)',
99
+ 68: 'oklch(0% 0 0 / 0.68)',
100
+ 72: 'oklch(0% 0 0 / 0.72)',
101
+ 76: 'oklch(0% 0 0 / 0.76)',
102
+ 80: 'oklch(0% 0 0 / 0.8)',
103
+ 84: 'oklch(0% 0 0 / 0.84)',
104
+ 88: 'oklch(0% 0 0 / 0.88)',
105
+ 92: 'oklch(0% 0 0 / 0.92)',
106
+ 96: 'oklch(0% 0 0 / 0.96)',
107
+ 100: 'oklch(0% 0 0 / 1)',
108
+ };
@@ -1,4 +1,4 @@
1
- export var brand = {
1
+ export const brand = {
2
2
  red: '#FE4C4C',
3
3
  orange: '#FC7630',
4
4
  green: '#26AD50',
@@ -8,13 +8,14 @@ export var brand = {
8
8
  violet: '#844BEC',
9
9
  purple: '#B750D1',
10
10
  };
11
- export var system = {
11
+
12
+ export const system = {
12
13
  warning: '#FDAA00',
13
14
  error: '#E62B34',
14
15
  success: '#009A40',
15
- accent: '#2291FF',
16
16
  };
17
- export var customizable = {
17
+
18
+ export const customizable = {
18
19
  red: '#FE4C4C',
19
20
  orange: '#FC7630',
20
21
  green: '#26AD50',
@@ -25,7 +26,8 @@ export var customizable = {
25
26
  purple: '#B750D1',
26
27
  yellow: '#FAB700',
27
28
  };
28
- export var gray = {
29
+
30
+ export const gray = {
29
31
  0: 'oklch(0% 0 0)',
30
32
  16: 'oklch(16% 0 0)',
31
33
  20: 'oklch(20% 0 0)',
@@ -51,7 +53,8 @@ export var gray = {
51
53
  98: 'oklch(98% 0 0)',
52
54
  100: 'oklch(100% 0 0)',
53
55
  };
54
- export var whiteAlpha = {
56
+
57
+ export const whiteAlpha = {
55
58
  4: 'oklch(100% 0 0 / 0.04)',
56
59
  6: 'oklch(100% 0 0 / 0.06)',
57
60
  8: 'oklch(100% 0 0 / 0.08)',
@@ -79,7 +82,8 @@ export var whiteAlpha = {
79
82
  96: 'oklch(100% 0 0 / 0.96)',
80
83
  100: 'oklch(100% 0 0 / 1)',
81
84
  };
82
- export var blackAlpha = {
85
+
86
+ export const blackAlpha = {
83
87
  4: 'oklch(0% 0 0 / 0.04)',
84
88
  6: 'oklch(0% 0 0 / 0.06)',
85
89
  8: 'oklch(0% 0 0 / 0.08)',