vanilla-framework 4.7.0 → 4.9.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.
Files changed (46) hide show
  1. package/package.json +8 -8
  2. package/scss/_base.scss +2 -0
  3. package/scss/_base_background.scss +2 -6
  4. package/scss/_base_button.scss +8 -8
  5. package/scss/_base_code.scss +5 -5
  6. package/scss/_base_forms.scss +22 -103
  7. package/scss/_base_grid-definitions.scss +4 -4
  8. package/scss/_base_hr.scss +5 -39
  9. package/scss/_base_icon-definitions.scss +361 -54
  10. package/scss/_base_links.scss +2 -10
  11. package/scss/_base_placeholders.scss +1 -1
  12. package/scss/_base_syntax-highlighting.scss +2 -2
  13. package/scss/_base_tables.scss +2 -2
  14. package/scss/_base_themes.scss +52 -0
  15. package/scss/_base_typography-definitions.scss +1 -1
  16. package/scss/_global_functions.scss +10 -0
  17. package/scss/_layouts_application-panels.scss +1 -1
  18. package/scss/_patterns_buttons.scss +35 -167
  19. package/scss/_patterns_chip.scss +156 -189
  20. package/scss/_patterns_code-snippet.scss +7 -8
  21. package/scss/_patterns_contextual-menu.scss +16 -75
  22. package/scss/_patterns_divider.scss +5 -35
  23. package/scss/_patterns_form-help-text.scss +1 -29
  24. package/scss/_patterns_form-password-toggle.scss +1 -1
  25. package/scss/_patterns_form-tick-elements.scss +9 -128
  26. package/scss/_patterns_form-validation.scss +31 -229
  27. package/scss/_patterns_icons.scss +623 -442
  28. package/scss/_patterns_links.scss +12 -9
  29. package/scss/_patterns_lists.scss +23 -40
  30. package/scss/_patterns_media-container.scss +5 -0
  31. package/scss/_patterns_notifications.scss +21 -12
  32. package/scss/_patterns_search-box.scss +20 -99
  33. package/scss/_patterns_section.scss +12 -1
  34. package/scss/_patterns_side-navigation-expandable.scss +18 -55
  35. package/scss/_patterns_side-navigation.scss +132 -317
  36. package/scss/_patterns_strip.scss +41 -13
  37. package/scss/_patterns_suru.scss +126 -10
  38. package/scss/_patterns_table-mobile-card.scss +1 -1
  39. package/scss/_patterns_table-sortable.scss +2 -2
  40. package/scss/_patterns_tabs.scss +23 -74
  41. package/scss/_settings_colors.scss +195 -2
  42. package/scss/_settings_themes.scss +6 -6
  43. package/scss/_utilities_baseline-grid.scss +8 -0
  44. package/scss/_utilities_layout.scss +0 -6
  45. package/scss/_utilities_theme-toggle.scss +39 -0
  46. package/scss/_vanilla.scss +4 -0
@@ -18,7 +18,7 @@
18
18
  .p-form-password-toggle + [type='text'] {
19
19
  &[readonly],
20
20
  &[readonly='readonly'] {
21
- color: $colors--light-theme--text-default;
21
+ color: $colors--theme--text-default;
22
22
  }
23
23
  }
24
24
  }
@@ -11,6 +11,7 @@
11
11
  }
12
12
 
13
13
  %vf-pseudo-tick-box {
14
+ color: $colors--theme--text-default;
14
15
  padding-left: $sph--large + $form-tick-box-size;
15
16
  position: relative;
16
17
 
@@ -26,6 +27,8 @@
26
27
 
27
28
  // container
28
29
  &::before {
30
+ background: $colors--theme--background-default;
31
+ border: $input-border-thickness solid $colors--theme--border-high-contrast;
29
32
  content: '';
30
33
  height: $form-tick-box-size;
31
34
  left: 0;
@@ -41,18 +44,18 @@
41
44
  }
42
45
 
43
46
  .p-muted-heading & {
44
- color: $colors--light-theme--text-muted;
47
+ color: $colors--theme--text-muted;
45
48
  }
46
49
 
47
50
  &:hover::before {
48
- background-color: $colors--light-theme--background-hover;
51
+ background-color: $colors--theme--background-hover;
49
52
  }
50
53
  }
