vanilla-framework 4.6.0 → 4.8.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 (37) hide show
  1. package/package.json +12 -13
  2. package/scss/_base.scss +2 -0
  3. package/scss/_base_background.scss +2 -6
  4. package/scss/_base_forms.scss +23 -104
  5. package/scss/_base_hr.scss +5 -39
  6. package/scss/_base_icon-definitions.scss +335 -46
  7. package/scss/_base_links.scss +2 -10
  8. package/scss/_base_placeholders.scss +1 -1
  9. package/scss/_base_tables.scss +2 -2
  10. package/scss/_base_themes.scss +52 -0
  11. package/scss/_base_typography-definitions.scss +1 -1
  12. package/scss/_global_functions.scss +10 -0
  13. package/scss/_layouts_application-panels.scss +1 -1
  14. package/scss/_patterns_chip.scss +156 -189
  15. package/scss/_patterns_contextual-menu.scss +16 -75
  16. package/scss/_patterns_divider.scss +5 -35
  17. package/scss/_patterns_form-help-text.scss +1 -29
  18. package/scss/_patterns_form-password-toggle.scss +1 -1
  19. package/scss/_patterns_form-tick-elements.scss +12 -129
  20. package/scss/_patterns_form-validation.scss +31 -229
  21. package/scss/_patterns_icons.scss +623 -442
  22. package/scss/_patterns_links.scss +12 -9
  23. package/scss/_patterns_lists.scss +0 -31
  24. package/scss/_patterns_navigation.scss +66 -13
  25. package/scss/_patterns_notifications.scss +21 -12
  26. package/scss/_patterns_search-box.scss +20 -99
  27. package/scss/_patterns_section.scss +12 -1
  28. package/scss/_patterns_side-navigation-expandable.scss +18 -55
  29. package/scss/_patterns_side-navigation.scss +117 -317
  30. package/scss/_patterns_strip.scss +87 -21
  31. package/scss/_patterns_suru.scss +126 -10
  32. package/scss/_patterns_table-mobile-card.scss +1 -1
  33. package/scss/_patterns_table-sortable.scss +2 -2
  34. package/scss/_patterns_tabs.scss +23 -74
  35. package/scss/_settings_colors.scss +164 -2
  36. package/scss/_settings_placeholders.scss +4 -1
  37. package/scss/_settings_themes.scss +6 -6
@@ -4,39 +4,11 @@
4
4
  .p-form-help-text {
5
5
  @extend %small-text;
6
6
 
7
- color: $color-mid-dark;
7
+ color: $colors--theme--text-muted;
8
8
  margin-top: -$sp-unit;
9
9
 
10
10
  &.is-tick-element {
11
11
  margin-left: $sph--large + $form-tick-box-size;
12
12
  }
13
13
  }
14
-
15
- @if ($theme-default-forms == 'dark') {
16
- .p-form-help-text {
17
- @include vf-form-help-text-dark-theme;
18
- }
19
- } @else {
20
- .p-form-help-text {
21
- @include vf-form-help-text-light-theme;
22
- }
23
- }
24
-
25
- .is-dark .p-form-help-text,
26
- .p-form-help-text.is-dark {
27
- @include vf-form-help-text-dark-theme;
28
- }
29
-
30
- .is-light .p-form-help-text,
31
- .p-form-help-text.is-light {
32
- @include vf-form-help-text-light-theme;
33
- }
34
- }
35
-
36
- @mixin vf-form-help-text-dark-theme {
37
- color: $colors--dark-theme--text-muted;
38
- }
39
-
40
- @mixin vf-form-help-text-light-theme {
41
- color: $colors--light-theme--text-muted;
42
14
  }
@@ -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,12 +11,15 @@
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
 
17
18
  &::before,
18
19
  &::after {
19
- $properties: #{background-color, border-color};
20
+ $properties:
21
+ #{background-color,
22
+ border-color};
20
23
  @include vf-transition($properties);
21
24
 
22
25
  position: absolute;
@@ -24,6 +27,8 @@
24
27
 
25
28
  // container
26
29
  &::before {
30
+ background: $colors--theme--background-default;
31
+ border: $input-border-thickness solid $colors--theme--border-high-contrast;
27
32
  content: '';
28
33
  height: $form-tick-box-size;
29
34
  left: 0;
@@ -39,18 +44,18 @@
39
44
  }
40
45
 
41
46
  .p-muted-heading & {
42
- color: $colors--light-theme--text-muted;
47
+ color: $colors--theme--text-muted;
43
48
  }
44
49
 
45
50
  &:hover::before {
46
- background-color: $colors--light-theme--background-hover;
51
+ background-color: $colors--theme--background-hover;
47
52
  }
48
53
  }
49
54
 
