bootstrap-italia 2.11.1 → 2.12.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 (69) hide show
  1. package/dist/css/bootstrap-italia.min.css +1 -1
  2. package/dist/css/bootstrap-italia.min.css.map +1 -1
  3. package/dist/js/bootstrap-italia.bundle.min.js +17 -510
  4. package/dist/js/bootstrap-italia.min.js +3 -234
  5. package/dist/plugins/accept-overlay.js.map +1 -1
  6. package/dist/plugins/accordion.js.map +1 -1
  7. package/dist/plugins/backToTop.js.map +1 -1
  8. package/dist/plugins/carousel-bi.js.map +1 -1
  9. package/dist/plugins/cookiebar.js.map +1 -1
  10. package/dist/plugins/dimmer.js.map +1 -1
  11. package/dist/plugins/fonts-loader.js.map +1 -1
  12. package/dist/plugins/form-validate.js.map +1 -1
  13. package/dist/plugins/forward.js.map +1 -1
  14. package/dist/plugins/header-sticky.js +0 -1
  15. package/dist/plugins/header-sticky.js.map +1 -1
  16. package/dist/plugins/history-back.js.map +1 -1
  17. package/dist/plugins/init.js.map +1 -1
  18. package/dist/plugins/input-label.js.map +1 -1
  19. package/dist/plugins/input-number.js.map +1 -1
  20. package/dist/plugins/input-password.js.map +1 -1
  21. package/dist/plugins/input-search-autocomplete.js +1 -0
  22. package/dist/plugins/input-search-autocomplete.js.map +1 -1
  23. package/dist/plugins/input.js.map +1 -1
  24. package/dist/plugins/list.js.map +1 -1
  25. package/dist/plugins/masonry.js.map +1 -1
  26. package/dist/plugins/navbar-collapsible.js.map +1 -1
  27. package/dist/plugins/navscroll.js.map +1 -1
  28. package/dist/plugins/notification.js.map +1 -1
  29. package/dist/plugins/progress-donut.js.map +1 -1
  30. package/dist/plugins/select-autocomplete.js.map +1 -1
  31. package/dist/plugins/sticky.js.map +1 -1
  32. package/dist/plugins/tab.js.map +1 -1
  33. package/dist/plugins/track-focus.js.map +1 -1
  34. package/dist/plugins/transfer.js.map +1 -1
  35. package/dist/plugins/upload-dragdrop.js.map +1 -1
  36. package/dist/plugins/util/cookies.js.map +1 -1
  37. package/dist/plugins/util/device.js.map +1 -1
  38. package/dist/plugins/util/dom.js.map +1 -1
  39. package/dist/plugins/util/observer.js +2 -2
  40. package/dist/plugins/util/observer.js.map +1 -1
  41. package/dist/plugins/util/on-document-scroll.js.map +1 -1
  42. package/dist/plugins/util/pageScroll.js.map +1 -1
  43. package/dist/plugins/util/tween.js.map +1 -1
  44. package/dist/plugins/util/youtube-video.js.map +1 -1
  45. package/dist/plugins/videoplayer.js.map +1 -1
  46. package/dist/version.js +2 -2
  47. package/dist/version.js.map +1 -1
  48. package/package.json +24 -22
  49. package/src/js/plugins/header-sticky.js +0 -1
  50. package/src/js/plugins/util/observer.js +2 -2
  51. package/src/js/version.js +2 -2
  52. package/src/scss/_variables.scss +3 -4
  53. package/src/scss/custom/_back-to-top.scss +10 -2
  54. package/src/scss/custom/_badge.scss +5 -1
  55. package/src/scss/custom/_buttons.scss +2 -20
  56. package/src/scss/custom/_card.scss +15 -5
  57. package/src/scss/custom/_carousel.scss +6 -0
  58. package/src/scss/custom/_chips.scss +6 -9
  59. package/src/scss/custom/_footer.scss +7 -1
  60. package/src/scss/custom/_form-datepicker.scss +0 -1
  61. package/src/scss/custom/_form-input-file.scss +0 -1
  62. package/src/scss/custom/_form-input-upload.scss +4 -10
  63. package/src/scss/custom/_form-toggles.scss +4 -1
  64. package/src/scss/custom/_forms.scss +24 -14
  65. package/src/scss/custom/_navscroll.scss +6 -2
  66. package/src/scss/custom/_version.scss +1 -1
  67. package/src/scss/custom/mixins/_buttons.scss +11 -42
  68. package/src/scss/utilities/colors_vars.scss +1 -0
  69. package/src/scss/utilities/focus.scss +76 -4
