publishing_platform_publishing_components 0.1.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 (259) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +2 -0
  4. data/Rakefile +41 -0
  5. data/app/assets/builds/gemkeep +0 -0
  6. data/app/assets/config/publishing_platform_publishing_components_manifest.js +2 -0
  7. data/app/assets/images/publishing_platform_publishing_components/gemkeep +0 -0
  8. data/app/assets/stylesheets/publishing_platform_publishing_components/_all_components.scss +3 -0
  9. data/app/assets/stylesheets/publishing_platform_publishing_components/components/_attachment.scss +117 -0
  10. data/app/assets/stylesheets/publishing_platform_publishing_components/components/_summary-list.scss +169 -0
  11. data/app/controllers/publishing_platform_publishing_components/application_controller.rb +4 -0
  12. data/app/helpers/publishing_platform_publishing_components/application_helper.rb +4 -0
  13. data/app/models/publishing_platform_publishing_components/component_doc.rb +90 -0
  14. data/app/models/publishing_platform_publishing_components/component_docs.rb +57 -0
  15. data/app/models/publishing_platform_publishing_components/component_example.rb +104 -0
  16. data/app/models/publishing_platform_publishing_components/shared_accessibility_criteria.rb +37 -0
  17. data/app/views/publishing_platform_publishing_components/component_doc/_component_output.html.erb +15 -0
  18. data/app/views/publishing_platform_publishing_components/components/_attachment.html.erb +91 -0
  19. data/app/views/publishing_platform_publishing_components/components/_error_summary.html.erb +38 -0
  20. data/app/views/publishing_platform_publishing_components/components/_summary_list.html.erb +135 -0
  21. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_document.html.erb +3 -0
  22. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_external.html.erb +3 -0
  23. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_generic.html.erb +4 -0
  24. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_html.html.erb +3 -0
  25. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_pdf.html.erb +3 -0
  26. data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb +5 -0
  27. data/app/views/publishing_platform_publishing_components/components/docs/attachment.yml +104 -0
  28. data/app/views/publishing_platform_publishing_components/components/docs/error_summary.yml +51 -0
  29. data/app/views/publishing_platform_publishing_components/components/docs/summary_list.yml +137 -0
  30. data/config/initializers/assets.rb +24 -0
  31. data/config/routes.rb +2 -0
  32. data/lib/publishing_platform_publishing_components/config.rb +25 -0
  33. data/lib/publishing_platform_publishing_components/engine.rb +5 -0
  34. data/lib/publishing_platform_publishing_components/presenters/attachment_helper.rb +176 -0
  35. data/lib/publishing_platform_publishing_components/presenters/component_wrapper_helper.rb +290 -0
  36. data/lib/publishing_platform_publishing_components/presenters/shared_helper.rb +24 -0
  37. data/lib/publishing_platform_publishing_components/version.rb +3 -0
  38. data/lib/publishing_platform_publishing_components.rb +10 -0
  39. data/lib/tasks/publishing_platform_publishing_components_tasks.rake +4 -0
  40. data/node_modules/bootstrap/LICENSE +21 -0
  41. data/node_modules/bootstrap/README.md +246 -0
  42. data/node_modules/bootstrap/dist/css/bootstrap-grid.css +4085 -0
  43. data/node_modules/bootstrap/dist/css/bootstrap-grid.css.map +1 -0
  44. data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css +6 -0
  45. data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css.map +1 -0
  46. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css +4084 -0
  47. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css.map +1 -0
  48. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css +6 -0
  49. data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map +1 -0
  50. data/node_modules/bootstrap/dist/css/bootstrap-reboot.css +601 -0
  51. data/node_modules/bootstrap/dist/css/bootstrap-reboot.css.map +1 -0
  52. data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css +6 -0
  53. data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css.map +1 -0
  54. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css +598 -0
  55. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css.map +1 -0
  56. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +6 -0
  57. data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map +1 -0
  58. data/node_modules/bootstrap/dist/css/bootstrap-utilities.css +5406 -0
  59. data/node_modules/bootstrap/dist/css/bootstrap-utilities.css.map +1 -0
  60. data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css +6 -0
  61. data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css.map +1 -0
  62. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css +5397 -0
  63. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css.map +1 -0
  64. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +6 -0
  65. data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map +1 -0
  66. data/node_modules/bootstrap/dist/css/bootstrap.css +12048 -0
  67. data/node_modules/bootstrap/dist/css/bootstrap.css.map +1 -0
  68. data/node_modules/bootstrap/dist/css/bootstrap.min.css +6 -0
  69. data/node_modules/bootstrap/dist/css/bootstrap.min.css.map +1 -0
  70. data/node_modules/bootstrap/dist/css/bootstrap.rtl.css +12021 -0
  71. data/node_modules/bootstrap/dist/css/bootstrap.rtl.css.map +1 -0
  72. data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css +6 -0
  73. data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css.map +1 -0
  74. data/node_modules/bootstrap/dist/js/bootstrap.bundle.js +6312 -0
  75. data/node_modules/bootstrap/dist/js/bootstrap.bundle.js.map +1 -0
  76. data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
  77. data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
  78. data/node_modules/bootstrap/dist/js/bootstrap.esm.js +4447 -0
  79. data/node_modules/bootstrap/dist/js/bootstrap.esm.js.map +1 -0
  80. data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js +7 -0
  81. data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -0
  82. data/node_modules/bootstrap/dist/js/bootstrap.js +4494 -0
  83. data/node_modules/bootstrap/dist/js/bootstrap.js.map +1 -0
  84. data/node_modules/bootstrap/dist/js/bootstrap.min.js +7 -0
  85. data/node_modules/bootstrap/dist/js/bootstrap.min.js.map +1 -0
  86. data/node_modules/bootstrap/js/dist/alert.js +90 -0
  87. data/node_modules/bootstrap/js/dist/alert.js.map +1 -0
  88. data/node_modules/bootstrap/js/dist/base-component.js +86 -0
  89. data/node_modules/bootstrap/js/dist/base-component.js.map +1 -0
  90. data/node_modules/bootstrap/js/dist/button.js +79 -0
  91. data/node_modules/bootstrap/js/dist/button.js.map +1 -0
  92. data/node_modules/bootstrap/js/dist/carousel.js +388 -0
  93. data/node_modules/bootstrap/js/dist/carousel.js.map +1 -0
  94. data/node_modules/bootstrap/js/dist/collapse.js +249 -0
  95. data/node_modules/bootstrap/js/dist/collapse.js.map +1 -0
  96. data/node_modules/bootstrap/js/dist/dom/data.js +63 -0
  97. data/node_modules/bootstrap/js/dist/dom/data.js.map +1 -0
  98. data/node_modules/bootstrap/js/dist/dom/event-handler.js +237 -0
  99. data/node_modules/bootstrap/js/dist/dom/event-handler.js.map +1 -0
  100. data/node_modules/bootstrap/js/dist/dom/manipulator.js +72 -0
  101. data/node_modules/bootstrap/js/dist/dom/manipulator.js.map +1 -0
  102. data/node_modules/bootstrap/js/dist/dom/selector-engine.js +104 -0
  103. data/node_modules/bootstrap/js/dist/dom/selector-engine.js.map +1 -0
  104. data/node_modules/bootstrap/js/dist/dropdown.js +402 -0
  105. data/node_modules/bootstrap/js/dist/dropdown.js.map +1 -0
  106. data/node_modules/bootstrap/js/dist/modal.js +320 -0
  107. data/node_modules/bootstrap/js/dist/modal.js.map +1 -0
  108. data/node_modules/bootstrap/js/dist/offcanvas.js +246 -0
  109. data/node_modules/bootstrap/js/dist/offcanvas.js.map +1 -0
  110. data/node_modules/bootstrap/js/dist/popover.js +96 -0
  111. data/node_modules/bootstrap/js/dist/popover.js.map +1 -0
  112. data/node_modules/bootstrap/js/dist/scrollspy.js +275 -0
  113. data/node_modules/bootstrap/js/dist/scrollspy.js.map +1 -0
  114. data/node_modules/bootstrap/js/dist/tab.js +285 -0
  115. data/node_modules/bootstrap/js/dist/tab.js.map +1 -0
  116. data/node_modules/bootstrap/js/dist/toast.js +198 -0
  117. data/node_modules/bootstrap/js/dist/toast.js.map +1 -0
  118. data/node_modules/bootstrap/js/dist/tooltip.js +546 -0
  119. data/node_modules/bootstrap/js/dist/tooltip.js.map +1 -0
  120. data/node_modules/bootstrap/js/dist/util/backdrop.js +139 -0
  121. data/node_modules/bootstrap/js/dist/util/backdrop.js.map +1 -0
  122. data/node_modules/bootstrap/js/dist/util/component-functions.js +42 -0
  123. data/node_modules/bootstrap/js/dist/util/component-functions.js.map +1 -0
  124. data/node_modules/bootstrap/js/dist/util/config.js +68 -0
  125. data/node_modules/bootstrap/js/dist/util/config.js.map +1 -0
  126. data/node_modules/bootstrap/js/dist/util/focustrap.js +113 -0
  127. data/node_modules/bootstrap/js/dist/util/focustrap.js.map +1 -0
  128. data/node_modules/bootstrap/js/dist/util/index.js +281 -0
  129. data/node_modules/bootstrap/js/dist/util/index.js.map +1 -0
  130. data/node_modules/bootstrap/js/dist/util/sanitizer.js +113 -0
  131. data/node_modules/bootstrap/js/dist/util/sanitizer.js.map +1 -0
  132. data/node_modules/bootstrap/js/dist/util/scrollbar.js +113 -0
  133. data/node_modules/bootstrap/js/dist/util/scrollbar.js.map +1 -0
  134. data/node_modules/bootstrap/js/dist/util/swipe.js +135 -0
  135. data/node_modules/bootstrap/js/dist/util/swipe.js.map +1 -0
  136. data/node_modules/bootstrap/js/dist/util/template-factory.js +151 -0
  137. data/node_modules/bootstrap/js/dist/util/template-factory.js.map +1 -0
  138. data/node_modules/bootstrap/js/index.esm.js +19 -0
  139. data/node_modules/bootstrap/js/index.umd.js +34 -0
  140. data/node_modules/bootstrap/js/src/alert.js +87 -0
  141. data/node_modules/bootstrap/js/src/base-component.js +86 -0
  142. data/node_modules/bootstrap/js/src/button.js +72 -0
  143. data/node_modules/bootstrap/js/src/carousel.js +474 -0
  144. data/node_modules/bootstrap/js/src/collapse.js +297 -0
  145. data/node_modules/bootstrap/js/src/dom/data.js +55 -0
  146. data/node_modules/bootstrap/js/src/dom/event-handler.js +317 -0
  147. data/node_modules/bootstrap/js/src/dom/manipulator.js +71 -0
  148. data/node_modules/bootstrap/js/src/dom/selector-engine.js +126 -0
  149. data/node_modules/bootstrap/js/src/dropdown.js +455 -0
  150. data/node_modules/bootstrap/js/src/modal.js +378 -0
  151. data/node_modules/bootstrap/js/src/offcanvas.js +282 -0
  152. data/node_modules/bootstrap/js/src/popover.js +97 -0
  153. data/node_modules/bootstrap/js/src/scrollspy.js +296 -0
  154. data/node_modules/bootstrap/js/src/tab.js +315 -0
  155. data/node_modules/bootstrap/js/src/toast.js +224 -0
  156. data/node_modules/bootstrap/js/src/tooltip.js +633 -0
  157. data/node_modules/bootstrap/js/src/util/backdrop.js +151 -0
  158. data/node_modules/bootstrap/js/src/util/component-functions.js +35 -0
  159. data/node_modules/bootstrap/js/src/util/config.js +65 -0
  160. data/node_modules/bootstrap/js/src/util/focustrap.js +115 -0
  161. data/node_modules/bootstrap/js/src/util/index.js +306 -0
  162. data/node_modules/bootstrap/js/src/util/sanitizer.js +116 -0
  163. data/node_modules/bootstrap/js/src/util/scrollbar.js +114 -0
  164. data/node_modules/bootstrap/js/src/util/swipe.js +146 -0
  165. data/node_modules/bootstrap/js/src/util/template-factory.js +160 -0
  166. data/node_modules/bootstrap/package.json +210 -0
  167. data/node_modules/bootstrap/scss/_accordion.scss +153 -0
  168. data/node_modules/bootstrap/scss/_alert.scss +68 -0
  169. data/node_modules/bootstrap/scss/_badge.scss +38 -0
  170. data/node_modules/bootstrap/scss/_breadcrumb.scss +40 -0
  171. data/node_modules/bootstrap/scss/_button-group.scss +147 -0
  172. data/node_modules/bootstrap/scss/_buttons.scss +216 -0
  173. data/node_modules/bootstrap/scss/_card.scss +238 -0
  174. data/node_modules/bootstrap/scss/_carousel.scss +226 -0
  175. data/node_modules/bootstrap/scss/_close.scss +66 -0
  176. data/node_modules/bootstrap/scss/_containers.scss +41 -0
  177. data/node_modules/bootstrap/scss/_dropdown.scss +250 -0
  178. data/node_modules/bootstrap/scss/_forms.scss +9 -0
  179. data/node_modules/bootstrap/scss/_functions.scss +302 -0
  180. data/node_modules/bootstrap/scss/_grid.scss +39 -0
  181. data/node_modules/bootstrap/scss/_helpers.scss +12 -0
  182. data/node_modules/bootstrap/scss/_images.scss +42 -0
  183. data/node_modules/bootstrap/scss/_list-group.scss +199 -0
  184. data/node_modules/bootstrap/scss/_maps.scss +174 -0
  185. data/node_modules/bootstrap/scss/_mixins.scss +42 -0
  186. data/node_modules/bootstrap/scss/_modal.scss +240 -0
  187. data/node_modules/bootstrap/scss/_nav.scss +197 -0
  188. data/node_modules/bootstrap/scss/_navbar.scss +289 -0
  189. data/node_modules/bootstrap/scss/_offcanvas.scss +147 -0
  190. data/node_modules/bootstrap/scss/_pagination.scss +109 -0
  191. data/node_modules/bootstrap/scss/_placeholders.scss +51 -0
  192. data/node_modules/bootstrap/scss/_popover.scss +196 -0
  193. data/node_modules/bootstrap/scss/_progress.scss +68 -0
  194. data/node_modules/bootstrap/scss/_reboot.scss +617 -0
  195. data/node_modules/bootstrap/scss/_root.scss +187 -0
  196. data/node_modules/bootstrap/scss/_spinners.scss +86 -0
  197. data/node_modules/bootstrap/scss/_tables.scss +171 -0
  198. data/node_modules/bootstrap/scss/_toasts.scss +73 -0
  199. data/node_modules/bootstrap/scss/_tooltip.scss +119 -0
  200. data/node_modules/bootstrap/scss/_transitions.scss +27 -0
  201. data/node_modules/bootstrap/scss/_type.scss +106 -0
  202. data/node_modules/bootstrap/scss/_utilities.scss +806 -0
  203. data/node_modules/bootstrap/scss/_variables-dark.scss +102 -0
  204. data/node_modules/bootstrap/scss/_variables.scss +1753 -0
  205. data/node_modules/bootstrap/scss/bootstrap-grid.scss +62 -0
  206. data/node_modules/bootstrap/scss/bootstrap-reboot.scss +10 -0
  207. data/node_modules/bootstrap/scss/bootstrap-utilities.scss +19 -0
  208. data/node_modules/bootstrap/scss/bootstrap.scss +52 -0
  209. data/node_modules/bootstrap/scss/forms/_floating-labels.scss +97 -0
  210. data/node_modules/bootstrap/scss/forms/_form-check.scss +189 -0
  211. data/node_modules/bootstrap/scss/forms/_form-control.scss +214 -0
  212. data/node_modules/bootstrap/scss/forms/_form-range.scss +91 -0
  213. data/node_modules/bootstrap/scss/forms/_form-select.scss +80 -0
  214. data/node_modules/bootstrap/scss/forms/_form-text.scss +11 -0
  215. data/node_modules/bootstrap/scss/forms/_input-group.scss +132 -0
  216. data/node_modules/bootstrap/scss/forms/_labels.scss +36 -0
  217. data/node_modules/bootstrap/scss/forms/_validation.scss +12 -0
  218. data/node_modules/bootstrap/scss/helpers/_clearfix.scss +3 -0
  219. data/node_modules/bootstrap/scss/helpers/_color-bg.scss +7 -0
  220. data/node_modules/bootstrap/scss/helpers/_colored-links.scss +30 -0
  221. data/node_modules/bootstrap/scss/helpers/_focus-ring.scss +5 -0
  222. data/node_modules/bootstrap/scss/helpers/_icon-link.scss +25 -0
  223. data/node_modules/bootstrap/scss/helpers/_position.scss +36 -0
  224. data/node_modules/bootstrap/scss/helpers/_ratio.scss +26 -0
  225. data/node_modules/bootstrap/scss/helpers/_stacks.scss +15 -0
  226. data/node_modules/bootstrap/scss/helpers/_stretched-link.scss +15 -0
  227. data/node_modules/bootstrap/scss/helpers/_text-truncation.scss +7 -0
  228. data/node_modules/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
  229. data/node_modules/bootstrap/scss/helpers/_vr.scss +8 -0
  230. data/node_modules/bootstrap/scss/mixins/_alert.scss +18 -0
  231. data/node_modules/bootstrap/scss/mixins/_backdrop.scss +14 -0
  232. data/node_modules/bootstrap/scss/mixins/_banner.scss +7 -0
  233. data/node_modules/bootstrap/scss/mixins/_border-radius.scss +78 -0
  234. data/node_modules/bootstrap/scss/mixins/_box-shadow.scss +24 -0
  235. data/node_modules/bootstrap/scss/mixins/_breakpoints.scss +127 -0
  236. data/node_modules/bootstrap/scss/mixins/_buttons.scss +70 -0
  237. data/node_modules/bootstrap/scss/mixins/_caret.scss +69 -0
  238. data/node_modules/bootstrap/scss/mixins/_clearfix.scss +9 -0
  239. data/node_modules/bootstrap/scss/mixins/_color-mode.scss +21 -0
  240. data/node_modules/bootstrap/scss/mixins/_color-scheme.scss +7 -0
  241. data/node_modules/bootstrap/scss/mixins/_container.scss +11 -0
  242. data/node_modules/bootstrap/scss/mixins/_deprecate.scss +10 -0
  243. data/node_modules/bootstrap/scss/mixins/_forms.scss +163 -0
  244. data/node_modules/bootstrap/scss/mixins/_gradients.scss +47 -0
  245. data/node_modules/bootstrap/scss/mixins/_grid.scss +151 -0
  246. data/node_modules/bootstrap/scss/mixins/_image.scss +16 -0
  247. data/node_modules/bootstrap/scss/mixins/_list-group.scss +26 -0
  248. data/node_modules/bootstrap/scss/mixins/_lists.scss +7 -0
  249. data/node_modules/bootstrap/scss/mixins/_pagination.scss +10 -0
  250. data/node_modules/bootstrap/scss/mixins/_reset-text.scss +17 -0
  251. data/node_modules/bootstrap/scss/mixins/_resize.scss +6 -0
  252. data/node_modules/bootstrap/scss/mixins/_table-variants.scss +24 -0
  253. data/node_modules/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  254. data/node_modules/bootstrap/scss/mixins/_transition.scss +26 -0
  255. data/node_modules/bootstrap/scss/mixins/_utilities.scss +97 -0
  256. data/node_modules/bootstrap/scss/mixins/_visually-hidden.scss +38 -0
  257. data/node_modules/bootstrap/scss/utilities/_api.scss +47 -0
  258. data/node_modules/bootstrap/scss/vendor/_rfs.scss +348 -0
  259. metadata +448 -0
