loseta 0.0.0-stage → 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 (318) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +12 -0
  3. package/README.md +85 -2
  4. package/bin/loseta.js +2 -0
  5. package/dist/cli.d.ts +1 -0
  6. package/dist/cli.js +28 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/add.d.ts +24 -0
  9. package/dist/commands/add.js +163 -0
  10. package/dist/commands/add.js.map +1 -0
  11. package/dist/commands/init.d.ts +25 -0
  12. package/dist/commands/init.js +161 -0
  13. package/dist/commands/init.js.map +1 -0
  14. package/dist/commands/list.d.ts +11 -0
  15. package/dist/commands/list.js +41 -0
  16. package/dist/commands/list.js.map +1 -0
  17. package/dist/commands/style.d.ts +1 -0
  18. package/dist/commands/style.js +88 -0
  19. package/dist/commands/style.js.map +1 -0
  20. package/dist/config.d.ts +19 -0
  21. package/dist/config.js +48 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/fs.d.ts +8 -0
  24. package/dist/fs.js +30 -0
  25. package/dist/fs.js.map +1 -0
  26. package/dist/imports.d.ts +10 -0
  27. package/dist/imports.js +62 -0
  28. package/dist/imports.js.map +1 -0
  29. package/dist/install.d.ts +24 -0
  30. package/dist/install.js +61 -0
  31. package/dist/install.js.map +1 -0
  32. package/dist/manifest.d.ts +12 -0
  33. package/dist/manifest.js +34 -0
  34. package/dist/manifest.js.map +1 -0
  35. package/dist/registry.d.ts +27 -0
  36. package/dist/registry.js +88 -0
  37. package/dist/registry.js.map +1 -0
  38. package/dist/types.d.ts +54 -0
  39. package/dist/types.js +2 -0
  40. package/dist/types.js.map +1 -0
  41. package/dist/ui.d.ts +5 -0
  42. package/dist/ui.js +14 -0
  43. package/dist/ui.js.map +1 -0
  44. package/package.json +58 -4
  45. package/registry/base.css +20 -0
  46. package/registry/components/alert-dialog.css +97 -0
  47. package/registry/components/alert.css +39 -0
  48. package/registry/components/badge.css +25 -0
  49. package/registry/components/button-group.css +83 -0
  50. package/registry/components/button.css +26 -0
  51. package/registry/components/card.css +46 -0
  52. package/registry/components/checkbox.css +24 -0
  53. package/registry/components/code-block.css +173 -0
  54. package/registry/components/dialog.css +64 -0
  55. package/registry/components/dropdown-menu.css +97 -0
  56. package/registry/components/empty.css +64 -0
  57. package/registry/components/field.css +164 -0
  58. package/registry/components/input.css +26 -0
  59. package/registry/components/item.css +102 -0
  60. package/registry/components/kbd.css +11 -0
  61. package/registry/components/label.css +31 -0
  62. package/registry/components/native-select.css +21 -0
  63. package/registry/components/popover.css +7 -0
  64. package/registry/components/radio.css +25 -0
  65. package/registry/components/skeleton.css +11 -0
  66. package/registry/components/switch.css +27 -0
  67. package/registry/components/table.css +73 -0
  68. package/registry/components/tabs.css +61 -0
  69. package/registry/components/textarea.css +19 -0
  70. package/registry/components/tooltip.css +255 -0
  71. package/registry/examples/alert-dialog.html +20 -0
  72. package/registry/examples/alert.html +15 -0
  73. package/registry/examples/badge.html +9 -0
  74. package/registry/examples/button-group.html +13 -0
  75. package/registry/examples/button.html +21 -0
  76. package/registry/examples/card.html +18 -0
  77. package/registry/examples/checkbox.html +8 -0
  78. package/registry/examples/code-block.html +73 -0
  79. package/registry/examples/dialog.html +26 -0
  80. package/registry/examples/dropdown-menu.html +15 -0
  81. package/registry/examples/empty.html +11 -0
  82. package/registry/examples/field.html +15 -0
  83. package/registry/examples/input.html +9 -0
  84. package/registry/examples/item.html +20 -0
  85. package/registry/examples/kbd.html +6 -0
  86. package/registry/examples/label.html +5 -0
  87. package/registry/examples/native-select.html +10 -0
  88. package/registry/examples/popover.html +16 -0
  89. package/registry/examples/radio.html +15 -0
  90. package/registry/examples/skeleton.html +6 -0
  91. package/registry/examples/switch.html +5 -0
  92. package/registry/examples/table.html +34 -0
  93. package/registry/examples/tabs.html +27 -0
  94. package/registry/examples/textarea.html +6 -0
  95. package/registry/examples/tooltip.html +4 -0
  96. package/registry/primitives/dialog-shell.css +71 -0
  97. package/registry/primitives/popover.css +130 -0
  98. package/registry/registry.json +2092 -0
  99. package/registry/reset.css +148 -0
  100. package/registry/schema.json +92 -0
  101. package/registry/styles/luma/alert-dialog.css +74 -0
  102. package/registry/styles/luma/alert.css +114 -0
  103. package/registry/styles/luma/badge.css +86 -0
  104. package/registry/styles/luma/button-group.css +75 -0
  105. package/registry/styles/luma/button.css +228 -0
  106. package/registry/styles/luma/card.css +100 -0
  107. package/registry/styles/luma/checkbox.css +59 -0
  108. package/registry/styles/luma/code-block.css +191 -0
  109. package/registry/styles/luma/dialog.css +64 -0
  110. package/registry/styles/luma/dropdown-menu.css +105 -0
  111. package/registry/styles/luma/empty.css +54 -0
  112. package/registry/styles/luma/field.css +120 -0
  113. package/registry/styles/luma/input.css +57 -0
  114. package/registry/styles/luma/item.css +133 -0
  115. package/registry/styles/luma/kbd.css +22 -0
  116. package/registry/styles/luma/label.css +71 -0
  117. package/registry/styles/luma/native-select.css +69 -0
  118. package/registry/styles/luma/popover.css +25 -0
  119. package/registry/styles/luma/primitives/dialog-shell.css +19 -0
  120. package/registry/styles/luma/primitives/popover.css +16 -0
  121. package/registry/styles/luma/radio.css +53 -0
  122. package/registry/styles/luma/skeleton.css +7 -0
  123. package/registry/styles/luma/switch.css +87 -0
  124. package/registry/styles/luma/table.css +87 -0
  125. package/registry/styles/luma/tabs.css +146 -0
  126. package/registry/styles/luma/textarea.css +49 -0
  127. package/registry/styles/luma/tooltip.css +22 -0
  128. package/registry/styles/lyra/alert-dialog.css +74 -0
  129. package/registry/styles/lyra/alert.css +114 -0
  130. package/registry/styles/lyra/badge.css +86 -0
  131. package/registry/styles/lyra/button-group.css +74 -0
  132. package/registry/styles/lyra/button.css +227 -0
  133. package/registry/styles/lyra/card.css +99 -0
  134. package/registry/styles/lyra/checkbox.css +59 -0
  135. package/registry/styles/lyra/code-block.css +191 -0
  136. package/registry/styles/lyra/dialog.css +64 -0
  137. package/registry/styles/lyra/dropdown-menu.css +105 -0
  138. package/registry/styles/lyra/empty.css +54 -0
  139. package/registry/styles/lyra/field.css +120 -0
  140. package/registry/styles/lyra/input.css +57 -0
  141. package/registry/styles/lyra/item.css +133 -0
  142. package/registry/styles/lyra/kbd.css +22 -0
  143. package/registry/styles/lyra/label.css +71 -0
  144. package/registry/styles/lyra/native-select.css +70 -0
  145. package/registry/styles/lyra/popover.css +25 -0
  146. package/registry/styles/lyra/primitives/dialog-shell.css +19 -0
  147. package/registry/styles/lyra/primitives/popover.css +16 -0
  148. package/registry/styles/lyra/radio.css +53 -0
  149. package/registry/styles/lyra/skeleton.css +7 -0
  150. package/registry/styles/lyra/switch.css +87 -0
  151. package/registry/styles/lyra/table.css +87 -0
  152. package/registry/styles/lyra/tabs.css +146 -0
  153. package/registry/styles/lyra/textarea.css +49 -0
  154. package/registry/styles/lyra/tooltip.css +22 -0
  155. package/registry/styles/maia/alert-dialog.css +74 -0
  156. package/registry/styles/maia/alert.css +114 -0
  157. package/registry/styles/maia/badge.css +86 -0
  158. package/registry/styles/maia/button-group.css +75 -0
  159. package/registry/styles/maia/button.css +228 -0
  160. package/registry/styles/maia/card.css +99 -0
  161. package/registry/styles/maia/checkbox.css +59 -0
  162. package/registry/styles/maia/code-block.css +191 -0
  163. package/registry/styles/maia/dialog.css +64 -0
  164. package/registry/styles/maia/dropdown-menu.css +105 -0
  165. package/registry/styles/maia/empty.css +54 -0
  166. package/registry/styles/maia/field.css +120 -0
  167. package/registry/styles/maia/input.css +57 -0
  168. package/registry/styles/maia/item.css +133 -0
  169. package/registry/styles/maia/kbd.css +22 -0
  170. package/registry/styles/maia/label.css +71 -0
  171. package/registry/styles/maia/native-select.css +69 -0
  172. package/registry/styles/maia/popover.css +25 -0
  173. package/registry/styles/maia/primitives/dialog-shell.css +19 -0
  174. package/registry/styles/maia/primitives/popover.css +16 -0
  175. package/registry/styles/maia/radio.css +53 -0
  176. package/registry/styles/maia/skeleton.css +7 -0
  177. package/registry/styles/maia/switch.css +87 -0
  178. package/registry/styles/maia/table.css +87 -0
  179. package/registry/styles/maia/tabs.css +146 -0
  180. package/registry/styles/maia/textarea.css +49 -0
  181. package/registry/styles/maia/tooltip.css +22 -0
  182. package/registry/styles/mira/alert-dialog.css +74 -0
  183. package/registry/styles/mira/alert.css +114 -0
  184. package/registry/styles/mira/badge.css +86 -0
  185. package/registry/styles/mira/button-group.css +75 -0
  186. package/registry/styles/mira/button.css +228 -0
  187. package/registry/styles/mira/card.css +99 -0
  188. package/registry/styles/mira/checkbox.css +59 -0
  189. package/registry/styles/mira/code-block.css +191 -0
  190. package/registry/styles/mira/dialog.css +64 -0
  191. package/registry/styles/mira/dropdown-menu.css +106 -0
  192. package/registry/styles/mira/empty.css +54 -0
  193. package/registry/styles/mira/field.css +120 -0
  194. package/registry/styles/mira/input.css +57 -0
  195. package/registry/styles/mira/item.css +133 -0
  196. package/registry/styles/mira/kbd.css +22 -0
  197. package/registry/styles/mira/label.css +71 -0
  198. package/registry/styles/mira/native-select.css +71 -0
  199. package/registry/styles/mira/popover.css +25 -0
  200. package/registry/styles/mira/primitives/dialog-shell.css +19 -0
  201. package/registry/styles/mira/primitives/popover.css +16 -0
  202. package/registry/styles/mira/radio.css +53 -0
  203. package/registry/styles/mira/skeleton.css +7 -0
  204. package/registry/styles/mira/switch.css +87 -0
  205. package/registry/styles/mira/table.css +87 -0
  206. package/registry/styles/mira/tabs.css +146 -0
  207. package/registry/styles/mira/textarea.css +49 -0
  208. package/registry/styles/mira/tooltip.css +22 -0
  209. package/registry/styles/nova/alert-dialog.css +74 -0
  210. package/registry/styles/nova/alert.css +114 -0
  211. package/registry/styles/nova/badge.css +86 -0
  212. package/registry/styles/nova/button-group.css +74 -0
  213. package/registry/styles/nova/button.css +227 -0
  214. package/registry/styles/nova/card.css +102 -0
  215. package/registry/styles/nova/checkbox.css +59 -0
  216. package/registry/styles/nova/code-block.css +191 -0
  217. package/registry/styles/nova/dialog.css +64 -0
  218. package/registry/styles/nova/dropdown-menu.css +105 -0
  219. package/registry/styles/nova/empty.css +54 -0
  220. package/registry/styles/nova/field.css +120 -0
  221. package/registry/styles/nova/input.css +57 -0
  222. package/registry/styles/nova/item.css +133 -0
  223. package/registry/styles/nova/kbd.css +22 -0
  224. package/registry/styles/nova/label.css +71 -0
  225. package/registry/styles/nova/native-select.css +71 -0
  226. package/registry/styles/nova/popover.css +25 -0
  227. package/registry/styles/nova/primitives/dialog-shell.css +23 -0
  228. package/registry/styles/nova/primitives/popover.css +16 -0
  229. package/registry/styles/nova/radio.css +53 -0
  230. package/registry/styles/nova/skeleton.css +7 -0
  231. package/registry/styles/nova/switch.css +87 -0
  232. package/registry/styles/nova/table.css +87 -0
  233. package/registry/styles/nova/tabs.css +146 -0
  234. package/registry/styles/nova/textarea.css +49 -0
  235. package/registry/styles/nova/tooltip.css +22 -0
  236. package/registry/styles/rhea/alert-dialog.css +74 -0
  237. package/registry/styles/rhea/alert.css +114 -0
  238. package/registry/styles/rhea/badge.css +86 -0
  239. package/registry/styles/rhea/button-group.css +75 -0
  240. package/registry/styles/rhea/button.css +228 -0
  241. package/registry/styles/rhea/card.css +100 -0
  242. package/registry/styles/rhea/checkbox.css +59 -0
  243. package/registry/styles/rhea/code-block.css +191 -0
  244. package/registry/styles/rhea/dialog.css +64 -0
  245. package/registry/styles/rhea/dropdown-menu.css +106 -0
  246. package/registry/styles/rhea/empty.css +54 -0
  247. package/registry/styles/rhea/field.css +120 -0
  248. package/registry/styles/rhea/input.css +57 -0
  249. package/registry/styles/rhea/item.css +133 -0
  250. package/registry/styles/rhea/kbd.css +22 -0
  251. package/registry/styles/rhea/label.css +71 -0
  252. package/registry/styles/rhea/native-select.css +69 -0
  253. package/registry/styles/rhea/popover.css +25 -0
  254. package/registry/styles/rhea/primitives/dialog-shell.css +19 -0
  255. package/registry/styles/rhea/primitives/popover.css +16 -0
  256. package/registry/styles/rhea/radio.css +53 -0
  257. package/registry/styles/rhea/skeleton.css +7 -0
  258. package/registry/styles/rhea/switch.css +87 -0
  259. package/registry/styles/rhea/table.css +87 -0
  260. package/registry/styles/rhea/tabs.css +146 -0
  261. package/registry/styles/rhea/textarea.css +49 -0
  262. package/registry/styles/rhea/tooltip.css +22 -0
  263. package/registry/styles/sera/alert-dialog.css +76 -0
  264. package/registry/styles/sera/alert.css +114 -0
  265. package/registry/styles/sera/badge.css +117 -0
  266. package/registry/styles/sera/button-group.css +75 -0
  267. package/registry/styles/sera/button.css +228 -0
  268. package/registry/styles/sera/card.css +102 -0
  269. package/registry/styles/sera/checkbox.css +59 -0
  270. package/registry/styles/sera/code-block.css +191 -0
  271. package/registry/styles/sera/dialog.css +67 -0
  272. package/registry/styles/sera/dropdown-menu.css +105 -0
  273. package/registry/styles/sera/empty.css +54 -0
  274. package/registry/styles/sera/field.css +120 -0
  275. package/registry/styles/sera/input.css +58 -0
  276. package/registry/styles/sera/item.css +133 -0
  277. package/registry/styles/sera/kbd.css +22 -0
  278. package/registry/styles/sera/label.css +71 -0
  279. package/registry/styles/sera/native-select.css +70 -0
  280. package/registry/styles/sera/popover.css +25 -0
  281. package/registry/styles/sera/primitives/dialog-shell.css +19 -0
  282. package/registry/styles/sera/primitives/popover.css +16 -0
  283. package/registry/styles/sera/radio.css +53 -0
  284. package/registry/styles/sera/skeleton.css +7 -0
  285. package/registry/styles/sera/switch.css +88 -0
  286. package/registry/styles/sera/table.css +88 -0
  287. package/registry/styles/sera/tabs.css +146 -0
  288. package/registry/styles/sera/textarea.css +50 -0
  289. package/registry/styles/sera/tooltip.css +22 -0
  290. package/registry/styles/vega/alert-dialog.css +74 -0
  291. package/registry/styles/vega/alert.css +114 -0
  292. package/registry/styles/vega/badge.css +86 -0
  293. package/registry/styles/vega/button-group.css +75 -0
  294. package/registry/styles/vega/button.css +228 -0
  295. package/registry/styles/vega/card.css +100 -0
  296. package/registry/styles/vega/checkbox.css +60 -0
  297. package/registry/styles/vega/code-block.css +191 -0
  298. package/registry/styles/vega/dialog.css +64 -0
  299. package/registry/styles/vega/dropdown-menu.css +105 -0
  300. package/registry/styles/vega/empty.css +54 -0
  301. package/registry/styles/vega/field.css +120 -0
  302. package/registry/styles/vega/input.css +58 -0
  303. package/registry/styles/vega/item.css +133 -0
  304. package/registry/styles/vega/kbd.css +22 -0
  305. package/registry/styles/vega/label.css +71 -0
  306. package/registry/styles/vega/native-select.css +70 -0
  307. package/registry/styles/vega/popover.css +25 -0
  308. package/registry/styles/vega/primitives/dialog-shell.css +19 -0
  309. package/registry/styles/vega/primitives/popover.css +16 -0
  310. package/registry/styles/vega/radio.css +53 -0
  311. package/registry/styles/vega/skeleton.css +7 -0
  312. package/registry/styles/vega/switch.css +88 -0
  313. package/registry/styles/vega/table.css +87 -0
  314. package/registry/styles/vega/tabs.css +146 -0
  315. package/registry/styles/vega/textarea.css +50 -0
  316. package/registry/styles/vega/tooltip.css +22 -0
  317. package/registry/tokens.css +139 -0
  318. package/registry/utilities.css +14 -0
