winduum 1.2.1 → 2.0.0-next.10

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 (332) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/tailwind.css +1 -1
  3. package/package.json +15 -15
  4. package/plugin/index.cjs +81 -43
  5. package/plugin/index.js +73 -22
  6. package/plugin/utilities/common.js +4 -4
  7. package/plugin/utilities/dot.js +4 -5
  8. package/src/base/breakpoints.css +10 -10
  9. package/src/base/config/font.css +22 -9
  10. package/src/base/config/rounded.css +12 -12
  11. package/src/base/config/transition.css +14 -14
  12. package/src/base/config/z.css +5 -5
  13. package/src/base/config.css +0 -1
  14. package/src/base/defaults.css +10 -12
  15. package/src/base/keyframes.css +13 -1
  16. package/src/base/reset.css +2 -7
  17. package/src/base/theme/dark-rgb.css +1 -1
  18. package/src/base/theme/dark.css +1 -1
  19. package/src/base/theme/default-rgb.css +6 -6
  20. package/src/base/theme/default.css +6 -6
  21. package/src/components/badge/bordered.css +6 -0
  22. package/src/components/badge/circle.css +5 -0
  23. package/src/components/badge/default.css +42 -0
  24. package/src/{ui → components}/badge/index.css +1 -1
  25. package/src/components/badge/lg.css +3 -0
  26. package/src/components/badge/muted.css +4 -0
  27. package/src/components/badge/props/default.css +9 -0
  28. package/src/components/badge/readme.md +37 -0
  29. package/src/components/badge/sm.css +4 -0
  30. package/src/components/badge/square.css +4 -0
  31. package/src/components/breadcrumb/default.css +7 -7
  32. package/src/components/breadcrumb/index.css +1 -1
  33. package/src/components/breadcrumb/props/default.css +5 -0
  34. package/src/components/breadcrumb/readme.md +1 -1
  35. package/src/components/button/bordered.css +19 -0
  36. package/src/components/button/circle.css +6 -0
  37. package/src/components/button/default.css +63 -0
  38. package/src/components/button/fill.css +6 -0
  39. package/src/components/button/ghosted.css +14 -0
  40. package/src/{ui/btn → components/button}/index.css +2 -7
  41. package/src/components/button/interactive.css +56 -0
  42. package/src/components/button/lg.css +4 -0
  43. package/src/components/button/muted.css +14 -0
  44. package/src/components/button/props/default.css +11 -0
  45. package/src/components/button/props/interactive.css +9 -0
  46. package/src/components/button/raised.css +6 -0
  47. package/src/components/button/readme.md +46 -0
  48. package/src/components/button/sm.css +4 -0
  49. package/src/components/button/square.css +5 -0
  50. package/src/components/card/default.css +4 -6
  51. package/src/components/card/index.css +1 -1
  52. package/src/components/card/props/default.css +6 -0
  53. package/src/components/card/readme.md +1 -1
  54. package/src/components/carousel/content.css +2 -2
  55. package/src/components/carousel/default.css +1 -1
  56. package/src/components/carousel/index.d.ts +3 -3
  57. package/src/components/carousel/index.js +13 -11
  58. package/src/components/check/default.css +67 -0
  59. package/src/{ui/switch → components/check}/index.css +1 -1
  60. package/src/components/check/interactive.css +56 -0
  61. package/src/components/check/invalid.css +9 -0
  62. package/src/components/check/props/default.css +13 -0
  63. package/src/{ui/color → components/check}/readme.md +8 -9
  64. package/src/components/color/default.css +36 -0
  65. package/src/components/color/index.css +3 -0
  66. package/src/components/color/interactive.css +36 -0
  67. package/src/components/color/props/default.css +7 -0
  68. package/src/{ui/title → components/color}/readme.md +7 -8
  69. package/src/components/compare/default.css +17 -18
  70. package/src/components/compare/index.js +2 -2
  71. package/src/components/control/color.css +24 -0
  72. package/src/components/control/default.css +74 -0
  73. package/src/components/control/file.css +27 -0
  74. package/src/components/control/floating-interactive.css +13 -0
  75. package/src/components/control/floating.css +36 -0
  76. package/src/components/control/icon.css +32 -0
  77. package/src/{ui → components}/control/index.css +5 -6
  78. package/src/components/control/interactive.css +19 -0
  79. package/src/components/control/invalid.css +10 -0
  80. package/src/components/control/props/color.css +5 -0
  81. package/src/components/control/props/default.css +16 -0
  82. package/src/components/control/props/floating.css +4 -0
  83. package/src/components/control/props/icon.css +4 -0
  84. package/src/components/control/props/select.css +4 -0
  85. package/src/components/control/readme.md +43 -0
  86. package/src/{ui → components}/control/select-multiple.css +2 -2
  87. package/src/components/control/select.css +23 -0
  88. package/src/components/dialog/content.css +7 -7
  89. package/src/components/dialog/default.css +14 -12
  90. package/src/components/dialog/index.css +2 -2
  91. package/src/components/dialog/index.d.ts +4 -19
  92. package/src/components/dialog/index.js +24 -83
  93. package/src/components/dialog/props/content.css +5 -0
  94. package/src/components/dialog/props/default.css +6 -0
  95. package/src/components/dialog/readme.md +2 -2
  96. package/src/components/drawer/content.css +4 -4
  97. package/src/components/drawer/default.css +9 -6
  98. package/src/components/drawer/index.css +2 -2
  99. package/src/components/drawer/index.js +3 -3
  100. package/src/components/drawer/props/content.css +7 -0
  101. package/src/components/drawer/props/default.css +3 -0
  102. package/src/components/drawer/readme.md +2 -2
  103. package/src/components/field/default.css +6 -6
  104. package/src/components/form/index.js +5 -5
  105. package/src/components/group/default.css +42 -0
  106. package/src/{ui → components}/group/readme.md +6 -6
  107. package/src/{ui → components}/group/vertical.css +2 -2
  108. package/src/components/heading/default.css +8 -0
  109. package/src/{ui → components}/heading/index.css +1 -1
  110. package/src/components/heading/lg.css +3 -0
  111. package/src/components/heading/props/default.css +6 -0
  112. package/src/{ui/check → components/heading}/readme.md +8 -9
  113. package/src/components/heading/sm.css +3 -0
  114. package/src/{ui → components}/image/avatar.css +3 -3
  115. package/src/{ui → components}/image/default.css +2 -2
  116. package/src/{ui/notice → components/image}/readme.md +6 -6
  117. package/src/components/index.css +18 -0
  118. package/src/components/info/default.css +8 -0
  119. package/src/components/info/index.css +2 -0
  120. package/src/components/info/props/default.css +4 -0
  121. package/src/{ui/rating → components/info}/readme.md +6 -7
  122. package/src/components/label/default.css +8 -0
  123. package/src/components/label/index.css +2 -0
  124. package/src/components/label/props/default.css +4 -0
  125. package/src/{ui → components}/label/readme.md +6 -6
  126. package/src/components/link/default.css +8 -0
  127. package/src/components/link/index.css +3 -0
  128. package/src/components/link/interactive.css +9 -0
  129. package/src/components/link/props/default.css +4 -0
  130. package/src/{ui → components}/link/readme.md +7 -7
  131. package/src/components/notice/default.css +21 -0
  132. package/src/components/notice/index.css +2 -0
  133. package/src/components/notice/props/default.css +8 -0
  134. package/src/{ui/image → components/notice}/readme.md +6 -6
  135. package/src/components/pagination/default.css +2 -2
  136. package/src/components/popover/content.css +18 -19
  137. package/src/components/popover/default.css +1 -1
  138. package/src/components/popover/index.css +1 -1
  139. package/src/components/popover/index.d.ts +5 -1
  140. package/src/components/popover/index.js +11 -9
  141. package/src/components/popover/props/content.css +8 -0
  142. package/src/components/popover/readme.md +1 -1
  143. package/src/components/progress/default.css +46 -0
  144. package/src/{ui → components}/progress/index.css +1 -1
  145. package/src/components/progress/lg.css +3 -0
  146. package/src/{ui → components}/progress/meter.css +7 -7
  147. package/src/components/progress/props/default.css +6 -0
  148. package/src/components/progress/readme.md +33 -0
  149. package/src/components/progress/sm.css +3 -0
  150. package/src/components/range/default.css +99 -0
  151. package/src/{ui → components}/range/index.css +1 -1
  152. package/src/{ui → components}/range/index.js +2 -2
  153. package/src/components/range/multi.css +22 -0
  154. package/src/components/range/props/default.css +9 -0
  155. package/src/{ui → components}/range/readme.md +8 -8
  156. package/src/{ui → components}/range/vertical.css +3 -3
  157. package/src/{ui → components}/rating/default.css +11 -11
  158. package/src/{ui → components}/rating/index.css +1 -1
  159. package/src/components/rating/invalid.css +5 -0
  160. package/src/components/rating/props/default.css +8 -0
  161. package/src/components/rating/readme.md +31 -0
  162. package/src/components/switch/default.css +43 -0
  163. package/src/{ui/check → components/switch}/index.css +1 -2
  164. package/src/components/switch/interactive.css +43 -0
  165. package/src/components/switch/invalid.css +6 -0
  166. package/src/components/switch/props/default.css +17 -0
  167. package/src/{ui/progress → components/switch}/readme.md +8 -9
  168. package/src/components/table/default.css +11 -11
  169. package/src/components/table/index.css +1 -2
  170. package/src/components/table/interactive.css +14 -14
  171. package/src/components/table/props/default.css +8 -0
  172. package/src/components/table/readme.md +1 -2
  173. package/src/components/tabs/index.css +1 -1
  174. package/src/components/tabs/list.css +8 -0
  175. package/src/components/tabs/readme.md +1 -1
  176. package/src/components/text/default.css +223 -0
  177. package/src/components/text/index.css +2 -0
  178. package/src/components/text/props/default.css +9 -0
  179. package/src/{ui/info → components/text}/readme.md +6 -6
  180. package/src/components/title/default.css +8 -0
  181. package/src/{ui → components}/title/index.css +1 -1
  182. package/src/components/title/lg.css +3 -0
  183. package/src/components/title/props/default.css +5 -0
  184. package/src/{ui/heading → components/title}/readme.md +9 -8
  185. package/src/components/title/sm.css +3 -0
  186. package/src/components/toast/content.css +16 -15
  187. package/src/components/toast/default.css +8 -8
  188. package/src/components/toast/index.css +2 -2
  189. package/src/components/toast/props/content.css +7 -0
  190. package/src/components/toast/props/default.css +4 -0
  191. package/src/components/toast/readme.md +2 -2
  192. package/src/components/toaster/default.css +4 -4
  193. package/src/components/toaster/index.css +1 -1
  194. package/src/components/toaster/index.js +8 -8
  195. package/src/components/toaster/props/default.css +4 -0
  196. package/src/components/toaster/readme.md +1 -1
  197. package/src/components/tooltip/default.css +15 -15
  198. package/src/components/tooltip/index.css +1 -1
  199. package/src/components/tooltip/props/default.css +12 -0
  200. package/src/components/tooltip/readme.md +2 -2
  201. package/src/main.css +0 -1
  202. package/src/test.css +7 -0
  203. package/src/utilities/common.css +2 -6
  204. package/src/utilities/container/default.css +3 -4
  205. package/src/utilities/container/index.css +1 -1
  206. package/src/utilities/divider.css +13 -4
  207. package/src/utilities/ripple/index.css +9 -6
  208. package/src/utilities/skeleton/default.css +8 -1
  209. package/src/utilities/skeleton/index.css +1 -1
  210. package/src/utilities/skeleton/props/default.css +5 -0
  211. package/src/utilities/swap/default.css +6 -6
  212. package/src/utilities/underline.css +3 -3
  213. package/types/index.d.ts +39 -24
  214. package/types/index.d.ts.map +3 -8
  215. package/plugin/utilities/flex.js +0 -12
  216. package/src/base/config/text.css +0 -15
  217. package/src/components/breadcrumb/default-props.css +0 -5
  218. package/src/components/card/default-props.css +0 -4
  219. package/src/components/dialog/content-props.css +0 -5
  220. package/src/components/dialog/default-props.css +0 -6
  221. package/src/components/drawer/content-props.css +0 -6
  222. package/src/components/drawer/default-props.css +0 -3
  223. package/src/components/popover/content-props.css +0 -8
  224. package/src/components/table/default-props.css +0 -8
  225. package/src/components/table/interactive-props.css +0 -4
  226. package/src/components/tabs/default.css +0 -8
  227. package/src/components/toast/content-props.css +0 -7
  228. package/src/components/toast/default-props.css +0 -4
  229. package/src/components/toaster/default-props.css +0 -4
  230. package/src/components/tooltip/default-props.css +0 -12
  231. package/src/ui/badge/bordered.css +0 -16
  232. package/src/ui/badge/circle.css +0 -5
  233. package/src/ui/badge/default-props.css +0 -8
  234. package/src/ui/badge/default.css +0 -26
  235. package/src/ui/badge/lg.css +0 -3
  236. package/src/ui/badge/muted.css +0 -4
  237. package/src/ui/badge/readme.md +0 -37
  238. package/src/ui/badge/sm.css +0 -4
  239. package/src/ui/badge/square.css +0 -4
  240. package/src/ui/btn/bordered.css +0 -21
  241. package/src/ui/btn/circle.css +0 -6
  242. package/src/ui/btn/default-props.css +0 -10
  243. package/src/ui/btn/default.css +0 -49
  244. package/src/ui/btn/fill.css +0 -6
  245. package/src/ui/btn/ghosted.css +0 -9
  246. package/src/ui/btn/gradient-bordered.css +0 -24
  247. package/src/ui/btn/gradient.css +0 -10
  248. package/src/ui/btn/interactive-props.css +0 -9
  249. package/src/ui/btn/interactive.css +0 -53
  250. package/src/ui/btn/lg.css +0 -4
  251. package/src/ui/btn/loading-props.css +0 -4
  252. package/src/ui/btn/loading.css +0 -24
  253. package/src/ui/btn/muted.css +0 -9
  254. package/src/ui/btn/raised.css +0 -7
  255. package/src/ui/btn/readme.md +0 -51
  256. package/src/ui/btn/sm.css +0 -4
  257. package/src/ui/btn/square.css +0 -5
  258. package/src/ui/btn/wide.css +0 -3
  259. package/src/ui/check/default-props.css +0 -13
  260. package/src/ui/check/default.css +0 -74
  261. package/src/ui/check/interactive-props.css +0 -3
  262. package/src/ui/check/interactive.css +0 -50
  263. package/src/ui/check/invalid.css +0 -8
  264. package/src/ui/color/default-props.css +0 -11
  265. package/src/ui/color/default.css +0 -48
  266. package/src/ui/color/index.css +0 -4
  267. package/src/ui/color/interactive-props.css +0 -3
  268. package/src/ui/color/interactive.css +0 -30
  269. package/src/ui/control/color-props.css +0 -5
  270. package/src/ui/control/color.css +0 -24
  271. package/src/ui/control/default-props.css +0 -16
  272. package/src/ui/control/default.css +0 -77
  273. package/src/ui/control/file.css +0 -25
  274. package/src/ui/control/floating-interactive.css +0 -13
  275. package/src/ui/control/floating-props.css +0 -4
  276. package/src/ui/control/floating.css +0 -36
  277. package/src/ui/control/icon-props.css +0 -4
  278. package/src/ui/control/icon.css +0 -32
  279. package/src/ui/control/interactive-props.css +0 -3
  280. package/src/ui/control/interactive.css +0 -19
  281. package/src/ui/control/invalid.css +0 -10
  282. package/src/ui/control/readme.md +0 -44
  283. package/src/ui/control/select-props.css +0 -4
  284. package/src/ui/control/select.css +0 -23
  285. package/src/ui/group/default.css +0 -42
  286. package/src/ui/heading/default-props.css +0 -6
  287. package/src/ui/heading/default.css +0 -8
  288. package/src/ui/heading/lg.css +0 -3
  289. package/src/ui/heading/sm.css +0 -3
  290. package/src/ui/index.css +0 -18
  291. package/src/ui/info/default-props.css +0 -4
  292. package/src/ui/info/default.css +0 -8
  293. package/src/ui/info/index.css +0 -2
  294. package/src/ui/label/default-props.css +0 -4
  295. package/src/ui/label/default.css +0 -8
  296. package/src/ui/label/index.css +0 -2
  297. package/src/ui/link/default-props.css +0 -4
  298. package/src/ui/link/default.css +0 -8
  299. package/src/ui/link/index.css +0 -4
  300. package/src/ui/link/interactive-props.css +0 -5
  301. package/src/ui/link/interactive.css +0 -16
  302. package/src/ui/notice/default-props.css +0 -8
  303. package/src/ui/notice/default.css +0 -25
  304. package/src/ui/notice/index.css +0 -2
  305. package/src/ui/progress/default-props.css +0 -4
  306. package/src/ui/progress/default.css +0 -47
  307. package/src/ui/progress/lg.css +0 -3
  308. package/src/ui/progress/sm.css +0 -3
  309. package/src/ui/range/default-props.css +0 -10
  310. package/src/ui/range/default.css +0 -101
  311. package/src/ui/range/multi.css +0 -22
  312. package/src/ui/rating/default-props.css +0 -5
  313. package/src/ui/rating/invalid.css +0 -5
  314. package/src/ui/switch/default-props.css +0 -17
  315. package/src/ui/switch/default.css +0 -46
  316. package/src/ui/switch/interactive-props.css +0 -3
  317. package/src/ui/switch/interactive.css +0 -39
  318. package/src/ui/switch/invalid.css +0 -6
  319. package/src/ui/switch/readme.md +0 -32
  320. package/src/ui/text/default-props.css +0 -9
  321. package/src/ui/text/default.css +0 -193
  322. package/src/ui/text/index.css +0 -2
  323. package/src/ui/text/readme.md +0 -30
  324. package/src/ui/title/default-props.css +0 -5
  325. package/src/ui/title/default.css +0 -8
  326. package/src/ui/title/lg.css +0 -3
  327. package/src/ui/title/sm.css +0 -3
  328. package/src/utilities/skeleton/default-props.css +0 -5
  329. /package/src/{ui → components}/group/index.css +0 -0
  330. /package/src/{ui → components}/image/index.css +0 -0
  331. /package/src/{ui → components}/range/index.d.ts +0 -0
  332. /package/src/utilities/container/{default-props.css → props/default.css} +0 -0
