daisyui 5.0.0-alpha.3 → 5.0.0-alpha.5
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.
- package/base/root-color/config.js +12 -0
- package/base/root-color/index.css +1 -0
- package/base/root-color/index.js +6 -0
- package/base/root-color.css +1 -0
- package/base/scrollbar/config.js +12 -0
- package/base/scrollbar/index.css +1 -0
- package/base/scrollbar/index.js +5 -0
- package/base/scrollbar.css +1 -0
- package/base/tap-color/config.js +12 -0
- package/base/tap-color/index.css +1 -0
- package/base/tap-color/index.js +5 -0
- package/base/tap-color.css +1 -0
- package/colors/properties.css +1 -0
- package/colors/responsive.css +1 -0
- package/colors/states.css +1 -0
- package/components/avatar/class.json +7 -0
- package/components/avatar/config.js +12 -0
- package/components/avatar/index.css +1 -0
- package/components/avatar/index.js +42 -0
- package/components/avatar.css +1 -0
- package/components/badge/class.json +18 -0
- package/components/badge/config.js +1 -1
- package/components/badge.css +1 -109
- package/components/button/class.json +24 -0
- package/components/button/config.js +1 -1
- package/components/button/index.js +12 -10
- package/components/button.css +1 -293
- package/components/checkbox/class.json +17 -0
- package/components/checkbox/config.js +1 -1
- package/components/checkbox.css +1 -144
- package/components/dropdown/class.json +13 -0
- package/components/dropdown/config.js +12 -0
- package/components/dropdown/index.css +1 -0
- package/components/dropdown/index.js +146 -0
- package/components/dropdown.css +1 -0
- package/components/input/class.json +16 -0
- package/components/input/config.js +1 -1
- package/components/input.css +1 -204
- package/components/kbd/class.json +7 -0
- package/components/kbd/config.js +1 -1
- package/components/kbd.css +1 -49
- package/components/loading/class.json +21 -0
- package/components/loading/config.js +12 -0
- package/components/loading/index.css +1 -0
- package/components/loading/index.js +39 -0
- package/components/loading.css +1 -0
- package/components/mask/class.json +24 -0
- package/components/mask/config.js +1 -1
- package/components/mask.css +1 -78
- package/components/menu/class.json +15 -0
- package/components/menu/config.js +12 -0
- package/components/menu/index.css +1 -0
- package/components/menu/index.js +129 -0
- package/components/menu.css +1 -0
- package/components/radio/class.json +14 -0
- package/components/radio/config.js +1 -1
- package/components/radio.css +1 -102
- package/components/range/class.json +14 -0
- package/components/range/config.js +1 -1
- package/components/range.css +1 -164
- package/components/rating/class.json +5 -0
- package/components/rating/config.js +1 -1
- package/components/rating.css +1 -104
- package/components/select/class.json +16 -0
- package/components/select/config.js +1 -1
- package/components/select.css +1 -166
- package/components/tab/class.json +13 -0
- package/components/tab/config.js +12 -0
- package/components/tab/index.css +1 -0
- package/components/tab/index.js +165 -0
- package/components/tab.css +1 -0
- package/components/toggle/class.json +16 -0
- package/components/toggle/config.js +1 -1
- package/components/toggle.css +1 -143
- package/components/tooltip/class.json +15 -0
- package/components/tooltip/config.js +12 -0
- package/components/tooltip/index.css +1 -0
- package/components/tooltip/index.js +135 -0
- package/components/tooltip.css +1 -0
- package/full.css +12 -0
- package/functions/plugin.js +8 -8
- package/index.css +9 -0
- package/package.json +5 -1
- package/themes/dark/index.css +1 -0
- package/themes/default/index.css +1 -0
- package/themes/index.css +1 -0
- package/themes/light/index.css +1 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
".tooltip": {
|
|
3
|
+
"@apply relative inline-block": {},
|
|
4
|
+
"--tooltip-color": "theme(colors.neutral)",
|
|
5
|
+
"--tooltip-tail": "0.1875rem",
|
|
6
|
+
"--tooltip-text-color": "theme(colors.neutral-content)",
|
|
7
|
+
"--tooltip-offset": "calc(100% + 1px + var(--tooltip-tail, 0px))",
|
|
8
|
+
"--tooltip-tail-offset": "calc(100% + 0.0625rem - var(--tooltip-tail))",
|
|
9
|
+
"&:before": {
|
|
10
|
+
"@apply absolute max-w-xs rounded px-2 py-1 text-sm whitespace-normal opacity-0 transition delay-100 duration-200 ease-in-out text-center": {},
|
|
11
|
+
"backgroundColor": "var(--tooltip-color)",
|
|
12
|
+
"color": "var(--tooltip-text-color)",
|
|
13
|
+
"width": "max-content",
|
|
14
|
+
"pointerEvents": "none",
|
|
15
|
+
"zIndex": 1,
|
|
16
|
+
"content": "var(--tw-content)",
|
|
17
|
+
"--tw-content": "attr(data-tip)"
|
|
18
|
+
},
|
|
19
|
+
"&:after": {
|
|
20
|
+
"@apply absolute opacity-0 transition delay-100 duration-200 ease-in-out": {},
|
|
21
|
+
"content": "\"\"",
|
|
22
|
+
"borderStyle": "solid",
|
|
23
|
+
"borderWidth": "var(--tooltip-tail, 0)",
|
|
24
|
+
"width": "0",
|
|
25
|
+
"height": "0",
|
|
26
|
+
"display": "block",
|
|
27
|
+
"position": "absolute"
|
|
28
|
+
},
|
|
29
|
+
"&.tooltip-open,\n &:hover,\n &:has(:focus-visible)": {
|
|
30
|
+
"&:before,\n &:after": {
|
|
31
|
+
"@apply opacity-100 delay-75": {}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
".tooltip,\n.tooltip-top": {
|
|
36
|
+
"&:before": {
|
|
37
|
+
"transform": "translateX(-50%)",
|
|
38
|
+
"top": "auto",
|
|
39
|
+
"left": "50%",
|
|
40
|
+
"right": "auto",
|
|
41
|
+
"bottom": "var(--tooltip-offset)"
|
|
42
|
+
},
|
|
43
|
+
"&:after": {
|
|
44
|
+
"transform": "translateX(-50%)",
|
|
45
|
+
"borderColor": "var(--tooltip-color) transparent transparent transparent",
|
|
46
|
+
"top": "auto",
|
|
47
|
+
"left": "50%",
|
|
48
|
+
"right": "auto",
|
|
49
|
+
"bottom": "var(--tooltip-tail-offset)"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
".tooltip-bottom": {
|
|
53
|
+
"&:before": {
|
|
54
|
+
"transform": "translateX(-50%)",
|
|
55
|
+
"top": "var(--tooltip-offset)",
|
|
56
|
+
"left": "50%",
|
|
57
|
+
"right": "auto",
|
|
58
|
+
"bottom": "auto"
|
|
59
|
+
},
|
|
60
|
+
"&:after": {
|
|
61
|
+
"transform": "translateX(-50%)",
|
|
62
|
+
"borderColor": "transparent transparent var(--tooltip-color) transparent",
|
|
63
|
+
"top": "var(--tooltip-tail-offset)",
|
|
64
|
+
"left": "50%",
|
|
65
|
+
"right": "auto",
|
|
66
|
+
"bottom": "auto"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
".tooltip-left": {
|
|
70
|
+
"&:before": {
|
|
71
|
+
"transform": "translateY(-50%)",
|
|
72
|
+
"top": "50%",
|
|
73
|
+
"left": "auto",
|
|
74
|
+
"right": "var(--tooltip-offset)",
|
|
75
|
+
"bottom": "auto"
|
|
76
|
+
},
|
|
77
|
+
"&:after": {
|
|
78
|
+
"transform": "translateY(-50%)",
|
|
79
|
+
"borderColor": "transparent transparent transparent var(--tooltip-color)",
|
|
80
|
+
"top": "50%",
|
|
81
|
+
"left": "auto",
|
|
82
|
+
"right": "calc(var(--tooltip-tail-offset) + 0.0625rem)",
|
|
83
|
+
"bottom": "auto"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
".tooltip-right": {
|
|
87
|
+
"&:before": {
|
|
88
|
+
"transform": "translateY(-50%)",
|
|
89
|
+
"top": "50%",
|
|
90
|
+
"left": "var(--tooltip-offset)",
|
|
91
|
+
"right": "auto",
|
|
92
|
+
"bottom": "auto"
|
|
93
|
+
},
|
|
94
|
+
"&:after": {
|
|
95
|
+
"transform": "translateY(-50%)",
|
|
96
|
+
"borderColor": "transparent var(--tooltip-color) transparent transparent",
|
|
97
|
+
"top": "50%",
|
|
98
|
+
"left": "calc(var(--tooltip-tail-offset) + 0.0625rem)",
|
|
99
|
+
"right": "auto",
|
|
100
|
+
"bottom": "auto"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
".tooltip:not([data-tip]):hover:before,\n.tooltip:not([data-tip]):hover:after": {
|
|
104
|
+
"visibility": "hidden",
|
|
105
|
+
"opacity": 0
|
|
106
|
+
},
|
|
107
|
+
".tooltip-primary": {
|
|
108
|
+
"--tooltip-color": "theme(colors.primary)",
|
|
109
|
+
"--tooltip-text-color": "theme(colors.primary-content)"
|
|
110
|
+
},
|
|
111
|
+
".tooltip-secondary": {
|
|
112
|
+
"--tooltip-color": "theme(colors.secondary)",
|
|
113
|
+
"--tooltip-text-color": "theme(colors.secondary-content)"
|
|
114
|
+
},
|
|
115
|
+
".tooltip-accent": {
|
|
116
|
+
"--tooltip-color": "theme(colors.accent)",
|
|
117
|
+
"--tooltip-text-color": "theme(colors.accent-content)"
|
|
118
|
+
},
|
|
119
|
+
".tooltip-info": {
|
|
120
|
+
"--tooltip-color": "theme(colors.info)",
|
|
121
|
+
"--tooltip-text-color": "theme(colors.info-content)"
|
|
122
|
+
},
|
|
123
|
+
".tooltip-success": {
|
|
124
|
+
"--tooltip-color": "theme(colors.success)",
|
|
125
|
+
"--tooltip-text-color": "theme(colors.success-content)"
|
|
126
|
+
},
|
|
127
|
+
".tooltip-warning": {
|
|
128
|
+
"--tooltip-color": "theme(colors.warning)",
|
|
129
|
+
"--tooltip-text-color": "theme(colors.warning-content)"
|
|
130
|
+
},
|
|
131
|
+
".tooltip-error": {
|
|
132
|
+
"--tooltip-color": "theme(colors.error)",
|
|
133
|
+
"--tooltip-text-color": "theme(colors.error-content)"
|
|
134
|
+
}
|
|
135
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tooltip{--tooltip-color:oklch(32.1785% .02476 255.702);--tooltip-tail:.1875rem;--tooltip-text-color:oklch(89.4994% .011585 252.096);--tooltip-offset:calc(100% + 1px + var(--tooltip-tail,0px));--tooltip-tail-offset:calc(100% + .0625rem - var(--tooltip-tail));display:inline-block;position:relative;&:before{max-width:var(--width-xs,20rem);white-space:normal;border-radius:var(--radius,.25rem);padding-top:var(--spacing-1,.25rem);padding-bottom:var(--spacing-1,.25rem);padding-left:var(--spacing-2,.5rem);padding-right:var(--spacing-2,.5rem);text-align:center;font-size:var(--font-size-sm,.875rem);line-height:var(--tw-leading,var(--font-size-sm--line-height,1.25rem));opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.2s;--tw-ease:var(--transition-timing-function-in-out,cubic-bezier(.4,0,.2,1));transition-duration:.2s;transition-delay:.1s;transition-timing-function:var(--transition-timing-function-in-out,cubic-bezier(.4,0,.2,1));background-color:var(--tooltip-color);color:var(--tooltip-text-color);pointer-events:none;z-index:1;content:var(--tw-content);--tw-content:attr(data-tip);width:max-content;position:absolute}&:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.2s;--tw-ease:var(--transition-timing-function-in-out,cubic-bezier(.4,0,.2,1));transition-duration:.2s;transition-delay:.1s;transition-timing-function:var(--transition-timing-function-in-out,cubic-bezier(.4,0,.2,1));content:"";border-style:solid;border-width:var(--tooltip-tail,0);width:0;height:0;display:block;position:absolute}}.tooltip,.tooltip-top{&:before{top:auto;left:50%;right:auto;bottom:var(--tooltip-offset);transform:translate(-50%)}}.tooltip-bottom{&:before{top:var(--tooltip-offset);bottom:auto;left:50%;right:auto;transform:translate(-50%)}}.tooltip-left{&:before{top:50%;left:auto;right:var(--tooltip-offset);bottom:auto;transform:translateY(-50%)}}.tooltip-right{&:before{top:50%;left:var(--tooltip-offset);bottom:auto;right:auto;transform:translateY(-50%)}}.tooltip{&.tooltip-open,&:hover,&:has(:focus-visible){&:before,&:after{opacity:1;transition-delay:75ms}}}.tooltip:not([data-tip]):hover:before,.tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}.tooltip,.tooltip-top{&:after{border-color:var(--tooltip-color)transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset);transform:translate(-50%)}}.tooltip-bottom{&:after{border-color:transparent transparent var(--tooltip-color)transparent;top:var(--tooltip-tail-offset);bottom:auto;left:50%;right:auto;transform:translate(-50%)}}.tooltip-left{&:after{border-color:transparent transparent transparent var(--tooltip-color);top:50%;left:auto;right:calc(var(--tooltip-tail-offset) + .0625rem);bottom:auto;transform:translateY(-50%)}}.tooltip-right{&:after{border-color:transparent var(--tooltip-color)transparent transparent;top:50%;left:calc(var(--tooltip-tail-offset) + .0625rem);bottom:auto;right:auto;transform:translateY(-50%)}}.tooltip-primary{--tooltip-color:oklch(49.12% .3096 275.75);--tooltip-text-color:oklch(89.824% .06192 275.75)}.tooltip-secondary{--tooltip-color:oklch(69.71% .329 342.55);--tooltip-text-color:oklch(98.71% .0106 342.55)}.tooltip-accent{--tooltip-color:oklch(76.76% .184 183.61);--tooltip-text-color:oklch(15.352% .0368 183.61)}.tooltip-info{--tooltip-color:oklch(72.06% .191 231.6);--tooltip-text-color:oklch(0% 0 0)}.tooltip-success{--tooltip-color:oklch(64.8% .15 160);--tooltip-text-color:oklch(0% 0 0)}.tooltip-warning{--tooltip-color:oklch(84.71% .199 83.87);--tooltip-text-color:oklch(0% 0 0)}.tooltip-error{--tooltip-color:oklch(71.76% .221 22.18);--tooltip-text-color:oklch(0% 0 0)}
|
package/full.css
CHANGED
|
@@ -2,14 +2,26 @@
|
|
|
2
2
|
@import url(themes/default/index.css) layer(themes);
|
|
3
3
|
@import url(themes/light/index.css) layer(themes);
|
|
4
4
|
@import url(themes/dark/index.css) layer(themes);
|
|
5
|
+
@import url(base/tap-color.css) layer(base);
|
|
6
|
+
@import url(base/root-color.css) layer(base);
|
|
7
|
+
@import url(base/scrollbar.css) layer(base);
|
|
8
|
+
@import url(components/tooltip.css) layer(components);
|
|
9
|
+
@import url(components/tab.css) layer(components);
|
|
5
10
|
@import url(components/radio.css) layer(components);
|
|
6
11
|
@import url(components/select.css) layer(components);
|
|
7
12
|
@import url(components/input.css) layer(components);
|
|
8
13
|
@import url(components/checkbox.css) layer(components);
|
|
9
14
|
@import url(components/range.css) layer(components);
|
|
10
15
|
@import url(components/badge.css) layer(components);
|
|
16
|
+
@import url(components/loading.css) layer(components);
|
|
11
17
|
@import url(components/rating.css) layer(components);
|
|
12
18
|
@import url(components/mask.css) layer(components);
|
|
13
19
|
@import url(components/button.css) layer(components);
|
|
14
20
|
@import url(components/toggle.css) layer(components);
|
|
21
|
+
@import url(components/avatar.css) layer(components);
|
|
15
22
|
@import url(components/kbd.css) layer(components);
|
|
23
|
+
@import url(components/menu.css) layer(components);
|
|
24
|
+
@import url(components/dropdown.css) layer(components);
|
|
25
|
+
@import url(colors/properties.css) layer(utilities);
|
|
26
|
+
@import url(colors/states.css) layer(utilities);
|
|
27
|
+
@import url(colors/responsive.css) layer(utilities);
|
package/functions/plugin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const createPlugin = (handler, config) => {
|
|
2
|
+
return { handler: handler, config: config }
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
createPlugin.withOptions = (handlerFn, configFn = () => ({})) => {
|
|
5
|
+
const optionsFunction = (options) => {
|
|
6
|
+
return { handler: handlerFn(options), config: configFn(options) }
|
|
7
|
+
}
|
|
8
|
+
return (optionsFunction.__isOptionsFunction = true), optionsFunction
|
|
9
9
|
}
|
|
10
|
-
export const plugin =
|
|
10
|
+
export const plugin = createPlugin
|
package/index.css
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
@import "./themes";
|
|
2
2
|
@import "./themes/light";
|
|
3
3
|
@import "./themes/dark";
|
|
4
|
+
@config "./base/tap-color/config.js";
|
|
5
|
+
@config "./base/root-color/config.js";
|
|
6
|
+
@config "./base/scrollbar/config.js";
|
|
4
7
|
@config "./components/kbd/config.js";
|
|
8
|
+
@config "./components/dropdown/config.js";
|
|
9
|
+
@config "./components/tooltip/config.js";
|
|
5
10
|
@config "./components/rating/config.js";
|
|
6
11
|
@config "./components/radio/config.js";
|
|
12
|
+
@config "./components/loading/config.js";
|
|
7
13
|
@config "./components/input/config.js";
|
|
8
14
|
@config "./components/checkbox/config.js";
|
|
15
|
+
@config "./components/tab/config.js";
|
|
9
16
|
@config "./components/toggle/config.js";
|
|
10
17
|
@config "./components/mask/config.js";
|
|
11
18
|
@config "./components/button/config.js";
|
|
19
|
+
@config "./components/menu/config.js";
|
|
20
|
+
@config "./components/avatar/config.js";
|
|
12
21
|
@config "./components/select/config.js";
|
|
13
22
|
@config "./components/range/config.js";
|
|
14
23
|
@config "./components/badge/config.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "daisyui",
|
|
4
|
-
"version": "5.0.0-alpha.
|
|
4
|
+
"version": "5.0.0-alpha.5",
|
|
5
5
|
"description": "daisyUI - Tailwind CSS Components",
|
|
6
6
|
"author": "Pouya Saadeghi",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
"main": "index.css",
|
|
36
36
|
"files": [
|
|
37
37
|
"themes",
|
|
38
|
+
"colors",
|
|
39
|
+
"base",
|
|
38
40
|
"components",
|
|
41
|
+
"utilities",
|
|
39
42
|
"index.css",
|
|
40
43
|
"full.css",
|
|
41
44
|
"functions/plugin.js"
|
|
@@ -67,6 +70,7 @@
|
|
|
67
70
|
"@biomejs/biome": "^1.9.2",
|
|
68
71
|
"@tailwindcss/cli": "^4.0.0-alpha.25",
|
|
69
72
|
"commit-and-tag-version": "12.4.1",
|
|
73
|
+
"lightningcss": "^1.27.0",
|
|
70
74
|
"postcss": "^8.4.45",
|
|
71
75
|
"postcss-js": "^4.0.1",
|
|
72
76
|
"postcss-prefixer": "^3.0.0",
|
package/themes/dark/index.css
CHANGED
package/themes/default/index.css
CHANGED
package/themes/index.css
CHANGED