update to Tabler v1.5.1

This commit is contained in:
JACS 2026-09-12 23:29:45 -05:00
parent 58bd5490e2
commit 0e6063f421
426 changed files with 57276 additions and 16205 deletions

View file

@ -1,27 +1,61 @@
const themeConfig = {
"theme": "light",
"theme-base": "gray",
"theme-font": "sans-serif",
"theme-primary": "blue",
"theme-radius": "1"
/*!
* Tabler v1.5.1 (https://tabler.io)
* Copyright 2018-2026 The Tabler Authors
* Copyright 2018-2026 codecalm.net Paweł Kuna
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
*/
//#region js/src/theme-config.ts
/**
* Every setting the theme switcher understands, with its default value. Each
* key becomes a `data-bs-<key>` attribute on `<html>`, a `tabler-<key>`
* localStorage entry and a `?<key>=` URL parameter, written only when the value
* differs from the default. Adding a key here is all the JavaScript a new
* setting needs; the switcher loops over this object.
*/
var themeDefaults = {
"theme": "auto",
"theme-base": "gray",
"theme-font": "sans-serif",
"theme-primary": "blue",
"theme-radius": "1",
"layout": "default",
"navbar": "default",
"navbar-position": "horizontal",
"navbar-theme": "default",
"sidebar": "default"
};
const params = new Proxy(new URLSearchParams(window.location.search), {
get: (searchParams, prop) => searchParams.get(prop)
});
for (const key in themeConfig) {
const param = params[key];
let selectedValue;
if (!!param) {
localStorage.setItem("tabler-" + key, param);
selectedValue = param;
} else {
const storedTheme = localStorage.getItem("tabler-" + key);
selectedValue = storedTheme ? storedTheme : themeConfig[key];
}
if (selectedValue !== themeConfig[key]) {
document.documentElement.setAttribute("data-bs-" + key, selectedValue);
} else {
document.documentElement.removeAttribute("data-bs-" + key);
}
//#endregion
//#region js/tabler-theme.ts
/**
* demo-theme is specifically loaded right after the body and not deferred
* to ensure we switch to the chosen dark/light theme as fast as possible.
* This will prevent any flashes of the light theme (default) before switching.
*/
var params = new URLSearchParams(window.location.search);
var prefersDark = window.matchMedia("(prefers-color-scheme: dark)");
for (const key in themeDefaults) {
const param = params.get(key);
let selectedValue;
if (!!param) {
localStorage.setItem("tabler-" + key, param);
selectedValue = param;
} else {
var _ref;
const storedTheme = localStorage.getItem("tabler-" + key);
const serverValue = document.documentElement.getAttribute("data-bs-" + key);
selectedValue = (_ref = storedTheme !== null && storedTheme !== void 0 ? storedTheme : serverValue) !== null && _ref !== void 0 ? _ref : themeDefaults[key];
}
if (key === "theme" && selectedValue === "auto") selectedValue = prefersDark.matches ? "dark" : "light";
if (selectedValue !== themeDefaults[key]) document.documentElement.setAttribute("data-bs-" + key, selectedValue);
else document.documentElement.removeAttribute("data-bs-" + key);
}
//# sourceMappingURL=tabler-theme.esm.js.map
prefersDark.addEventListener("change", (event) => {
var _localStorage$getItem;
if (((_localStorage$getItem = localStorage.getItem("tabler-theme")) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : "auto") === "auto") {
if (event.matches) document.documentElement.setAttribute("data-bs-theme", "dark");
else document.documentElement.removeAttribute("data-bs-theme");
}
});
//#endregion
//# sourceMappingURL=tabler-theme.esm.js.map

View file

@ -1 +1 @@
{"version":3,"file":"tabler-theme.esm.js","sources":["../../js/tabler-theme.ts"],"sourcesContent":["/**\n * demo-theme is specifically loaded right after the body and not deferred\n * to ensure we switch to the chosen dark/light theme as fast as possible.\n * This will prevent any flashes of the light theme (default) before switching.\n */\ninterface ThemeConfig {\n 'theme': string\n 'theme-base': string\n 'theme-font': string\n 'theme-primary': string\n 'theme-radius': string\n}\n\nconst themeConfig: ThemeConfig = {\n 'theme': 'light',\n 'theme-base': 'gray',\n 'theme-font': 'sans-serif',\n 'theme-primary': 'blue',\n 'theme-radius': '1',\n}\n\nconst params = new Proxy(new URLSearchParams(window.location.search), {\n get: (searchParams: URLSearchParams, prop: string): string | null => searchParams.get(prop),\n})\n\nfor (const key in themeConfig) {\n const param = params[key]\n let selectedValue: string\n\n if (!!param) {\n localStorage.setItem('tabler-' + key, param)\n selectedValue = param\n } else {\n const storedTheme = localStorage.getItem('tabler-' + key)\n selectedValue = storedTheme ? storedTheme : themeConfig[key as keyof ThemeConfig]\n }\n\n if (selectedValue !== themeConfig[key as keyof ThemeConfig]) {\n document.documentElement.setAttribute('data-bs-' + key, selectedValue)\n } else {\n document.documentElement.removeAttribute('data-bs-' + key)\n }\n}\n"],"names":[],"mappings":"AAaA,MAAM,cAA2B;AAAA,EAC/B,SAAS;AAAA,EACT,cAAc;AAAA,EACd,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,gBAAgB;AAClB;AAEA,MAAM,SAAS,IAAI,MAAM,IAAI,gBAAgB,OAAO,SAAS,MAAM,GAAG;AAAA,EACpE,KAAK,CAAC,cAA+B,SAAgC,aAAa,IAAI,IAAI;AAC5F,CAAC;AAED,WAAW,OAAO,aAAa;AAC7B,QAAM,QAAQ,OAAO,GAAG;AACxB,MAAI;AAEJ,MAAI,CAAC,CAAC,OAAO;AACX,iBAAa,QAAQ,YAAY,KAAK,KAAK;AAC3C,oBAAgB;AAAA,EAClB,OAAO;AACL,UAAM,cAAc,aAAa,QAAQ,YAAY,GAAG;AACxD,oBAAgB,cAAc,cAAc,YAAY,GAAwB;AAAA,EAClF;AAEA,MAAI,kBAAkB,YAAY,GAAwB,GAAG;AAC3D,aAAS,gBAAgB,aAAa,aAAa,KAAK,aAAa;AAAA,EACvE,OAAO;AACL,aAAS,gBAAgB,gBAAgB,aAAa,GAAG;AAAA,EAC3D;AACF;"}
{"version":3,"file":"tabler-theme.esm.js","names":[],"sources":["../../js/src/theme-config.ts","../../js/tabler-theme.ts"],"sourcesContent":["/**\n * Every setting the theme switcher understands, with its default value. Each\n * key becomes a `data-bs-<key>` attribute on `<html>`, a `tabler-<key>`\n * localStorage entry and a `?<key>=` URL parameter, written only when the value\n * differs from the default. Adding a key here is all the JavaScript a new\n * setting needs; the switcher loops over this object.\n */\nexport const themeDefaults = {\n 'theme': 'auto',\n 'theme-base': 'gray',\n 'theme-font': 'sans-serif',\n 'theme-primary': 'blue',\n 'theme-radius': '1',\n 'layout': 'default',\n 'navbar': 'default',\n 'navbar-position': 'horizontal',\n 'navbar-theme': 'default',\n 'sidebar': 'default',\n} as const\n\nexport type ThemeKey = keyof typeof themeDefaults\n","/**\n * demo-theme is specifically loaded right after the body and not deferred\n * to ensure we switch to the chosen dark/light theme as fast as possible.\n * This will prevent any flashes of the light theme (default) before switching.\n */\nimport { themeDefaults, type ThemeKey } from './src/theme-config'\n\nconst params = new URLSearchParams(window.location.search)\n\nconst prefersDark = window.matchMedia('(prefers-color-scheme: dark)')\n\nfor (const key in themeDefaults) {\n const param = params.get(key)\n let selectedValue: string\n\n if (!!param) {\n localStorage.setItem('tabler-' + key, param)\n selectedValue = param\n } else {\n // A stored choice wins; otherwise a server-rendered attribute is the starting value.\n const storedTheme = localStorage.getItem('tabler-' + key)\n const serverValue = document.documentElement.getAttribute('data-bs-' + key)\n selectedValue = storedTheme ?? serverValue ?? themeDefaults[key as ThemeKey]\n }\n\n if (key === 'theme' && selectedValue === 'auto') {\n selectedValue = prefersDark.matches ? 'dark' : 'light'\n }\n\n if (selectedValue !== themeDefaults[key as ThemeKey]) {\n document.documentElement.setAttribute('data-bs-' + key, selectedValue)\n } else {\n document.documentElement.removeAttribute('data-bs-' + key)\n }\n}\n\nprefersDark.addEventListener('change', (event) => {\n // No stored choice means the default, which is auto.\n if ((localStorage.getItem('tabler-theme') ?? 'auto') === 'auto') {\n if (event.matches) {\n document.documentElement.setAttribute('data-bs-theme', 'dark')\n } else {\n document.documentElement.removeAttribute('data-bs-theme')\n }\n }\n})\n"],"mappings":";;;;;;;;;;;;;;AAOA,IAAa,gBAAgB;CAC3B,SAAS;CACT,cAAc;CACd,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,UAAU;CACV,UAAU;CACV,mBAAmB;CACnB,gBAAgB;CAChB,WAAW;AACb;;;;;;;;ACXA,IAAM,SAAS,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAEzD,IAAM,cAAc,OAAO,WAAW,8BAA8B;AAEpE,KAAK,MAAM,OAAO,eAAe;CAC/B,MAAM,QAAQ,OAAO,IAAI,GAAG;CAC5B,IAAI;CAEJ,IAAI,CAAC,CAAC,OAAO;EACX,aAAa,QAAQ,YAAY,KAAK,KAAK;EAC3C,gBAAgB;CAClB,OAAO;;EAEL,MAAM,cAAc,aAAa,QAAQ,YAAY,GAAG;EACxD,MAAM,cAAc,SAAS,gBAAgB,aAAa,aAAa,GAAG;EAC1E,iBAAA,OAAgB,gBAAA,QAAA,gBAAA,KAAA,IAAA,cAAe,iBAAA,QAAA,SAAA,KAAA,IAAA,OAAe,cAAc;CAC9D;CAEA,IAAI,QAAQ,WAAW,kBAAkB,QACvC,gBAAgB,YAAY,UAAU,SAAS;CAGjD,IAAI,kBAAkB,cAAc,MAClC,SAAS,gBAAgB,aAAa,aAAa,KAAK,aAAa;MAErE,SAAS,gBAAgB,gBAAgB,aAAa,GAAG;AAE7D;AAEA,YAAY,iBAAiB,WAAW,UAAU;;CAEhD,MAAA,wBAAK,aAAa,QAAQ,cAAc,OAAA,QAAA,0BAAA,KAAA,IAAA,wBAAK,YAAY,QAAQ;EAC/D,IAAI,MAAM,SACR,SAAS,gBAAgB,aAAa,iBAAiB,MAAM;OAE7D,SAAS,gBAAgB,gBAAgB,eAAe;CAE5D;AACF,CAAC"}

View file

@ -1,32 +1,65 @@
/*!
* Tabler v1.5.1 (https://tabler.io)
* Copyright 2018-2026 The Tabler Authors
* Copyright 2018-2026 codecalm.net Paweł Kuna
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
*/
(function(factory) {
typeof define === "function" && define.amd ? define(factory) : factory();
})((function() {
"use strict";
const themeConfig = {
"theme": "light",
"theme-base": "gray",
"theme-font": "sans-serif",
"theme-primary": "blue",
"theme-radius": "1"
};
const params = new Proxy(new URLSearchParams(window.location.search), {
get: (searchParams, prop) => searchParams.get(prop)
});
for (const key in themeConfig) {
const param = params[key];
let selectedValue;
if (!!param) {
localStorage.setItem("tabler-" + key, param);
selectedValue = param;
} else {
const storedTheme = localStorage.getItem("tabler-" + key);
selectedValue = storedTheme ? storedTheme : themeConfig[key];
}
if (selectedValue !== themeConfig[key]) {
document.documentElement.setAttribute("data-bs-" + key, selectedValue);
} else {
document.documentElement.removeAttribute("data-bs-" + key);
}
}
}));
//# sourceMappingURL=tabler-theme.js.map
typeof define === "function" && define.amd ? define([], factory) : factory();
})(function() {
//#region js/src/theme-config.ts
/**
* Every setting the theme switcher understands, with its default value. Each
* key becomes a `data-bs-<key>` attribute on `<html>`, a `tabler-<key>`
* localStorage entry and a `?<key>=` URL parameter, written only when the value
* differs from the default. Adding a key here is all the JavaScript a new
* setting needs; the switcher loops over this object.
*/
var themeDefaults = {
"theme": "auto",
"theme-base": "gray",
"theme-font": "sans-serif",
"theme-primary": "blue",
"theme-radius": "1",
"layout": "default",
"navbar": "default",
"navbar-position": "horizontal",
"navbar-theme": "default",
"sidebar": "default"
};
//#endregion
//#region js/tabler-theme.ts
/**
* demo-theme is specifically loaded right after the body and not deferred
* to ensure we switch to the chosen dark/light theme as fast as possible.
* This will prevent any flashes of the light theme (default) before switching.
*/
var params = new URLSearchParams(window.location.search);
var prefersDark = window.matchMedia("(prefers-color-scheme: dark)");
for (const key in themeDefaults) {
const param = params.get(key);
let selectedValue;
if (!!param) {
localStorage.setItem("tabler-" + key, param);
selectedValue = param;
} else {
var _ref;
const storedTheme = localStorage.getItem("tabler-" + key);
const serverValue = document.documentElement.getAttribute("data-bs-" + key);
selectedValue = (_ref = storedTheme !== null && storedTheme !== void 0 ? storedTheme : serverValue) !== null && _ref !== void 0 ? _ref : themeDefaults[key];
}
if (key === "theme" && selectedValue === "auto") selectedValue = prefersDark.matches ? "dark" : "light";
if (selectedValue !== themeDefaults[key]) document.documentElement.setAttribute("data-bs-" + key, selectedValue);
else document.documentElement.removeAttribute("data-bs-" + key);
}
prefersDark.addEventListener("change", (event) => {
var _localStorage$getItem;
if (((_localStorage$getItem = localStorage.getItem("tabler-theme")) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : "auto") === "auto") {
if (event.matches) document.documentElement.setAttribute("data-bs-theme", "dark");
else document.documentElement.removeAttribute("data-bs-theme");
}
});
//#endregion
});
//# sourceMappingURL=tabler-theme.js.map