51
54
 
52
55
  %vf-pseudo-tick-box-checked {
53
56
  &::before {
54
- background-color: $color-link;
55
- border-color: $color-link;
57
+ background-color: $colors--theme--link-default;
58
+ border-color: $colors--theme--link-default;
56
59
  }
57
60
 
58
61
  &::after {
@@ -76,6 +79,7 @@
76
79
  &::after {
77
80
  border-bottom: 2px solid;
78
81
  border-left: 2px solid;
82
+ color: $colors--theme--background-default;
79
83
  height: $form-tick-height;
80
84
  left: $form-tick-height * 0.5;
81
85
  top: calc($baseline-position - $form-tick-box-size + $form-tick-offset-top + $form-tick-box-nudge);
@@ -100,6 +104,7 @@
100
104
  }
101
105
 
102
106
  &::after {
107
+ background-color: $colors--theme--background-default;
103
108
  border-radius: 50%;
104
109
  height: $form-radio-inner-circle-diameter;
105
110
  left: #{($form-tick-box-size - $form-radio-inner-circle-diameter) * 0.5};
@@ -208,128 +213,4 @@
208
213
  .p-radio + .p-checkbox {
209
214
  margin-top: -$sp-unit;
210
215
  }
211
-
212
- // Theming
213
- @if ($theme-default-forms == 'dark') {
214
- .p-checkbox__label {
215
- @include vf-checkbox-dark-theme;
216
- }
217
-
218
- .p-radio__label {
219
- @include vf-radio-dark-theme;
220
- }
221
-
222
- .p-checkbox.is-light .p-checkbox__label {
223
- @include vf-checkbox-light-theme;
224
- }
225
-
226
- .p-radio.is-light .p-radio__label {
227
- @include vf-radio-light-theme;
228
- }
229
- } @else {
230
- .p-checkbox__label {
231
- @include vf-checkbox-light-theme;
232
- }
233
-
234
- .p-radio__label {
235
- @include vf-radio-light-theme;
236
- }
237
-
238
- .p-checkbox.is-dark .p-checkbox__label {
239
- @include vf-checkbox-dark-theme;
240
- }
241
-
242
- .p-radio.is-dark .p-radio__label {
243
- @include vf-radio-dark-theme;
244
- }
245
- }
246
- }
247
-
248
- // theme for common properties on radios and checkboxes
249
- @mixin vf-tick-elements-theme(
250
- // color of the tick element label text
251
- $color-tick-text,
252
- // color of the tick element background
253
- $color-tick-background,
254
- // color of the tick element border
255
- $color-tick-border: $colors--light-theme--border-high-contrast
256
- ) {
257
- color: $color-tick-text;
258
-
259
- &::before {
260
- background: $color-tick-background;
261
- border: $input-border-thickness solid $color-tick-border;
262
- }
263
- }
264
-
265
- // theme for checkbox (including common properties)
266
- @mixin vf-checkbox-theme(
267
- // color of the tick element label text
268
- $color-tick-text,
269
- // color of the tick element background
270
- $color-tick-background,
271
- // color of the tick element border
272
- $color-tick-border,
273
- // color of the checkbox tick
274
- $color-checkbox-tick
275
- ) {
276
- @include vf-tick-elements-theme($color-tick-text, $color-tick-background, $color-tick-border);
277
-
278
- &::after {
279
- color: $color-checkbox-tick;
280
- }
281
- }
282
-
283
- @mixin vf-checkbox-light-theme {
284
- @include vf-checkbox-theme(
285
- $color-tick-text: $colors--light-theme--text-default,
286
- $color-tick-background: $colors--light-theme--background-default,
287
- $color-tick-border: $colors--light-theme--border-high-contrast,
288
- $color-checkbox-tick: $colors--light-theme--background-default
289
- );
290
- }
291
-
292
- @mixin vf-checkbox-dark-theme {
293
- @include vf-checkbox-theme(
294
- $color-tick-text: $colors--dark-theme--text-default,
295
- $color-tick-background: $colors--dark-theme--background-default,
296
- $color-tick-border: $colors--dark-theme--border-high-contrast,
297
- $color-checkbox-tick: $colors--dark-theme--text-default
298
- );
299
- }
300
-
301
- // theme for radio (including common properties)
302
- @mixin vf-radio-theme(
303
- // color of the tick element label text
304
- $color-tick-text,
305
- // color of the tick element background
306
- $color-tick-background,
307
- // color of the tick element border
308
- $color-tick-border,
309
- // color of the radio dot
310
- $color-radio-dot
311
- ) {
312
- @include vf-tick-elements-theme($color-tick-text, $color-tick-background, $color-tick-border);
313
-
314
- &::after {
315
- background-color: $color-radio-dot;
316
- }
317
- }
318
-
319
- @mixin vf-radio-light-theme {
320
- @include vf-radio-theme(
321
- $color-tick-text: $colors--light-theme--text-default,
322
- $color-tick-background: $colors--light-theme--background-default,
323
- $color-tick-border: $colors--light-theme--border-high-contrast,
324
- $color-radio-dot: $colors--light-theme--background-default
325
- );
326
- }
327
-
328
- @mixin vf-radio-dark-theme {
329
- @include vf-radio-theme(
330
- $color-tick-text: $colors--dark-theme--text-default,
331
- $color-tick-background: $colors--dark-theme--background-default,
332
- $color-tick-border: $colors--dark-theme--border-high-contrast,
333
- $color-radio-dot: $colors--dark-theme--text-default
334
- );
335
216
  }
@@ -18,261 +18,63 @@
18
18
  margin-top: -$sp-unit;
19
19
  }
20
20
 
21
- // Theming
22
- @if ($theme-default-forms == 'dark') {
21
+ .is-caution {
23
22
  .p-form-validation__input {
24
- .is-success & {
25
- @include vf-form-validation-input-success-dark-theme;
26
- }
23
+ background-color: $colors--theme--background-caution-default;
24
+ border-bottom-color: $colors--theme--border-caution;
27
25
 
28
- .is-caution & {
29
- @include vf-form-validation-input-caution-dark-theme;
26
+ &:hover {
27
+ background-color: $colors--theme--background-caution-hover;
30
28
  }
31
29
 
32
- .is-error & {
33
- @include vf-form-validation-input-error-dark-theme;
30
+ &:focus {
31
+ background-color: $colors--theme--background-caution-active;
34
32
  }
35
33
  }
36
34
 
37
35
  .p-form-validation__message {
38
- .is-success & {
39
- @include vf-form-validation-message-success-dark-theme;
40
- }
41
-
42
- .is-caution & {
43
- @include vf-form-validation-message-caution-dark-theme;
44
- }
45
-
46
- .is-error & {
47
- @include vf-form-validation-message-error-dark-theme;
48
- }
36
+ @include vf-icon-warning-themed;
37
+ color: $colors--theme--border-caution;
49
38
  }
50
- } @else {
39
+ }
40
+
41
+ .is-error {
51
42
  .p-form-validation__input {
52
- .is-success & {
53
- @include vf-form-validation-input-success-light-theme;
54
- }
43
+ background-color: $colors--theme--background-negative-default;
44
+ border-bottom-color: $colors--theme--border-negative;
55
45
 
56
- .is-caution & {
57
- @include vf-form-validation-input-caution-light-theme;
46
+ &:hover {
47
+ background-color: $colors--theme--background-negative-hover;
58
48
  }
59
49
 
60
- .is-error & {
61
- @include vf-form-validation-input-error-light-theme;
50
+ &:focus {
51
+ background-color: $colors--theme--background-negative-active;
62
52
  }
63
53
  }
64
54
 
65
55
  .p-form-validation__message {
66
- .is-success & {
67
- @include vf-form-validation-message-success-light-theme;
68
- }
69
-
70
- .is-caution & {
71
- @include vf-form-validation-message-caution-light-theme;
72
- }
73
-
74
- .is-error & {
75
- @include vf-form-validation-message-error-light-theme;
76
- }
56
+ @include vf-icon-error-themed;
57
+ color: $colors--theme--border-negative;
77
58
  }
78
59
  }
79
60
 
80
- // when is-dark/is-light is set on root p-form-validation element or its parent
81
- .is-dark .is-success,
82
- .is-success.is-dark {
61
+ .is-success {
83
62
  .p-form-validation__input {
84
- @include vf-form-validation-input-success-dark-theme;
85
- }
86
- .p-form-validation__message {
87
- @include vf-form-validation-message-success-dark-theme;
88
- }
89
- }
63
+ background-color: $colors--theme--background-positive-default;
64
+ border-bottom-color: $colors--theme--border-positive;
90
65
 
91
- .is-success.is-light {
92
- .p-form-validation__input {
93
- @include vf-form-validation-input-success-light-theme;
94
- }
95
- .p-form-validation__message {
96
- @include vf-form-validation-message-success-light-theme;
97
- }
98
- }
99
-
100
- .is-dark .is-caution,
101
- .is-caution.is-dark {
102
- .p-form-validation__input {
103
- @include vf-form-validation-input-caution-dark-theme;
104
- }
105
- .p-form-validation__message {
106
- @include vf-form-validation-message-caution-dark-theme;
107
- }
108
- }
109
-
110
- .is-caution.is-light {
111
- .p-form-validation__input {
112
- @include vf-form-validation-input-caution-light-theme;
113
- }
114
- .p-form-validation__message {
115
- @include vf-form-validation-message-caution-light-theme;
116
- }
117
- }
66
+ &:hover {
67
+ background-color: $colors--theme--background-positive-hover;
68
+ }
118
69
 
119
- .is-dark .is-error,
120
- .is-error.is-dark {
121
- .p-form-validation__input {
122
- @include vf-form-validation-input-error-dark-theme;
123
- }
124
- .p-form-validation__message {
125
- @include vf-form-validation-message-error-dark-theme;
70
+ &:focus {
71
+ background-color: $colors--theme--background-positive-active;
72
+ }
126
73
  }
127
- }
128
74
 
129
- .is-error.is-light {
130
- .p-form-validation__input {
131
- @include vf-form-validation-input-error-light-theme;
132
- }
133
75
  .p-form-validation__message {
134
- @include vf-form-validation-message-error-light-theme;
135
- }
136
- }
137
-
138
- // when is-dark/is-light is set on p-form-validation__input element
139
- .is-success .p-form-validation__input {
140
- .is-dark &,
141
- &.is-dark {
142
- @include vf-form-validation-input-success-dark-theme;
143
- }
144
-
145
- &.is-light {
146
- @include vf-form-validation-input-success-light-theme;
147
- }
148
- }
149
-
150
- .is-caution .p-form-validation__input {
151
- .is-dark &,
152
- &.is-dark {
153
- @include vf-form-validation-input-caution-dark-theme;
154
- }
155
-
156
- &.is-light {
157
- @include vf-form-validation-input-caution-light-theme;
76
+ @include vf-icon-success-themed;
77
+ color: $colors--theme--border-positive;
158
78
  }
159
79
  }
160
-
161
- .is-error .p-form-validation__input {
162
- .is-dark &,
163
- &.is-dark {
164
- @include vf-form-validation-input-error-dark-theme;
165
- }
166
-
167
- &.is-light {
168
- @include vf-form-validation-input-error-light-theme;
169
- }
170
- }
171
- }
172
-
173
- @mixin vf-form-validation-input-state-theme($color-background-default, $color-background-hover, $color-background-active, $color-border, $color-text) {
174
- background-color: $color-background-default;
175
- border-bottom-color: $color-border;
176
-
177
- &:hover {
178
- background-color: $color-background-hover;
179
- }
180
-
181
- &:focus {
182
- background-color: $color-background-active;
183
- }
184
- }
185
-
186
- @mixin vf-form-validation-input-success-dark-theme {
187
- @include vf-form-validation-input-state-theme(
188
- $color-background-default: map-get($colors-dark-theme--tinted-backgrounds, 'positive', 'default'),
189
- $color-background-hover: map-get($colors-dark-theme--tinted-backgrounds, 'positive', 'hover'),
190
- $color-background-active: map-get($colors-dark-theme--tinted-backgrounds, 'positive', 'active'),
191
- $color-border: map-get($colors-dark-theme--tinted-borders, 'positive'),
192
- $color-text: map-get($colors-dark-theme--tinted-borders, 'positive')
193
- );
194
- }
195
-
196
- @mixin vf-form-validation-input-caution-dark-theme {
197
- @include vf-form-validation-input-state-theme(
198
- $color-background-default: map-get($colors-dark-theme--tinted-backgrounds, 'caution', 'default'),
199
- $color-background-hover: map-get($colors-dark-theme--tinted-backgrounds, 'caution', 'hover'),
200
- $color-background-active: map-get($colors-dark-theme--tinted-backgrounds, 'caution', 'active'),
201
- $color-border: map-get($colors-dark-theme--tinted-borders, 'caution'),
202
- $color-text: map-get($colors-dark-theme--tinted-borders, 'caution')
203
- );
204
- }
205
-
206
- @mixin vf-form-validation-input-error-dark-theme {
207
- @include vf-form-validation-input-state-theme(
208
- $color-background-default: map-get($colors-dark-theme--tinted-backgrounds, 'negative', 'default'),
209
- $color-background-hover: map-get($colors-dark-theme--tinted-backgrounds, 'negative', 'hover'),
210
- $color-background-active: map-get($colors-dark-theme--tinted-backgrounds, 'negative', 'active'),
211
- $color-border: map-get($colors-dark-theme--tinted-borders, 'negative'),
212
- $color-text: map-get($colors-dark-theme--tinted-borders, 'negative')
213
- );
214
- }
215
-
216
- @mixin vf-form-validation-input-success-light-theme {
217
- @include vf-form-validation-input-state-theme(
218
- $color-background-default: $color-positive-background,
219
- $color-background-hover: $color-positive-background--hover,
220
- $color-background-active: $color-positive-background--focus,
221
- $color-border: $color-positive,
222
- $color-text: $color-positive
223
- );
224
- }
225
-
226
- @mixin vf-form-validation-input-caution-light-theme {
227
- @include vf-form-validation-input-state-theme(
228
- $color-background-default: $color-caution-background,
229
- $color-background-hover: $color-caution-background--hover,
230
- $color-background-active: $color-caution-background--focus,
231
- $color-border: $color-caution,
232
- $color-text: $color-caution
233
- );
234
- }
235
-
236
- @mixin vf-form-validation-input-error-light-theme {
237
- @include vf-form-validation-input-state-theme(
238
- $color-background-default: $color-negative-background,
239
- $color-background-hover: $color-negative-background--hover,
240
- $color-background-active: $color-negative-background--focus,
241
- $color-border: $color-negative,
242
- $color-text: $color-negative
243
- );
244
- }
245
-
246
- @mixin vf-form-validation-message-state-theme($color-text) {
247
- color: $color-text;
248
- }
249
-
250
- @mixin vf-form-validation-message-success-dark-theme {
251
- @include vf-form-validation-message-state-theme($color-text: map-get($colors-dark-theme--tinted-borders, 'positive'));
252
- @include vf-icon-success($color: map-get($colors-dark-theme--tinted-borders, 'positive'), $color-symbol: $colors--dark-theme--background-default);
253
- }
254
-
255
- @mixin vf-form-validation-message-caution-dark-theme {
256
- @include vf-form-validation-message-state-theme($color-text: map-get($colors-dark-theme--tinted-borders, 'caution'));
257
- @include vf-icon-warning($color: map-get($colors-dark-theme--tinted-borders, 'caution'), $color-symbol: $colors--dark-theme--background-default);
258
- }
259
-
260
- @mixin vf-form-validation-message-error-dark-theme {
261
- @include vf-form-validation-message-state-theme($color-text: map-get($colors-dark-theme--tinted-borders, 'negative'));
262
- @include vf-icon-error($color: map-get($colors-dark-theme--tinted-borders, 'negative'), $color-symbol: $colors--dark-theme--background-default);
263
- }
264
-
265
- @mixin vf-form-validation-message-success-light-theme {
266
- @include vf-form-validation-message-state-theme($color-text: $color-positive);
267
- @include vf-icon-success($color-positive);
268
- }
269
-
270
- @mixin vf-form-validation-message-caution-light-theme {
271
- @include vf-form-validation-message-state-theme($color-text: $colors--light-theme--text-default);
272
- @include vf-icon-warning($color-caution);
273
- }
274
-
275
- @mixin vf-form-validation-message-error-light-theme {
276
- @include vf-form-validation-message-state-theme($color-text: $color-negative);
277
- @include vf-icon-error($color-negative);
278
80
  }