admin-lte 4.0.2 → 4.0.4

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 (110) hide show
  1. package/ACCESSIBILITY-COMPLIANCE.md +60 -339
  2. package/CHANGELOG.md +43 -0
  3. package/README.md +15 -2
  4. package/dist/css/adminlte.css +24 -786
  5. package/dist/css/adminlte.css.map +1 -1
  6. package/dist/css/adminlte.min.css +2 -2
  7. package/dist/css/adminlte.min.css.map +1 -1
  8. package/dist/css/adminlte.rtl.css +24 -786
  9. package/dist/css/adminlte.rtl.css.map +1 -1
  10. package/dist/css/adminlte.rtl.min.css +2 -2
  11. package/dist/css/adminlte.rtl.min.css.map +1 -1
  12. package/dist/js/adminlte.js +233 -128
  13. package/dist/js/adminlte.js.map +1 -1
  14. package/dist/js/adminlte.min.js +2 -2
  15. package/dist/js/adminlte.min.js.map +1 -1
  16. package/package.json +30 -17
  17. package/src/scss/_callouts.scss +13 -3
  18. package/src/scss/_dropdown.scss +3 -1
  19. package/src/scss/adminlte.scss +1 -1
  20. package/src/scss/parts/_core.scss +0 -1
  21. package/src/ts/accessibility.ts +129 -69
  22. package/src/ts/adminlte.ts +1 -1
  23. package/src/ts/card-widget.ts +33 -8
  24. package/src/ts/fullscreen.ts +48 -42
  25. package/src/ts/layout.ts +2 -1
  26. package/src/ts/push-menu.ts +24 -8
  27. package/src/ts/treeview.ts +27 -1
  28. package/src/ts/util/index.ts +114 -29
  29. package/.browserslistrc +0 -17
  30. package/.prettierrc +0 -6
  31. package/CODE_OF_CONDUCT.md +0 -43
  32. package/SECURITY.md +0 -99
  33. package/dist/UI/general.html +0 -2317
  34. package/dist/UI/icons.html +0 -1126
  35. package/dist/UI/timeline.html +0 -1212
  36. package/dist/docs/browser-support.html +0 -826
  37. package/dist/docs/color-mode.html +0 -1142
  38. package/dist/docs/components/main-header.html +0 -1209
  39. package/dist/docs/components/main-sidebar.html +0 -924
  40. package/dist/docs/customization.html +0 -1080
  41. package/dist/docs/deployment.html +0 -1145
  42. package/dist/docs/faq.html +0 -1392
  43. package/dist/docs/getting-started.html +0 -991
  44. package/dist/docs/how-to-contribute.html +0 -890
  45. package/dist/docs/index.html +0 -16
  46. package/dist/docs/integrations.html +0 -1231
  47. package/dist/docs/introduction.html +0 -1008
  48. package/dist/docs/javascript/accessibility.html +0 -949
  49. package/dist/docs/javascript/card-widget.html +0 -1019
  50. package/dist/docs/javascript/direct-chat.html +0 -896
  51. package/dist/docs/javascript/fullscreen.html +0 -905
  52. package/dist/docs/javascript/layout.html +0 -908
  53. package/dist/docs/javascript/plugins-overview.html +0 -1144
  54. package/dist/docs/javascript/pushmenu.html +0 -1045
  55. package/dist/docs/javascript/treeview.html +0 -1024
  56. package/dist/docs/layout-blueprint.html +0 -1087
  57. package/dist/docs/layout.html +0 -842
  58. package/dist/docs/license.html +0 -807
  59. package/dist/docs/migration.html +0 -1149
  60. package/dist/docs/recipes.html +0 -1185
  61. package/dist/docs/rtl.html +0 -957
  62. package/dist/examples/lockscreen.html +0 -249
  63. package/dist/examples/login-v2.html +0 -282
  64. package/dist/examples/login.html +0 -272
  65. package/dist/examples/register-v2.html +0 -291
  66. package/dist/examples/register.html +0 -277
  67. package/dist/forms/elements.html +0 -1405
  68. package/dist/forms/layout.html +0 -1267
  69. package/dist/forms/validation.html +0 -1275
  70. package/dist/forms/wizard.html +0 -1410
  71. package/dist/generate/theme.html +0 -1082
  72. package/dist/index.html +0 -1745
  73. package/dist/index2.html +0 -2277
  74. package/dist/index3.html +0 -1532
  75. package/dist/layout/collapsed-sidebar-without-hover.html +0 -1144
  76. package/dist/layout/collapsed-sidebar.html +0 -1137
  77. package/dist/layout/fixed-complete.html +0 -1138
  78. package/dist/layout/fixed-footer.html +0 -1136
  79. package/dist/layout/fixed-header.html +0 -1136
  80. package/dist/layout/fixed-sidebar.html +0 -1138
  81. package/dist/layout/layout-custom-area.html +0 -1177
  82. package/dist/layout/layout-rtl.html +0 -1137
  83. package/dist/layout/logo-switch.html +0 -683
  84. package/dist/layout/sidebar-mini.html +0 -1137
  85. package/dist/layout/unfixed-sidebar.html +0 -1136
  86. package/dist/mailbox/compose.html +0 -1151
  87. package/dist/mailbox/inbox.html +0 -1509
  88. package/dist/mailbox/read.html +0 -1202
  89. package/dist/pages/404.html +0 -239
  90. package/dist/pages/500.html +0 -227
  91. package/dist/pages/calendar.html +0 -1266
  92. package/dist/pages/chat.html +0 -1427
  93. package/dist/pages/faq.html +0 -1383
  94. package/dist/pages/file-manager.html +0 -1835
  95. package/dist/pages/invoice.html +0 -1199
  96. package/dist/pages/kanban.html +0 -1439
  97. package/dist/pages/maintenance.html +0 -230
  98. package/dist/pages/pricing.html +0 -1279
  99. package/dist/pages/profile.html +0 -1382
  100. package/dist/pages/projects.html +0 -1644
  101. package/dist/pages/settings.html +0 -1387
  102. package/dist/tables/data.html +0 -1319
  103. package/dist/tables/simple.html +0 -1435
  104. package/dist/widgets/cards.html +0 -1356
  105. package/dist/widgets/info-box.html +0 -1429
  106. package/dist/widgets/small-box.html +0 -1225
  107. package/eslint.config.js +0 -82
  108. package/github-issue-response.md +0 -40
  109. package/index.html +0 -12
  110. package/netlify.toml +0 -16
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"