admin-lte 4.4.1 → 4.6.0
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.
- package/CHANGELOG.md +22 -0
- package/README.md +1 -1
- package/dist/css/adminlte-colors-v3.css +2302 -0
- package/dist/css/adminlte-colors-v3.css.map +1 -0
- package/dist/css/adminlte-colors-v3.min.css +20 -0
- package/dist/css/adminlte-colors-v3.min.css.map +1 -0
- package/dist/css/adminlte-colors-v3.rtl.css +2301 -0
- package/dist/css/adminlte-colors-v3.rtl.css.map +1 -0
- package/dist/css/adminlte-colors-v3.rtl.min.css +20 -0
- package/dist/css/adminlte-colors-v3.rtl.min.css.map +1 -0
- package/dist/css/adminlte-colors.css +732 -114
- package/dist/css/adminlte-colors.css.map +1 -1
- package/dist/css/adminlte-colors.min.css +5 -3
- package/dist/css/adminlte-colors.min.css.map +1 -1
- package/dist/css/adminlte-colors.rtl.css +732 -114
- package/dist/css/adminlte-colors.rtl.css.map +1 -1
- package/dist/css/adminlte-colors.rtl.min.css +5 -3
- package/dist/css/adminlte-colors.rtl.min.css.map +1 -1
- package/dist/css/adminlte-docs.css +1 -1
- package/dist/css/adminlte-docs.css.map +1 -1
- package/dist/css/adminlte-docs.min.css +1 -1
- package/dist/css/adminlte-docs.min.css.map +1 -1
- package/dist/css/adminlte-docs.rtl.css +1 -1
- package/dist/css/adminlte-docs.rtl.css.map +1 -1
- package/dist/css/adminlte-docs.rtl.min.css +1 -1
- package/dist/css/adminlte-docs.rtl.min.css.map +1 -1
- package/dist/css/adminlte-select2.css +1 -1
- package/dist/css/adminlte-select2.css.map +1 -1
- package/dist/css/adminlte-select2.min.css +1 -1
- package/dist/css/adminlte-select2.min.css.map +1 -1
- package/dist/css/adminlte-select2.rtl.css +1 -1
- package/dist/css/adminlte-select2.rtl.css.map +1 -1
- package/dist/css/adminlte-select2.rtl.min.css +1 -1
- package/dist/css/adminlte-select2.rtl.min.css.map +1 -1
- package/dist/css/adminlte.css +9 -6
- package/dist/css/adminlte.css.map +1 -1
- package/dist/css/adminlte.min.css +2 -2
- package/dist/css/adminlte.min.css.map +1 -1
- package/dist/css/adminlte.rtl.css +9 -6
- package/dist/css/adminlte.rtl.css.map +1 -1
- package/dist/css/adminlte.rtl.min.css +2 -2
- package/dist/css/adminlte.rtl.min.css.map +1 -1
- package/dist/js/adminlte.esm.js +1 -1
- package/dist/js/adminlte.esm.min.js +1 -1
- package/dist/js/adminlte.js +1 -1
- package/dist/js/adminlte.min.js +1 -1
- package/package.json +1 -1
- package/src/scss/_accessibility.scss +11 -5
- package/src/scss/adminlte-colors-v3.scss +61 -0
- package/src/scss/adminlte-colors.scss +5 -2
- package/src/scss/adminlte-docs.scss +1 -1
- package/src/scss/adminlte-select2.scss +1 -1
- package/src/scss/adminlte.scss +1 -1
- package/src/scss/colors/_colors.scss +8 -8
- package/src/scss/colors/_primary.scss +253 -0
- package/src/scss/colors/_variables.scss +47 -0
- package/src/ts/adminlte.ts +1 -1
package/dist/js/adminlte.esm.js
CHANGED
package/dist/js/adminlte.js
CHANGED
package/dist/js/adminlte.min.js
CHANGED
package/package.json
CHANGED
|
@@ -21,9 +21,12 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
&:hover {
|
|
24
|
-
|
|
24
|
+
// `--bs-primary-emphasis` does not exist; Bootstrap emits
|
|
25
|
+
// `--bs-primary-text-emphasis`, which is dark in light mode and light in
|
|
26
|
+
// dark mode — so pair it with the body background for the text colour.
|
|
27
|
+
color: var(--bs-body-bg);
|
|
25
28
|
text-decoration: none;
|
|
26
|
-
background: var(--bs-primary-emphasis);
|
|
29
|
+
background: var(--bs-primary-text-emphasis);
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
|
|
@@ -291,8 +294,11 @@ fieldset {
|
|
|
291
294
|
content: " (" attr(href) ")";
|
|
292
295
|
}
|
|
293
296
|
|
|
294
|
-
/* Print Layout Fix - Ensure sidebar and main content are both visible
|
|
295
|
-
|
|
297
|
+
/* Print Layout Fix - Ensure sidebar and main content are both visible.
|
|
298
|
+
`:not(.d-print-none)` on the two rules that force `display`, so Bootstrap's
|
|
299
|
+
print display utilities keep working: these are defaults for the standard
|
|
300
|
+
layout, not something a page should have to fight to hide. */
|
|
301
|
+
.app-wrapper:not(.d-print-none) {
|
|
296
302
|
display: grid !important;
|
|
297
303
|
grid-template-rows: auto 1fr auto !important;
|
|
298
304
|
grid-template-columns: auto 1fr !important;
|
|
@@ -302,7 +308,7 @@ fieldset {
|
|
|
302
308
|
display: none !important;
|
|
303
309
|
}
|
|
304
310
|
|
|
305
|
-
.app-sidebar {
|
|
311
|
+
.app-sidebar:not(.d-print-none) {
|
|
306
312
|
position: static !important;
|
|
307
313
|
display: block !important;
|
|
308
314
|
min-width: 200px !important;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* AdminLTE v4.6.0 — AdminLTE 3 color palette (legacy)
|
|
3
|
+
* Opt-in. The extended colours exactly as AdminLTE 3 shipped them — same
|
|
4
|
+
* names, same values, same text-colour rule (Bootstrap 4's YIQ brightness
|
|
5
|
+
* test, so lightblue, olive and teal take white text as they did) — with
|
|
6
|
+
* the AdminLTE 4 class families: `.bg-*`, `.text-bg-*`, `.text-*`,
|
|
7
|
+
* `.border-*`, `.link-*`, `.bg-gradient-*`, `.card-*`, `.callout-*`,
|
|
8
|
+
* `.direct-chat-*`, plus dark-mode tokens — and `data-lte-primary="lightblue"`
|
|
9
|
+
* on <html> to make any of them Bootstrap's `primary`, buttons and all.
|
|
10
|
+
*
|
|
11
|
+
* Load EITHER this file OR adminlte-colors.css (the palette designed for
|
|
12
|
+
* 4.4), not both: they define the same class names (navy, teal, olive, …)
|
|
13
|
+
* with different values. Nothing here is in adminlte.css.
|
|
14
|
+
* See docs/colors.html.
|
|
15
|
+
*
|
|
16
|
+
* Author: Colorlib
|
|
17
|
+
* Website: AdminLTE.io <https://adminlte.io>
|
|
18
|
+
* License: Open source - MIT <https://opensource.org/licenses/MIT>
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
// Bootstrap Configuration
|
|
22
|
+
// ---------------------------------------------------
|
|
23
|
+
@import "bootstrap/scss/functions";
|
|
24
|
+
@import "bootstrap-overrides";
|
|
25
|
+
@import "bootstrap/scss/variables";
|
|
26
|
+
@import "bootstrap/scss/variables-dark";
|
|
27
|
+
@import "bootstrap/scss/maps";
|
|
28
|
+
@import "bootstrap/scss/mixins";
|
|
29
|
+
|
|
30
|
+
// AdminLTE Configuration
|
|
31
|
+
// ---------------------------------------------------
|
|
32
|
+
@import "variables";
|
|
33
|
+
@import "variables-dark";
|
|
34
|
+
|
|
35
|
+
// The AdminLTE 3 palette — values read from the 3.2.0 build, unchanged
|
|
36
|
+
// ---------------------------------------------------
|
|
37
|
+
$lte-palette: (
|
|
38
|
+
"lightblue": #3c8dbc,
|
|
39
|
+
"navy": #001f3f,
|
|
40
|
+
"olive": #3d9970,
|
|
41
|
+
"lime": #01ff70,
|
|
42
|
+
"fuchsia": #f012be,
|
|
43
|
+
"maroon": #d81b60,
|
|
44
|
+
"blue": #007bff,
|
|
45
|
+
"indigo": #6610f2,
|
|
46
|
+
"purple": #6f42c1,
|
|
47
|
+
"pink": #e83e8c,
|
|
48
|
+
"red": #dc3545,
|
|
49
|
+
"orange": #fd7e14,
|
|
50
|
+
"yellow": #ffc107,
|
|
51
|
+
"green": #28a745,
|
|
52
|
+
"teal": #20c997,
|
|
53
|
+
"cyan": #17a2b8,
|
|
54
|
+
"gray": #6c757d,
|
|
55
|
+
"gray-dark": #343a40
|
|
56
|
+
) !default;
|
|
57
|
+
$lte-palette-contrast: "yiq" !default;
|
|
58
|
+
|
|
59
|
+
@import "colors/variables";
|
|
60
|
+
@import "colors/colors";
|
|
61
|
+
@import "colors/primary";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* AdminLTE v4.
|
|
2
|
+
* AdminLTE v4.6.0 — Extended color palette
|
|
3
3
|
* Opt-in. Nothing here is in adminlte.css: load this sheet after it and you
|
|
4
4
|
* get fourteen additional colours (orange, amber, olive, teal, sky, indigo,
|
|
5
5
|
* violet, fuchsia, pink, navy, steel, slate, graphite, midnight) as `--bs-*`
|
|
6
6
|
* tokens plus the
|
|
7
7
|
* `.bg-*`, `.text-bg-*`, `.text-*`, `.border-*`, `.link-*`, `.bg-gradient-*`,
|
|
8
8
|
* `.card-*`, `.callout-*` and `.direct-chat-*` families — with dark mode.
|
|
9
|
-
*
|
|
9
|
+
* `data-lte-primary="teal"` on <html> also makes that colour Bootstrap's
|
|
10
|
+
* `primary`, buttons and all. Every colour takes white text at ≥ 4.6:1.
|
|
11
|
+
* See docs/colors.html.
|
|
10
12
|
*
|
|
11
13
|
* Author: Colorlib
|
|
12
14
|
* Website: AdminLTE.io <https://adminlte.io>
|
|
@@ -33,3 +35,4 @@
|
|
|
33
35
|
// ---------------------------------------------------
|
|
34
36
|
@import "colors/variables";
|
|
35
37
|
@import "colors/colors";
|
|
38
|
+
@import "colors/primary";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* AdminLTE v4.
|
|
2
|
+
* AdminLTE v4.6.0 — documentation styles
|
|
3
3
|
* Styles for the documentation and FAQ pages only (body.docs-page /
|
|
4
4
|
* body.faq-page). Applications never need this file; it is loaded by the
|
|
5
5
|
* docs pages in addition to adminlte.css.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* AdminLTE v4.
|
|
2
|
+
* AdminLTE v4.6.0 — Select2 compatibility theme
|
|
3
3
|
* Styling only. AdminLTE bundles neither Select2 nor jQuery; this optional
|
|
4
4
|
* sheet makes a Select2 you load yourself match Bootstrap 5.3 form controls,
|
|
5
5
|
* including `data-bs-theme` dark mode. Load it AFTER select2.css.
|
package/src/scss/adminlte.scss
CHANGED
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
@each $name, $value in $lte-palette {
|
|
19
19
|
--#{$prefix}#{$name}: #{$value};
|
|
20
20
|
--#{$prefix}#{$name}-rgb: #{to-rgb($value)};
|
|
21
|
-
--#{$prefix}#{$name}-text-emphasis: #{shade-color($value, 60%)};
|
|
22
|
-
--#{$prefix}#{$name}-bg-subtle: #{tint-color($value, 80%)};
|
|
23
|
-
--#{$prefix}#{$name}-border-subtle: #{tint-color($value, 60%)};
|
|
21
|
+
--#{$prefix}#{$name}-text-emphasis: #{lte-hex(shade-color($value, 60%))};
|
|
22
|
+
--#{$prefix}#{$name}-bg-subtle: #{lte-hex(tint-color($value, 80%))};
|
|
23
|
+
--#{$prefix}#{$name}-border-subtle: #{lte-hex(tint-color($value, 60%))};
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
@if $enable-dark-mode {
|
|
28
28
|
@include color-mode(dark, true) {
|
|
29
29
|
@each $name, $value in $lte-palette {
|
|
30
|
-
--#{$prefix}#{$name}-text-emphasis: #{tint-color($value, 40%)};
|
|
31
|
-
--#{$prefix}#{$name}-bg-subtle: #{shade-color($value, 80%)};
|
|
32
|
-
--#{$prefix}#{$name}-border-subtle: #{shade-color($value, 40%)};
|
|
30
|
+
--#{$prefix}#{$name}-text-emphasis: #{lte-hex(tint-color($value, 40%))};
|
|
31
|
+
--#{$prefix}#{$name}-bg-subtle: #{lte-hex(shade-color($value, 80%))};
|
|
32
|
+
--#{$prefix}#{$name}-border-subtle: #{lte-hex(shade-color($value, 40%))};
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -127,12 +127,12 @@
|
|
|
127
127
|
.btn.bg-gradient-#{$name} {
|
|
128
128
|
&:hover,
|
|
129
129
|
&:focus-visible {
|
|
130
|
-
background-color: #{shade-color($value, 10%)} !important;
|
|
130
|
+
background-color: #{lte-hex(shade-color($value, 10%))} !important;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
&:active,
|
|
134
134
|
&.active {
|
|
135
|
-
background-color: #{shade-color($value, 15%)} !important;
|
|
135
|
+
background-color: #{lte-hex(shade-color($value, 15%))} !important;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
// Colors: `primary` as a theme colour
|
|
5
|
+
// --------------------------------------------------------
|
|
6
|
+
// Bootstrap bakes `$primary` into components at build time — `.btn-primary`
|
|
7
|
+
// carries `--bs-btn-bg: #0d6efd`, not `var(--bs-primary)` — so overriding
|
|
8
|
+
// `--bs-primary` alone repaints utilities and leaves buttons blue.
|
|
9
|
+
//
|
|
10
|
+
// This block rewires those components to variables, then points the variables
|
|
11
|
+
// at a palette colour per `data-lte-primary` value:
|
|
12
|
+
//
|
|
13
|
+
// <html lang="en" data-lte-primary="teal">
|
|
14
|
+
//
|
|
15
|
+
// Nothing applies without the attribute, and it works on any container, so a
|
|
16
|
+
// section of a page can carry its own primary. Requested in #6107.
|
|
17
|
+
//
|
|
18
|
+
|
|
19
|
+
// Which way a state moves: Bootstrap darkens a colour that carries white text
|
|
20
|
+
// and lightens one that carries dark text (see its button-variant mixin).
|
|
21
|
+
@function lte-primary-state($color, $shade, $tint) {
|
|
22
|
+
$text: lte-contrast($color);
|
|
23
|
+
|
|
24
|
+
@if $text == $color-contrast-light or $text == $lte-palette-yiq-text-light {
|
|
25
|
+
@return lte-hex(shade-color($color, $shade));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@return lte-hex(tint-color($color, $tint));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Defaults, so `data-lte-primary` also works with a hand-written
|
|
32
|
+
// `--bs-primary` (a brand colour that is not in the palette).
|
|
33
|
+
[data-lte-primary] {
|
|
34
|
+
--#{$prefix}focus-ring-color: rgba(var(--#{$prefix}primary-rgb), #{$focus-ring-opacity});
|
|
35
|
+
--#{$lte-prefix}primary-color: #{$color-contrast-light};
|
|
36
|
+
--#{$lte-prefix}primary-color-rgb: #{to-rgb($color-contrast-light)};
|
|
37
|
+
--#{$lte-prefix}primary-hover: var(--#{$prefix}primary);
|
|
38
|
+
--#{$lte-prefix}primary-hover-border: var(--#{$prefix}primary);
|
|
39
|
+
--#{$lte-prefix}primary-active: var(--#{$prefix}primary);
|
|
40
|
+
--#{$lte-prefix}primary-active-border: var(--#{$prefix}primary);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Shade the hover / active states of a hand-written colour where the browser
|
|
44
|
+
// can do the maths. Guarded: without the guard, older browsers would resolve
|
|
45
|
+
// the variable to nothing and paint a transparent button.
|
|
46
|
+
@supports (color: color-mix(in srgb, red 50%, black)) {
|
|
47
|
+
[data-lte-primary] {
|
|
48
|
+
--#{$lte-prefix}primary-hover: color-mix(in srgb, var(--#{$prefix}primary) 85%, #{$black});
|
|
49
|
+
--#{$lte-prefix}primary-hover-border: color-mix(in srgb, var(--#{$prefix}primary) 80%, #{$black});
|
|
50
|
+
--#{$lte-prefix}primary-active: color-mix(in srgb, var(--#{$prefix}primary) 80%, #{$black});
|
|
51
|
+
--#{$lte-prefix}primary-active-border: color-mix(in srgb, var(--#{$prefix}primary) 75%, #{$black});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// The presets: every palette colour, plus Bootstrap's own theme colours, so
|
|
56
|
+
// `data-lte-primary="danger"` works without the palette being involved. The
|
|
57
|
+
// tokens are aliases — dark mode is already handled where they are defined.
|
|
58
|
+
@each $name, $value in map.merge($theme-colors, $lte-palette) {
|
|
59
|
+
@if $name != "primary" {
|
|
60
|
+
$link-hover: shift-color($value, $link-shade-percentage);
|
|
61
|
+
$text: lte-contrast($value);
|
|
62
|
+
|
|
63
|
+
[data-lte-primary="#{$name}"] {
|
|
64
|
+
--#{$prefix}primary: var(--#{$prefix}#{$name});
|
|
65
|
+
--#{$prefix}primary-rgb: var(--#{$prefix}#{$name}-rgb);
|
|
66
|
+
--#{$prefix}primary-text-emphasis: var(--#{$prefix}#{$name}-text-emphasis);
|
|
67
|
+
--#{$prefix}primary-bg-subtle: var(--#{$prefix}#{$name}-bg-subtle);
|
|
68
|
+
--#{$prefix}primary-border-subtle: var(--#{$prefix}#{$name}-border-subtle);
|
|
69
|
+
--#{$prefix}link-color: var(--#{$prefix}#{$name});
|
|
70
|
+
--#{$prefix}link-color-rgb: var(--#{$prefix}#{$name}-rgb);
|
|
71
|
+
--#{$prefix}link-hover-color: #{lte-hex($link-hover)};
|
|
72
|
+
--#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover)};
|
|
73
|
+
--#{$lte-prefix}primary-hover: #{lte-primary-state($value, $btn-hover-bg-shade-amount, $btn-hover-bg-tint-amount)};
|
|
74
|
+
--#{$lte-prefix}primary-hover-border: #{lte-primary-state($value, $btn-hover-border-shade-amount, $btn-hover-border-tint-amount)};
|
|
75
|
+
--#{$lte-prefix}primary-active: #{lte-primary-state($value, $btn-active-bg-shade-amount, $btn-active-bg-tint-amount)};
|
|
76
|
+
--#{$lte-prefix}primary-active-border: #{lte-primary-state($value, $btn-active-border-shade-amount, $btn-active-border-tint-amount)};
|
|
77
|
+
|
|
78
|
+
// The shared block above already says white; only the light colours,
|
|
79
|
+
// which carry dark text, need to say otherwise
|
|
80
|
+
@if $text != $color-contrast-light {
|
|
81
|
+
--#{$lte-prefix}primary-color: #{$text};
|
|
82
|
+
--#{$lte-prefix}primary-color-rgb: #{to-rgb($text)};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Links carry Bootstrap's dark-mode tint, as they do for the default primary.
|
|
89
|
+
@if $enable-dark-mode {
|
|
90
|
+
@include color-mode(dark, true) {
|
|
91
|
+
@each $name, $value in map.merge($theme-colors, $lte-palette) {
|
|
92
|
+
@if $name != "primary" {
|
|
93
|
+
$link-dark: tint-color($value, 40%);
|
|
94
|
+
$link-dark-hover: tint-color($link-dark, 20%);
|
|
95
|
+
|
|
96
|
+
// Both selectors: `data-bs-theme` and `data-lte-primary` usually sit on
|
|
97
|
+
// the same <html> element, which a descendant combinator would miss.
|
|
98
|
+
&[data-lte-primary="#{$name}"],
|
|
99
|
+
[data-lte-primary="#{$name}"] {
|
|
100
|
+
--#{$prefix}link-color: #{lte-hex($link-dark)};
|
|
101
|
+
--#{$prefix}link-color-rgb: #{to-rgb($link-dark)};
|
|
102
|
+
--#{$prefix}link-hover-color: #{lte-hex($link-dark-hover)};
|
|
103
|
+
--#{$prefix}link-hover-color-rgb: #{to-rgb($link-dark-hover)};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// The components that bake the colour
|
|
111
|
+
// --------------------------------------------------------
|
|
112
|
+
// Deliberately a second `[data-lte-primary]` block: the variable defaults above
|
|
113
|
+
// have to be declared before the per-colour presets (same specificity), and the
|
|
114
|
+
// component rules have to come after them.
|
|
115
|
+
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
116
|
+
[data-lte-primary] {
|
|
117
|
+
.btn-primary {
|
|
118
|
+
--#{$prefix}btn-color: var(--#{$lte-prefix}primary-color);
|
|
119
|
+
--#{$prefix}btn-bg: var(--#{$prefix}primary);
|
|
120
|
+
--#{$prefix}btn-border-color: var(--#{$prefix}primary);
|
|
121
|
+
--#{$prefix}btn-hover-color: var(--#{$lte-prefix}primary-color);
|
|
122
|
+
--#{$prefix}btn-hover-bg: var(--#{$lte-prefix}primary-hover);
|
|
123
|
+
--#{$prefix}btn-hover-border-color: var(--#{$lte-prefix}primary-hover-border);
|
|
124
|
+
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}primary-rgb);
|
|
125
|
+
--#{$prefix}btn-active-color: var(--#{$lte-prefix}primary-color);
|
|
126
|
+
--#{$prefix}btn-active-bg: var(--#{$lte-prefix}primary-active);
|
|
127
|
+
--#{$prefix}btn-active-border-color: var(--#{$lte-prefix}primary-active-border);
|
|
128
|
+
--#{$prefix}btn-disabled-color: var(--#{$lte-prefix}primary-color);
|
|
129
|
+
--#{$prefix}btn-disabled-bg: var(--#{$prefix}primary);
|
|
130
|
+
--#{$prefix}btn-disabled-border-color: var(--#{$prefix}primary);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.btn-outline-primary {
|
|
134
|
+
--#{$prefix}btn-color: var(--#{$prefix}primary);
|
|
135
|
+
--#{$prefix}btn-border-color: var(--#{$prefix}primary);
|
|
136
|
+
--#{$prefix}btn-hover-color: var(--#{$lte-prefix}primary-color);
|
|
137
|
+
--#{$prefix}btn-hover-bg: var(--#{$prefix}primary);
|
|
138
|
+
--#{$prefix}btn-hover-border-color: var(--#{$prefix}primary);
|
|
139
|
+
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}primary-rgb);
|
|
140
|
+
--#{$prefix}btn-active-color: var(--#{$lte-prefix}primary-color);
|
|
141
|
+
--#{$prefix}btn-active-bg: var(--#{$prefix}primary);
|
|
142
|
+
--#{$prefix}btn-active-border-color: var(--#{$prefix}primary);
|
|
143
|
+
--#{$prefix}btn-disabled-color: var(--#{$prefix}primary);
|
|
144
|
+
--#{$prefix}btn-disabled-border-color: var(--#{$prefix}primary);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.btn-link {
|
|
148
|
+
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}primary-rgb);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// `.text-bg-primary` hard-codes white; the rest of it already reads the token
|
|
152
|
+
.text-bg-primary {
|
|
153
|
+
color: var(--#{$lte-prefix}primary-color) !important;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.link-primary {
|
|
157
|
+
&:hover,
|
|
158
|
+
&:focus {
|
|
159
|
+
color: RGBA(var(--#{$prefix}link-hover-color-rgb), var(--#{$prefix}link-opacity, 1)) !important;
|
|
160
|
+
text-decoration-color: RGBA(var(--#{$prefix}link-hover-color-rgb), var(--#{$prefix}link-underline-opacity, 1)) !important;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.dropdown-menu {
|
|
165
|
+
--#{$prefix}dropdown-link-active-color: var(--#{$lte-prefix}primary-color);
|
|
166
|
+
--#{$prefix}dropdown-link-active-bg: var(--#{$prefix}primary);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.nav-pills {
|
|
170
|
+
--#{$prefix}nav-pills-link-active-color: var(--#{$lte-prefix}primary-color);
|
|
171
|
+
--#{$prefix}nav-pills-link-active-bg: var(--#{$prefix}primary);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.pagination {
|
|
175
|
+
--#{$prefix}pagination-active-color: var(--#{$lte-prefix}primary-color);
|
|
176
|
+
--#{$prefix}pagination-active-bg: var(--#{$prefix}primary);
|
|
177
|
+
--#{$prefix}pagination-active-border-color: var(--#{$prefix}primary);
|
|
178
|
+
--#{$prefix}pagination-focus-box-shadow: 0 0 0 $pagination-focus-box-shadow-width rgba(var(--#{$prefix}primary-rgb), #{$focus-ring-opacity});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.progress,
|
|
182
|
+
.progress-stacked {
|
|
183
|
+
--#{$prefix}progress-bar-color: var(--#{$lte-prefix}primary-color);
|
|
184
|
+
--#{$prefix}progress-bar-bg: var(--#{$prefix}primary);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.list-group {
|
|
188
|
+
--#{$prefix}list-group-active-color: var(--#{$lte-prefix}primary-color);
|
|
189
|
+
--#{$prefix}list-group-active-bg: var(--#{$prefix}primary);
|
|
190
|
+
--#{$prefix}list-group-active-border-color: var(--#{$prefix}primary);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// The open-state chevron is a data URI in Bootstrap's blue; the closed one is
|
|
194
|
+
// body-coloured and rotates just the same
|
|
195
|
+
.accordion {
|
|
196
|
+
--#{$prefix}accordion-btn-active-icon: var(--#{$prefix}accordion-btn-icon);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Forms
|
|
200
|
+
.form-control:focus,
|
|
201
|
+
.form-select:focus {
|
|
202
|
+
border-color: var(--#{$prefix}primary);
|
|
203
|
+
box-shadow: var(--#{$prefix}box-shadow-inset), 0 0 0 $input-btn-focus-width rgba(var(--#{$prefix}primary-rgb), #{$focus-ring-opacity});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.form-check-input:focus {
|
|
207
|
+
border-color: var(--#{$prefix}primary);
|
|
208
|
+
box-shadow: 0 0 0 $input-btn-focus-width rgba(var(--#{$prefix}primary-rgb), #{$focus-ring-opacity});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.form-check-input:checked,
|
|
212
|
+
.form-check-input[type="checkbox"]:indeterminate {
|
|
213
|
+
background-color: var(--#{$prefix}primary);
|
|
214
|
+
border-color: var(--#{$prefix}primary);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Focus paints a blue knob into a data URI; keep the resting one instead
|
|
218
|
+
.form-switch .form-check-input:focus:not(:checked) {
|
|
219
|
+
--#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image)};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.form-range {
|
|
223
|
+
&::-webkit-slider-thumb {
|
|
224
|
+
background-color: var(--#{$prefix}primary);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&::-moz-range-thumb {
|
|
228
|
+
background-color: var(--#{$prefix}primary);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// AdminLTE's own primary hooks
|
|
233
|
+
.card-primary,
|
|
234
|
+
.bg-primary,
|
|
235
|
+
.text-bg-primary {
|
|
236
|
+
--#{$lte-prefix}card-variant-bg: var(--#{$prefix}primary);
|
|
237
|
+
--#{$lte-prefix}card-variant-bg-rgb: var(--#{$prefix}primary-rgb);
|
|
238
|
+
--#{$lte-prefix}card-variant-color: var(--#{$lte-prefix}primary-color);
|
|
239
|
+
--#{$lte-prefix}card-variant-color-rgb: var(--#{$lte-prefix}primary-color-rgb);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.direct-chat-primary {
|
|
243
|
+
--#{$lte-prefix}direct-chat-color: var(--#{$lte-prefix}primary-color);
|
|
244
|
+
--#{$lte-prefix}direct-chat-bg: var(--#{$prefix}primary);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.toast-primary {
|
|
248
|
+
--#{$prefix}toast-header-color: var(--#{$lte-prefix}primary-color);
|
|
249
|
+
--#{$prefix}toast-header-bg: var(--#{$prefix}primary);
|
|
250
|
+
--#{$prefix}toast-header-border-color: var(--#{$prefix}primary);
|
|
251
|
+
--#{$prefix}toast-border-color: var(--#{$prefix}primary);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
@use "sass:color";
|
|
1
2
|
@use "sass:list";
|
|
2
3
|
@use "sass:map";
|
|
4
|
+
@use "sass:math";
|
|
5
|
+
@use "sass:string";
|
|
3
6
|
|
|
4
7
|
//
|
|
5
8
|
// Colors: Variables
|
|
@@ -67,6 +70,16 @@ $lte-palette-aliases: () !default;
|
|
|
67
70
|
// palettes — `3` is WCAG AA for large text and UI components.
|
|
68
71
|
$lte-palette-min-contrast-ratio: $min-contrast-ratio !default;
|
|
69
72
|
|
|
73
|
+
// Which rule picks that text colour: "wcag" (Bootstrap 5's color-contrast(),
|
|
74
|
+
// governed by the ratio above) or "yiq" — the Bootstrap 4 / AdminLTE 3 rule
|
|
75
|
+
// (perceived brightness against a threshold), which is what gives the v3
|
|
76
|
+
// palette its familiar white-on-lightblue / white-on-teal look.
|
|
77
|
+
// adminlte-colors-v3.scss sets "yiq"; the designed palette uses "wcag".
|
|
78
|
+
$lte-palette-contrast: "wcag" !default;
|
|
79
|
+
$lte-palette-yiq-threshold: 150 !default;
|
|
80
|
+
$lte-palette-yiq-text-dark: #1f2d3d !default; // AdminLTE 3's $yiq-text-dark
|
|
81
|
+
$lte-palette-yiq-text-light: $white !default;
|
|
82
|
+
|
|
70
83
|
// Resolve custom colours and aliases into the palette
|
|
71
84
|
// --------------------------------------------------------
|
|
72
85
|
@if list.length($lte-palette-custom) > 0 {
|
|
@@ -80,6 +93,40 @@ $lte-palette-min-contrast-ratio: $min-contrast-ratio !default;
|
|
|
80
93
|
$lte-palette: map.merge($lte-palette, ($alias: map.get($lte-palette, $target)));
|
|
81
94
|
}
|
|
82
95
|
|
|
96
|
+
// Serialise a computed colour as `#0e6864`. Dart Sass writes `rgb(14, 104, 100)`
|
|
97
|
+
// (or worse, `rgb(5.647%, 40.784%, 39.216%)`) and cleancss leaves values inside
|
|
98
|
+
// custom properties alone, so the long form would ship as-is — this is the same
|
|
99
|
+
// colour at a third of the bytes.
|
|
100
|
+
@function lte-hex-channel($value) {
|
|
101
|
+
$digits: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "d" "e" "f";
|
|
102
|
+
$n: math.clamp(0, math.round($value), 255);
|
|
103
|
+
@return list.nth($digits, math.floor(math.div($n, 16)) + 1) + list.nth($digits, $n % 16 + 1);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@function lte-hex($color) {
|
|
107
|
+
// stylelint-disable scss/at-function-named-arguments -- `$space` is required by color.channel()
|
|
108
|
+
$r: color.channel($color, "red", $space: rgb);
|
|
109
|
+
$g: color.channel($color, "green", $space: rgb);
|
|
110
|
+
$b: color.channel($color, "blue", $space: rgb);
|
|
111
|
+
// stylelint-enable scss/at-function-named-arguments
|
|
112
|
+
|
|
113
|
+
@return string.unquote("##{lte-hex-channel($r)}#{lte-hex-channel($g)}#{lte-hex-channel($b)}");
|
|
114
|
+
}
|
|
115
|
+
|
|
83
116
|
@function lte-contrast($color) {
|
|
117
|
+
@if $lte-palette-contrast == "yiq" {
|
|
118
|
+
// stylelint-disable scss/at-function-named-arguments -- `$space` is required by color.channel()
|
|
119
|
+
$r: color.channel($color, "red", $space: rgb);
|
|
120
|
+
$g: color.channel($color, "green", $space: rgb);
|
|
121
|
+
$b: color.channel($color, "blue", $space: rgb);
|
|
122
|
+
// stylelint-enable scss/at-function-named-arguments
|
|
123
|
+
$yiq: math.div($r * 299 + $g * 587 + $b * 114, 1000);
|
|
124
|
+
@if $yiq >= $lte-palette-yiq-threshold {
|
|
125
|
+
@return $lte-palette-yiq-text-dark;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@return $lte-palette-yiq-text-light;
|
|
129
|
+
}
|
|
130
|
+
|
|
84
131
|
@return color-contrast($color, $min-contrast-ratio: $lte-palette-min-contrast-ratio);
|
|
85
132
|
}
|
package/src/ts/adminlte.ts
CHANGED
|
@@ -10,7 +10,7 @@ import SidebarSearch from './sidebar-search.js'
|
|
|
10
10
|
import { initAccessibility } from './accessibility.js'
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* AdminLTE v4.
|
|
13
|
+
* AdminLTE v4.6.0
|
|
14
14
|
* Author: Colorlib
|
|
15
15
|
* Website: AdminLTE.io <https://adminlte.io>
|
|
16
16
|
* License: Open source - MIT <https://opensource.org/licenses/MIT>
|