diff --git a/src/components/styled/collapse.css b/src/components/styled/collapse.css index 4357e237ce8..261428078d3 100644 --- a/src/components/styled/collapse.css +++ b/src/components/styled/collapse.css @@ -69,7 +69,9 @@ details.collapse summary { .collapse-content { @apply px-4; cursor: unset; - transition: padding 0.2s ease-out, background-color 0.2s ease-out; + transition: + padding 0.2s ease-out, + background-color 0.2s ease-out; } .collapse[open] :where(.collapse-content), .collapse-open :where(.collapse-content), @@ -77,7 +79,9 @@ details.collapse summary { .collapse:not(.collapse-close) :where(input[type="checkbox"]:checked ~ .collapse-content), .collapse:not(.collapse-close) :where(input[type="radio"]:checked ~ .collapse-content) { @apply pb-4; - transition: padding 0.2s ease-out, background-color 0.2s ease-out; + transition: + padding 0.2s ease-out, + background-color 0.2s ease-out; } .collapse[open].collapse-arrow .collapse-title:after, diff --git a/src/components/styled/mockup.css b/src/components/styled/mockup.css index 23572329c02..4ec2abd1cfa 100644 --- a/src/components/styled/mockup.css +++ b/src/components/styled/mockup.css @@ -4,7 +4,10 @@ &:before { content: ""; @apply mb-4 block h-3 w-3 rounded-full opacity-30; - box-shadow: 1.4em 0, 2.8em 0, 4.2em 0; + box-shadow: + 1.4em 0, + 2.8em 0, + 4.2em 0; } pre { @apply pr-5; @@ -25,7 +28,10 @@ &:before { content: ""; @apply mb-4 block h-3 aspect-square rounded-full opacity-30; - box-shadow: 1.4em 0, 2.8em 0, 4.2em 0; + box-shadow: + 1.4em 0, + 2.8em 0, + 4.2em 0; } } &-phone { @@ -82,7 +88,10 @@ &:before { content: ""; @apply mr-[4.8rem] inline-block h-3 aspect-square rounded-full opacity-30; - box-shadow: 1.4em 0, 2.8em 0, 4.2em 0; + box-shadow: + 1.4em 0, + 2.8em 0, + 4.2em 0; } .input { @apply pl-8 relative block w-96 h-7 mx-auto bg-base-200 text-ellipsis whitespace-nowrap overflow-hidden; diff --git a/src/components/styled/radio.css b/src/components/styled/radio.css index e831f0213e8..27ceaaf041a 100644 --- a/src/components/styled/radio.css +++ b/src/components/styled/radio.css @@ -8,7 +8,9 @@ &[aria-checked="true"] { @apply bg-base-content; animation: radiomark var(--animation-input, 0.2s) ease-out; - box-shadow: 0 0 0 4px hsl(var(--b1)) inset, 0 0 0 4px hsl(var(--b1)) inset; + box-shadow: + 0 0 0 4px hsl(var(--b1)) inset, + 0 0 0 4px hsl(var(--b1)) inset; } &-primary { --chkbg: var(--p); @@ -94,13 +96,19 @@ @keyframes radiomark { 0% { - box-shadow: 0 0 0 12px hsl(var(--b1)) inset, 0 0 0 12px hsl(var(--b1)) inset; + box-shadow: + 0 0 0 12px hsl(var(--b1)) inset, + 0 0 0 12px hsl(var(--b1)) inset; } 50% { - box-shadow: 0 0 0 3px hsl(var(--b1)) inset, 0 0 0 3px hsl(var(--b1)) inset; + box-shadow: + 0 0 0 3px hsl(var(--b1)) inset, + 0 0 0 3px hsl(var(--b1)) inset; } 100% { - box-shadow: 0 0 0 4px hsl(var(--b1)) inset, 0 0 0 4px hsl(var(--b1)) inset; + box-shadow: + 0 0 0 4px hsl(var(--b1)) inset, + 0 0 0 4px hsl(var(--b1)) inset; } } diff --git a/src/components/styled/range.css b/src/components/styled/range.css index 14635ea18cc..76293965089 100644 --- a/src/components/styled/range.css +++ b/src/components/styled/range.css @@ -24,7 +24,9 @@ transform: translateY(-50%); --filler-size: 100rem; --filler-offset: 0.6rem; - box-shadow: 0 0 0 3px hsl(var(--range-shdw)) inset, var(--focus-shadow, 0 0), + box-shadow: + 0 0 0 3px hsl(var(--range-shdw)) inset, + var(--focus-shadow, 0 0), calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size); } &::-moz-range-thumb { @@ -33,7 +35,9 @@ color: hsl(var(--range-shdw)); --filler-size: 100rem; --filler-offset: 0.5rem; - box-shadow: 0 0 0 3px hsl(var(--range-shdw)) inset, var(--focus-shadow, 0 0), + box-shadow: + 0 0 0 3px hsl(var(--range-shdw)) inset, + var(--focus-shadow, 0 0), calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size); } &-primary { diff --git a/src/components/styled/select.css b/src/components/styled/select.css index d9e41072f29..066b5762e6a 100644 --- a/src/components/styled/select.css +++ b/src/components/styled/select.css @@ -5,8 +5,12 @@ } background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); - background-position: calc(100% - 20px) calc(1px + 50%), calc(100% - 16px) calc(1px + 50%); - background-size: 4px 4px, 4px 4px; + background-position: + calc(100% - 20px) calc(1px + 50%), + calc(100% - 16px) calc(1px + 50%); + background-size: + 4px 4px, + 4px 4px; background-repeat: no-repeat; &:focus { @apply outline outline-2 outline-offset-2 outline-base-content/20; @@ -72,5 +76,7 @@ } [dir="rtl"] .select { - background-position: calc(0% + 12px) calc(1px + 50%), calc(0% + 16px) calc(1px + 50%); + background-position: + calc(0% + 12px) calc(1px + 50%), + calc(0% + 16px) calc(1px + 50%); } diff --git a/src/components/styled/toggle.css b/src/components/styled/toggle.css index 492a9e9d88b..971f320808a 100644 --- a/src/components/styled/toggle.css +++ b/src/components/styled/toggle.css @@ -4,8 +4,12 @@ --handleoffsetcalculator: calc(var(--handleoffset) * -1); --togglehandleborder: 0 0; @apply h-6 w-12 cursor-pointer appearance-none border border-base-content border-opacity-20 bg-base-content bg-opacity-50 rounded-badge; - transition: background, box-shadow var(--animation-input, 0.2s) ease-out; - box-shadow: var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset, 0 0 0 2px var(--tglbg) inset, + transition: + background, + box-shadow var(--animation-input, 0.2s) ease-out; + box-shadow: + var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset, + 0 0 0 2px var(--tglbg) inset, var(--togglehandleborder); [dir="rtl"] & { --handleoffsetcalculator: calc(var(--handleoffset) * 1); @@ -24,11 +28,15 @@ } &:indeterminate { @apply border-opacity-100 bg-opacity-100; - box-shadow: calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset, - calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset, 0 0 0 2px var(--tglbg) inset; + box-shadow: + calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset, + calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset, + 0 0 0 2px var(--tglbg) inset; [dir="rtl"] & { - box-shadow: calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset, - calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset, 0 0 0 2px var(--tglbg) inset; + box-shadow: + calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset, + calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset, + 0 0 0 2px var(--tglbg) inset; } } &-primary { diff --git a/src/components/unstyled/collapse.css b/src/components/unstyled/collapse.css index 8008820ce77..b1710970788 100644 --- a/src/components/unstyled/collapse.css +++ b/src/components/unstyled/collapse.css @@ -35,4 +35,4 @@ .collapse:not(.collapse-close) input[type="checkbox"]:checked ~ .collapse-content, .collapse:not(.collapse-close) input[type="radio"]:checked ~ .collapse-content { @apply visible min-h-fit; -} \ No newline at end of file +} diff --git a/src/components/unstyled/radial-progress.css b/src/components/unstyled/radial-progress.css index e9c86de4ca2..8b9196f0974 100644 --- a/src/components/unstyled/radial-progress.css +++ b/src/components/unstyled/radial-progress.css @@ -19,8 +19,9 @@ } .radial-progress:before { @apply inset-0; - background: radial-gradient(farthest-side, currentColor 98%, #0000) top/var(--thickness) - var(--thickness) no-repeat, + background: + radial-gradient(farthest-side, currentColor 98%, #0000) top/var(--thickness) var(--thickness) + no-repeat, conic-gradient(currentColor calc(var(--value) * 1%), #0000 0); -webkit-mask: radial-gradient( farthest-side, diff --git a/src/docs/src/app.html b/src/docs/src/app.html index 13767509ffe..b07fb7ee121 100644 --- a/src/docs/src/app.html +++ b/src/docs/src/app.html @@ -1,9 +1,13 @@ - + - + %sveltekit.head% diff --git a/src/experiments/compare/login-form/bootstrap/index.html b/src/experiments/compare/login-form/bootstrap/index.html index 351b6a449ce..d549df4690e 100644 --- a/src/experiments/compare/login-form/bootstrap/index.html +++ b/src/experiments/compare/login-form/bootstrap/index.html @@ -1,4 +1,4 @@ - + diff --git a/src/experiments/compare/login-form/daisyui/index.html b/src/experiments/compare/login-form/daisyui/index.html index 282dce68b3b..9e36094e0d0 100644 --- a/src/experiments/compare/login-form/daisyui/index.html +++ b/src/experiments/compare/login-form/daisyui/index.html @@ -1,4 +1,4 @@ - + diff --git a/src/experiments/compare/login-form/tailwind/index.html b/src/experiments/compare/login-form/tailwind/index.html index 92c720b405c..4555ff60d68 100644 --- a/src/experiments/compare/login-form/tailwind/index.html +++ b/src/experiments/compare/login-form/tailwind/index.html @@ -1,4 +1,4 @@ - + diff --git a/src/index.d.ts b/src/index.d.ts index 4627ddd4c5c..4e4aeb32910 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -8,103 +8,104 @@ export default daisyui /** * @link https://daisyui.com/docs/themes/#-4 */ -type CustomTheme = Record>; +type CustomTheme = Record> /** * https://daisyui.com/docs/themes/# */ -type Theme = 'light' | - 'dark' | - 'cupcake' | - 'bumblebee' | - 'emerald' | - 'corporate' | - 'synthwave' | - 'retro' | - 'cyberpunk' | - 'valentine' | - 'halloween' | - 'garden' | - 'forest' | - 'aqua' | - 'lofi' | - 'pastel' | - 'fantasy' | - 'wireframe' | - 'black' | - 'luxury' | - 'dracula' | - 'cmyk' | - 'autumn' | - 'business' | - 'acid' | - 'lemonade' | - 'night' | - 'coffee' | - 'winter'; +type Theme = + | "light" + | "dark" + | "cupcake" + | "bumblebee" + | "emerald" + | "corporate" + | "synthwave" + | "retro" + | "cyberpunk" + | "valentine" + | "halloween" + | "garden" + | "forest" + | "aqua" + | "lofi" + | "pastel" + | "fantasy" + | "wireframe" + | "black" + | "luxury" + | "dracula" + | "cmyk" + | "autumn" + | "business" + | "acid" + | "lemonade" + | "night" + | "coffee" + | "winter" interface DaisyUIConfig { - /** - * If it's true, all themes will be included. If it's false, only light and dark themes will be available. - * If it's an array, only themes in the array will be included and the first theme will be the default theme. - * Read more about [themes](https://daisyui.com/docs/themes/). - * - * @default false - */ - themes?: boolean | (Theme | CustomTheme)[], - /** - * Allows us to pick another theme for the system's auto dark mode. By default, dark theme - * (or a custom theme named dark) will be the default theme if no theme is specified and - * the user is using dark mode on their system. - * With this config, you can set another theme to be the default dark mode theme. - * - * @default 'dark' - */ - darkTheme?: string, - /** - * If it's true, a [few base styles](https://github.com/saadeghi/daisyui/blob/master/src/base) will be added. - * - * @default true - */ - base?: boolean, - /** - * If it's true, components will have colors and style, so you won't need to design anything. - * If it's false, components will have no color and no visual style, so you can design your own style - * on a basic skeleton. - * - * @default true - */ - styled?: boolean, - /** - * If it's true, [responsive and utility classes](https://github.com/saadeghi/daisyui/tree/master/src/utilities) will be added. - * - * @default true - */ - utils?: boolean, - /** - * If it's true, your theme will be right-to-left. You need to add `dir='rtl'` to your body tag. - * If you're using daisyUI with RTL option, I suggest using [tailwindcss-flip](https://github.com/cvrajeesh/tailwindcss-flip) - * plugin to flip all your Tailwind utilities automatically. - * - * @default false - */ - rtl?: boolean, - /** - * Adds a prefix to class name for all daisyUI classes (including component classes, modifier classes and responsive - * classes). For example, `btn` will become `prefix-btn`. If you're using a second CSS library that has similar - * class names, you can use this config to avoid conflicts. Utility classes like color names (e.g. `bg-primary`) - * or border-radius (e.g. `rounded-box`) will not be affected by this config because they're being added - * as extensions to Tailwind CSS classes. If you use daisyUI `prefix` option (like `daisy-`) and - * Tailwind CSS `prefix` option (like `tw-`) together, classnames will be prefixed like - * this: `tw-daisy-btn`. - */ - prefix?: string, - /** - * If it's true, daisyUI shows logs in the terminal while CSS is building. - * - * @default true - */ - logs?: boolean + /** + * If it's true, all themes will be included. If it's false, only light and dark themes will be available. + * If it's an array, only themes in the array will be included and the first theme will be the default theme. + * Read more about [themes](https://daisyui.com/docs/themes/). + * + * @default false + */ + themes?: boolean | (Theme | CustomTheme)[] + /** + * Allows us to pick another theme for the system's auto dark mode. By default, dark theme + * (or a custom theme named dark) will be the default theme if no theme is specified and + * the user is using dark mode on their system. + * With this config, you can set another theme to be the default dark mode theme. + * + * @default 'dark' + */ + darkTheme?: string + /** + * If it's true, a [few base styles](https://github.com/saadeghi/daisyui/blob/master/src/base) will be added. + * + * @default true + */ + base?: boolean + /** + * If it's true, components will have colors and style, so you won't need to design anything. + * If it's false, components will have no color and no visual style, so you can design your own style + * on a basic skeleton. + * + * @default true + */ + styled?: boolean + /** + * If it's true, [responsive and utility classes](https://github.com/saadeghi/daisyui/tree/master/src/utilities) will be added. + * + * @default true + */ + utils?: boolean + /** + * If it's true, your theme will be right-to-left. You need to add `dir='rtl'` to your body tag. + * If you're using daisyUI with RTL option, I suggest using [tailwindcss-flip](https://github.com/cvrajeesh/tailwindcss-flip) + * plugin to flip all your Tailwind utilities automatically. + * + * @default false + */ + rtl?: boolean + /** + * Adds a prefix to class name for all daisyUI classes (including component classes, modifier classes and responsive + * classes). For example, `btn` will become `prefix-btn`. If you're using a second CSS library that has similar + * class names, you can use this config to avoid conflicts. Utility classes like color names (e.g. `bg-primary`) + * or border-radius (e.g. `rounded-box`) will not be affected by this config because they're being added + * as extensions to Tailwind CSS classes. If you use daisyUI `prefix` option (like `daisy-`) and + * Tailwind CSS `prefix` option (like `tw-`) together, classnames will be prefixed like + * this: `tw-daisy-btn`. + */ + prefix?: string + /** + * If it's true, daisyUI shows logs in the terminal while CSS is building. + * + * @default true + */ + logs?: boolean } export type { DaisyUIConfig as Config, Theme, CustomTheme } diff --git a/src/theming/themes.d.ts b/src/theming/themes.d.ts index d045030041c..723bdc7a014 100644 --- a/src/theming/themes.d.ts +++ b/src/theming/themes.d.ts @@ -1,5 +1,5 @@ -import { CustomTheme, Theme } from '../index'; +import { CustomTheme, Theme } from "../index" -declare const themes: Record<`[data-theme=${Theme}]`, CustomTheme[string]>; +declare const themes: Record<`[data-theme=${Theme}]`, CustomTheme[string]> -export default themes; +export default themes diff --git a/src/utilities/global/glass.css b/src/utilities/global/glass.css index 4c2d48090b0..797c4f85329 100644 --- a/src/utilities/global/glass.css +++ b/src/utilities/global/glass.css @@ -14,7 +14,8 @@ rgb(255 255 255 / var(--glass-reflex-opacity, 10%)) 25%, rgb(0 0 0 / 0%) 25% ); - box-shadow: 0 0 0 1px rgb(255 255 255 / var(--glass-border-opacity, 10%)) inset, + box-shadow: + 0 0 0 1px rgb(255 255 255 / var(--glass-border-opacity, 10%)) inset, 0 0 0 2px rgb(0 0 0 / 5%); text-shadow: 0 1px rgb(0 0 0 / var(--glass-text-shadow-opacity, 5%)); } @@ -33,7 +34,8 @@ rgb(255 255 255 / var(--glass-reflex-opacity, 10%)) 25%, rgb(0 0 0 / 0%) 25% ); - box-shadow: 0 0 0 1px rgb(255 255 255 / var(--glass-border-opacity, 10%)) inset, + box-shadow: + 0 0 0 1px rgb(255 255 255 / var(--glass-border-opacity, 10%)) inset, 0 0 0 2px rgb(0 0 0 / 5%); text-shadow: 0 1px rgb(0 0 0 / var(--glass-text-shadow-opacity, 5%)); } diff --git a/src/utilities/styled/artboard.css b/src/utilities/styled/artboard.css index 952cc659e32..2c26f3665ec 100644 --- a/src/utilities/styled/artboard.css +++ b/src/utilities/styled/artboard.css @@ -1,6 +1,8 @@ .artboard { &-demo { @apply bg-base-300 text-base-content rounded-box; - box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + box-shadow: + 0 1px 3px 0 rgba(0, 0, 0, 0.1), + 0 1px 2px 0 rgba(0, 0, 0, 0.06); } }