daisyui 2.0.6 → 2.1.0

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.
@@ -1 +1 @@
1
- module.exports = {".alert-sm":{"padding":".5rem"},".alert-info":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--in) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--inc,var(--nc)) / var(--tw-text-opacity))"},".alert-success":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--su) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--suc,var(--nc)) / var(--tw-text-opacity))"},".alert-warning":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--wa) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--wac,var(--nc)) / var(--tw-text-opacity))"},".alert-error":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--er) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--erc,var(--nc)) / var(--tw-text-opacity))"},".artboard-demo":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--b1) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--bc) / var(--tw-text-opacity))","borderRadius":"var(--rounded-box,1rem)","boxShadow":"0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)"},".avatar.online:before":{"content":"\"\"","position":"absolute","zIndex":"10","display":"block","borderRadius":"9999px","-TwBgOpacity":"1","backgroundColor":"hsl(var(--su) / var(--tw-bg-opacity))","width":"15%","height":"15%","top":"7%","right":"7%","boxShadow":"0 0 0 2px hsl(var(--b1))"},".avatar.offline:before":{"content":"\"\"","position":"absolute","zIndex":"10","display":"block","borderRadius":"9999px","-TwBgOpacity":"1","backgroundColor":"hsl(var(--b3,var(--b2)) / var(--tw-bg-opacity))","width":"15%","height":"15%","top":"7%","right":"7%","boxShadow":"0 0 0 2px hsl(var(--b1))"},".badge-primary":{"-TwBorderOpacity":"1","borderColor":"hsl(var(--p) / var(--tw-border-opacity))","-TwBgOpacity":"1","backgroundColor":"hsl(var(--p) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--pc) / var(--tw-text-opacity))"},".badge-secondary":{"-TwBorderOpacity":"1","borderColor":"hsl(var(--s) / var(--tw-border-opacity))","-TwBgOpacity":"1","backgroundColor":"hsl(var(--s) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--sc) / var(--tw-text-opacity))"},".badge-accent":{"-TwBorderOpacity":"1","borderColor":"hsl(var(--a) / var(--tw-border-opacity))","-TwBgOpacity":"1","backgroundColor":"hsl(var(--a) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--ac) / var(--tw-text-opacity))"},".badge-ghost":{"-TwBorderOpacity":"1","borderColor":"hsl(var(--b2,var(--b1)) / var(--tw-border-opacity))","-TwBgOpacity":"1","backgroundColor":"hsl(var(--b2,var(--b1)) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--bc) / var(--tw-text-opacity))"},".badge-outline":{"borderColor":"currentColor","-TwBorderOpacity":"0.5","backgroundColor":"transparent","-TwTextOpacity":"1","color":"hsl(var(--bc) / var(--tw-text-opacity))"},".badge-outline.badge-primary":{"-TwTextOpacity":"1","color":"hsl(var(--p) / var(--tw-text-opacity))"},".badge-outline.badge-secondary":{"-TwTextOpacity":"1","color":"hsl(var(--s) / var(--tw-text-opacity))"},".badge-outline.badge-accent":{"-TwTextOpacity":"1","color":"hsl(var(--a) / var(--tw-text-opacity))"},".badge-info":{"borderColor":"transparent","-TwBgOpacity":"1","backgroundColor":"hsl(var(--in) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--inc,var(--nc)) / var(--tw-text-opacity))"},".badge-success":{"borderColor":"transparent","-TwBgOpacity":"1","backgroundColor":"hsl(var(--su) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--suc,var(--nc)) / var(--tw-text-opacity))"},".badge-warning":{"borderColor":"transparent","-TwBgOpacity":"1","backgroundColor":"hsl(var(--wa) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--wac,var(--nc)) / var(--tw-text-opacity))"},".badge-error":{"borderColor":"transparent","-TwBgOpacity":"1","backgroundColor":"hsl(var(--er) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--erc,var(--nc)) / var(--tw-text-opacity))"},".card-compact .card-body":{"padding":"1rem","fontSize":".875rem","lineHeight":"1.25rem"},".card-compact .card-title":{"marginBottom":".25rem"},".card-normal .card-body":{"padding":"var(--padding-card,2rem)","fontSize":"1rem","lineHeight":"1.5rem"},".card-normal .card-title":{"marginBottom":".75rem"},".divider-horizontal":{"marginTop":"0","marginBottom":"0","marginLeft":"1rem","marginRight":"1rem","height":"auto","width":"1rem"},".divider-vertical":{"marginLeft":"0","marginRight":"0","marginTop":"1rem","marginBottom":"1rem","height":"1rem","width":"auto"},".menu-vertical :where(li.bordered>*)":{"borderLeftWidth":"4px","borderBottomWidth":"0"},".menu-horizontal :where(li.bordered>*)":{"borderLeftWidth":"0","borderBottomWidth":"4px"},".menu-normal :where(li>*)":{"paddingTop":".75rem","paddingBottom":".75rem","fontSize":"1rem","lineHeight":"1.5rem"},".menu-compact :where(li>*)":{"paddingTop":".5rem","paddingBottom":".5rem","fontSize":".875rem","lineHeight":"1.25rem"},".menu-vertical>:where(li:first-child)":{"borderTopLeftRadius":"inherit","borderTopRightRadius":"inherit","borderBottomRightRadius":"unset","borderBottomLeftRadius":"unset"},".menu-vertical>:where(li:first-child)>:where(:not(ul))":{"borderTopLeftRadius":"inherit","borderTopRightRadius":"inherit","borderBottomRightRadius":"unset","borderBottomLeftRadius":"unset"},".menu-vertical>:where(li:last-child)":{"borderTopLeftRadius":"unset","borderTopRightRadius":"unset","borderBottomRightRadius":"inherit","borderBottomLeftRadius":"inherit"},".menu-vertical>:where(li:last-child)>:where(:not(ul))":{"borderTopLeftRadius":"unset","borderTopRightRadius":"unset","borderBottomRightRadius":"inherit","borderBottomLeftRadius":"inherit"},".menu-horizontal>:where(li:first-child)":{"borderTopLeftRadius":"inherit","borderTopRightRadius":"unset","borderBottomRightRadius":"unset","borderBottomLeftRadius":"inherit"},".menu-horizontal>:where(li:first-child)>:where(:not(ul))":{"borderTopLeftRadius":"inherit","borderTopRightRadius":"unset","borderBottomRightRadius":"unset","borderBottomLeftRadius":"inherit"},".menu-horizontal>:where(li:last-child)":{"borderTopLeftRadius":"unset","borderTopRightRadius":"inherit","borderBottomRightRadius":"inherit","borderBottomLeftRadius":"unset"},".menu-horizontal>:where(li:last-child)>:where(:not(ul))":{"borderTopLeftRadius":"unset","borderTopRightRadius":"inherit","borderBottomRightRadius":"inherit","borderBottomLeftRadius":"unset"},".stats-horizontal>:not([hidden])~:not([hidden])":{"-TwDivideXReverse":"0","borderRightWidth":"calc(1px * var(--tw-divide-x-reverse))","borderLeftWidth":"calc(1px * calc(1 - var(--tw-divide-x-reverse)))","-TwDivideYReverse":"0","borderTopWidth":"calc(0px * calc(1 - var(--tw-divide-y-reverse)))","borderBottomWidth":"calc(0px * var(--tw-divide-y-reverse))"},".stats-horizontal":{"overflowX":"auto"},".stats-vertical>:not([hidden])~:not([hidden])":{"-TwDivideYReverse":"0","borderTopWidth":"calc(1px * calc(1 - var(--tw-divide-y-reverse)))","borderBottomWidth":"calc(1px * var(--tw-divide-y-reverse))","-TwDivideXReverse":"0","borderRightWidth":"calc(0px * var(--tw-divide-x-reverse))","borderLeftWidth":"calc(0px * calc(1 - var(--tw-divide-x-reverse)))"},".stats-vertical":{"overflowY":"auto"},".steps-horizontal .step":{"gridTemplateRows":"40px 1fr","gridTemplateColumns":"auto","minWidth":"4rem"},".steps-horizontal .step:before":{"height":".5rem","width":"100%","-TwTranslateY":"0px","-TwTranslateX":"0px","transform":"translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))","content":"\"\"","marginLeft":"-100%"},".steps-vertical .step":{"gap":".5rem","gridTemplateColumns":"40px 1fr","gridTemplateRows":"auto","minHeight":"4rem","justifyItems":"start"},".steps-vertical .step:before":{"height":"100%","width":".5rem","-TwTranslateY":"-50%","-TwTranslateX":"-50%","transform":"translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))","marginLeft":"50%"},".table-normal :where(th,td)":{"padding":"1rem","fontSize":"1rem","lineHeight":"1.5rem"},".table-compact :where(th,td)":{"padding":".5rem","fontSize":".875rem","lineHeight":"1.25rem"}};
1
+ module.exports = {".alert-sm":{"padding":".5rem"},".alert-info":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--in) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--inc,var(--nc)) / var(--tw-text-opacity))"},".alert-success":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--su) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--suc,var(--nc)) / var(--tw-text-opacity))"},".alert-warning":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--wa) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--wac,var(--nc)) / var(--tw-text-opacity))"},".alert-error":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--er) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--erc,var(--nc)) / var(--tw-text-opacity))"},".artboard-demo":{"-TwBgOpacity":"1","backgroundColor":"hsl(var(--b1) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--bc) / var(--tw-text-opacity))","borderRadius":"var(--rounded-box,1rem)","boxShadow":"0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)"},".avatar.online:before":{"content":"\"\"","position":"absolute","zIndex":"10","display":"block","borderRadius":"9999px","-TwBgOpacity":"1","backgroundColor":"hsl(var(--suc,var(--nc)) / var(--tw-bg-opacity))","width":"15%","height":"15%","top":"7%","right":"7%","boxShadow":"0 0 0 2px hsl(var(--b1))"},".avatar.offline:before":{"content":"\"\"","position":"absolute","zIndex":"10","display":"block","borderRadius":"9999px","-TwBgOpacity":"1","backgroundColor":"hsl(var(--b3,var(--b2)) / var(--tw-bg-opacity))","width":"15%","height":"15%","top":"7%","right":"7%","boxShadow":"0 0 0 2px hsl(var(--b1))"},".badge-primary":{"-TwBorderOpacity":"1","borderColor":"hsl(var(--p) / var(--tw-border-opacity))","-TwBgOpacity":"1","backgroundColor":"hsl(var(--p) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--pc) / var(--tw-text-opacity))"},".badge-secondary":{"-TwBorderOpacity":"1","borderColor":"hsl(var(--s) / var(--tw-border-opacity))","-TwBgOpacity":"1","backgroundColor":"hsl(var(--s) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--sc) / var(--tw-text-opacity))"},".badge-accent":{"-TwBorderOpacity":"1","borderColor":"hsl(var(--a) / var(--tw-border-opacity))","-TwBgOpacity":"1","backgroundColor":"hsl(var(--a) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--ac) / var(--tw-text-opacity))"},".badge-ghost":{"-TwBorderOpacity":"1","borderColor":"hsl(var(--b2,var(--b1)) / var(--tw-border-opacity))","-TwBgOpacity":"1","backgroundColor":"hsl(var(--b2,var(--b1)) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--bc) / var(--tw-text-opacity))"},".badge-outline":{"borderColor":"currentColor","-TwBorderOpacity":"0.5","backgroundColor":"transparent","-TwTextOpacity":"1","color":"hsl(var(--bc) / var(--tw-text-opacity))"},".badge-outline.badge-primary":{"-TwTextOpacity":"1","color":"hsl(var(--p) / var(--tw-text-opacity))"},".badge-outline.badge-secondary":{"-TwTextOpacity":"1","color":"hsl(var(--s) / var(--tw-text-opacity))"},".badge-outline.badge-accent":{"-TwTextOpacity":"1","color":"hsl(var(--a) / var(--tw-text-opacity))"},".badge-info":{"borderColor":"transparent","-TwBgOpacity":"1","backgroundColor":"hsl(var(--in) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--inc,var(--nc)) / var(--tw-text-opacity))"},".badge-success":{"borderColor":"transparent","-TwBgOpacity":"1","backgroundColor":"hsl(var(--su) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--suc,var(--nc)) / var(--tw-text-opacity))"},".badge-warning":{"borderColor":"transparent","-TwBgOpacity":"1","backgroundColor":"hsl(var(--wa) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--wac,var(--nc)) / var(--tw-text-opacity))"},".badge-error":{"borderColor":"transparent","-TwBgOpacity":"1","backgroundColor":"hsl(var(--er) / var(--tw-bg-opacity))","-TwTextOpacity":"1","color":"hsl(var(--erc,var(--nc)) / var(--tw-text-opacity))"},".card-compact .card-body":{"padding":"1rem","fontSize":".875rem","lineHeight":"1.25rem"},".card-compact .card-title":{"marginBottom":".25rem"},".card-normal .card-body":{"padding":"var(--padding-card,2rem)","fontSize":"1rem","lineHeight":"1.5rem"},".card-normal .card-title":{"marginBottom":".75rem"},".divider-horizontal":{"marginTop":"0","marginBottom":"0","marginLeft":"1rem","marginRight":"1rem","height":"auto","width":"1rem"},".divider-vertical":{"marginLeft":"0","marginRight":"0","marginTop":"1rem","marginBottom":"1rem","height":"1rem","width":"auto"},".menu-vertical :where(li.bordered>*)":{"borderLeftWidth":"4px","borderBottomWidth":"0"},".menu-horizontal :where(li.bordered>*)":{"borderLeftWidth":"0","borderBottomWidth":"4px"},".menu-normal :where(li>*)":{"paddingTop":".75rem","paddingBottom":".75rem","fontSize":"1rem","lineHeight":"1.5rem"},".menu-compact :where(li>*)":{"paddingTop":".5rem","paddingBottom":".5rem","fontSize":".875rem","lineHeight":"1.25rem"},".menu-vertical>:where(li:first-child)":{"borderTopLeftRadius":"inherit","borderTopRightRadius":"inherit","borderBottomRightRadius":"unset","borderBottomLeftRadius":"unset"},".menu-vertical>:where(li:first-child)>:where(:not(ul))":{"borderTopLeftRadius":"inherit","borderTopRightRadius":"inherit","borderBottomRightRadius":"unset","borderBottomLeftRadius":"unset"},".menu-vertical>:where(li:last-child)":{"borderTopLeftRadius":"unset","borderTopRightRadius":"unset","borderBottomRightRadius":"inherit","borderBottomLeftRadius":"inherit"},".menu-vertical>:where(li:last-child)>:where(:not(ul))":{"borderTopLeftRadius":"unset","borderTopRightRadius":"unset","borderBottomRightRadius":"inherit","borderBottomLeftRadius":"inherit"},".menu-horizontal>:where(li:first-child)":{"borderTopLeftRadius":"inherit","borderTopRightRadius":"unset","borderBottomRightRadius":"unset","borderBottomLeftRadius":"inherit"},".menu-horizontal>:where(li:first-child)>:where(:not(ul))":{"borderTopLeftRadius":"inherit","borderTopRightRadius":"unset","borderBottomRightRadius":"unset","borderBottomLeftRadius":"inherit"},".menu-horizontal>:where(li:last-child)":{"borderTopLeftRadius":"unset","borderTopRightRadius":"inherit","borderBottomRightRadius":"inherit","borderBottomLeftRadius":"unset"},".menu-horizontal>:where(li:last-child)>:where(:not(ul))":{"borderTopLeftRadius":"unset","borderTopRightRadius":"inherit","borderBottomRightRadius":"inherit","borderBottomLeftRadius":"unset"},".stats-horizontal>:not([hidden])~:not([hidden])":{"-TwDivideXReverse":"0","borderRightWidth":"calc(1px * var(--tw-divide-x-reverse))","borderLeftWidth":"calc(1px * calc(1 - var(--tw-divide-x-reverse)))","-TwDivideYReverse":"0","borderTopWidth":"calc(0px * calc(1 - var(--tw-divide-y-reverse)))","borderBottomWidth":"calc(0px * var(--tw-divide-y-reverse))"},".stats-horizontal":{"overflowX":"auto"},".stats-vertical>:not([hidden])~:not([hidden])":{"-TwDivideYReverse":"0","borderTopWidth":"calc(1px * calc(1 - var(--tw-divide-y-reverse)))","borderBottomWidth":"calc(1px * var(--tw-divide-y-reverse))","-TwDivideXReverse":"0","borderRightWidth":"calc(0px * var(--tw-divide-x-reverse))","borderLeftWidth":"calc(0px * calc(1 - var(--tw-divide-x-reverse)))"},".stats-vertical":{"overflowY":"auto"},".steps-horizontal .step":{"gridTemplateRows":"40px 1fr","gridTemplateColumns":"auto","minWidth":"4rem"},".steps-horizontal .step:before":{"height":".5rem","width":"100%","-TwTranslateY":"0px","-TwTranslateX":"0px","transform":"translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))","content":"\"\"","marginLeft":"-100%"},".steps-vertical .step":{"gap":".5rem","gridTemplateColumns":"40px 1fr","gridTemplateRows":"auto","minHeight":"4rem","justifyItems":"start"},".steps-vertical .step:before":{"height":"100%","width":".5rem","-TwTranslateY":"-50%","-TwTranslateX":"-50%","transform":"translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))","marginLeft":"50%"},".table-normal :where(th,td)":{"padding":"1rem","fontSize":"1rem","lineHeight":"1.5rem"},".table-compact :where(th,td)":{"padding":".5rem","fontSize":".875rem","lineHeight":"1.25rem"}};
package/dist/utilities.js CHANGED
@@ -1 +1 @@
1
- module.exports = {".rounded-box":{"borderRadius":"var(--rounded-box,1rem)"},".rounded-t-box":{"borderTopLeftRadius":"var(--rounded-box,1rem)","borderTopRightRadius":"var(--rounded-box,1rem)"},".rounded-b-box":{"borderBottomLeftRadius":"var(--rounded-box,1rem)","borderBottomRightRadius":"var(--rounded-box,1rem)"},".rounded-btn":{"borderRadius":"var(--rounded-btn,.5rem)"},".rounded-badge":{"borderRadius":"var(--rounded-badge,1.9rem)"},".text-2xs":{"fontSize":".7rem"},".glass,.glass.btn-active,.glass:hover":{"border":"none","backdropFilter":"blur(var(--glass-blur, 40px))","backgroundColor":"transparent","backgroundImage":"linear-gradient(135deg,rgb(255 255 255 / var(--glass-opacity,30%)) 0,rgb(0 0 0 / 0) 100%),linear-gradient(var(--glass-reflex-degree,100deg),rgb(255 255 255 / var(--glass-reflex-opacity,10%)) 25%,rgb(0 0 0 / 0) 25%)","boxShadow":"0 0 0 1px rgb(255 255 255 / var(--glass-border-opacity,10%)) inset,0 0 0 2px rgb(0 0 0 / 5%)","textShadow":"0 1px rgb(0 0 0 / var(--glass-text-shadow-opacity,5%))"},".min-h-6":{"minHeight":"1.5rem"},".min-h-8":{"minHeight":"2rem"},".min-h-12":{"minHeight":"3rem"},".min-h-16":{"minHeight":"4rem"},".no-animation":{"-BtnFocusScale":"1","-AnimationBtn":"0","-AnimationInput":"0"},".tab-border-none":{"-TabBorder":"0px"},".tab-border":{"-TabBorder":"1px"},".tab-border-2":{"-TabBorder":"2px"},".tab-border-3":{"-TabBorder":"3px"},".tab-rounded-none":{"-TabRadius":"0"},".tab-rounded-lg":{"-TabRadius":"0.5rem"}};
1
+ module.exports = {".rounded-box":{"borderRadius":"var(--rounded-box,1rem)"},".rounded-t-box":{"borderTopLeftRadius":"var(--rounded-box,1rem)","borderTopRightRadius":"var(--rounded-box,1rem)"},".rounded-b-box":{"borderBottomLeftRadius":"var(--rounded-box,1rem)","borderBottomRightRadius":"var(--rounded-box,1rem)"},".rounded-l-box":{"borderTopLeftRadius":"var(--rounded-box,1rem)","borderBottomLeftRadius":"var(--rounded-box,1rem)"},".rounded-r-box":{"borderTopRightRadius":"var(--rounded-box,1rem)","borderBottomRightRadius":"var(--rounded-box,1rem)"},".rounded-br-box":{"borderBottomRightRadius":"var(--rounded-box,1rem)"},".rounded-tr-box":{"borderTopRightRadius":"var(--rounded-box,1rem)"},".rounded-bl-box":{"borderBottomLeftRadius":"var(--rounded-box,1rem)"},".rounded-tl-box":{"borderTopLeftRadius":"var(--rounded-box,1rem)"},".rounded-btn":{"borderRadius":"var(--rounded-btn,.5rem)"},".rounded-badge":{"borderRadius":"var(--rounded-badge,1.9rem)"},".text-2xs":{"fontSize":".7rem"},".glass,.glass.btn-active,.glass:hover":{"border":"none","backdropFilter":"blur(var(--glass-blur, 40px))","backgroundColor":"transparent","backgroundImage":"linear-gradient(135deg,rgb(255 255 255 / var(--glass-opacity,30%)) 0,rgb(0 0 0 / 0) 100%),linear-gradient(var(--glass-reflex-degree,100deg),rgb(255 255 255 / var(--glass-reflex-opacity,10%)) 25%,rgb(0 0 0 / 0) 25%)","boxShadow":"0 0 0 1px rgb(255 255 255 / var(--glass-border-opacity,10%)) inset,0 0 0 2px rgb(0 0 0 / 5%)","textShadow":"0 1px rgb(0 0 0 / var(--glass-text-shadow-opacity,5%))"},".min-h-6":{"minHeight":"1.5rem"},".min-h-8":{"minHeight":"2rem"},".min-h-12":{"minHeight":"3rem"},".min-h-16":{"minHeight":"4rem"},".no-animation":{"-BtnFocusScale":"1","-AnimationBtn":"0","-AnimationInput":"0"},".tab-border-none":{"-TabBorder":"0px"},".tab-border":{"-TabBorder":"1px"},".tab-border-2":{"-TabBorder":"2px"},".tab-border-3":{"-TabBorder":"3px"},".tab-rounded-none":{"-TabRadius":"0"},".tab-rounded-lg":{"-TabRadius":"0.5rem"}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "daisyui",
3
- "version": "2.0.6",
3
+ "version": "2.1.0",
4
4
  "description": "daisyUI - Tailwind CSS Components",
5
5
  "author": "Pouya Saadeghi",
6
6
  "license": "MIT",
@@ -44,16 +44,6 @@
44
44
  "master"
45
45
  ]
