administrate-bootstrap-theme 0.2.0 → 1.0.4

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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +71 -37
  3. data/app/assets/javascripts/administrate-bootstrap-theme/{bootstrap/bootstrap.bundle.js → bootstrap.bundle.js} +1376 -1310
  4. data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +4 -21
  5. data/app/assets/stylesheets/administrate-bootstrap-theme/_variables.scss +4 -0
  6. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_accordion.scss +4 -2
  7. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_card.scss +7 -6
  8. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_carousel.scss +2 -2
  9. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_dropdown.scss +11 -17
  10. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_functions.scss +94 -3
  11. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_grid.scss +11 -0
  12. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_helpers.scss +2 -0
  13. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_images.scss +1 -1
  14. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_list-group.scss +5 -5
  15. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_mixins.scss +2 -0
  16. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_modal.scss +7 -35
  17. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_navbar.scss +30 -1
  18. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_offcanvas.scss +19 -13
  19. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_placeholders.scss +51 -0
  20. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_popover.scss +10 -10
  21. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_reboot.scss +12 -8
  22. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_root.scss +39 -2
  23. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_spinners.scss +2 -2
  24. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tables.scss +1 -0
  25. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_toasts.scss +3 -3
  26. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tooltip.scss +4 -4
  27. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_transitions.scss +6 -0
  28. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_utilities.scss +44 -8
  29. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_variables.scss +193 -28
  30. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-grid.scss +1 -1
  31. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-reboot.scss +1 -1
  32. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-utilities.scss +1 -1
  33. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap.scss +2 -1
  34. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_floating-labels.scss +3 -1
  35. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-check.scss +1 -1
  36. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-control.scss +1 -1
  37. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-range.scss +1 -1
  38. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-select.scss +3 -0
  39. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_stacks.scss +15 -0
  40. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_vr.scss +8 -0
  41. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_backdrop.scss +14 -0
  42. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_buttons.scss +1 -1
  43. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_color-scheme.scss +7 -0
  44. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_forms.scss +15 -5
  45. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_grid.scss +40 -10
  46. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_utilities.scss +27 -6
  47. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/vendor/_rfs.scss +55 -13
  48. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_autumn.scss +8 -0
  49. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_default.scss +8 -0
  50. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_forest.scss +9 -0
  51. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_industrial.scss +8 -0
  52. data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_water.scss +8 -0
  53. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss +28 -10
  54. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_header.scss +4 -6
  55. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss +6 -6
  56. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_navigation.scss +26 -3
  57. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_pagination.scss +1 -1
  58. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_lato.scss +5 -0
  59. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_montserrat.scss +5 -0
  60. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_open_sans.scss +5 -0
  61. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_roboto.scss +5 -0
  62. data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_source_sans_pro.scss +5 -0
  63. data/app/assets/stylesheets/administrate-bootstrap-theme/theme.scss +10 -61
  64. data/lib/administrate-bootstrap-theme/version.rb +2 -1
  65. data/lib/generators/administrate_bootstrap_theme/install/USAGE +10 -0
  66. data/lib/generators/administrate_bootstrap_theme/install/install_generator.rb +33 -0
  67. data/package.json +10 -0
  68. metadata +24 -9
  69. data/Rakefile +0 -16
  70. data/app/assets/javascripts/administrate-bootstrap-theme/flatpickr/flatpickr.js +0 -2673
  71. data/app/assets/javascripts/administrate-bootstrap-theme/theme.js +0 -22
  72. data/app/assets/stylesheets/administrate-bootstrap-theme/flatpickr/flatpickr.css +0 -791
@@ -40,13 +40,13 @@
40
40
 
41
41
  &::before {
42
42
  bottom: 0;
43
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
43
+ border-width: $popover-arrow-height ($popover-arrow-width * .5) 0;
44
44
  border-top-color: $popover-arrow-outer-color;
45
45
  }
46
46
 
47
47
  &::after {
48
48
  bottom: $popover-border-width;
49
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
49
+ border-width: $popover-arrow-height ($popover-arrow-width * .5) 0;
50
50
  border-top-color: $popover-arrow-color;
51
51
  }
52
52
  }
@@ -60,13 +60,13 @@
60
60
 
61
61
  &::before {
62
62
  left: 0;
63
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
63
+ border-width: ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5) 0;
64
64
  border-right-color: $popover-arrow-outer-color;
65
65
  }
