administrate-bootstrap-theme 0.1.0 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -11
  3. data/Rakefile +10 -14
  4. data/app/assets/config/administrate-bootstrap-theme_manifest.js +1 -0
  5. data/app/assets/javascripts/administrate-bootstrap-theme/theme.js +2 -0
  6. data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +17 -1
  7. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss +17 -3
  8. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss +52 -16
  9. data/app/assets/stylesheets/administrate-bootstrap-theme/theme.scss +12 -0
  10. data/lib/administrate-bootstrap-theme/engine.rb +2 -0
  11. data/lib/administrate-bootstrap-theme/version.rb +1 -1
  12. data/node_modules/bootstrap/js/src/alert.js +141 -0
  13. data/node_modules/bootstrap/js/src/base-component.js +46 -0
  14. data/node_modules/bootstrap/js/src/button.js +95 -0
  15. data/node_modules/bootstrap/js/src/carousel.js +624 -0
  16. data/node_modules/bootstrap/js/src/collapse.js +410 -0
  17. data/node_modules/bootstrap/js/src/dom/data.js +57 -0
  18. data/node_modules/bootstrap/js/src/dom/event-handler.js +331 -0
  19. data/node_modules/bootstrap/js/src/dom/manipulator.js +80 -0
  20. data/node_modules/bootstrap/js/src/dom/selector-engine.js +75 -0
  21. data/node_modules/bootstrap/js/src/dropdown.js +543 -0
  22. data/node_modules/bootstrap/js/src/modal.js +582 -0
  23. data/node_modules/bootstrap/js/src/offcanvas.js +279 -0
  24. data/node_modules/bootstrap/js/src/popover.js +171 -0
  25. data/node_modules/bootstrap/js/src/scrollspy.js +319 -0
  26. data/node_modules/bootstrap/js/src/tab.js +220 -0
  27. data/node_modules/bootstrap/js/src/toast.js +219 -0
  28. data/node_modules/bootstrap/js/src/tooltip.js +802 -0
  29. data/node_modules/bootstrap/js/src/util/index.js +253 -0
  30. data/node_modules/bootstrap/js/src/util/sanitizer.js +127 -0
  31. data/node_modules/bootstrap/js/src/util/scrollbar.js +70 -0
  32. data/node_modules/bootstrap/scss/_accordion.scss +116 -0
  33. data/node_modules/bootstrap/scss/_alert.scss +57 -0
  34. data/node_modules/bootstrap/scss/_badge.scss +29 -0
  35. data/node_modules/bootstrap/scss/_breadcrumb.scss +28 -0
  36. data/node_modules/bootstrap/scss/_button-group.scss +139 -0
  37. data/node_modules/bootstrap/scss/_buttons.scss +111 -0
  38. data/node_modules/bootstrap/scss/_card.scss +215 -0
  39. data/node_modules/bootstrap/scss/_carousel.scss +229 -0
  40. data/node_modules/bootstrap/scss/_close.scss +40 -0
  41. data/node_modules/bootstrap/scss/_containers.scss +41 -0
  42. data/node_modules/bootstrap/scss/_dropdown.scss +246 -0
  43. data/node_modules/bootstrap/scss/_forms.scss +9 -0
  44. data/node_modules/bootstrap/scss/_functions.scss +205 -0
  45. data/node_modules/bootstrap/scss/_grid.scss +22 -0
  46. data/node_modules/bootstrap/scss/_helpers.scss +7 -0
  47. data/node_modules/bootstrap/scss/_images.scss +42 -0
  48. data/node_modules/bootstrap/scss/_list-group.scss +174 -0
  49. data/node_modules/bootstrap/scss/_mixins.scss +41 -0
  50. data/node_modules/bootstrap/scss/_modal.scss +237 -0
  51. data/node_modules/bootstrap/scss/_nav.scss +139 -0
  52. data/node_modules/bootstrap/scss/_navbar.scss +306 -0
  53. data/node_modules/bootstrap/scss/_offcanvas.scss +77 -0
  54. data/node_modules/bootstrap/scss/_pagination.scss +64 -0
  55. data/node_modules/bootstrap/scss/_popover.scss +158 -0
  56. data/node_modules/bootstrap/scss/_progress.scss +48 -0
  57. data/node_modules/bootstrap/scss/_reboot.scss +621 -0
  58. data/node_modules/bootstrap/scss/_root.scss +16 -0
  59. data/node_modules/bootstrap/scss/_spinners.scss +69 -0
  60. data/node_modules/bootstrap/scss/_tables.scss +150 -0
  61. data/node_modules/bootstrap/scss/_toasts.scss +51 -0
  62. data/node_modules/bootstrap/scss/_tooltip.scss +115 -0
  63. data/node_modules/bootstrap/scss/_transitions.scss +21 -0
  64. data/node_modules/bootstrap/scss/_type.scss +104 -0
  65. data/node_modules/bootstrap/scss/_utilities.scss +594 -0
  66. data/node_modules/bootstrap/scss/_variables.scss +1464 -0
  67. data/node_modules/bootstrap/scss/bootstrap-grid.scss +65 -0
  68. data/node_modules/bootstrap/scss/bootstrap-reboot.scss +15 -0
  69. data/node_modules/bootstrap/scss/bootstrap-utilities.scss +18 -0
  70. data/node_modules/bootstrap/scss/bootstrap.scss +52 -0
  71. data/node_modules/bootstrap/scss/forms/_floating-labels.scss +61 -0
  72. data/node_modules/bootstrap/scss/forms/_form-check.scss +152 -0
  73. data/node_modules/bootstrap/scss/forms/_form-control.scss +219 -0
  74. data/node_modules/bootstrap/scss/forms/_form-range.scss +91 -0
  75. data/node_modules/bootstrap/scss/forms/_form-select.scss +67 -0
  76. data/node_modules/bootstrap/scss/forms/_form-text.scss +11 -0
  77. data/node_modules/bootstrap/scss/forms/_input-group.scss +121 -0
  78. data/node_modules/bootstrap/scss/forms/_labels.scss +36 -0
  79. data/node_modules/bootstrap/scss/forms/_validation.scss +12 -0
  80. data/node_modules/bootstrap/scss/helpers/_clearfix.scss +3 -0
  81. data/node_modules/bootstrap/scss/helpers/_colored-links.scss +12 -0
  82. data/node_modules/bootstrap/scss/helpers/_position.scss +30 -0
  83. data/node_modules/bootstrap/scss/helpers/_ratio.scss +26 -0
  84. data/node_modules/bootstrap/scss/helpers/_stretched-link.scss +15 -0
  85. data/node_modules/bootstrap/scss/helpers/_text-truncation.scss +7 -0
  86. data/node_modules/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
  87. data/node_modules/bootstrap/scss/mixins/_alert.scss +11 -0
  88. data/node_modules/bootstrap/scss/mixins/_border-radius.scss +78 -0
  89. data/node_modules/bootstrap/scss/mixins/_box-shadow.scss +18 -0
  90. data/node_modules/bootstrap/scss/mixins/_breakpoints.scss +127 -0
  91. data/node_modules/bootstrap/scss/mixins/_buttons.scss +133 -0
  92. data/node_modules/bootstrap/scss/mixins/_caret.scss +64 -0
  93. data/node_modules/bootstrap/scss/mixins/_clearfix.scss +9 -0
  94. data/node_modules/bootstrap/scss/mixins/_container.scss +9 -0
  95. data/node_modules/bootstrap/scss/mixins/_deprecate.scss +10 -0
  96. data/node_modules/bootstrap/scss/mixins/_forms.scss +134 -0
  97. data/node_modules/bootstrap/scss/mixins/_gradients.scss +47 -0
  98. data/node_modules/bootstrap/scss/mixins/_grid.scss +120 -0
  99. data/node_modules/bootstrap/scss/mixins/_image.scss +16 -0
  100. data/node_modules/bootstrap/scss/mixins/_list-group.scss +24 -0
  101. data/node_modules/bootstrap/scss/mixins/_lists.scss +7 -0
  102. data/node_modules/bootstrap/scss/mixins/_pagination.scss +31 -0
  103. data/node_modules/bootstrap/scss/mixins/_reset-text.scss +17 -0
  104. data/node_modules/bootstrap/scss/mixins/_resize.scss +6 -0
  105. data/node_modules/bootstrap/scss/mixins/_table-variants.scss +21 -0
  106. data/node_modules/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  107. data/node_modules/bootstrap/scss/mixins/_transition.scss +26 -0
  108. data/node_modules/bootstrap/scss/mixins/_utilities.scss +68 -0
  109. data/node_modules/bootstrap/scss/mixins/_visually-hidden.scss +29 -0
  110. data/node_modules/bootstrap/scss/utilities/_api.scss +47 -0
  111. data/node_modules/bootstrap/scss/vendor/_rfs.scss +312 -0
  112. metadata +106 -19
