administrate-bootstrap-theme 0.1.9 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +72 -31
  3. data/app/assets/javascripts/administrate-bootstrap-theme/bootstrap.bundle.js +6780 -0
  4. data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +2 -10
  5. data/app/assets/stylesheets/administrate-bootstrap-theme/_variables.scss +8 -1
  6. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_accordion.scss +4 -2
  7. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_alert.scss +0 -0
  8. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_badge.scss +0 -0
  9. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_breadcrumb.scss +0 -0
  10. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_button-group.scss +0 -0
  11. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_buttons.scss +0 -0
  12. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_card.scss +7 -6
  13. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_carousel.scss +2 -2
  14. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_close.scss +0 -0
  15. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_containers.scss +0 -0
  16. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_dropdown.scss +11 -17
  17. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_forms.scss +0 -0
  18. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_functions.scss +94 -3
  19. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_grid.scss +33 -0
  20. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_helpers.scss +2 -0
  21. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_images.scss +1 -1
  22. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_list-group.scss +5 -5
  23. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_mixins.scss +2 -0
  24. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_modal.scss +7 -35
  25. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_nav.scss +0 -0
  26. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_navbar.scss +30 -1
  27. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_offcanvas.scss +19 -13
  28. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_pagination.scss +0 -0
  29. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_placeholders.scss +51 -0
  30. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_popover.scss +10 -10
  31. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_progress.scss +0 -0
  32. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_reboot.scss +12 -8
  33. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_root.scss +53 -0
  34. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_spinners.scss +2 -2
  35. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_tables.scss +1 -0
  36. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_toasts.scss +3 -3
  37. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_tooltip.scss +4 -4
  38. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_transitions.scss +6 -0
  39. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_type.scss +0 -0
  40. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_utilities.scss +44 -8
  41. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_variables.scss +193 -28
  42. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/bootstrap-grid.scss +1 -1
  43. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/bootstrap-reboot.scss +1 -1
  44. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/bootstrap-utilities.scss +1 -1
  45. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/bootstrap.scss +2 -1
  46. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_floating-labels.scss +3 -1
  47. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-check.scss +1 -1
  48. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-control.scss +1 -1
  49. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-range.scss +1 -1
  50. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-select.scss +3 -0
  51. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-text.scss +0 -0
  52. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_input-group.scss +0 -0
  53. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_labels.scss +0 -0
  54. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_validation.scss +0 -0
  55. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_clearfix.scss +0 -0
  56. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_colored-links.scss +0 -0
  57. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_position.scss +0 -0
  58. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_ratio.scss +0 -0
  59. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_stacks.scss +15 -0
  60. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_stretched-link.scss +0 -0
  61. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_text-truncation.scss +0 -0
  62. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_visually-hidden.scss +0 -0
  63. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_vr.scss +8 -0
  64. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_alert.scss +0 -0
  65. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_backdrop.scss +14 -0
  66. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_border-radius.scss +0 -0
  67. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_box-shadow.scss +0 -0
  68. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_breakpoints.scss +0 -0
  69. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_buttons.scss +1 -1
  70. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_caret.scss +0 -0
  71. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_clearfix.scss +0 -0
  72. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_color-scheme.scss +7 -0
  73. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_container.scss +0 -0
  74. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_deprecate.scss +0 -0
  75. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_forms.scss +15 -5
  76. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_gradients.scss +0 -0
  77. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_grid.scss +40 -10
  78. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_image.scss +0 -0
  79. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_list-group.scss +0 -0
  80. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_lists.scss +0 -0
  81. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_pagination.scss +0 -0
  82. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_reset-text.scss +0 -0
  83. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_resize.scss +0 -0
  84. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_table-variants.scss +0 -0
  85. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_text-truncate.scss +0 -0
  86. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_transition.scss +0 -0
  87. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_utilities.scss +27 -6
  88. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_visually-hidden.scss +0 -0
  89. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/utilities/_api.scss +0 -0
  90. data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/vendor/_rfs.scss +55 -13
  91. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_autumn.scss +8 -0
  92. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_default.scss +8 -0
  93. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_forest.scss +9 -0
  94. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_industrial.scss +8 -0
  95. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_water.scss +8 -0
  96. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss +21 -1
  97. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_header.scss +1 -1
  98. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss +2 -0
  99. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_navigation.scss +22 -3
  100. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_pagination.scss +1 -1
  101. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_lato.scss +5 -0
  102. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_montserrat.scss +5 -0
  103. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_open_sans.scss +5 -0
  104. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_roboto.scss +5 -0
  105. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_source_sans_pro.scss +5 -0
  106. data/app/assets/stylesheets/administrate-bootstrap-theme/theme.scss +10 -51
  107. data/lib/administrate-bootstrap-theme/engine.rb +0 -2
  108. data/lib/administrate-bootstrap-theme/version.rb +2 -1
  109. data/lib/generators/administrate_bootstrap_theme/install/USAGE +10 -0
  110. data/lib/generators/administrate_bootstrap_theme/install/install_generator.rb +33 -0
  111. data/package.json +10 -0
  112. metadata +123 -111
  113. data/Rakefile +0 -16
  114. data/app/assets/javascripts/administrate-bootstrap-theme/theme.js +0 -2
  115. data/node_modules/bootstrap/js/src/alert.js +0 -141
  116. data/node_modules/bootstrap/js/src/base-component.js +0 -46
  117. data/node_modules/bootstrap/js/src/button.js +0 -95
  118. data/node_modules/bootstrap/js/src/carousel.js +0 -624
  119. data/node_modules/bootstrap/js/src/collapse.js +0 -410
  120. data/node_modules/bootstrap/js/src/dom/data.js +0 -57
  121. data/node_modules/bootstrap/js/src/dom/event-handler.js +0 -331
  122. data/node_modules/bootstrap/js/src/dom/manipulator.js +0 -80
  123. data/node_modules/bootstrap/js/src/dom/selector-engine.js +0 -75
  124. data/node_modules/bootstrap/js/src/dropdown.js +0 -543
  125. data/node_modules/bootstrap/js/src/modal.js +0 -582
  126. data/node_modules/bootstrap/js/src/offcanvas.js +0 -279
  127. data/node_modules/bootstrap/js/src/popover.js +0 -171
  128. data/node_modules/bootstrap/js/src/scrollspy.js +0 -319
  129. data/node_modules/bootstrap/js/src/tab.js +0 -220
  130. data/node_modules/bootstrap/js/src/toast.js +0 -219
  131. data/node_modules/bootstrap/js/src/tooltip.js +0 -802
  132. data/node_modules/bootstrap/js/src/util/index.js +0 -253
  133. data/node_modules/bootstrap/js/src/util/sanitizer.js +0 -127
  134. data/node_modules/bootstrap/js/src/util/scrollbar.js +0 -70
  135. data/node_modules/bootstrap/scss/_grid.scss +0 -22
  136. data/node_modules/bootstrap/scss/_root.scss +0 -16