66
66
 
67
67
  &::after {
68
68
  left: $popover-border-width;
69
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
69
+ border-width: ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5) 0;
70
70
  border-right-color: $popover-arrow-color;
71
71
  }
72
72
  }
@@ -78,13 +78,13 @@
78
78
 
79
79
  &::before {
80
80
  top: 0;
81
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
81
+ border-width: 0 ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5);
82
82
  border-bottom-color: $popover-arrow-outer-color;
83
83
  }
84
84
 
85
85
  &::after {
86
86
  top: $popover-border-width;
87
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
87
+ border-width: 0 ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5);
88
88
  border-bottom-color: $popover-arrow-color;
89
89
  }
90
90
  }
@@ -96,7 +96,7 @@
96
96
  left: 50%;
97
97
  display: block;
98
98
  width: $popover-arrow-width;
99
- margin-left: -$popover-arrow-width / 2;
99
+ margin-left: -$popover-arrow-width * .5;
100
100
  content: "";
101
101
  border-bottom: $popover-border-width solid $popover-header-bg;
102
102
  }
@@ -110,13 +110,13 @@
110
110
 
111
111
  &::before {
112
112
  right: 0;
113
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
113
+ border-width: ($popover-arrow-width * .5) 0 ($popover-arrow-width * .5) $popover-arrow-height;
114
114
  border-left-color: $popover-arrow-outer-color;
115
115
  }
116
116
 
117
117
  &::after {
118
118
  right: $popover-border-width;
119
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
119
+ border-width: ($popover-arrow-width * .5) 0 ($popover-arrow-width * .5) $popover-arrow-height;
120
120
  border-left-color: $popover-arrow-color;
121
121
  }
122
122
  }
@@ -144,7 +144,7 @@
144
144
  @include font-size($font-size-base);
145
145
  color: $popover-header-color;
146
146
  background-color: $popover-header-bg;
147
- border-bottom: $popover-border-width solid shade-color($popover-header-bg, 10%);
147
+ border-bottom: $popover-border-width solid $popover-border-color;
148
148
  @include border-top-radius($popover-inner-border-radius);
149
149
 
