diff --git a/_config.yml b/_config.yml index 850999eb7..8173e75a4 100644 --- a/_config.yml +++ b/_config.yml @@ -166,12 +166,12 @@ theme-colors: info: class: info title: Info - light: - class: light - title: Light dark: class: dark title: Dark + light: + class: light + title: Light button-states: - class: diff --git a/package-lock.json b/package-lock.json index 0ca3d8ba7..136837d8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@popperjs/core": "^2.11.5", "@tabler/icons": "^1.68.0", - "bootstrap": "5.1.3" + "bootstrap": "5.2.0-beta1" }, "devDependencies": { "@babel/core": "^7.17.10", @@ -3130,15 +3130,21 @@ "dev": true }, "node_modules/bootstrap": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz", - "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/bootstrap" - }, + "version": "5.2.0-beta1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.0-beta1.tgz", + "integrity": "sha512-6qbgs177WZEFY4SLQUq3tEHayYG80nfDmyTpdKi0MJqRMdS+HAoq24+YKfx6wf+nHY0rx8zrh477J1lFu4WzOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], "peerDependencies": { - "@popperjs/core": "^2.10.2" + "@popperjs/core": "^2.11.5" } }, "node_modules/boxen": { @@ -18450,9 +18456,9 @@ "dev": true }, "bootstrap": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz", - "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==", + "version": "5.2.0-beta1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.0-beta1.tgz", + "integrity": "sha512-6qbgs177WZEFY4SLQUq3tEHayYG80nfDmyTpdKi0MJqRMdS+HAoq24+YKfx6wf+nHY0rx8zrh477J1lFu4WzOA==", "requires": {} }, "boxen": { diff --git a/package.json b/package.json index c10656a15..d5af9cd0a 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "dependencies": { "@popperjs/core": "^2.11.5", "@tabler/icons": "^1.68.0", - "bootstrap": "5.1.3" + "bootstrap": "5.2.0-beta1" }, "peerDependencies": { "apexcharts": "^3.35.2", diff --git a/src/pages/_includes/parts/buttons-table.html b/src/pages/_includes/parts/buttons-table.html index de70c3929..cb239d02c 100644 --- a/src/pages/_includes/parts/buttons-table.html +++ b/src/pages/_includes/parts/buttons-table.html @@ -6,11 +6,11 @@ {% for state in site.button-states %} {% if show-states or (state.class != 'active' and state.class != 'disabled') %} -
- {% unless hide-labels %}
{{ state.title }}
{% endunless %} +
+ {% unless hide-labels %}
{{ state.title }}
{% endunless %} {% for type in variants %} {% if show-link or type[0] != 'link' %} -
+
{% if include.icon or include.icon-only %} {% assign icon = type[1].icon %} {% endif %} diff --git a/src/scss/_bootstrap-components.scss b/src/scss/_bootstrap-components.scss index 38df7504b..286aae450 100644 --- a/src/scss/_bootstrap-components.scss +++ b/src/scss/_bootstrap-components.scss @@ -1,4 +1,4 @@ -// Components +// Layout & components @import "~bootstrap/scss/root"; @import "~bootstrap/scss/reboot"; @import "~bootstrap/scss/type"; diff --git a/src/scss/_bootstrap-config.scss b/src/scss/_bootstrap-config.scss index 4f1fd34da..107d46cd9 100644 --- a/src/scss/_bootstrap-config.scss +++ b/src/scss/_bootstrap-config.scss @@ -1,5 +1,6 @@ // Config @import "~bootstrap/scss/functions"; @import "~bootstrap/scss/variables"; +@import "~bootstrap/scss/maps"; @import "~bootstrap/scss/mixins"; @import "~bootstrap/scss/utilities"; diff --git a/src/scss/_mixins-override.scss b/src/scss/_mixins-override.scss index c6fe2ec46..e0c6cdaa9 100644 --- a/src/scss/_mixins-override.scss +++ b/src/scss/_mixins-override.scss @@ -47,29 +47,29 @@ // Override bootstrap core } -@mixin button-variant( - $background: null, - $border: null, - $color: null, - $hover-background: null, - $hover-border: null, - $hover-color: null, - $active-background: null, - $active-border: null, - $active-color: null, - $disabled-background: null, - $disabled-border: null, - $disabled-color: null -) { - // Override bootstrap core -} - -@mixin button-outline-variant( - $color: null, - $color-hover: null, - $active-background: null, - $active-border: null, - $active-color: null -) { - // Override bootstrap core -} \ No newline at end of file +//@mixin button-variant( +// $background: null, +// $border: null, +// $color: null, +// $hover-background: null, +// $hover-border: null, +// $hover-color: null, +// $active-background: null, +// $active-border: null, +// $active-color: null, +// $disabled-background: null, +// $disabled-border: null, +// $disabled-color: null +//) { +// // Override bootstrap core +//} +// +//@mixin button-outline-variant( +// $color: null, +// $color-hover: null, +// $active-background: null, +// $active-border: null, +// $active-color: null +//) { +// // Override bootstrap core +//} \ No newline at end of file diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss index 9008687ef..dadc8c50c 100644 --- a/src/scss/_variables.scss +++ b/src/scss/_variables.scss @@ -1,4 +1,4 @@ -$variable-prefix: "tblr-" !default; +$prefix: "tblr-" !default; // BASE CONFIG $enable-social-colors: true !default; @@ -191,6 +191,8 @@ $social-colors: ( "tabler": #206bc4 ) !default; +$theme-colors: map-merge($theme-colors, map-merge($extra-colors, $social-colors)); + // Dark mode $dark-mode-darken: darken($dark, 2%) !default; $dark-mode-lighten: lighten($dark, 2%) !default; @@ -299,6 +301,7 @@ $overlay-gradient: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .6 //accordion $accordion-bg: transparent !default; +$accordion-color: var(--#{$prefix}body-color) !default; $accordion-border-color: $border-color-transparent !default; $accordion-icon-width: 1rem !default; @@ -482,7 +485,7 @@ $nav-bordered-margin-x: 1.25rem !default; $navbar-height: 3.5rem !default; $navbar-padding-y: .25rem !default; -$navbar-light-color: rgba($body-color, $text-muted-opacity) !default; +$navbar-light-color: $body-color !default; $navbar-light-brand-color: $body-color !default; $navbar-light-border-color: $border-color-transparent !default; $navbar-light-active-color: $body-color !default; @@ -547,7 +550,6 @@ $spinner-height: 1.5rem !default; $spinner-width-sm: 1rem !default; $spinner-height-sm: 1rem !default; $spinner-border-width: 2px !default; -$spinner-border-width-sm: 1px !default; //tables $table-color: inherit !default; @@ -558,9 +560,9 @@ $table-th-border-color: $border-color-transparent !default; $table-th-padding-x: $table-cell-padding-x !default; $table-th-padding-y: .5rem !default; $table-th-color: $text-muted !default; -$table-th-bg: var(--#{$variable-prefix}border-color-light) !default; +$table-th-bg: var(--#{$prefix}border-color-light) !default; $table-striped-order: even !default; -$table-striped-bg: var(--#{$variable-prefix}border-color-light) !default; +$table-striped-bg: var(--#{$prefix}border-color-light) !default; $table-group-separator-color: $border-color-transparent !default; $table-sort-bg-image: url("data:image/svg+xml,") !default; @@ -627,7 +629,7 @@ $form-switch-bg-image: url("data:image/svg+xml, & { &:last-child { diff --git a/src/scss/ui/_modals.scss b/src/scss/ui/_modals.scss index a9b0c71bb..862eb801e 100644 --- a/src/scss/ui/_modals.scss +++ b/src/scss/ui/_modals.scss @@ -19,7 +19,7 @@ } & + & { - border-top: 1px solid var(--#{$variable-prefix}border-color); + border-top: 1px solid var(--#{$prefix}border-color); } } diff --git a/src/scss/ui/_nav.scss b/src/scss/ui/_nav.scss index 2110fdf79..724b95f33 100644 --- a/src/scss/ui/_nav.scss +++ b/src/scss/ui/_nav.scss @@ -7,7 +7,7 @@ .nav { margin-left: 1.25rem; - border-left: 1px solid var(--#{$variable-prefix}border-color); + border-left: 1px solid var(--#{$prefix}border-color); padding-left: .5rem; } diff --git a/src/scss/ui/_offcanvas.scss b/src/scss/ui/_offcanvas.scss index 1d3eebe55..12c6fb48e 100644 --- a/src/scss/ui/_offcanvas.scss +++ b/src/scss/ui/_offcanvas.scss @@ -1,5 +1,5 @@ .offcanvas { - background: var(--#{$variable-prefix}card-bg); + background: var(--#{$prefix}card-bg); } .offcanvas-header { diff --git a/src/scss/ui/_progress.scss b/src/scss/ui/_progress.scss index c68aa707c..303d96277 100644 --- a/src/scss/ui/_progress.scss +++ b/src/scss/ui/_progress.scss @@ -16,7 +16,7 @@ width: 100%; line-height: $progress-height; appearance: none; - background: var(--#{$variable-prefix}border-color-light); + background: var(--#{$prefix}border-color-light); &::-webkit-progress-bar { background: $gray-100; @@ -63,6 +63,6 @@ .progress-separated { .progress-bar { - border-right: 2px solid var(--#{$variable-prefix}card-bg, #{$card-bg}); + border-right: 2px solid var(--#{$prefix}card-bg, #{$card-bg}); } } diff --git a/src/scss/ui/_status.scss b/src/scss/ui/_status.scss index 7488b8aee..3c5f6ca50 100644 --- a/src/scss/ui/_status.scss +++ b/src/scss/ui/_status.scss @@ -40,17 +40,17 @@ // Status // .status { - --#{$variable-prefix}status-height: #{$status-height}; - --#{$variable-prefix}status-color: #{$text-muted}; - --#{$variable-prefix}status-color-rgb: #{to-rgb($text-muted)}; + --#{$prefix}status-height: #{$status-height}; + --#{$prefix}status-color: #{$text-muted}; + --#{$prefix}status-color-rgb: #{to-rgb($text-muted)}; display: inline-flex; align-items: center; - height: var(--#{$variable-prefix}status-height); + height: var(--#{$prefix}status-height); padding: .25rem .75rem; gap: .5rem; - color: var(--#{$variable-prefix}status-color); - background: rgba(var(--#{$variable-prefix}status-color-rgb), .1); + color: var(--#{$prefix}status-color); + background: rgba(var(--#{$prefix}status-color-rgb), .1); font-size: $font-size-base; text-transform: none; letter-spacing: normal; @@ -60,7 +60,7 @@ margin: 0; .status-dot { - background: var(--#{$variable-prefix}status-color); + background: var(--#{$prefix}status-color); } .icon { @@ -69,15 +69,15 @@ } .status-lite { - border: 1px solid var(--#{$variable-prefix}border-color) !important; + border: 1px solid var(--#{$prefix}border-color) !important; background: transparent !important; - color: var(--#{$variable-prefix}body-text) !important; + color: var(--#{$prefix}body-text) !important; } -@each $name, $color in theme-colors() { +@each $name, $color in $theme-colors { .status-#{$name} { - --#{$variable-prefix}status-color: #{$color}; - --#{$variable-prefix}status-color-rgb: #{to-rgb($color)}; + --#{$prefix}status-color: #{$color}; + --#{$prefix}status-color-rgb: #{to-rgb($color)}; } } @@ -85,13 +85,13 @@ // Status dot // .status-dot { - --#{$variable-prefix}status-dot-color: var(--#{$variable-prefix}status-color, #{$text-muted}); - --#{$variable-prefix}status-size: #{$status-dot-size}; + --#{$prefix}status-dot-color: var(--#{$prefix}status-color, #{$text-muted}); + --#{$prefix}status-size: #{$status-dot-size}; position: relative; display: inline-block; - width: var(--#{$variable-prefix}status-size); - height: var(--#{$variable-prefix}status-size); - background: var(--#{$variable-prefix}status-dot-color); + width: var(--#{$prefix}status-size); + height: var(--#{$prefix}status-size); + background: var(--#{$prefix}status-dot-color); border-radius: $border-radius-pill; } @@ -122,24 +122,24 @@ $btn-colors: $theme-colors; // Status indicator // .status-indicator { - --#{$variable-prefix}status-indicator-size: 2.5rem; - --#{$variable-prefix}status-indicator-color: var(--#{$variable-prefix}status-color, #{$text-muted}); + --#{$prefix}status-indicator-size: 2.5rem; + --#{$prefix}status-indicator-color: var(--#{$prefix}status-color, #{$text-muted}); display: block; position: relative; - width: var(--#{$variable-prefix}status-indicator-size); - height: var(--#{$variable-prefix}status-indicator-size); + width: var(--#{$prefix}status-indicator-size); + height: var(--#{$prefix}status-indicator-size); } .status-indicator-circle { - --#{$variable-prefix}status-circle-size: .75rem; + --#{$prefix}status-circle-size: .75rem; position: absolute; left: 50%; top: 50%; - margin: calc(var(--#{$variable-prefix}status-circle-size) / -2) 0 0 calc(var(--#{$variable-prefix}status-circle-size) / -2); - width: var(--#{$variable-prefix}status-circle-size); - height: var(--#{$variable-prefix}status-circle-size); + margin: calc(var(--#{$prefix}status-circle-size) / -2) 0 0 calc(var(--#{$prefix}status-circle-size) / -2); + width: var(--#{$prefix}status-circle-size); + height: var(--#{$prefix}status-circle-size); border-radius: $border-radius-pill; - background: var(--#{$variable-prefix}status-color); + background: var(--#{$prefix}status-color); &:nth-child(1) { z-index: 3; diff --git a/src/scss/ui/_toasts.scss b/src/scss/ui/_toasts.scss index 06724bc62..3342a8be0 100644 --- a/src/scss/ui/_toasts.scss +++ b/src/scss/ui/_toasts.scss @@ -1,7 +1,7 @@ .toast { background: $white; border: $alert-border-width solid $alert-border-color; - border-left: .25rem solid var(--#{$variable-prefix}toast-color); + border-left: .25rem solid var(--#{$prefix}toast-color); box-shadow: $alert-shadow; .toast-header { @@ -15,6 +15,6 @@ @each $state, $value in $theme-colors { .toast-#{$state} { - --#{$variable-prefix}toast-color: #{$value}; + --#{$prefix}toast-color: #{$value}; } } diff --git a/src/scss/ui/forms/_form-custom.scss b/src/scss/ui/forms/_form-custom.scss index dce03f396..7062b0541 100644 --- a/src/scss/ui/forms/_form-custom.scss +++ b/src/scss/ui/forms/_form-custom.scss @@ -19,10 +19,10 @@ Form control dark theme fix */ .form-control { &::file-selector-button { - background-color: var(--#{$variable-prefix}btn-color, #{$form-file-button-bg}); + background-color: var(--#{$prefix}btn-color, #{$form-file-button-bg}); } &:hover:not(:disabled):not([readonly])::file-selector-button { - background-color: var(--#{$variable-prefix}btn-color, #{$form-file-button-hover-bg}); + background-color: var(--#{$prefix}btn-color, #{$form-file-button-hover-bg}); } } \ No newline at end of file diff --git a/src/scss/ui/forms/_form-imagecheck.scss b/src/scss/ui/forms/_form-imagecheck.scss index ffc018fa1..79b0f7835 100644 --- a/src/scss/ui/forms/_form-imagecheck.scss +++ b/src/scss/ui/forms/_form-imagecheck.scss @@ -18,7 +18,7 @@ Image check display: block; margin: 0; user-select: none; - border: 1px solid var(--#{$variable-prefix}border-color); + border: 1px solid var(--#{$prefix}border-color); border-radius: 3px; .form-imagecheck-input:focus ~ & { diff --git a/src/scss/ui/forms/_validation.scss b/src/scss/ui/forms/_validation.scss index 2c4f233f7..4996bd2db 100644 --- a/src/scss/ui/forms/_validation.scss +++ b/src/scss/ui/forms/_validation.scss @@ -1,5 +1,5 @@ %validation-lite { - border-color: var(--#{$variable-prefix}border-color) !important; + border-color: var(--#{$prefix}border-color) !important; } @each $state, $data in $form-validation-states { diff --git a/src/scss/utils/_colors.scss b/src/scss/utils/_colors.scss index 34f29baf4..ef4b0dfe1 100644 --- a/src/scss/utils/_colors.scss +++ b/src/scss/utils/_colors.scss @@ -1,9 +1,10 @@ // stylelint-disable declaration-no-important // All colors -@each $color, $value in theme-colors() { +@each $color, $value in $theme-colors { .bg-#{"" + $color} { - background: $value !important; + --tblr-bg-opacity: 1; + background-color: rgba(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity)) !important; } .bg-#{"" + $color}-lt { @@ -12,8 +13,8 @@ } } -@each $color, $value in theme-colors() { +@each $color, $value in $theme-colors { .text-#{"" + $color} { - color: $value !important; + color: var(--#{$prefix}#{$color}) !important; } } diff --git a/src/scss/vendor/_jsvectormap.scss b/src/scss/vendor/_jsvectormap.scss index 947c4f2b2..b65785d54 100644 --- a/src/scss/vendor/_jsvectormap.scss +++ b/src/scss/vendor/_jsvectormap.scss @@ -13,8 +13,8 @@ } .jvm-series-container .jvm-legend { - background-color: var(--#{$variable-prefix}card-bg); - border: 1px solid var(--#{$variable-prefix}border-color); + background-color: var(--#{$prefix}card-bg); + border: 1px solid var(--#{$prefix}border-color); min-width: 8rem; .jvm-legend-inner .jvm-legend-tick { @@ -29,9 +29,9 @@ } .jvm-zoom-btn { - border: 1px solid var(--#{$variable-prefix}border-color); - background: var(--#{$variable-prefix}card-bg); - color: var(--#{$variable-prefix}body-color); + border: 1px solid var(--#{$prefix}border-color); + background: var(--#{$prefix}card-bg); + color: var(--#{$prefix}body-color); padding: 0; display: flex; align-items: center; diff --git a/src/scss/vendor/_litepicker.scss b/src/scss/vendor/_litepicker.scss index 836ecaabb..f393451d1 100644 --- a/src/scss/vendor/_litepicker.scss +++ b/src/scss/vendor/_litepicker.scss @@ -4,12 +4,12 @@ --litepicker-button-next-month-color: #{$text-muted}; --litepicker-button-prev-month-color-hover: #{$primary}; --litepicker-button-next-month-color-hover: #{$primary}; - --litepicker-day-color: var(--#{$variable-prefix}body-color); + --litepicker-day-color: var(--#{$prefix}body-color); --litepicker-day-color-hover: #{$primary}; --litepicker-is-end-color-bg: #{$primary}; --litepicker-is-today-color: #{$primary}; - --litepicker-month-header-color: var(--#{$variable-prefix}body-color); - --litepicker-container-months-color-bg: var(--#{$variable-prefix}card-bg); + --litepicker-month-header-color: var(--#{$prefix}body-color); + --litepicker-container-months-color-bg: var(--#{$prefix}card-bg); font: inherit; user-select: none; @@ -18,7 +18,7 @@ } .container__main { - border: 1px solid var(--#{$variable-prefix}border-color); + border: 1px solid var(--#{$prefix}border-color); border-radius: $border-radius; box-shadow: $dropdown-box-shadow; }