@@ -88,10 +88,13 @@
88
88
  border-color: $color;
89
89
 
90
90
  @if $enable-validation-icons {
91
- padding-right: $form-select-feedback-icon-padding-end;
92
- background-image: escape-svg($form-select-indicator), escape-svg($icon);
93
- background-position: $form-select-bg-position, $form-select-feedback-icon-position;
94
- background-size: $form-select-bg-size, $form-select-feedback-icon-size;
91
+ &:not([multiple]):not([size]),
92
+ &:not([multiple])[size="1"] {
93
+ padding-right: $form-select-feedback-icon-padding-end;
94
+ background-image: escape-svg($form-select-indicator), escape-svg($icon);
95
+ background-position: $form-select-bg-position, $form-select-feedback-icon-position;
96
+ background-size: $form-select-bg-size, $form-select-feedback-icon-size;
97
+ }
95
98
  }
96
99
 
97
100
  &:focus {
@@ -127,7 +130,14 @@
127
130
  .input-group .form-control,
128
131
  .input-group .form-select {
129
132
  @include form-validation-state-selector($state) {
130
- z-index: 3;
133
+ @if $state == "valid" {
134
+ z-index: 1;
135
+ } @else if $state == "invalid" {
136
+ z-index: 2;
137
+ }
138
+ &:focus {
139
+ z-index: 3;
140
+ }
131
141
  }
132
142
  }
133
143
  }