46
46
  },
47
- "devDependencies": {
48
- "autoprefixer": "10.0.4",
49
- "postcss": "8.1.10",
50
- "postcss-clean": "1.2.2",
51
- "postcss-cli": "8.3.0",
52
- "postcss-import": "13.0.0",
53
- "postcss-nested": "5.0.1",
54
- "prejss-cli": "0.3.3",
55
- "rtlcss": "3.0.0"
56
- },
57
47
  "scripts": {
58
48
  "prebase": "postcss --config src/base src/base/*.css --base src --dir dist",
59
49
  "base": "cat dist/base/*.css > dist/base.css",
@@ -75,14 +65,27 @@
75
65
  "themes": "postcss src/themes/index.css -o dist/themes.css --config src/themes",
76
66
  "full": "postcss src/full/index.css -o dist/full.css --config src/full",
77
67
  "build": "npm run base && npm run utilities:global && npm run utilities:unstyled && npm run utilities:styled && npm run components && npm run merge:unstyled && npm run merge:styled && npm run rtl && npm run prejss && npm run themes && npm run full",
78
- "clean": "rm -R colors && rm -R dist && rm index.js",
79
68
  "install:docs": "cd src/docs && npm install",
80
69
  "dev": "cd src/docs && npm run dev",
81
70
  "add": "touch src/components/unstyled/$npm_config_name.css && touch src/components/styled/$npm_config_name.css",
82
71
  "postadd": "open src/components/unstyled/$npm_config_name.css && open src/components/styled/$npm_config_name.css"
83
72
  },