View file

@ -1 +1 @@
{"version":3,"file":"tabler-theme.js","sources":["../../js/tabler-theme.ts"],"sourcesContent":["/**\n * demo-theme is specifically loaded right after the body and not deferred\n * to ensure we switch to the chosen dark/light theme as fast as possible.\n * This will prevent any flashes of the light theme (default) before switching.\n */\ninterface ThemeConfig {\n 'theme': string\n 'theme-base': string\n 'theme-font': string\n 'theme-primary': string\n 'theme-radius': string\n}\n\nconst themeConfig: ThemeConfig = {\n 'theme': 'light',\n 'theme-base': 'gray',\n 'theme-font': 'sans-serif',\n 'theme-primary': 'blue',\n 'theme-radius': '1',\n}\n\nconst params = new Proxy(new URLSearchParams(window.location.search), {\n get: (searchParams: URLSearchParams, prop: string): string | null => searchParams.get(prop),\n})\n\nfor (const key in themeConfig) {\n const param = params[key]\n let selectedValue: string\n\n if (!!param) {\n localStorage.setItem('tabler-' + key, param)\n selectedValue = param\n } else {\n const storedTheme = localStorage.getItem('tabler-' + key)\n selectedValue = storedTheme ? storedTheme : themeConfig[key as keyof ThemeConfig]\n }\n\n if (selectedValue !== themeConfig[key as keyof ThemeConfig]) {\n document.documentElement.setAttribute('data-bs-' + key, selectedValue)\n } else {\n document.documentElement.removeAttribute('data-bs-' + key)\n }\n}\n"],"names":[],"mappings":";;;;AAaA,QAAM,cAA2B;AAAA,IAC/B,SAAS;AAAA,IACT,cAAc;AAAA,IACd,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,EAClB;AAEA,QAAM,SAAS,IAAI,MAAM,IAAI,gBAAgB,OAAO,SAAS,MAAM,GAAG;AAAA,IACpE,KAAK,CAAC,cAA+B,SAAgC,aAAa,IAAI,IAAI;AAAA,EAC5F,CAAC;AAED,aAAW,OAAO,aAAa;AAC7B,UAAM,QAAQ,OAAO,GAAG;AACxB,QAAI;AAEJ,QAAI,CAAC,CAAC,OAAO;AACX,mBAAa,QAAQ,YAAY,KAAK,KAAK;AAC3C,sBAAgB;AAAA,IAClB,OAAO;AACL,YAAM,cAAc,aAAa,QAAQ,YAAY,GAAG;AACxD,sBAAgB,cAAc,cAAc,YAAY,GAAwB;AAAA,IAClF;AAEA,QAAI,kBAAkB,YAAY,GAAwB,GAAG;AAC3D,eAAS,gBAAgB,aAAa,aAAa,KAAK,aAAa;AAAA,IACvE,OAAO;AACL,eAAS,gBAAgB,gBAAgB,aAAa,GAAG;AAAA,IAC3D;AAAA,EACF;;"}
{"version":3,"file":"tabler-theme.js","names":[],"sources":["../../js/src/theme-config.ts","../../js/tabler-theme.ts"],"sourcesContent":["/**\n * Every setting the theme switcher understands, with its default value. Each\n * key becomes a `data-bs-<key>` attribute on `<html>`, a `tabler-<key>`\n * localStorage entry and a `?<key>=` URL parameter, written only when the value\n * differs from the default. Adding a key here is all the JavaScript a new\n * setting needs; the switcher loops over this object.\n */\nexport const themeDefaults = {\n 'theme': 'auto',\n 'theme-base': 'gray',\n 'theme-font': 'sans-serif',\n 'theme-primary': 'blue',\n 'theme-radius': '1',\n 'layout': 'default',\n 'navbar': 'default',\n 'navbar-position': 'horizontal',\n 'navbar-theme': 'default',\n 'sidebar': 'default',\n} as const\n\nexport type ThemeKey = keyof typeof themeDefaults\n","/**\n * demo-theme is specifically loaded right after the body and not deferred\n * to ensure we switch to the chosen dark/light theme as fast as possible.\n * This will prevent any flashes of the light theme (default) before switching.\n */\nimport { themeDefaults, type ThemeKey } from './src/theme-config'\n\nconst params = new URLSearchParams(window.location.search)\n\nconst prefersDark = window.matchMedia('(prefers-color-scheme: dark)')\n\nfor (const key in themeDefaults) {\n const param = params.get(key)\n let selectedValue: string\n\n if (!!param) {\n localStorage.setItem('tabler-' + key, param)\n selectedValue = param\n } else {\n // A stored choice wins; otherwise a server-rendered attribute is the starting value.\n const storedTheme = localStorage.getItem('tabler-' + key)\n const serverValue = document.documentElement.getAttribute('data-bs-' + key)\n selectedValue = storedTheme ?? serverValue ?? themeDefaults[key as ThemeKey]\n }\n\n if (key === 'theme' && selectedValue === 'auto') {\n selectedValue = prefersDark.matches ? 'dark' : 'light'\n }\n\n if (selectedValue !== themeDefaults[key as ThemeKey]) {\n document.documentElement.setAttribute('data-bs-' + key, selectedValue)\n } else {\n document.documentElement.removeAttribute('data-bs-' + key)\n }\n}\n\nprefersDark.addEventListener('change', (event) => {\n // No stored choice means the default, which is auto.\n if ((localStorage.getItem('tabler-theme') ?? 'auto') === 'auto') {\n if (event.matches) {\n document.documentElement.setAttribute('data-bs-theme', 'dark')\n } else {\n document.documentElement.removeAttribute('data-bs-theme')\n }\n }\n})\n"],"mappings":";;;;;;;;;;;;;;;;;CAOA,IAAa,gBAAgB;EAC3B,SAAS;EACT,cAAc;EACd,cAAc;EACd,iBAAiB;EACjB,gBAAgB;EAChB,UAAU;EACV,UAAU;EACV,mBAAmB;EACnB,gBAAgB;EAChB,WAAW;CACb;;;;;;;;CCXA,IAAM,SAAS,IAAI,gBAAgB,OAAO,SAAS,MAAM;CAEzD,IAAM,cAAc,OAAO,WAAW,8BAA8B;CAEpE,KAAK,MAAM,OAAO,eAAe;EAC/B,MAAM,QAAQ,OAAO,IAAI,GAAG;EAC5B,IAAI;EAEJ,IAAI,CAAC,CAAC,OAAO;GACX,aAAa,QAAQ,YAAY,KAAK,KAAK;GAC3C,gBAAgB;EAClB,OAAO;;GAEL,MAAM,cAAc,aAAa,QAAQ,YAAY,GAAG;GACxD,MAAM,cAAc,SAAS,gBAAgB,aAAa,aAAa,GAAG;GAC1E,iBAAA,OAAgB,gBAAA,QAAA,gBAAA,KAAA,IAAA,cAAe,iBAAA,QAAA,SAAA,KAAA,IAAA,OAAe,cAAc;EAC9D;EAEA,IAAI,QAAQ,WAAW,kBAAkB,QACvC,gBAAgB,YAAY,UAAU,SAAS;EAGjD,IAAI,kBAAkB,cAAc,MAClC,SAAS,gBAAgB,aAAa,aAAa,KAAK,aAAa;OAErE,SAAS,gBAAgB,gBAAgB,aAAa,GAAG;CAE7D;CAEA,YAAY,iBAAiB,WAAW,UAAU;;EAEhD,MAAA,wBAAK,aAAa,QAAQ,cAAc,OAAA,QAAA,0BAAA,KAAA,IAAA,wBAAK,YAAY,QAAQ;GAC/D,IAAI,MAAM,SACR,SAAS,gBAAgB,aAAa,iBAAiB,MAAM;QAE7D,SAAS,gBAAgB,gBAAgB,eAAe;EAE5D;CACF,CAAC"}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long