loseta 0.1.0 → 0.3.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.
Files changed (248) hide show
  1. package/README.md +17 -5
  2. package/dist/cli.js +2 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/add.d.ts +2 -2
  5. package/dist/commands/add.js +51 -62
  6. package/dist/commands/add.js.map +1 -1
  7. package/dist/commands/init.d.ts +2 -3
  8. package/dist/commands/init.js +46 -39
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/style.d.ts +1 -0
  11. package/dist/commands/style.js +88 -0
  12. package/dist/commands/style.js.map +1 -0
  13. package/dist/config.d.ts +4 -1
  14. package/dist/config.js +9 -2
  15. package/dist/config.js.map +1 -1
  16. package/dist/imports.d.ts +2 -2
  17. package/dist/imports.js +8 -7
  18. package/dist/imports.js.map +1 -1
  19. package/dist/install.d.ts +24 -0
  20. package/dist/install.js +61 -0
  21. package/dist/install.js.map +1 -0
  22. package/dist/registry.d.ts +10 -0
  23. package/dist/registry.js +22 -0
  24. package/dist/registry.js.map +1 -1
  25. package/dist/types.d.ts +10 -4
  26. package/package.json +2 -2
  27. package/registry/base.css +1 -1
  28. package/registry/components/code-block.css +173 -0
  29. package/registry/examples/code-block.html +73 -0
  30. package/registry/examples/skeleton.html +1 -1
  31. package/registry/registry.json +1313 -105
  32. package/registry/schema.json +19 -4
  33. package/registry/styles/luma/alert-dialog.css +74 -0
  34. package/registry/styles/luma/alert.css +114 -0
  35. package/registry/styles/luma/badge.css +86 -0
  36. package/registry/styles/luma/button-group.css +75 -0
  37. package/registry/styles/luma/button.css +228 -0
  38. package/registry/styles/luma/card.css +100 -0
  39. package/registry/styles/luma/checkbox.css +59 -0
  40. package/registry/styles/luma/code-block.css +191 -0
  41. package/registry/styles/luma/dialog.css +64 -0
  42. package/registry/styles/luma/dropdown-menu.css +105 -0
  43. package/registry/styles/luma/empty.css +54 -0
  44. package/registry/styles/luma/field.css +120 -0
  45. package/registry/styles/luma/input.css +57 -0
  46. package/registry/styles/luma/item.css +133 -0
  47. package/registry/styles/luma/kbd.css +22 -0
  48. package/registry/styles/luma/label.css +71 -0
  49. package/registry/styles/luma/native-select.css +69 -0
  50. package/registry/styles/luma/popover.css +25 -0
  51. package/registry/styles/luma/primitives/dialog-shell.css +19 -0
  52. package/registry/styles/luma/primitives/popover.css +16 -0
  53. package/registry/{themes/nova → styles/luma}/radio.css +1 -1
  54. package/registry/{themes/nova → styles/luma}/skeleton.css +1 -1
  55. package/registry/styles/luma/switch.css +87 -0
  56. package/registry/styles/luma/table.css +87 -0
  57. package/registry/styles/luma/tabs.css +146 -0
  58. package/registry/styles/luma/textarea.css +49 -0
  59. package/registry/styles/luma/tooltip.css +22 -0
  60. package/registry/styles/lyra/alert-dialog.css +74 -0
  61. package/registry/styles/lyra/alert.css +114 -0
  62. package/registry/styles/lyra/badge.css +86 -0
  63. package/registry/styles/lyra/button-group.css +74 -0
  64. package/registry/styles/lyra/button.css +227 -0
  65. package/registry/styles/lyra/card.css +99 -0
  66. package/registry/styles/lyra/checkbox.css +59 -0
  67. package/registry/styles/lyra/code-block.css +191 -0
  68. package/registry/styles/lyra/dialog.css +64 -0
  69. package/registry/styles/lyra/dropdown-menu.css +105 -0
  70. package/registry/styles/lyra/empty.css +54 -0
  71. package/registry/styles/lyra/field.css +120 -0
  72. package/registry/styles/lyra/input.css +57 -0
  73. package/registry/styles/lyra/item.css +133 -0
  74. package/registry/styles/lyra/kbd.css +22 -0
  75. package/registry/styles/lyra/label.css +71 -0
  76. package/registry/styles/lyra/native-select.css +70 -0
  77. package/registry/styles/lyra/popover.css +25 -0
  78. package/registry/styles/lyra/primitives/dialog-shell.css +19 -0
  79. package/registry/styles/lyra/primitives/popover.css +16 -0
  80. package/registry/styles/lyra/radio.css +53 -0
  81. package/registry/styles/lyra/skeleton.css +7 -0
  82. package/registry/{themes/nova → styles/lyra}/switch.css +1 -1
  83. package/registry/styles/lyra/table.css +87 -0
  84. package/registry/styles/lyra/tabs.css +146 -0
  85. package/registry/styles/lyra/textarea.css +49 -0
  86. package/registry/styles/lyra/tooltip.css +22 -0
  87. package/registry/styles/maia/alert-dialog.css +74 -0
  88. package/registry/styles/maia/alert.css +114 -0
  89. package/registry/{themes/nova → styles/maia}/badge.css +1 -1
  90. package/registry/styles/maia/button-group.css +75 -0
  91. package/registry/styles/maia/button.css +228 -0
  92. package/registry/styles/maia/card.css +99 -0
  93. package/registry/styles/maia/checkbox.css +59 -0
  94. package/registry/styles/maia/code-block.css +191 -0
  95. package/registry/styles/maia/dialog.css +64 -0
  96. package/registry/styles/maia/dropdown-menu.css +105 -0
  97. package/registry/styles/maia/empty.css +54 -0
  98. package/registry/styles/maia/field.css +120 -0
  99. package/registry/styles/maia/input.css +57 -0
  100. package/registry/styles/maia/item.css +133 -0
  101. package/registry/{themes/nova → styles/maia}/kbd.css +1 -1
  102. package/registry/styles/maia/label.css +71 -0
  103. package/registry/styles/maia/native-select.css +69 -0
  104. package/registry/styles/maia/popover.css +25 -0
  105. package/registry/styles/maia/primitives/dialog-shell.css +19 -0
  106. package/registry/styles/maia/primitives/popover.css +16 -0
  107. package/registry/styles/maia/radio.css +53 -0
  108. package/registry/styles/maia/skeleton.css +7 -0
  109. package/registry/styles/maia/switch.css +87 -0
  110. package/registry/styles/maia/table.css +87 -0
  111. package/registry/styles/maia/tabs.css +146 -0
  112. package/registry/styles/maia/textarea.css +49 -0
  113. package/registry/styles/maia/tooltip.css +22 -0
  114. package/registry/styles/mira/alert-dialog.css +74 -0
  115. package/registry/styles/mira/alert.css +114 -0
  116. package/registry/styles/mira/badge.css +86 -0
  117. package/registry/styles/mira/button-group.css +75 -0
  118. package/registry/styles/mira/button.css +228 -0
  119. package/registry/styles/mira/card.css +99 -0
  120. package/registry/{themes/nova → styles/mira}/checkbox.css +1 -1
  121. package/registry/styles/mira/code-block.css +191 -0
  122. package/registry/styles/mira/dialog.css +64 -0
  123. package/registry/styles/mira/dropdown-menu.css +106 -0
  124. package/registry/styles/mira/empty.css +54 -0
  125. package/registry/styles/mira/field.css +120 -0
  126. package/registry/styles/mira/input.css +57 -0
  127. package/registry/styles/mira/item.css +133 -0
  128. package/registry/styles/mira/kbd.css +22 -0
  129. package/registry/styles/mira/label.css +71 -0
  130. package/registry/styles/mira/native-select.css +71 -0
  131. package/registry/styles/mira/popover.css +25 -0
  132. package/registry/styles/mira/primitives/dialog-shell.css +19 -0
  133. package/registry/styles/mira/primitives/popover.css +16 -0
  134. package/registry/styles/mira/radio.css +53 -0
  135. package/registry/styles/mira/skeleton.css +7 -0
  136. package/registry/styles/mira/switch.css +87 -0
  137. package/registry/styles/mira/table.css +87 -0
  138. package/registry/styles/mira/tabs.css +146 -0
  139. package/registry/styles/mira/textarea.css +49 -0
  140. package/registry/{themes/nova → styles/mira}/tooltip.css +1 -1
  141. package/registry/{themes → styles}/nova/alert-dialog.css +1 -1
  142. package/registry/{themes → styles}/nova/alert.css +1 -1
  143. package/registry/styles/nova/badge.css +86 -0
  144. package/registry/{themes → styles}/nova/button-group.css +1 -1
  145. package/registry/{themes → styles}/nova/button.css +1 -1
  146. package/registry/{themes → styles}/nova/card.css +1 -1
  147. package/registry/styles/nova/checkbox.css +59 -0
  148. package/registry/styles/nova/code-block.css +191 -0
  149. package/registry/{themes → styles}/nova/dialog.css +1 -1
  150. package/registry/{themes → styles}/nova/dropdown-menu.css +1 -1
  151. package/registry/{themes → styles}/nova/empty.css +1 -1
  152. package/registry/{themes → styles}/nova/field.css +1 -1
  153. package/registry/{themes → styles}/nova/input.css +1 -1
  154. package/registry/{themes → styles}/nova/item.css +1 -1
  155. package/registry/styles/nova/kbd.css +22 -0
  156. package/registry/{themes → styles}/nova/label.css +1 -1
  157. package/registry/{themes → styles}/nova/native-select.css +1 -1
  158. package/registry/{themes → styles}/nova/popover.css +1 -1
  159. package/registry/{themes → styles}/nova/primitives/dialog-shell.css +1 -1
  160. package/registry/{themes → styles}/nova/primitives/popover.css +1 -1
  161. package/registry/styles/nova/radio.css +53 -0
  162. package/registry/styles/nova/skeleton.css +7 -0
  163. package/registry/styles/nova/switch.css +87 -0
  164. package/registry/{themes → styles}/nova/table.css +1 -1
  165. package/registry/{themes → styles}/nova/tabs.css +1 -1
  166. package/registry/{themes → styles}/nova/textarea.css +1 -1
  167. package/registry/styles/nova/tooltip.css +22 -0
  168. package/registry/styles/rhea/alert-dialog.css +74 -0
  169. package/registry/styles/rhea/alert.css +114 -0
  170. package/registry/styles/rhea/badge.css +86 -0
  171. package/registry/styles/rhea/button-group.css +75 -0
  172. package/registry/styles/rhea/button.css +228 -0
  173. package/registry/styles/rhea/card.css +100 -0
  174. package/registry/styles/rhea/checkbox.css +59 -0
  175. package/registry/styles/rhea/code-block.css +191 -0
  176. package/registry/styles/rhea/dialog.css +64 -0
  177. package/registry/styles/rhea/dropdown-menu.css +106 -0
  178. package/registry/styles/rhea/empty.css +54 -0
  179. package/registry/styles/rhea/field.css +120 -0
  180. package/registry/styles/rhea/input.css +57 -0
  181. package/registry/styles/rhea/item.css +133 -0
  182. package/registry/styles/rhea/kbd.css +22 -0
  183. package/registry/styles/rhea/label.css +71 -0
  184. package/registry/styles/rhea/native-select.css +69 -0
  185. package/registry/styles/rhea/popover.css +25 -0
  186. package/registry/styles/rhea/primitives/dialog-shell.css +19 -0
  187. package/registry/styles/rhea/primitives/popover.css +16 -0
  188. package/registry/styles/rhea/radio.css +53 -0
  189. package/registry/styles/rhea/skeleton.css +7 -0
  190. package/registry/styles/rhea/switch.css +87 -0
  191. package/registry/styles/rhea/table.css +87 -0
  192. package/registry/styles/rhea/tabs.css +146 -0
  193. package/registry/styles/rhea/textarea.css +49 -0
  194. package/registry/styles/rhea/tooltip.css +22 -0
  195. package/registry/styles/sera/alert-dialog.css +76 -0
  196. package/registry/styles/sera/alert.css +114 -0
  197. package/registry/styles/sera/badge.css +117 -0
  198. package/registry/styles/sera/button-group.css +75 -0
  199. package/registry/styles/sera/button.css +228 -0
  200. package/registry/styles/sera/card.css +102 -0
  201. package/registry/styles/sera/checkbox.css +59 -0
  202. package/registry/styles/sera/code-block.css +191 -0
  203. package/registry/styles/sera/dialog.css +67 -0
  204. package/registry/styles/sera/dropdown-menu.css +105 -0
  205. package/registry/styles/sera/empty.css +54 -0
  206. package/registry/styles/sera/field.css +120 -0
  207. package/registry/styles/sera/input.css +58 -0
  208. package/registry/styles/sera/item.css +133 -0
  209. package/registry/styles/sera/kbd.css +22 -0
  210. package/registry/styles/sera/label.css +71 -0
  211. package/registry/styles/sera/native-select.css +70 -0
  212. package/registry/styles/sera/popover.css +25 -0
  213. package/registry/styles/sera/primitives/dialog-shell.css +19 -0
  214. package/registry/styles/sera/primitives/popover.css +16 -0
  215. package/registry/styles/sera/radio.css +53 -0
  216. package/registry/styles/sera/skeleton.css +7 -0
  217. package/registry/styles/sera/switch.css +88 -0
  218. package/registry/styles/sera/table.css +88 -0
  219. package/registry/styles/sera/tabs.css +146 -0
  220. package/registry/styles/sera/textarea.css +50 -0
  221. package/registry/styles/sera/tooltip.css +22 -0
  222. package/registry/styles/vega/alert-dialog.css +74 -0
  223. package/registry/styles/vega/alert.css +114 -0
  224. package/registry/styles/vega/badge.css +86 -0
  225. package/registry/styles/vega/button-group.css +75 -0
  226. package/registry/styles/vega/button.css +228 -0
  227. package/registry/styles/vega/card.css +100 -0
  228. package/registry/styles/vega/checkbox.css +60 -0
  229. package/registry/styles/vega/code-block.css +191 -0
  230. package/registry/styles/vega/dialog.css +64 -0
  231. package/registry/styles/vega/dropdown-menu.css +105 -0
  232. package/registry/styles/vega/empty.css +54 -0
  233. package/registry/styles/vega/field.css +120 -0
  234. package/registry/styles/vega/input.css +58 -0
  235. package/registry/styles/vega/item.css +133 -0
  236. package/registry/styles/vega/kbd.css +22 -0
  237. package/registry/styles/vega/label.css +71 -0
  238. package/registry/styles/vega/native-select.css +70 -0
  239. package/registry/styles/vega/popover.css +25 -0
  240. package/registry/styles/vega/primitives/dialog-shell.css +19 -0
  241. package/registry/styles/vega/primitives/popover.css +16 -0
  242. package/registry/styles/vega/radio.css +53 -0
  243. package/registry/styles/vega/skeleton.css +7 -0
  244. package/registry/styles/vega/switch.css +88 -0
  245. package/registry/styles/vega/table.css +87 -0
  246. package/registry/styles/vega/tabs.css +146 -0
  247. package/registry/styles/vega/textarea.css +50 -0
  248. package/registry/styles/vega/tooltip.css +22 -0