@@ -0,0 +1,39 @@
1
+ // Row
2
+ //
3
+ // Rows contain your columns.
4
+
5
+ :root {
6
+ @each $name, $value in $grid-breakpoints {
7
+ --#{$prefix}breakpoint-#{$name}: #{$value};
8
+ }
9
+ }
10
+
11
+ @if $enable-grid-classes {
12
+ .row {
13
+ @include make-row();
14
+
15
+ > * {
16
+ @include make-col-ready();
17
+ }
18
+ }
19
+ }
20
+
21
+ @if $enable-cssgrid {
22
+ .grid {
23
+ display: grid;
24
+ grid-template-rows: repeat(var(--#{$prefix}rows, 1), 1fr);
25
+ grid-template-columns: repeat(var(--#{$prefix}columns, #{$grid-columns}), 1fr);
26
+ gap: var(--#{$prefix}gap, #{$grid-gutter-width});
27
+
28
+ @include make-cssgrid();
29
+ }
30
+ }
31
+
32
+
33
+ // Columns
34
+ //
35
+ // Common styles for small and large grid columns
36
+
37
+ @if $enable-grid-classes {
38
+ @include make-grid-columns();
39
+ }
@@ -0,0 +1,12 @@
1
+ @import "helpers/clearfix";
2
+ @import "helpers/color-bg";
3
+ @import "helpers/colored-links";
4
+ @import "helpers/focus-ring";
5
+ @import "helpers/icon-link";
6
+ @import "helpers/ratio";
7
+ @import "helpers/position";
8
+ @import "helpers/stacks";
9
+ @import "helpers/visually-hidden";
10
+ @import "helpers/stretched-link";
11
+ @import "helpers/text-truncation";
12
+ @import "helpers/vr";
@@ -0,0 +1,42 @@
1
+ // Responsive images (ensure images don't scale beyond their parents)
2
+ //
3
+ // This is purposefully opt-in via an explicit class rather than being the default for all `<img>`s.
4
+ // We previously tried the "images are responsive by default" approach in Bootstrap v2,
5
+ // and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps)
6
+ // which weren't expecting the images within themselves to be involuntarily resized.
7
+ // See also https://github.com/twbs/bootstrap/issues/18178
8
+ .img-fluid {
9
+ @include img-fluid();
10
+ }
11
+
12
+
13
+ // Image thumbnails
14
+ .img-thumbnail {
15
+ padding: $thumbnail-padding;
16
+ background-color: $thumbnail-bg;
17
+ border: $thumbnail-border-width solid $thumbnail-border-color;
18
+ @include border-radius($thumbnail-border-radius);
19
+ @include box-shadow($thumbnail-box-shadow);
20
+
21
+ // Keep them at most 100% wide
22
+ @include img-fluid();
23
+ }
24
+
25
+ //
26
+ // Figures
27
+ //
28
+
29
+ .figure {
30
+ // Ensures the caption's text aligns with the image.
31
+ display: inline-block;
32
+ }
33
+
34
+ .figure-img {
35
+ margin-bottom: $spacer * .5;
36
+ line-height: 1;
37
+ }
38
+
39
+ .figure-caption {
40
+ @include font-size($figure-caption-font-size);
41
+ color: $figure-caption-color;
42
+ }
@@ -0,0 +1,199 @@
1
+ // Base class
2
+ //
3
+ // Easily usable on <ul>, <ol>, or <div>.
4
+
5
+ .list-group {
6
+ // scss-docs-start list-group-css-vars
7
+ --#{$prefix}list-group-color: #{$list-group-color};
8
+ --#{$prefix}list-group-bg: #{$list-group-bg};
9
+ --#{$prefix}list-group-border-color: #{$list-group-border-color};
10
+ --#{$prefix}list-group-border-width: #{$list-group-border-width};
11
+ --#{$prefix}list-group-border-radius: #{$list-group-border-radius};
12
+ --#{$prefix}list-group-item-padding-x: #{$list-group-item-padding-x};
13
+ --#{$prefix}list-group-item-padding-y: #{$list-group-item-padding-y};
14
+ --#{$prefix}list-group-action-color: #{$list-group-action-color};
15
+ --#{$prefix}list-group-action-hover-color: #{$list-group-action-hover-color};
16
+ --#{$prefix}list-group-action-hover-bg: #{$list-group-hover-bg};
17
+ --#{$prefix}list-group-action-active-color: #{$list-group-action-active-color};
18
+ --#{$prefix}list-group-action-active-bg: #{$list-group-action-active-bg};
19
+ --#{$prefix}list-group-disabled-color: #{$list-group-disabled-color};
20
+ --#{$prefix}list-group-disabled-bg: #{$list-group-disabled-bg};
21
+ --#{$prefix}list-group-active-color: #{$list-group-active-color};
22
+ --#{$prefix}list-group-active-bg: #{$list-group-active-bg};
23
+ --#{$prefix}list-group-active-border-color: #{$list-group-active-border-color};
24
+ // scss-docs-end list-group-css-vars
25
+
26
+ display: flex;
27
+ flex-direction: column;
28
+
29
+ // No need to set list-style: none; since .list-group-item is block level
30
+ padding-left: 0; // reset padding because ul and ol
31
+ margin-bottom: 0;
32
+ @include border-radius(var(--#{$prefix}list-group-border-radius));
33
+ }
34
+
35
+ .list-group-numbered {
36
+ list-style-type: none;
37
+ counter-reset: section;
38
+
39
+ > .list-group-item::before {
40
+ // Increments only this instance of the section counter
41
+ content: counters(section, ".") ". ";
42
+ counter-increment: section;
43
+ }
44
+ }
45
+
46
+ // Individual list items
47
+ //
48
+ // Use on `li`s or `div`s within the `.list-group` parent.
49
+
50
+ .list-group-item {
51
+ position: relative;
52
+ display: block;
53
+ padding: var(--#{$prefix}list-group-item-padding-y) var(--#{$prefix}list-group-item-padding-x);
54
+ color: var(--#{$prefix}list-group-color);
55
+ text-decoration: if($link-decoration == none, null, none);
56
+ background-color: var(--#{$prefix}list-group-bg);
57
+ border: var(--#{$prefix}list-group-border-width) solid var(--#{$prefix}list-group-border-color);
58
+
59
+ &:first-child {
60
+ @include border-top-radius(inherit);
61
+ }
62
+
63
+ &:last-child {
64
+ @include border-bottom-radius(inherit);
65
+ }
66
+
67
+ &.disabled,
68
+ &:disabled {
69
+ color: var(--#{$prefix}list-group-disabled-color);
70
+ pointer-events: none;
71
+ background-color: var(--#{$prefix}list-group-disabled-bg);
72
+ }
73
+
74
+ // Include both here for `<a>`s and `<button>`s
75
+ &.active {
76
+ z-index: 2; // Place active items above their siblings for proper border styling
77
+ color: var(--#{$prefix}list-group-active-color);
78
+ background-color: var(--#{$prefix}list-group-active-bg);
79
+ border-color: var(--#{$prefix}list-group-active-border-color);
80
+ }
81
+
82
+ // stylelint-disable-next-line scss/selector-no-redundant-nesting-selector
83
+ & + .list-group-item {
84
+ border-top-width: 0;
85
+
86
+ &.active {
87
+ margin-top: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
88
+ border-top-width: var(--#{$prefix}list-group-border-width);
89
+ }
90
+ }
91
+ }
92
+
93
+ // Interactive list items
94
+ //
95
+ // Use anchor or button elements instead of `li`s or `div`s to create interactive
96
+ // list items. Includes an extra `.active` modifier class for selected items.
97
+
98
+ .list-group-item-action {
99
+ width: 100%; // For `<button>`s (anchors become 100% by default though)
100
+ color: var(--#{$prefix}list-group-action-color);
101
+ text-align: inherit; // For `<button>`s (anchors inherit)
102
+
103
+ &:not(.active) {
104
+ // Hover state
105
+ &:hover,
106
+ &:focus {
107
+ z-index: 1; // Place hover/focus items above their siblings for proper border styling
108
+ color: var(--#{$prefix}list-group-action-hover-color);
109
+ text-decoration: none;
110
+ background-color: var(--#{$prefix}list-group-action-hover-bg);
111
+ }
112
+
113
+ &:active {
114
+ color: var(--#{$prefix}list-group-action-active-color);
115
+ background-color: var(--#{$prefix}list-group-action-active-bg);
116
+ }
117
+ }
118
+ }
119
+
120
+ // Horizontal
121
+ //
122
+ // Change the layout of list group items from vertical (default) to horizontal.
123
+
124
+ @each $breakpoint in map-keys($grid-breakpoints) {
125
+ @include media-breakpoint-up($breakpoint) {
126
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
127
+
128
+ .list-group-horizontal#{$infix} {
129
+ flex-direction: row;
130
+
131
+ > .list-group-item {
132
+ &:first-child:not(:last-child) {
133
+ @include border-bottom-start-radius(var(--#{$prefix}list-group-border-radius));
134
+ @include border-top-end-radius(0);
135
+ }
136
+
137
+ &:last-child:not(:first-child) {
138
+ @include border-top-end-radius(var(--#{$prefix}list-group-border-radius));
139
+ @include border-bottom-start-radius(0);
140
+ }
141
+
142
+ &.active {
143
+ margin-top: 0;
144
+ }
145
+
146
+ + .list-group-item {
147
+ border-top-width: var(--#{$prefix}list-group-border-width);
148
+ border-left-width: 0;
149
+
150
+ &.active {
151
+ margin-left: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
152
+ border-left-width: var(--#{$prefix}list-group-border-width);
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+
160
+
161
+ // Flush list items
162
+ //
163
+ // Remove borders and border-radius to keep list group items edge-to-edge. Most
164
+ // useful within other components (e.g., cards).
165
+
166
+ .list-group-flush {
167
+ @include border-radius(0);
168
+
169
+ > .list-group-item {
170
+ border-width: 0 0 var(--#{$prefix}list-group-border-width);
171
+
172
+ &:last-child {
173
+ border-bottom-width: 0;
174
+ }
175
+ }
176
+ }
177
+
178
+
179
+ // scss-docs-start list-group-modifiers
180
+ // List group contextual variants
181
+ //
182
+ // Add modifier classes to change text and background color on individual items.
183
+ // Organizationally, this must come after the `:hover` states.
184
+
185
+ @each $state in map-keys($theme-colors) {
186
+ .list-group-item-#{$state} {
187
+ --#{$prefix}list-group-color: var(--#{$prefix}#{$state}-text-emphasis);
188
+ --#{$prefix}list-group-bg: var(--#{$prefix}#{$state}-bg-subtle);
189
+ --#{$prefix}list-group-border-color: var(--#{$prefix}#{$state}-border-subtle);
190
+ --#{$prefix}list-group-action-hover-color: var(--#{$prefix}emphasis-color);
191
+ --#{$prefix}list-group-action-hover-bg: var(--#{$prefix}#{$state}-border-subtle);
192
+ --#{$prefix}list-group-action-active-color: var(--#{$prefix}emphasis-color);
193
+ --#{$prefix}list-group-action-active-bg: var(--#{$prefix}#{$state}-border-subtle);
194
+ --#{$prefix}list-group-active-color: var(--#{$prefix}#{$state}-bg-subtle);
195
+ --#{$prefix}list-group-active-bg: var(--#{$prefix}#{$state}-text-emphasis);
196
+ --#{$prefix}list-group-active-border-color: var(--#{$prefix}#{$state}-text-emphasis);
197
+ }
198
+ }
199
+ // scss-docs-end list-group-modifiers
@@ -0,0 +1,174 @@
1
+ // Re-assigned maps
2
+ //
3
+ // Placed here so that others can override the default Sass maps and see automatic updates to utilities and more.
4
+
5
+ // scss-docs-start theme-colors-rgb
6
+ $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value") !default;
7
+ // scss-docs-end theme-colors-rgb
8
+
9
+ // scss-docs-start theme-text-map
10
+ $theme-colors-text: (
11
+ "primary": $primary-text-emphasis,
12
+ "secondary": $secondary-text-emphasis,
13
+ "success": $success-text-emphasis,
14
+ "info": $info-text-emphasis,
15
+ "warning": $warning-text-emphasis,
16
+ "danger": $danger-text-emphasis,
17
+ "light": $light-text-emphasis,
18
+ "dark": $dark-text-emphasis,
19
+ ) !default;
20
+ // scss-docs-end theme-text-map
21
+
22
+ // scss-docs-start theme-bg-subtle-map
23
+ $theme-colors-bg-subtle: (
24
+ "primary": $primary-bg-subtle,
25
+ "secondary": $secondary-bg-subtle,
26
+ "success": $success-bg-subtle,
27
+ "info": $info-bg-subtle,
28
+ "warning": $warning-bg-subtle,
29
+ "danger": $danger-bg-subtle,
30
+ "light": $light-bg-subtle,
31
+ "dark": $dark-bg-subtle,
32
+ ) !default;
33
+ // scss-docs-end theme-bg-subtle-map
34
+
35
+ // scss-docs-start theme-border-subtle-map
36
+ $theme-colors-border-subtle: (
37
+ "primary": $primary-border-subtle,
38
+ "secondary": $secondary-border-subtle,
39
+ "success": $success-border-subtle,
40
+ "info": $info-border-subtle,
41
+ "warning": $warning-border-subtle,
42
+ "danger": $danger-border-subtle,
43
+ "light": $light-border-subtle,
44
+ "dark": $dark-border-subtle,
45
+ ) !default;
46
+ // scss-docs-end theme-border-subtle-map
47
+
48
+ $theme-colors-text-dark: null !default;
49
+ $theme-colors-bg-subtle-dark: null !default;
50
+ $theme-colors-border-subtle-dark: null !default;
51
+
52
+ @if $enable-dark-mode {
53
+ // scss-docs-start theme-text-dark-map
54
+ $theme-colors-text-dark: (
55
+ "primary": $primary-text-emphasis-dark,
56
+ "secondary": $secondary-text-emphasis-dark,
57
+ "success": $success-text-emphasis-dark,
58
+ "info": $info-text-emphasis-dark,
59
+ "warning": $warning-text-emphasis-dark,
60
+ "danger": $danger-text-emphasis-dark,
61
+ "light": $light-text-emphasis-dark,
62
+ "dark": $dark-text-emphasis-dark,
63
+ ) !default;
64
+ // scss-docs-end theme-text-dark-map
65
+
66
+ // scss-docs-start theme-bg-subtle-dark-map
67
+ $theme-colors-bg-subtle-dark: (
68
+ "primary": $primary-bg-subtle-dark,
69
+ "secondary": $secondary-bg-subtle-dark,
70
+ "success": $success-bg-subtle-dark,
71
+ "info": $info-bg-subtle-dark,
72
+ "warning": $warning-bg-subtle-dark,
73
+ "danger": $danger-bg-subtle-dark,
74
+ "light": $light-bg-subtle-dark,
75
+ "dark": $dark-bg-subtle-dark,
76
+ ) !default;
77
+ // scss-docs-end theme-bg-subtle-dark-map
78
+
79
+ // scss-docs-start theme-border-subtle-dark-map
80
+ $theme-colors-border-subtle-dark: (
81
+ "primary": $primary-border-subtle-dark,
82
+ "secondary": $secondary-border-subtle-dark,
83
+ "success": $success-border-subtle-dark,
84
+ "info": $info-border-subtle-dark,
85
+ "warning": $warning-border-subtle-dark,
86
+ "danger": $danger-border-subtle-dark,
87
+ "light": $light-border-subtle-dark,
88
+ "dark": $dark-border-subtle-dark,
89
+ ) !default;
90
+ // scss-docs-end theme-border-subtle-dark-map
91
+ }
92
+
93
+ // Utilities maps
94
+ //
95
+ // Extends the default `$theme-colors` maps to help create our utilities.
96
+
97
+ // Come v6, we'll de-dupe these variables. Until then, for backward compatibility, we keep them to reassign.
98
+ // scss-docs-start utilities-colors
99
+ $utilities-colors: $theme-colors-rgb !default;
100
+ // scss-docs-end utilities-colors
101
+
102
+ // scss-docs-start utilities-text-colors
103
+ $utilities-text: map-merge(
104
+ $utilities-colors,
105
+ (
106
+ "black": to-rgb($black),
107
+ "white": to-rgb($white),
108
+ "body": to-rgb($body-color)
109
+ )
110
+ ) !default;
111
+ $utilities-text-colors: map-loop($utilities-text, rgba-css-var, "$key", "text") !default;
112
+
113
+ $utilities-text-emphasis-colors: (
114
+ "primary-emphasis": var(--#{$prefix}primary-text-emphasis),
115
+ "secondary-emphasis": var(--#{$prefix}secondary-text-emphasis),
116
+ "success-emphasis": var(--#{$prefix}success-text-emphasis),
117
+ "info-emphasis": var(--#{$prefix}info-text-emphasis),
118
+ "warning-emphasis": var(--#{$prefix}warning-text-emphasis),
119
+ "danger-emphasis": var(--#{$prefix}danger-text-emphasis),
120
+ "light-emphasis": var(--#{$prefix}light-text-emphasis),
121
+ "dark-emphasis": var(--#{$prefix}dark-text-emphasis)
122
+ ) !default;
123
+ // scss-docs-end utilities-text-colors
124
+
125
+ // scss-docs-start utilities-bg-colors
126
+ $utilities-bg: map-merge(
127
+ $utilities-colors,
128
+ (
129
+ "black": to-rgb($black),
130
+ "white": to-rgb($white),
131
+ "body": to-rgb($body-bg)
132
+ )
133
+ ) !default;
134
+ $utilities-bg-colors: map-loop($utilities-bg, rgba-css-var, "$key", "bg") !default;
135
+
136
+ $utilities-bg-subtle: (
137
+ "primary-subtle": var(--#{$prefix}primary-bg-subtle),
138
+ "secondary-subtle": var(--#{$prefix}secondary-bg-subtle),
139
+ "success-subtle": var(--#{$prefix}success-bg-subtle),
140
+ "info-subtle": var(--#{$prefix}info-bg-subtle),
141
+ "warning-subtle": var(--#{$prefix}warning-bg-subtle),
142
+ "danger-subtle": var(--#{$prefix}danger-bg-subtle),
143
+ "light-subtle": var(--#{$prefix}light-bg-subtle),
144
+ "dark-subtle": var(--#{$prefix}dark-bg-subtle)
145
+ ) !default;
146
+ // scss-docs-end utilities-bg-colors
147
+
148
+ // scss-docs-start utilities-border-colors
149
+ $utilities-border: map-merge(
150
+ $utilities-colors,
151
+ (
152
+ "black": to-rgb($black),
153
+ "white": to-rgb($white)
154
+ )
155
+ ) !default;
156
+ $utilities-border-colors: map-loop($utilities-border, rgba-css-var, "$key", "border") !default;
157
+
158
+ $utilities-border-subtle: (
159
+ "primary-subtle": var(--#{$prefix}primary-border-subtle),
160
+ "secondary-subtle": var(--#{$prefix}secondary-border-subtle),
161
+ "success-subtle": var(--#{$prefix}success-border-subtle),
162
+ "info-subtle": var(--#{$prefix}info-border-subtle),
163
+ "warning-subtle": var(--#{$prefix}warning-border-subtle),
164
+ "danger-subtle": var(--#{$prefix}danger-border-subtle),
165
+ "light-subtle": var(--#{$prefix}light-border-subtle),
166
+ "dark-subtle": var(--#{$prefix}dark-border-subtle)
167
+ ) !default;
168
+ // scss-docs-end utilities-border-colors
169
+
170
+ $utilities-links-underline: map-loop($utilities-colors, rgba-css-var, "$key", "link-underline") !default;
171
+
172
+ $negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
173
+
174
+ $gutters: $spacers !default;
@@ -0,0 +1,42 @@
1
+ // Toggles
2
+ //
3
+ // Used in conjunction with global variables to enable certain theme features.
4
+
5
+ // Vendor
6
+ @import "vendor/rfs";
7
+
8
+ // Deprecate
9
+ @import "mixins/deprecate";
10
+
11
+ // Helpers
12
+ @import "mixins/breakpoints";
13
+ @import "mixins/color-mode";
14
+ @import "mixins/color-scheme";
15
+ @import "mixins/image";
16
+ @import "mixins/resize";
17
+ @import "mixins/visually-hidden";
18
+ @import "mixins/reset-text";
19
+ @import "mixins/text-truncate";
20
+
21
+ // Utilities
22
+ @import "mixins/utilities";
23
+
24
+ // Components
25
+ @import "mixins/backdrop";
26
+ @import "mixins/buttons";
27
+ @import "mixins/caret";
28
+ @import "mixins/pagination";
29
+ @import "mixins/lists";
30
+ @import "mixins/forms";
31
+ @import "mixins/table-variants";
32
+
33
+ // Skins
34
+ @import "mixins/border-radius";
35
+ @import "mixins/box-shadow";
36
+ @import "mixins/gradients";
37
+ @import "mixins/transition";
38
+
39
+ // Layout
40
+ @import "mixins/clearfix";
41
+ @import "mixins/container";
42
+ @import "mixins/grid";