admin-lte 4.0.2 → 4.1.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 (146) hide show
  1. package/ACCESSIBILITY-COMPLIANCE.md +60 -339
  2. package/CHANGELOG.md +66 -0
  3. package/README.md +15 -2
  4. package/dist/css/adminlte-docs.css +878 -0
  5. package/dist/css/adminlte-docs.css.map +1 -0
  6. package/dist/css/adminlte-docs.min.css +7 -0
  7. package/dist/css/adminlte-docs.min.css.map +1 -0
  8. package/dist/css/adminlte-docs.rtl.css +877 -0
  9. package/dist/css/adminlte-docs.rtl.css.map +1 -0
  10. package/dist/css/adminlte-docs.rtl.min.css +7 -0
  11. package/dist/css/adminlte-docs.rtl.min.css.map +1 -0
  12. package/dist/css/adminlte.css +1176 -2718
  13. package/dist/css/adminlte.css.map +1 -1
  14. package/dist/css/adminlte.min.css +2 -2
  15. package/dist/css/adminlte.min.css.map +1 -1
  16. package/dist/css/adminlte.rtl.css +1176 -2718
  17. package/dist/css/adminlte.rtl.css.map +1 -1
  18. package/dist/css/adminlte.rtl.min.css +2 -2
  19. package/dist/css/adminlte.rtl.min.css.map +1 -1
  20. package/dist/js/adminlte.esm.js +1365 -0
  21. package/dist/js/adminlte.esm.js.map +1 -0
  22. package/dist/js/adminlte.esm.min.js +7 -0
  23. package/dist/js/adminlte.esm.min.js.map +1 -0
  24. package/dist/js/adminlte.js +606 -310
  25. package/dist/js/adminlte.js.map +1 -1
  26. package/dist/js/adminlte.min.js +2 -2
  27. package/dist/js/adminlte.min.js.map +1 -1
  28. package/dist/js/types/accessibility.d.ts +46 -0
  29. package/dist/js/types/adminlte.d.ts +9 -0
  30. package/dist/js/types/base-component.d.ts +36 -0
  31. package/dist/js/types/card-widget.d.ts +30 -0
  32. package/dist/js/types/color-mode.d.ts +56 -0
  33. package/dist/js/types/direct-chat.d.ts +19 -0
  34. package/dist/js/types/fullscreen.d.ts +21 -0
  35. package/dist/js/types/layout.d.ts +19 -0
  36. package/dist/js/types/push-menu.d.ts +102 -0
  37. package/dist/js/types/treeview.d.ts +27 -0
  38. package/dist/js/types/util/index.d.ts +42 -0
  39. package/package.json +60 -21
  40. package/src/scss/_app-header.scss +3 -1
  41. package/src/scss/_app-main.scss +4 -0
  42. package/src/scss/_app-sidebar.scss +3 -1
  43. package/src/scss/_bootstrap-overrides.scss +60 -0
  44. package/src/scss/_callouts.scss +13 -3
  45. package/src/scss/_dropdown.scss +3 -1
  46. package/src/scss/_info-box.scss +3 -1
  47. package/src/scss/_progress-bars.scss +3 -1
  48. package/src/scss/_table.scss +4 -2
  49. package/src/scss/adminlte-docs.scss +25 -0
  50. package/src/scss/adminlte.scss +5 -4
  51. package/src/scss/pages/_login_and_register.scss +3 -1
  52. package/src/scss/parts/_core.scss +0 -1
  53. package/src/ts/accessibility.ts +129 -69
  54. package/src/ts/adminlte.ts +3 -1
  55. package/src/ts/base-component.ts +84 -0
  56. package/src/ts/card-widget.ts +134 -85
  57. package/src/ts/color-mode.ts +174 -0
  58. package/src/ts/direct-chat.ts +38 -32
  59. package/src/ts/fullscreen.ts +78 -63
  60. package/src/ts/layout.ts +2 -1
  61. package/src/ts/push-menu.ts +93 -44
  62. package/src/ts/treeview.ts +107 -47
  63. package/src/ts/util/index.ts +114 -29
  64. package/.browserslistrc +0 -17
  65. package/.prettierrc +0 -6
  66. package/CODE_OF_CONDUCT.md +0 -43
  67. package/SECURITY.md +0 -99
  68. package/dist/UI/general.html +0 -2317
  69. package/dist/UI/icons.html +0 -1126
  70. package/dist/UI/timeline.html +0 -1212
  71. package/dist/docs/browser-support.html +0 -826
  72. package/dist/docs/color-mode.html +0 -1142
  73. package/dist/docs/components/main-header.html +0 -1209
  74. package/dist/docs/components/main-sidebar.html +0 -924
  75. package/dist/docs/customization.html +0 -1080
  76. package/dist/docs/deployment.html +0 -1145
  77. package/dist/docs/faq.html +0 -1392
  78. package/dist/docs/getting-started.html +0 -991
  79. package/dist/docs/how-to-contribute.html +0 -890
  80. package/dist/docs/index.html +0 -16
  81. package/dist/docs/integrations.html +0 -1231
  82. package/dist/docs/introduction.html +0 -1008
  83. package/dist/docs/javascript/accessibility.html +0 -949
  84. package/dist/docs/javascript/card-widget.html +0 -1019
  85. package/dist/docs/javascript/direct-chat.html +0 -896
  86. package/dist/docs/javascript/fullscreen.html +0 -905
  87. package/dist/docs/javascript/layout.html +0 -908
  88. package/dist/docs/javascript/plugins-overview.html +0 -1144
  89. package/dist/docs/javascript/pushmenu.html +0 -1045
  90. package/dist/docs/javascript/treeview.html +0 -1024
  91. package/dist/docs/layout-blueprint.html +0 -1087
  92. package/dist/docs/layout.html +0 -842
  93. package/dist/docs/license.html +0 -807
  94. package/dist/docs/migration.html +0 -1149
  95. package/dist/docs/recipes.html +0 -1185
  96. package/dist/docs/rtl.html +0 -957
  97. package/dist/examples/lockscreen.html +0 -249
  98. package/dist/examples/login-v2.html +0 -282
  99. package/dist/examples/login.html +0 -272
  100. package/dist/examples/register-v2.html +0 -291
  101. package/dist/examples/register.html +0 -277
  102. package/dist/forms/elements.html +0 -1405
  103. package/dist/forms/layout.html +0 -1267
  104. package/dist/forms/validation.html +0 -1275
  105. package/dist/forms/wizard.html +0 -1410
  106. package/dist/generate/theme.html +0 -1082
  107. package/dist/index.html +0 -1745
  108. package/dist/index2.html +0 -2277
  109. package/dist/index3.html +0 -1532
  110. package/dist/layout/collapsed-sidebar-without-hover.html +0 -1144
  111. package/dist/layout/collapsed-sidebar.html +0 -1137
  112. package/dist/layout/fixed-complete.html +0 -1138
  113. package/dist/layout/fixed-footer.html +0 -1136
  114. package/dist/layout/fixed-header.html +0 -1136
  115. package/dist/layout/fixed-sidebar.html +0 -1138
  116. package/dist/layout/layout-custom-area.html +0 -1177
  117. package/dist/layout/layout-rtl.html +0 -1137
  118. package/dist/layout/logo-switch.html +0 -683
  119. package/dist/layout/sidebar-mini.html +0 -1137
  120. package/dist/layout/unfixed-sidebar.html +0 -1136
  121. package/dist/mailbox/compose.html +0 -1151
  122. package/dist/mailbox/inbox.html +0 -1509
  123. package/dist/mailbox/read.html +0 -1202
  124. package/dist/pages/404.html +0 -239
  125. package/dist/pages/500.html +0 -227
  126. package/dist/pages/calendar.html +0 -1266
  127. package/dist/pages/chat.html +0 -1427
  128. package/dist/pages/faq.html +0 -1383
  129. package/dist/pages/file-manager.html +0 -1835
  130. package/dist/pages/invoice.html +0 -1199
  131. package/dist/pages/kanban.html +0 -1439
  132. package/dist/pages/maintenance.html +0 -230
  133. package/dist/pages/pricing.html +0 -1279
  134. package/dist/pages/profile.html +0 -1382
  135. package/dist/pages/projects.html +0 -1644
  136. package/dist/pages/settings.html +0 -1387
  137. package/dist/tables/data.html +0 -1319
  138. package/dist/tables/simple.html +0 -1435
  139. package/dist/widgets/cards.html +0 -1356
  140. package/dist/widgets/info-box.html +0 -1429
  141. package/dist/widgets/small-box.html +0 -1225
  142. package/eslint.config.js +0 -82
  143. package/github-issue-response.md +0 -40
  144. package/index.html +0 -12
  145. package/netlify.toml +0 -16
  146. package/src/scss/_bootstrap-variables.scss +0 -1766
