@coreui/coreui 4.0.2

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 (203) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +183 -0
  3. package/dist/css/coreui-grid.css +5004 -0
  4. package/dist/css/coreui-grid.css.map +1 -0
  5. package/dist/css/coreui-grid.min.css +8 -0
  6. package/dist/css/coreui-grid.min.css.map +1 -0
  7. package/dist/css/coreui-grid.rtl.css +5011 -0
  8. package/dist/css/coreui-grid.rtl.css.map +1 -0
  9. package/dist/css/coreui-grid.rtl.min.css +14 -0
  10. package/dist/css/coreui-grid.rtl.min.css.map +1 -0
  11. package/dist/css/coreui-reboot.css +440 -0
  12. package/dist/css/coreui-reboot.css.map +1 -0
  13. package/dist/css/coreui-reboot.min.css +8 -0
  14. package/dist/css/coreui-reboot.min.css.map +1 -0
  15. package/dist/css/coreui-reboot.rtl.css +441 -0
  16. package/dist/css/coreui-reboot.rtl.css.map +1 -0
  17. package/dist/css/coreui-reboot.rtl.min.css +14 -0
  18. package/dist/css/coreui-reboot.rtl.min.css.map +1 -0
  19. package/dist/css/coreui-utilities.css +5030 -0
  20. package/dist/css/coreui-utilities.css.map +1 -0
  21. package/dist/css/coreui-utilities.min.css +8 -0
  22. package/dist/css/coreui-utilities.min.css.map +1 -0
  23. package/dist/css/coreui-utilities.rtl.css +5024 -0
  24. package/dist/css/coreui-utilities.rtl.css.map +1 -0
  25. package/dist/css/coreui-utilities.rtl.min.css +14 -0
  26. package/dist/css/coreui-utilities.rtl.min.css.map +1 -0
  27. package/dist/css/coreui.css +12152 -0
  28. package/dist/css/coreui.css.map +1 -0
  29. package/dist/css/coreui.min.css +8 -0
  30. package/dist/css/coreui.min.css.map +1 -0
  31. package/dist/css/coreui.rtl.css +12041 -0
  32. package/dist/css/coreui.rtl.css.map +1 -0
  33. package/dist/css/coreui.rtl.min.css +14 -0
  34. package/dist/css/coreui.rtl.min.css.map +1 -0
  35. package/dist/js/coreui.bundle.js +7437 -0
  36. package/dist/js/coreui.bundle.js.map +1 -0
  37. package/dist/js/coreui.bundle.min.js +7 -0
  38. package/dist/js/coreui.bundle.min.js.map +1 -0
  39. package/dist/js/coreui.esm.js +5622 -0
  40. package/dist/js/coreui.esm.js.map +1 -0
  41. package/dist/js/coreui.esm.min.js +7 -0
  42. package/dist/js/coreui.esm.min.js.map +1 -0
  43. package/dist/js/coreui.js +5673 -0
  44. package/dist/js/coreui.js.map +1 -0
  45. package/dist/js/coreui.min.js +7 -0
  46. package/dist/js/coreui.min.js.map +1 -0
  47. package/js/dist/alert.js +208 -0
  48. package/js/dist/alert.js.map +1 -0
  49. package/js/dist/base-component.js +181 -0
  50. package/js/dist/base-component.js.map +1 -0
  51. package/js/dist/button.js +142 -0
  52. package/js/dist/button.js.map +1 -0
  53. package/js/dist/carousel.js +724 -0
  54. package/js/dist/carousel.js.map +1 -0
  55. package/js/dist/collapse.js +515 -0
  56. package/js/dist/collapse.js.map +1 -0
  57. package/js/dist/dom/data.js +72 -0
  58. package/js/dist/dom/data.js.map +1 -0
  59. package/js/dist/dom/event-handler.js +319 -0
  60. package/js/dist/dom/event-handler.js.map +1 -0
  61. package/js/dist/dom/manipulator.js +92 -0
  62. package/js/dist/dom/manipulator.js.map +1 -0
  63. package/js/dist/dom/selector-engine.js +89 -0
  64. package/js/dist/dom/selector-engine.js.map +1 -0
  65. package/js/dist/dropdown.js +700 -0
  66. package/js/dist/dropdown.js.map +1 -0
  67. package/js/dist/modal.js +891 -0
  68. package/js/dist/modal.js.map +1 -0
  69. package/js/dist/offcanvas.js +724 -0
  70. package/js/dist/offcanvas.js.map +1 -0
  71. package/js/dist/popover.js +220 -0
  72. package/js/dist/popover.js.map +1 -0
  73. package/js/dist/scrollspy.js +387 -0
  74. package/js/dist/scrollspy.js.map +1 -0
  75. package/js/dist/tab.js +317 -0
  76. package/js/dist/tab.js.map +1 -0
  77. package/js/dist/toast.js +331 -0
  78. package/js/dist/toast.js.map +1 -0
  79. package/js/dist/tooltip.js +997 -0
  80. package/js/dist/tooltip.js.map +1 -0
  81. package/js/src/alert.js +128 -0
  82. package/js/src/base-component.js +78 -0
  83. package/js/src/button.js +89 -0
  84. package/js/src/carousel.js +589 -0
  85. package/js/src/collapse.js +391 -0
  86. package/js/src/dom/data.js +60 -0
  87. package/js/src/dom/event-handler.js +352 -0
  88. package/js/src/dom/manipulator.js +83 -0
  89. package/js/src/dom/selector-engine.js +78 -0
  90. package/js/src/dropdown.js +517 -0
  91. package/js/src/modal.js +451 -0
  92. package/js/src/navigation.js +298 -0
  93. package/js/src/offcanvas.js +277 -0
  94. package/js/src/popover.js +173 -0
  95. package/js/src/scrollspy.js +298 -0
  96. package/js/src/sidebar.js +347 -0
  97. package/js/src/tab.js +227 -0
  98. package/js/src/toast.js +245 -0
  99. package/js/src/tooltip.js +750 -0
  100. package/js/src/util/backdrop.js +129 -0
  101. package/js/src/util/index.js +327 -0
  102. package/js/src/util/sanitizer.js +130 -0
  103. package/js/src/util/scrollbar.js +97 -0
  104. package/package.json +166 -0
  105. package/scss/_accordion.scss +118 -0
  106. package/scss/_alert.scss +52 -0
  107. package/scss/_avatar.scss +49 -0
  108. package/scss/_badge.scss +38 -0
  109. package/scss/_breadcrumb.scss +33 -0
  110. package/scss/_button-group.scss +139 -0
  111. package/scss/_buttons.scss +143 -0
  112. package/scss/_callout.scss +16 -0
  113. package/scss/_card.scss +215 -0
  114. package/scss/_carousel.scss +231 -0
  115. package/scss/_close.scss +40 -0
  116. package/scss/_containers.scss +41 -0
  117. package/scss/_dropdown.scss +227 -0
  118. package/scss/_footer.scss +25 -0
  119. package/scss/_forms.scss +9 -0
  120. package/scss/_functions.scss +356 -0
  121. package/scss/_grid.scss +56 -0
  122. package/scss/_header.scss +170 -0
  123. package/scss/_helpers.scss +7 -0
  124. package/scss/_icon.scss +32 -0
  125. package/scss/_images.scss +42 -0
  126. package/scss/_list-group.scss +169 -0
  127. package/scss/_mixins.scss +50 -0
  128. package/scss/_modal.scss +219 -0
  129. package/scss/_nav.scss +140 -0
  130. package/scss/_navbar.scss +254 -0
  131. package/scss/_offcanvas.scss +79 -0
  132. package/scss/_pagination.scss +64 -0
  133. package/scss/_popover.scss +158 -0
  134. package/scss/_progress.scss +91 -0
  135. package/scss/_reboot.scss +632 -0
  136. package/scss/_root.scss +25 -0
  137. package/scss/_sidebar.scss +3 -0
  138. package/scss/_spinners.scss +69 -0
  139. package/scss/_subheader.scss +72 -0
  140. package/scss/_tables.scss +166 -0
  141. package/scss/_toasts.scss +52 -0
  142. package/scss/_tooltip.scss +115 -0
  143. package/scss/_transitions.scss +21 -0
  144. package/scss/_type.scss +104 -0
  145. package/scss/_utilities.scss +678 -0
  146. package/scss/_variables.scss +1801 -0
  147. package/scss/coreui-grid.rtl.scss +12 -0
  148. package/scss/coreui-grid.scss +67 -0
  149. package/scss/coreui-reboot.rtl.scss +12 -0
  150. package/scss/coreui-reboot.scss +15 -0
  151. package/scss/coreui-utilities.rtl.scss +12 -0
  152. package/scss/coreui-utilities.scss +19 -0
  153. package/scss/coreui.rtl.scss +12 -0
  154. package/scss/coreui.scss +61 -0
  155. package/scss/forms/_floating-labels.scss +63 -0
  156. package/scss/forms/_form-check.scss +188 -0
  157. package/scss/forms/_form-control.scss +219 -0
  158. package/scss/forms/_form-range.scss +91 -0
  159. package/scss/forms/_form-select.scss +70 -0
  160. package/scss/forms/_form-text.scss +11 -0
  161. package/scss/forms/_input-group.scss +121 -0
  162. package/scss/forms/_labels.scss +36 -0
  163. package/scss/forms/_validation.scss +12 -0
  164. package/scss/helpers/_clearfix.scss +3 -0
  165. package/scss/helpers/_colored-links.scss +12 -0
  166. package/scss/helpers/_position.scss +30 -0
  167. package/scss/helpers/_ratio.scss +26 -0
  168. package/scss/helpers/_stretched-link.scss +15 -0
  169. package/scss/helpers/_text-truncation.scss +7 -0
  170. package/scss/helpers/_visually-hidden.scss +8 -0
  171. package/scss/mixins/_alert.scss +15 -0
  172. package/scss/mixins/_avatar.scss +10 -0
  173. package/scss/mixins/_border-radius.scss +78 -0
  174. package/scss/mixins/_box-shadow.scss +18 -0
  175. package/scss/mixins/_breakpoints.scss +140 -0
  176. package/scss/mixins/_buttons.scss +101 -0
  177. package/scss/mixins/_caret.scss +64 -0
  178. package/scss/mixins/_clearfix.scss +9 -0
  179. package/scss/mixins/_color-scheme.scss +7 -0
  180. package/scss/mixins/_container.scss +9 -0
  181. package/scss/mixins/_css-vars.scss +87 -0
  182. package/scss/mixins/_deprecate.scss +10 -0
  183. package/scss/mixins/_forms.scss +144 -0
  184. package/scss/mixins/_gradients.scss +47 -0
  185. package/scss/mixins/_grid.scss +132 -0
  186. package/scss/mixins/_icon.scss +6 -0
  187. package/scss/mixins/_image.scss +16 -0
  188. package/scss/mixins/_list-group.scss +18 -0
  189. package/scss/mixins/_lists.scss +7 -0
  190. package/scss/mixins/_ltr-rtl.scss +60 -0
  191. package/scss/mixins/_pagination.scss +31 -0
  192. package/scss/mixins/_reset-text.scss +17 -0
  193. package/scss/mixins/_resize.scss +6 -0
  194. package/scss/mixins/_table-variants.scss +16 -0
  195. package/scss/mixins/_text-truncate.scss +8 -0
  196. package/scss/mixins/_transition.scss +26 -0
  197. package/scss/mixins/_utilities.scss +104 -0
  198. package/scss/mixins/_visually-hidden.scss +29 -0
  199. package/scss/sidebar/_sidebar-narrow.scss +106 -0
  200. package/scss/sidebar/_sidebar-nav.scss +165 -0
  201. package/scss/sidebar/_sidebar.scss +261 -0
  202. package/scss/utilities/_api.scss +47 -0
  203. package/scss/vendor/_rfs.scss +354 -0
