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
@@ -1,6 +1,6 @@
1
1
  :root, :host {
2
- --space: sRGB;
3
- --scheme: light;
2
+ --default-color-space: sRGB;
3
+ --default-color-scheme: light;
4
4
  --color-accent: var(--color-primary);
5
5
  --color-accent-foreground: var(--color-primary-foreground);
6
6
  --color-primary: #3b82f6; /* color.blue.500 */
@@ -8,13 +8,13 @@
8
8
  --color-main: #171717; /* color.neutral.900 */
9
9
  --color-main-foreground: var(--color-body);
10
10
  --color-main-primary: var(--color-main);
11
- --color-main-secondary: color-mix(in var(--space), var(--color-main) 75%, var(--color-main-foreground));
12
- --color-main-tertiary: color-mix(in var(--space), var(--color-main) 50%, var(--color-main-foreground));
11
+ --color-main-secondary: color-mix(in var(--default-color-space), var(--color-main) 75%, var(--color-main-foreground));
12
+ --color-main-tertiary: color-mix(in var(--default-color-space), var(--color-main) 50%, var(--color-main-foreground));
13
13
  --color-body: #fff; /* color.white */
14
14
  --color-body-foreground: var(--color-main);
15
15
  --color-body-primary: var(--color-body);
16
- --color-body-secondary: color-mix(in var(--space), var(--color-body) 95%, var(--color-body-foreground));
17
- --color-body-tertiary: color-mix(in var(--space), var(--color-body) 90%, var(--color-body-foreground));
16
+ --color-body-secondary: color-mix(in var(--default-color-space), var(--color-body) 95%, var(--color-body-foreground));
17
+ --color-body-tertiary: color-mix(in var(--default-color-space), var(--color-body) 90%, var(--color-body-foreground));
18
18
  --color-light: #fff; /* color.white */
19
19
  --color-light-foreground: var(--color-dark);
20
20
  --color-dark: #171717; /* color.neutral.900 */
@@ -0,0 +1,6 @@
1
+ .x-badge:is(.bordered) {
2
+ --x-badge-border-width: 1px;
3
+ --x-badge-border-color-opacity: 100%;
4
+ --x-badge-background-color-opacity: 0%;
5
+ --x-badge-color: var(--color-accent);
6
+ }
@@ -0,0 +1,5 @@
1
+ .x-badge:is(.circle) {
2
+ --x-badge-padding-inline: var(--x-badge-padding-block);
3
+ --x-badge-width: var(--x-badge-height);
4
+ --x-badge-border-radius: var(--radius-full);
5
+ }
@@ -0,0 +1,42 @@
1
+ .x-badge {
2
+ --x-badge-background-color: var(--color-accent);
3
+ --x-badge-border-color: var(--color-accent);
4
+ --x-badge-color: var(--color-accent-foreground);
5
+
6
+ inline-size: var(--x-badge-width);
7
+ block-size: var(--x-badge-height);
8
+ padding: var(--x-badge-padding-block) var(--x-badge-padding-inline);
9
+ padding-inline: calc(var(--x-badge-padding-inline) - var(--x-badge-border-width));
10
+ border-radius: var(--x-badge-border-radius);
11
+ font-family: var(--x-badge-font-family);
12
+ font-weight: var(--x-badge-font-weight);
13
+ font-size: var(--x-badge-font-size);
14
+ letter-spacing: var(--x-badge-letter-spacing);
15
+ background-color:
16
+ color-mix(
17
+ in var(--x-badge-background-color-space, srgb),
18
+ var(--x-badge-background-color) var(--x-badge-background-color-opacity, 100%),
19
+ var(--x-badge-background-color-mix, transparent)
20
+ );
21
+ color:
22
+ color-mix(
23
+ in var(--x-badge-color-space, srgb),
24
+ var(--x-badge-color) var(--x-badge-color-opacity, 100%),
25
+ var(--x-badge-color-mix, transparent)
26
+ );
27
+ border:
28
+ var(--x-badge-border-width)
29
+ solid
30
+ color-mix(
31
+ in var(--x-badge-border-color-space, srgb),
32
+ var(--x-badge-border-color) var(--x-badge-border-color-opacity, 100%),
33
+ var(--x-badge-border-color-mix, transparent)
34
+ );
35
+ gap: var(--x-badge-gap);
36
+ display: inline-flex;
37
+ text-align: center;
38
+ align-items: center;
39
+ justify-content: center;
40
+ line-height: 1;
41
+ flex-shrink: 0;
42
+ }
@@ -1,5 +1,5 @@
1
1
  @import "default.css";
2
- @import "default-props.css";
2
+ @import "props/default.css";
3
3
  @import "sm.css";
4
4
  @import "lg.css";
5
5
  @import "bordered.css";
@@ -0,0 +1,3 @@
1
+ .x-badge:is(.lg) {
2
+ --x-badge-height: 1.75rem;
3
+ }
@@ -0,0 +1,4 @@
1
+ .x-badge:is(.muted) {
2
+ --x-badge-color: var(--color-accent);
3
+ --x-badge-background-color-opacity: 10%;
4
+ }
@@ -0,0 +1,9 @@
1
+ :root, :host {
2
+ --x-badge-border-width: 0px;
3
+ --x-badge-border-radius: var(--radius-lg);
4
+ --x-badge-font-size: var(--font-size-xs);
5
+ --x-badge-gap: var(--spacing-xs);
6
+ --x-badge-height: 1.5rem;
7
+ --x-badge-padding-block: 0;
8
+ --x-badge-padding-inline: 0.5rem;
9
+ }
@@ -0,0 +1,37 @@
1
+ # [Badge](https://winduum.dev/docs/components/badge.html)
2
+
3
+ ## Installation
4
+ ```shell
5
+ npm i winduum
6
+ ```
7
+ Learn more how to set up Winduum [here](https://winduum.dev/docs/).
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
+
10
+ ```css
11
+ @import "winduum/src/components/badge/index.css" layer(components);
12
+ ```
13
+
14
+ or modular (you can use your own props or CSS)
15
+
16
+ ```css
17
+ @import "winduum/src/components/badge/props/default.css" layer(components);
18
+ @import "winduum/src/components/badge/default.css" layer(components);
19
+ @import "winduum/src/components/badge/sm.css" layer(components);
20
+ @import "winduum/src/components/badge/lg.css" layer(components);
21
+ @import "winduum/src/components/badge/bordered.css" layer(components);
22
+ @import "winduum/src/components/badge/muted.css" layer(components);
23
+ @import "winduum/src/components/badge/square.css" layer(components);
24
+ @import "winduum/src/components/badge/circle.css" layer(components);
25
+
26
+ ```
27
+
28
+ ### Local imports
29
+ By default, imports are directly from `npm` so you can leverage updates.
30
+ You can also copy and paste the code from this directory to your project and remap the imports to local.
31
+
32
+ ```css
33
+ @import "@/components/badge/assets/index.css" layer(components);
34
+ ```
35
+
36
+ ### Docs
37
+ Visit [docs](https://winduum.dev/docs/components/badge.html) to learn more about usage examples.
@@ -0,0 +1,4 @@
1
+ .x-badge:is(.sm) {
2
+ --x-badge-height: 1.25rem;
3
+ --x-badge-font-size: var(--font-size-xs);
4
+ }
@@ -0,0 +1,4 @@
1
+ .x-badge:is(.square) {
2
+ --x-badge-padding-inline: var(--x-badge-padding-block);
3
+ --x-badge-width: var(--x-badge-height);
4
+ }
@@ -1,4 +1,4 @@
1
- .c-breadcrumb {
1
+ .x-breadcrumb {
2
2
  > :where(ul, ol) {
3
3
  &, > li {
4
4
  display: flex;
@@ -7,13 +7,13 @@
7
7
 
8
8
  > li {
9
9
  &:not(:last-child)::after {
10
- content: "";
11
- mask: var(--c-breadcrumb-marker);
12
- background-color: currentColor;
13
- margin-inline: var(--c-breadcrumb-gap);
14
- width: var(--c-breadcrumb-marker-size);
15
- height: var(--c-breadcrumb-marker-size);
10
+ mask: var(--x-breadcrumb-marker);
11
+ background-color: var(--x-breadcrumb-marker-background-color, currentColor);
12
+ margin-inline: var(--x-breadcrumb-gap);
13
+ inline-size: var(--x-breadcrumb-marker-size);
14
+ block-size: var(--x-breadcrumb-marker-size);
16
15
  flex-shrink: 0;
16
+ content: "";
17
17
  }
18
18
  }
19
19
  }
@@ -1,2 +1,2 @@
1
+ @import "props/default.css";
1
2
  @import "default.css";
2
- @import "default-props.css";
@@ -0,0 +1,5 @@
1
+ :root, :host {
2
+ --x-breadcrumb-marker-size: 0.875rem;
3
+ --x-breadcrumb-marker: var(--mask-chevron-right);
4
+ --x-breadcrumb-gap: var(--spacing-xs);
5
+ }
@@ -14,8 +14,8 @@ 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/breadcrumb/props/default.css" layer(components);
17
18
  @import "winduum/src/components/breadcrumb/default.css" layer(components);
18
- @import "winduum/src/components/breadcrumb/default-props.css" layer(components);
19
19
  ```
20
20
 
21
21
  ### Local imports
@@ -0,0 +1,19 @@
1
+ .x-button:is(.bordered) {
2
+ --x-button-disabled-background-color-opacity: 0%;
3
+ --x-button-disabled-background-color-mix: transparent;
4
+ --x-button-disabled-border-color-opacity: 30%;
5
+ --x-button-disabled-color: var(--color-accent);
6
+ --x-button-active-background-color-opacity: 20%;
7
+ --x-button-active-background-color-mix: transparent;
8
+ --x-button-active-border-color-opacity: 30%;
9
+ --x-button-active-color: var(--color-accent);
10
+ --x-button-hover-background-color-opacity: 10%;
11
+ --x-button-hover-background-color-mix: transparent;
12
+ --x-button-hover-border-color-opacity: 30%;
13
+ --x-button-hover-color: var(--color-accent);
14
+ --x-button-focus-outline-offset: 0px;
15
+ --x-button-border-width: 1px;
16
+ --x-button-border-color-opacity: 30%;
17
+ --x-button-background-color-opacity: 0%;
18
+ --x-button-color: var(--color-accent);
19
+ }
@@ -0,0 +1,6 @@
1
+ .x-button:is(.circle) {
2
+ --x-button-padding-block: 0;
3
+ --x-button-padding-inline: 0;
4
+ --x-button-width: var(--x-button-height);
5
+ --x-button-border-radius: var(--radius-full);
6
+ }
@@ -0,0 +1,63 @@
1
+ .x-button {
2
+ --x-button-background-color: var(--color-accent);
3
+ --x-button-border-color: var(--color-accent);
4
+ --x-button-color: var(--color-accent-foreground);
5
+
6
+ inline-size: var(--x-button-width);
7
+ block-size: var(--x-button-height);
8
+ padding: var(--x-button-padding-block) var(--x-button-padding-inline);
9
+ padding-inline: calc(var(--x-button-padding-inline) - var(--x-button-border-width));
10
+ border-radius: var(--x-button-border-radius);
11
+ font-family: var(--x-button-font-family);
12
+ font-size: var(--x-button-font-size);
13
+ font-weight: var(--x-button-font-weight);
14
+ letter-spacing: var(--x-button-letter-spacing);
15
+ background-color:
16
+ color-mix(
17
+ in var(--x-button-background-color-space, srgb),
18
+ var(--x-button-background-color) var(--x-button-background-color-opacity, 100%),
19
+ var(--x-button-background-color-mix, transparent)
20
+ );
21
+ color:
22
+ color-mix(
23
+ in var(--x-button-color-space, srgb),
24
+ var(--x-button-color) var(--x-button-color-opacity, 100%),
25
+ var(--x-button-color-mix, transparent)
26
+ );
27
+ border:
28
+ var(--x-button-border-width)
29
+ solid
30
+ color-mix(
31
+ in var(--x-button-border-color-space, srgb),
32
+ var(--x-button-border-color) var(--x-button-border-color-opacity, 100%),
33
+ var(--x-button-border-color-mix, transparent)
34
+ );
35
+ outline:
36
+ var(--x-button-outline-width)
37
+ solid
38
+ color-mix(
39
+ in var(--x-button-outline-color-space, srgb),
40
+ var(--x-button-outline-color, transparent) var(--x-button-outline-color-opacity, 100%),
41
+ var(--x-button-outline-color-mix, transparent)
42
+ );
43
+ outline-offset: var(--x-button-outline-offset);
44
+ gap: var(--x-button-gap);
45
+ user-select: none;
46
+ overflow: clip;
47
+ display: inline-flex;
48
+ text-align: center;
49
+ align-items: center;
50
+ justify-content: center;
51
+ position: relative;
52
+ line-height: 1;
53
+ flex-shrink: 0;
54
+ z-index: 0;
55
+
56
+ :where(*) {
57
+ pointer-events: none;
58
+ }
59
+
60
+ &:where(input)::after {
61
+ content: attr(aria-label);
62
+ }
63
+ }
@@ -0,0 +1,6 @@
1
+ .x-button:is(.fill) {
2
+ --x-button-hover-background-color-mix: var(--color-dark);
3
+ --x-button-hover-background-color-opacity: 100%;
4
+ --x-button-active-background-color-mix: var(--color-dark);
5
+ --x-button-active-background-color-opacity: 90%;
6
+ }
@@ -0,0 +1,14 @@
1
+ .x-button:is(.ghosted) {
2
+ --x-button-disabled-background-color-opacity: 0%;
3
+ --x-button-disabled-background-color-mix: transparent;
4
+ --x-button-disabled-color: var(--color-accent);
5
+ --x-button-active-background-color-opacity: 20%;
6
+ --x-button-active-background-color-mix: transparent;
7
+ --x-button-active-color: var(--color-accent);
8
+ --x-button-hover-background-color-opacity: 10%;
9
+ --x-button-hover-background-color-mix: transparent;
10
+ --x-button-hover-color: var(--color-accent);
11
+ --x-button-focus-outline-offset: -2px;
12
+ --x-button-color: var(--color-accent);
13
+ --x-button-background-color-opacity: 0%;
14
+ }
@@ -1,16 +1,11 @@
1
+ @import "props/default.css";
2
+ @import "props/interactive.css";
1
3
  @import "default.css";
2
- @import "default-props.css";
3
4
  @import "interactive.css";
4
- @import "interactive-props.css";
5
5
  @import "sm.css";
6
6
  @import "lg.css";
7
- @import "loading.css";
8
- @import "loading-props.css";
9
- @import "wide.css";
10
7
  @import "bordered.css";
11
8
  @import "ghosted.css";
12
- @import "gradient.css";
13
- @import "gradient-bordered.css";
14
9
  @import "muted.css";
15
10
  @import "raised.css";
16
11
  @import "fill.css";
@@ -0,0 +1,56 @@
1
+ .x-button {
2
+ transition-property: var(--default-transition-property);
3
+ transition-timing-function: var(--transition-timing-function-in-out);
4
+ transition-duration: var(--default-transition-duration);
5
+
6
+ &:where(.accent-primary),
7
+ &:where(.accent-body),
8
+ &:where(.accent-light),
9
+ &:where(.accent-dark) {
10
+ --x-button-hover-background-color-mix: var(--color-accent-foreground);
11
+ }
12
+
13
+ &:is(button, input, label, :any-link, [role="button"]) {
14
+ &:hover {
15
+ --x-button-background-color: var(--x-button-hover-background-color, var(--color-accent));
16
+ --x-button-background-color-mix: var(--x-button-hover-background-color-mix);
17
+ --x-button-background-color-opacity: var(--x-button-hover-background-color-opacity);
18
+ --x-button-border-color: var(--x-button-hover-border-color, var(--color-accent));
19
+ --x-button-border-color-mix: var(--x-button-hover-border-color-mix, transparent);
20
+ --x-button-border-color-opacity: var(--x-button-hover-border-color-opacity, 100%);
21
+ --x-button-color: var(--x-button-hover-color, var(--color-accent-foreground));
22
+ --x-button-color-mix: var(--x-button-hover-color-mix, transparent);
23
+ --x-button-color-opacity: var(--x-button-hover-color-opacity, 100%);
24
+ }
25
+
26
+ &:focus {
27
+ --x-button-outline-offset: var(--x-button-focus-outline-offset);
28
+ --x-button-outline-color: var(--x-button-focus-outline-color, var(--color-accent));
29
+ --x-button-outline-color-opacity: var(--x-button-focus-outline-color-opacity);
30
+ }
31
+
32
+ &:active, &:checked, &.active {
33
+ --x-button-background-color: var(--x-button-hover-background-color, var(--color-accent));
34
+ --x-button-background-color-mix: var(--x-button-active-background-color-mix);
35
+ --x-button-background-color-opacity: var(--x-button-active-background-color-opacity);
36
+ --x-button-border-color: var(--x-button-active-border-color, var(--color-accent));
37
+ --x-button-border-color-mix: var(--x-button-active-border-color-mix, transparent);
38
+ --x-button-border-color-opacity: var(--x-button-active-border-color-opacity, 100%);
39
+ --x-button-color: var(--x-button-active-color, var(--color-accent-foreground));
40
+ --x-button-color-mix: var(--x-button-active-color-mix, transparent);
41
+ --x-button-color-opacity: var(--x-button-active-color-opacity, 100%);
42
+ }
43
+
44
+ &:disabled {
45
+ --x-button-background-color: var(--x-button-disabled-background-color, var(--color-accent));
46
+ --x-button-background-color-mix: var(--x-button-disabled-background-color-mix, transparent);
47
+ --x-button-background-color-opacity: var(--x-button-disabled-background-color-opacity, 50%);
48
+ --x-button-border-color: var(--x-button-disabled-border-color, var(--color-accent));
49
+ --x-button-border-color-mix: var(--x-button-disabled-border-color-mix, transparent);
50
+ --x-button-border-color-opacity: var(--x-button-disabled-border-color-opacity, 50%);
51
+ --x-button-color: var(--x-button-disabled-color, var(--color-accent-foreground));
52
+ --x-button-color-mix: var(--x-button-disabled-color-mix, transparent);
53
+ --x-button-color-opacity: var(--x-button-disabled-color-opacity, 50%);
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,4 @@
1
+ .x-button:is(.lg) {
2
+ --x-button-height: 3rem;
3
+ --x-button-padding-inline: 1.75rem;
4
+ }
@@ -0,0 +1,14 @@
1
+ .x-button:is(.muted) {
2
+ --x-button-disabled-background-color-opacity: 5%;
3
+ --x-button-disabled-background-color-mix: transparent;
4
+ --x-button-disabled-color: var(--color-accent);
5
+ --x-button-active-background-color-opacity: 30%;
6
+ --x-button-active-background-color-mix: transparent;
7
+ --x-button-active-color: var(--color-accent);
8
+ --x-button-hover-background-color-opacity: 20%;
9
+ --x-button-hover-background-color-mix: transparent;
10
+ --x-button-hover-color: var(--color-accent);
11
+ --x-button-focus-outline-offset: -2px;
12
+ --x-button-color: var(--color-accent);
13
+ --x-button-background-color-opacity: 10%;
14
+ }
@@ -0,0 +1,11 @@
1
+ :root, :host {
2
+ --x-button-outline-width: 2px;
3
+ --x-button-border-width: 0px;
4
+ --x-button-border-radius: var(--radius);
5
+ --x-button-font-size: var(--font-size-sm);
6
+ --x-button-font-weight: var(--font-weight-medium);
7
+ --x-button-gap: var(--spacing-sm);
8
+ --x-button-height: 2.25rem;
9
+ --x-button-padding-block: 0.375rem;
10
+ --x-button-padding-inline: 0.75rem;
11
+ }
@@ -0,0 +1,9 @@
1
+ :root, :host {
2
+ --x-button-hover-background-color-mix: var(--color-dark);
3
+ --x-button-hover-background-color-opacity: 80%;
4
+ --x-button-focus-outline-offset: 2px;
5
+ --x-button-focus-outline-color-opacity: 50%;
6
+ --x-button-active-background-color-mix: var(--color-dark);
7
+ --x-button-active-background-color-opacity: 90%;
8
+ --x-button-disabled-background-color-opacity: 75%;
9
+ }
@@ -0,0 +1,6 @@
1
+ .x-button:is(.raised) {
2
+ --x-button-border-width: 1px;
3
+ --x-button-border-color-opacity: 75%;
4
+ --x-button-border-color: var(--x-button-background-color);
5
+ --x-button-border-color-mix: var(--x-button-color);
6
+ }
@@ -0,0 +1,46 @@
1
+ # [Button](https://winduum.dev/docs/components/button.html)
2
+
3
+ ## Installation
4
+ ```shell
5
+ npm i winduum
6
+ ```
7
+ Learn more how to set up Winduum [here](https://winduum.dev/docs/).
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
+
10
+ ```css
11
+ @import "winduum/src/button/index.css" layer(components);
12
+ ```
13
+
14
+ or modular (you can use your own props or CSS)
15
+
16
+ ```css
17
+ @import "winduum/src/button/props/default.css" layer(components);
18
+ @import "winduum/src/button/props/interactive.css" layer(components);
19
+ @import "winduum/src/button/default.css" layer(components);
20
+ @import "winduum/src/button/interactive.css" layer(components);
21
+ @import "winduum/src/button/sm.css" layer(components);
22
+ @import "winduum/src/button/lg.css" layer(components);
23
+ @import "winduum/src/button/bordered.css" layer(components);
24
+ @import "winduum/src/button/ghosted.css" layer(components);
25
+ @import "winduum/src/button/fill.css" layer(components);
26
+ @import "winduum/src/button/muted.css" layer(components);
27
+ @import "winduum/src/button/raised.css" layer(components);
28
+ @import "winduum/src/button/square.css" layer(components);
29
+ @import "winduum/src/button/circle.css" layer(components);
30
+ ```
31
+
32
+
33
+ ### Local imports
34
+ By default, imports are directly from `npm` so you can leverage updates.
35
+ You can also copy and paste the code from this directory to your project and remap the imports to local.
36
+
37
+ ```css
38
+ @import "@/components/button/assets/index.css" layer(components);
39
+ ```
40
+
41
+ ### Docs
42
+ Visit [docs](https://winduum.dev/docs/components/button.html) to learn more about usage examples.
43
+
44
+ ### Frameworks
45
+ * [winduum/winduum-vue](https://github.com/winduum/winduum-vue/blob/main/src/button)
46
+ * [winduum/winduum-react](https://github.com/winduum/winduum-react/blob/main/src/button)
@@ -0,0 +1,4 @@
1
+ .x-button:is(.sm) {
2
+ --x-button-height: 2rem;
3
+ --x-button-padding-inline: 1rem;
4
+ }
@@ -0,0 +1,5 @@
1
+ .x-button:is(.square) {
2
+ --x-button-padding-block: 0;
3
+ --x-button-padding-inline: 0;
4
+ --x-button-width: var(--x-button-height);
5
+ }
@@ -1,9 +1,7 @@
1
- .c-card {
2
- --c-card-p: var(--c-card-py) var(--c-card-px);
3
-
4
- background-color: var(--color-body-primary);
5
- border-radius: var(--rounded-2xl);
6
- padding: var(--c-card-p);
1
+ .x-card {
2
+ background-color: var(--x-card-background-color);
3
+ border-radius: var(--x-card-border-radius);
4
+ padding: var(--x-card-padding-block) var(--x-card-padding-inline);
7
5
  display: flex;
8
6
  flex-direction: column;
9
7
  }
@@ -1,2 +1,2 @@
1
+ @import "props/default.css";
1
2
  @import "default.css";
2
- @import "default-props.css";
@@ -0,0 +1,6 @@
1
+ :root, :host {
2
+ --x-card-background-color: var(--color-body-primary);
3
+ --x-card-border-radius: var(--radius-2xl);
4
+ --x-card-padding-block: var(--spacing-2xl);
5
+ --x-card-padding-inline: var(--spacing-3xl);
6
+ }
@@ -14,8 +14,8 @@ 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/card/props/default.css" layer(components);
17
18
  @import "winduum/src/components/card/default.css" layer(components);
18
- @import "winduum/src/components/card/default-props.css" layer(components);
19
19
  ```
20
20
 
21
21
  ### Local imports
@@ -1,10 +1,9 @@
1
- .c-carousel-content {
1
+ .x-carousel-content {
2
2
  display: flex;
3
3
  overflow: auto;
4
4
  user-select: none;
5
5
  scrollbar-width: none;
6
6
  -webkit-overflow-scrolling: touch;
7
- overscroll-behavior-x: none;
8
7
  position: relative;
9
8
  scroll-behavior: smooth;
10
9
  scroll-snap-type: x mandatory;
@@ -22,6 +21,7 @@
22
21
  }
23
22
  }
24
23
 
24
+ /* TODO grabbing */
25
25
  &:is(.grabbing) {
26
26
  &, & * {
27
27
  cursor: grabbing;
@@ -1,3 +1,3 @@
1
- .c-carousel {
1
+ .x-carousel {
2
2
  inline-size: 100%;
3
3
  }
@@ -1,5 +1,5 @@
1
1
  export interface ObserveCarouselOptions {
2
- visibleClass?: string
2
+ visibleAttribute?: string
3
3
  observerOptions?: {
4
4
  rootMargin?: string
5
5
  threshold?: number | number[]
@@ -9,7 +9,7 @@ export interface ObserveCarouselOptions {
9
9
  export interface PaginationCarouselOptions {
10
10
  element?: HTMLElement | Element
11
11
  itemContent?: string
12
- activeClass?: string
12
+ activeAttribute?: string
13
13
  }
14
14
 
15
15
  export interface ScrollCarouselOptions {
@@ -26,7 +26,7 @@ export interface AutoplayCarouselOptions {
26
26
  }
27
27
 
28
28
  export interface DragCarouselOptions {
29
- activeClass?: string
29
+ activeAttribute?: string
30
30
  }
31
31
 
32
32
  export function scrollPrev(element: HTMLElement | Element): void