@@ -1,4 +1,4 @@
1
- /// Grid system
1
+ // Grid system
2
2
  //
3
3
  // Generate semantic grid columns with these mixins.
4
4
 
@@ -8,8 +8,8 @@
8
8
  display: flex;
9
9
  flex-wrap: wrap;
10
10
  margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list
11
- margin-right: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list
12
- margin-left: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list
11
+ margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list
12
+ margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list
13
13
  }
14
14
 
15
15
  @mixin make-col-ready($gutter: $grid-gutter-width) {
@@ -21,14 +21,20 @@
21
21
  flex-shrink: 0;
22
22
  width: 100%;
23
23
  max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
24
- padding-right: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list
25
- padding-left: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list
24
+ padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
25
+ padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
26
26
  margin-top: var(--#{$variable-prefix}gutter-y);
27
27
  }
28
28
 
29
- @mixin make-col($size, $columns: $grid-columns) {
30
- flex: 0 0 auto;
31
- width: percentage($size / $columns);
29
+ @mixin make-col($size: false, $columns: $grid-columns) {
30
+ @if $size {
31
+ flex: 0 0 auto;
32
+ width: percentage(divide($size, $columns));
33
+
34
+ } @else {
35
+ flex: 1 1 0;
36
+ max-width: 100%;
37
+ }
32
38
  }
33
39
 
34
40
  @mixin make-col-auto() {
@@ -37,7 +43,7 @@
37
43
  }
38
44
 
39
45
  @mixin make-col-offset($size, $columns: $grid-columns) {
40
- $num: $size / $columns;
46
+ $num: divide($size, $columns);
41
47
  margin-left: if($num == 0, 0, percentage($num));
42
48
  }
43
49
 
@@ -49,7 +55,7 @@
49
55
  @mixin row-cols($count) {
50
56
  > * {
51
57
  flex: 0 0 auto;
52
- width: 100% / $count;
58
+ width: divide(100%, $count);
53
59
  }
54
60
  }
55
61
 
@@ -118,3 +124,27 @@
118
124
  }
119
125
  }
120
126
  }
127
+
128
+ @mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {
129
+ @each $breakpoint in map-keys($breakpoints) {
130
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
131
+
132
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
133
+ @if $columns > 0 {
134
+ @for $i from 1 through $columns {
135
+ .g-col#{$infix}-#{$i} {
136
+ grid-column: auto / span $i;
137
+ }
138
+ }
139
+
140
+ // Start with `1` because `0` is and invalid value.
141
+ // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
142
+ @for $i from 1 through ($columns - 1) {
143
+ .g-start#{$infix}-#{$i} {
144
+ grid-column-start: $i;
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
@@ -41,25 +41,46 @@
41
41
  }
42
42
  }
43
43
 
44
+ $is-css-var: map-get($utility, css-var);
45
+ $is-local-vars: map-get($utility, local-vars);
44
46
  $is-rtl: map-get($utility, rtl);
45
47
 
46
48
  @if $value != null {
47
49
  @if $is-rtl == false {
48
50
  /* rtl:begin:remove */
49
51
  }
50
- .#{$property-class + $infix + $property-class-modifier} {
51
- @each $property in $properties {
52
- #{$property}: $value if($enable-important-utilities, !important, null);
52
+
53
+ @if $is-css-var {
54
+ .#{$property-class + $infix + $property-class-modifier} {
55
+ --#{$variable-prefix}#{$property-class}: #{$value};
53
56
  }
54
- }
55
57
 
56
- @each $pseudo in $state {
57
- .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
58
+ @each $pseudo in $state {
59
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
60
+ --#{$variable-prefix}#{$property-class}: #{$value};
61
+ }
62
+ }
63
+ } @else {
64
+ .#{$property-class + $infix + $property-class-modifier} {
58
65
  @each $property in $properties {
66
+ @if $is-local-vars {
67
+ @each $local-var, $value in $is-local-vars {
68
+ --#{$variable-prefix}#{$local-var}: #{$value};
69
+ }
70
+ }
59
71
  #{$property}: $value if($enable-important-utilities, !important, null);
60
72
  }
61
73
  }
74
+
75
+ @each $pseudo in $state {
76
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
77
+ @each $property in $properties {
78
+ #{$property}: $value if($enable-important-utilities, !important, null);
79
+ }
80
+ }
81
+ }
62
82
  }
