@orangesk/orange-design-system 2.0.0-beta.8 → 2.0.0-beta.9
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/build/components/index.js +4 -4
- package/build/components/index.js.map +1 -1
- package/build/components/tsconfig.tsbuildinfo +1 -1
- package/build/components/types/index.d.ts +11 -7
- package/build/components/types/src/components/Button/Button.d.ts +1 -0
- package/build/components/types/src/components/Card/Card.d.ts +2 -1
- package/build/components/types/src/components/Carousel/Carousel.d.ts +4 -0
- package/build/components/types/src/components/Carousel/Carousel.static.d.ts +1 -0
- package/build/components/types/src/components/Carousel/constants.d.ts +2 -0
- package/build/components/types/src/components/Pill/Pill.d.ts +1 -1
- package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +3 -5
- package/build/lib/after-components.css +1 -1
- package/build/lib/after-components.css.map +1 -1
- package/build/lib/before-components.css +1 -1
- package/build/lib/before-components.css.map +1 -1
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/scripts.js +3 -3
- package/build/lib/scripts.js.map +1 -1
- package/build/lib/style.css +1 -1
- package/build/lib/style.css.map +1 -1
- package/build/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/components/Button/Button.tsx +2 -0
- package/src/components/Button/styles/mixins.scss +5 -0
- package/src/components/Button/styles/style.scss +4 -0
- package/src/components/Card/Card.tsx +4 -1
- package/src/components/Card/styles/style.scss +4 -0
- package/src/components/Carousel/Carousel.static.ts +67 -1
- package/src/components/Carousel/Carousel.tsx +41 -19
- package/src/components/Carousel/constants.ts +2 -0
- package/src/components/Carousel/styles/config.scss +1 -2
- package/src/components/Carousel/styles/mixins.scss +35 -2
- package/src/components/Carousel/styles/style.scss +8 -0
- package/src/components/Icon/styles/style.scss +11 -0
- package/src/components/Icon/tests/Pictogram.unit.test.js +38 -0
- package/src/components/Pill/Pill.tsx +1 -1
- package/src/components/Pill/styles/config.scss +4 -0
- package/src/components/Preview/PreviewGenerator.tsx +48 -21
- package/src/components/PromoBanner/PromoBanner.tsx +14 -26
- package/src/components/PromoBanner/styles/mixins.scss +20 -21
- package/src/components/PromoBanner/styles/style.scss +0 -6
- package/src/styles/base/globals.scss +1 -0
- package/src/styles/utilities/color.scss +90 -20
|
@@ -1,39 +1,94 @@
|
|
|
1
1
|
@use "../tokens/color";
|
|
2
|
-
|
|
3
|
-
// TODO premyslieť, či je potrebné tieto farby nahradiť tokenmi, alebo hardcodovat aby neboli nepredvidatelne
|
|
2
|
+
@use "sass:map";
|
|
4
3
|
|
|
5
4
|
@layer utilities {
|
|
5
|
+
// Background utilities
|
|
6
|
+
@each $name, $value in color.$colors-light {
|
|
7
|
+
@if str-index($name, "background-") == 1 {
|
|
8
|
+
.#{$name} {
|
|
9
|
+
background-color: var(--color-#{$name}) !important;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Surface utilities
|
|
15
|
+
@each $name, $value in color.$colors-light {
|
|
16
|
+
@if str-index($name, "surface-") == 1 {
|
|
17
|
+
.#{$name} {
|
|
18
|
+
background-color: var(--color-#{$name}) !important;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Fill utilities
|
|
24
|
+
@each $name, $value in color.$colors-light {
|
|
25
|
+
@if str-index($name, "fill-") == 1 {
|
|
26
|
+
.#{$name} {
|
|
27
|
+
background-color: var(--color-#{$name}) !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Border utilities
|
|
33
|
+
@each $name, $value in color.$colors-light {
|
|
34
|
+
@if str-index($name, "border-") == 1 {
|
|
35
|
+
.#{$name} {
|
|
36
|
+
border-color: var(--color-#{$name}) !important;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Text color utilities
|
|
42
|
+
@each $name, $value in color.$colors-light {
|
|
43
|
+
@if str-index($name, "text-") == 1 {
|
|
44
|
+
.#{$name} {
|
|
45
|
+
color: var(--color-#{$name}) !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Icon color utilities
|
|
51
|
+
@each $name, $value in color.$colors-light {
|
|
52
|
+
@if str-index($name, "icon-") == 1 {
|
|
53
|
+
.#{$name} {
|
|
54
|
+
color: var(--color-#{$name}) !important;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Legacy classes - DEPRECATED (add deprecation warnings)
|
|
6
60
|
.color-black {
|
|
7
|
-
|
|
61
|
+
@warn "Deprecated: Use .text-default instead of .color-black";
|
|
8
62
|
color: color.$black !important;
|
|
9
63
|
}
|
|
10
64
|
|
|
11
65
|
.color-orange {
|
|
12
|
-
|
|
66
|
+
@warn "Deprecated: Use .text-accent instead of .color-orange";
|
|
13
67
|
color: var(--color-text-accent) !important;
|
|
14
68
|
}
|
|
15
69
|
|
|
16
70
|
.color-gray {
|
|
17
|
-
|
|
71
|
+
@warn "Deprecated: Use .text-secondary instead of .color-gray";
|
|
18
72
|
color: color.$gray-800 !important;
|
|
19
73
|
}
|
|
20
74
|
|
|
21
75
|
.color-white {
|
|
22
|
-
|
|
76
|
+
@warn "Deprecated: Use .text-inverse instead of .color-white";
|
|
23
77
|
color: color.$white !important;
|
|
24
78
|
}
|
|
25
79
|
|
|
26
80
|
.color-blue {
|
|
81
|
+
@warn "Deprecated: Use .icon-information instead of .color-blue";
|
|
27
82
|
color: var(--color-icon-information) !important;
|
|
28
83
|
}
|
|
29
84
|
|
|
30
85
|
.color-danger {
|
|
31
|
-
|
|
86
|
+
@warn "Deprecated: Use .icon-negative instead of .color-danger";
|
|
32
87
|
color: var(--color-icon-negative) !important;
|
|
33
88
|
}
|
|
34
89
|
|
|
35
90
|
.bg-white {
|
|
36
|
-
|
|
91
|
+
@warn "Deprecated: Use .background-primary instead of .bg-white";
|
|
37
92
|
background-color: color.$white !important;
|
|
38
93
|
color: var(--color-text-default);
|
|
39
94
|
|
|
@@ -44,10 +99,9 @@
|
|
|
44
99
|
}
|
|
45
100
|
|
|
46
101
|
.bg-black {
|
|
47
|
-
|
|
48
|
-
// background-color: color.$black !important;
|
|
102
|
+
@warn "Deprecated: Use .background-contrast instead of .bg-black";
|
|
49
103
|
background-color: #141414 !important;
|
|
50
|
-
color: var(--color-text-
|
|
104
|
+
color: var(--color-text-inverse);
|
|
51
105
|
|
|
52
106
|
.color-gray,
|
|
53
107
|
&.color-gray {
|
|
@@ -61,83 +115,92 @@
|
|
|
61
115
|
}
|
|
62
116
|
|
|
63
117
|
.bg-orange {
|
|
118
|
+
@warn "Deprecated: Use .surface-secondary instead of .bg-orange";
|
|
64
119
|
background-color: var(--color-surface-secondary) !important;
|
|
65
|
-
// TODO: replace with new token when available
|
|
66
120
|
color: color.$black !important;
|
|
67
121
|
}
|
|
68
122
|
|
|
69
123
|
.bg-orange-dark {
|
|
124
|
+
@warn "Deprecated: Use .surface-tertiary instead of .bg-orange-dark";
|
|
70
125
|
background-color: var(--color-surface-tertiary) !important;
|
|
71
126
|
color: var(--color-text-inverse) !important;
|
|
72
127
|
}
|
|
73
128
|
|
|
74
129
|
.bg-gray {
|
|
130
|
+
@warn "Deprecated: Use .surface-subtle instead of .bg-gray";
|
|
75
131
|
background-color: var(--color-surface-subtle) !important;
|
|
76
132
|
}
|
|
77
133
|
|
|
78
134
|
.bg-gray-lighter {
|
|
135
|
+
@warn "Deprecated: Use .background-secondary instead of .bg-gray-lighter";
|
|
79
136
|
background-color: var(--color-background-secondary) !important;
|
|
80
137
|
}
|
|
81
138
|
|
|
82
139
|
.bg-blue {
|
|
140
|
+
@warn "Deprecated: Use .fill-accent1 instead of .bg-blue";
|
|
83
141
|
background-color: var(--color-fill-accent1) !important;
|
|
84
|
-
// TODO: replace with new token when available
|
|
85
142
|
color: color.$black !important;
|
|
86
143
|
}
|
|
87
144
|
|
|
88
145
|
.bg-green {
|
|
146
|
+
@warn "Deprecated: Use .fill-accent2 instead of .bg-green";
|
|
89
147
|
background-color: var(--color-fill-accent2) !important;
|
|
90
|
-
// TODO: replace with new token when available
|
|
91
148
|
color: color.$black !important;
|
|
92
149
|
}
|
|
93
150
|
|
|
94
151
|
.bg-pink {
|
|
152
|
+
@warn "Deprecated: Use .fill-accent3 instead of .bg-pink";
|
|
95
153
|
background-color: var(--color-fill-accent3) !important;
|
|
96
|
-
// TODO: replace with new token when available
|
|
97
154
|
color: color.$black !important;
|
|
98
155
|
}
|
|
99
156
|
|
|
100
157
|
.bg-violet {
|
|
158
|
+
@warn "Deprecated: Use .fill-accent4 instead of .bg-violet";
|
|
101
159
|
background-color: var(--color-fill-accent4) !important;
|
|
102
|
-
// TODO: replace with new token when available
|
|
103
160
|
color: color.$black !important;
|
|
104
161
|
}
|
|
105
162
|
|
|
106
163
|
.bg-yellow {
|
|
164
|
+
@warn "Deprecated: Use .fill-accent5 instead of .bg-yellow";
|
|
107
165
|
background-color: var(--color-fill-accent5) !important;
|
|
108
|
-
// TODO: replace with new token when available
|
|
109
166
|
color: color.$black !important;
|
|
110
167
|
}
|
|
111
168
|
|
|
112
169
|
.bg-yellow-lighter {
|
|
113
|
-
|
|
170
|
+
@warn "Deprecated: This class will be removed in future versions";
|
|
114
171
|
background-color: color.$yellow-lighter !important;
|
|
115
172
|
color: color.$black !important;
|
|
116
173
|
}
|
|
117
174
|
|
|
118
175
|
.bg-red {
|
|
119
|
-
|
|
176
|
+
@warn "Deprecated: Use .fill-negative instead of .bg-red";
|
|
120
177
|
background-color: color.$red !important;
|
|
121
178
|
color: color.$black !important;
|
|
122
179
|
}
|
|
123
180
|
|
|
124
181
|
.bg-accent {
|
|
182
|
+
@warn "Deprecated: Use .background-accent instead of .bg-accent";
|
|
125
183
|
background-color: var(--color-background-accent) !important;
|
|
126
184
|
color: var(--color-text-default) !important;
|
|
127
185
|
}
|
|
128
186
|
|
|
129
187
|
.bg-accent1-blog {
|
|
188
|
+
@warn "Deprecated: Use .background-accent1-blog instead of .bg-accent1-blog";
|
|
130
189
|
background-color: var(--color-background-accent1-blog) !important;
|
|
131
190
|
color: var(--color-text-default) !important;
|
|
132
191
|
}
|
|
133
192
|
|
|
134
193
|
.bg-accent2-blog {
|
|
194
|
+
@warn "Deprecated: Use .background-accent2-blog instead of .bg-accent2-blog";
|
|
135
195
|
background-color: var(--color-background-accent2-blog) !important;
|
|
136
196
|
color: var(--color-text-default) !important;
|
|
137
197
|
}
|
|
138
198
|
|
|
199
|
+
// Legacy selection styles
|
|
139
200
|
.bg-orange,
|
|
140
|
-
.bg-orange-dark
|
|
201
|
+
.bg-orange-dark,
|
|
202
|
+
.surface-secondary,
|
|
203
|
+
.surface-tertiary {
|
|
141
204
|
&::selection {
|
|
142
205
|
background-color: var(--color-background-contrast);
|
|
143
206
|
color: var(--color-text-inverse);
|
|
@@ -148,7 +211,14 @@
|
|
|
148
211
|
color: var(--color-text-default);
|
|
149
212
|
}
|
|
150
213
|
|
|
214
|
+
// Legacy classes - continued
|
|
151
215
|
.bg-none {
|
|
216
|
+
@warn "Deprecated: Use .background-none instead of .bg-none";
|
|
217
|
+
background: none !important;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Utility for removing background
|
|
221
|
+
.background-none {
|
|
152
222
|
background: none !important;
|
|
153
223
|
}
|
|
154
224
|
}
|