@@ -0,0 +1,6 @@
1
+ // Icon sizes
2
+ @mixin icon-size($icon-size) {
3
+ width: $icon-size;
4
+ height: $icon-size;
5
+ font-size: $icon-size;
6
+ }
@@ -0,0 +1,16 @@
1
+ // Image Mixins
2
+ // - Responsive image
3
+ // - Retina image
4
+
5
+
6
+ // Responsive image
7
+ //
8
+ // Keep images from scaling beyond the width of their parents.
9
+
10
+ @mixin img-fluid {
11
+ // Part 1: Set a maximum relative to the parent
12
+ max-width: 100%;
13
+ // Part 2: Override the height to auto, otherwise images will be stretched
14
+ // when setting a width and height attribute on the img element.
15
+ height: auto;
16
+ }
@@ -0,0 +1,18 @@
1
+ // List Groups
2
+ // scss-docs-start list-group-mixin
3
+ @mixin list-group-item-variant($state, $variant) {
4
+ $background: map-get($variant, "bg");
5
+ $background-hover: map-get($variant, "bg-hover");
6
+ $color: contrast-ratio-correction(map-get($variant, "color"), map-get($variant, "bg"), abs($alert-color-scale), $state);
7
+
8
+ .list-group-item-#{$state} {
9
+ --#{$variable-prefix}list-group-color: #{$color};
10
+ --#{$variable-prefix}list-group-bg: #{$background};
11
+ --#{$variable-prefix}list-group-hover-bg: #{$background-hover};
12
+ --#{$variable-prefix}list-group-action-hover-color: #{$color};
13
+ --#{$variable-prefix}list-group-action-active-color: #{$white};
14
+ --#{$variable-prefix}list-group-action-active-bg: #{$color};
15
+ --#{$variable-prefix}list-group-action-active-border-color: #{$color};
16
+ }
17
+ }
18
+ // scss-docs-end list-group-mixin
@@ -0,0 +1,7 @@
1
+ // Lists
2
+
3
+ // Unstyled keeps list items block level, just removes default browser padding and list-style
4
+ @mixin list-unstyled {
5
+ @include ltr-rtl("padding-left", 0);
6
+ list-style: none;
7
+ }
@@ -0,0 +1,60 @@
1
+ @mixin ltr {
2
+ @if $enable-ltr {
3
+ html:not([dir="rtl"]) & {
4
+ @content;
5
+ }
6
+ }
7
+ }
8
+
9
+ @mixin rtl {
10
+ @if $enable-rtl {
11
+ *[dir="rtl"] & {
12
+ @content;
13
+ }
14
+ }
15
+ }
16
+
17
+ @function reflect($element) {
18
+ @if type-of($element) == string {
19
+ @if str-index($element, "left") {
20
+ @return str-replace($element, "left", "right");
21
+ }
22
+ @if str-index($element, "right") {
23
+ @return str-replace($element, "right", "left");
24
+ }
25
+ }
26
+
27
+ @return $element;
28
+ }
29
+
30
+ @mixin ltr-rtl($property, $value, $property-rtl: null, $value-rtl: null, $important: null) {
31
+ $property-reflected: reflect($property);
32
+ $value-reflected: reflect($value);
33
+
34
+ @if $enable-ltr and $enable-rtl {
35
+ @include ltr() {
36
+ #{$property}: $value $important;
37
+ }
38
+ @include rtl() {
39
+ @if $value-rtl {
40
+ #{$property-reflected}: $value-rtl $important;
41
+ }
42
+ @else {
43
+ #{$property-reflected}: $value-reflected $important;
44
+ }
45
+ }
46
+ }
47
+ @else {
48
+ @if $enable-rtl {
49
+ @if $value-rtl {
50
+ #{$property-reflected}: $value-rtl $important;
51
+ }
52
+ @else {
53
+ #{$property-reflected}: $value-reflected $important;
54
+ }
55
+ }
56
+ @else {
57
+ #{$property}: $value $important;
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,31 @@
1
+ // Pagination
2
+
3
+ // scss-docs-start pagination-mixin
4
+ @mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
5
+ .page-link {
6
+ padding: $padding-y $padding-x;
7
+ @include font-size($font-size);
8
+ }
9
+
10
+ .page-item {
11
+ @if $pagination-margin-start == (-$pagination-border-width) {
12
+ &:first-child {
13
+ .page-link {
14
+ @include border-start-radius($border-radius);
15
+ }
16
+ }
17
+
18
+ &:last-child {
19
+ .page-link {
20
+ @include border-end-radius($border-radius);
21
+ }
22
+ }
23
+ } @else {
24
+ //Add border-radius to all pageLinks in case they have left margin
25
+ .page-link {
26
+ @include border-radius($border-radius);
27
+ }
28
+ }
29
+ }
30
+ }
31
+ // scss-docs-end pagination-mixin
@@ -0,0 +1,17 @@
1
+ @mixin reset-text {
2
+ font-family: $font-family-base;
3
+ // We deliberately do NOT reset font-size or overflow-wrap / word-wrap.
4
+ font-style: normal;
5
+ font-weight: $font-weight-normal;
6
+ line-height: $line-height-base;
7
+ text-align: left; // Fallback for where `start` is not supported
8
+ text-align: start;
9
+ text-decoration: none;
10
+ text-shadow: none;
11
+ text-transform: none;
12
+ letter-spacing: normal;
13
+ word-break: normal;
14
+ word-spacing: normal;
15
+ white-space: normal;
16
+ line-break: auto;
17
+ }
@@ -0,0 +1,6 @@
1
+ // Resize anything
2
+
3
+ @mixin resizable($direction) {
4
+ overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
5
+ resize: $direction; // Options: horizontal, vertical, both
6
+ }
@@ -0,0 +1,16 @@
1
+ // scss-docs-start table-variant
2
+ @mixin table-variant($map) {
3
+ --#{$variable-prefix}table-bg: #{map-get($map, "bg")};
4
+ --#{$variable-prefix}table-color: #{map-get($map, "color")};
5
+ --#{$variable-prefix}table-border-color: #{map-get($map, "border-color")};
6
+ --#{$variable-prefix}table-striped-bg: #{map-get($map, "striped-bg")};
7
+ --#{$variable-prefix}table-striped-color: #{map-get($map, "striped-color")};
8
+ --#{$variable-prefix}table-active-bg: #{map-get($map, "active-bg")};
9
+ --#{$variable-prefix}table-active-color: #{map-get($map, "active-color")};
10
+ --#{$variable-prefix}table-hover-bg: #{map-get($map, "hover-bg")};
11
+ --#{$variable-prefix}table-hover-color: #{map-get($map, "hover-color")};
12
+
13
+ color: var(--#{$variable-prefix}table-color);
14
+ border-color: var(--#{$variable-prefix}table-border-color);
15
+ }
16
+ // scss-docs-end table-variant
@@ -0,0 +1,8 @@
1
+ // Text truncate
2
+ // Requires inline-block or block for proper styling
3
+
4
+ @mixin text-truncate() {
5
+ overflow: hidden;
6
+ text-overflow: ellipsis;
7
+ white-space: nowrap;
8
+ }
@@ -0,0 +1,26 @@
1
+ // stylelint-disable property-disallowed-list
2
+ @mixin transition($transition...) {
3
+ @if length($transition) == 0 {
4
+ $transition: $transition-base;
5
+ }
6
+
7
+ @if length($transition) > 1 {
8
+ @each $value in $transition {
9
+ @if $value == null or $value == none {
10
+ @warn "The keyword 'none' or 'null' must be used as a single argument.";
11
+ }
12
+ }
13
+ }
14
+
15
+ @if $enable-transitions {
16
+ @if nth($transition, 1) != null {
17
+ transition: $transition;
18
+ }
19
+
20
+ @if $enable-reduced-motion and nth($transition, 1) != null and nth($transition, 1) != none {
21
+ @media (prefers-reduced-motion: reduce) {
22
+ transition: none;
23
+ }
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,104 @@
1
+ // Utility generator
2
+ // Used to generate utilities & print utilities
3
+ @mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {
4
+ $values: map-get($utility, values);
5
+
6
+ // If the values are a list or string, convert it into a map
7
+ @if type-of($values) == "string" or type-of(nth($values, 1)) != "list" {
8
+ $values: zip($values, $values);
9
+ }
10
+
11
+ @each $key, $value in $values {
12
+ $properties: map-get($utility, property);
13
+
14
+ // Multiple properties are possible, for example with vertical or horizontal margins or paddings
15
+ @if type-of($properties) == "string" {
16
+ $properties: append((), $properties);
17
+ }
18
+
19
+ // Use custom class if present
20
+ $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));
21
+ $property-class: if($property-class == null, "", $property-class);
22
+
23
+ // State params to generate pseudo-classes
24
+ $state: if(map-has-key($utility, state), map-get($utility, state), ());
25
+
26
+ $infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix);
27
+
28
+ // Don't prefix if value key is null (eg. with shadow class)
29
+ $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
30
+
31
+ // Generate CSS Variable
32
+ $generate-vars: if(map-has-key($utility, vars), map-get($utility, vars), false);
33
+ $generate-only-vars: if(map-has-key($utility, only-vars), map-get($utility, only-vars), false);
34
+
35
+ // Generate RTL version
36
+ $generate-rtl: if(map-has-key($utility, rtl), map-get($utility, rtl), false);
37
+
38
+ // // Add theme prefix
39
+ // $theme-prefix: if(map-has-key($utility, theme-prefix), map-get($utility, theme-prefix), false);
40
+
41
+ @if map-get($utility, rfs) {
42
+ // Inside the media query
43
+ @if $is-rfs-media-query {
44
+ $val: rfs-value($value);
45
+
46
+ // Do not render anything if fluid and non fluid values are the same
47
+ $value: if($val == rfs-fluid-value($value), null, $val);
48
+ }
49
+ @else {
50
+ $value: rfs-fluid-value($value);
51
+ }
52
+ }
53
+
54
+ $is-rtl: map-get($utility, rtl);
55
+
56
+ @if $value != null {
57
+ @if $is-rtl == false {
58
+ /* rtl:begin:remove */
59
+ }
60
+
61
+ .#{$property-class + $infix + $property-class-modifier} {
62
+ @each $property in $properties {
63
+ @if $generate-vars == true or $generate-only-vars == true {
64
+ @if $generate-only-vars {
65
+ @if $generate-rtl == true {
66
+ @include ltr-rtl($property, var(--#{$variable-prefix}#{$key}), null, null, if($enable-important-utilities, !important, null));
67
+ }
68
+ @else {
69
+ #{$property}: var(--#{$variable-prefix}#{$key}) if($enable-important-utilities, !important, null);
70
+ }
71
+ }
72
+ @else {
73
+ @if $generate-rtl == true {
74
+ @include ltr-rtl($property, var(--#{$variable-prefix}#{$key}, $value), null, null, if($enable-important-utilities, !important, null));
75
+ }
76
+ @else {
77
+ #{$property}: var(--#{$variable-prefix}#{$key}, $value) if($enable-important-utilities, !important, null);
78
+ }
79
+ }
80
+ }
81
+ @else {
82
+ @if $generate-rtl == true {
83
+ @include ltr-rtl($property, $value, null, null, if($enable-important-utilities, !important, null));
84
+ }
85
+ @else {
86
+ #{$property}: $value if($enable-important-utilities, !important, null);
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ @each $pseudo in $state {
93
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
94
+ @each $property in $properties {
95
+ #{$property}: $value if($enable-important-utilities, !important, null);
96
+ }
97
+ }
98
+ }
99
+ @if $is-rtl == false {
100
+ /* rtl:end:remove */
101
+ }
102
+ }
103
+ }
104
+ }
@@ -0,0 +1,29 @@
1
+ // stylelint-disable declaration-no-important
2
+
3
+ // Hide content visually while keeping it accessible to assistive technologies
4
+ //
5
+ // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
6
+ // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
7
+
8
+ @mixin visually-hidden() {
9
+ position: absolute !important;
10
+ width: 1px !important;
11
+ height: 1px !important;
12
+ padding: 0 !important;
13
+ margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
14
+ overflow: hidden !important;
15
+ clip: rect(0, 0, 0, 0) !important;
16
+ white-space: nowrap !important;
17
+ border: 0 !important;
18
+ }
19
+
20
+ // Use to only display content when it's focused, or one of its child elements is focused
21
+ // (i.e. when focus is within the element/container that the class was applied to)
22
+ //
23
+ // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
24
+
25
+ @mixin visually-hidden-focusable() {
26
+ &:not(:focus):not(:focus-within) {
27
+ @include visually-hidden();
28
+ }
29
+ }
@@ -0,0 +1,106 @@
1
+ %sidebar-narrow {
2
+ @include media-breakpoint-up($mobile-breakpoint) {
3
+ z-index: $zindex-fixed + 1;
4
+ flex: 0 0 $sidebar-narrow-width;
5
+ width: $sidebar-narrow-width;
6
+ padding-bottom: $sidebar-toggler-height;
7
+ overflow: visible;
8
+
9
+ &.sidebar-fixed {
10
+ z-index: $zindex-fixed + 1;
11
+ width: $sidebar-narrow-width;
12
+ }
13
+
14
+ .sidebar-brand-full {
15
+ display: none;
16
+ }
17
+
18
+ .sidebar-brand-narrow {
19
+ display: block;
20
+ }
21
+
22
+ .d-narrow-none,
23
+ .nav-label,
24
+ .nav-title,
25
+ .nav-group-items,
26
+ .nav-group.show .nav-group-items,
27
+ .sidebar-footer,
28
+ .sidebar-form,
29
+ .sidebar-header {
30
+ height: 0 !important; // stylelint-disable-line declaration-no-important
31
+ padding: 0;
32
+ margin: 0;
33
+ visibility: hidden;
34
+ opacity: 0;
35
+ }
36
+
37
+ .sidebar-toggler {
38
+ position: fixed;
39
+ bottom: 0;
40
+
41
+ &::before {
42
+ @include ltr-rtl("transform", rotate(-180deg), null, rotate(0deg));
43
+ }
44
+ }
45
+
46
+ &.sidebar-end .sidebar-toggler::before {
47
+ transform: rotate(0deg);
48
+ }
49
+ }
50
+ }
51
+
52
+ .sidebar-narrow {
53
+ @extend %sidebar-narrow;
54
+ &:not(.sidebar-end) ~ * {
55
+ --#{$variable-prefix}sidebar-occupy-start: #{$sidebar-narrow-width};
56
+ }
57
+ &.sidebar-end ~ * {
58
+ --#{$variable-prefix}sidebar-occupy-end: #{$sidebar-narrow-width};
59
+ }
60
+ }
61
+
62
+ .sidebar-narrow-unfoldable {
63
+ position: fixed;
64
+ z-index: $zindex-fixed + 1;
65
+
66
+ &:not(.sidebar-end) ~ * {
67
+ --#{$variable-prefix}sidebar-occupy-start: #{$sidebar-narrow-width};
68
+ }
69
+ &.sidebar-end ~ * {
70
+ --#{$variable-prefix}sidebar-occupy-end: #{$sidebar-narrow-width};
71
+ }
72
+
73
+ &:not(:hover) {
74
+ @extend %sidebar-narrow;
75
+ }
76
+
77
+ &:hover {
78
+ .sidebar-toggler {
79
+ &::before {
80
+ @include ltr-rtl("transform", rotate(-180deg), null, rotate(0deg));
81
+ }
82
+ }
83
+
84
+ &.sidebar-end .sidebar-toggler::before {
85
+ transform: rotate(0deg);
86
+ }
87
+ }
88
+ }
89
+
90
+ // Responsive behavior
91
+ @each $breakpoint in map-keys($grid-breakpoints) {
92
+ @include media-breakpoint-down($breakpoint) {
93
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
94
+ .sidebar:not(.show).sidebar-self-hiding#{$infix} {
95
+ &.sidebar-narrow,
96
+ &.sidebar-narrow-unfoldable {
97
+ &:not(.sidebar-end) {
98
+ @include ltr-rtl("margin-left", - $sidebar-narrow-width);
99
+ }
100
+ &.sidebar-end {
101
+ @include ltr-rtl("margin-right", - $sidebar-narrow-width);
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }