@macroui/macroui 4.0.7 → 4.0.8

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 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 daisyuiInfo = require("../package.json")
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("daisyui.logs") !== false) {
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(daisyuiInfo.version)}`)
28
+ console.log(`đŸŒŧ ${pc.magenta("macroui")} ${pc.dim(macrouiInfo.version)}`)
29
29
  }
30
30
 
31
31
  // inject @base style
32
- if (config("daisyui.base") !== false) {
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("daisyui.styled") === false) {
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("daisyui.prefix")
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("daisyui.utils") !== false) {
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("daisyui.styled") === false) {
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("daisyui.utils") === false) {
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("daisyui.prefix") && config("daisyui.prefix") !== "") {
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("daisyui.prefix"))} ${pc.dim("prefix")}`
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://daisyui.com/docs/themes")}`
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://daisyui.com/docs/themes"
111
+ "\t\thttps://macroui.com/docs/themes"
112
112
  )}`
113
113
  )
114
114
  }
115
115
  const messages = [
116
- `${pc.green("â¤ī¸Ž")} ${pc.reset("Support daisyUI project:")}\t${pc.dim(
117
- daisyuiInfo.funding.url
116
+ `${pc.green("â¤ī¸Ž")} ${pc.reset("Support macroui project:")}\t${pc.dim(
117
+ macrouiInfo.funding.url
118
118
  )}`,
119
- `${pc.green("★")} ${pc.reset("Star daisyUI on GitHub")}\t${pc.dim(
120
- "https://github.com/saadeghi/daisyui"
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)]}`)
@@ -16,4 +16,4 @@ createPlugin.withOptions = (pluginFunction, configFunction = () => ({})) => {
16
16
  return optionsFunction
17
17
  }
18
18
 
19
- module.exports = createPlugin
19
+ export default createPlugin
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 daisyuiInfo = require("../package.json")
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("daisyui.logs") !== false) {
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(daisyuiInfo.version)}`)
28
+ console.log(`đŸŒŧ ${pc.magenta("daisyUI")} ${pc.dim(macrouiInfo.version)}`)
29
29
  }
30
30
 
31
31
  // inject @base style
32
- if (config("daisyui.base") !== false) {
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("daisyui.styled") === false) {
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("daisyui.prefix")
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("daisyui.utils") !== false) {
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("daisyui.styled") === false) {
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("daisyui.utils") === false) {
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("daisyui.prefix") && config("daisyui.prefix") !== "") {
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("daisyui.prefix"))} ${pc.dim("prefix")}`
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://daisyui.com/docs/themes")}`
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://daisyui.com/docs/themes"
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
- daisyuiInfo.funding.url
117
+ macrouiInfo.funding.url
118
118
  )}`,
119
119
  `${pc.green("★")} ${pc.reset("Star daisyUI on GitHub")}\t${pc.dim(
120
- "https://github.com/saadeghi/daisyui"
120
+ "https://github.com/saadeghi/macroui"
121
121
  )}`,
122
122
  ]
123
123
  console.log(`╰─ ${messages[Math.floor(Math.random() * messages.length)]}`)
@@ -16,4 +16,4 @@ createPlugin.withOptions = (pluginFunction, configFunction = () => ({})) => {
16
16
  return optionsFunction
17
17
  }
18
18
 
19
- module.exports = createPlugin
19
+ export default createPlugin
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
- "type": "module",
3
2
  "name": "@macroui/macroui",
4
- "version": "4.0.7",
3
+ "version": "4.0.8",
5
4
  "description": "Macroui - Tailwind CSS Component Library",
6
5
  "author": "Macroui <peng.deyou@gmail.com>",
7
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  .cally {
2
- @layer daisyui.l1.l2.l3 {
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 daisyui.l1.l2.l3 {
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 daisyui.l1.l2.l3 {
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 daisyui.l1.l2.l3 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
235
+ @layer macroui.l1.l2 {
236
236
  --anchor-v: top;
237
237
 
238
238
  .dropdown-content {
@@ -1,5 +1,5 @@
1
1
  .filter {
2
- @layer daisyui.l1.l2.l3 {
2
+ @layer macroui.l1.l2.l3 {
3
3
  @apply flex flex-wrap;
4
4
  input[type="radio"] {
5
5
  @apply w-auto;
@@ -1,5 +1,5 @@
1
1
  .footer {
2
- @layer daisyui.l1.l2.l3 {
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 daisyui.l1.l2.l3 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
38
+ @layer macroui.l1.l2 {
39
39
  @apply grid-flow-row;
40
40
 
41
41
  &.footer-center {
@@ -1,5 +1,5 @@
1
1
  .hover-gallery {
2
- @layer daisyui.l1.l2.l3 {
2
+ @layer macroui.l1.l2.l3 {
3
3
  --items: 1;
4
4
  grid-template-columns: repeat(var(--items), 1fr);
5
5
  width: 100%;
@@ -1,5 +1,5 @@
1
1
  .radial-progress {
2
- @layer daisyui.l1.l2.l3 {
2
+ @layer macroui.l1.l2.l3 {
3
3
  @apply relative inline-grid h-[var(--size)] w-[var(--size)] place-content-center rounded-full bg-transparent;
4
4
  vertical-align: middle;
5
5
  box-sizing: content-box;
@@ -1,5 +1,5 @@
1
1
  .stack {
2
- @layer daisyui.l1.l2.l3 {
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 daisyui.l1.l2 {
21
+ @layer macroui.l1.l2 {
22
22
  &,
23
23
  &.stack-bottom {
24
24
  > * {
@@ -1,5 +1,5 @@
1
1
  .status {
2
- @layer daisyui.l1.l2.l3 {
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 daisyui.l1.l2 {
14
+ @layer macroui.l1.l2 {
15
15
  @apply bg-primary text-primary;
16
16
  }
17
17
  }
18
18
 
19
19
  .status-secondary {
20
- @layer daisyui.l1.l2 {
20
+ @layer macroui.l1.l2 {
21
21
  @apply bg-secondary text-secondary;
22
22
  }
23
23
  }
24
24
 
25
25
  .status-accent {
26
- @layer daisyui.l1.l2 {
26
+ @layer macroui.l1.l2 {
27
27
  @apply bg-accent text-accent;
28
28
  }
29
29
  }
30
30
 
31
31
  .status-neutral {
32
- @layer daisyui.l1.l2 {
32
+ @layer macroui.l1.l2 {
33
33
  @apply bg-neutral text-neutral;
34
34
  }
35
35
  }
36
36
 
37
37
  .status-info {
38
- @layer daisyui.l1.l2 {
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 daisyui.l1.l2 {
45
+ @layer macroui.l1.l2 {
46
46
  @apply bg-success text-success;
47
47
  }
48
48
  }
49
49
 
50
50
  .status-warning {
51
- @layer daisyui.l1.l2 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
65
+ @layer macroui.l1.l2 {
66
66
  @apply size-0.5;
67
67
  }
68
68
  }
69
69
 
70
70
  .status-sm {
71
- @layer daisyui.l1.l2 {
71
+ @layer macroui.l1.l2 {
72
72
  @apply size-1;
73
73
  }
74
74
  }
75
75
 
76
76
  .status-md {
77
- @layer daisyui.l1.l2 {
77
+ @layer macroui.l1.l2 {
78
78
  @apply size-2;
79
79
  }
80
80
  }
81
81
 
82
82
  .status-lg {
83
- @layer daisyui.l1.l2 {
83
+ @layer macroui.l1.l2 {
84
84
  @apply size-3;
85
85
  }
86
86
  }
87
87
 
88
88
  .status-xl {
89
- @layer daisyui.l1.l2 {
89
+ @layer macroui.l1.l2 {
90
90
  @apply size-4;
91
91
  }
92
92
  }
@@ -1,5 +1,5 @@
1
1
  .timeline {
2
- @layer daisyui.l1.l2.l3 {
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 daisyui.l1.l2.l3 {
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 daisyui.l1.l2.l3 {
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 daisyui.l1.l2.l3 {
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 daisyui.l1.l2.l3 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
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 daisyui.l1.l2 {
195
+ @layer macroui.l1.l2 {
196
196
  @apply flex-row;
197
197
 
198
198
  > li {
@@ -1,17 +1,17 @@
1
1
  import type plugin from "tailwindcss/plugin"
2
2
 
3
- declare const daisyui: ReturnType<typeof plugin>
3
+ declare const macroui: ReturnType<typeof plugin>
4
4
 
5
- export default daisyui
5
+ export default macroui
6
6
 
7
- // todo - the keys of a theme could be typed here? see: https://daisyui.com/docs/themes/#-5
7
+ // todo - the keys of a theme could be typed here? see: https://macroui.com/docs/themes/#-5
8
8
  /**
9
- * @link https://daisyui.com/docs/themes/#-4
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://daisyui.com/docs/themes/#
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://daisyui.com/docs/themes/).
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/daisyui/blob/master/src/base) will be added.
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/daisyui/tree/master/src/utilities) will be added.
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 daisyuiInfo = require("../package.json")
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("daisyui.logs") !== false) {
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(daisyuiInfo.version)}`)
28
+ console.log(`đŸŒŧ ${pc.magenta("daisyUI")} ${pc.dim(macrouiInfo.version)}`)
29
29
  }