@@ -0,0 +1,146 @@
1
+ /* Tabs */
2
+ @layer loseta.style {
3
+ .tabs {
4
+ gap: 0.5rem;
5
+
6
+ > [role='tablist'] {
7
+ height: 2.25rem;
8
+ border-radius: var(--radius-full);
9
+ padding: 0.25rem;
10
+
11
+ &:not([data-variant='line']) {
12
+ background-color: var(--muted);
13
+ }
14
+
15
+ &[data-variant='line'] {
16
+ gap: 0.25rem;
17
+ border-radius: 0;
18
+ background-color: transparent;
19
+ }
20
+
21
+ &[aria-orientation='vertical'] {
22
+ height: fit-content;
23
+ }
24
+
25
+ > [role='tab'] {
26
+ height: calc(100% - 1px);
27
+ gap: 0.5rem;
28
+ border-radius: var(--radius-full);
29
+ border-style: solid;
30
+ border-width: 1px;
31
+ border-color: transparent;
32
+ padding-inline: 0.75rem;
33
+ padding-block: 0.25rem;
34
+ font-size: var(--text-sm);
35
+ line-height: var(--text-sm--line-height);
36
+ font-weight: 500;
37
+ color: color-mix(in oklab, var(--foreground) 60%, transparent);
38
+
39
+ &:hover {
40
+ color: var(--foreground);
41
+ }
42
+
43
+ &:focus-visible {
44
+ border-color: var(--ring);
45
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
46
+ outline-style: solid;
47
+ outline-width: 1px;
48
+ outline-color: var(--ring);
49
+ }
50
+
51
+ &:is(html.dark *) {
52
+ color: var(--muted-foreground);
53
+
54
+ &:hover {
55
+ color: var(--foreground);
56
+ }
57
+ }
58
+
59
+ & svg {
60
+ width: var(--icon-size, 1rem);
61
+ height: var(--icon-size, 1rem);
62
+ }
63
+ &::after {
64
+ position: absolute;
65
+ background-color: var(--foreground);
66
+ opacity: 0%;
67
+ content: '';
68
+ transition-property: opacity;
69
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
70
+ transition-duration: 150ms;
71
+ }
72
+ }
73
+
74
+ &[aria-orientation='vertical'] > [role='tab'] {
75
+ width: 100%;
76
+ justify-content: flex-start;
77
+ }
78
+
79
+ &[data-variant='line'][aria-orientation='horizontal'] > [role='tab'] {
80
+ background-color: transparent;
81
+ box-shadow: none;
82
+
83
+ &::after {
84
+ inset-inline: 0;
85
+ bottom: -5px;
86
+ content: '';
87
+ height: 0.125rem;
88
+ }
89
+ }
90
+
91
+ &[data-variant='line'][aria-orientation='vertical'] > [role='tab'] {
92
+ background-color: transparent;
93
+ box-shadow: none;
94
+
95
+ &::after {
96
+ inset-block: 0;
97
+ inset-inline-end: -4px;
98
+ content: '';
99
+ width: 0.125rem;
100
+ }
101
+ }
102
+
103
+ &:not([data-variant='line']) > [role='tab'][aria-selected='true'] {
104
+ background-color: var(--background);
105
+ color: var(--foreground);
106
+ box-shadow: var(--shadow-sm);
107
+
108
+ &:is(html.dark *) {
109
+ border-color: var(--input);
110
+ background-color: color-mix(in oklab, var(--input) 30%, transparent);
111
+ color: var(--foreground);
112
+ }
113
+ }
114
+
115
+ &[data-variant='line'] > [role='tab'][aria-selected='true'] {
116
+ background-color: transparent;
117
+ color: var(--foreground);
118
+ box-shadow: none;
119
+
120
+ &::after {
121
+ content: '';
122
+ opacity: 100%;
123
+ }
124
+
125
+ &:is(html.dark *) {
126
+ border-color: transparent;
127
+ background-color: transparent;
128
+ color: var(--foreground);
129
+ }
130
+ }
131
+
132
+ > [role='tab']:has(> svg:first-child) {
133
+ padding-inline-start: 0.25rem;
134
+ }
135
+
136
+ > [role='tab']:has(> svg:last-child) {
137
+ padding-inline-end: 0.25rem;
138
+ }
139
+ }
140
+
141
+ > [role='tabpanel'] {
142
+ font-size: var(--text-sm);
143
+ line-height: var(--text-sm--line-height);
144
+ }
145
+ }
146
+ }
@@ -0,0 +1,49 @@
1
+ /* Textarea */
2
+ @layer loseta.style {
3
+ .textarea {
4
+ border-radius: var(--radius-2xl);
5
+ border-style: solid;
6
+ border-width: 1px;
7
+ border-color: var(--input);
8
+ background-color: transparent;
9
+ padding-inline: 0.75rem;
10
+ padding-block: 0.75rem;
11
+ font-size: var(--text-base);
12
+ line-height: 1.5;
13
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
14
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
15
+ transition-duration: 150ms;
16
+
17
+ &:focus-visible {
18
+ border-color: var(--ring);
19
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
20
+ }
21
+
22
+ &:disabled {
23
+ background-color: color-mix(in oklab, var(--input) 50%, transparent);
24
+ }
25
+
26
+ &[aria-invalid='true'] {
27
+ border-color: var(--destructive);
28
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 20%, transparent);
29
+ }
30
+
31
+ @media (width >= 48rem) {
32
+ font-size: var(--text-sm);
33
+ line-height: var(--text-sm--line-height);
34
+ }
35
+
36
+ &:is(html.dark *) {
37
+ background-color: color-mix(in oklab, var(--input) 30%, transparent);
38
+
39
+ &:disabled {
40
+ background-color: color-mix(in oklab, var(--input) 80%, transparent);
41
+ }
42
+
43
+ &[aria-invalid='true'] {
44
+ border-color: color-mix(in oklab, var(--destructive) 50%, transparent);
45
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 40%, transparent);
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,22 @@
1
+ /* Tooltip */
2
+ @layer loseta.style {
3
+ .tooltip[data-tooltip] {
4
+ &::before {
5
+ display: inline-flex;
6
+ align-items: center;
7
+ gap: 0.375rem;
8
+ border-radius: var(--radius-xl);
9
+ background-color: var(--foreground);
10
+ padding-inline: 0.75rem;
11
+ padding-block: 0.375rem;
12
+ font-size: var(--text-xs);
13
+ line-height: var(--text-xs--line-height);
14
+ color: var(--background);
15
+ }
16
+
17
+ &[data-arrow]::after {
18
+ border-radius: 2px;
19
+ background-color: var(--foreground);
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,74 @@
1
+ /* Alert Dialog */
2
+ @layer loseta.style {
3
+ .alert-dialog > * {
4
+ display: grid;
5
+ max-width: 20rem;
6
+ gap: 1rem;
7
+ border-radius: 0;
8
+ background-color: var(--popover);
9
+ padding: 1rem;
10
+ color: var(--popover-foreground);
11
+ box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);
12
+ transition-duration: 100ms;
13
+
14
+ @media (width >= 40rem) {
15
+ max-width: 24rem;
16
+ }
17
+ }
18
+
19
+ .alert-dialog:is([data-size='sm']) > *,
20
+ .alert-dialog > [data-size='sm'] {
21
+ @media (width >= 40rem) {
22
+ max-width: 20rem;
23
+ }
24
+ }
25
+
26
+ .alert-dialog > * > header {
27
+ column-gap: 1rem;
28
+ row-gap: 0.375rem;
29
+ }
30
+
31
+ .alert-dialog > * > header > figure {
32
+ margin-bottom: 0.5rem;
33
+ display: inline-flex;
34
+ width: 2.5rem;
35
+ height: 2.5rem;
36
+ align-items: center;
37
+ justify-content: center;
38
+ border-radius: 0;
39
+ background-color: var(--muted);
40
+
41
+ > svg {
42
+ width: var(--icon-size, 1.5rem);
43
+ height: var(--icon-size, 1.5rem);
44
+ }
45
+ }
46
+
47
+ .alert-dialog > * > header > h2,
48
+ .alert-dialog > * > [data-slot='title'] {
49
+ font-size: var(--text-sm);
50
+ line-height: 1.5;
51
+ font-weight: 500;
52
+ }
53
+
54
+ .alert-dialog > * > header > p,
55
+ .alert-dialog > * > [data-slot='description'] {
56
+ font-size: var(--text-xs);
57
+ line-height: var(--text-xs--line-height);
58
+ text-wrap: balance;
59
+ color: var(--muted-foreground);
60
+
61
+ @media (width >= 48rem) {
62
+ text-wrap: pretty;
63
+ }
64
+
65
+ & a {
66
+ text-decoration-line: underline;
67
+ text-underline-offset: 3px;
68
+ }
69
+
70
+ & a:hover {
71
+ color: var(--foreground);
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,114 @@
1
+ /* Alert */
2
+ @layer loseta.style {
3
+ .alert {
4
+ background-color: var(--card);
5
+ color: var(--card-foreground);
6
+ display: grid;
7
+ gap: 0.125rem;
8
+ border-radius: 0;
9
+ border-style: solid;
10
+ border-width: 1px;
11
+ border-color: var(--border);
12
+ padding-inline: 0.625rem;
13
+ padding-block: 0.5rem;
14
+ text-align: start;
15
+ font-size: var(--text-xs);
16
+ line-height: var(--text-xs--line-height);
17
+
18
+ &:has(> footer) {
19
+ padding-inline-end: 4.5rem;
20
+ }
21
+
22
+ &:has(> svg) {
23
+ grid-template-columns: auto 1fr;
24
+ column-gap: 0.5rem;
25
+ }
26
+
27
+ > svg {
28
+ grid-row: span 2 / span 2;
29
+ translate: 0 0.125rem;
30
+ color: currentcolor;
31
+ }
32
+
33
+ > svg {
34
+ width: var(--icon-size, 1rem);
35
+ height: var(--icon-size, 1rem);
36
+ }
37
+
38
+ &[data-variant='destructive'] {
39
+ background-color: var(--card);
40
+ color: var(--destructive);
41
+
42
+ > svg {
43
+ color: currentcolor;
44
+ }
45
+ }
46
+
47
+ > :is(h2, h3, h4, h5, h6, strong, [data-slot='title']),
48
+ &[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-slot='title']) {
49
+ font-weight: 500;
50
+ }
51
+
52
+ &:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-slot='title']) {
53
+ grid-column-start: 2;
54
+ }
55
+
56
+ > section {
57
+ font-size: var(--text-xs);
58
+ line-height: var(--text-xs--line-height);
59
+ text-wrap: balance;
60
+ color: var(--muted-foreground);
61
+
62
+ @media (width >= 48rem) {
63
+ text-wrap: pretty;
64
+ }
65
+
66
+ & p:not(:last-child) {
67
+ margin-bottom: 1rem;
68
+ }
69
+ }
70
+
71
+ > [data-slot='description'] {
72
+ font-size: var(--text-xs);
73
+ line-height: var(--text-xs--line-height);
74
+ text-wrap: balance;
75
+ color: var(--muted-foreground);
76
+
77
+ @media (width >= 48rem) {
78
+ text-wrap: pretty;
79
+ }
80
+ }
81
+
82
+ &[data-variant='destructive'] > section {
83
+ font-size: var(--text-xs);
84
+ line-height: var(--text-xs--line-height);
85
+ text-wrap: balance;
86
+ color: color-mix(in oklab, var(--destructive) 90%, transparent);
87
+
88
+ @media (width >= 48rem) {
89
+ text-wrap: pretty;
90
+ }
91
+
92
+ & p:not(:last-child) {
93
+ margin-bottom: 1rem;
94
+ }
95
+ }
96
+
97
+ &[data-variant='destructive'] > [data-slot='description'] {
98
+ font-size: var(--text-xs);
99
+ line-height: var(--text-xs--line-height);
100
+ text-wrap: balance;
101
+ color: color-mix(in oklab, var(--destructive) 90%, transparent);
102
+
103
+ @media (width >= 48rem) {
104
+ text-wrap: pretty;
105
+ }
106
+ }
107
+
108
+ > footer,
109
+ &[data-variant='destructive'] > footer {
110
+ inset-inline-end: 0.5rem;
111
+ top: 0.5rem;
112
+ }
113
+ }
114
+ }
@@ -0,0 +1,86 @@
1
+ /* Badge */
2
+ @layer loseta.style {
3
+ .badge {
4
+ height: 1.25rem;
5
+ gap: 0.25rem;
6
+ border-radius: 0;
7
+ border-style: solid;
8
+ border-width: 1px;
9
+ border-color: transparent;
10
+ padding-inline: 0.5rem;
11
+ padding-block: 0.125rem;
12
+ font-size: var(--text-xs);
13
+ line-height: var(--text-xs--line-height);
14
+ font-weight: 500;
15
+ transition-property: all;
16
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
17
+ transition-duration: 150ms;
18
+
19
+ > svg {
20
+ width: var(--icon-size, 0.75rem);
21
+ height: var(--icon-size, 0.75rem);
22
+ }
23
+
24
+ &:not([data-variant]),
25
+ &[data-variant='primary'] {
26
+ background-color: var(--primary);
27
+ color: var(--primary-foreground);
28
+
29
+ &:is(a):hover {
30
+ background-color: color-mix(in oklab, var(--primary) 80%, transparent);
31
+ }
32
+ }
33
+
34
+ &[data-variant='secondary'] {
35
+ background-color: var(--secondary);
36
+ color: var(--secondary-foreground);
37
+
38
+ &:is(a):hover {
39
+ background-color: color-mix(in oklab, var(--secondary) 80%, transparent);
40
+ }
41
+ }
42
+
43
+ &[data-variant='outline'] {
44
+ border-color: var(--border);
45
+ color: var(--foreground);
46
+
47
+ &:is(a):hover {
48
+ background-color: var(--muted);
49
+ color: var(--muted-foreground);
50
+ }
51
+ }
52
+
53
+ &[data-variant='destructive'] {
54
+ background-color: color-mix(in oklab, var(--destructive) 10%, transparent);
55
+ color: var(--destructive);
56
+
57
+ &:is(html.dark *) {
58
+ background-color: color-mix(in oklab, var(--destructive) 20%, transparent);
59
+ }
60
+
61
+ &:is(a):hover {
62
+ background-color: color-mix(in oklab, var(--destructive) 20%, transparent);
63
+ }
64
+ }
65
+
66
+ &[data-variant='ghost'] {
67
+ &:hover {
68
+ background-color: var(--muted);
69
+ color: var(--muted-foreground);
70
+
71
+ &:is(html.dark *) {
72
+ background-color: color-mix(in oklab, var(--muted) 50%, transparent);
73
+ }
74
+ }
75
+ }
76
+
77
+ &[data-variant='link'] {
78
+ color: var(--primary);
79
+ text-underline-offset: 4px;
80
+
81
+ &:hover {
82
+ text-decoration-line: underline;
83
+ }
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,74 @@
1
+ /* Button Group */
2
+ @layer loseta.style {
3
+ .btn-group {
4
+ &:has(>.btn-group) {
5
+ gap: 0.5rem;
6
+ }
7
+
8
+ /* .btn defines its radius and border in this layer, so the group has to
9
+ merge its children here as well; component-layer rules would lose. */
10
+ &:not([data-orientation='vertical']) {
11
+ > :not(:first-child),
12
+ > :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
13
+ border-start-start-radius: 0;
14
+ border-end-start-radius: 0;
15
+ border-inline-start-width: 0;
16
+ }
17
+
18
+ > :not(:last-child),
19
+ > :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
20
+ border-start-end-radius: 0;
21
+ border-end-end-radius: 0;
22
+ }
23
+
24
+ > :last-child,
25
+ > :is(.dropdown-menu, .popover, .select):last-child > button {
26
+ border-start-end-radius: 0;
27
+ border-end-end-radius: 0;
28
+ }
29
+ }
30
+
31
+ &[data-orientation='vertical'] {
32
+ > :not(:first-child),
33
+ > :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
34
+ border-top-left-radius: 0;
35
+ border-top-right-radius: 0;
36
+ border-top-width: 0;
37
+ }
38
+
39
+ > :not(:last-child),
40
+ > :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
41
+ border-bottom-right-radius: 0;
42
+ border-bottom-left-radius: 0;
43
+ }
44
+
45
+ > :last-child,
46
+ > :is(.dropdown-menu, .popover, .select):last-child > button {
47
+ border-bottom-right-radius: 0;
48
+ border-bottom-left-radius: 0;
49
+ }
50
+ }
51
+
52
+ > :is(span, label, output) {
53
+ gap: 0.5rem;
54
+ border-radius: 0;
55
+ border-style: solid;
56
+ border-width: 1px;
57
+ border-color: var(--border);
58
+ background-color: var(--muted);
59
+ padding-inline: 0.625rem;
60
+ font-size: var(--text-xs);
61
+ line-height: var(--text-sm--line-height);
62
+ font-weight: 500;
63
+
64
+ & svg {
65
+ width: var(--icon-size, 1rem);
66
+ height: var(--icon-size, 1rem);
67
+ }
68
+ }
69
+
70
+ > hr[role='separator'] {
71
+ background-color: var(--input);
72
+ }
73
+ }
74
+ }