83
+
63
84
  @if $is-rtl == false {
64
85
  /* rtl:end:remove */
65
86
  }
@@ -4,7 +4,7 @@
4
4
  //
5
5
  // Automated responsive values for font sizes, paddings, margins and much more
6
6
  //
7
- // Licensed under MIT (https://github.com/twbs/rfs/blob/master/LICENSE)
7
+ // Licensed under MIT (https://github.com/twbs/rfs/blob/main/LICENSE)
8
8
 
9
9
  // Configuration
10
10
 
@@ -52,12 +52,54 @@ $enable-rfs: true !default;
52
52
  // Cache $rfs-base-value unit
53
53
  $rfs-base-value-unit: unit($rfs-base-value);
54
54
 
55
+ @function divide($dividend, $divisor, $precision: 10) {
56
+ $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
57
+ $dividend: abs($dividend);
58
+ $divisor: abs($divisor);
59
+ @if $dividend == 0 {
60
+ @return 0;
61
+ }
62
+ @if $divisor == 0 {
63
+ @error "Cannot divide by 0";
64
+ }
65
+ $remainder: $dividend;
66
+ $result: 0;
67
+ $factor: 10;
68
+ @while ($remainder > 0 and $precision >= 0) {
69
+ $quotient: 0;
70
+ @while ($remainder >= $divisor) {
71
+ $remainder: $remainder - $divisor;
72
+ $quotient: $quotient + 1;
73
+ }
74
+ $result: $result * 10 + $quotient;
75
+ $factor: $factor * .1;
76
+ $remainder: $remainder * 10;
77
+ $precision: $precision - 1;
78
+ @if ($precision < 0 and $remainder >= $divisor * 5) {
79
+ $result: $result + 1;
80
+ }
81
+ }
82
+ $result: $result * $factor * $sign;
83
+ $dividend-unit: unit($dividend);
84
+ $divisor-unit: unit($divisor);
85
+ $unit-map: (
86
+ "px": 1px,
87
+ "rem": 1rem,
88
+ "em": 1em,
89
+ "%": 1%
90
+ );
91
+ @if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
92
+ $result: $result * map-get($unit-map, $dividend-unit);
93
+ }
94
+ @return $result;
95
+ }
96
+
55
97
  // Remove px-unit from $rfs-base-value for calculations
56
98
  @if $rfs-base-value-unit == px {
57
- $rfs-base-value: $rfs-base-value / ($rfs-base-value * 0 + 1);
99
+ $rfs-base-value: divide($rfs-base-value, $rfs-base-value * 0 + 1);
58
100
  }
59
101
  @else if $rfs-base-value-unit == rem {
60
- $rfs-base-value: $rfs-base-value / ($rfs-base-value * 0 + 1 / $rfs-rem-value);
102
+ $rfs-base-value: divide($rfs-base-value, divide($rfs-base-value * 0 + 1, $rfs-rem-value));
61
103
  }
62
104
 
63
105
  // Cache $rfs-breakpoint unit to prevent multiple calls
@@ -65,14 +107,14 @@ $rfs-breakpoint-unit-cache: unit($rfs-breakpoint);
65
107
 
66
108
  // Remove unit from $rfs-breakpoint for calculations
67
109
  @if $rfs-breakpoint-unit-cache == px {
68
- $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1);
110
+ $rfs-breakpoint: divide($rfs-breakpoint, $rfs-breakpoint * 0 + 1);
69
111
  }
