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,62 @@
1
+ @import "mixins/banner";
2
+ @include bsBanner(Grid);
3
+
4
+ $include-column-box-sizing: true !default;
5
+
6
+ @import "functions";
7
+ @import "variables";
8
+ @import "variables-dark";
9
+ @import "maps";
10
+
11
+ @import "mixins/breakpoints";
12
+ @import "mixins/container";
13
+ @import "mixins/grid";
14
+ @import "mixins/utilities";
15
+
16
+ @import "vendor/rfs";
17
+
18
+ @import "containers";
19
+ @import "grid";
20
+
21
+ @import "utilities";
22
+ // Only use the utilities we need
23
+ // stylelint-disable-next-line scss/dollar-variable-default
24
+ $utilities: map-get-multiple(
25
+ $utilities,
26
+ (
27
+ "display",
28
+ "order",
29
+ "flex",
30
+ "flex-direction",
31
+ "flex-grow",
32
+ "flex-shrink",
33
+ "flex-wrap",
34
+ "justify-content",
35
+ "align-items",
36
+ "align-content",
37
+ "align-self",
38
+ "margin",
39
+ "margin-x",
40
+ "margin-y",
41
+ "margin-top",
42
+ "margin-end",
43
+ "margin-bottom",
44
+ "margin-start",
45
+ "negative-margin",
46
+ "negative-margin-x",
47
+ "negative-margin-y",
48
+ "negative-margin-top",
49
+ "negative-margin-end",
50
+ "negative-margin-bottom",
51
+ "negative-margin-start",
52
+ "padding",
53
+ "padding-x",
54
+ "padding-y",
55
+ "padding-top",
56
+ "padding-end",
57
+ "padding-bottom",
58
+ "padding-start",
59
+ )
60
+ );
61
+
62
+ @import "utilities/api";
@@ -0,0 +1,10 @@
1
+ @import "mixins/banner";
2
+ @include bsBanner(Reboot);
3
+
4
+ @import "functions";
5
+ @import "variables";
6
+ @import "variables-dark";
7
+ @import "maps";
8
+ @import "mixins";
9
+ @import "root";
10
+ @import "reboot";
@@ -0,0 +1,19 @@
1
+ @import "mixins/banner";
2
+ @include bsBanner(Utilities);
3
+
4
+ // Configuration
5
+ @import "functions";
6
+ @import "variables";
7
+ @import "variables-dark";
8
+ @import "maps";
9
+ @import "mixins";
10
+ @import "utilities";
11
+
12
+ // Layout & components
13
+ @import "root";
14
+
15
+ // Helpers
16
+ @import "helpers";
17
+
18
+ // Utilities
19
+ @import "utilities/api";
@@ -0,0 +1,52 @@
1
+ @import "mixins/banner";
2
+ @include bsBanner("");
3
+
4
+
5
+ // scss-docs-start import-stack
6
+ // Configuration
7
+ @import "functions";
8
+ @import "variables";
9
+ @import "variables-dark";
10
+ @import "maps";
11
+ @import "mixins";
12
+ @import "utilities";
13
+
14
+ // Layout & components
15
+ @import "root";
16
+ @import "reboot";
17
+ @import "type";
18
+ @import "images";
19
+ @import "containers";
20
+ @import "grid";
21
+ @import "tables";
22
+ @import "forms";
23
+ @import "buttons";
24
+ @import "transitions";
25
+ @import "dropdown";
26
+ @import "button-group";
27
+ @import "nav";
28
+ @import "navbar";
29
+ @import "card";
30
+ @import "accordion";
31
+ @import "breadcrumb";
32
+ @import "pagination";
33
+ @import "badge";
34
+ @import "alert";
35
+ @import "progress";
36
+ @import "list-group";
37
+ @import "close";
38
+ @import "toasts";
39
+ @import "modal";
40
+ @import "tooltip";
41
+ @import "popover";
42
+ @import "carousel";
43
+ @import "spinners";
44
+ @import "offcanvas";
45
+ @import "placeholders";
46
+
47
+ // Helpers
48
+ @import "helpers";
49
+
50
+ // Utilities
51
+ @import "utilities/api";
52
+ // scss-docs-end import-stack
@@ -0,0 +1,97 @@
1
+ .form-floating {
2
+ position: relative;
3
+
4
+ > .form-control,
5
+ > .form-control-plaintext,
6
+ > .form-select {
7
+ height: $form-floating-height;
8
+ min-height: $form-floating-height;
9
+ line-height: $form-floating-line-height;
10
+ }
11
+
12
+ > label {
13
+ position: absolute;
14
+ top: 0;
15
+ left: 0;
16
+ z-index: 2;
17
+ max-width: 100%;
18
+ height: 100%; // allow textareas
19
+ padding: $form-floating-padding-y $form-floating-padding-x;
20
+ overflow: hidden;
21
+ color: rgba(var(--#{$prefix}body-color-rgb), #{$form-floating-label-opacity});
22
+ text-align: start;
23
+ text-overflow: ellipsis;
24
+ white-space: nowrap;
25
+ pointer-events: none;
26
+ border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
27
+ transform-origin: 0 0;
28
+ @include transition($form-floating-transition);
29
+ }
30
+
31
+ > .form-control,
32
+ > .form-control-plaintext {
33
+ padding: $form-floating-padding-y $form-floating-padding-x;
34
+
35
+ &::placeholder {
36
+ color: transparent;
37
+ }
38
+
39
+ &:focus,
40
+ &:not(:placeholder-shown) {
41
+ padding-top: $form-floating-input-padding-t;
42
+ padding-bottom: $form-floating-input-padding-b;
43
+ }
44
+ // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
45
+ &:-webkit-autofill {
46
+ padding-top: $form-floating-input-padding-t;
47
+ padding-bottom: $form-floating-input-padding-b;
48
+ }
49
+ }
50
+
51
+ > .form-select {
52
+ padding-top: $form-floating-input-padding-t;
53
+ padding-bottom: $form-floating-input-padding-b;
54
+ padding-left: $form-floating-padding-x;
55
+ }
56
+
57
+ > .form-control:focus,
58
+ > .form-control:not(:placeholder-shown),
59
+ > .form-control-plaintext,
60
+ > .form-select {
61
+ ~ label {
62
+ transform: $form-floating-label-transform;
63
+ }
64
+ }
65
+ // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
66
+ > .form-control:-webkit-autofill {
67
+ ~ label {
68
+ transform: $form-floating-label-transform;
69
+ }
70
+ }
71
+ > textarea:focus,
72
+ > textarea:not(:placeholder-shown) {
73
+ ~ label::after {
74
+ position: absolute;
75
+ inset: $form-floating-padding-y ($form-floating-padding-x * .5);
76
+ z-index: -1;
77
+ height: $form-floating-label-height;
78
+ content: "";
79
+ background-color: $input-bg;
80
+ @include border-radius($input-border-radius);
81
+ }
82
+ }
83
+ > textarea:disabled ~ label::after {
84
+ background-color: $input-disabled-bg;
85
+ }
86
+
87
+ > .form-control-plaintext {
88
+ ~ label {
89
+ border-width: $input-border-width 0; // Required to properly position label text - as explained above
90
+ }
91
+ }
92
+
93
+ > :disabled ~ label,
94
+ > .form-control:disabled ~ label { // Required for `.form-control`s because of specificity
95
+ color: $form-floating-label-disabled-color;
96
+ }
97
+ }
@@ -0,0 +1,189 @@
1
+ //
2
+ // Check/radio
3
+ //
4
+
5
+ .form-check {
6
+ display: block;
7
+ min-height: $form-check-min-height;
8
+ padding-left: $form-check-padding-start;
9
+ margin-bottom: $form-check-margin-bottom;
10
+
11
+ .form-check-input {
12
+ float: left;
13
+ margin-left: $form-check-padding-start * -1;
14
+ }
15
+ }
16
+
17
+ .form-check-reverse {
18
+ padding-right: $form-check-padding-start;
19
+ padding-left: 0;
20
+ text-align: right;
21
+
22
+ .form-check-input {
23
+ float: right;
24
+ margin-right: $form-check-padding-start * -1;
25
+ margin-left: 0;
26
+ }
27
+ }
28
+
29
+ .form-check-input {
30
+ --#{$prefix}form-check-bg: #{$form-check-input-bg};
31
+
32
+ flex-shrink: 0;
33
+ width: $form-check-input-width;
34
+ height: $form-check-input-width;
35
+ margin-top: ($line-height-base - $form-check-input-width) * .5; // line-height minus check height
36
+ vertical-align: top;
37
+ appearance: none;
38
+ background-color: var(--#{$prefix}form-check-bg);
39
+ background-image: var(--#{$prefix}form-check-bg-image);
40
+ background-repeat: no-repeat;
41
+ background-position: center;
42
+ background-size: contain;
43
+ border: $form-check-input-border;
44
+ print-color-adjust: exact; // Keep themed appearance for print
45
+ @include transition($form-check-transition);
46
+
47
+ &[type="checkbox"] {
48
+ @include border-radius($form-check-input-border-radius);
49
+ }
50
+
51
+ &[type="radio"] {
52
+ // stylelint-disable-next-line property-disallowed-list
53
+ border-radius: $form-check-radio-border-radius;
54
+ }
55
+
56
+ &:active {
57
+ filter: $form-check-input-active-filter;
58
+ }
59
+
60
+ &:focus {
61
+ border-color: $form-check-input-focus-border;
62
+ outline: 0;
63
+ box-shadow: $form-check-input-focus-box-shadow;
64
+ }
65
+
66
+ &:checked {
67
+ background-color: $form-check-input-checked-bg-color;
68
+ border-color: $form-check-input-checked-border-color;
69
+
70
+ &[type="checkbox"] {
71
+ @if $enable-gradients {
72
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)}, var(--#{$prefix}gradient);
73
+ } @else {
74
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)};
75
+ }
76
+ }
77
+
78
+ &[type="radio"] {
79
+ @if $enable-gradients {
80
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)}, var(--#{$prefix}gradient);
81
+ } @else {
82
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)};
83
+ }
84
+ }
85
+ }
86
+
87
+ &[type="checkbox"]:indeterminate {
88
+ background-color: $form-check-input-indeterminate-bg-color;
89
+ border-color: $form-check-input-indeterminate-border-color;
90
+
91
+ @if $enable-gradients {
92
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-indeterminate-bg-image)}, var(--#{$prefix}gradient);
93
+ } @else {
94
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-indeterminate-bg-image)};
95
+ }
96
+ }
97
+
98
+ &:disabled {
99
+ pointer-events: none;
100
+ filter: none;
101
+ opacity: $form-check-input-disabled-opacity;
102
+ }
103
+
104
+ // Use disabled attribute in addition of :disabled pseudo-class
105
+ // See: https://github.com/twbs/bootstrap/issues/28247
106
+ &[disabled],
107
+ &:disabled {
108
+ ~ .form-check-label {
109
+ cursor: default;
110
+ opacity: $form-check-label-disabled-opacity;
111
+ }
112
+ }
113
+ }
114
+
115
+ .form-check-label {
116
+ color: $form-check-label-color;
117
+ cursor: $form-check-label-cursor;
118
+ }
119
+
120
+ //
121
+ // Switch
122
+ //
123
+
124
+ .form-switch {
125
+ padding-left: $form-switch-padding-start;
126
+
127
+ .form-check-input {
128
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image)};
129
+
130
+ width: $form-switch-width;
131
+ margin-left: $form-switch-padding-start * -1;
132
+ background-image: var(--#{$prefix}form-switch-bg);
133
+ background-position: left center;
134
+ @include border-radius($form-switch-border-radius, 0);
135
+ @include transition($form-switch-transition);
136
+
137
+ &:focus {
138
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-focus-bg-image)};
139
+ }
140
+
141
+ &:checked {
142
+ background-position: $form-switch-checked-bg-position;
143
+
144
+ @if $enable-gradients {
145
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-checked-bg-image)}, var(--#{$prefix}gradient);
146
+ } @else {
147
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-checked-bg-image)};
148
+ }
149
+ }
150
+ }
151
+
152
+ &.form-check-reverse {
153
+ padding-right: $form-switch-padding-start;
154
+ padding-left: 0;
155
+
156
+ .form-check-input {
157
+ margin-right: $form-switch-padding-start * -1;
158
+ margin-left: 0;
159
+ }
160
+ }
161
+ }
162
+
163
+ .form-check-inline {
164
+ display: inline-block;
165
+ margin-right: $form-check-inline-margin-end;
166
+ }
167
+
168
+ .btn-check {
169
+ position: absolute;
170
+ clip: rect(0, 0, 0, 0);
171
+ pointer-events: none;
172
+
173
+ &[disabled],
174
+ &:disabled {
175
+ + .btn {
176
+ pointer-events: none;
177
+ filter: none;
178
+ opacity: $form-check-btn-check-disabled-opacity;
179
+ }
180
+ }
181
+ }
182
+
183
+ @if $enable-dark-mode {
184
+ @include color-mode(dark) {
185
+ .form-switch .form-check-input:not(:checked):not(:focus) {
186
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image-dark)};
187
+ }
188
+ }
189
+ }
@@ -0,0 +1,214 @@
1
+ //
2
+ // General form controls (plus a few specific high-level interventions)
3
+ //
4
+
5
+ .form-control {
6
+ display: block;
7
+ width: 100%;
8
+ padding: $input-padding-y $input-padding-x;
9
+ font-family: $input-font-family;
10
+ @include font-size($input-font-size);
11
+ font-weight: $input-font-weight;
12
+ line-height: $input-line-height;
13
+ color: $input-color;
14
+ appearance: none; // Fix appearance for date inputs in Safari
15
+ background-color: $input-bg;
16
+ background-clip: padding-box;
17
+ border: $input-border-width solid $input-border-color;
18
+
19
+ // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
20
+ @include border-radius($input-border-radius, 0);
21
+
22
+ @include box-shadow($input-box-shadow);
23
+ @include transition($input-transition);
24
+
25
+ &[type="file"] {
26
+ overflow: hidden; // prevent pseudo element button overlap
27
+
28
+ &:not(:disabled):not([readonly]) {
29
+ cursor: pointer;
30
+ }
31
+ }
32
+
33
+ // Customize the `:focus` state to imitate native WebKit styles.
34
+ &:focus {
35
+ color: $input-focus-color;
36
+ background-color: $input-focus-bg;
37
+ border-color: $input-focus-border-color;
38
+ outline: 0;
39
+ @if $enable-shadows {
40
+ @include box-shadow($input-box-shadow, $input-focus-box-shadow);
41
+ } @else {
42
+ // Avoid using mixin so we can pass custom focus shadow properly
43
+ box-shadow: $input-focus-box-shadow;
44
+ }
45
+ }
46
+
47
+ &::-webkit-date-and-time-value {
48
+ // On Android Chrome, form-control's "width: 100%" makes the input width too small
49
+ // Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109
50
+ //
51
+ // On iOS Safari, form-control's "appearance: none" + "width: 100%" makes the input width too small
52
+ // Tested under iOS 16.2 / Safari 16.2
53
+ min-width: 85px; // Seems to be a good minimum safe width
54
+
55
+ // Add some height to date inputs on iOS
56
+ // https://github.com/twbs/bootstrap/issues/23307
57
+ // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
58
+ // Multiply line-height by 1em if it has no unit
59
+ height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
60
+
61
+ // Android Chrome type="date" is taller than the other inputs
62
+ // because of "margin: 1px 24px 1px 4px" inside the shadow DOM
63
+ // Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109
64
+ margin: 0;
65
+ }
66
+
67
+ // Prevent excessive date input height in Webkit
68
+ // https://github.com/twbs/bootstrap/issues/34433
69
+ &::-webkit-datetime-edit {
70
+ display: block;
71
+ padding: 0;
72
+ }
73
+
74
+ // Placeholder
75
+ &::placeholder {
76
+ color: $input-placeholder-color;
77
+ // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
78
+ opacity: 1;
79
+ }
80
+
81
+ // Disabled inputs
82
+ //
83
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
84
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
85
+ // don't honor that edge case; we style them as disabled anyway.
86
+ &:disabled {
87
+ color: $input-disabled-color;
88
+ background-color: $input-disabled-bg;
89
+ border-color: $input-disabled-border-color;
90
+ // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
91
+ opacity: 1;
92
+ }
93
+
94
+ // File input buttons theming
95
+ &::file-selector-button {
96
+ padding: $input-padding-y $input-padding-x;
97
+ margin: (-$input-padding-y) (-$input-padding-x);
98
+ margin-inline-end: $input-padding-x;
99
+ color: $form-file-button-color;
100
+ @include gradient-bg($form-file-button-bg);
101
+ pointer-events: none;
102
+ border-color: inherit;
103
+ border-style: solid;
104
+ border-width: 0;
105
+ border-inline-end-width: $input-border-width;
106
+ border-radius: 0; // stylelint-disable-line property-disallowed-list
107
+ @include transition($btn-transition);
108
+ }
109
+
110
+ &:hover:not(:disabled):not([readonly])::file-selector-button {
111
+ background-color: $form-file-button-hover-bg;
112
+ }
113
+ }
114
+
115
+ // Readonly controls as plain text
116
+ //
117
+ // Apply class to a readonly input to make it appear like regular plain
118
+ // text (without any border, background color, focus indicator)
119
+
120
+ .form-control-plaintext {
121
+ display: block;
122
+ width: 100%;
123
+ padding: $input-padding-y 0;
124
+ margin-bottom: 0; // match inputs if this class comes on inputs with default margins
125
+ line-height: $input-line-height;
126
+ color: $input-plaintext-color;
127
+ background-color: transparent;
128
+ border: solid transparent;
129
+ border-width: $input-border-width 0;
130
+
131
+ &:focus {
132
+ outline: 0;
133
+ }
134
+
135
+ &.form-control-sm,
136
+ &.form-control-lg {
137
+ padding-right: 0;
138
+ padding-left: 0;
139
+ }
140
+ }
141
+
142
+ // Form control sizing
143
+ //
144
+ // Build on `.form-control` with modifier classes to decrease or increase the
145
+ // height and font-size of form controls.
146
+ //
147
+ // Repeated in `_input_group.scss` to avoid Sass extend issues.
148
+
149
+ .form-control-sm {
150
+ min-height: $input-height-sm;
151
+ padding: $input-padding-y-sm $input-padding-x-sm;
152
+ @include font-size($input-font-size-sm);
153
+ @include border-radius($input-border-radius-sm);
154
+
155
+ &::file-selector-button {
156
+ padding: $input-padding-y-sm $input-padding-x-sm;
157
+ margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
158
+ margin-inline-end: $input-padding-x-sm;
159
+ }
160
+ }
161
+
162
+ .form-control-lg {
163
+ min-height: $input-height-lg;
164
+ padding: $input-padding-y-lg $input-padding-x-lg;
165
+ @include font-size($input-font-size-lg);
166
+ @include border-radius($input-border-radius-lg);
167
+
168
+ &::file-selector-button {
169
+ padding: $input-padding-y-lg $input-padding-x-lg;
170
+ margin: (-$input-padding-y-lg) (-$input-padding-x-lg);
171
+ margin-inline-end: $input-padding-x-lg;
172
+ }
173
+ }
174
+
175
+ // Make sure textareas don't shrink too much when resized
176
+ // https://github.com/twbs/bootstrap/pull/29124
177
+ // stylelint-disable selector-no-qualifying-type
178
+ textarea {
179
+ &.form-control {
180
+ min-height: $input-height;
181
+ }
182
+
183
+ &.form-control-sm {
184
+ min-height: $input-height-sm;
185
+ }
186
+
187
+ &.form-control-lg {
188
+ min-height: $input-height-lg;
189
+ }
190
+ }
191
+ // stylelint-enable selector-no-qualifying-type
192
+
193
+ .form-control-color {
194
+ width: $form-color-width;
195
+ height: $input-height;
196
+ padding: $input-padding-y;
197
+
198
+ &:not(:disabled):not([readonly]) {
199
+ cursor: pointer;
200
+ }
201
+
202
+ &::-moz-color-swatch {
203
+ border: 0 !important; // stylelint-disable-line declaration-no-important
204
+ @include border-radius($input-border-radius);
205
+ }
206
+
207
+ &::-webkit-color-swatch {
208
+ border: 0 !important; // stylelint-disable-line declaration-no-important
209
+ @include border-radius($input-border-radius);
210
+ }
211
+
212
+ &.form-control-sm { height: $input-height-sm; }
213
+ &.form-control-lg { height: $input-height-lg; }
214
+ }