94 lines
45 KiB
JavaScript
94 lines
45 KiB
JavaScript
|
|
/** 🌼
|
|||
|
|
* @license MIT
|
|||
|
|
* daisyUI bundle
|
|||
|
|
* https://daisyui.com/
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
// 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 = { retro: { "color-scheme": "light", "--color-base-100": "oklch(91.637% 0.034 90.515)", "--color-base-200": "oklch(88.272% 0.049 91.774)", "--color-base-300": "oklch(84.133% 0.065 90.856)", "--color-base-content": "oklch(41% 0.112 45.904)", "--color-primary": "oklch(80% 0.114 19.571)", "--color-primary-content": "oklch(39% 0.141 25.723)", "--color-secondary": "oklch(92% 0.084 155.995)", "--color-secondary-content": "oklch(44% 0.119 151.328)", "--color-accent": "oklch(68% 0.162 75.834)", "--color-accent-content": "oklch(41% 0.112 45.904)", "--color-neutral": "oklch(44% 0.011 73.639)", "--color-neutral-content": "oklch(86% 0.005 56.366)", "--color-info": "oklch(58% 0.158 241.966)", "--color-info-content": "oklch(96% 0.059 95.617)", "--color-success": "oklch(51% 0.096 186.391)", "--color-success-content": "oklch(96% 0.059 95.617)", "--color-warning": "oklch(64% 0.222 41.116)", "--color-warning-content": "oklch(96% 0.059 95.617)", "--color-error": "oklch(70% 0.191 22.216)", "--color-error-content": "oklch(40% 0.123 38.172)", "--radius-selector": "0.25rem", "--radius-field": "0.25rem", "--radius-box": "0.5rem", "--size-selector": "0.25rem", "--size-field": "0.25rem", "--border": "1px", "--depth": "0", "--noise": "0" }, bumblebee: { "color-scheme": "light", "--color-base-100": "oklch(100% 0 0)", "--color-base-200": "oklch(97% 0 0)", "--color-base-300": "oklch(92% 0 0)", "--color-base-content": "oklch(20% 0 0)", "--color-primary": "oklch(85% 0.199 91.936)", "--color-primary-content": "oklch(42% 0.095 57.708)", "--color-secondary": "oklch(75% 0.183 55.934)", "--color-secondary-content": "oklch(40% 0.123 38.172)", "--color-accent": "oklch(0% 0 0)", "--color-accent-content": "oklch(100% 0 0)", "--color-neutral": "oklch(37% 0.01 67.558)", "--color-neutral-content": "oklch(92% 0.003 48.717)", "--color-info": "oklch(74% 0.16 232.661)", "--color-info-content": "oklch(39% 0.09 240.876)", "--color-success": "oklch(76% 0.177 163.223)", "--color-success-content": "oklch(37% 0.077 168.94)", "--color-warning": "oklch(82% 0.189 84.429)", "--color-warning-content": "oklch(41% 0.112 45.904)", "--color-error": "oklch(70% 0.191 22.216)", "--color-error-content": "oklch(39% 0.141 25.723)", "--radius-selector": "1rem", "--radius-field": "0.5rem", "--radius-box": "1rem", "--size-selector": "0.25rem", "--size-field": "0.25rem", "--border": "1px", "--depth": "1", "--noise": "0" }, fantasy: { "color-scheme": "light", "--color-base-100": "oklch(100% 0 0)", "--color-base-200": "oklch(93% 0 0)", "--color-base-300": "oklch(86% 0 0)", "--color-base-content": "oklch(27.807% 0.029 256.847)", "--color-primary": "oklch(37.45% 0.189 325.02)", "--color-primary-content": "oklch(87.49% 0.037 325.02)", "--color-secondary": "oklch(53.92% 0.162 241.36)", "--color-secondary-content": "oklch(90.784% 0.032 241.36)", "--color-accent": "oklch(75.98% 0.204 56.72)", "--color-accent-content": "oklch(15.196% 0.04 56.72)", "--color-neutral": "oklch(27.807% 0.029 256.847)", "--color-neutral-content": "oklch(85.561% 0.005 256.847)", "--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": "1rem", "--radius-field": "0.5rem", "--radius-box": "1rem", "--size-selector": "0.25rem", "--size-field": "0.25rem", "--border": "1px", "--depth": "1", "--noise": "0" }, aqua: { "color-scheme": "dark", "--color-base-100": "oklch(37% 0.146 265.522)", "--color-base-200": "oklch(28% 0.091 267.935)", "--color-base-300": "oklch(22% 0.091 267.935)", "--color-base-content": "oklch(90% 0.058 230.902)", "--color-primary": "oklch(85.661% 0.144 198.645)", "--color-primary-content": "oklch(40.124% 0.068 197.603)", "--color-secondary": "oklch(60.682% 0.108 309.782)", "--color-secondary-content": "oklch(96% 0.016 293.756)", "--color-accent": "oklch(93.426% 0.102 94.555)", "--
|
|||
|
|
|
|||
|
|
// 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) {
|
|||
|
|
const darkSelector = root === ":root" ? ":root:not([data-theme])" : `${root}:not([data-theme])`;
|
|||
|
|
addBase({
|
|||
|
|
"@media (prefers-color-scheme: dark)": {
|
|||
|
|
[darkSelector]: baseStyles[selector]
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
addBase(baseStyles);
|
|||
|
|
};
|
|||
|
|
});
|
|||
|
|
export {
|
|||
|
|
theme_default as default
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
|
|||
|
|
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.
|
|||
|
|
|
|||
|
|
*/
|