package/eslint.config.js DELETED
@@ -1,82 +0,0 @@
1
- import globals from 'globals'
2
- import pluginJs from '@eslint/js'
3
- import tseslint from 'typescript-eslint'
4
- import pluginUnicorn from 'eslint-plugin-unicorn'
5
- import astroPlugin from 'eslint-plugin-astro'
6
-
7
- export default [
8
- {
9
- ignores: [
10
- "dist/",
11
- "node_modules/",
12
- ".cache/",
13
- ".astro/",
14
- "**/*.min.js",
15
- "**/plugins/",
16
- "/.temp/",
17
- "src/html/docs/",
18
- "docs_html/",
19
- "src/html/public/"
20
- ]
21
- },
22
- ...tseslint.config(
23
- pluginJs.configs.recommended,
24
- ...tseslint.configs.recommended
25
- ),
26
- {
27
- ...pluginUnicorn.configs['flat/recommended']
28
- },
29
- ...astroPlugin.configs['flat/recommended'],
30
- {
31
- files: ['**/*.{js,mjs,cjs,ts,mts,cts,astro}'],
32
- languageOptions: {
33
- globals: {
34
- ...globals.browser,
35
- ...globals.node
36
- }
37
- },
38
- rules: {
39
- 'arrow-body-style': 'off',
40
- 'capitalized-comments': 'off',
41
- 'comma-dangle': ['error', 'never'],
42
- 'indent': ['error', 2, { 'MemberExpression': 'off', 'SwitchCase': 1 }],
43
- 'max-params': ['warn', 5],
44
- 'multiline-ternary': ['error', 'always-multiline'],
45
- 'new-cap': 'off',
46
- 'no-console': 'off',
47
- 'no-negated-condition': 'off',
48
- 'object-curly-spacing': ['error', 'always'],
49
- 'operator-linebreak': ['error', 'after'],
50
- 'no-unused-vars': 'warn',
51
- 'no-new': 'off',
52
- 'semi': 'off',
53
- 'unicorn/explicit-length-check': 'off',
54
- 'unicorn/no-array-callback-reference': 'off',
55
- 'unicorn/no-array-for-each': 'off',
56
- 'unicorn/no-array-method-this-argument': 'off',
57
- 'unicorn/no-null': 'off',
58
- 'unicorn/no-unused-properties': 'off',
59
- 'unicorn/prefer-array-flat': 'off',
60
- 'unicorn/prefer-dom-node-dataset': 'off',
61
- 'unicorn/prefer-export-from': 'off',
62
- 'unicorn/prefer-module': 'off',
63
- 'unicorn/prefer-query-selector': 'off',
64
- 'unicorn/prefer-spread': 'off',
65
- 'unicorn/prefer-string-replace-all': 'off',
66
- 'unicorn/prevent-abbreviations': 'off',
67
- 'astro/no-set-html-directive': 'off'
68
- }
69
- },
70
- {
71
- files: ['src/config/**'],
72
- languageOptions: {
73
- globals: {
74
- ...globals.node
75
- }
76
- },
77
- rules: {
78
- 'no-console': 'off',
79
- 'unicorn/prefer-top-level-await': 'off'
80
- }
81
- }
82
- ]
@@ -1,40 +0,0 @@
1
- Thanks for the thorough write-up @bsshreesha — your root-cause analysis is spot on, and you even guessed the correct storage key (`lte-theme`). Reproduced and fixed. 👍
2
-
3
- As you noted, the color-mode script lives in `_scripts.astro`, which is loaded at the **end of `<body>`**. So the browser paints the default (light) theme first, then the script swaps `data-bs-theme` once it runs — hence the flash for dark-mode users on every load.
4
-
5
- **Fix:** I added a small render-blocking inline script to `_head.astro` (shared by every page), essentially your suggestion with a few refinements:
6
-
7
- ```html
8
- <script is:inline>
9
- ;(() => {
10
- "use strict"
11
- const STORAGE_KEY = "lte-theme"
12
- let stored = null
13
- try {
14
- stored = localStorage.getItem(STORAGE_KEY)
15
- } catch {
16
- // localStorage may be unavailable (private mode, sandboxed iframe).
17
- }
18
- const prefersDark = globalThis.matchMedia(
19
- "(prefers-color-scheme: dark)"
20
- ).matches
21
- const resolved =
22
- stored === "dark" || stored === "light"
23
- ? stored
24
- : prefersDark
25
- ? "dark"
26
- : "light"
27
- document.documentElement.setAttribute("data-bs-theme", resolved)
28
- document.documentElement.style.colorScheme = resolved
29
- })()
30
- </script>
31
- ```
32
-
33
- Refinements vs. the snippet in the issue:
34
- - **Mirrors the resolution already in `_scripts.astro`** so the stored `"auto"` value (and the unset case) consistently falls back to `prefers-color-scheme` — keeps the head and body logic in sync.
35
- - **`try/catch` around `localStorage`** so it degrades gracefully where storage access throws (private mode, sandboxed iframes) instead of leaving the page un-themed.
36
- - Placed right after `<title>`, before the stylesheet, so `data-bs-theme` is set before the first paint.
37
-
38
- **Verified:** with `lte-theme=dark` set, a probe reading `document.documentElement.getAttribute("data-bs-theme")` at the very first line of `<body>` already returns `"dark"` — i.e. the theme is applied before any body content is laid out, so there's no flash. Pages now render directly in the stored theme on refresh.
39
-
40
- Changed in `src/html/components/_head.astro` and the rebuilt `dist` (applies to all pages). It'll be in the next release. Thanks again for the detailed report and suggested fix!
package/index.html DELETED
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset='utf-8'>
5
- <meta http-equiv='X-UA-Compatible' content='IE=edge'>
6
- <title>AdminLTE v4</title>
7
- <meta name='viewport' content='width=device-width, initial-scale=1'>
8
- </head>
9
- <body>
10
- <script>window.location.href = './dist/index.html'</script>
11
- </body>
12
- </html>
package/netlify.toml DELETED
@@ -1,16 +0,0 @@
1
- # Netlify deploy configuration for adminlte-v4.netlify.app
2
- #
3
- # The dist/ folder is committed to the repo (see "rebuild dist" commits),
4
- # so the production deploy just publishes those static files. This avoids
5
- # running npm install on Netlify, which has been failing since rc7 due to
6
- # a Node version drift between Netlify's default and the Node 22 used in
7
- # CI (see .github/workflows/*).
8
-
9
- [build]
10
- publish = "dist"
11
- command = "echo 'Static deploy of committed dist/'"
12
-
13
- [build.environment]
14
- # Match the Node version used in GitHub Actions so any future build
15
- # command (eg. `npm run docs-compile`) resolves dependencies correctly.
16
- NODE_VERSION = "22"