@@ -0,0 +1,116 @@
1
+ //
2
+ // Base styles
3
+ //
4
+
5
+ .accordion-button {
6
+ position: relative;
7
+ display: flex;
8
+ align-items: center;
9
+ width: 100%;
10
+ padding: $accordion-button-padding-y $accordion-button-padding-x;
11
+ @include font-size($font-size-base);
12
+ color: $accordion-button-color;
13
+ text-align: left; // Reset button style
14
+ background-color: $accordion-button-bg;
15
+ border: 0;
16
+ @include border-radius(0);
17
+ overflow-anchor: none;
18
+ @include transition($accordion-transition);
19
+
20
+ &:not(.collapsed) {
21
+ color: $accordion-button-active-color;
22
+ background-color: $accordion-button-active-bg;
23
+ box-shadow: inset 0 ($accordion-border-width * -1) 0 $accordion-border-color;
24
+
25
+ &::after {
26
+ background-image: escape-svg($accordion-button-active-icon);
27
+ transform: $accordion-icon-transform;
28
+ }
29
+ }
30
+
31
+ // Accordion icon
32
+ &::after {
33
+ flex-shrink: 0;
34
+ width: $accordion-icon-width;
35
+ height: $accordion-icon-width;
36
+ margin-left: auto;
37
+ content: "";
38
+ background-image: escape-svg($accordion-button-icon);
39
+ background-repeat: no-repeat;
40
+ background-size: $accordion-icon-width;
41
+ @include transition($accordion-icon-transition);
42
+ }
43
+
44
+ &:hover {
45
+ z-index: 2;
46
+ }
47
+
48
+ &:focus {
49
+ z-index: 3;
50
+ border-color: $accordion-button-focus-border-color;
51
+ outline: 0;
52
+ box-shadow: $accordion-button-focus-box-shadow;
53
+ }
54
+ }
55
+
56
+ .accordion-header {
57
+ margin-bottom: 0;
58
+ }
59
+
60
+ .accordion-item {
61
+ margin-bottom: -$accordion-border-width;
62
+ background-color: $accordion-bg;
63
+ border: $accordion-border-width solid $accordion-border-color;
64
+
65
+ &:first-of-type {
66
+ @include border-top-radius($accordion-border-radius);
67
+
68
+ .accordion-button {
69
+ @include border-top-radius($accordion-inner-border-radius);
70
+ }
71
+ }
72
+
73
+ // Only set a border-radius on the last item if the accordion is collapsed
74
+ &:last-of-type {
75
+ margin-bottom: 0;
76
+ @include border-bottom-radius($accordion-border-radius);
77
+
78
+ .accordion-button {
79
+ &.collapsed {
80
+ @include border-bottom-radius($accordion-inner-border-radius);
81
+ }
82
+ }
83
+
84
+ .accordion-collapse {
85
+ @include border-bottom-radius($accordion-border-radius);
86
+ }
87
+ }
88
+ }
89
+
90
+ .accordion-body {
91
+ padding: $accordion-body-padding-y $accordion-body-padding-x;
92
+ }
93
+
94
+
95
+ // Flush accordion items
96
+ //
97
+ // Remove borders and border-radius to keep accordion items edge-to-edge.
98
+
99
+ .accordion-flush {
100
+ .accordion-collapse {
101
+ border-width: 0;
102
+ }
103
+
104
+ .accordion-item {
105
+ border-right: 0;
106
+ border-left: 0;
107
+ @include border-radius(0);
108
+
109
+ &:first-child { border-top: 0; }
110
+ &:last-child { border-bottom: 0; }
111
+
112
+ .accordion-button {
113
+ @include border-radius(0);
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,57 @@
1
+ //
2
+ // Base styles
3
+ //
4
+
5
+ .alert {
6
+ position: relative;
7
+ padding: $alert-padding-y $alert-padding-x;
8
+ margin-bottom: $alert-margin-bottom;
9
+ border: $alert-border-width solid transparent;
10
+ @include border-radius($alert-border-radius);
11
+ }
12
+
13
+ // Headings for larger alerts
14
+ .alert-heading {
15
+ // Specified to prevent conflicts of changing $headings-color
16
+ color: inherit;
17
+ }
18
+
19
+ // Provide class for links that match alerts
20
+ .alert-link {
21
+ font-weight: $alert-link-font-weight;
22
+ }
23
+
24
+
25
+ // Dismissible alerts
26
+ //
27
+ // Expand the right padding and account for the close button's positioning.
28
+
29
+ .alert-dismissible {
30
+ padding-right: $alert-dismissible-padding-r;
31
+
32
+ // Adjust close link position
33
+ .btn-close {
34
+ position: absolute;
35
+ top: 0;
36
+ right: 0;
37
+ z-index: $stretched-link-z-index + 1;
38
+ padding: $alert-padding-y * 1.25 $alert-padding-x;
39
+ }
40
+ }
41
+
42
+
43
+ // scss-docs-start alert-modifiers
44
+ // Generate contextual modifier classes for colorizing the alert.
45
+
46
+ @each $state, $value in $theme-colors {
47
+ $alert-background: shift-color($value, $alert-bg-scale);
48
+ $alert-border: shift-color($value, $alert-border-scale);
49
+ $alert-color: shift-color($value, $alert-color-scale);
50
+ @if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
51
+ $alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
52
+ }
53
+ .alert-#{$state} {
54
+ @include alert-variant($alert-background, $alert-border, $alert-color);
55
+ }
56
+ }
57
+ // scss-docs-end alert-modifiers
@@ -0,0 +1,29 @@
1
+ // Base class
2
+ //
3
+ // Requires one of the contextual, color modifier classes for `color` and
4
+ // `background-color`.
5
+
6
+ .badge {
7
+ display: inline-block;
8
+ padding: $badge-padding-y $badge-padding-x;
9
+ @include font-size($badge-font-size);
10
+ font-weight: $badge-font-weight;
11
+ line-height: 1;
12
+ color: $badge-color;
13
+ text-align: center;
14
+ white-space: nowrap;
15
+ vertical-align: baseline;
16
+ @include border-radius($badge-border-radius);
17
+ @include gradient-bg();
18
+
19
+ // Empty badges collapse automatically
20
+ &:empty {
21
+ display: none;
22
+ }
23
+ }
24
+
25
+ // Quick fix for badges in buttons
26
+ .btn .badge {
27
+ position: relative;
28
+ top: -1px;
29
+ }
@@ -0,0 +1,28 @@
1
+ .breadcrumb {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ padding: $breadcrumb-padding-y $breadcrumb-padding-x;
5
+ margin-bottom: $breadcrumb-margin-bottom;
6
+ @include font-size($breadcrumb-font-size);
7
+ list-style: none;
8
+ background-color: $breadcrumb-bg;
9
+ @include border-radius($breadcrumb-border-radius);
10
+ }
11
+
12
+ .breadcrumb-item {
13
+ // The separator between breadcrumbs (by default, a forward-slash: "/")
14
+ + .breadcrumb-item {
15
+ padding-left: $breadcrumb-item-padding-x;
16
+
17
+ &::before {
18
+ float: left; // Suppress inline spacings and underlining of the separator
19
+ padding-right: $breadcrumb-item-padding-x;
20
+ color: $breadcrumb-divider-color;
21
+ content: var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
22
+ }
23
+ }
24
+
25
+ &.active {
26
+ color: $breadcrumb-active-color;
27
+ }
28
+ }
@@ -0,0 +1,139 @@
1
+ // Make the div behave like a button
2
+ .btn-group,
3
+ .btn-group-vertical {
4
+ position: relative;
5
+ display: inline-flex;
6
+ vertical-align: middle; // match .btn alignment given font-size hack above
7
+
8
+ > .btn {
9
+ position: relative;
10
+ flex: 1 1 auto;
11
+ }
12
+
13
+ // Bring the hover, focused, and "active" buttons to the front to overlay
14
+ // the borders properly
15
+ > .btn-check:checked + .btn,
16
+ > .btn-check:focus + .btn,
17
+ > .btn:hover,
18
+ > .btn:focus,
19
+ > .btn:active,
20
+ > .btn.active {
21
+ z-index: 1;
22
+ }
23
+ }
24
+
25
+ // Optional: Group multiple button groups together for a toolbar
26
+ .btn-toolbar {
27
+ display: flex;
28
+ flex-wrap: wrap;
29
+ justify-content: flex-start;
30
+
31
+ .input-group {
32
+ width: auto;
33
+ }
34
+ }
35
+
36
+ .btn-group {
37
+ // Prevent double borders when buttons are next to each other
38
+ > .btn:not(:first-child),
39
+ > .btn-group:not(:first-child) {
40
+ margin-left: -$btn-border-width;
41
+ }
42
+
43
+ // Reset rounded corners
44
+ > .btn:not(:last-child):not(.dropdown-toggle),
45
+ > .btn-group:not(:last-child) > .btn {
46
+ @include border-end-radius(0);
47
+ }
48
+
49
+ // The left radius should be 0 if the button is:
50
+ // - the "third or more" child
51
+ // - the second child and the previous element isn't `.btn-check` (making it the first child visually)
52
+ // - part of a btn-group which isn't the first child
53
+ > .btn:nth-child(n + 3),
54
+ > :not(.btn-check) + .btn,
55
+ > .btn-group:not(:first-child) > .btn {
56
+ @include border-start-radius(0);
57
+ }
58
+ }
59
+
60
+ // Sizing
61
+ //
62
+ // Remix the default button sizing classes into new ones for easier manipulation.
63
+
64
+ .btn-group-sm > .btn { @extend .btn-sm; }
65
+ .btn-group-lg > .btn { @extend .btn-lg; }
66
+
67
+
68
+ //
69
+ // Split button dropdowns
70
+ //
71
+
72
+ .dropdown-toggle-split {
73
+ padding-right: $btn-padding-x * .75;
74
+ padding-left: $btn-padding-x * .75;
75
+
76
+ &::after,
77
+ .dropup &::after,
78
+ .dropend &::after {
79
+ margin-left: 0;
80
+ }
81
+
82
+ .dropstart &::before {
83
+ margin-right: 0;
84
+ }
85
+ }
86
+
87
+ .btn-sm + .dropdown-toggle-split {
88
+ padding-right: $btn-padding-x-sm * .75;
89
+ padding-left: $btn-padding-x-sm * .75;
90
+ }
91
+
92
+ .btn-lg + .dropdown-toggle-split {
93
+ padding-right: $btn-padding-x-lg * .75;
94
+ padding-left: $btn-padding-x-lg * .75;
95
+ }
96
+
97
+
98
+ // The clickable button for toggling the menu
99
+ // Set the same inset shadow as the :active state
100
+ .btn-group.show .dropdown-toggle {
101
+ @include box-shadow($btn-active-box-shadow);
102
+
103
+ // Show no shadow for `.btn-link` since it has no other button styles.
104
+ &.btn-link {
105
+ @include box-shadow(none);
106
+ }
107
+ }
108
+
109
+
110
+ //
111
+ // Vertical button groups
112
+ //
113
+
114
+ .btn-group-vertical {
115
+ flex-direction: column;
116
+ align-items: flex-start;
117
+ justify-content: center;
118
+
119
+ > .btn,
120
+ > .btn-group {
121
+ width: 100%;
122
+ }
123
+
124
+ > .btn:not(:first-child),
125
+ > .btn-group:not(:first-child) {
126
+ margin-top: -$btn-border-width;
127
+ }
128
+
129
+ // Reset rounded corners
130
+ > .btn:not(:last-child):not(.dropdown-toggle),
131
+ > .btn-group:not(:last-child) > .btn {
132
+ @include border-bottom-radius(0);
133
+ }
134
+
135
+ > .btn ~ .btn,
136
+ > .btn-group:not(:first-child) > .btn {
137
+ @include border-top-radius(0);
138
+ }
139
+ }
@@ -0,0 +1,111 @@
1
+ //
2
+ // Base styles
3
+ //
4
+
5
+ .btn {
6
+ display: inline-block;
7
+ font-family: $btn-font-family;
8
+ font-weight: $btn-font-weight;
9
+ line-height: $btn-line-height;
10
+ color: $body-color;
11
+ text-align: center;
12
+ text-decoration: if($link-decoration == none, null, none);
13
+ white-space: $btn-white-space;
14
+ vertical-align: middle;
15
+ cursor: if($enable-button-pointers, pointer, null);
16
+ user-select: none;
17
+ background-color: transparent;
18
+ border: $btn-border-width solid transparent;
19
+ @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-border-radius);
20
+ @include transition($btn-transition);
21
+
22
+ &:hover {
23
+ color: $body-color;
24
+ text-decoration: if($link-hover-decoration == underline, none, null);
25
+ }
26
+
27
+ .btn-check:focus + &,
28
+ &:focus {
29
+ outline: 0;
30
+ box-shadow: $btn-focus-box-shadow;
31
+ }
32
+
33
+ .btn-check:checked + &,
34
+ .btn-check:active + &,
35
+ &:active,
36
+ &.active {
37
+ @include box-shadow($btn-active-box-shadow);
38
+
39
+ &:focus {
40
+ @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
41
+ }
42
+ }
43
+
44
+ &:disabled,
45
+ &.disabled,
46
+ fieldset:disabled & {
47
+ pointer-events: none;
48
+ opacity: $btn-disabled-opacity;
49
+ @include box-shadow(none);
50
+ }
51
+ }
52
+
53
+
54
+ //
55
+ // Alternate buttons
56
+ //
57
+
58
+ // scss-docs-start btn-variant-loops
59
+ @each $color, $value in $theme-colors {
60
+ .btn-#{$color} {
61
+ @include button-variant($value, $value);
62
+ }
63
+ }
64
+
65
+ @each $color, $value in $theme-colors {
66
+ .btn-outline-#{$color} {
67
+ @include button-outline-variant($value);
68
+ }
69
+ }
70
+ // scss-docs-end btn-variant-loops
71
+
72
+
73
+ //
74
+ // Link buttons
75
+ //
76
+
77
+ // Make a button look and behave like a link
78
+ .btn-link {
79
+ font-weight: $font-weight-normal;
80
+ color: $btn-link-color;
81
+ text-decoration: $link-decoration;
82
+
83
+ &:hover {
84
+ color: $btn-link-hover-color;
85
+ text-decoration: $link-hover-decoration;
86
+ }
87
+
88
+ &:focus {
89
+ text-decoration: $link-hover-decoration;
90
+ }
91
+
92
+ &:disabled,
93
+ &.disabled {
94
+ color: $btn-link-disabled-color;
95
+ }
96
+
97
+ // No need for an active state here
98
+ }
99
+
100
+
101
+ //
102
+ // Button Sizes
103
+ //
104
+
105
+ .btn-lg {
106
+ @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
107
+ }
108
+
109
+ .btn-sm {
110
+ @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
111
+ }