@macroui/macroui 1.0.31 → 4.0.1

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.
Files changed (121) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -193
  3. package/dist/base.js +1 -0
  4. package/dist/{macroui.css → full.css} +0 -9014
  5. package/dist/index.d.ts +122 -0
  6. package/dist/index.js +149 -0
  7. package/dist/styled.css +5192 -0
  8. package/dist/styled.js +1 -0
  9. package/dist/themes.css +2118 -0
  10. package/dist/unstyled.css +1330 -0
  11. package/dist/unstyled.js +1 -0
  12. package/dist/utilities-styled.js +1 -0
  13. package/dist/utilities-unstyled.js +1 -0
  14. package/dist/utilities.js +1 -0
  15. package/package.json +30 -66
  16. package/src/base/properties.css +5 -0
  17. package/src/base/reset.css +130 -0
  18. package/src/base/rootcolor.css +9 -0
  19. package/src/base/rootscrollgutter.css +21 -0
  20. package/src/base/rootscrolllock.css +4 -0
  21. package/src/base/scrollbar.css +3 -0
  22. package/src/base/svg.css +3 -0
  23. package/src/components/alert.css +126 -0
  24. package/src/components/avatar.css +60 -0
  25. package/src/components/badge.css +151 -0
  26. package/src/components/breadcrumbs.css +40 -0
  27. package/src/components/button.css +362 -0
  28. package/src/components/calendar.css +549 -0
  29. package/src/components/card.css +203 -0
  30. package/src/components/carousel.css +59 -0
  31. package/src/components/chat.css +157 -0
  32. package/src/components/checkbox.css +174 -0
  33. package/src/components/collapse.css +302 -0
  34. package/src/components/countdown.css +56 -0
  35. package/src/components/diff.css +93 -0
  36. package/src/components/divider.css +148 -0
  37. package/src/components/dock.css +123 -0
  38. package/src/components/drawer.css +166 -0
  39. package/src/components/dropdown.css +247 -0
  40. package/src/components/fab.css +139 -0
  41. package/src/components/fieldset.css +23 -0
  42. package/src/components/fileinput.css +265 -0
  43. package/src/components/filter.css +42 -0
  44. package/src/components/footer.css +45 -0
  45. package/src/components/hero.css +21 -0
  46. package/src/components/hover3d.css +128 -0
  47. package/src/components/hovergallery.css +87 -0
  48. package/src/components/indicator.css +76 -0
  49. package/src/components/input.css +263 -0
  50. package/src/components/kbd.css +49 -0
  51. package/src/components/label.css +101 -0
  52. package/src/components/link.css +116 -0
  53. package/src/components/list.css +58 -0
  54. package/src/components/loading.css +76 -0
  55. package/src/components/mask.css +108 -0
  56. package/src/components/menu.css +298 -0
  57. package/src/components/mockup.css +150 -0
  58. package/src/components/modal.css +182 -0
  59. package/src/components/navbar.css +36 -0
  60. package/src/components/progress.css +108 -0
  61. package/src/components/radialprogress.css +39 -0
  62. package/src/components/radio.css +158 -0
  63. package/src/components/range.css +186 -0
  64. package/src/components/rating.css +114 -0
  65. package/src/components/select.css +284 -0
  66. package/src/components/skeleton.css +41 -0
  67. package/src/components/stack.css +80 -0
  68. package/src/components/stat.css +73 -0
  69. package/src/components/status.css +92 -0
  70. package/src/components/steps.css +168 -0
  71. package/src/components/swap.css +94 -0
  72. package/src/components/tab.css +557 -0
  73. package/src/components/table.css +126 -0
  74. package/src/components/textarea.css +179 -0
  75. package/src/components/textrotate.css +71 -0
  76. package/src/components/timeline.css +250 -0
  77. package/src/components/toast.css +68 -0
  78. package/src/components/toggle.css +239 -0
  79. package/src/components/tooltip.css +203 -0
  80. package/src/components/validator.css +47 -0
  81. package/src/themes/abyss.css +29 -0
  82. package/src/themes/acid.css +29 -0
  83. package/src/themes/aqua.css +29 -0
  84. package/src/themes/autumn.css +29 -0
  85. package/src/themes/black.css +29 -0
  86. package/src/themes/bumblebee.css +29 -0
  87. package/src/themes/business.css +29 -0
  88. package/src/themes/caramellatte.css +29 -0
  89. package/src/themes/cmyk.css +29 -0
  90. package/src/themes/coffee.css +29 -0
  91. package/src/themes/corporate.css +29 -0
  92. package/src/themes/cupcake.css +29 -0
  93. package/src/themes/cyberpunk.css +29 -0
  94. package/src/themes/dark.css +29 -0
  95. package/src/themes/dim.css +29 -0
  96. package/src/themes/dracula.css +29 -0
  97. package/src/themes/emerald.css +29 -0
  98. package/src/themes/fantasy.css +29 -0
  99. package/src/themes/forest.css +29 -0
  100. package/src/themes/garden.css +29 -0
  101. package/src/themes/halloween.css +29 -0
  102. package/src/themes/lemonade.css +29 -0
  103. package/src/themes/light.css +29 -0
  104. package/src/themes/lofi.css +29 -0
  105. package/src/themes/luxury.css +29 -0
  106. package/src/themes/night.css +29 -0
  107. package/src/themes/nord.css +29 -0
  108. package/src/themes/pastel.css +29 -0
  109. package/src/themes/retro.css +29 -0
  110. package/src/themes/silk.css +29 -0
  111. package/src/themes/sunset.css +29 -0
  112. package/src/themes/synthwave.css +29 -0
  113. package/src/themes/valentine.css +29 -0
  114. package/src/themes/winter.css +29 -0
  115. package/src/themes/wireframe.css +29 -0
  116. package/src/utilities/glass.css +20 -0
  117. package/src/utilities/join.css +207 -0
  118. package/src/utilities/radius.css +119 -0
  119. package/src/utilities/typography.css +31 -0
  120. package/dist/index.cjs.js +0 -19742
  121. package/dist/index.es.js +0 -19564
