@macroui/macroui 4.0.7 â 4.0.9
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/dist/index.js +17 -17
- package/index.js +15 -15
- package/package.json +1 -2
- package/src/components/calendar.css +3 -3
- package/src/components/dropdown.css +8 -8
- package/src/components/filter.css +1 -1
- package/src/components/footer.css +4 -4
- package/src/components/hovergallery.css +1 -1
- package/src/components/radialprogress.css +1 -1
- package/src/components/stack.css +2 -2
- package/src/components/status.css +14 -14
- package/src/components/timeline.css +9 -9
- package/src/src/index.d.ts +8 -8
- package/src/src/index.js +15 -15
- package/src/src/theming/functions.js +11 -11
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const postcssJs = require("postcss-js")
|
|
|
6
6
|
const pc = require("picocolors")
|
|
7
7
|
const postcssPrefix = require("./lib/addPrefix")
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const macrouiInfo = require("../package.json")
|
|
10
10
|
const utilities = require("../dist/utilities")
|
|
11
11
|
const base = require("../dist/base")
|
|
12
12
|
const unstyled = require("../dist/unstyled")
|
|
@@ -20,27 +20,27 @@ const colorObject = require("./theming/index")
|
|
|
20
20
|
|
|
21
21
|
const mainFunction = ({ addBase, addComponents, config }) => {
|
|
22
22
|
let logs = false
|
|
23
|
-
if (config("
|
|
23
|
+
if (config("macroui.logs") !== false) {
|
|
24
24
|
logs = true
|
|
25
25
|
}
|
|
26
26
|
if (logs) {
|
|
27
27
|
console.log()
|
|
28
|
-
console.log(`đŧ ${pc.magenta("
|
|
28
|
+
console.log(`đŧ ${pc.magenta("macroui")} ${pc.dim(macrouiInfo.version)}`)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// inject @base style
|
|
32
|
-
if (config("
|
|
32
|
+
if (config("macroui.base") !== false) {
|
|
33
33
|
addBase(base)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// inject components
|
|
37
37
|
let file = styled
|
|
38
|
-
if (config("
|
|
38
|
+
if (config("macroui.styled") === false) {
|
|
39
39
|
file = unstyled
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// add prefix to class names if specified
|
|
43
|
-
const prefix = config("
|
|
43
|
+
const prefix = config("macroui.prefix")
|
|
44
44
|
let postcssJsProcess
|
|
45
45
|
if (prefix) {
|
|
46
46
|
try {
|
|
@@ -60,7 +60,7 @@ const mainFunction = ({ addBase, addComponents, config }) => {
|
|
|
60
60
|
themeInjector
|
|
61
61
|
|
|
62
62
|
// inject @utilities style needed by components
|
|
63
|
-
if (config("
|
|
63
|
+
if (config("macroui.utils") !== false) {
|
|
64
64
|
addComponents(utilities, { variants: ["responsive"] })
|
|
65
65
|
|
|
66
66
|
let toAdd = utilitiesUnstyled // shadow clone here to avoid mutate the original
|
|
@@ -77,47 +77,47 @@ const mainFunction = ({ addBase, addComponents, config }) => {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
if (logs) {
|
|
80
|
-
if (config("
|
|
80
|
+
if (config("macroui.styled") === false) {
|
|
81
81
|
console.log(
|
|
82
82
|
`ââ ${pc.yellow("âšī¸")} ${pc.blue("styled")} ${pc.reset("config is")} ${pc.blue(
|
|
83
83
|
"false"
|
|
84
84
|
)} ${pc.dim("\tcomponents won't have design decisions")}`
|
|
85
85
|
)
|
|
86
86
|
}
|
|
87
|
-
if (config("
|
|
87
|
+
if (config("macroui.utils") === false) {
|
|
88
88
|
console.log(
|
|
89
89
|
`ââ ${pc.yellow("âšī¸")} ${pc.blue("utils")} ${pc.reset("config is")} ${pc.blue(
|
|
90
90
|
"false"
|
|
91
91
|
)} ${pc.dim("\tdaisyUI utility classes are disabled")}`
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
|
-
if (config("
|
|
94
|
+
if (config("macroui.prefix") && config("macroui.prefix") !== "") {
|
|
95
95
|
console.log(
|
|
96
96
|
`ââ ${pc.green("âī¸")} ${pc.blue("prefix")} is enabled${pc.dim(
|
|
97
97
|
"\t\tdaisyUI classnames must use"
|
|
98
|
-
)} ${pc.blue(config("
|
|
98
|
+
)} ${pc.blue(config("macroui.prefix"))} ${pc.dim("prefix")}`
|
|
99
99
|
)
|
|
100
100
|
}
|
|
101
101
|
if (themeInjector.themeOrder.length > 0) {
|
|
102
102
|
console.log(
|
|
103
103
|
`ââ ${pc.green("âī¸")} ${themeInjector.themeOrder.length} ${
|
|
104
104
|
themeInjector.themeOrder.length > 1 ? "themes" : "theme"
|
|
105
|
-
} added${pc.dim("\t\thttps://
|
|
105
|
+
} added${pc.dim("\t\thttps://macroui.com/docs/themes")}`
|
|
106
106
|
)
|
|
107
107
|
}
|
|
108
108
|
if (themeInjector.themeOrder.length === 0) {
|
|
109
109
|
console.log(
|
|
110
110
|
`ââ ${pc.yellow("âšī¸")} All themes are disabled in config${pc.dim(
|
|
111
|
-
"\t\thttps://
|
|
111
|
+
"\t\thttps://macroui.com/docs/themes"
|
|
112
112
|
)}`
|
|
113
113
|
)
|
|
114
114
|
}
|
|
115
115
|
const messages = [
|
|
116
|
-
`${pc.green("â¤ī¸")} ${pc.reset("Support
|
|
117
|
-
|
|
116
|
+
`${pc.green("â¤ī¸")} ${pc.reset("Support macroui project:")}\t${pc.dim(
|
|
117
|
+
macrouiInfo.funding.url
|
|
118
118
|
)}`,
|
|
119
|
-
`${pc.green("â
")} ${pc.reset("Star
|
|
120
|
-
"https://github.com/
|
|
119
|
+
`${pc.green("â
")} ${pc.reset("Star macroui on GitHub")}\t${pc.dim(
|
|
120
|
+
"https://github.com/macroui/macroui"
|
|
121
121
|
)}`,
|
|
122
122
|
]
|
|
123
123
|
console.log(`â°â ${messages[Math.floor(Math.random() * messages.length)]}`)
|
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const postcssJs = require("postcss-js")
|
|
|
6
6
|
const pc = require("picocolors")
|
|
7
7
|
const postcssPrefix = require("./lib/addPrefix")
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const macrouiInfo = require("../package.json")
|
|
10
10
|
const utilities = require("../dist/utilities")
|
|
11
11
|
const base = require("../dist/base")
|
|
12
12
|
const unstyled = require("../dist/unstyled")
|
|
@@ -20,27 +20,27 @@ const colorObject = require("./theming/index")
|
|
|
20
20
|
|
|
21
21
|
const mainFunction = ({ addBase, addComponents, config }) => {
|
|
22
22
|
let logs = false
|
|
23
|
-
if (config("
|
|
23
|
+
if (config("macroui.logs") !== false) {
|
|
24
24
|
logs = true
|
|
25
25
|
}
|
|
26
26
|
if (logs) {
|
|
27
27
|
console.log()
|
|
28
|
-
console.log(`đŧ ${pc.magenta("daisyUI")} ${pc.dim(
|
|
28
|
+
console.log(`đŧ ${pc.magenta("daisyUI")} ${pc.dim(macrouiInfo.version)}`)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// inject @base style
|
|
32
|
-
if (config("
|
|
32
|
+
if (config("macroui.base") !== false) {
|
|
33
33
|
addBase(base)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// inject components
|
|
37
37
|
let file = styled
|
|
38
|
-
if (config("
|
|
38
|
+
if (config("macroui.styled") === false) {
|
|
39
39
|
file = unstyled
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// add prefix to class names if specified
|
|
43
|
-
const prefix = config("
|
|
43
|
+
const prefix = config("macroui.prefix")
|
|
44
44
|
let postcssJsProcess
|
|
45
45
|
if (prefix) {
|
|
46
46
|
try {
|
|
@@ -60,7 +60,7 @@ const mainFunction = ({ addBase, addComponents, config }) => {
|
|
|
60
60
|
themeInjector
|
|
61
61
|
|
|
62
62
|
// inject @utilities style needed by components
|
|
63
|
-
if (config("
|
|
63
|
+
if (config("macroui.utils") !== false) {
|
|
64
64
|
addComponents(utilities, { variants: ["responsive"] })
|
|
65
65
|
|
|
66
66
|
let toAdd = utilitiesUnstyled // shadow clone here to avoid mutate the original
|
|
@@ -77,47 +77,47 @@ const mainFunction = ({ addBase, addComponents, config }) => {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
if (logs) {
|
|
80
|
-
if (config("
|
|
80
|
+
if (config("macroui.styled") === false) {
|
|
81
81
|
console.log(
|
|
82
82
|
`ââ ${pc.yellow("âšī¸")} ${pc.blue("styled")} ${pc.reset("config is")} ${pc.blue(
|
|
83
83
|
"false"
|
|
84
84
|
)} ${pc.dim("\tcomponents won't have design decisions")}`
|
|
85
85
|
)
|
|
86
86
|
}
|
|
87
|
-
if (config("
|
|
87
|
+
if (config("macroui.utils") === false) {
|
|
88
88
|
console.log(
|
|
89
89
|
`ââ ${pc.yellow("âšī¸")} ${pc.blue("utils")} ${pc.reset("config is")} ${pc.blue(
|
|
90
90
|
"false"
|
|
91
91
|
)} ${pc.dim("\tdaisyUI utility classes are disabled")}`
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
|
-
if (config("
|
|
94
|
+
if (config("macroui.prefix") && config("macroui.prefix") !== "") {
|
|
95
95
|
console.log(
|
|
96
96
|
`ââ ${pc.green("âī¸")} ${pc.blue("prefix")} is enabled${pc.dim(
|
|
97
97
|
"\t\tdaisyUI classnames must use"
|
|
98
|
-
)} ${pc.blue(config("
|
|
98
|
+
)} ${pc.blue(config("macroui.prefix"))} ${pc.dim("prefix")}`
|
|
99
99
|
)
|
|
100
100
|
}
|
|
101
101
|
if (themeInjector.themeOrder.length > 0) {
|
|
102
102
|
console.log(
|
|
103
103
|
`ââ ${pc.green("âī¸")} ${themeInjector.themeOrder.length} ${
|
|
104
104
|
themeInjector.themeOrder.length > 1 ? "themes" : "theme"
|
|
105
|
-
} added${pc.dim("\t\thttps://
|
|
105
|
+
} added${pc.dim("\t\thttps://macroui.com/docs/themes")}`
|
|
106
106
|
)
|
|
107
107
|
}
|
|
108
108
|
if (themeInjector.themeOrder.length === 0) {
|
|
109
109
|
console.log(
|
|
110
110
|
`ââ ${pc.yellow("âšī¸")} All themes are disabled in config${pc.dim(
|
|
111
|
-
"\t\thttps://
|
|
111
|
+
"\t\thttps://macroui.com/docs/themes"
|
|
112
112
|
)}`
|
|
113
113
|
)
|
|
114
114
|
}
|
|
115
115
|
const messages = [
|
|
116
116
|
`${pc.green("â¤ī¸")} ${pc.reset("Support daisyUI project:")}\t${pc.dim(
|
|
117
|
-
|
|
117
|
+
macrouiInfo.funding.url
|
|
118
118
|
)}`,
|
|
119
119
|
`${pc.green("â
")} ${pc.reset("Star daisyUI on GitHub")}\t${pc.dim(
|
|
120
|
-
"https://github.com/saadeghi/
|
|
120
|
+
"https://github.com/saadeghi/macroui"
|
|
121
121
|
)}`,
|
|
122
122
|
]
|
|
123
123
|
console.log(`â°â ${messages[Math.floor(Math.random() * messages.length)]}`)
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.cally {
|
|
2
|
-
@layer
|
|
2
|
+
@layer macroui.l1.l2.l3 {
|
|
3
3
|
font-size: 0.7rem;
|
|
4
4
|
|
|
5
5
|
&::part(container) {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.react-day-picker {
|
|
68
|
-
@layer
|
|
68
|
+
@layer macroui.l1.l2.l3 {
|
|
69
69
|
user-select: none;
|
|
70
70
|
background-color: var(--color-base-100);
|
|
71
71
|
border-radius: var(--radius-box);
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
.pika-single {
|
|
326
|
-
@layer
|
|
326
|
+
@layer macroui.l1.l2.l3 {
|
|
327
327
|
&:is(div) {
|
|
328
328
|
user-select: none;
|
|
329
329
|
font-size: 0.75rem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.dropdown {
|
|
2
|
-
@layer
|
|
2
|
+
@layer macroui.l1.l2.l3 {
|
|
3
3
|
@apply relative inline-block;
|
|
4
4
|
position-area: var(--anchor-v, bottom) var(--anchor-h, span-right);
|
|
5
5
|
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.dropdown-start {
|
|
105
|
-
@layer
|
|
105
|
+
@layer macroui.l1.l2 {
|
|
106
106
|
--anchor-h: span-right;
|
|
107
107
|
|
|
108
108
|
:where(.dropdown-content) {
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.dropdown-center {
|
|
137
|
-
@layer
|
|
137
|
+
@layer macroui.l1.l2 {
|
|
138
138
|
--anchor-h: center;
|
|
139
139
|
|
|
140
140
|
:where(.dropdown-content) {
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
.dropdown-end {
|
|
171
|
-
@layer
|
|
171
|
+
@layer macroui.l1.l2 {
|
|
172
172
|
--anchor-h: span-left;
|
|
173
173
|
|
|
174
174
|
:where(.dropdown-content) {
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
.dropdown-left {
|
|
203
|
-
@layer
|
|
203
|
+
@layer macroui.l1.l2 {
|
|
204
204
|
--anchor-h: left;
|
|
205
205
|
--anchor-v: span-bottom;
|
|
206
206
|
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
.dropdown-right {
|
|
214
|
-
@layer
|
|
214
|
+
@layer macroui.l1.l2 {
|
|
215
215
|
--anchor-h: right;
|
|
216
216
|
--anchor-v: span-bottom;
|
|
217
217
|
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
.dropdown-bottom {
|
|
225
|
-
@layer
|
|
225
|
+
@layer macroui.l1.l2 {
|
|
226
226
|
--anchor-v: bottom;
|
|
227
227
|
|
|
228
228
|
.dropdown-content {
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
.dropdown-top {
|
|
235
|
-
@layer
|
|
235
|
+
@layer macroui.l1.l2 {
|
|
236
236
|
--anchor-v: top;
|
|
237
237
|
|
|
238
238
|
.dropdown-content {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.footer {
|
|
2
|
-
@layer
|
|
2
|
+
@layer macroui.l1.l2.l3 {
|
|
3
3
|
@apply grid w-full grid-flow-row place-items-start gap-x-4 gap-y-10;
|
|
4
4
|
font-size: 0.875rem;
|
|
5
5
|
line-height: 1.25rem;
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
.footer-title {
|
|
21
|
-
@layer
|
|
21
|
+
@layer macroui.l1.l2.l3 {
|
|
22
22
|
@apply mb-2 uppercase opacity-60;
|
|
23
23
|
font-weight: 600;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.footer-horizontal {
|
|
28
|
-
@layer
|
|
28
|
+
@layer macroui.l1.l2 {
|
|
29
29
|
@apply grid-flow-col;
|
|
30
30
|
|
|
31
31
|
&.footer-center {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.footer-vertical {
|
|
38
|
-
@layer
|
|
38
|
+
@layer macroui.l1.l2 {
|
|
39
39
|
@apply grid-flow-row;
|
|
40
40
|
|
|
41
41
|
&.footer-center {
|
package/src/components/stack.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.stack {
|
|
2
|
-
@layer
|
|
2
|
+
@layer macroui.l1.l2.l3 {
|
|
3
3
|
@apply inline-grid;
|
|
4
4
|
grid-template-columns: 3px 4px 1fr 4px 3px;
|
|
5
5
|
grid-template-rows: 3px 4px 1fr 4px 3px;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
@layer
|
|
21
|
+
@layer macroui.l1.l2 {
|
|
22
22
|
&,
|
|
23
23
|
&.stack-bottom {
|
|
24
24
|
> * {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.status {
|
|
2
|
-
@layer
|
|
2
|
+
@layer macroui.l1.l2.l3 {
|
|
3
3
|
@apply bg-base-content/20 rounded-selector inline-block aspect-square size-2 bg-center bg-no-repeat align-middle text-black/30;
|
|
4
4
|
background-image: radial-gradient(
|
|
5
5
|
circle at 35% 30%,
|
|
@@ -11,82 +11,82 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.status-primary {
|
|
14
|
-
@layer
|
|
14
|
+
@layer macroui.l1.l2 {
|
|
15
15
|
@apply bg-primary text-primary;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.status-secondary {
|
|
20
|
-
@layer
|
|
20
|
+
@layer macroui.l1.l2 {
|
|
21
21
|
@apply bg-secondary text-secondary;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.status-accent {
|
|
26
|
-
@layer
|
|
26
|
+
@layer macroui.l1.l2 {
|
|
27
27
|
@apply bg-accent text-accent;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.status-neutral {
|
|
32
|
-
@layer
|
|
32
|
+
@layer macroui.l1.l2 {
|
|
33
33
|
@apply bg-neutral text-neutral;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.status-info {
|
|
38
|
-
@layer
|
|
38
|
+
@layer macroui.l1.l2 {
|
|
39
39
|
@apply bg-info text-info;
|
|
40
40
|
/* background-image: url("data:image/svg+xml,%3Csvg width='1' height='5' fill='white' viewBox='0 0 1 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='white'/%3E%3Crect y='2' width='1' height='3'/%3E%3C/svg%3E%0A"); */
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.status-success {
|
|
45
|
-
@layer
|
|
45
|
+
@layer macroui.l1.l2 {
|
|
46
46
|
@apply bg-success text-success;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.status-warning {
|
|
51
|
-
@layer
|
|
51
|
+
@layer macroui.l1.l2 {
|
|
52
52
|
@apply bg-warning text-warning;
|
|
53
53
|
/* background-image: url("data:image/svg+xml,%3Csvg width='1' height='5' fill='white' viewBox='0 0 1 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect y='4' width='1' height='1' /%3E%3Crect width='1' height='3'/%3E%3C/svg%3E%0A"); */
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.status-error {
|
|
58
|
-
@layer
|
|
58
|
+
@layer macroui.l1.l2 {
|
|
59
59
|
@apply bg-error text-error;
|
|
60
60
|
/* background-image: url("data:image/svg+xml,%3Csvg width='4' height='1' fill='white' viewBox='0 0 4 1' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='4' height='1'/%3E%3C/svg%3E%0A"); */
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
.status-xs {
|
|
65
|
-
@layer
|
|
65
|
+
@layer macroui.l1.l2 {
|
|
66
66
|
@apply size-0.5;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.status-sm {
|
|
71
|
-
@layer
|
|
71
|
+
@layer macroui.l1.l2 {
|
|
72
72
|
@apply size-1;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.status-md {
|
|
77
|
-
@layer
|
|
77
|
+
@layer macroui.l1.l2 {
|
|
78
78
|
@apply size-2;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.status-lg {
|
|
83
|
-
@layer
|
|
83
|
+
@layer macroui.l1.l2 {
|
|
84
84
|
@apply size-3;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.status-xl {
|
|
89
|
-
@layer
|
|
89
|
+
@layer macroui.l1.l2 {
|
|
90
90
|
@apply size-4;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.timeline {
|
|
2
|
-
@layer
|
|
2
|
+
@layer macroui.l1.l2.l3 {
|
|
3
3
|
@apply relative flex;
|
|
4
4
|
|
|
5
5
|
> li {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.timeline-box {
|
|
60
|
-
@layer
|
|
60
|
+
@layer macroui.l1.l2.l3 {
|
|
61
61
|
border: var(--border) solid;
|
|
62
62
|
@apply rounded-box bg-base-100 border-base-300 px-4 py-2;
|
|
63
63
|
font-size: 0.75rem;
|
|
@@ -66,25 +66,25 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.timeline-start {
|
|
69
|
-
@layer
|
|
69
|
+
@layer macroui.l1.l2.l3 {
|
|
70
70
|
@apply col-start-1 col-end-4 row-start-1 row-end-2 m-1 self-end justify-self-center;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.timeline-middle {
|
|
75
|
-
@layer
|
|
75
|
+
@layer macroui.l1.l2.l3 {
|
|
76
76
|
@apply col-start-2 row-start-2;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.timeline-end {
|
|
81
|
-
@layer
|
|
81
|
+
@layer macroui.l1.l2.l3 {
|
|
82
82
|
@apply col-start-1 col-end-4 row-start-3 row-end-4 m-1 self-start justify-self-center;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.timeline-compact {
|
|
87
|
-
@layer
|
|
87
|
+
@layer macroui.l1.l2 {
|
|
88
88
|
--timeline-row-start: 0;
|
|
89
89
|
|
|
90
90
|
.timeline-start {
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.timeline-snap-icon {
|
|
119
|
-
@layer
|
|
119
|
+
@layer macroui.l1.l2 {
|
|
120
120
|
> li {
|
|
121
121
|
--timeline-col-start: 0.5rem;
|
|
122
122
|
--timeline-row-start: minmax(0, 1fr);
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.timeline-vertical {
|
|
128
|
-
@layer
|
|
128
|
+
@layer macroui.l1.l2 {
|
|
129
129
|
@apply flex-col;
|
|
130
130
|
|
|
131
131
|
> li {
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
.timeline-horizontal {
|
|
195
|
-
@layer
|
|
195
|
+
@layer macroui.l1.l2 {
|
|
196
196
|
@apply flex-row;
|
|
197
197
|
|
|
198
198
|
> li {
|
package/src/src/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type plugin from "tailwindcss/plugin"
|
|
2
2
|
|
|
3
|
-
declare const
|
|
3
|
+
declare const macroui: ReturnType<typeof plugin>
|
|
4
4
|
|
|
5
|
-
export default
|
|
5
|
+
export default macroui
|
|
6
6
|
|
|
7
|
-
// todo - the keys of a theme could be typed here? see: https://
|
|
7
|
+
// todo - the keys of a theme could be typed here? see: https://macroui.com/docs/themes/#-5
|
|
8
8
|
/**
|
|
9
|
-
* @link https://
|
|
9
|
+
* @link https://macroui.com/docs/themes/#-4
|
|
10
10
|
*/
|
|
11
11
|
type CustomTheme = Record<string, Record<string, string>>
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* https://
|
|
14
|
+
* https://macroui.com/docs/themes/#
|
|
15
15
|
*/
|
|
16
16
|
type Theme =
|
|
17
17
|
| "light"
|
|
@@ -51,7 +51,7 @@ interface DaisyUIConfig {
|
|
|
51
51
|
/**
|
|
52
52
|
* If it's true, all themes will be included. If it's false, only light and dark themes will be available.
|
|
53
53
|
* If it's an array, only themes in the array will be included and the first theme will be the default theme.
|
|
54
|
-
* Read more about [themes](https://
|
|
54
|
+
* Read more about [themes](https://macroui.com/docs/themes/).
|
|
55
55
|
*
|
|
56
56
|
* @default false
|
|
57
57
|
*/
|
|
@@ -66,7 +66,7 @@ interface DaisyUIConfig {
|
|
|
66
66
|
*/
|
|
67
67
|
darkTheme?: string
|
|
68
68
|
/**
|
|
69
|
-
* If it's true, a [few base styles](https://github.com/saadeghi/
|
|
69
|
+
* If it's true, a [few base styles](https://github.com/saadeghi/macroui/blob/master/src/base) will be added.
|
|
70
70
|
*
|
|
71
71
|
* @default true
|
|
72
72
|
*/
|
|
@@ -80,7 +80,7 @@ interface DaisyUIConfig {
|
|
|
80
80
|
*/
|
|
81
81
|
styled?: boolean
|
|
82
82
|
/**
|
|
83
|
-
* If it's true, [responsive and utility classes](https://github.com/saadeghi/
|
|
83
|
+
* If it's true, [responsive and utility classes](https://github.com/saadeghi/macroui/tree/master/src/utilities) will be added.
|
|
84
84
|
*
|
|
85
85
|
* @default true
|
|
86
86
|
*/
|
package/src/src/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const postcssJs = require("postcss-js")
|
|
|
6
6
|
const pc = require("picocolors")
|
|
7
7
|
const postcssPrefix = require("./lib/addPrefix")
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const macrouiInfo = require("../package.json")
|
|
10
10
|
const utilities = require("../dist/utilities")
|
|
11
11
|
const base = require("../dist/base")
|
|
12
12
|
const unstyled = require("../dist/unstyled")
|
|
@@ -20,27 +20,27 @@ const colorObject = require("./theming/index")
|
|
|
20
20
|
|
|
21
21
|
const mainFunction = ({ addBase, addComponents, config }) => {
|
|
22
22
|
let logs = false
|
|
23
|
-
if (config("
|
|
23
|
+
if (config("macroui.logs") !== false) {
|
|
24
24
|
logs = true
|
|
25
25
|
}
|
|
26
26
|
if (logs) {
|
|
27
27
|
console.log()
|
|
28
|
-
console.log(`đŧ ${pc.magenta("daisyUI")} ${pc.dim(
|
|
28
|
+
console.log(`đŧ ${pc.magenta("daisyUI")} ${pc.dim(macrouiInfo.version)}`)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// inject @base style
|
|
32
|
-
if (config("
|
|
32
|
+
if (config("macroui.base") !== false) {
|
|
33
33
|
addBase(base)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// inject components
|
|
37
37
|
let file = styled
|
|
38
|
-
if (config("
|
|
38
|
+
if (config("macroui.styled") === false) {
|
|
39
39
|
file = unstyled
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// add prefix to class names if specified
|
|
43
|
-
const prefix = config("
|
|
43
|
+
const prefix = config("macroui.prefix")
|
|
44
44
|
let postcssJsProcess
|
|
45
45
|
if (prefix) {
|
|
46
46
|
try {
|
|
@@ -60,7 +60,7 @@ const mainFunction = ({ addBase, addComponents, config }) => {
|
|
|
60
60
|
themeInjector
|
|
61
61
|
|
|
62
62
|
// inject @utilities style needed by components
|
|
63
|
-
if (config("
|
|
63
|
+
if (config("macroui.utils") !== false) {
|
|
64
64
|
addComponents(utilities, { variants: ["responsive"] })
|
|
65
65
|
|
|
66
66
|
let toAdd = utilitiesUnstyled // shadow clone here to avoid mutate the original
|
|
@@ -77,47 +77,47 @@ const mainFunction = ({ addBase, addComponents, config }) => {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
if (logs) {
|
|
80
|
-
if (config("
|
|
80
|
+
if (config("macroui.styled") === false) {
|
|
81
81
|
console.log(
|
|
82
82
|
`ââ ${pc.yellow("âšī¸")} ${pc.blue("styled")} ${pc.reset("config is")} ${pc.blue(
|
|
83
83
|
"false"
|
|
84
84
|
)} ${pc.dim("\tcomponents won't have design decisions")}`
|
|
85
85
|
)
|
|
86
86
|
}
|
|
87
|
-
if (config("
|
|
87
|
+
if (config("macroui.utils") === false) {
|
|
88
88
|
console.log(
|
|
89
89
|
`ââ ${pc.yellow("âšī¸")} ${pc.blue("utils")} ${pc.reset("config is")} ${pc.blue(
|
|
90
90
|
"false"
|
|
91
91
|
)} ${pc.dim("\tdaisyUI utility classes are disabled")}`
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
|
-
if (config("
|
|
94
|
+
if (config("macroui.prefix") && config("macroui.prefix") !== "") {
|
|
95
95
|
console.log(
|
|
96
96
|
`ââ ${pc.green("âī¸")} ${pc.blue("prefix")} is enabled${pc.dim(
|
|
97
97
|
"\t\tdaisyUI classnames must use"
|
|
98
|
-
)} ${pc.blue(config("
|
|
98
|
+
)} ${pc.blue(config("macroui.prefix"))} ${pc.dim("prefix")}`
|
|
99
99
|
)
|
|
100
100
|
}
|
|
101
101
|
if (themeInjector.themeOrder.length > 0) {
|
|
102
102
|
console.log(
|
|
103
103
|
`ââ ${pc.green("âī¸")} ${themeInjector.themeOrder.length} ${
|
|
104
104
|
themeInjector.themeOrder.length > 1 ? "themes" : "theme"
|
|
105
|
-
} added${pc.dim("\t\thttps://
|
|
105
|
+
} added${pc.dim("\t\thttps://macroui.com/docs/themes")}`
|
|
106
106
|
)
|
|
107
107
|
}
|
|
108
108
|
if (themeInjector.themeOrder.length === 0) {
|
|
109
109
|
console.log(
|
|
110
110
|
`ââ ${pc.yellow("âšī¸")} All themes are disabled in config${pc.dim(
|
|
111
|
-
"\t\thttps://
|
|
111
|
+
"\t\thttps://macroui.com/docs/themes"
|
|
112
112
|
)}`
|
|
113
113
|
)
|
|
114
114
|
}
|
|
115
115
|
const messages = [
|
|
116
116
|
`${pc.green("â¤ī¸")} ${pc.reset("Support daisyUI project:")}\t${pc.dim(
|
|
117
|
-
|
|
117
|
+
macrouiInfo.funding.url
|
|
118
118
|
)}`,
|
|
119
119
|
`${pc.green("â
")} ${pc.reset("Star daisyUI on GitHub")}\t${pc.dim(
|
|
120
|
-
"https://github.com/saadeghi/
|
|
120
|
+
"https://github.com/saadeghi/macroui"
|
|
121
121
|
)}`,
|
|
122
122
|
]
|
|
123
123
|
console.log(`â°â ${messages[Math.floor(Math.random() * messages.length)]}`)
|
|
@@ -178,14 +178,14 @@ module.exports = {
|
|
|
178
178
|
injectThemes: function (addBase, config, themes) {
|
|
179
179
|
const includedThemesObj = {}
|
|
180
180
|
// add default themes
|
|
181
|
-
const themeRoot = config("
|
|
181
|
+
const themeRoot = config("macroui.themeRoot") ?? ":root"
|
|
182
182
|
for (const [theme, value] of Object.entries(themes)) {
|
|
183
183
|
includedThemesObj[theme] = this.convertColorFormat(value)
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
// add custom themes
|
|
187
|
-
if (Array.isArray(config("
|
|
188
|
-
for (const item of config("
|
|
187
|
+
if (Array.isArray(config("macroui.themes"))) {
|
|
188
|
+
for (const item of config("macroui.themes")) {
|
|
189
189
|
if (typeof item === "object" && item !== null) {
|
|
190
190
|
for (const [customThemeName, customThemevalue] of Object.entries(item)) {
|
|
191
191
|
includedThemesObj[customThemeName] = this.convertColorFormat(customThemevalue)
|
|
@@ -195,8 +195,8 @@ module.exports = {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
let themeOrder = []
|
|
198
|
-
if (Array.isArray(config("
|
|
199
|
-
for (const theme of config("
|
|
198
|
+
if (Array.isArray(config("macroui.themes"))) {
|
|
199
|
+
for (const theme of config("macroui.themes")) {
|
|
200
200
|
if (typeof theme === "object" && theme !== null) {
|
|
201
201
|
for (const customThemeName of Object.keys(theme)) {
|
|
202
202
|
themeOrder.push(customThemeName)
|
|
@@ -205,7 +205,7 @@ module.exports = {
|
|
|
205
205
|
themeOrder.push(theme)
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
} else if (config("
|
|
208
|
+
} else if (config("macroui.themes") === true) {
|
|
209
209
|
themeOrder = themeDefaults.themeOrder
|
|
210
210
|
} else {
|
|
211
211
|
themeOrder = ["light", "dark"]
|
|
@@ -219,16 +219,16 @@ module.exports = {
|
|
|
219
219
|
themesToInject[themeRoot] = includedThemesObj[themeName]
|
|
220
220
|
} else if (index === 1) {
|
|
221
221
|
// auto dark
|
|
222
|
-
if (config("
|
|
222
|
+
if (config("macroui.darkTheme")) {
|
|
223
223
|
if (
|
|
224
|
-
themeOrder[0] !== config("
|
|
225
|
-
themeOrder.includes(config("
|
|
224
|
+
themeOrder[0] !== config("macroui.darkTheme") &&
|
|
225
|
+
themeOrder.includes(config("macroui.darkTheme"))
|
|
226
226
|
) {
|
|
227
227
|
themesToInject["@media (prefers-color-scheme: dark)"] = {
|
|
228
|
-
[themeRoot]: includedThemesObj[`${config("
|
|
228
|
+
[themeRoot]: includedThemesObj[`${config("macroui.darkTheme")}`],
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
} else if (config("
|
|
231
|
+
} else if (config("macroui.darkTheme") === false) {
|
|
232
232
|
// disables prefers-color-scheme: dark
|
|
233
233
|
} else {
|
|
234
234
|
if (themeOrder[0] !== "dark" && themeOrder.includes("dark")) {
|