50
55
  %vf-pseudo-tick-box-checked {
51
56
  &::before {
52
- background-color: $color-link;
53
- border-color: $color-link;
57
+ background-color: $colors--theme--link-default;
58
+ border-color: $colors--theme--link-default;
54
59
  }
55
60
 
56
61
  &::after {
@@ -74,6 +79,7 @@
74
79
  &::after {
75
80
  border-bottom: 2px solid;
76
81
  border-left: 2px solid;
82
+ color: $colors--theme--background-default;
77
83
  height: $form-tick-height;
78
84
  left: $form-tick-height * 0.5;
79
85
  top: calc($baseline-position - $form-tick-box-size + $form-tick-offset-top + $form-tick-box-nudge);
@@ -98,6 +104,7 @@
98
104
  }
99
105
 
100
106
  &::after {
107
+ background-color: $colors--theme--background-default;
101
108
  border-radius: 50%;
102
109
  height: $form-radio-inner-circle-diameter;
103
110
  left: #{($form-tick-box-size - $form-radio-inner-circle-diameter) * 0.5};
@@ -206,128 +213,4 @@
206
213
  .p-radio + .p-checkbox {
207
214
  margin-top: -$sp-unit;
208
215
  }
209
-
210
- // Theming
211
- @if ($theme-default-forms == 'dark') {
212
- .p-checkbox__label {
213
- @include vf-checkbox-dark-theme;
214
- }
215
-
216
- .p-radio__label {
217
- @include vf-radio-dark-theme;
218
- }
219
-
220
- .p-checkbox.is-light .p-checkbox__label {
221
- @include vf-checkbox-light-theme;
222
- }
223
-
224
- .p-radio.is-light .p-radio__label {
225
- @include vf-radio-light-theme;
226
- }
227
- } @else {
228
- .p-checkbox__label {
229
- @include vf-checkbox-light-theme;
230
- }
231
-
232
- .p-radio__label {
233
- @include vf-radio-light-theme;
234
- }
235
-
236
- .p-checkbox.is-dark .p-checkbox__label {
237
- @include vf-checkbox-dark-theme;
238
- }
239
-
240
- .p-radio.is-dark .p-radio__label {
241
- @include vf-radio-dark-theme;
242
- }
243
- }
244
- }
245
-
246
- // theme for common properties on radios and checkboxes
247
- @mixin vf-tick-elements-theme(
248
- // color of the tick element label text
249
- $color-tick-text,
250
- // color of the tick element background
251
- $color-tick-background,
252
- // color of the tick element border
253
- $color-tick-border: $colors--light-theme--border-high-contrast
254
- ) {
255
- color: $color-tick-text;
256
-
257
- &::before {
258
- background: $color-tick-background;
259
- border: $input-border-thickness solid $color-tick-border;
260
- }
261
- }
262
-
263
- // theme for checkbox (including common properties)
264
- @mixin vf-checkbox-theme(
265
- // color of the tick element label text
266
- $color-tick-text,
267
- // color of the tick element background
268
- $color-tick-background,
269
- // color of the tick element border
270
- $color-tick-border,
271
- // color of the checkbox tick
272
- $color-checkbox-tick
273
- ) {
274
- @include vf-tick-elements-theme($color-tick-text, $color-tick-background, $color-tick-border);
275
-
276
- &::after {
277
- color: $color-checkbox-tick;
278
- }
279
- }
280
-
281
- @mixin vf-checkbox-light-theme {
282
- @include vf-checkbox-theme(
283
- $color-tick-text: $colors--light-theme--text-default,
284
- $color-tick-background: $colors--light-theme--background-default,
285
- $color-tick-border: $colors--light-theme--border-high-contrast,
286
- $color-checkbox-tick: $colors--light-theme--background-default
287
- );
288
- }
289
-
290
- @mixin vf-checkbox-dark-theme {
291
- @include vf-checkbox-theme(
292
- $color-tick-text: $colors--dark-theme--text-default,
293
- $color-tick-background: $colors--dark-theme--background-default,
294
- $color-tick-border: $colors--dark-theme--border-high-contrast,
295
- $color-checkbox-tick: $colors--dark-theme--text-default
296
- );
297
- }
298
-
299
- // theme for radio (including common properties)
300
- @mixin vf-radio-theme(
301
- // color of the tick element label text
302
- $color-tick-text,
303
- // color of the tick element background
304
- $color-tick-background,
305
- // color of the tick element border
306
- $color-tick-border,
307
- // color of the radio dot
308
- $color-radio-dot
309
- ) {
310
- @include vf-tick-elements-theme($color-tick-text, $color-tick-background, $color-tick-border);
311
-
312
- &::after {
313
- background-color: $color-radio-dot;
314
- }
315
- }
316
-
317
- @mixin vf-radio-light-theme {
318
- @include vf-radio-theme(
319
- $color-tick-text: $colors--light-theme--text-default,
320
- $color-tick-background: $colors--light-theme--background-default,
321
- $color-tick-border: $colors--light-theme--border-high-contrast,
322
- $color-radio-dot: $colors--light-theme--background-default
323
- );
324
- }
325
-
326
- @mixin vf-radio-dark-theme {
327
- @include vf-radio-theme(
328
- $color-tick-text: $colors--dark-theme--text-default,
329
- $color-tick-background: $colors--dark-theme--background-default,
330
- $color-tick-border: $colors--dark-theme--border-high-contrast,
331
- $color-radio-dot: $colors--dark-theme--text-default
332
- );
333
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
  }