headmin 0.2.9 → 0.3.1

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 (237) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -3
  3. data/Gemfile.lock +12 -1
  4. data/README.md +64 -57
  5. data/app/assets/config/headmin_manifest.js +2 -0
  6. data/app/assets/javascripts/headmin/config/i18n.js +11 -0
  7. data/{src/js → app/assets/javascripts}/headmin/controllers/blocks_controller.js +0 -1
  8. data/{src/js → app/assets/javascripts}/headmin/controllers/date_range_controller.js +0 -2
  9. data/app/assets/javascripts/headmin/controllers/dropzone_controller.js +33 -0
  10. data/app/assets/javascripts/headmin/controllers/file_preview_controller.js +244 -0
  11. data/{src/js → app/assets/javascripts}/headmin/controllers/filter_controller.js +12 -6
  12. data/{src/js → app/assets/javascripts}/headmin/controllers/flatpickr_controller.js +2 -1
  13. data/app/assets/javascripts/headmin/controllers/hello_controller.js +7 -0
  14. data/app/assets/javascripts/headmin/controllers/notification_controller.js +8 -0
  15. data/{src/js → app/assets/javascripts}/headmin/controllers/popup_controller.js +0 -1
  16. data/app/assets/javascripts/headmin/controllers/redactorx_controller.js +13 -0
  17. data/app/assets/javascripts/headmin/controllers/select_controller.js +48 -0
  18. data/{src/js → app/assets/javascripts}/headmin/controllers/table_controller.js +1 -1
  19. data/app/assets/javascripts/headmin/index.js +41 -0
  20. data/app/assets/javascripts/headmin.js +15934 -0
  21. data/{src/scss → app/assets/stylesheets}/headmin/form.scss +51 -2
  22. data/app/assets/stylesheets/headmin/syntax.scss +349 -0
  23. data/app/assets/stylesheets/headmin/thumbnail.scss +20 -0
  24. data/app/assets/stylesheets/headmin/utilities.scss +68 -0
  25. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_accordion.scss +118 -0
  26. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_alert.scss +57 -0
  27. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_badge.scss +29 -0
  28. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_breadcrumb.scss +28 -0
  29. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_button-group.scss +139 -0
  30. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_buttons.scss +111 -0
  31. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_card.scss +216 -0
  32. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_carousel.scss +229 -0
  33. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_close.scss +40 -0
  34. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_containers.scss +41 -0
  35. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_dropdown.scss +240 -0
  36. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_forms.scss +9 -0
  37. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_functions.scss +302 -0
  38. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_grid.scss +33 -0
  39. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_helpers.scss +9 -0
  40. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_images.scss +42 -0
  41. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_list-group.scss +174 -0
  42. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_mixins.scss +43 -0
  43. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_modal.scss +209 -0
  44. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_nav.scss +139 -0
  45. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_navbar.scss +335 -0
  46. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_offcanvas.scss +83 -0
  47. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_pagination.scss +64 -0
  48. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_placeholders.scss +51 -0
  49. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_popover.scss +158 -0
  50. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_progress.scss +48 -0
  51. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_reboot.scss +625 -0
  52. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_root.scss +54 -0
  53. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_spinners.scss +69 -0
  54. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_tables.scss +155 -0
  55. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_toasts.scss +51 -0
  56. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_tooltip.scss +115 -0
  57. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_transitions.scss +27 -0
  58. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_type.scss +104 -0
  59. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_utilities.scss +630 -0
  60. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_variables.scss +1641 -0
  61. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/bootstrap-grid.scss +67 -0
  62. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/bootstrap-reboot.scss +13 -0
  63. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/bootstrap-utilities.scss +18 -0
  64. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/bootstrap.scss +53 -0
  65. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_floating-labels.scss +63 -0
  66. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-check.scss +152 -0
  67. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-control.scss +219 -0
  68. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-range.scss +91 -0
  69. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-select.scss +72 -0
  70. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-text.scss +11 -0
  71. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_input-group.scss +121 -0
  72. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_labels.scss +36 -0
  73. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_validation.scss +12 -0
  74. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_clearfix.scss +3 -0
  75. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_colored-links.scss +12 -0
  76. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_position.scss +30 -0
  77. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_ratio.scss +26 -0
  78. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_stacks.scss +15 -0
  79. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_stretched-link.scss +15 -0
  80. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_text-truncation.scss +7 -0
  81. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
  82. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_vr.scss +8 -0
  83. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_alert.scss +11 -0
  84. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_backdrop.scss +14 -0
  85. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_border-radius.scss +78 -0
  86. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_box-shadow.scss +18 -0
  87. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_breakpoints.scss +127 -0
  88. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_buttons.scss +133 -0
  89. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_caret.scss +64 -0
  90. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_clearfix.scss +9 -0
  91. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_color-scheme.scss +7 -0
  92. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_container.scss +9 -0
  93. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_deprecate.scss +10 -0
  94. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_forms.scss +144 -0
  95. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_gradients.scss +47 -0
  96. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_grid.scss +151 -0
  97. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_image.scss +16 -0
  98. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_list-group.scss +24 -0
  99. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_lists.scss +7 -0
  100. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_pagination.scss +31 -0
  101. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_reset-text.scss +17 -0
  102. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_resize.scss +6 -0
  103. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_table-variants.scss +21 -0
  104. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  105. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_transition.scss +26 -0
  106. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_utilities.scss +89 -0
  107. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_visually-hidden.scss +29 -0
  108. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/utilities/_api.scss +47 -0
  109. data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/vendor/_rfs.scss +354 -0
  110. data/app/assets/stylesheets/headmin/vendor/flatpickr.css +903 -0
  111. data/app/assets/stylesheets/headmin/vendor/tom-select-bootstrap.css +537 -0
  112. data/app/assets/stylesheets/headmin.css +13454 -0
  113. data/app/assets/stylesheets/headmin.scss +65 -0
  114. data/app/helpers/headmin/admin_helper.rb +1 -0
  115. data/app/helpers/headmin/bootstrap_helper.rb +25 -3
  116. data/app/helpers/headmin/documentation_helper.rb +35 -0
  117. data/app/helpers/headmin/form_helper.rb +4 -0
  118. data/app/helpers/headmin/request_helper.rb +3 -8
  119. data/app/models/headmin/documentation_renderer.rb +32 -0
  120. data/app/models/headmin/form/base.rb +79 -0
  121. data/app/models/headmin/form/text.rb +53 -0
  122. data/app/services/block_service.rb +1 -1
  123. data/app/views/examples/admin.html.erb +1 -1
  124. data/app/views/headmin/_blocks.html.erb +2 -2
  125. data/app/views/headmin/_breadcrumbs.html.erb +1 -1
  126. data/app/views/headmin/_card.html.erb +8 -6
  127. data/app/views/headmin/_dropdown.html.erb +1 -1
  128. data/app/views/headmin/_filters.html.erb +20 -8
  129. data/app/views/headmin/_form.html.erb +14 -14
  130. data/app/views/headmin/_heading.html.erb +1 -1
  131. data/app/views/headmin/_notifications.html.erb +1 -1
  132. data/app/views/headmin/_pagination.html.erb +1 -1
  133. data/app/views/headmin/_popup.html.erb +10 -4
  134. data/app/views/headmin/_table.html.erb +2 -2
  135. data/app/views/headmin/_thumbnail.html.erb +47 -0
  136. data/app/views/headmin/dropdown/_devise.html.erb +2 -2
  137. data/app/views/headmin/dropdown/_list.html.erb +3 -6
  138. data/app/views/headmin/filters/_date.html.erb +4 -10
  139. data/app/views/headmin/filters/_flatpickr.html.erb +5 -5
  140. data/app/views/headmin/filters/_search.html.erb +5 -5
  141. data/app/views/headmin/filters/_select.html.erb +6 -6
  142. data/app/views/headmin/filters/filter/_button.html.erb +7 -7
  143. data/app/views/headmin/filters/filter/_template.html.erb +1 -1
  144. data/app/views/headmin/forms/_actions.html.erb +1 -1
  145. data/app/views/headmin/forms/_base.html.erb +98 -45
  146. data/app/views/headmin/forms/_blocks.html.erb +4 -4
  147. data/app/views/headmin/forms/_checkbox.html.erb +3 -3
  148. data/app/views/headmin/forms/_date.html.erb +29 -45
  149. data/app/views/headmin/forms/_date_range.html.erb +24 -66
  150. data/app/views/headmin/forms/_email.html.erb +35 -26
  151. data/app/views/headmin/forms/_file.html.erb +186 -34
  152. data/app/views/headmin/forms/_flatpickr.html.erb +18 -39
  153. data/app/views/headmin/forms/_flatpickr_range.html.erb +34 -45
  154. data/app/views/headmin/forms/_hidden.html.erb +13 -12
  155. data/app/views/headmin/forms/_image.html.erb +11 -45
  156. data/app/views/headmin/forms/_label.html.erb +18 -14
  157. data/app/views/headmin/forms/_number.html.erb +40 -37
  158. data/app/views/headmin/forms/_password.html.erb +37 -58
  159. data/app/views/headmin/forms/_redactorx.html.erb +8 -7
  160. data/app/views/headmin/forms/_repeater.html.erb +6 -6
  161. data/app/views/headmin/forms/_select.html.erb +43 -48
  162. data/app/views/headmin/forms/_text.html.erb +95 -58
  163. data/app/views/headmin/forms/_textarea.html.erb +37 -26
  164. data/app/views/headmin/forms/_url.html.erb +35 -26
  165. data/app/views/headmin/forms/_validation.html.erb +3 -3
  166. data/app/views/headmin/forms/_video.html.erb +21 -0
  167. data/app/views/headmin/forms/fields/_base.html.erb +3 -3
  168. data/app/views/headmin/forms/fields/_file.html.erb +2 -2
  169. data/app/views/headmin/forms/fields/_group.html.erb +3 -3
  170. data/app/views/headmin/forms/fields/_image.html.erb +2 -2
  171. data/app/views/headmin/forms/fields/_list.html.erb +3 -3
  172. data/app/views/headmin/forms/fields/_text.html.erb +2 -2
  173. data/app/views/headmin/forms/repeater/_row.html.erb +1 -1
  174. data/app/views/headmin/heading/_title.html.erb +1 -1
  175. data/app/views/headmin/layout/_body.html.erb +1 -1
  176. data/app/views/headmin/layout/_content.html.erb +1 -1
  177. data/app/views/headmin/layout/_footer.html.erb +1 -1
  178. data/app/views/headmin/layout/_header.html.erb +1 -1
  179. data/app/views/headmin/layout/_main.html.erb +1 -1
  180. data/app/views/headmin/layout/_sidebar.html.erb +3 -3
  181. data/app/views/headmin/layout/sidebar/_bottom.html.erb +1 -1
  182. data/app/views/headmin/layout/sidebar/_nav.html.erb +1 -1
  183. data/app/views/headmin/nav/_dropdown.html.erb +34 -0
  184. data/app/views/headmin/nav/_item.html.erb +22 -13
  185. data/app/views/headmin/table/_actions.html.erb +1 -1
  186. data/app/views/headmin/table/_body.html.erb +1 -1
  187. data/app/views/headmin/table/_foot.html.erb +1 -1
  188. data/app/views/headmin/table/_footer.html.erb +1 -1
  189. data/app/views/headmin/table/_head.html.erb +1 -1
  190. data/app/views/headmin/table/_header.html.erb +1 -1
  191. data/app/views/headmin/table/actions/_action.html.erb +4 -4
  192. data/app/views/headmin/table/actions/_delete.html.erb +1 -1
  193. data/app/views/headmin/table/actions/_export.html.erb +1 -1
  194. data/app/views/headmin/table/body/_row.html.erb +2 -2
  195. data/config/importmap.rb +2 -0
  196. data/config/locales/en.yml +0 -3
  197. data/config/locales/headmin/forms/en.yml +5 -0
  198. data/config/locales/headmin/forms/nl.yml +5 -0
  199. data/config/locales/headmin/popup/en.yml +4 -0
  200. data/config/locales/headmin/popup/nl.yml +4 -0
  201. data/config/locales/headmin/thumbnail/en.yml +4 -0
  202. data/config/locales/headmin/thumbnail/nl.yml +4 -0
  203. data/config/locales/nl.yml +0 -3
  204. data/esbuild-css.js +25 -0
  205. data/esbuild-js.js +11 -0
  206. data/headmin.gemspec +4 -1
  207. data/lib/headmin/engine.rb +15 -0
  208. data/lib/headmin/version.rb +1 -1
  209. data/lib/headmin.rb +1 -1
  210. data/package.json +18 -34
  211. data/src/js/headmin.js +1 -1
  212. data/src/scss/headmin.scss +1 -61
  213. data/yarn.lock +393 -5177
  214. metadata +183 -33
  215. data/.nvmrc +0 -1
  216. data/app/controllers/concerns/headmin/ckeditor.rb +0 -27
  217. data/app/views/headmin/forms/_ckeditor.html.erb +0 -42
  218. data/dist/css/headmin.css +0 -12357
  219. data/dist/js/headmin.js +0 -1115
  220. data/src/js/headmin/headmin.js +0 -158
  221. data/src/scss/headmin/utilities.scss +0 -19
  222. data/webpack.config.js +0 -30
  223. /data/{src/js → app/assets/javascripts}/headmin/controllers/filters_controller.js +0 -0
  224. /data/{src/js → app/assets/javascripts}/headmin/controllers/repeater_controller.js +0 -0
  225. /data/{src/js → app/assets/javascripts}/headmin/controllers/table_actions_controller.js +0 -0
  226. /data/{src/scss → app/assets/stylesheets}/headmin/filter.scss +0 -0
  227. /data/{src/scss → app/assets/stylesheets}/headmin/filters.scss +0 -0
  228. /data/{src/scss → app/assets/stylesheets}/headmin/general.scss +0 -0
  229. /data/{src/scss → app/assets/stylesheets}/headmin/layout/body.scss +0 -0
  230. /data/{src/scss → app/assets/stylesheets}/headmin/layout/sidebar.scss +0 -0
  231. /data/{src/scss → app/assets/stylesheets}/headmin/layout.scss +0 -0
  232. /data/{src/scss → app/assets/stylesheets}/headmin/login.scss +0 -0
  233. /data/{src/scss/vendor/bootstrap/variables.scss → app/assets/stylesheets/headmin/overrides/bootstrap.scss} +0 -0
  234. /data/{src/scss/vendor/redactorx/override.css → app/assets/stylesheets/headmin/overrides/redactorx.css} +0 -0
  235. /data/{src/scss → app/assets/stylesheets}/headmin/popup.scss +0 -0
  236. /data/{src/scss → app/assets/stylesheets}/headmin/table.scss +0 -0
  237. /data/{src/scss/vendor/redactorx → app/assets/stylesheets/headmin/vendor}/redactorx.css +0 -0