@@ -0,0 +1,43 @@
1
+ .x-switch {
2
+ :where(input) {
3
+ transition-property: var(--default-transition-property);
4
+ transition-timing-function: var(--transition-timing-function-in-out);
5
+ transition-duration: var(--default-transition-duration);
6
+
7
+ &:where(:required) {
8
+ & + *::after {
9
+ color: var(--x-switch-required-color, var(--color-error));
10
+ content: " *";
11
+ }
12
+ }
13
+
14
+ &:enabled:focus {
15
+ --x-switch-outline-offset: var(--x-switch-focus-outline-offset);
16
+ --x-switch-outline-color-opacity: var(--x-switch-focus-outline-color-opacity, 40%);
17
+ }
18
+
19
+ &:disabled {
20
+ --x-switch-background-color: var(--x-switch-disabled-background-color, currentColor);
21
+ --x-switch-background-color-opacity: var(--x-switch-disabled-background-color-opacity, 15%);
22
+ --x-switch-outline-color: var(--x-switch-disabled-outline-color, currentColor);
23
+ --x-switch-outline-color-opacity: var(--x-check-disabled-outline-color-opacity, 5%);
24
+
25
+ cursor: not-allowed;
26
+ }
27
+
28
+ &:checked {
29
+ --x-switch-outline-color: var(--color-accent);
30
+ --x-switch-background-color: var(--color-accent);
31
+
32
+ &::before {
33
+ margin-inline-start: calc(100% - var(--x-switch-icon-size));
34
+ }
35
+ }
36
+
37
+ &:indeterminate {
38
+ &::before {
39
+ margin-inline-start: calc(50% - var(--x-switch-icon-size) / 2);
40
+ }
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,6 @@
1
+ .x-switch {
2
+ &.invalid, :user-invalid, .validated & :invalid {
3
+ --x-switch-outline-color: var(--x-switch-invalid-outline-color, var(--color-error));
4
+ --x-switch-background-color: var(--x-switch-invalid-background-color, var(--color-error));
5
+ }
6
+ }
@@ -0,0 +1,17 @@
1
+ :root, :host {
2
+ --x-switch-inline-size: 3rem;
3
+ --x-switch-block-size: 1.5rem;
4
+ --x-switch-icon-size: 1.125rem;
5
+ --x-switch-font-weight: var(--font-weight-normal);
6
+ --x-switch-font-size: var(--font-size-sm);
7
+ --x-switch-line-height: calc(1em + 0.25rem);
8
+ --x-switch-gap: 0.75rem;
9
+ --x-switch-border-radius: var(--radius-full);
10
+ --x-switch-background-color: currentColor;
11
+ --x-switch-outline-width: 2px;
12
+ --x-switch-outline-color: currentColor;
13
+
14
+ &.dark {
15
+ --x-switch-background-color: var(--color-body-tertiary);
16
+ }
17
+ }
@@ -1,4 +1,4 @@
1
- # [Progress](https://winduum.dev/docs/ui/progress.html)
1
+ # [Switch](https://winduum.dev/docs/components/switch.html)
2
2
 
3
3
  ## Installation
4
4
  ```shell
@@ -8,17 +8,16 @@ Learn more how to set up Winduum [here](https://winduum.dev/docs/).
8
8
  Include CSS either globally or to your component _([you can't use TailwindCSS layers in per-component CSS](https://tailwindcss.com/docs/adding-custom-styles#layers-and-per-component-css))_
9
9
 
10
10
  ```css
11
- @import "winduum/src/ui/progress/index.css" layer(components);
11
+ @import "winduum/src/components/switch/index.css" layer(components);
12
12
  ```
13
13
 
14
14
  or modular (you can use your own props or CSS)
15
15
 
16
16
  ```css
17
- @import "winduum/src/ui/progress/default-props.css" layer(components);
18
- @import "winduum/src/ui/progress/default.css" layer(components);
19
- @import "winduum/src/ui/progress/meter.css" layer(components);
20
- @import "winduum/src/ui/progress/sm.css" layer(components);
21
- @import "winduum/src/ui/progress/lg.css" layer(components);
17
+ @import "winduum/src/components/switch/props/default.css" layer(components);
18
+ @import "winduum/src/components/switch/default.css" layer(components);
19
+ @import "winduum/src/components/switch/interactive.css" layer(components);
20
+ @import "winduum/src/components/switch/invalid.css" layer(components);
22
21
  ```
23
22
 
24
23
  ### Local imports
@@ -26,8 +25,8 @@ By default, imports are directly from `npm` so you can leverage updates.
26
25
  You can also copy and paste the code from this directory to your project and remap the imports to local.
27
26
 
28
27
  ```css
29
- @import "@/components/ui/progress/assets/index.css" layer(components);
28
+ @import "@/components/switch/assets/index.css" layer(components);
30
29
  ```
31
30
 
32
31
  ### Docs
33
- Visit [docs](https://winduum.dev/docs/ui/progress.html) to learn more about usage examples.
32
+ Visit [docs](https://winduum.dev/docs/components/switch.html) to learn more about usage examples.
@@ -1,7 +1,7 @@
1
- .c-table {
2
- max-width: 100%;
3
- border-radius: var(--c-table-border-radius);
4
- background-color: var(--color-body-primary);
1
+ .x-table {
2
+ border-radius: var(--x-table-border-radius);
3
+ background-color: var(--x-table-background-color, var(--color-body-primary));
4
+ max-inline-size: 100%;
5
5
  overflow: auto;
6
6
 
7
7
  :where(table) {
@@ -11,22 +11,22 @@
11
11
  }
12
12
 
13
13
  :where(thead tr:not(:first-child), tbody tr, tfoot tr) {
14
- border-block-start: var(--c-table-cell-border-block-width) solid var(--color-body-tertiary);
14
+ border-block-start: var(--x-table-cell-border-block-width) solid var(--x-table-border-color, var(--color-body-tertiary));
15
15
  }
16
16
 
17
17
  :where(td, th) {
18
- padding: var(--c-table-cell-spacing-y) var(--c-table-cell-spacing-x);
19
- height: var(--c-table-cell-height);
20
- border-color: var(--color-body-tertiary);
21
- border-inline-width: var(--c-table-cell-border-inline-width, 0);
18
+ padding: var(--x-table-cell-spacing-y) var(--x-table-cell-spacing-x);
19
+ block-size: var(--x-table-cell-block-size);
20
+ border-color: var(--x-table-border-color, var(--color-body-tertiary));
21
+ border-inline-width: var(--x-table-cell-border-inline-width, 0);
22
22
 
23
23
  &:first-child {
24
- padding-inline-start: var(--c-table-px);
24
+ padding-inline-start: var(--x-table-padding-inline);
25
25
  border-inline-start: 0;
26
26
  }
27
27
 
28
28
  &:last-child {
29
- padding-inline-end: var(--c-table-px);
29
+ padding-inline-end: var(--x-table-padding-inline);
30
30
  border-inline-end: 0;
31
31
  }
32
32
  }
@@ -1,4 +1,3 @@
1
+ @import "props/default.css";
1
2
  @import "default.css";
2
- @import "default-props.css";
3
3
  @import "interactive.css";
4
- @import "interactive-props.css";
@@ -1,14 +1,12 @@
1
- .c-table {
2
- --c-table-outline-accent-color: var(--color-accent);
3
-
1
+ .x-table {
4
2
  :where(tbody:first-child, tfoot:first-child) {
5
3
  :where(tr:first-child) {
6
4
  &, :where(th,td):where(:first-child) {
7
- border-start-start-radius: var(--c-table-border-radius);
5
+ border-start-start-radius: var(--x-table-border-radius);
8
6
  }
9
7
 
10
8
  &, :where(th,td):where(:last-child) {
11
- border-start-end-radius: var(--c-table-border-radius);
9
+ border-start-end-radius: var(--x-table-border-radius);
12
10
  }
13
11
  }
14
12
  }
@@ -16,26 +14,28 @@
16
14
  :where(tbody:last-child, tfoot:last-child) {
17
15
  :where(tr:last-child) {
18
16
  &, :where(th,td):where(:first-child) {
19
- border-end-start-radius: var(--c-table-border-radius);
17
+ border-end-start-radius: var(--x-table-border-radius);
20
18
  }
21
19
 
22
20
  &, :where(th,td):where(:last-child) {
23
- border-end-end-radius: var(--c-table-border-radius);
21
+ border-end-end-radius: var(--x-table-border-radius);
24
22
  }
25
23
  }
26
24
  }
27
25
 
28
26
  :where(tr, th, td):where([tabindex="0"]), :where(.outline) {
29
27
  transition: var(--transition-all);
30
- outline: var(--c-table-outline-width) solid transparent;
31
- outline-offset: calc(var(--c-table-outline-width) * -1);
28
+ outline: var(--x-table-outline-width, 1px) solid transparent;
29
+ outline-offset: calc(var(--x-table-outline-width, 1px) * -1);
32
30
 
33
31
  &:is(:hover, :focus-visible, .active) {
34
- --tw-bg-opacity: var(--c-table-outline-bg-opacity);
35
- --tw-bg-mix: transparent;
36
-
37
- background-color: color-mix(in var(--space), var(--c-table-outline-accent-color) calc(var(--tw-bg-opacity) * 100%), var(--tw-bg-mix));
38
- outline-color: var(--c-table-outline-accent-color);
32
+ background-color:
33
+ color-mix(
34
+ in var(--x-table-outline-background-color-space, srgb),
35
+ var(--x-table-outline-accent-color, var(--color-accent)) var(--x-table-outline-background-color-opacity, 5%),
36
+ var(--x-table-outline-background-color-mix, transparent)
37
+ );
38
+ outline-color: var(--x-table-outline-accent-color, var(--color-accent));
39
39
  }
40
40
  }
41
41
  }
@@ -0,0 +1,8 @@
1
+ :root, :host {
2
+ --x-table-border-radius: var(--radius);
3
+ --x-table-padding-inline: 1rem;
4
+ --x-table-cell-spacing-x: 0.625rem;
5
+ --x-table-cell-spacing-y: 0.875rem;
6
+ --x-table-cell-block-size: auto;
7
+ --x-table-cell-border-block-width: 1px;
8
+ }
@@ -14,10 +14,9 @@ Include CSS either globally or to your component _([you can't use TailwindCSS la
14
14
  or modular (you can use your own props or CSS)
15
15
 
16
16
  ```css
17
+ @import "winduum/src/components/table/props/default.css";
17
18
  @import "winduum/src/components/table/default.css";
18
- @import "winduum/src/components/table/default-props.css";
19
19
  @import "winduum/src/components/table/interactive.css";
20
- @import "winduum/src/components/table/interactive-props.css";
21
20
  ```
22
21
 
23
22
  ### Local imports
@@ -1 +1 @@
1
- @import "default.css";
1
+ @import "list.css";
@@ -0,0 +1,8 @@
1
+ .x-tabs-list {
2
+ background-color: var(--x-tabs-list-background-color, var(--color-body-secondary));
3
+ gap: var(--x-tabs-list-gap, var(--spacing-xs));
4
+ padding: var(--x-tabs-list-padding, var(--spacing-xs));
5
+ border-radius: var(--x-tabs-list-border-radius, var(--radius));
6
+ display: flex;
7
+ inline-size: max-content;
8
+ }
@@ -14,7 +14,7 @@ Include CSS either globally or to your component _([you can't use TailwindCSS la
14
14
  or modular (you can use your own props or CSS)
15
15
 
16
16
  ```css
17
- @import "winduum/src/components/tabs/default.css" layer(components);
17
+ @import "winduum/src/components/tabs/list.css" layer(components);
18
18
  ```
19
19
 
20
20
 
@@ -0,0 +1,223 @@
1
+ .x-text {
2
+ font-family: var(--x-text-font-family);
3
+ font-weight: var(--x-text-font-weight);
4
+ font-size: var(--x-text-font-size);
5
+ line-height: var(--x-text-line-height);
6
+ letter-spacing: var(--x-text-letter-spacing);
7
+ text-wrap: pretty;
8
+
9
+ > :is(*:first-child) {
10
+ margin-block-start: 0;
11
+ }
12
+
13
+ > :is(*:last-child) {
14
+ margin-block-end: 0;
15
+ }
16
+
17
+ :where(b, strong) {
18
+ font-weight: var(--x-text-content-bold);
19
+ }
20
+
21
+ :where(em) {
22
+ font-style: italic;
23
+ }
24
+
25
+ :where(img) {
26
+ display: block;
27
+ height: auto;
28
+ }
29
+
30
+ :where(p) {
31
+ margin-block: var(--x-text-p-margin-block, var(--x-text-content-margin-block));
32
+
33
+ &:empty {
34
+ line-height: 0;
35
+ margin: 0;
36
+
37
+ &::after {
38
+ content: "\00a0";
39
+ }
40
+ }
41
+ }
42
+
43
+ :where(hr) {
44
+ margin-block: var(--x-text-hr-margin-block);
45
+ background-color:
46
+ color-mix(
47
+ in var(--x-text-hr-background-color-space, srgb),
48
+ var(--x-text-hr-background-color, currentColor) var(--x-text-hr-background-color-opacity, 10%),
49
+ var(--x-text-hr-background-color-mix, transparent)
50
+ );
51
+ }
52
+
53
+ :where(a) {
54
+ color: var(--x-text-link-color, var(--color-accent));
55
+ text-decoration: var(--x-text-link-text-decoration, underline);
56
+ transition: var(--transition-color);
57
+
58
+ &:hover {
59
+ color:
60
+ color-mix(
61
+ in var(--x-text-link-hover-color-space, srgb),
62
+ var(--x-text-link-hover-color, var(--color-accent)) var(--x-text-link-hover-color-opacity, 75%),
63
+ var(--x-text-link-hover-color-mix, transparent)
64
+ );
65
+ }
66
+
67
+ &:focus-visible {
68
+ color:
69
+ color-mix(
70
+ in var(--x-text-link-focus-color-space, srgb),
71
+ var(--x-text-link-focus-color, var(--color-accent)) var(--x-text-link-focus-color-opacity, 75%),
72
+ var(--x-text-link-focus-color-mix, transparent)
73
+ );
74
+ }
75
+ }
76
+
77
+ :where(h1, h2, h3, h4, h5, h6) {
78
+ font-family: var(--x-text-heading-font-family);
79
+ font-weight: var(--x-text-heading-font-weight, var(--x-text-content-bold));
80
+ font-size: var(--x-text-heading-font-size);
81
+ line-height: var(--x-text-heading-line-height);
82
+ letter-spacing: var(--x-text-heading-letter-spacing);
83
+ margin-block: var(--x-text-heading-margin-block);
84
+ color: var(--x-text-heading-color);
85
+ text-wrap: balance;
86
+ }
87
+
88
+ :where(h1) {
89
+ --x-text-heading-font-size: var(--x-text-heading-1-font-size, var(--font-size-4xl));
90
+ }
91
+
92
+ :where(h2) {
93
+ --x-text-heading-font-size: var(--x-text-heading-2-font-size, var(--font-size-3xl));
94
+ }
95
+
96
+ :where(h3) {
97
+ --x-text-heading-font-size: var(--x-text-heading-3-font-size, var(--font-size-2xl));
98
+ }
99
+
100
+ :where(h4) {
101
+ --x-text-heading-font-size: var(--x-text-heading-4-font-size, var(--font-size-xl));
102
+ }
103
+
104
+ :where(h5) {
105
+ --x-text-heading-font-size: var(--x-text-heading-5-font-size, var(--font-size-lg));
106
+ }
107
+
108
+ :where(h6) {
109
+ --x-text-heading-font-size: var(--x-text-heading-6-font-size);
110
+ }
111
+
112
+ :where(table) {
113
+ border: 0;
114
+ min-inline-size: 100%;
115
+
116
+ :where(td, th) {
117
+ padding: var(--x-text-table-cell-padding-block, 1em) var(--x-text-table-cell-padding-inline, 1.25em);
118
+ text-align: left;
119
+ }
120
+
121
+ :where(thead) {
122
+ font-weight: var(--x-text-table-thead-font-weight, var(--x-text-content-bold));
123
+ border-block-end:
124
+ 1px solid color-mix(
125
+ in var(--x-text-table-thead-border-color-space, srgb),
126
+ var(--x-text-table-thead-border-color, currentColor) var(--x-text-table-thead-border-color-opacity, 10%),
127
+ var(--x-text-table-thead-border-color-mix, transparent)
128
+ );
129
+ }
130
+
131
+ :where(tbody tr) {
132
+ &:nth-of-type(even) {
133
+ background-color:
134
+ color-mix(
135
+ in var(--x-text-table-row-even-background-color-space, srgb),
136
+ var(--x-text-table-row-even-background-color, currentColor) var(--x-text-table-row-even-background-color-opacity, 5%),
137
+ var(--x-text-table-row-even-background-color-mix, transparent)
138
+ );
139
+ }
140
+ }
141
+ }
142
+
143
+ :where(ol, ul) {
144
+ margin-inline-start: var(--x-text-list-margin-inline-start, 0.75em);
145
+ padding-inline-start: var(--x-text-list-padding-inline-start, 1em);
146
+ margin-block: var(--x-text-list-margin-block, var(--x-text-content-margin-block));
147
+
148
+ :where(li) {
149
+ margin-block: var(--x-text-list-item-margin-block, 0.5em);
150
+ padding-inline-start: var(--x-text-list-item-padding-inline-start, 1ch);
151
+ }
152
+ }
153
+
154
+ :where(ol) {
155
+ &:not([type]) {
156
+ list-style: decimal;
157
+ }
158
+
159
+ & :where(li) {
160
+ &::marker {
161
+ color: var(--x-text-list-marker-color, var(--color-accent));
162
+ font-weight: var(--x-text-list-marker-font-weight, var(--x-text-content-bold));
163
+ }
164
+ }
165
+ }
166
+
167
+ :where(ul) {
168
+ :where(li) {
169
+ position: relative;
170
+ list-style-type: "";
171
+
172
+ &::before {
173
+ inline-size: var(--x-text-list-marker-size);
174
+ block-size: var(--x-text-list-marker-size);
175
+ inset-inline-start: var(--x-text-list-marker-inset-inline-start, -0.75em);
176
+ inset-block-start: var(--x-text-list-marker-inset-block-start, 0.5lh);
177
+ border:
178
+ var(--x-text-list-marker-border-width, 1px) solid
179
+ var(--x-text-list-marker-border-color, var(--color-accent));
180
+ background-color: var(--x-text-list-marker-background-color, var(--color-accent));
181
+ margin-inline-start: calc((var(--x-text-list-marker-size) / 2) * -1);
182
+ margin-block-start: calc(var(--x-text-list-marker-size) / 2 * -1);
183
+ border-radius: var(--x-text-list-marker-border-radius, 50%);
184
+ mask: var(--x-text-list-marker-mask);
185
+ position: absolute;
186
+ will-change: transform;
187
+ content: "";
188
+ }
189
+ }
190
+
191
+ &[style*="square"] {
192
+ --x-text-list-marker-border-radius: 0;
193
+ }
194
+
195
+ &[style*="circle"] {
196
+ --x-text-list-marker-background-color: transparent;
197
+ }
198
+ }
199
+
200
+ :where(blockquote) {
201
+ border-inline-start:
202
+ var(--x-text-blockquote-border-inline-start-width, 0.375em) solid
203
+ var(--x-text-blockquote-border-inline-start-color, var(--color-accent));
204
+ margin-block: var(--x-text-blockquote-margin-block, var(--x-text-content-margin-block));
205
+ padding: var(--x-text-blockquote-padding-block, 0.5em) var(--x-text-blockquote-padding-inline, 1.25em);
206
+ font-size: var(--x-text-blockquote-font-size, inherit);
207
+ }
208
+
209
+ :where(code) {
210
+ font-size: var(--x-text-code-font-size, 87.5%);
211
+ }
212
+
213
+ :where(figure) {
214
+ margin-block: var(--x-text-figure-margin-block, var(--x-text-content-margin-block));
215
+ }
216
+
217
+ :where(figcaption) {
218
+ font-size: var(--x-text-figcaption-font-size, 87.5%);
219
+ font-weight: var(--x-text-figcaption-font-weight, var(--font-weight-semibold));
220
+ line-height: var(--x-text-figcaption-line-height, 1.5);
221
+ margin-block-start: var(--x-text-figcaption-margin-block-start, 0.5em);
222
+ }
223
+ }
@@ -0,0 +1,2 @@
1
+ @import "props/default.css";
2
+ @import "default.css";
@@ -0,0 +1,9 @@
1
+ :root, :host {
2
+ --x-text-content-bold: var(--font-weight-semibold);
3
+ --x-text-content-margin-block: var(--spacing-xl);
4
+ --x-text-list-marker-size: 0.375em;
5
+ --x-text-line-height: calc(1em + 0.75rem);
6
+ --x-text-hr-margin-block: 3em;
7
+ --x-text-heading-line-height: calc(1em + 0.375rem);
8
+ --x-text-heading-margin-block: 1.5em 0.5em;
9
+ }
@@ -1,4 +1,4 @@
1
- # [Info](https://winduum.dev/docs/ui/info.html)
1
+ # [Text](https://winduum.dev/docs/components/text.html)
2
2
 
3
3
  ## Installation
4
4
  ```shell
@@ -8,14 +8,14 @@ Learn more how to set up Winduum [here](https://winduum.dev/docs/).
8
8
  Include CSS either globally or to your component _([you can't use TailwindCSS layers in per-component CSS](https://tailwindcss.com/docs/adding-custom-styles#layers-and-per-component-css))_
9
9
 
10
10
  ```css
11
- @import "winduum/src/ui/info/index.css" layer(components);
11
+ @import "winduum/src/components/text/index.css" layer(components);
12
12
  ```
13
13
 
14
14
  or modular (you can use your own props or CSS)
15
15
 
16
16
  ```css
17
- @import "winduum/src/ui/info/default-props.css" layer(components);
18
- @import "winduum/src/ui/info/default.css" layer(components);
17
+ @import "winduum/src/components/text/props/default.css" layer(components);
18
+ @import "winduum/src/components/text/default.css" layer(components);
19
19
  ```
20
20
 
21
21
  ### Local imports
@@ -23,8 +23,8 @@ By default, imports are directly from `npm` so you can leverage updates.
23
23
  You can also copy and paste the code from this directory to your project and remap the imports to local.
24
24
 
25
25
  ```css
26
- @import "@/components/ui/info/assets/index.css" layer(components);
26
+ @import "@/components/text/assets/index.css" layer(components);
27
27
  ```
28
28
 
29
29
  ### Docs
30
- Visit [docs](https://winduum.dev/docs/ui/info.html) to learn more about usage examples.
30
+ Visit [docs](https://winduum.dev/docs/components/text.html) to learn more about usage examples.
@@ -0,0 +1,8 @@
1
+ .x-title {
2
+ font-family: var(--x-title-font-family);
3
+ font-weight: var(--x-title-font-weight);
4
+ font-size: var(--x-title-font-size);
5
+ line-height: var(--x-title-line-height);
6
+ letter-spacing: var(--x-title-letter-spacing);
7
+ text-wrap: pretty;
8
+ }
@@ -1,4 +1,4 @@
1
+ @import "props/default.css";
1
2
  @import "default.css";
2
- @import "default-props.css";
3
3
  @import "sm.css";
4
4
  @import "lg.css";
@@ -0,0 +1,3 @@
1
+ .x-title:is(.lg) {
2
+ --x-title-font-size: var(--font-size-base);
3
+ }
@@ -0,0 +1,5 @@
1
+ :root, :host {
2
+ --x-title-font-weight: var(--font-weight-semibold);
3
+ --x-title-font-size: var(--font-size-sm);
4
+ --x-title-line-height: calc(1em + 0.25rem);
5
+ }
@@ -1,4 +1,4 @@
1
- # [Heading](https://winduum.dev/docs/ui/heading.html)
1
+ # [Title](https://winduum.dev/docs/components/title.html)
2
2
 
3
3
  ## Installation
4
4
  ```shell
@@ -8,16 +8,17 @@ Learn more how to set up Winduum [here](https://winduum.dev/docs/).
8
8
  Include CSS either globally or to your component _([you can't use TailwindCSS layers in per-component CSS](https://tailwindcss.com/docs/adding-custom-styles#layers-and-per-component-css))_
9
9
 
10
10
  ```css
11
- @import "winduum/src/ui/heading/index.css" layer(components);
11
+ @import "winduum/src/components/title/index.css" layer(components);
12
12
  ```
13
13
 
14
14
  or modular (you can use your own props or CSS)
15
15
 
16
16
  ```css
17
- @import "winduum/src/ui/heading/default-props.css" layer(components);
18
- @import "winduum/src/ui/heading/default.css" layer(components);
19
- @import "winduum/src/ui/heading/sm.css" layer(components);
20
- @import "winduum/src/ui/heading/lg.css" layer(components);
17
+ @import "winduum/src/components/title/props/default.css" layer(components);
18
+ @import "winduum/src/components/title/default.css" layer(components);
19
+ @import "winduum/src/components/title/sm.css" layer(components);
20
+ @import "winduum/src/components/title/lg.css" layer(components);
21
+
21
22
  ```
22
23
 
23
24
  ### Local imports
@@ -25,8 +26,8 @@ By default, imports are directly from `npm` so you can leverage updates.
25
26
  You can also copy and paste the code from this directory to your project and remap the imports to local.
26
27
 
27
28
  ```css
28
- @import "@/components/ui/heading/assets/index.css" layer(components);
29
+ @import "@/components/title/assets/index.css" layer(components);
29
30
  ```
30
31
 
31
32
  ### Docs
32
- Visit [docs](https://winduum.dev/docs/ui/heading.html) to learn more about usage examples.
33
+ Visit [docs](https://winduum.dev/docs/components/title.html) to learn more about usage examples.
@@ -0,0 +1,3 @@
1
+ .x-title:is(.sm) {
2
+ --x-title-font-size: var(--font-size-xs);
3
+ }
@@ -1,22 +1,23 @@
1
- .c-toast-content {
2
- --c-toast-bg: var(--color-accent);
3
- --c-toast-color: var(--color-accent);
4
- --tw-border-mix: var(--color-body-primary);
5
- --tw-border-opacity: 0.15;
6
-
7
- border-radius: var(--c-toast-content-border-radius);
8
- padding: var(--c-toast-content-py) var(--c-toast-content-px);
9
- gap: var(--c-toast-content-gap);
10
- background-color: var(--c-toast-content-bg);
11
- color: var(--c-toast-color);
12
- border: 1px solid color-mix(in var(--space), var(--c-toast-bg) calc(var(--tw-border-opacity) * 100%), var(--tw-border-mix));
1
+ .x-toast-content {
2
+ border-radius: var(--x-toast-content-border-radius);
3
+ padding: var(--x-toast-content-padding-block) var(--x-toast-content-padding-inline);
4
+ gap: var(--x-toast-content-gap);
5
+ background-color: var(--x-toast-content-background-color);
6
+ color: var(--x-toast-content-color, var(--color-accent));
7
+ border:
8
+ var(--x-toast-content-border-width, 1px) solid
9
+ color-mix(
10
+ in var(--x-toast-content-border-color-space, srgb),
11
+ var(--x-toast-content-border-color, var(--color-accent)) var(--x-toast-content-border-color-opacity, 15%),
12
+ var(--x-toast-content-border-color-mix, var(--color-body-primary))
13
+ );
13
14
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
14
15
  align-items: center;
15
16
  display: flex;
16
17
  height: fit-content;
17
18
 
18
- .ui-text {
19
- --ui-text-font-size: var(--text-sm);
20
- --ui-text-line-height: calc(1em + 0.375rem);
19
+ .x-text {
20
+ --x-text-font-size: var(--font-size-sm);
21
+ --x-text-line-height: calc(1em + 0.375rem);
21
22
  }
22
23
  }