70
112
  @else if $rfs-breakpoint-unit-cache == rem or $rfs-breakpoint-unit-cache == "em" {
71
- $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1 / $rfs-rem-value);
113
+ $rfs-breakpoint: divide($rfs-breakpoint, divide($rfs-breakpoint * 0 + 1, $rfs-rem-value));
72
114
  }
73
115
 
74
116
  // Calculate the media query value
75
- $rfs-mq-value: if($rfs-breakpoint-unit == px, #{$rfs-breakpoint}px, #{$rfs-breakpoint / $rfs-rem-value}#{$rfs-breakpoint-unit});
117
+ $rfs-mq-value: if($rfs-breakpoint-unit == px, #{$rfs-breakpoint}px, #{divide($rfs-breakpoint, $rfs-rem-value)}#{$rfs-breakpoint-unit});
76
118
  $rfs-mq-property-width: if($rfs-mode == max-media-query, max-width, min-width);
77
119
  $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height);
78
120
 
@@ -164,11 +206,11 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
164
206
 
165
207
  @if $unit == px {
166
208
  // Convert to rem if needed
167
- $val: $val + ' ' + if($rfs-unit == rem, #{$value / ($value * 0 + $rfs-rem-value)}rem, $value);
209
+ $val: $val + ' ' + if($rfs-unit == rem, #{divide($value, $value * 0 + $rfs-rem-value)}rem, $value);
168
210
  }
169
211
  @else if $unit == rem {
170
212
  // Convert to px if needed
171
- $val: $val + ' ' + if($rfs-unit == px, #{$value / ($value * 0 + 1) * $rfs-rem-value}px, $value);
213
+ $val: $val + ' ' + if($rfs-unit == px, #{divide($value, $value * 0 + 1) * $rfs-rem-value}px, $value);
172
214
  }
173
215
  @else {
174
216
  // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
@@ -205,21 +247,21 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
205
247
 
206
248
  @else {
207
249
  // Remove unit from $value for calculations
208
- $value: $value / ($value * 0 + if($unit == px, 1, 1 / $rfs-rem-value));
250
+ $value: divide($value, $value * 0 + if($unit == px, 1, divide(1, $rfs-rem-value)));
209
251
 
210
252
  // Only add the media query if the value is greater than the minimum value
211
253
  @if abs($value) <= $rfs-base-value or not $enable-rfs {
212
- $val: $val + ' ' + if($rfs-unit == rem, #{$value / $rfs-rem-value}rem, #{$value}px);
254
+ $val: $val + ' ' + if($rfs-unit == rem, #{divide($value, $rfs-rem-value)}rem, #{$value}px);
213
255
  }
214
256
  @else {
215
257
  // Calculate the minimum value
216
- $value-min: $rfs-base-value + (abs($value) - $rfs-base-value) / $rfs-factor;
258
+ $value-min: $rfs-base-value + divide(abs($value) - $rfs-base-value, $rfs-factor);
217
259
 
218
260
  // Calculate difference between $value and the minimum value
219
261
  $value-diff: abs($value) - $value-min;
220
262
 
221
263
  // Base value formatting
222
- $min-width: if($rfs-unit == rem, #{$value-min / $rfs-rem-value}rem, #{$value-min}px);
264
+ $min-width: if($rfs-unit == rem, #{divide($value-min, $rfs-rem-value)}rem, #{$value-min}px);
223
265
 
224
266
  // Use negative value if needed
225
267
  $min-width: if($value < 0, -$min-width, $min-width);
@@ -228,7 +270,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
228
270
  $variable-unit: if($rfs-two-dimensional, vmin, vw);
229
271
 
230
272
  // Calculate the variable width between 0 and $rfs-breakpoint
231
- $variable-width: #{$value-diff * 100 / $rfs-breakpoint}#{$variable-unit};
273
+ $variable-width: #{divide($value-diff * 100, $rfs-breakpoint)}#{$variable-unit};
232
274
 
233
275
  // Return the calculated value
234
276
  $val: $val + ' calc(' + $min-width + if($value < 0, ' - ', ' + ') + $variable-width + ')';
@@ -0,0 +1,8 @@
1
+ $navigation-bg: #722a00;
2
+ $navigation-bg-active: #d51;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #b87800;
6
+ $secondary: #614107;
7
+ $main-content-bg: #fcfafa;
8
+ $main-content-fg: #302725;
@@ -0,0 +1,8 @@
1
+ $navigation-bg: #055160;
2
+ $navigation-bg-active: #d51;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #0d6ecd;
6
+ $secondary: #075261;
7
+ $main-content-bg: #f4f8fb;
8
+ $main-content-fg: #253029;
@@ -0,0 +1,9 @@
1
+ $navigation-bg: #025514;
2
+ $navigation-bg-active: #37ac02;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #007219;
6
+ $secondary: #566356;
7
+ $danger: #ee6c6c;
8
+ $main-content-bg: #fdfdfd;
9
+ $main-content-fg: #1b3b1e;
@@ -0,0 +1,8 @@
1
+ $navigation-bg: #333;
2
+ $navigation-bg-active: #d51;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #6f6f6f;
6
+ $secondary: #404040;
7
+ $main-content-bg: #fafafa;
8
+ $main-content-fg: #202020;
@@ -0,0 +1,8 @@
1
+ $navigation-bg: #0059b3;
2
+ $navigation-bg-active: #0099ff;
3
+ $navigation-fg: #eee;
4
+
5
+ $primary: #0d6ecd;
6
+ $secondary: #3b3d61;
7
+ $main-content-bg: #f4f8fb;
8
+ $main-content-fg: #222;
@@ -1,6 +1,10 @@
1
1
  .main-content__body {
2
2
  @extend .container-fluid, .mb-3;
3
3
 
4
+ table {
5
+ @extend .table-striped;
6
+ }
7
+
4
8
  > dl {
5
9
  @extend .row;
6
10
 
@@ -23,6 +27,10 @@
23
27
  @extend .table;
24
28
  }
25
29
 
30
+ .attribute-data > table {
31
+ @extend .table-bordered;
32
+ }
33
+
26
34
  .attribute--nested {
27
35
  > div {
28
36
  display: flex;
@@ -46,6 +54,10 @@
46
54
  transform: rotate(180deg);
47
55
  }
48
56
 
57
+ .form-actions > input {
58
+ @extend .btn-primary;
59
+ }
60
+
49
61
  .js-table-row {
50
62
  > td {
51
63
  padding: 0.25rem 0.25rem;
@@ -57,8 +69,16 @@
57
69
  }
58
70
  }
59
71
 
72
+ .action-show {
73
+ @extend .link-secondary;
74
+ }
75
+
60
76
  .action-edit {
61
- @extend .btn, .btn-sm;
77
+ @extend .btn, .btn-sm, .btn-secondary;
78
+ }
79
+
80
+ [data-method="delete"] {
81
+ @extend .btn-danger;
62
82
  }
63
83
 
64
84
  [data-method="delete"] {
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  .button {
31
- @extend .btn, .btn-sm;
31
+ @extend .btn, .btn-sm, .btn-primary;
32
32
  }
33
33
 
34
34
  .search__input {
@@ -18,6 +18,8 @@
18
18
  .field-unit__field {
19
19
  @extend .col-10;
20
20
 
21
+ position: relative;
22
+
21
23
  > input:not([type="checkbox"]) {
22
24
  @extend .form-control;
23
25
  }
@@ -1,17 +1,36 @@
1
1
  nav.navigation {
2
- @extend .nav, .nav-pills, .flex-column, .p-3;
2
+ @extend .nav, .nav-pills, .flex-column, .p-3, .text-white;
3
3
 
4
+ background: $navigation-bg;
4
5
  width: $navigation-width;
5
6
 
6
7
  .button--alt {
7
8
  @extend .btn, .btn-outline-light, .mb-2;
9
+
10
+ color: $navigation-fg;
11
+ }
12
+
13
+ .button--title {
14
+ @extend .btn, .mb-2, .pb-3, .fs-3, .border-bottom, .fw-bold, .text-start;
15
+
16
+ color: $navigation-fg;
17
+
18
+ &:hover {
19
+ color: $navigation-fg;
20
+ }
21
+ }
22
+
23
+ .copy {
24
+ @extend .pt-2, .border-top, .text-center;
8
25
  }
9
26
 
10
27
  .navigation__link {
11
- @extend .nav-link;
28
+ @extend .btn-outline-light, .nav-link;
29
+
30
+ color: $navigation-fg;
12
31
  }
13
32
 
14
33
  .navigation__link--active {
15
- @extend .active;
34
+ background: $navigation-bg-active;
16
35
  }
17
36
  }
@@ -1,5 +1,5 @@
1
1
  nav.pagination {
2
- @extend .justify-content-center, .mb-3;
2
+ @extend .border, .justify-content-center, .mb-3;
3
3
 
4
4
  > span {
5
5
  @extend .nav-link;
@@ -0,0 +1,5 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap');
2
+
3
+ * {
4
+ font-family: 'Lato', sans-serif;
5
+ }
@@ -0,0 +1,5 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,700;1,400&display=swap');
2
+
3
+ * {
4
+ font-family: 'Montserrat', sans-serif;
5
+ }
@@ -0,0 +1,5 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400&display=swap');
2
+
3
+ * {
4
+ font-family: 'Open Sans', sans-serif;
5
+ }
@@ -0,0 +1,5 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;1,400&display=swap');
2
+
3
+ * {
4
+ font-family: 'Roboto', sans-serif;
5
+ }
@@ -0,0 +1,5 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,400;0,700;1,400&display=swap');
2
+
3
+ * {
4
+ font-family: 'Source Sans Pro', sans-serif;
5
+ }
@@ -1,55 +1,14 @@
1
- @import "base";
2
-
3
- nav.navigation {
4
- @extend .text-white, .bg-dark;
5
-
6
- .button--alt {
7
- @extend .btn-outline-light;
8
- }
9
-
10
- .navigation__link {
11
- @extend .btn-outline-light;
12
- }
13
- }
14
-
15
- nav.pagination {
16
- @extend .border;
17
- }
1
+ // from: node_modules/bootstrap/scss
2
+ @import "bootstrap/bootstrap";
18
3
 
19
- .main-content {
20
- @extend .bg-light;
21
- }
4
+ @import "selectize"; // included in Administrate
22
5
 
23
- .main-content__body {
24
- table {
25
- @extend .table-striped;
26
- }
6
+ @import "variables";
27
7
 
28
- .attribute-data > table {
29
- @extend .table-bordered;
30
- }
8
+ @import "components/navigation";
9
+ @import "components/content_header";
10
+ @import "components/content_body";
11
+ @import "components/form";
12
+ @import "components/pagination";
31
13
 
32
- .form-actions > input {
33
- @extend .btn-primary;
34
- }
35
-
36
- .js-table-row {
37
- .action-show {
38
- @extend .link-secondary;
39
- }
40
-
41
- .action-edit {
42
- @extend .btn-secondary;
43
- }
44
-
45
- [data-method="delete"] {
46
- @extend .btn-danger;
47
- }
48
- }
49
- }
50
-
51
- .main-content__header {
52
- .button {
53
- @extend .btn-primary;
54
- }
55
- }
14
+ @import "base";
@@ -3,7 +3,5 @@
3
3
  module AdministrateBootstrapTheme
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace AdministrateBootstrapTheme
6
-
7
- config.assets.paths << File.expand_path('../../node_modules', __dir__)
8
6
  end
9
7
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AdministrateBootstrapTheme
4
- VERSION = '0.1.9'
4
+ VERSION = '1.0.1'
5
+ BOOTSTRAP_VERSION = '5.1.0'
5
6
  end
@@ -0,0 +1,10 @@
1
+ Description:
2
+ AdministrateBootstrapTheme installer
3
+
4
+ Example:
5
+ bin/rails generate administrate_bootstrap_theme:install
6
+
7
+ This will:
8
+ - create a new initializer: administrate_bootstrap_theme
9
+ - create a new SCSS stylesheet: administrate-bootstrap-theme.scss
10
+ - append the necessary assets to: config/initializers/assets.rb