150
150
  &:empty {
@@ -26,7 +26,9 @@
26
26
  // null by default, thus nothing is generated.
27
27
 
28
28
  :root {
29
- font-size: $font-size-root;
29
+ @if $font-size-root != null {
30
+ font-size: var(--#{$variable-prefix}-root-font-size);
31
+ }
30
32
 
31
33
  @if $enable-smooth-scroll {
32
34
  @media (prefers-reduced-motion: no-preference) {
@@ -43,18 +45,20 @@
43
45
  // 3. Prevent adjustments of font size after orientation changes in iOS.
44
46
  // 4. Change the default tap highlight to be completely transparent in iOS.
45
47
 
48
+ // scss-docs-start reboot-body-rules
46
49
  body {
47
50
  margin: 0; // 1
48
- font-family: $font-family-base;
49
- @include font-size($font-size-base);
50
- font-weight: $font-weight-base;
51
- line-height: $line-height-base;
52
- color: $body-color;
53
- text-align: $body-text-align;
54
- background-color: $body-bg; // 2
51
+ font-family: var(--#{$variable-prefix}body-font-family);
52
+ @include font-size(var(--#{$variable-prefix}body-font-size));
53
+ font-weight: var(--#{$variable-prefix}body-font-weight);
54
+ line-height: var(--#{$variable-prefix}body-line-height);
55
+ color: var(--#{$variable-prefix}body-color);
56
+ text-align: var(--#{$variable-prefix}body-text-align);
57
+ background-color: var(--#{$variable-prefix}body-bg); // 2
55
58
  -webkit-text-size-adjust: 100%; // 3
56
59
  -webkit-tap-highlight-color: rgba($black, 0); // 4
57
60
  }
61
+ // scss-docs-end reboot-body-rules
58
62
 
59
63
 
60
64
  // Content grouping
@@ -1,16 +1,53 @@
1
1
  :root {
2
- // Custom variable values only support SassScript inside `#{}`.
2
+ // Note: Custom variable values only support SassScript inside `#{}`.
3
+
4
+ // Colors
5
+ //
6
+ // Generate palettes for full colors, grays, and theme colors.
7
+
3
8
  @each $color, $value in $colors {
4
9
  --#{$variable-prefix}#{$color}: #{$value};
5
10
  }
6
11
 
12
+ @each $color, $value in $grays {
13
+ --#{$variable-prefix}gray-#{$color}: #{$value};
14
+ }
15
+
7
16
  @each $color, $value in $theme-colors {
8
17
  --#{$variable-prefix}#{$color}: #{$value};
9
18
  }
10
19
 
11
- // Use `inspect` for lists so that quoted items keep the quotes.
20
+ @each $color, $value in $theme-colors-rgb {
21
+ --#{$variable-prefix}#{$color}-rgb: #{$value};
22
+ }
23
+
24
+ --#{$variable-prefix}white-rgb: #{to-rgb($white)};
25
+ --#{$variable-prefix}black-rgb: #{to-rgb($black)};
26
+ --#{$variable-prefix}body-rgb: #{to-rgb($body-color)};
27
+
28
+ // Fonts
29
+
30
+ // Note: Use `inspect` for lists so that quoted items keep the quotes.
12
31
  // See https://github.com/sass/sass/issues/2383#issuecomment-336349172
13
32
  --#{$variable-prefix}font-sans-serif: #{inspect($font-family-sans-serif)};
14
33
  --#{$variable-prefix}font-monospace: #{inspect($font-family-monospace)};
15
34
  --#{$variable-prefix}gradient: #{$gradient};
35
+
36
+ // Root and body
37
+ // stylelint-disable custom-property-empty-line-before
38
+ // scss-docs-start root-body-variables
39
+ @if $font-size-root != null {
40
+ --#{$variable-prefix}root-font-size: #{$font-size-root};
41
+ }
42
+ --#{$variable-prefix}body-font-family: #{$font-family-base};
43
+ --#{$variable-prefix}body-font-size: #{$font-size-base};
44
+ --#{$variable-prefix}body-font-weight: #{$font-weight-base};
45
+ --#{$variable-prefix}body-line-height: #{$line-height-base};
46
+ --#{$variable-prefix}body-color: #{$body-color};
47
+ @if $body-text-align != null {
48
+ --#{$variable-prefix}body-text-align: #{$body-text-align};
49
+ }
50
+ --#{$variable-prefix}body-bg: #{$body-bg};
51
+ // scss-docs-end root-body-variables
52
+ // stylelint-enable custom-property-empty-line-before
16
53
  }
@@ -12,7 +12,7 @@
12
12
  display: inline-block;
13
13
  width: $spinner-width;
14
14
  height: $spinner-height;
15
- vertical-align: text-bottom;
15
+ vertical-align: $spinner-vertical-align;
16
16
  border: $spinner-border-width solid currentColor;
17
17
  border-right-color: transparent;
18
18
  // stylelint-disable-next-line property-disallowed-list
@@ -46,7 +46,7 @@
46
46
  display: inline-block;
47
47
  width: $spinner-width;
48
48
  height: $spinner-height;
49
- vertical-align: text-bottom;
49
+ vertical-align: $spinner-vertical-align;
50
50
  background-color: currentColor;
51
51
  // stylelint-disable-next-line property-disallowed-list
52
52
  border-radius: 50%;
@@ -4,6 +4,7 @@
4
4
 
5
5
  .table {
6
6
  --#{$variable-prefix}table-bg: #{$table-bg};
7
+ --#{$variable-prefix}table-accent-bg: #{$table-accent-bg};
7
8
  --#{$variable-prefix}table-striped-color: #{$table-striped-color};
8
9
  --#{$variable-prefix}table-striped-bg: #{$table-striped-bg};
9
10
  --#{$variable-prefix}table-active-color: #{$table-active-color};
@@ -10,11 +10,11 @@
10
10
  box-shadow: $toast-box-shadow;
11
11
  @include border-radius($toast-border-radius);
12
12
 
13
- &:not(.showing):not(.show) {
13
+ &.showing {
14
14
  opacity: 0;
15
15
  }
16
16
 
17
- &.hide {
17
+ &:not(.show) {
18
18
  display: none;
19
19
  }
20
20
  }
@@ -40,7 +40,7 @@
40
40
  @include border-top-radius(subtract($toast-border-radius, $toast-border-width));
41
41
 
42
42
  .btn-close {
43
- margin-right: $toast-padding-x / -2;
43
+ margin-right: $toast-padding-x * -.5;
44
44
  margin-left: $toast-padding-x;
45
45
  }
46
46
  }
@@ -37,7 +37,7 @@
37
37
 
38
38
  &::before {
39
39
  top: -1px;
40
- border-width: $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
40
+ border-width: $tooltip-arrow-height ($tooltip-arrow-width * .5) 0;
41
41
  border-top-color: $tooltip-arrow-color;
42
42
  }
43
43
  }
@@ -53,7 +53,7 @@
53
53
 
54
54
  &::before {
55
55
  right: -1px;
56
- border-width: ($tooltip-arrow-width / 2) $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
56
+ border-width: ($tooltip-arrow-width * .5) $tooltip-arrow-height ($tooltip-arrow-width * .5) 0;
57
57
  border-right-color: $tooltip-arrow-color;
58
58
  }
59
59
  }
@@ -67,7 +67,7 @@
67
67
 
68
68
  &::before {
69
69
  bottom: -1px;
70
- border-width: 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
70
+ border-width: 0 ($tooltip-arrow-width * .5) $tooltip-arrow-height;
71
71
  border-bottom-color: $tooltip-arrow-color;
72
72
  }
73
73
  }
@@ -83,7 +83,7 @@
83
83
 
84
84
  &::before {
85
85
  left: -1px;
86
- border-width: ($tooltip-arrow-width / 2) 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
86
+ border-width: ($tooltip-arrow-width * .5) 0 ($tooltip-arrow-width * .5) $tooltip-arrow-height;
87
87
  border-left-color: $tooltip-arrow-color;
88
88
  }
89
89
  }
@@ -17,5 +17,11 @@
17
17
  height: 0;
18
18
  overflow: hidden;
19
19
  @include transition($transition-collapse);
20
+
21
+ &.collapse-horizontal {
22
+ width: 0;
23
+ height: auto;
24
+ @include transition($transition-collapse-width);
25
+ }
20
26
  }
21
27
  // scss-docs-end collapse-classes
@@ -24,6 +24,19 @@ $utilities: map-merge(
24
24
  )
25
25
  ),
26
26
  // scss-docs-end utils-float
27
+ // Opacity utilities
28
+ // scss-docs-start utils-opacity
29
+ "opacity": (
30
+ property: opacity,
31
+ values: (
32
+ 0: 0,
33
+ 25: .25,
34
+ 50: .5,
35
+ 75: .75,
36
+ 100: 1,
37
+ )
38
+ ),
39
+ // scss-docs-end utils-opacity
27
40
  // scss-docs-start utils-overflow
28
41
  "overflow": (
29
42
  property: overflow,
@@ -501,32 +514,55 @@ $utilities: map-merge(
501
514
  "color": (
502
515
  property: color,
503
516
  class: text,
517
+ local-vars: (
518
+ "text-opacity": 1
519
+ ),
504
520
  values: map-merge(
505
- $theme-colors,
521
+ $utilities-text-colors,
506
522
  (
507
- "white": $white,
508
- "body": $body-color,
509
523
  "muted": $text-muted,
510
- "black-50": rgba($black, .5),
511
- "white-50": rgba($white, .5),
524
+ "black-50": rgba($black, .5), // deprecated
525
+ "white-50": rgba($white, .5), // deprecated
512
526
  "reset": inherit,
513
527
  )
514
528
  )
515
529
  ),
530
+ "text-opacity": (
531
+ css-var: true,
532
+ class: text-opacity,
533
+ values: (
534
+ 25: .25,
535
+ 50: .5,
536
+ 75: .75,
537
+ 100: 1
538
+ )
539
+ ),
516
540
  // scss-docs-end utils-color
517
541
  // scss-docs-start utils-bg-color
518
542
  "background-color": (
519
543
  property: background-color,
520
544
  class: bg,
545
+ local-vars: (
546
+ "bg-opacity": 1
547
+ ),
521
548
  values: map-merge(
522
- $theme-colors,
549
+ $utilities-bg-colors,
523
550
  (
524
- "body": $body-bg,
525
- "white": $white,
526
551
  "transparent": transparent
527
552
  )
528
553
  )
529
554
  ),
555
+ "bg-opacity": (
556
+ css-var: true,
557
+ class: bg-opacity,
558
+ values: (
559
+ 10: .1,
560
+ 25: .25,
561
+ 50: .5,
562
+ 75: .75,
563
+ 100: 1
564
+ )
565
+ ),
530
566
  // scss-docs-end utils-bg-color
531
567
  "gradient": (
532
568
  property: background-image,