@@ -0,0 +1,166 @@
1
+ .drawer {
2
+ @layer daisyui.l1.l2.l3 {
3
+ @apply relative grid;
4
+ width: 100%;
5
+ grid-auto-columns: max-content auto;
6
+ }
7
+ }
8
+
9
+ .drawer-content {
10
+ @layer daisyui.l1.l2.l3 {
11
+ @apply col-start-2 row-start-1 min-w-0;
12
+ }
13
+ }
14
+
15
+ :where(.drawer-side) {
16
+ @layer daisyui.l1.l2.l3 {
17
+ @apply overflow-x-hidden overflow-y-hidden;
18
+ }
19
+ }
20
+
21
+ .drawer-side {
22
+ @layer daisyui.l1.l2.l3 {
23
+ @apply pointer-events-none invisible fixed start-0 top-0 z-10 col-start-1 row-start-1 grid w-full grid-cols-1 grid-rows-1 items-start justify-items-start overscroll-contain bg-transparent opacity-0;
24
+ transition:
25
+ opacity 0.2s ease-out 0.1s allow-discrete,
26
+ visibility 0.3s ease-out 0.1s allow-discrete;
27
+ height: 100vh;
28
+ height: 100dvh;
29
+
30
+ > .drawer-overlay {
31
+ @apply sticky top-0 cursor-pointer place-self-stretch;
32
+ background-color: oklch(0% 0 0 / 40%);
33
+ }
34
+
35
+ > * {
36
+ @apply col-start-1 row-start-1;
37
+ }
38
+
39
+ > :not(.drawer-overlay) {
40
+ @apply will-change-transform;
41
+ transition:
42
+ translate 0.3s ease-out,
43
+ width 0.2s ease-out;
44
+ translate: -100%;
45
+
46
+ [dir="rtl"] & {
47
+ translate: 100%;
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ .drawer-toggle {
54
+ @layer daisyui.l1.l2.l3 {
55
+ @apply fixed h-0 w-0 appearance-none opacity-0;
56
+ :where(&:checked ~ .drawer-side) {
57
+ scrollbar-color: color-mix(in oklch, currentColor 35%, #0000)
58
+ oklch(0 0 0 / calc(var(--page-has-backdrop, 0) * 0.4));
59
+ }
60
+
61
+ :where(:root:has(&:checked)) {
62
+ --page-has-backdrop: 1;
63
+ --page-overflow: hidden;
64
+ --page-scroll-bg: var(--page-scroll-bg-on);
65
+ --page-scroll-gutter: stable;
66
+ --page-scroll-transition: var(--page-scroll-transition-on);
67
+ animation: set-page-has-scroll forwards;
68
+ animation-timeline: scroll();
69
+ }
70
+ }
71
+
72
+ @layer daisyui.l1.l2 {
73
+ :where(&:checked ~ .drawer-side) {
74
+ @apply pointer-events-auto visible overflow-y-auto opacity-100;
75
+
76
+ > :not(.drawer-overlay) {
77
+ translate: 0%;
78
+ }
79
+ }
80
+
81
+ &:focus-visible ~ .drawer-content label.drawer-button {
82
+ outline: 2px solid;
83
+ outline-offset: 2px;
84
+ }
85
+ }
86
+ }
87
+
88
+ .drawer-end {
89
+ @layer daisyui.l1.l2 {
90
+ grid-auto-columns: auto max-content;
91
+
92
+ > .drawer-toggle {
93
+ ~ .drawer-content {
94
+ @apply col-start-1;
95
+ }
96
+
97
+ ~ .drawer-side {
98
+ @apply col-start-2 justify-items-end;
99
+ }
100
+
101
+ ~ .drawer-side > :not(.drawer-overlay) {
102
+ translate: 100%;
103
+
104
+ [dir="rtl"] & {
105
+ translate: -100%;
106
+ }
107
+ }
108
+
109
+ &:checked ~ .drawer-side > :not(.drawer-overlay) {
110
+ translate: 0%;
111
+ }
112
+ }
113
+ }
114
+ }
115
+
116
+ .drawer-open {
117
+ @layer daisyui.l1.l2.l3 {
118
+ > .drawer-toggle:checked {
119
+ ~ .drawer-side {
120
+ scrollbar-color: revert-layer;
121
+ }
122
+
123
+ :root:has(&) {
124
+ --page-overflow: revert-layer;
125
+ --page-scroll-gutter: revert-layer;
126
+ --page-scroll-bg: revert-layer;
127
+ --page-scroll-transition: revert-layer;
128
+ --page-has-backdrop: revert-layer;
129
+ animation: revert-layer;
130
+ animation-timeline: revert-layer;
131
+ }
132
+ }
133
+ }
134
+
135
+ @layer daisyui.l1.l2 {
136
+ > .drawer-side {
137
+ @apply overflow-y-auto;
138
+ }
139
+
140
+ > .drawer-toggle {
141
+ @apply hidden;
142
+
143
+ ~ .drawer-side {
144
+ @apply pointer-events-auto visible sticky block w-auto overscroll-auto opacity-100;
145
+
146
+ > .drawer-overlay {
147
+ @apply cursor-default bg-transparent;
148
+ }
149
+ }
150
+
151
+ &:checked ~ .drawer-side {
152
+ @apply pointer-events-auto visible;
153
+ }
154
+ }
155
+ }
156
+
157
+ @layer daisyui.l1 {
158
+ > .drawer-toggle ~ .drawer-side > :not(.drawer-overlay) {
159
+ translate: 0%;
160
+
161
+ [dir="rtl"] & {
162
+ translate: 0%;
163
+ }
164
+ }
165
+ }
166
+ }
@@ -0,0 +1,247 @@
1
+ .dropdown {
2
+ @layer daisyui.l1.l2.l3 {
3
+ @apply relative inline-block;
4
+ position-area: var(--anchor-v, bottom) var(--anchor-h, span-right);
5
+
6
+ & > *:not(:has(~ [class*="dropdown-content"])):focus {
7
+ @apply outline-hidden;
8
+ }
9
+ .dropdown-content {
10
+ @apply absolute;
11
+ }
12
+ &.dropdown-close .dropdown-content,
13
+ &:not(details, .dropdown-open, .dropdown-hover:hover, :focus-within) .dropdown-content,
14
+ &.dropdown-hover:not(:hover)
15
+ [tabindex]:first-child:focus:not(:focus-visible)
16
+ ~ .dropdown-content {
17
+ @apply hidden origin-top opacity-0;
18
+ scale: 95%;
19
+ }
20
+
21
+ &[popover],
22
+ .dropdown-content {
23
+ z-index: 999;
24
+ @media (prefers-reduced-motion: no-preference) {
25
+ animation: dropdown 0.2s;
26
+ transition-property: opacity, scale, display;
27
+ transition-behavior: allow-discrete;
28
+ transition-duration: 0.2s;
29
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
30
+ }
31
+ }
32
+ @starting-style {
33
+ &[popover],
34
+ .dropdown-content {
35
+ scale: 95%;
36
+ opacity: 0;
37
+ }
38
+ }
39
+
40
+ &:not(.dropdown-close) {
41
+ &.dropdown-open,
42
+ &:not(.dropdown-hover):focus,
43
+ &:focus-within {
44
+ > [tabindex]:first-child {
45
+ @apply pointer-events-none;
46
+ }
47
+ .dropdown-content {
48
+ @apply opacity-100;
49
+ scale: 100%;
50
+ }
51
+ }
52
+
53
+ &.dropdown-hover:hover {
54
+ .dropdown-content {
55
+ @apply opacity-100;
56
+ scale: 100%;
57
+ }
58
+ }
59
+ }
60
+
61
+ &:is(details) {
62
+ summary {
63
+ &::-webkit-details-marker {
64
+ @apply hidden;
65
+ }
66
+ }
67
+ }
68
+
69
+ /* experimental */
70
+ &:where([popover]) {
71
+ background: #0000;
72
+ }
73
+ &[popover] {
74
+ @apply fixed text-inherit;
75
+
76
+ /* align-self: anchor-center; */
77
+ /* justify-self: anchor-center; */
78
+ /* left: anchor(right); */
79
+ /* align-self: anchor-center; */
80
+
81
+ @supports not (position-area: bottom) {
82
+ @apply m-auto;
83
+
84
+ &.dropdown-close,
85
+ &.dropdown-open:not(:popover-open) {
86
+ @apply hidden origin-top opacity-0;
87
+ scale: 95%;
88
+ }
89
+
90
+ &::backdrop {
91
+ background-color: color-mix(in oklab, #000 30%, #0000);
92
+ }
93
+ }
94
+
95
+ &.dropdown-close,
96
+ &:not(.dropdown-open, :popover-open) {
97
+ @apply hidden origin-top opacity-0;
98
+ scale: 95%;
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
+ .dropdown-start {
105
+ @layer daisyui.l1.l2 {
106
+ --anchor-h: span-right;
107
+
108
+ :where(.dropdown-content) {
109
+ @apply end-auto;
110
+ translate: 0 0;
111
+ [dir="rtl"] & {
112
+ translate: 0 0;
113
+ }
114
+ }
115
+
116
+ &.dropdown-left {
117
+ --anchor-h: left;
118
+ --anchor-v: span-bottom;
119
+
120
+ .dropdown-content {
121
+ @apply top-0 bottom-auto;
122
+ }
123
+ }
124
+
125
+ &.dropdown-right {
126
+ --anchor-h: right;
127
+ --anchor-v: span-bottom;
128
+
129
+ .dropdown-content {
130
+ @apply top-0 bottom-auto;
131
+ }
132
+ }
133
+ }
134
+ }
135
+
136
+ .dropdown-center {
137
+ @layer daisyui.l1.l2 {
138
+ --anchor-h: center;
139
+
140
+ :where(.dropdown-content) {
141
+ @apply end-1/2;
142
+ translate: 50% 0;
143
+ [dir="rtl"] & {
144
+ translate: -50% 0;
145
+ }
146
+ }
147
+
148
+ &.dropdown-left {
149
+ --anchor-h: left;
150
+ --anchor-v: center;
151
+
152
+ .dropdown-content {
153
+ @apply top-auto bottom-1/2;
154
+ translate: 0 50%;
155
+ }
156
+ }
157
+
158
+ &.dropdown-right {
159
+ --anchor-h: right;
160
+ --anchor-v: center;
161
+
162
+ .dropdown-content {
163
+ @apply top-auto bottom-1/2;
164
+ translate: 0 50%;
165
+ }
166
+ }
167
+ }
168
+ }
169
+
170
+ .dropdown-end {
171
+ @layer daisyui.l1.l2 {
172
+ --anchor-h: span-left;
173
+
174
+ :where(.dropdown-content) {
175
+ @apply end-0;
176
+ translate: 0 0;
177
+ [dir="rtl"] & {
178
+ translate: 0 0;
179
+ }
180
+ }
181
+
182
+ &.dropdown-left {
183
+ --anchor-h: left;
184
+ --anchor-v: span-top;
185
+
186
+ .dropdown-content {
187
+ @apply top-auto bottom-0;
188
+ }
189
+ }
190
+
191
+ &.dropdown-right {
192
+ --anchor-h: right;
193
+ --anchor-v: span-top;
194
+
195
+ .dropdown-content {
196
+ @apply top-auto bottom-0;
197
+ }
198
+ }
199
+ }
200
+ }
201
+
202
+ .dropdown-left {
203
+ @layer daisyui.l1.l2 {
204
+ --anchor-h: left;
205
+ --anchor-v: span-bottom;
206
+
207
+ .dropdown-content {
208
+ @apply end-full top-0 bottom-auto origin-right;
209
+ }
210
+ }
211
+ }
212
+
213
+ .dropdown-right {
214
+ @layer daisyui.l1.l2 {
215
+ --anchor-h: right;
216
+ --anchor-v: span-bottom;
217
+
218
+ .dropdown-content {
219
+ @apply start-full top-0 bottom-auto origin-left;
220
+ }
221
+ }
222
+ }
223
+
224
+ .dropdown-bottom {
225
+ @layer daisyui.l1.l2 {
226
+ --anchor-v: bottom;
227
+
228
+ .dropdown-content {
229
+ @apply top-full bottom-auto origin-top;
230
+ }
231
+ }
232
+ }
233
+
234
+ .dropdown-top {
235
+ @layer daisyui.l1.l2 {
236
+ --anchor-v: top;
237
+
238
+ .dropdown-content {
239
+ @apply top-auto bottom-full origin-bottom;
240
+ }
241
+ }
242
+ }
243
+ @keyframes dropdown {
244
+ 0% {
245
+ opacity: 0;
246
+ }
247
+ }
@@ -0,0 +1,139 @@
1
+ .fab {
2
+ @layer daisyui.l1.l2.l3 {
3
+ @apply pointer-events-none fixed end-4 bottom-4 z-999 flex flex-col-reverse items-end gap-2 text-sm whitespace-nowrap;
4
+ > * {
5
+ @apply pointer-events-auto flex items-center gap-2;
6
+ &:hover,
7
+ &:has(:focus-visible) {
8
+ @apply z-1;
9
+ }
10
+ }
11
+ > [tabindex] {
12
+ &:first-child {
13
+ @apply relative grid;
14
+ transition-property: opacity, visibility, rotate;
15
+ transition-duration: 0.2s;
16
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
17
+ }
18
+ }
19
+
20
+ .fab-close {
21
+ @apply absolute end-0 bottom-0;
22
+ }
23
+ .fab-main-action {
24
+ @apply absolute end-0 bottom-0;
25
+ }
26
+ &:focus-within {
27
+ &:has(.fab-close),
28
+ &:has(.fab-main-action) {
29
+ > [tabindex] {
30
+ @apply rotate-90 opacity-0;
31
+ }
32
+ }
33
+ }
34
+ > :nth-child(n + 2) {
35
+ @apply invisible scale-80 opacity-0;
36
+ transition-property: opacity, scale, visibility;
37
+ transition-duration: 0.2s;
38
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
39
+
40
+ &.fab-main-action,
41
+ &.fab-close {
42
+ @apply scale-100;
43
+ }
44
+ }
45
+ > :nth-child(3) {
46
+ transition-delay: 30ms;
47
+ }
48
+ > :nth-child(4) {
49
+ transition-delay: 60ms;
50
+ }
51
+ > :nth-child(5) {
52
+ transition-delay: 90ms;
53
+ }
54
+ > :nth-child(6) {
55
+ transition-delay: 120ms;
56
+ }
57
+ /* checkbox method experiment - not a good idea because it needs a second click to close */
58
+ /* > label {
59
+ @apply relative;
60
+ > input {
61
+ @apply pointer-events-none absolute inset-0 opacity-0;
62
+ }
63
+ } */
64
+ /* &:has(:checked), */
65
+ &:focus-within {
66
+ > [tabindex]:first-child {
67
+ @apply pointer-events-none;
68
+ }
69
+ > :nth-child(n + 2) {
70
+ @apply visible scale-100 opacity-100;
71
+ }
72
+ }
73
+ }
74
+ }
75
+ .fab-flower {
76
+ @layer daisyui.l1.l2.l3 {
77
+ @apply grid;
78
+ --position: 0rem;
79
+ > *:nth-child(-n + 2) {
80
+ --position: 0rem;
81
+ }
82
+ > * {
83
+ grid-area: 1/1;
84
+ --degree: 180deg;
85
+ --flip-degree: calc(180deg - var(--degree));
86
+ transform: translateX(calc(cos(var(--degree)) * var(--position)))
87
+ translateY(calc(sin(var(--degree)) * -1 * var(--position)));
88
+ [dir="rtl"] & {
89
+ transform: translateX(calc(cos(var(--flip-degree)) * var(--position)))
90
+ translateY(calc(sin(var(--flip-degree)) * -1 * var(--position)));
91
+ }
92
+ }
93
+ > :nth-child(n + 7) {
94
+ @apply hidden;
95
+ }
96
+ &:has(:nth-child(3)) {
97
+ --position: 140%;
98
+ > :nth-child(3) {
99
+ --degree: 135deg;
100
+ }
101
+ }
102
+ &:has(:nth-child(4)) {
103
+ --position: 140%;
104
+ > :nth-child(3) {
105
+ --degree: 165deg;
106
+ }
107
+ > :nth-child(4) {
108
+ --degree: 105deg;
109
+ }
110
+ }
111
+ &:has(:nth-child(5)) {
112
+ --position: 180%;
113
+ > :nth-child(3) {
114
+ --degree: 180deg;
115
+ }
116
+ > :nth-child(4) {
117
+ --degree: 135deg;
118
+ }
119
+ > :nth-child(5) {
120
+ --degree: 90deg;
121
+ }
122
+ }
123
+ &:has(:nth-child(6)) {
124
+ --position: 220%;
125
+ > :nth-child(3) {
126
+ --degree: 180deg;
127
+ }
128
+ > :nth-child(4) {
129
+ --degree: 150deg;
130
+ }
131
+ > :nth-child(5) {
132
+ --degree: 120deg;
133
+ }
134
+ > :nth-child(6) {
135
+ --degree: 90deg;
136
+ }
137
+ }
138
+ }
139
+ }
@@ -0,0 +1,23 @@
1
+ .fieldset {
2
+ @layer daisyui.l1.l2.l3 {
3
+ @apply grid gap-1.5 py-1;
4
+ font-size: 0.75rem;
5
+ grid-template-columns: 1fr;
6
+ grid-auto-rows: max-content;
7
+ }
8
+ }
9
+ .fieldset-legend {
10
+ @layer daisyui.l1.l2.l3 {
11
+ @apply text-base-content -mb-1 flex items-center justify-between gap-2 py-2;
12
+ font-weight: 600;
13
+ }
14
+ }
15
+ /* deprecated in favor of label - but stays in source code to avoid breaking change */
16
+ .fieldset-label {
17
+ @layer daisyui.l1.l2.l3 {
18
+ @apply text-base-content/60 flex items-center gap-1.5;
19
+ &:has(input) {
20
+ @apply cursor-pointer;
21
+ }
22
+ }
23
+ }