125 lines
46 KiB
JavaScript
125 lines
46 KiB
JavaScript
|
|
/** 🌼
|
|||
|
|
* @license MIT
|
|||
|
|
* daisyUI bundle
|
|||
|
|
* https://daisyui.com/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
var __defProp = Object.defineProperty;
|
|||
|
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|||
|
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|||
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|||
|
|
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|||
|
|
var __toCommonJS = (from) => {
|
|||
|
|
var entry = __moduleCache.get(from), desc;
|
|||
|
|
if (entry)
|
|||
|
|
return entry;
|
|||
|
|
entry = __defProp({}, "__esModule", { value: true });
|
|||
|
|
if (from && typeof from === "object" || typeof from === "function")
|
|||
|
|
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|||
|
|
get: () => from[key],
|
|||
|
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|||
|
|
}));
|
|||
|
|
__moduleCache.set(from, entry);
|
|||
|
|
return entry;
|
|||
|
|
};
|
|||
|
|
var __export = (target, all) => {
|
|||
|
|
for (var name in all)
|
|||
|
|
__defProp(target, name, {
|
|||
|
|
get: all[name],
|
|||
|
|
enumerable: true,
|
|||
|
|
configurable: true,
|
|||
|
|
set: (newValue) => all[name] = () => newValue
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// packages/daisyui/theme/index.js
|
|||
|
|
var exports_theme = {};
|
|||
|
|
__export(exports_theme, {
|
|||
|
|
default: () => theme_default
|
|||
|
|
});
|
|||
|
|
module.exports = __toCommonJS(exports_theme);
|
|||
|
|
|
|||
|
|
// packages/daisyui/functions/plugin.js
|
|||
|
|
var plugin = {
|
|||
|
|
withOptions: (pluginFunction, configFunction = () => ({})) => {
|
|||
|
|
const optionsFunction = (options) => {
|
|||
|
|
const handler = pluginFunction(options);
|
|||
|
|
const config = configFunction(options);
|
|||
|
|
return { handler, config };
|
|||
|
|
};
|
|||
|
|
optionsFunction.__isOptionsFunction = true;
|
|||
|
|
return optionsFunction;
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// packages/daisyui/theme/object.js
|
|||
|
|
var object_default = { cyberpunk: { "color-scheme": "light", "--color-base-100": "oklch(94.51% 0.179 104.32)", "--color-base-200": "oklch(91.51% 0.179 104.32)", "--color-base-300": "oklch(85.51% 0.179 104.32)", "--color-base-content": "oklch(0% 0 0)", "--color-primary": "oklch(74.22% 0.209 6.35)", "--color-primary-content": "oklch(14.844% 0.041 6.35)", "--color-secondary": "oklch(83.33% 0.184 204.72)", "--color-secondary-content": "oklch(16.666% 0.036 204.72)", "--color-accent": "oklch(71.86% 0.217 310.43)", "--color-accent-content": "oklch(14.372% 0.043 310.43)", "--color-neutral": "oklch(23.04% 0.065 269.31)", "--color-neutral-content": "oklch(94.51% 0.179 104.32)", "--color-info": "oklch(72.06% 0.191 231.6)", "--color-info-content": "oklch(0% 0 0)", "--color-success": "oklch(64.8% 0.15 160)", "--color-success-content": "oklch(0% 0 0)", "--color-warning": "oklch(84.71% 0.199 83.87)", "--color-warning-content": "oklch(0% 0 0)", "--color-error": "oklch(71.76% 0.221 22.18)", "--color-error-content": "oklch(0% 0 0)", "--radius-selector": "0rem", "--radius-field": "0rem", "--radius-box": "0rem", "--size-selector": "0.25rem", "--size-field": "0.25rem", "--border": "1px", "--depth": "0", "--noise": "0" }, acid: { "color-scheme": "light", "--color-base-100": "oklch(98% 0 0)", "--color-base-200": "oklch(95% 0 0)", "--color-base-300": "oklch(91% 0 0)", "--color-base-content": "oklch(0% 0 0)", "--color-primary": "oklch(71.9% 0.357 330.759)", "--color-primary-content": "oklch(14.38% 0.071 330.759)", "--color-secondary": "oklch(73.37% 0.224 48.25)", "--color-secondary-content": "oklch(14.674% 0.044 48.25)", "--color-accent": "oklch(92.78% 0.264 122.962)", "--color-accent-content": "oklch(18.556% 0.052 122.962)", "--color-neutral": "oklch(21.31% 0.128 278.68)", "--color-neutral-content": "oklch(84.262% 0.025 278.68)", "--color-info": "oklch(60.72% 0.227 252.05)", "--color-info-content": "oklch(12.144% 0.045 252.05)", "--color-success": "oklch(85.72% 0.266 158.53)", "--color-success-content": "oklch(17.144% 0.053 158.53)", "--color-warning": "oklch(91.01% 0.212 100.5)", "--color-warning-content": "oklch(18.202% 0.042 100.5)", "--color-error": "oklch(64.84% 0.293 29.349)", "--color-error-content": "oklch(12.968% 0.058 29.349)", "--radius-selector": "1rem", "--radius-field": "1rem", "--radius-box": "1rem", "--size-selector": "0.25rem", "--size-field": "0.25rem", "--border": "1px", "--depth": "1", "--noise": "0" }, black: { "color-scheme": "dark", "--color-base-100": "oklch(0% 0 0)", "--color-base-200": "oklch(19% 0 0)", "--color-base-300": "oklch(22% 0 0)", "--color-base-content": "oklch(87.609% 0 0)", "--color-primary": "oklch(35% 0 0)", "--color-primary-content": "oklch(100% 0 0)", "--color-secondary": "oklch(35% 0 0)", "--color-secondary-content": "oklch(100% 0 0)", "--color-accent": "oklch(35% 0 0)", "--color-accent-content": "oklch(100% 0 0)", "--color-neutral": "oklch(35% 0 0)", "--color-neutral-content": "oklch(100% 0 0)", "--color-info": "oklch(45.201% 0.313 264.052)", "--color-info-content": "oklch(89.04% 0.062 264.052)", "--color-success": "oklch(51.975% 0.176 142.495)", "--color-success-content": "oklch(90.395% 0.035 142.495)", "--color-warning": "oklch(96.798% 0.211 109.769)", "--color-warning-content": "oklch(19.359% 0.042 109.769)", "--color-error": "oklch(62.795% 0.257 29.233)", "--color-error-content": "oklch(12.559% 0.051 29.233)", "--radius-selector": "0rem", "--radius-field": "0rem", "--radius-box": "0rem", "--size-selector": "0.25rem", "--size-field": "0.25rem", "--border": "1px", "--depth": "0", "--noise": "0" }, dark: { "color-scheme": "dark", "--color-base-100": "oklch(25.33% 0.016 252.42)", "--color-base-200": "oklch(23.26% 0.014 253.1)", "--color-base-300": "oklch(21.15% 0.012 254.09)", "--color-base-content": "oklch(97.807% 0.029 256.847)", "--color-primary": "oklch(58% 0.233 277.117)", "--color-primary-content": "oklch(96% 0.018 272.314)", "--color-secondary": "oklch(65% 0.241 354.308)", "--color-secondary-content": "oklch(94% 0.028 342.258)", "--color-accent": "oklch(77% 0.152 181.912)", "--color-accent-con
|
|||
|
|
|
|||
|
|
// packages/daisyui/theme/index.js
|
|||
|
|
var theme_default = plugin.withOptions((options = {}) => {
|
|||
|
|
return ({ addBase }) => {
|
|||
|
|
const {
|
|||
|
|
name = "custom-theme",
|
|||
|
|
default: isDefault = false,
|
|||
|
|
prefersdark = false,
|
|||
|
|
"color-scheme": colorScheme = "normal",
|
|||
|
|
root = ":root",
|
|||
|
|
...customThemeTokens
|
|||
|
|
} = options;
|
|||
|
|
let selector = `${root}:has(input.theme-controller[value=${name}]:checked),[data-theme="${name}"]`;
|
|||
|
|
if (isDefault) {
|
|||
|
|
selector = `:where(${root}),${selector}`;
|
|||
|
|
}
|
|||
|
|
let themeTokens = { ...customThemeTokens };
|
|||
|
|
if (object_default[name]) {
|
|||
|
|
const builtinTheme = object_default[name];
|
|||
|
|
themeTokens = {
|
|||
|
|
...builtinTheme,
|
|||
|
|
...customThemeTokens,
|
|||
|
|
"color-scheme": colorScheme || builtinTheme.colorScheme
|
|||
|
|
};
|
|||
|
|
}
|
|||
|
|
const baseStyles = {
|
|||
|
|
[selector]: {
|
|||
|
|
"color-scheme": themeTokens["color-scheme"] || colorScheme,
|
|||
|
|
...themeTokens
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
if (prefersdark) {
|
|||
|
|
addBase({
|
|||
|
|
"@media (prefers-color-scheme: dark)": {
|
|||
|
|
[root]: baseStyles[selector]
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
addBase(baseStyles);
|
|||
|
|
};
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
|
|||
|
|
MIT License
|
|||
|
|
|
|||
|
|
Copyright (c) 2020 Pouya Saadeghi – https://daisyui.com
|
|||
|
|
|
|||
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|||
|
|
of this software and associated documentation files (the "Software"), to deal
|
|||
|
|
in the Software without restriction, including without limitation the rights
|
|||
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|||
|
|
copies of the Software, and to permit persons to whom the Software is
|
|||
|
|
furnished to do so, subject to the following conditions:
|
|||
|
|
|
|||
|
|
The above copyright notice and this permission notice shall be included in all
|
|||
|
|
copies or substantial portions of the Software.
|
|||
|
|
|
|||
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|||
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|||
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|||
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||
|
|
SOFTWARE.
|
|||
|
|
|
|||
|
|
*/
|