@@ -0,0 +1,40 @@
1
+ // transparent background and border properties included for button version.
2
+ // iOS requires the button element instead of an anchor tag.
3
+ // If you want the anchor version, it requires `href="#"`.
4
+ // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
5
+
6
+ .btn-close {
7
+ box-sizing: content-box;
8
+ width: $btn-close-width;
9
+ height: $btn-close-height;
10
+ padding: $btn-close-padding-y $btn-close-padding-x;
11
+ color: $btn-close-color;
12
+ background: transparent escape-svg($btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
13
+ border: 0; // for button elements
14
+ @include border-radius();
15
+ opacity: $btn-close-opacity;
16
+
17
+ // Override <a>'s hover style
18
+ &:hover {
19
+ color: $btn-close-color;
20
+ text-decoration: none;
21
+ opacity: $btn-close-hover-opacity;
22
+ }
23
+
24
+ &:focus {
25
+ outline: 0;
26
+ box-shadow: $btn-close-focus-shadow;
27
+ opacity: $btn-close-focus-opacity;
28
+ }
29
+
30
+ &:disabled,
31
+ &.disabled {
32
+ pointer-events: none;
33
+ user-select: none;
34
+ opacity: $btn-close-disabled-opacity;
35
+ }
36
+ }
37
+
38
+ .btn-close-white {
39
+ filter: $btn-close-white-filter;
40
+ }
@@ -0,0 +1,41 @@
1
+ // Container widths
2
+ //
3
+ // Set the container width, and override it for fixed navbars in media queries.
4
+
5
+ @if $enable-grid-classes {
6
+ // Single container class with breakpoint max-widths
7
+ .container,
8
+ // 100% wide container at all breakpoints
9
+ .container-fluid {
10
+ @include make-container();
11
+ }
12
+
13
+ // Responsive containers that are 100% wide until a breakpoint
14
+ @each $breakpoint, $container-max-width in $container-max-widths {
15
+ .container-#{$breakpoint} {
16
+ @extend .container-fluid;
17
+ }
18
+
19
+ @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
20
+ %responsive-container-#{$breakpoint} {
21
+ max-width: $container-max-width;
22
+ }
23
+
24
+ // Extend each breakpoint which is smaller or equal to the current breakpoint
25
+ $extend-breakpoint: true;
26
+
27
+ @each $name, $width in $grid-breakpoints {
28
+ @if ($extend-breakpoint) {
29
+ .container#{breakpoint-infix($name, $grid-breakpoints)} {
30
+ @extend %responsive-container-#{$breakpoint};
31
+ }
32
+
33
+ // Once the current breakpoint is reached, stop extending
34
+ @if ($breakpoint == $name) {
35
+ $extend-breakpoint: false;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,240 @@
1
+ // The dropdown wrapper (`<div>`)
2
+ .dropup,
3
+ .dropend,
4
+ .dropdown,
5
+ .dropstart {
6
+ position: relative;
7
+ }
8
+
9
+ .dropdown-toggle {
10
+ white-space: nowrap;
11
+
12
+ // Generate the caret automatically
13
+ @include caret();
14
+ }
15
+
16
+ // The dropdown menu
17
+ .dropdown-menu {
18
+ position: absolute;
19
+ z-index: $zindex-dropdown;
20
+ display: none; // none by default, but block on "open" of the menu
21
+ min-width: $dropdown-min-width;
22
+ padding: $dropdown-padding-y $dropdown-padding-x;
23
+ margin: 0; // Override default margin of ul
24
+ @include font-size($dropdown-font-size);
25
+ color: $dropdown-color;
26
+ text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
27
+ list-style: none;
28
+ background-color: $dropdown-bg;
29
+ background-clip: padding-box;
30
+ border: $dropdown-border-width solid $dropdown-border-color;
31
+ @include border-radius($dropdown-border-radius);
32
+ @include box-shadow($dropdown-box-shadow);
33
+
34
+ &[data-bs-popper] {
35
+ top: 100%;
36
+ left: 0;
37
+ margin-top: $dropdown-spacer;
38
+ }
39
+ }
40
+
41
+ // scss-docs-start responsive-breakpoints
42
+ // We deliberately hardcode the `bs-` prefix because we check
43
+ // this custom property in JS to determine Popper's positioning
44
+
45
+ @each $breakpoint in map-keys($grid-breakpoints) {
46
+ @include media-breakpoint-up($breakpoint) {
47
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
48
+
49
+ .dropdown-menu#{$infix}-start {
50
+ --bs-position: start;
51
+
52
+ &[data-bs-popper] {
53
+ right: auto;
54
+ left: 0;
55
+ }
56
+ }
57
+
58
+ .dropdown-menu#{$infix}-end {
59
+ --bs-position: end;
60
+
61
+ &[data-bs-popper] {
62
+ right: 0;
63
+ left: auto;
64
+ }
65
+ }
66
+ }
67
+ }
68
+ // scss-docs-end responsive-breakpoints
69
+
70
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
71
+ // Just add .dropup after the standard .dropdown class and you're set.
72
+ .dropup {
73
+ .dropdown-menu[data-bs-popper] {
74
+ top: auto;
75
+ bottom: 100%;
76
+ margin-top: 0;
77
+ margin-bottom: $dropdown-spacer;
78
+ }
79
+
80
+ .dropdown-toggle {
81
+ @include caret(up);
82
+ }
83
+ }
84
+
85
+ .dropend {
86
+ .dropdown-menu[data-bs-popper] {
87
+ top: 0;
88
+ right: auto;
89
+ left: 100%;
90
+ margin-top: 0;
91
+ margin-left: $dropdown-spacer;
92
+ }
93
+
94
+ .dropdown-toggle {
95
+ @include caret(end);
96
+ &::after {
97
+ vertical-align: 0;
98
+ }
99
+ }
100
+ }
101
+
102
+ .dropstart {
103
+ .dropdown-menu[data-bs-popper] {
104
+ top: 0;
105
+ right: 100%;
106
+ left: auto;
107
+ margin-top: 0;
108
+ margin-right: $dropdown-spacer;
109
+ }
110
+
111
+ .dropdown-toggle {
112
+ @include caret(start);
113
+ &::before {
114
+ vertical-align: 0;
115
+ }
116
+ }
117
+ }
118
+
119
+
120
+ // Dividers (basically an `<hr>`) within the dropdown
121
+ .dropdown-divider {
122
+ height: 0;
123
+ margin: $dropdown-divider-margin-y 0;
124
+ overflow: hidden;
125
+ border-top: 1px solid $dropdown-divider-bg;
126
+ }
127
+
128
+ // Links, buttons, and more within the dropdown menu
129
+ //
130
+ // `<button>`-specific styles are denoted with `// For <button>s`
131
+ .dropdown-item {
132
+ display: block;
133
+ width: 100%; // For `<button>`s
134
+ padding: $dropdown-item-padding-y $dropdown-item-padding-x;
135
+ clear: both;
136
+ font-weight: $font-weight-normal;
137
+ color: $dropdown-link-color;
138
+ text-align: inherit; // For `<button>`s
139
+ text-decoration: if($link-decoration == none, null, none);
140
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
141
+ background-color: transparent; // For `<button>`s
142
+ border: 0; // For `<button>`s
143
+
144
+ // Prevent dropdown overflow if there's no padding
145
+ // See https://github.com/twbs/bootstrap/pull/27703
146
+ @if $dropdown-padding-y == 0 {
147
+ &:first-child {
148
+ @include border-top-radius($dropdown-inner-border-radius);
149
+ }
150
+
151
+ &:last-child {
152
+ @include border-bottom-radius($dropdown-inner-border-radius);
153
+ }
154
+ }
155
+
156
+ &:hover,
157
+ &:focus {
158
+ color: $dropdown-link-hover-color;
159
+ text-decoration: if($link-hover-decoration == underline, none, null);
160
+ @include gradient-bg($dropdown-link-hover-bg);
161
+ }
162
+
163
+ &.active,
164
+ &:active {
165
+ color: $dropdown-link-active-color;
166
+ text-decoration: none;
167
+ @include gradient-bg($dropdown-link-active-bg);
168
+ }
169
+
170
+ &.disabled,
171
+ &:disabled {
172
+ color: $dropdown-link-disabled-color;
173
+ pointer-events: none;
174
+ background-color: transparent;
175
+ // Remove CSS gradients if they're enabled
176
+ background-image: if($enable-gradients, none, null);
177
+ }
178
+ }
179
+
180
+ .dropdown-menu.show {
181
+ display: block;
182
+ }
183
+
184
+ // Dropdown section headers
185
+ .dropdown-header {
186
+ display: block;
187
+ padding: $dropdown-header-padding;
188
+ margin-bottom: 0; // for use with heading elements
189
+ @include font-size($font-size-sm);
190
+ color: $dropdown-header-color;
191
+ white-space: nowrap; // as with > li > a
192
+ }
193
+
194
+ // Dropdown text
195
+ .dropdown-item-text {
196
+ display: block;
197
+ padding: $dropdown-item-padding-y $dropdown-item-padding-x;
198
+ color: $dropdown-link-color;
199
+ }
200
+
201
+ // Dark dropdowns
202
+ .dropdown-menu-dark {
203
+ color: $dropdown-dark-color;
204
+ background-color: $dropdown-dark-bg;
205
+ border-color: $dropdown-dark-border-color;
206
+ @include box-shadow($dropdown-dark-box-shadow);
207
+
208
+ .dropdown-item {
209
+ color: $dropdown-dark-link-color;
210
+
211
+ &:hover,
212
+ &:focus {
213
+ color: $dropdown-dark-link-hover-color;
214
+ @include gradient-bg($dropdown-dark-link-hover-bg);
215
+ }
216
+
217
+ &.active,
218
+ &:active {
219
+ color: $dropdown-dark-link-active-color;
220
+ @include gradient-bg($dropdown-dark-link-active-bg);
221
+ }
222
+
223
+ &.disabled,
224
+ &:disabled {
225
+ color: $dropdown-dark-link-disabled-color;
226
+ }
227
+ }
228
+
229
+ .dropdown-divider {
230
+ border-color: $dropdown-dark-divider-bg;
231
+ }
232
+
233
+ .dropdown-item-text {
234
+ color: $dropdown-dark-link-color;
235
+ }
236
+
237
+ .dropdown-header {
238
+ color: $dropdown-dark-header-color;
239
+ }
240
+ }
@@ -0,0 +1,9 @@
1
+ @import "forms/labels";
2
+ @import "forms/form-text";
3
+ @import "forms/form-control";
4
+ @import "forms/form-select";
5
+ @import "forms/form-check";
6
+ @import "forms/form-range";
7
+ @import "forms/floating-labels";
8
+ @import "forms/input-group";
9
+ @import "forms/validation";
@@ -0,0 +1,302 @@
1
+ // Bootstrap functions
2
+ //
3
+ // Utility mixins and functions for evaluating source code across our variables, maps, and mixins.
4
+
5
+ // Ascending
6
+ // Used to evaluate Sass maps like our grid breakpoints.
7
+ @mixin _assert-ascending($map, $map-name) {
8
+ $prev-key: null;
9
+ $prev-num: null;
10
+ @each $key, $num in $map {
11
+ @if $prev-num == null or unit($num) == "%" or unit($prev-num) == "%" {
12
+ // Do nothing
13
+ } @else if not comparable($prev-num, $num) {
14
+ @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
15
+ } @else if $prev-num >= $num {
16
+ @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
17
+ }
18
+ $prev-key: $key;
19
+ $prev-num: $num;
20
+ }
21
+ }
22
+
23
+ // Starts at zero
24
+ // Used to ensure the min-width of the lowest breakpoint starts at 0.
25
+ @mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
26
+ @if length($map) > 0 {
27
+ $values: map-values($map);
28
+ $first-value: nth($values, 1);
29
+ @if $first-value != 0 {
30
+ @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
31
+ }
32
+ }
33
+ }
34
+
35
+ // Colors
36
+ @function to-rgb($value) {
37
+ @return red($value), green($value), blue($value);
38
+ }
39
+
40
+ // stylelint-disable scss/dollar-variable-pattern
41
+ @function rgba-css-var($identifier, $target) {
42
+ @if $identifier == "body" and $target == "bg" {
43
+ @return rgba(var(--#{$variable-prefix}#{$identifier}-bg-rgb), var(--#{$variable-prefix}#{$target}-opacity));
44
+ } @if $identifier == "body" and $target == "text" {
45
+ @return rgba(var(--#{$variable-prefix}#{$identifier}-color-rgb), var(--#{$variable-prefix}#{$target}-opacity));
46
+ } @else {
47
+ @return rgba(var(--#{$variable-prefix}#{$identifier}-rgb), var(--#{$variable-prefix}#{$target}-opacity));
48
+ }
49
+ }
50
+
51
+ @function map-loop($map, $func, $args...) {
52
+ $_map: ();
53
+
54
+ @each $key, $value in $map {
55
+ // allow to pass the $key and $value of the map as an function argument
56
+ $_args: ();
57
+ @each $arg in $args {
58
+ $_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg)));
59
+ }
60
+
61
+ $_map: map-merge($_map, ($key: call(get-function($func), $_args...)));
62
+ }
63
+
64
+ @return $_map;
65
+ }
66
+ // stylelint-enable scss/dollar-variable-pattern
67
+
68
+ @function varify($list) {
69
+ $result: null;
70
+ @each $entry in $list {
71
+ $result: append($result, var(--#{$variable-prefix}#{$entry}), space);
72
+ }
73
+ @return $result;
74
+ }
75
+
76
+ // Internal Bootstrap function to turn maps into its negative variant.
77
+ // It prefixes the keys with `n` and makes the value negative.
78
+ @function negativify-map($map) {
79
+ $result: ();
80
+ @each $key, $value in $map {
81
+ @if $key != 0 {
82
+ $result: map-merge($result, ("n" + $key: (-$value)));
83
+ }
84
+ }
85
+ @return $result;
86
+ }
87
+
88
+ // Get multiple keys from a sass map
89
+ @function map-get-multiple($map, $values) {
90
+ $result: ();
91
+ @each $key, $value in $map {
92
+ @if (index($values, $key) != null) {
93
+ $result: map-merge($result, ($key: $value));
94
+ }
95
+ }
96
+ @return $result;
97
+ }
98
+
99
+ // Merge multiple maps
100
+ @function map-merge-multiple($maps...) {
101
+ $merged-maps: ();
102
+
103
+ @each $map in $maps {
104
+ $merged-maps: map-merge($merged-maps, $map);
105
+ }
106
+ @return $merged-maps;
107
+ }
108
+
109
+ // Replace `$search` with `$replace` in `$string`
110
+ // Used on our SVG icon backgrounds for custom forms.
111
+ //
112
+ // @author Hugo Giraudel
113
+ // @param {String} $string - Initial string
114
+ // @param {String} $search - Substring to replace
115
+ // @param {String} $replace ('') - New value
116
+ // @return {String} - Updated string
117
+ @function str-replace($string, $search, $replace: "") {
118
+ $index: str-index($string, $search);
119
+
120
+ @if $index {
121
+ @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
122
+ }
123
+
124
+ @return $string;
125
+ }
126
+
127
+ // See https://codepen.io/kevinweber/pen/dXWoRw
128
+ //
129
+ // Requires the use of quotes around data URIs.
130
+
131
+ @function escape-svg($string) {
132
+ @if str-index($string, "data:image/svg+xml") {
133
+ @each $char, $encoded in $escaped-characters {
134
+ // Do not escape the url brackets
135
+ @if str-index($string, "url(") == 1 {
136
+ $string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
137
+ } @else {
138
+ $string: str-replace($string, $char, $encoded);
139
+ }
140
+ }
141
+ }
142
+
143
+ @return $string;
144
+ }
145
+
146
+ // Color contrast
147
+ // See https://github.com/twbs/bootstrap/pull/30168
148
+
149
+ // A list of pre-calculated numbers of pow(divide((divide($value, 255) + .055), 1.055), 2.4). (from 0 to 255)
150
+ // stylelint-disable-next-line scss/dollar-variable-default, scss/dollar-variable-pattern
151
+ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
152
+
153
+ @function color-contrast($background, $color-contrast-dark: $color-contrast-dark, $color-contrast-light: $color-contrast-light, $min-contrast-ratio: $min-contrast-ratio) {
154
+ $foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black;
155
+ $max-ratio: 0;
156
+ $max-ratio-color: null;
157
+
158
+ @each $color in $foregrounds {
159
+ $contrast-ratio: contrast-ratio($background, $color);
160
+ @if $contrast-ratio > $min-contrast-ratio {
161
+ @return $color;
162
+ } @else if $contrast-ratio > $max-ratio {
163
+ $max-ratio: $contrast-ratio;
164
+ $max-ratio-color: $color;
165
+ }
166
+ }
167
+
168
+ @warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}...";
169
+
170
+ @return $max-ratio-color;
171
+ }
172
+
173
+ @function contrast-ratio($background, $foreground: $color-contrast-light) {
174
+ $l1: luminance($background);
175
+ $l2: luminance(opaque($background, $foreground));
176
+
177
+ @return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
178
+ }
179
+
180
+ // Return WCAG2.0 relative luminance
181
+ // See https://www.w3.org/WAI/GL/wiki/Relative_luminance
182
+ // See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
183
+ @function luminance($color) {
184
+ $rgb: (
185
+ "r": red($color),
186
+ "g": green($color),
187
+ "b": blue($color)
188
+ );
189
+
190
+ @each $name, $value in $rgb {
191
+ $value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
192
+ $rgb: map-merge($rgb, ($name: $value));
193
+ }
194
+
195
+ @return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
196
+ }
197
+
198
+ // Return opaque color
199
+ // opaque(#fff, rgba(0, 0, 0, .5)) => #808080
200
+ @function opaque($background, $foreground) {
201
+ @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100);
202
+ }
203
+
204
+ // scss-docs-start color-functions
205
+ // Tint a color: mix a color with white
206
+ @function tint-color($color, $weight) {
207
+ @return mix(white, $color, $weight);
208
+ }
209
+
210
+ // Shade a color: mix a color with black
211
+ @function shade-color($color, $weight) {
212
+ @return mix(black, $color, $weight);
213
+ }
214
+
215
+ // Shade the color if the weight is positive, else tint it
216
+ @function shift-color($color, $weight) {
217
+ @return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
218
+ }
219
+ // scss-docs-end color-functions
220
+
221
+ // Return valid calc
222
+ @function add($value1, $value2, $return-calc: true) {
223
+ @if $value1 == null {
224
+ @return $value2;
225
+ }
226
+
227
+ @if $value2 == null {
228
+ @return $value1;
229
+ }
230
+
231
+ @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
232
+ @return $value1 + $value2;
233
+ }
234
+
235
+ @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
236
+ }
237
+
238
+ @function subtract($value1, $value2, $return-calc: true) {
239
+ @if $value1 == null and $value2 == null {
240
+ @return null;
241
+ }
242
+
243
+ @if $value1 == null {
244
+ @return -$value2;
245
+ }
246
+
247
+ @if $value2 == null {
248
+ @return $value1;
249
+ }
250
+
251
+ @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
252
+ @return $value1 - $value2;
253
+ }
254
+
255
+ @if type-of($value2) != number {
256
+ $value2: unquote("(") + $value2 + unquote(")");
257
+ }
258
+
259
+ @return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
260
+ }
261
+
262
+ @function divide($dividend, $divisor, $precision: 10) {
263
+ $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
264
+ $dividend: abs($dividend);
265
+ $divisor: abs($divisor);
266
+ @if $dividend == 0 {
267
+ @return 0;
268
+ }
269
+ @if $divisor == 0 {
270
+ @error "Cannot divide by 0";
271
+ }
272
+ $remainder: $dividend;
273
+ $result: 0;
274
+ $factor: 10;
275
+ @while ($remainder > 0 and $precision >= 0) {
276
+ $quotient: 0;
277
+ @while ($remainder >= $divisor) {
278
+ $remainder: $remainder - $divisor;
279
+ $quotient: $quotient + 1;
280
+ }
281
+ $result: $result * 10 + $quotient;
282
+ $factor: $factor * .1;
283
+ $remainder: $remainder * 10;
284
+ $precision: $precision - 1;
285
+ @if ($precision < 0 and $remainder >= $divisor * 5) {
286
+ $result: $result + 1;
287
+ }
288
+ }
289
+ $result: $result * $factor * $sign;
290
+ $dividend-unit: unit($dividend);
291
+ $divisor-unit: unit($divisor);
292
+ $unit-map: (
293
+ "px": 1px,
294
+ "rem": 1rem,
295
+ "em": 1em,
296
+ "%": 1%
297
+ );
298
+ @if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
299
+ $result: $result * map-get($unit-map, $dividend-unit);
300
+ }
301
+ @return $result;
302
+ }
@@ -0,0 +1,33 @@
1
+ // Row
2
+ //
3
+ // Rows contain your columns.
4
+
5
+ @if $enable-grid-classes {
6
+ .row {
7
+ @include make-row();
8
+
9
+ > * {
10
+ @include make-col-ready();
11
+ }
12
+ }
13
+ }
14
+
15
+ @if $enable-cssgrid {
16
+ .grid {
17
+ display: grid;
18
+ grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);
19
+ grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);
20
+ gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});
21
+
22
+ @include make-cssgrid();
23
+ }
24
+ }
25
+
26
+
27
+ // Columns
28
+ //
29
+ // Common styles for small and large grid columns
30
+
31
+ @if $enable-grid-classes {
32
+ @include make-grid-columns();
33
+ }
@@ -0,0 +1,9 @@
1
+ @import "helpers/clearfix";
2
+ @import "helpers/colored-links";
3
+ @import "helpers/ratio";
4
+ @import "helpers/position";
5
+ @import "helpers/stacks";
6
+ @import "helpers/visually-hidden";
7
+ @import "helpers/stretched-link";
8
+ @import "helpers/text-truncation";
9
+ @import "helpers/vr";