admin-lte 4.7.0 → 4.8.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/css/adminlte-colors-v3.css +164 -9
  3. package/dist/css/adminlte-colors-v3.css.map +1 -1
  4. package/dist/css/adminlte-colors-v3.min.css +2 -2
  5. package/dist/css/adminlte-colors-v3.min.css.map +1 -1
  6. package/dist/css/adminlte-colors-v3.rtl.css +164 -9
  7. package/dist/css/adminlte-colors-v3.rtl.css.map +1 -1
  8. package/dist/css/adminlte-colors-v3.rtl.min.css +2 -2
  9. package/dist/css/adminlte-colors-v3.rtl.min.css.map +1 -1
  10. package/dist/css/adminlte-colors.css +1 -1
  11. package/dist/css/adminlte-colors.css.map +1 -1
  12. package/dist/css/adminlte-colors.min.css +1 -1
  13. package/dist/css/adminlte-colors.min.css.map +1 -1
  14. package/dist/css/adminlte-colors.rtl.css +1 -1
  15. package/dist/css/adminlte-colors.rtl.css.map +1 -1
  16. package/dist/css/adminlte-colors.rtl.min.css +1 -1
  17. package/dist/css/adminlte-colors.rtl.min.css.map +1 -1
  18. package/dist/css/adminlte-docs.css +1 -1
  19. package/dist/css/adminlte-docs.css.map +1 -1
  20. package/dist/css/adminlte-docs.min.css +1 -1
  21. package/dist/css/adminlte-docs.min.css.map +1 -1
  22. package/dist/css/adminlte-docs.rtl.css +1 -1
  23. package/dist/css/adminlte-docs.rtl.css.map +1 -1
  24. package/dist/css/adminlte-docs.rtl.min.css +1 -1
  25. package/dist/css/adminlte-docs.rtl.min.css.map +1 -1
  26. package/dist/css/adminlte-select2.css +1 -1
  27. package/dist/css/adminlte-select2.css.map +1 -1
  28. package/dist/css/adminlte-select2.min.css +1 -1
  29. package/dist/css/adminlte-select2.min.css.map +1 -1
  30. package/dist/css/adminlte-select2.rtl.css +1 -1
  31. package/dist/css/adminlte-select2.rtl.css.map +1 -1
  32. package/dist/css/adminlte-select2.rtl.min.css +1 -1
  33. package/dist/css/adminlte-select2.rtl.min.css.map +1 -1
  34. package/dist/css/adminlte.css +1 -1
  35. package/dist/css/adminlte.css.map +1 -1
  36. package/dist/css/adminlte.min.css +1 -1
  37. package/dist/css/adminlte.min.css.map +1 -1
  38. package/dist/css/adminlte.rtl.css +1 -1
  39. package/dist/css/adminlte.rtl.css.map +1 -1
  40. package/dist/css/adminlte.rtl.min.css +1 -1
  41. package/dist/css/adminlte.rtl.min.css.map +1 -1
  42. package/dist/js/adminlte.esm.js +1 -1
  43. package/dist/js/adminlte.esm.min.js +1 -1
  44. package/dist/js/adminlte.js +1 -1
  45. package/dist/js/adminlte.min.js +1 -1
  46. package/package.json +1 -1
  47. package/src/scss/adminlte-colors-v3.scss +1 -1
  48. package/src/scss/adminlte-colors.scss +1 -1
  49. package/src/scss/adminlte-docs.scss +1 -1
  50. package/src/scss/adminlte-select2.scss +1 -1
  51. package/src/scss/adminlte.scss +1 -1
  52. package/src/scss/colors/_colors.scss +34 -0
  53. package/src/scss/colors/_primary.scss +28 -8
  54. package/src/scss/colors/_variables.scss +18 -0
  55. package/src/ts/adminlte.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * AdminLTE v4.7.0 (https://adminlte.io)
2
+ * AdminLTE v4.8.0 (https://adminlte.io)
3
3
  * Copyright 2014-2026 Colorlib <https://colorlib.com>
4
4
  * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * AdminLTE v4.7.0 (https://adminlte.io)
2
+ * AdminLTE v4.8.0 (https://adminlte.io)
3
3
  * Copyright 2014-2026 Colorlib <https://colorlib.com>
4
4
  * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * AdminLTE v4.7.0 (https://adminlte.io)
2
+ * AdminLTE v4.8.0 (https://adminlte.io)
3
3
  * Copyright 2014-2026 Colorlib <https://colorlib.com>
4
4
  * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * AdminLTE v4.7.0 (https://adminlte.io)
2
+ * AdminLTE v4.8.0 (https://adminlte.io)
3
3
  * Copyright 2014-2026 Colorlib <https://colorlib.com>
4
4
  * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
5
5
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "admin-lte",
3
3
  "description": "Responsive open source admin dashboard and control panel.",
4
- "version": "4.7.0",
4
+ "version": "4.8.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Colorlib <https://colorlib.com>",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * AdminLTE v4.7.0 — AdminLTE 3 color palette (legacy)
2
+ * AdminLTE v4.8.0 — AdminLTE 3 color palette (legacy)
3
3
  * Opt-in. The extended colours exactly as AdminLTE 3 shipped them — same
4
4
  * names, same values, same text-colour rule (Bootstrap 4's YIQ brightness
5
5
  * test, so lightblue, olive and teal take white text as they did) — with
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * AdminLTE v4.7.0 — Extended color palette
2
+ * AdminLTE v4.8.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-*`
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * AdminLTE v4.7.0 — documentation styles
2
+ * AdminLTE v4.8.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.7.0 — Select2 compatibility theme
2
+ * AdminLTE v4.8.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * AdminLTE v4.7.0
2
+ * AdminLTE v4.8.0
3
3
  * Author: Colorlib
4
4
  * Website: AdminLTE.io <https://adminlte.io>
5
5
  * License: Open source - MIT <https://opensource.org/licenses/MIT>
@@ -137,6 +137,40 @@
137
137
  }
138
138
  }
139
139
 
140
+ // `data-lte-contrast="aa"`
141
+ // --------------------------------------------------------
142
+ // Opt in to WCAG AA text on the backgrounds where this palette's own rule falls
143
+ // short. Backgrounds are untouched — every colour keeps its exact value — only
144
+ // the text on top of them flips. Emitted per colour only where the two rules
145
+ // disagree, so the designed palette (every colour AA with white) adds nothing
146
+ // here and the v3 sheet carries the eight that need it (#6110).
147
+ //
148
+ // A coloured sidebar or header carrying a flipped colour should also pair with
149
+ // `data-bs-theme="light"` instead of `"dark"`, so its nav links follow the text.
150
+ [data-lte-contrast="aa"] {
151
+ @each $name, $value in $lte-palette {
152
+ $aa: lte-contrast-aa($value);
153
+
154
+ @if lte-needs-aa($value) {
155
+ .text-bg-#{$name},
156
+ .bg-gradient-#{$name} {
157
+ color: $aa !important;
158
+ }
159
+
160
+ .card-#{$name},
161
+ .bg-#{$name},
162
+ .text-bg-#{$name} {
163
+ --#{$lte-prefix}card-variant-color: #{$aa};
164
+ --#{$lte-prefix}card-variant-color-rgb: #{to-rgb($aa)};
165
+ }
166
+
167
+ .direct-chat-#{$name} {
168
+ --#{$lte-prefix}direct-chat-color: #{$aa};
169
+ }
170
+ }
171
+ }
172
+ }
173
+
140
174
  // Cascade order
141
175
  // --------------------------------------------------------
142
176
  // This sheet loads AFTER adminlte.css, so `.bg-navy { --bs-bg-opacity: 1 }`
@@ -18,9 +18,7 @@
18
18
 
19
19
  // Which way a state moves: Bootstrap darkens a colour that carries white text
20
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
-
21
+ @function lte-primary-state($color, $shade, $tint, $text) {
24
22
  @if $text == $color-contrast-light or $text == $lte-palette-yiq-text-light {
25
23
  @return lte-hex(shade-color($color, $shade));
26
24
  }
@@ -58,7 +56,11 @@
58
56
  @each $name, $value in map.merge($theme-colors, $lte-palette) {
59
57
  @if $name != "primary" {
60
58
  $link-hover: shift-color($value, $link-shade-percentage);
61
- $text: lte-contrast($value);
59
+ // Palette colours follow this sheet's contrast rule; Bootstrap's own theme
60
+ // colours keep Bootstrap's, so `data-lte-primary="info"` agrees with
61
+ // `.btn-info` and `.text-bg-info` on the same page rather than taking the
62
+ // v3 YIQ rule's white text on cyan (1.96:1).
63
+ $text: if(map.has-key($lte-palette, $name), lte-contrast($value), color-contrast($value));
62
64
 
63
65
  [data-lte-primary="#{$name}"] {
64
66
  --#{$prefix}primary: var(--#{$prefix}#{$name});
@@ -70,10 +72,10 @@
70
72
  --#{$prefix}link-color-rgb: var(--#{$prefix}#{$name}-rgb);
71
73
  --#{$prefix}link-hover-color: #{lte-hex($link-hover)};
72
74
  --#{$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)};
75
+ --#{$lte-prefix}primary-hover: #{lte-primary-state($value, $btn-hover-bg-shade-amount, $btn-hover-bg-tint-amount, $text)};
76
+ --#{$lte-prefix}primary-hover-border: #{lte-primary-state($value, $btn-hover-border-shade-amount, $btn-hover-border-tint-amount, $text)};
77
+ --#{$lte-prefix}primary-active: #{lte-primary-state($value, $btn-active-bg-shade-amount, $btn-active-bg-tint-amount, $text)};
78
+ --#{$lte-prefix}primary-active-border: #{lte-primary-state($value, $btn-active-border-shade-amount, $btn-active-border-tint-amount, $text)};
77
79
 
78
80
  // The shared block above already says white; only the light colours,
79
81
  // which carry dark text, need to say otherwise
@@ -107,6 +109,24 @@
107
109
  }
108
110
  }
109
111
 
112
+ // `data-lte-contrast="aa"` for the primary text colour, same rule as the
113
+ // utilities: flip only where the palette's own pick misses AA (#6110).
114
+ @each $name, $value in map.merge($theme-colors, $lte-palette) {
115
+ @if $name != "primary" {
116
+ $aa: lte-contrast-aa($value);
117
+ $text: if(map.has-key($lte-palette, $name), lte-contrast($value), color-contrast($value));
118
+
119
+ @if lte-needs-aa($value, $text) {
120
+ // `data-lte-contrast` and `data-lte-primary` are usually the same element
121
+ [data-lte-contrast="aa"][data-lte-primary="#{$name}"],
122
+ [data-lte-contrast="aa"] [data-lte-primary="#{$name}"] {
123
+ --#{$lte-prefix}primary-color: #{$aa};
124
+ --#{$lte-prefix}primary-color-rgb: #{to-rgb($aa)};
125
+ }
126
+ }
127
+ }
128
+ }
129
+
110
130
  // The components that bake the colour
111
131
  // --------------------------------------------------------
112
132
  // Deliberately a second `[data-lte-primary]` block: the variable defaults above
@@ -113,6 +113,24 @@ $lte-palette-yiq-text-light: $white !default;
113
113
  @return string.unquote("##{lte-hex-channel($r)}#{lte-hex-channel($g)}#{lte-hex-channel($b)}");
114
114
  }
115
115
 
116
+ // The text colour WCAG AA needs on this background, whatever rule the sheet
117
+ // itself uses. Bootstrap's `color-contrast()` keeps white where white clears the
118
+ // ratio and returns black where it does not — note that AdminLTE 3's own dark
119
+ // ink (#1f2d3d) is NOT enough here: it reaches 4.5:1 on only two of the eight
120
+ // v3 colours that fall short (#6110).
121
+ @function lte-contrast-aa($color) {
122
+ @return color-contrast($color, $min-contrast-ratio: 4.5);
123
+ }
124
+
125
+ // True only when the text colour this sheet assigns actually falls short. The
126
+ // test is the ratio, not "is it a different colour": v3 writes dark text as
127
+ // #1f2d3d, which clears AA on lime, orange and yellow — those must not flip
128
+ // just because AA's dark ink is pure black.
129
+ @function lte-needs-aa($color, $text: null) {
130
+ $on: if($text == null, lte-contrast($color), $text);
131
+ @return contrast-ratio($color, $on) < 4.5;
132
+ }
133
+
116
134
  @function lte-contrast($color) {
117
135
  @if $lte-palette-contrast == "yiq" {
118
136
  // stylelint-disable scss/at-function-named-arguments -- `$space` is required by color.channel()
@@ -10,7 +10,7 @@ import SidebarSearch from './sidebar-search.js'
10
10
  import { initAccessibility } from './accessibility.js'
11
11
 
12
12
  /**
13
- * AdminLTE v4.7.0
13
+ * AdminLTE v4.8.0
14
14
  * Author: Colorlib
15
15
  * Website: AdminLTE.io <https://adminlte.io>
16
16
  * License: Open source - MIT <https://opensource.org/licenses/MIT>