@@ -0,0 +1,97 @@
1
+ /* Dropdown Menu */
2
+ @layer loseta.components {
3
+ .dropdown-menu {
4
+ position: relative;
5
+ display: inline-flex;
6
+
7
+ [role='menu'] {
8
+ outline-style: none;
9
+
10
+ @media (forced-colors: active) {
11
+ outline: 2px solid transparent;
12
+ outline-offset: 2px;
13
+ }
14
+ }
15
+
16
+ :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']) {
17
+ position: relative;
18
+ display: flex;
19
+ width: 100%;
20
+ cursor: default;
21
+ align-items: center;
22
+ white-space: normal;
23
+ outline-style: none;
24
+
25
+ @media (forced-colors: active) {
26
+ outline: 2px solid transparent;
27
+ outline-offset: 2px;
28
+ }
29
+ -webkit-user-select: none;
30
+ user-select: none;
31
+
32
+ &:disabled {
33
+ pointer-events: none;
34
+ opacity: 50%;
35
+ }
36
+
37
+ &[aria-disabled='true'] {
38
+ pointer-events: none;
39
+ opacity: 50%;
40
+ }
41
+
42
+ &[aria-hidden='true'] {
43
+ display: none;
44
+ }
45
+
46
+ & svg {
47
+ pointer-events: none;
48
+ flex-shrink: 0;
49
+ }
50
+ }
51
+
52
+ [role='menu'] [role='heading'] {
53
+ display: flex;
54
+ }
55
+
56
+ [role='separator'] {
57
+ border-style: solid;
58
+ border-width: 0px;
59
+ }
60
+
61
+ :is([data-slot='shortcut'], kbd:last-child, .kbd:last-child) {
62
+ margin-inline-start: auto;
63
+ flex-shrink: 0;
64
+ text-align: end;
65
+ }
66
+
67
+ [data-slot='shortcut'] {
68
+ padding-inline-start: 2rem;
69
+ }
70
+
71
+ :is(kbd:last-child, .kbd:last-child):not([data-slot='shortcut']) {
72
+ padding-inline-start: 2rem;
73
+ }
74
+
75
+ [data-slot='indicator'] {
76
+ pointer-events: none;
77
+ visibility: hidden;
78
+ }
79
+
80
+ :is([role='menuitemcheckbox'], [role='menuitemradio'])[aria-checked='true'] [data-slot='indicator'] {
81
+ visibility: visible;
82
+ }
83
+
84
+ [data-rtl-flip] {
85
+ &:where(:dir(rtl), [dir='rtl'], [dir='rtl'] *) {
86
+ rotate: 180deg;
87
+ }
88
+ }
89
+
90
+ &:not([data-dropdown-menu-initialized]) :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']) {
91
+ &:not([aria-disabled='true']):not(:disabled):hover {
92
+ background-color: var(--accent);
93
+ color: var(--accent-foreground);
94
+ }
95
+ }
96
+ }
97
+ }
@@ -0,0 +1,64 @@
1
+ /* Empty */
2
+ @layer loseta.components {
3
+ .empty {
4
+ display: flex;
5
+ width: 100%;
6
+ min-width: 0;
7
+ flex: 1;
8
+ flex-direction: column;
9
+ align-items: center;
10
+ justify-content: center;
11
+ text-align: center;
12
+ text-wrap: balance;
13
+
14
+ > header {
15
+ display: flex;
16
+ max-width: 24rem;
17
+ flex-direction: column;
18
+ align-items: center;
19
+ }
20
+
21
+ figure {
22
+ display: flex;
23
+ flex-shrink: 0;
24
+ align-items: center;
25
+ justify-content: center;
26
+
27
+ & svg {
28
+ pointer-events: none;
29
+ flex-shrink: 0;
30
+ }
31
+ }
32
+
33
+ figure:has(img) {
34
+ overflow: hidden;
35
+
36
+ & img {
37
+ width: 100%;
38
+ height: 100%;
39
+ object-fit: cover;
40
+ }
41
+ }
42
+
43
+ > :is(section, footer) {
44
+ display: flex;
45
+ width: 100%;
46
+ max-width: 24rem;
47
+ min-width: 0;
48
+ flex-direction: column;
49
+ align-items: center;
50
+ text-wrap: balance;
51
+ }
52
+
53
+ > header > p {
54
+ > a {
55
+ text-decoration-line: underline;
56
+ text-underline-offset: 4px;
57
+ }
58
+
59
+ > a:hover {
60
+ color: var(--primary);
61
+ }
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,164 @@
1
+ /* Field */
2
+ @layer loseta.components {
3
+ .fieldset {
4
+ display: flex;
5
+ flex-direction: column;
6
+ }
7
+
8
+ .fieldset > :is([role='group'], [role='radiogroup']):not(.field),
9
+ .field > :is(fieldset, [role='group'], [role='radiogroup']):not(.field) {
10
+ container-type: inline-size;
11
+ container-name: field-group;
12
+ display: flex;
13
+ width: 100%;
14
+ flex-direction: column;
15
+ }
16
+
17
+ .field {
18
+ display: flex;
19
+ width: 100%;
20
+ flex-direction: column;
21
+
22
+ &[aria-invalid='true'],
23
+ &:has([aria-invalid='true']) {
24
+ color: var(--destructive);
25
+ }
26
+
27
+ > * {
28
+ width: 100%;
29
+ }
30
+
31
+ > .sr-only {
32
+ width: auto;
33
+ }
34
+
35
+ &[data-orientation='horizontal'] {
36
+ flex-direction: row;
37
+ align-items: center;
38
+
39
+ &:has(> section) {
40
+ align-items: flex-start;
41
+
42
+ > .checkbox,
43
+ > .radio,
44
+ > .switch {
45
+ margin-top: 1px;
46
+ }
47
+
48
+ > section {
49
+ flex: 1;
50
+ }
51
+ }
52
+
53
+ & p {
54
+ text-wrap: balance;
55
+ }
56
+
57
+ > * {
58
+ width: auto;
59
+ }
60
+
61
+ > label {
62
+ flex: auto;
63
+ }
64
+ }
65
+
66
+ &[data-orientation='responsive'] {
67
+ flex-direction: column;
68
+
69
+ @container field-group (width >= 28rem) {
70
+ flex-direction: row;
71
+ align-items: center;
72
+
73
+ &:has(> section) {
74
+ align-items: flex-start;
75
+
76
+ > .checkbox,
77
+ > .radio,
78
+ > .switch {
79
+ margin-top: 1px;
80
+ }
81
+ }
82
+
83
+ > * {
84
+ width: auto;
85
+ }
86
+
87
+ > label {
88
+ flex: auto;
89
+ }
90
+ }
91
+ }
92
+
93
+ section {
94
+ display: flex;
95
+ flex: 1;
96
+ flex-direction: column;
97
+ line-height: 1.375;
98
+ }
99
+
100
+ h2,
101
+ h3 {
102
+ display: flex;
103
+ width: fit-content;
104
+ align-items: center;
105
+ }
106
+
107
+ [role='alert'] {
108
+ font-weight: 400;
109
+
110
+ ul {
111
+ margin-inline-start: 1rem;
112
+ display: flex;
113
+ list-style-type: disc;
114
+ flex-direction: column;
115
+ gap: 0.25rem;
116
+ }
117
+ }
118
+ }
119
+
120
+ .fieldset legend + p,
121
+ .field > p,
122
+ .field section > p {
123
+ line-height: 1.5;
124
+ font-weight: 400;
125
+
126
+ > a {
127
+ text-decoration-line: underline;
128
+ text-underline-offset: 4px;
129
+ }
130
+
131
+ > a:hover {
132
+ color: var(--primary);
133
+ }
134
+ }
135
+
136
+ .field > p,
137
+ .field section > p {
138
+ &:last-child {
139
+ margin-top: 0;
140
+ }
141
+
142
+ &:nth-last-child(2) {
143
+ margin-top: -0.25rem;
144
+ }
145
+ }
146
+
147
+ .field-separator {
148
+ position: relative;
149
+ }
150
+
151
+ .field-separator > hr[role='separator'] {
152
+ position: absolute;
153
+ inset-inline: 0;
154
+ top: 50%;
155
+ }
156
+
157
+ .field-separator > span {
158
+ position: relative;
159
+ margin-inline: auto;
160
+ display: block;
161
+ width: fit-content;
162
+ background-color: var(--background);
163
+ }
164
+ }
@@ -0,0 +1,26 @@
1
+ /* Input */
2
+ @layer loseta.components {
3
+ .input {
4
+ width: 100%;
5
+ min-width: 0;
6
+ outline-style: none;
7
+
8
+ &::file-selector-button {
9
+ display: inline-flex;
10
+ border-style: solid;
11
+ border-width: 0;
12
+ background-color: transparent;
13
+ color: var(--foreground);
14
+ }
15
+
16
+ &::placeholder {
17
+ color: var(--muted-foreground);
18
+ }
19
+
20
+ &:disabled {
21
+ pointer-events: none;
22
+ cursor: not-allowed;
23
+ opacity: 50%;
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,102 @@
1
+ /* Item */
2
+ @layer loseta.components {
3
+ .item-group {
4
+ display: flex;
5
+ width: 100%;
6
+ flex-direction: column;
7
+
8
+ > hr {
9
+ width: 100%;
10
+ flex-shrink: 0;
11
+ border-style: solid;
12
+ border-width: 0px;
13
+ border-top-style: solid;
14
+ border-top-width: 1px;
15
+ }
16
+ }
17
+
18
+ .item {
19
+ display: flex;
20
+ width: 100%;
21
+ flex-wrap: wrap;
22
+ align-items: center;
23
+ border-style: solid;
24
+ border-width: 1px;
25
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
26
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
27
+ transition-duration: 100ms;
28
+ outline-style: none;
29
+
30
+ > figure {
31
+ display: flex;
32
+ flex-shrink: 0;
33
+ align-items: center;
34
+ justify-content: center;
35
+
36
+ & svg {
37
+ pointer-events: none;
38
+ }
39
+ }
40
+
41
+ > figure:has(> img) {
42
+ overflow: hidden;
43
+
44
+ & img {
45
+ width: 100%;
46
+ height: 100%;
47
+ object-fit: cover;
48
+ }
49
+ }
50
+
51
+ > section {
52
+ display: flex;
53
+ flex: 1;
54
+ flex-direction: column;
55
+ }
56
+
57
+ > section + section {
58
+ flex: none;
59
+ }
60
+
61
+ > aside {
62
+ display: flex;
63
+ align-items: center;
64
+ }
65
+
66
+ > :is(header, footer) {
67
+ display: flex;
68
+ flex-basis: 100%;
69
+ align-items: center;
70
+ justify-content: space-between;
71
+ }
72
+
73
+ :is(h2, h3, h4) {
74
+ overflow: hidden;
75
+ -webkit-box-orient: vertical;
76
+ -webkit-line-clamp: 1;
77
+ display: flex;
78
+ width: fit-content;
79
+ align-items: center;
80
+ }
81
+
82
+ p {
83
+ overflow: hidden;
84
+ display: -webkit-box;
85
+ -webkit-box-orient: vertical;
86
+ -webkit-line-clamp: 2;
87
+ text-align: start;
88
+ font-weight: 400;
89
+ color: var(--muted-foreground);
90
+
91
+ > a {
92
+ text-decoration-line: underline;
93
+ text-underline-offset: 4px;
94
+ }
95
+
96
+ > a:hover {
97
+ color: var(--primary);
98
+ }
99
+ }
100
+ }
101
+
102
+ }
@@ -0,0 +1,11 @@
1
+ /* Kbd */
2
+ @layer loseta.components {
3
+ .kbd {
4
+ pointer-events: none;
5
+ display: inline-flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ -webkit-user-select: none;
9
+ user-select: none;
10
+ }
11
+ }
@@ -0,0 +1,31 @@
1
+ /* Label */
2
+ @layer loseta.components {
3
+ .field > label,
4
+ .field > section > label,
5
+ .label {
6
+ display: flex;
7
+ align-items: center;
8
+ width: fit-content;
9
+ -webkit-user-select: none;
10
+ user-select: none;
11
+
12
+ &:has(> :disabled),
13
+ &:has(+ :disabled),
14
+ &:has(~ :disabled) {
15
+ pointer-events: none;
16
+ }
17
+ }
18
+
19
+ .field > label:has(> .field),
20
+ .field > label:has(.radio),
21
+ .field > label:has(.checkbox),
22
+ .field > label:has(.switch),
23
+ label:has(> .field) {
24
+ width: 100%;
25
+ }
26
+
27
+ .field > label:has(> .field),
28
+ label:has(> .field) {
29
+ flex-direction: column;
30
+ }
31
+ }
@@ -0,0 +1,21 @@
1
+ /* Native Select */
2
+ @layer loseta.components {
3
+ .native-select {
4
+ min-width: 0;
5
+ appearance: none;
6
+ outline-style: none;
7
+ -webkit-user-select: none;
8
+ user-select: none;
9
+
10
+ &:disabled {
11
+ cursor: not-allowed;
12
+ opacity: 50%;
13
+ }
14
+
15
+ option,
16
+ optgroup {
17
+ background-color: Canvas;
18
+ color: CanvasText;
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,7 @@
1
+ /* Popover */
2
+ @layer loseta.components {
3
+ .popover {
4
+ position: relative;
5
+ display: inline-flex;
6
+ }
7
+ }
@@ -0,0 +1,25 @@
1
+ /* Radio */
2
+ @layer loseta.components {
3
+ .radio {
4
+ position: relative;
5
+ flex-shrink: 0;
6
+ appearance: none;
7
+ border-style: solid;
8
+ border-width: 1px;
9
+ outline-style: none;
10
+
11
+ &:disabled {
12
+ cursor: not-allowed;
13
+ opacity: 50%;
14
+ }
15
+
16
+ &:checked:before {
17
+ position: absolute;
18
+ top: 50%;
19
+ left: 50%;
20
+ translate: -50% -50%;
21
+ border-radius: var(--radius-full);
22
+ content: '';
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,11 @@
1
+ /* Skeleton */
2
+ @layer loseta.components {
3
+ .skeleton {
4
+ animation: loseta-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
5
+ }
6
+ }
7
+ @keyframes loseta-pulse {
8
+ 50% {
9
+ opacity: 0.5;
10
+ }
11
+ }
@@ -0,0 +1,27 @@
1
+ /* Switch */
2
+ @layer loseta.components {
3
+ .switch {
4
+ display: inline-flex;
5
+ flex-shrink: 0;
6
+ appearance: none;
7
+ align-items: center;
8
+ transition-property: all;
9
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
10
+ transition-duration: 150ms;
11
+ outline-style: none;
12
+
13
+ &:disabled {
14
+ cursor: not-allowed;
15
+ opacity: 50%;
16
+ }
17
+ &::before {
18
+ pointer-events: none;
19
+ display: block;
20
+ box-shadow: 0 0 0 0 currentcolor;
21
+ transition-property: transform, translate, scale, rotate;
22
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
23
+ transition-duration: 150ms;
24
+ content: '';
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,73 @@
1
+ /* Tables */
2
+ @layer loseta.components {
3
+ .table-container {
4
+ position: relative;
5
+ width: 100%;
6
+ overflow-x: auto;
7
+ }
8
+
9
+ .table {
10
+ width: 100%;
11
+ caption-side: bottom;
12
+
13
+ thead tr {
14
+ border-bottom-style: solid;
15
+ border-bottom-width: 1px;
16
+ }
17
+
18
+ tbody tr:last-child {
19
+ border-style: solid;
20
+ border-width: 0px;
21
+ }
22
+
23
+ tfoot {
24
+ border-top-style: solid;
25
+ border-top-width: 1px;
26
+ font-weight: 500;
27
+
28
+ > tr:last-child {
29
+ border-bottom-style: solid;
30
+ border-bottom-width: 0px;
31
+ }
32
+ }
33
+
34
+ tr {
35
+ border-bottom-style: solid;
36
+ border-bottom-width: 1px;
37
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
38
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
39
+ transition-duration: 150ms;
40
+
41
+ &[aria-selected='true'] {
42
+ background-color: var(--muted);
43
+ }
44
+ }
45
+
46
+ th {
47
+ vertical-align: middle;
48
+ font-weight: 500;
49
+ white-space: nowrap;
50
+
51
+ &:has([role='checkbox']) {
52
+ padding-inline-end: 0;
53
+ }
54
+
55
+ > [role='checkbox'] {
56
+ translate: 0 2px;
57
+ }
58
+ }
59
+
60
+ td {
61
+ vertical-align: middle;
62
+ white-space: nowrap;
63
+
64
+ &:has([role='checkbox']) {
65
+ padding-inline-end: 0;
66
+ }
67
+
68
+ > [role='checkbox'] {
69
+ translate: 0 2px;
70
+ }
71
+ }
72
+ }
73
+ }