30
30
 
31
31
  // inject @base style
32
- if (config("daisyui.base") !== false) {
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("daisyui.styled") === false) {
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("daisyui.prefix")
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("daisyui.utils") !== false) {
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("daisyui.styled") === false) {
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("daisyui.utils") === false) {
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("daisyui.prefix") && config("daisyui.prefix") !== "") {
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("daisyui.prefix"))} ${pc.dim("prefix")}`
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://daisyui.com/docs/themes")}`
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://daisyui.com/docs/themes"
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
- daisyuiInfo.funding.url
117
+ macrouiInfo.funding.url
118
118
  )}`,
119
119
  `${pc.green("★")} ${pc.reset("Star daisyUI on GitHub")}\t${pc.dim(
120
- "https://github.com/saadeghi/daisyui"
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("daisyui.themeRoot") ?? ":root"
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("daisyui.themes"))) {
188
- for (const item of config("daisyui.themes")) {
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("daisyui.themes"))) {
199
- for (const theme of config("daisyui.themes")) {
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("daisyui.themes") === true) {
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("daisyui.darkTheme")) {
222
+ if (config("macroui.darkTheme")) {
223
223
  if (
224
- themeOrder[0] !== config("daisyui.darkTheme") &&
225
- themeOrder.includes(config("daisyui.darkTheme"))
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("daisyui.darkTheme")}`],
228
+ [themeRoot]: includedThemesObj[`${config("macroui.darkTheme")}`],
229
229
  }
230
230
  }
231
- } else if (config("daisyui.darkTheme") === false) {
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")) {