@@ -27,7 +27,6 @@ input[type='file'] + label {
27
27
  z-index: 5;
28
28
  &::before {
29
29
  background-color: $white;
30
- border-color: $primary;
31
30
  bottom: -1px;
32
31
  color: $primary;
33
32
  content: 'Sfoglia';
@@ -37,14 +37,6 @@
37
37
  margin-right: 10px;
38
38
  }
39
39
  }
40
-
41
- //focus state
42
- &:focus {
43
- & + label {
44
- background-color: shade-color($primary, 10%);
45
- outline: auto 5px -webkit-focus-ring-color;
46
- }
47
- }
48
40
  }
49
41
 
50
42
  //pictures wall version
@@ -198,7 +190,7 @@
198
190
  overflow: hidden;
199
191
  .upload-file-weight {
200
192
  color: $neutral-1-a7;
201
- font-size: 0.75em;
193
+ // font-size: 0.75em;
202
194
  margin-left: 10px;
203
195
  display: none;
204
196
  }
@@ -478,7 +470,9 @@
478
470
  align-items: center;
479
471
  opacity: 0;
480
472
  transform: scale(0.6);
481
- transition: opacity 0.2s, transform 0.5s cubic-bezier(0.75, -0.5, 0, 1.75);
473
+ transition:
474
+ opacity 0.2s,
475
+ transform 0.5s cubic-bezier(0.75, -0.5, 0, 1.75);
482
476
 
483
477
  svg {
484
478
  fill: $white;
@@ -48,7 +48,10 @@
48
48
  border-radius: 50%;
49
49
  top: -5px;
50
50
  left: -3px;
51
- transition: left 0.3s ease, background 0.1s ease, transform 0.1s ease;
51
+ transition:
52
+ left 0.3s ease,
53
+ background 0.1s ease,
54
+ transform 0.1s ease;
52
55
  }
53
56
 