73
+ "devDependencies": {
74
+ "autoprefixer": "10.0.4",
75
+ "postcss": "8.1.10",
76
+ "postcss-clean": "1.2.2",
77
+ "postcss-cli": "8.3.0",
78
+ "postcss-import": "13.0.0",
79
+ "postcss-nested": "5.0.1",
80
+ "prejss-cli": "0.3.3",
81
+ "rtlcss": "3.0.0"
82
+ },
84
83
  "dependencies": {
85
84
  "color": "^4.2",
86
85
  "tailwindcss": "^3.0"
86
+ },
87
+ "peerDependencies": {
88
+ "autoprefixer": "^10.0.2",
89
+ "postcss": "^8.0.9"
87
90
  }
88
91
  }
@@ -0,0 +1,307 @@
1
+ const colorNames = require("./colorNames");
2
+ const Color = require("color");
3
+
4
+ const generateForegorundColorFrom = function (input, percentage = 0.8) {
5
+ if (Color(input).isDark()) {
6
+ let arr = Color(input).mix(Color("white"), percentage).saturate(10).hsl().round().array()
7
+ return arr[0] + " " + arr[1] + "%" + " " + arr[2] + "%";
8
+ } else {
9
+ let arr = Color(input).mix(Color("black"), percentage).saturate(10).hsl().round().array()
10
+ return arr[0] + " " + arr[1] + "%" + " " + arr[2] + "%";
11
+ }
12
+ }
13
+
14
+ const convertToHsl = function (input) {
15
+ let resultObj = {};
16
+ if (typeof input === "object" && input !== null) {
17
+ Object.entries(input).forEach(([rule, value]) => {
18
+ if (colorNames.hasOwnProperty(rule)) {
19
+ const hslArray = Color(value).hsl().round().array();
20
+ resultObj[colorNames[rule]] = hslArray[0] + " " + hslArray[1] + "%" + " " + hslArray[2] + "%";
21
+ } else {
22
+ resultObj[rule] = value;
23
+ }
24
+
25
+ // auto generate focus colors
26
+ if (!input.hasOwnProperty("primary-focus")) {
27
+ const darkerHslArray = Color(input["primary"]).darken(0.2).hsl().round().array();
28
+ resultObj["--pf"] = darkerHslArray[0] + " " + darkerHslArray[1] + "%" + " " + darkerHslArray[2] + "%";
29
+ }
30
+
31
+ if (!input.hasOwnProperty("secondary-focus")) {
32
+ const darkerHslArray = Color(input["secondary"]).darken(0.2).hsl().round().array();
33
+ resultObj["--sf"] = darkerHslArray[0] + " " + darkerHslArray[1] + "%" + " " + darkerHslArray[2] + "%";
34
+ }
35
+
36
+ if (!input.hasOwnProperty("accent-focus")) {
37
+ const darkerHslArray = Color(input["accent"]).darken(0.2).hsl().round().array();
38
+ resultObj["--af"] = darkerHslArray[0] + " " + darkerHslArray[1] + "%" + " " + darkerHslArray[2] + "%";
39
+ }
40
+
41
+ if (!input.hasOwnProperty("neutral-focus")) {
42
+ const darkerHslArray = Color(input["neutral"]).darken(0.2).hsl().round().array();
43
+ resultObj["--nf"] = darkerHslArray[0] + " " + darkerHslArray[1] + "%" + " " + darkerHslArray[2] + "%";
44
+ }
45
+
46
+ // auto generate base colors
47
+ if (!input.hasOwnProperty("base-100")) {
48
+ resultObj["--b1"] = 0 + " " + 0 + "%" + " " + 100 + "%";
49
+ }
50
+
51
+ if (!input.hasOwnProperty("base-200")) {
52
+ const darkerHslArray = Color(input["base-100"]).darken(0.1).hsl().round().array();
53
+ resultObj["--b2"] = darkerHslArray[0] + " " + darkerHslArray[1] + "%" + " " + darkerHslArray[2] + "%";
54
+ }
55
+
56
+ if (!input.hasOwnProperty("base-300")) {
57
+ if (input.hasOwnProperty("base-200")) {
58
+ const darkerHslArray = Color(input["base-200"]).darken(0.1).hsl().round().array();
59
+ resultObj["--b3"] = darkerHslArray[0] + " " + darkerHslArray[1] + "%" + " " + darkerHslArray[2] + "%";
60
+ } else {
61
+ const darkerHslArray = Color(input["base-100"]).darken(0.1).darken(0.1).hsl().round().array();
62
+ resultObj["--b3"] = darkerHslArray[0] + " " + darkerHslArray[1] + "%" + " " + darkerHslArray[2] + "%";
63
+ }
64
+ }
65
+
66
+ // auto generate state colors
67
+ if (!input.hasOwnProperty("info")) {
68
+ resultObj["--in"] = 204 + " " + 94 + "%" + " " + 94 + "%";
69
+ }
70
+ if (!input.hasOwnProperty("success")) {
71
+ resultObj["--su"] = 141 + " " + 84 + "%" + " " + 93 + "%";
72
+ }
73
+ if (!input.hasOwnProperty("warning")) {
74
+ resultObj["--wa"] = 48 + " " + 96 + "%" + " " + 89 + "%";
75
+ }
76
+ if (!input.hasOwnProperty("error")) {
77
+ resultObj["--er"] = 0 + " " + 93 + "%" + " " + 94 + "%";
78
+ }
79
+
80
+ // auto generate content colors
81
+ if (!input.hasOwnProperty("base-content")) {
82
+ resultObj["--bc"] = generateForegorundColorFrom(input["base-100"])
83
+ }
84
+ if (!input.hasOwnProperty("primary-content")) {
85
+ resultObj["--pc"] = generateForegorundColorFrom(input["primary"])
86
+ }
87
+
88
+ if (!input.hasOwnProperty("secondary-content")) {
89
+ resultObj["--sc"] = generateForegorundColorFrom(input["secondary"])
90
+ }
91
+
92
+ if (!input.hasOwnProperty("accent-content")) {
93
+ resultObj["--ac"] = generateForegorundColorFrom(input["accent"])
94
+ }
95
+
96
+ if (!input.hasOwnProperty("neutral-content")) {
97
+ resultObj["--nc"] = generateForegorundColorFrom(input["neutral"])
98
+ }
99
+
100
+ if (!input.hasOwnProperty("info-content")) {
101
+ if (input.hasOwnProperty("info")) {
102
+ resultObj["--inc"] = generateForegorundColorFrom(input["info"])
103
+ } else {
104
+ resultObj["--inc"] = 221 + " " + 83 + "%" + " " + 53 + "%";
105
+ }
106
+ }
107
+
108
+ if (!input.hasOwnProperty("success-content")) {
109
+ if (input.hasOwnProperty("success")) {
110
+ resultObj["--suc"] = generateForegorundColorFrom(input["success"])
111
+ } else {
112
+ resultObj["--suc"] = 142 + " " + 76 + "%" + " " + 36 + "%";
113
+ }
114
+ }
115
+
116
+ if (!input.hasOwnProperty("warning-content")) {
117
+ if (input.hasOwnProperty("warning")) {
118
+ resultObj["--wac"] = generateForegorundColorFrom(input["warning"])
119
+ } else {
120
+ resultObj["--wac"] = 32 + " " + 95 + "%" + " " + 44 + "%";
121
+ }
122
+ }
123
+
124
+ if (!input.hasOwnProperty("error-content")) {
125
+ if (input.hasOwnProperty("error")) {
126
+ resultObj["--erc"] = generateForegorundColorFrom(input["error"])
127
+ } else {
128
+ resultObj["--erc"] = 0 + " " + 72 + "%" + " " + 51 + "%";
129
+ }
130
+ }
131
+
132
+ // auto generate css variables
133
+ if (!input.hasOwnProperty("--rounded-box")) {
134
+ resultObj["--rounded-box"] = "1rem";
135
+ }
136
+ if (!input.hasOwnProperty("--rounded-btn")) {
137
+ resultObj["--rounded-btn"] = "0.5rem";
138
+ }
139
+ if (!input.hasOwnProperty("--rounded-badge")) {
140
+ resultObj["--rounded-badge"] = "1.9rem";
141
+ }
142
+ if (!input.hasOwnProperty("--animation-btn")) {
143
+ resultObj["--animation-btn"] = "0.25s";
144
+ }
145
+ if (!input.hasOwnProperty("--animation-input")) {
146
+ resultObj["--animation-input"] = ".2s";
147
+ }
148
+ if (!input.hasOwnProperty("--btn-text-case")) {
149
+ resultObj["--btn-text-case"] = "uppercase";
150
+ }
151
+ if (!input.hasOwnProperty("--btn-focus-scale")) {
152
+ resultObj["--btn-focus-scale"] = "0.95";
153
+ }
154
+ if (!input.hasOwnProperty("--border-btn")) {
155
+ resultObj["--border-btn"] = "1px";
156
+ }
157
+ if (!input.hasOwnProperty("--tab-border")) {
158
+ resultObj["--tab-border"] = "1px";
159
+ }
160
+ if (!input.hasOwnProperty("--tab-radius")) {
161
+ resultObj["--tab-radius"] = "0.5rem";
162
+ }
163
+
164
+ });
165
+ return resultObj;
166
+ }
167
+ return input;
168
+ };
169
+
170
+ module.exports = {
171
+
172
+ injectThemes: function (addBase, config, themes) {
173
+ let includedThemesObj = new Object();
174
+
175
+ // add light themes
176
+ if (config("daisyui.themes") == false) {
177
+ Object.entries(themes).forEach(([theme, index]) => {
178
+ includedThemesObj[theme] = convertToHsl(themes[theme]);
179
+ });
180
+ }
181
+
182
+ // add default themes
183
+ if (config("daisyui.themes") != false) {
184
+ Object.entries(themes).forEach(([theme, index]) => {
185
+ includedThemesObj[theme] = convertToHsl(themes[theme]);
186
+ });
187
+ }
188
+
189
+ // add custom themes
190
+ if (Array.isArray(config("daisyui.themes"))) {
191
+ config("daisyui.themes").forEach((item, index) => {
192
+ if (typeof item === "object" && item !== null) {
193
+ Object.entries(item).forEach(([customThemeName, customThemevalue]) => {
194
+ includedThemesObj["[data-theme=" + customThemeName + "]"] =
195
+ convertToHsl(customThemevalue);
196
+ });
197
+ }
198
+ });
199
+ }
200
+
201
+
202
+
203
+ let themeOrder = [];
204
+ if (Array.isArray(config("daisyui.themes"))) {
205
+ config("daisyui.themes").forEach((theme, index) => {
206
+ if (typeof theme === "object" && theme !== null) {
207
+ Object.entries(theme).forEach(([customThemeName, customThemevalue]) => {
208
+ themeOrder.push(customThemeName);
209
+ });
210
+ } else if (
211
+ includedThemesObj.hasOwnProperty("[data-theme=" + theme + "]")
212
+ ) {
213
+ themeOrder.push(theme);
214
+ }
215
+ });
216
+ } else if (config("daisyui.themes") != false) {
217
+ themeOrder = [
218
+ "light",
219
+ "dark",
220
+ "cupcake",
221
+ "bumblebee",
222
+ "emerald",
223
+ "corporate",
224
+ "synthwave",
225
+ "retro",
226
+ "cyberpunk",
227
+ "valentine",
228
+ "halloween",
229
+ "garden",
230
+ "forest",
231
+ "aqua",
232
+ "lofi",
233
+ "pastel",
234
+ "fantasy",
235
+ "wireframe",
236
+ "black",
237
+ "luxury",
238
+ "dracula",
239
+ "cmyk",
240
+ "autumn",
241
+ "business",
242
+ "acid",
243
+ "lemonade",
244
+ ];
245
+ } else if (config("daisyui.themes") == false) {
246
+ themeOrder.push("light");
247
+ }
248
+
249
+ // inject themes in order
250
+ themeOrder.forEach((themeName, index) => {
251
+ if (index === 0) {
252
+ // first theme as root
253
+ addBase({
254
+ [":root"]: includedThemesObj["[data-theme=" + themeName + "]"],
255
+ });
256
+ } else if (index === 1) {
257
+ // auto dark
258
+ if (config("daisyui.darkTheme")) {
259
+ if (
260
+ themeOrder[0] != config("daisyui.darkTheme") &&
261
+ themeOrder.includes(config("daisyui.darkTheme"))
262
+ ) {
263
+ addBase({
264
+ ["@media (prefers-color-scheme: dark)"]: {
265
+ [":root"]:
266
+ includedThemesObj[
267
+ `[data-theme=${config("daisyui.darkTheme")}]`
268
+ ],
269
+ },
270
+ });
271
+ }
272
+ } else {
273
+ if (themeOrder[0] != "dark" && themeOrder.includes("dark")) {
274
+ addBase({
275
+ ["@media (prefers-color-scheme: dark)"]: {
276
+ [":root"]: includedThemesObj["[data-theme=dark]"],
277
+ },
278
+ });
279
+ }
280
+ }
281
+ // theme 0 with name
282
+ addBase({
283
+ ["[data-theme=" + themeOrder[0] + "]"]:
284
+ includedThemesObj["[data-theme=" + themeOrder[0] + "]"],
285
+ });
286
+ // theme 1 with name
287
+ addBase({
288
+ ["[data-theme=" + themeOrder[1] + "]"]:
289
+ includedThemesObj["[data-theme=" + themeOrder[1] + "]"],
290
+ });
291
+ } else {
292
+ addBase({
293
+ ["[data-theme=" + themeName + "]"]:
294
+ includedThemesObj["[data-theme=" + themeName + "]"],
295
+ });
296
+ }
297
+ });
298
+
299
+
300
+
301
+ return {
302
+ includedThemesObj: includedThemesObj,
303
+ themeOrder: themeOrder,
304
+ };
305
+ }
306
+
307
+ }