54
57
  &:before {
@@ -48,7 +48,7 @@ fieldset {
48
48
  padding: 0 $input-spacing-x;
49
49
  z-index: 1;
50
50
  &.active {
51
- transform: translateY(-75%);
51
+ transform: translateY(-85%);
52
52
  font-weight: 600;
53
53
  font-size: $small-font-size;
54
54
  color: $input-label-color;
@@ -131,6 +131,9 @@ textarea {
131
131
  background-size: 45px 45% !important;
132
132
  border-radius: 0 !important;
133
133
  min-height: 2.5rem;
134
+ &.form-control-lg {
135
+ border-radius: 0;
136
+ }
134
137
  &:disabled,
135
138
  &[readonly] {
136
139
  cursor: not-allowed;
@@ -140,7 +143,6 @@ textarea {
140
143
  cursor: not-allowed;
141
144
  }
142
145
  }
143
- &:focus,
144
146
  &:active {
145
147
  box-shadow: none !important;
146
148
  }
@@ -223,11 +225,7 @@ textarea {
223
225
  padding-bottom: 0;
224
226
  border-bottom: 1px solid $input-border;
225
227
  border-radius: 0 4px 4px 0;
226
- box-shadow: none;
227
228
  height: 100%;
228
- &:focus:not(.focus--mouse) {
229
- box-shadow: inset 0 0 0 2px $focus-outline-color;
230
- }
231
229
  }
232
230
  }
233
231
  }
@@ -449,17 +447,17 @@ textarea {
449
447
 
450
448
  &::after,
451
449
  &::before {
452
- right: 15px;
450
+ right: 0px;
453
451
  left: auto;
454
452
  }
455
453
  }
456
454
 
457
455
  [type='checkbox']:checked + label::before {
458
- right: 26px;
456
+ right: 11px;
459
457
  }
460
458
 
461
459
  [type='radio']:checked + label::before {
462
- right: 15px;
460
+ right: 0px;
463
461
  }
464
462
 
465
463
  .form-text {
@@ -468,12 +466,8 @@ textarea {
468
466
  margin-bottom: 0.5rem;
469
467
  }
470
468
 
471
- // label {
472
- // font-weight: 600;
473
- // }
474
-
475
469
  input.semi-checked:not(:checked) + label::before {
476
- right: 19px;
470
+ right: 4px;
477
471
  left: auto;
478
472
  }
479
473
  }
@@ -497,3 +491,19 @@ textarea {
497
491
  z-index: 0;
498
492
  }
499
493
  }
494
+
495
+ @media (prefers-reduced-motion: reduce) {
496
+ fieldset legend,
497
+ .form-group label,
498
+ textarea,
499
+ .form-check [type='checkbox'],
500
+ .form-check [type='radio'],
501
+ .form-check [type='checkbox'] + label::after,
502
+ .form-check [type='checkbox'] + label::before,
503
+ .form-check [type='radio'] + label::after,
504
+ .form-check [type='radio'] + label::before,
505
+ .toggles label input[type='checkbox'] + .lever::before,
506
+ .toggles label input[type='checkbox'] + .lever::after {
507
+ transition: none !important;
508
+ }
509
+ }
@@ -16,7 +16,9 @@
16
16
  z-index: 10;
17
17
  visibility: hidden;
18
18
  opacity: 0;
19
- transition: opacity 0.3s 0s, visibility 0s 0.3s;
19
+ transition:
20
+ opacity 0.3s 0s,
21
+ visibility 0s 0.3s;
20
22
  i {
21
23
  transform: scale(0.8);
22
24
  transform-origin: center;
@@ -24,7 +26,9 @@
24
26
  margin-right: $v-gap;
25
27
  }
26
28
  &.show {
27
- transition: opacity 0.3s 0s, visibility 0s 0s;
29
+ transition:
30
+ opacity 0.3s 0s,
31
+ visibility 0s 0s;
28
32
  visibility: visible;
29
33
  opacity: 1;
30
34
  }
@@ -1,3 +1,3 @@
1
1
  :root {
2
- --bootstrap-italia-version: '2.11.1';
2
+ --bootstrap-italia-version: '2.12.0';
3
3
  }
@@ -11,16 +11,8 @@
11
11
  border-color: $border;
12
12
  @include box-shadow($btn-box-shadow);
13
13
 
14
- &:focus,
15
- &.focus {
16
- // Avoid using mixin so we can pass custom focus shadow properly
17
- @if $enable-shadows {
18
- box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba($border, 0.5);
19
- } @else {
20
- box-shadow: 0 0 0 $btn-focus-width rgba($border, 0.5);
21
- }
22
- }
23
- &:hover {
14
+ &:hover,
15
+ &:focus-visible {
24
16
  background-color: $hover-background;
25
17
  color: color-contrast($background);
26
18
  border-color: $hover-border;
@@ -37,22 +29,11 @@
37
29
 
38
30
  &:not(:disabled):not(.disabled):active,
39
31
  &:not(:disabled):not(.disabled).active,
32
+ &.dropdown-toggle.show,
40
33
  .show > &.dropdown-toggle {
41
- color: color-contrast($active-background);
42
- background-color: $active-background;
43
- @if $enable-gradients {
44
- background-image: none; // Remove the gradient for the pressed/active state
45
- }
46
- border-color: $active-border;
47
-
48
- &:focus {
49
- // Avoid using mixin so we can pass custom focus shadow properly
50
- @if $enable-shadows {
51
- box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($border, 0.5);
52
- } @else {
53
- box-shadow: 0 0 0 $btn-focus-width rgba($border, 0.5);
54
- }
55
- }
34
+ background-color: $hover-background;
35
+ color: color-contrast($background);
36
+ border-color: $hover-border;
56
37
  }
57
38
  }
58
39
 
@@ -62,16 +43,12 @@
62
43
  background-image: none;
63
44
  box-shadow: inset 0 0 0 2px $color;
64
45
 
65
- &:hover {
46
+ &:hover,
47
+ &:focus-visible {
66
48
  color: $color-hover;
67
49
  box-shadow: inset 0 0 0 2px color-hover($color);
68
50
  }
69
51
 
70
- &:focus,
71
- &.focus {
72
- box-shadow: inset 0 0 0 1px $active-border, 0 0 0 $btn-focus-width rgba($color, 0.5);
73
- }
74
-
75
52
  &.disabled,
76
53
  &:disabled {
77
54
  color: $color;
@@ -80,19 +57,11 @@
80
57
 
81
58
  &:not(:disabled):not(.disabled):active,
82
59
  &:not(:disabled):not(.disabled).active,
60
+ &.dropdown-toggle.show,
83
61
  .show > &.dropdown-toggle {
84
- color: $active-border;
62
+ color: $color-hover;
85
63
  background-color: transparent;
86
64
  background-image: none;
87
- box-shadow: inset 0 0 0 2px $active-border;
88
-
89
- &:focus {
90
- // Avoid using mixin so we can pass custom focus shadow properly
91
- @if $enable-shadows and $btn-active-box-shadow != none {
92
- box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, 0.5);
93
- } @else {
94
- box-shadow: 0 0 0 $btn-focus-width rgba($color, 0.5);
95
- }
96
- }
65
+ box-shadow: inset 0 0 0 2px $color-hover;
97
66
  }
98
67
  }
@@ -396,6 +396,7 @@ $neutral-2-a7: hsb($neutral-2-h, $neutral-2-s + 4, $neutral-2-b - 85) !default;
396
396
  // Backgrounds
397
397
  $color-background-emphasis: hsl(210, 54%, 20%); // color-slate-20
398
398
  $color-background-primary-lighter: hsl(210, 62%, 97%); // color-blue-97
399
+ $color-background-primary-hover: hsl(210, 100, 30); // color-blue-30
399
400
  $color-background-secondary-hover: hsl(210, 33%, 28%); // color-slate-28
400
401
  $color-background-secondary-lighter: hsl(210, 3%, 85%); // color-slate-85
401
402
  $color-background-muted: $gray-100; // color-gray-96
@@ -1,8 +1,16 @@
1
1
  :focus:not(.focus--mouse),
2
- %focus {
3
- border-color: $focus-outline-color !important;
4
- box-shadow: 0 0 0 2px $focus-outline-color !important;
5
- outline: none !important;
2
+ %focus,
3
+ .it-carousel-wrapper .splide__pagination button:focus:not(.focus--mouse),
4
+ .upload:focus:not(.focus--mouse) + label,
5
+ .upload-dragdrop-input:focus[type='file']:not(.focus--mouse) + label,
6
+ .avatar-upload:focus-within:not(.focus--mouse),
7
+ .rating input:focus:not(.focus--mouse) + label svg {
8
+ border-color: $focus-outline-color-out !important;
9
+ box-shadow:
10
+ 0 0 0 2px $focus-outline-color-in,
11
+ 0 0 0 5px $focus-outline-color-out;
12
+ outline: 3px solid transparent;
13
+ outline-offset: 3px;
6
14
  }
7
15
 
8
16
  [tabindex='-1']:focus:not(:focus-visible) {
@@ -15,3 +23,67 @@
15
23
  box-shadow: none !important;
16
24
  outline: none !important;
17
25
  }
26
+
27
+ p a {
28
+ &:focus:not(.focus--mouse, .btn) {
29
+ outline-offset: 0px;
30
+ outline: 3px $focus-outline-color-out solid;
31
+ background: $focus-outline-color-in;
32
+ box-shadow: none;
33
+ color: $link-color !important;
34
+ }
35
+ }
36
+
37
+ .shadow,
38
+ .shadow-none,
39
+ .shadow-sm,
40
+ .shadow-lg {
41
+ &:focus:not(.focus--mouse) {
42
+ box-shadow:
43
+ 0 0 0 2px $focus-outline-color-in,
44
+ 0 0 0 5px $focus-outline-color-out !important;
45
+ }
46
+ }
47
+
48
+ .chip {
49
+ button {
50
+ &:focus:not(.focus--mouse) {
51
+ border-radius: 50%;
52
+ }
53
+ }
54
+ }
55
+
56
+ .form-check {
57
+ .toggles label:has(input[type='checkbox']:focus:not(.focus--mouse)) {
58
+ @extend %focus;
59
+
60
+ input,
61
+ .lever {
62
+ border-color: inherit !important;
63
+ box-shadow: none !important;
64
+ outline: none !important;
65
+ }
66
+ }
67
+
68
+ .toggles label:has(input[type='checkbox']:focus.focus--mouse) {
69
+ @extend %focusmouse;
70
+ }
71
+
72
+ &.form-check-group {
73
+ :focus:not(.focus--mouse),
74
+ [type='checkbox']:focus + label,
75
+ [type='radio']:focus + label {
76
+ width: 100%;
77
+ }
78
+ }
79
+ }
80
+
81
+ .bg-dark .btn,
82
+ .back-to-top.dark {
83
+ &:focus:not(.focus--mouse),
84
+ &%focus {
85
+ box-shadow:
86
+ 0 0 0 2px $focus-outline-color-out,
87
+ 0 0 0 5px $focus-outline-color-in;
88
+ }
89
+ }