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,13 +0,0 @@
1
- :root, :host {
2
- --ui-check-size: 1.25rem;
3
- --ui-check-icon-size: 1.125rem;
4
- --ui-check-icon: var(--mask-check);
5
- --ui-check-gap: var(--spacing-md);
6
- --ui-check-font-size: var(--text-sm);
7
- --ui-check-line-height: calc(1em + 0.25rem);
8
- --ui-check-border-radius: var(--rounded-md);
9
- --ui-check-border-width: 1px;
10
- --ui-check-bg: currentColor;
11
- --ui-check-border-color: currentColor;
12
- --ui-check-outline-width: 3px;
13
- }
@@ -1,74 +0,0 @@
1
- .ui-check {
2
- --ui-check-outline-color: var(--color-accent);
3
- --ui-check-icon-color: var(--color-accent-foreground);
4
-
5
- font-weight: var(--ui-check-font-weight);
6
- font-size: var(--ui-check-font-size);
7
- line-height: var(--ui-check-line-height);
8
- letter-spacing: var(--ui-check-letter-spacing);
9
- gap: var(--ui-check-gap);
10
- display: inline-flex;
11
- text-wrap: pretty;
12
-
13
- &:has([type="radio"]) {
14
- --ui-check-icon: var(--mask-radio);
15
- --ui-check-border-radius: 50%;
16
- }
17
-
18
- :where(a) {
19
- color: var(--color-accent);
20
- text-decoration: underline;
21
- }
22
-
23
- :where(input) {
24
- --tw-border-opacity: 0.2;
25
- --tw-border-mix: transparent;
26
- --tw-outline-opacity: 0;
27
- --tw-outline-mix: transparent;
28
- --tw-bg-opacity: 0;
29
- --tw-bg-mix: transparent;
30
-
31
- width: var(--ui-check-size);
32
- height: var(--ui-check-size);
33
- border-radius: var(--ui-check-border-radius);
34
- background-color: color-mix(in var(--space), var(--ui-check-bg) calc(var(--tw-bg-opacity) * 100%), var(--tw-bg-mix));
35
- border:
36
- var(--ui-check-border-width) solid
37
- color-mix(
38
- in var(--space),
39
- var(--ui-check-border-color) calc(var(--tw-border-opacity) * 100%),
40
- var(--tw-border-mix)
41
- );
42
- outline:
43
- var(--ui-check-outline-width) solid
44
- color-mix(
45
- in var(--space),
46
- var(--ui-check-outline-color) calc(var(--tw-outline-opacity) * 100%),
47
- var(--tw-outline-mix)
48
- );
49
- outline-offset: var(--ui-check-outline-offset);
50
- display: flex;
51
- flex-shrink: 0;
52
-
53
- &::before {
54
- width: var(--ui-check-icon-size);
55
- height: var(--ui-check-icon-size);
56
- color: var(--ui-check-icon-color);
57
- mask: var(--ui-check-icon);
58
- transition: inherit;
59
- content: "";
60
- background-color: currentColor;
61
- opacity: 0;
62
- transform: scale(0);
63
- will-change: transform;
64
- margin: auto;
65
- }
66
-
67
- &:where(:required) {
68
- + *::after {
69
- color: var(--color-error);
70
- content: " *";
71
- }
72
- }
73
- }
74
- }
@@ -1,3 +0,0 @@
1
- :root, :host {
2
- --ui-check-disabled-opacity: 0.5;
3
- }
@@ -1,50 +0,0 @@
1
- .ui-check {
2
- --ui-check-hover-border-color: var(--color-accent);
3
- --ui-check-hover-bg: var(--color-accent);
4
- --ui-check-checked-bg: var(--color-accent);
5
- --ui-check-focus-border-color: var(--color-accent);
6
-
7
- :where(input) {
8
- transition-property: var(--transition);
9
- transition-timing-function: var(--ease-in-out);
10
- transition-duration: var(--duration);
11
-
12
- &:enabled {
13
- &:is(:hover, :focus-visible) {
14
- --ui-check-border-color: var(--ui-check-hover-border-color);
15
- --ui-check-bg: var(--ui-check-hover-bg);
16
- --tw-border-opacity: var(--ui-check-hover-border-opacity, 0.75);
17
- --tw-bg-opacity: var(--ui-check-hover-bg-opacity, 0.1);
18
- }
19
-
20
- &:focus {
21
- --ui-check-border-color: var(--ui-check-focus-border-color);
22
- --ui-check-outline-offset: var(--ui-check-focus-outline-offset);
23
- --tw-border-opacity: var(--ui-check-focus-border-opacity, 0.75);
24
- --tw-outline-opacity: var(--ui-check-focus-outline-opacity, 0.2);
25
- }
26
- }
27
-
28
- &:disabled {
29
- --tw-bg-opacity: var(--ui-check-disabled-bg-opacity, 0.15);
30
-
31
- cursor: not-allowed;
32
- opacity: var(--ui-check-disabled-opacity);
33
- }
34
-
35
- &:where([type="checkbox"]):indeterminate {
36
- --ui-check-icon: var(--mask-indeterminate);
37
- }
38
-
39
- &:is(:checked, [type="checkbox"]:indeterminate) {
40
- --ui-check-bg: var(--ui-check-checked-bg);
41
- --tw-bg-opacity: 1;
42
- --tw-border-opacity: 0;
43
-
44
- &::before {
45
- opacity: 1;
46
- transform: scale(1);
47
- }
48
- }
49
- }
50
- }
@@ -1,8 +0,0 @@
1
- .ui-check {
2
- &.invalid, .validated & :where(input):invalid {
3
- --ui-check-border-color: var(--color-error);
4
- --ui-check-outline-color: var(--color-error);
5
- --ui-check-bg: var(--color-error);
6
- --tw-border-opacity: 1;
7
- }
8
- }
@@ -1,11 +0,0 @@
1
- :root, :host {
2
- --ui-color-primary: currentColor;
3
- --ui-color-secondary: transparent;
4
- --ui-color-size: 1.75rem;
5
- --ui-color-p: var(--spacing-xs);
6
- --ui-color-border-width: 2px;
7
- --ui-color-border-color: currentColor;
8
- --ui-color-border-radius: var(--rounded-full);
9
- --ui-color-outline-width: 3px;
10
- --ui-color-outline-color: var(--ui-color-border-color);
11
- }
@@ -1,48 +0,0 @@
1
- .ui-color {
2
- display: inline-flex;
3
-
4
- :where(input) {
5
- --tw-border-opacity: 0.1;
6
- --tw-border-mix: transparent;
7
- --tw-outline-opacity: 0;
8
- --tw-outline-mix: transparent;
9
-
10
- width: var(--ui-color-size);
11
- height: var(--ui-color-size);
12
- padding: var(--ui-color-p);
13
- border-radius: var(--ui-color-border-radius);
14
- border:
15
- var(--ui-color-border-width) solid
16
- color-mix(
17
- in var(--space),
18
- var(--ui-color-border-color) calc(var(--tw-border-opacity) * 100%),
19
- var(--tw-border-mix)
20
- );
21
- outline:
22
- var(--ui-color-outline-width) solid
23
- color-mix(
24
- in var(--space),
25
- var(--ui-color-outline-color) calc(var(--tw-outline-opacity) * 100%),
26
- var(--tw-outline-mix)
27
- );
28
- outline-offset: var(--ui-check-outline-offset);
29
- display: inline-grid;
30
-
31
- &::before, &::after {
32
- border: 1px solid transparent;
33
- border-radius: inherit;
34
- grid-area: 1/-1;
35
- content: "";
36
- }
37
-
38
- &::before {
39
- background-color: var(--ui-color-primary);
40
- border-color: inherit;
41
- }
42
-
43
- &::after {
44
- background-color: var(--ui-color-secondary);
45
- clip-path: polygon(100% 0, 100% 100%, 0 100%);
46
- }
47
- }
48
- }
@@ -1,4 +0,0 @@
1
- @import "default-props.css";
2
- @import "default.css";
3
- @import "interactive-props.css";
4
- @import "interactive.css";
@@ -1,3 +0,0 @@
1
- :root, :host {
2
- --ui-color-disabled-opacity: 0.5;
3
- }
@@ -1,30 +0,0 @@
1
- .ui-color {
2
- :where(input) {
3
- transition-property: var(--transition);
4
- transition-timing-function: var(--ease-in-out);
5
- transition-duration: var(--duration);
6
-
7
- &:where(:disabled) {
8
- cursor: not-allowed;
9
-
10
- &::before, &::after {
11
- opacity: var(--ui-color-disabled-opacity);
12
- }
13
- }
14
-
15
- &:where(:enabled) {
16
- &:is(:hover) {
17
- --tw-border-opacity: 0.3;
18
- }
19
-
20
- &:is(:focus-visible) {
21
- --tw-border-opacity: 1;
22
- --tw-outline-opacity: 0.2;
23
- }
24
- }
25
-
26
- &:is(:checked) {
27
- --tw-border-opacity: 1;
28
- }
29
- }
30
- }
@@ -1,5 +0,0 @@
1
- :root, :host {
2
- --ui-control-color-swatch-width: 1.25rem;
3
- --ui-control-color-swatch-height: 1.25rem;
4
- --ui-control-color-swatch-border-radius: var(--rounded-full);
5
- }
@@ -1,24 +0,0 @@
1
- .ui-control {
2
- > :where(input) {
3
- &::-webkit-color-swatch-wrapper {
4
- width: var(--ui-control-color-swatch-width);
5
- height: var(--ui-control-color-swatch-height);
6
- padding: 0;
7
- }
8
-
9
- &::-moz-color-swatch {
10
- width: var(--ui-control-color-swatch-width);
11
- height: var(--ui-control-color-swatch-height);
12
- border-radius: var(--ui-control-color-swatch-border-radius);
13
- margin: 0;
14
- }
15
-
16
- &::-webkit-color-swatch {
17
- border-radius: var(--ui-control-color-swatch-border-radius);
18
- }
19
-
20
- &[type="color"] ~ label {
21
- margin-inline-start: calc(var(--ui-control-px) + var(--ui-control-color-swatch-width));
22
- }
23
- }
24
- }
@@ -1,16 +0,0 @@
1
- :root, :host {
2
- --ui-control-height: 3rem;
3
- --ui-control-height-textarea: 8rem;
4
- --ui-control-px: 0.75rem;
5
- --ui-control-py: 0.75rem;
6
- --ui-control-border-width: 1px;
7
- --ui-control-font-weight: var(--font-medium);
8
- --ui-control-font-size: var(--text-sm);
9
- --ui-control-bg: transparent;
10
- --ui-control-color: currentColor;
11
- --ui-control-border-radius: var(--rounded);
12
- --ui-control-border-color: currentColor;
13
- --ui-control-outline-width: 3px;
14
- --ui-control-placeholder-color: currentColor;
15
- --ui-control-placeholder-opacity: 0.5;
16
- }
@@ -1,77 +0,0 @@
1
- .ui-control {
2
- --ui-control-outline-color: var(--color-accent);
3
- --tw-bg-opacity: 1;
4
- --tw-bg-mix: transparent;
5
- --tw-border-opacity: 0.15;
6
- --tw-border-mix: transparent;
7
- --tw-outline-opacity: 0;
8
- --tw-outline-mix: transparent;
9
-
10
- display: grid;
11
- block-size: var(--ui-control-height);
12
- font-family: var(--ui-control-font-family);
13
- font-weight: var(--ui-control-font-weight);
14
- font-size: var(--ui-control-font-size);
15
- letter-spacing: var(--ui-control-letter-spacing);
16
- background-color: color-mix(in var(--space), var(--ui-control-bg) calc(var(--tw-bg-opacity) * 100%), var(--tw-bg-mix));
17
- color: var(--ui-control-color);
18
- border-radius: var(--ui-control-border-radius);
19
- border:
20
- var(--ui-control-border-width) solid
21
- color-mix(
22
- in var(--space),
23
- var(--ui-control-border-color) calc(var(--tw-border-opacity) * 100%),
24
- var(--tw-border-mix)
25
- );
26
- outline:
27
- var(--ui-control-outline-width) solid
28
- color-mix(
29
- in var(--space),
30
- var(--ui-control-outline-color) calc(var(--tw-outline-opacity) * 100%),
31
- var(--tw-outline-mix)
32
- );
33
- outline-offset: var(--ui-control-outline-offset);
34
- grid-template:
35
- [c-control-start] calc(var(--ui-control-py) - var(--ui-control-border-width))
36
- [c-control-p] 1fr
37
- calc(var(--ui-control-py) - var(--ui-control-border-width)) [c-control-end] /
38
- [c-control-start] var(--ui-control-px)
39
- [c-control-p] 1fr
40
- var(--ui-control-px) [c-control-end];
41
-
42
- &:has(textarea) {
43
- height: auto;
44
- }
45
-
46
- > :where(*) {
47
- grid-area: c-control-p;
48
- align-self: center;
49
- }
50
-
51
- > :where(input, textarea, select) {
52
- padding-block: var(--ui-control-py);
53
- padding-inline: calc(var(--ui-control-px) + var(--ui-control-ps, 0rem)) calc(var(--ui-control-px) + var(--ui-control-pe, 0rem));
54
- grid-area: c-control;
55
- text-overflow: ellipsis;
56
- overflow: clip;
57
- align-self: stretch;
58
- align-items: center;
59
- border-radius: inherit;
60
-
61
- &:disabled {
62
- cursor: not-allowed;
63
- }
64
- }
65
-
66
- > :where(input, textarea) {
67
- &::placeholder {
68
- color: var(--ui-control-placeholder-color);
69
- opacity: var(--ui-control-placeholder-opacity);
70
- }
71
- }
72
-
73
- > :where(textarea) {
74
- min-block-size: var(--ui-control-height-textarea);
75
- resize: vertical;
76
- }
77
- }
@@ -1,25 +0,0 @@
1
- .ui-control:where(:has([type="file"])) {
2
- overflow: clip;
3
-
4
- > :where([type="file"]) {
5
- --color-accent: currentColor;
6
- --tw-bg-opacity: 0.15;
7
-
8
- &::file-selector-button {
9
- all: unset;
10
- background-color: color-mix(in var(--space), var(--color-accent) calc(var(--tw-bg-opacity) * 100%), transparent);
11
- block-size: calc(var(--ui-control-height) - var(--ui-control-border-width) * 2);
12
- padding-inline: var(--ui-control-px);
13
- margin-inline: calc(var(--ui-control-px) * -1) var(--ui-control-px);
14
- margin-block-start: calc(var(--ui-control-py) * -1);
15
- border-start-end-radius: var(--ui-control-border-radius, var(--rounded));
16
- border-end-end-radius: var(--ui-control-border-radius, var(--rounded));
17
- transition: var(--transition-background);
18
- cursor: pointer;
19
- }
20
-
21
- &:is(:hover, :focus) {
22
- --tw-bg-opacity: 0.2;
23
- }
24
- }
25
- }
@@ -1,13 +0,0 @@
1
- .ui-control:where(:has(:not([type="color"]) ~ label)) {
2
- --ui-control-label-focus-opacity: 0.5;
3
- --ui-control-placeholder-color: transparent;
4
-
5
- > :where(input, textarea, select) {
6
- &:is(:focus, :not(:placeholder-shown)) {
7
- ~ label {
8
- transform: translateY(calc(var(--ui-control-label-translate-y) * -1)) scale(var(--ui-control-label-scale));
9
- opacity: var(--ui-control-label-focus-opacity);
10
- }
11
- }
12
- }
13
- }
@@ -1,4 +0,0 @@
1
- :root, :host {
2
- --ui-control-label-translate-y: 0.625rem;
3
- --ui-control-label-scale: 0.8;
4
- }
@@ -1,36 +0,0 @@
1
- .ui-control:where(:has(:not([type="color"]) ~ label)) {
2
- > :where(label) {
3
- margin-inline: var(--ui-control-ps, 0) var(--ui-control-pe, 0);
4
- pointer-events: none;
5
- transform-origin: 0 50%;
6
- white-space: nowrap;
7
- text-overflow: ellipsis;
8
- overflow: clip;
9
- will-change: transform;
10
- transition: var(--transition-transform), var(--transition-color), var(--transition-opacity);
11
- }
12
-
13
- > :where(textarea) {
14
- padding-block-start: calc(var(--ui-control-py) + var(--ui-control-label-translate-y) * var(--ui-control-label-scale));
15
-
16
- + :where(label) {
17
- align-self: start;
18
- }
19
- }
20
-
21
- > :where(input, select) {
22
- padding-block: calc(var(--ui-control-py) + var(--ui-control-label-translate-y) * var(--ui-control-label-scale)) calc(var(--ui-control-py) - var(--ui-control-label-translate-y) * var(--ui-control-label-scale));
23
-
24
- &::-webkit-calendar-picker-indicator,
25
- &::-webkit-search-cancel-button,
26
- &::-webkit-outer-spin-button,
27
- &::-webkit-inner-spin-button {
28
- transform: translateY(calc(var(--ui-control-label-translate-y) * var(--ui-control-label-scale) * -1));
29
- }
30
- }
31
-
32
- &:where(:has(:required)) :where(label)::after {
33
- color: var(--color-error);
34
- content: " *";
35
- }
36
- }
@@ -1,4 +0,0 @@
1
- :root, :host {
2
- --ui-control-icon-size: 1.25rem;
3
- --ui-control-icon-gap: 0.375rem;
4
- }
@@ -1,32 +0,0 @@
1
- .ui-control {
2
- --ui-control-s: calc(var(--ui-control-icon-count-s, 1) * (var(--ui-control-icon-size) + var(--ui-control-icon-gap)) - var(--ui-control-icon-gap));
3
- --ui-control-e: calc(var(--ui-control-icon-count-e, 1) * (var(--ui-control-icon-size) + var(--ui-control-icon-gap)) - var(--ui-control-icon-gap));
4
-
5
- &:has(textarea) {
6
- :where(.me-auto), :where(.ms-auto) {
7
- align-self: start;
8
- }
9
- }
10
-
11
- &:has(.me-auto) {
12
- --ui-control-ps: calc(var(--ui-control-s) + var(--ui-control-px));
13
- }
14
-
15
- &:has(.ms-auto) {
16
- --ui-control-pe: calc(var(--ui-control-e) + var(--ui-control-px));
17
- }
18
-
19
- &:has(.me-auto > *:nth-child(2)) {
20
- --ui-control-icon-count-s: 2;
21
- }
22
-
23
- &:has(.ms-auto > *:nth-child(2)) {
24
- --ui-control-icon-count-e: 2;
25
- }
26
-
27
- :where(.me-auto), :where(.ms-auto) {
28
- gap: var(--ui-control-icon-gap);
29
- display: flex;
30
- align-items: center;
31
- }
32
- }
@@ -1,3 +0,0 @@
1
- :root, :host {
2
- --ui-control-disabled-opacity: 0.05;
3
- }
@@ -1,19 +0,0 @@
1
- .ui-control {
2
- --ui-control-focus-border-color: var(--color-accent);
3
-
4
- transition-property: var(--transition);
5
- transition-timing-function: var(--ease-in-out);
6
- transition-duration: var(--duration);
7
-
8
- &:focus-within {
9
- --ui-control-border-color: var(--ui-control-focus-border-color);
10
- --ui-control-outline-offset: var(--ui-control-focus-outline-offset);
11
- --tw-border-opacity: var(--ui-control-focus-border-opacity, 1);
12
- --tw-outline-opacity: var(--ui-control-focus-outline-opacity, 0.2);
13
- }
14
-
15
- &.disabled, &:has(:where(input, textarea, select):disabled) {
16
- --ui-control-bg: currentColor;
17
- --tw-bg-opacity: var(--ui-control-disabled-opacity);
18
- }
19
- }
@@ -1,10 +0,0 @@
1
- .ui-control {
2
- &.invalid, &:has(:user-invalid), .validated &:has(:invalid) {
3
- --ui-control-border-color: var(--ui-control-invalid-border-color, var(--color-error));
4
- --ui-control-outline-color: var(--ui-control-invalid-outline-color, var(--color-error));
5
- --ui-control-color: var(--ui-control-invalid-color, var(--color-error));
6
- --ui-control-bg: var(--ui-control-invalid-bg, var(--color-error));
7
- --tw-bg-opacity: var(--ui-control-invalid-bg-opacity, 0.1);
8
- --tw-border-opacity: var(--ui-control-invalid-border-opacity, 1);
9
- }
10
- }
@@ -1,44 +0,0 @@
1
- # [Control](https://winduum.dev/docs/ui/control.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/ui/control/index.css" layer(components);
12
- ```
13
-
14
- or modular (you can use your own props or CSS)
15
-
16
- ```css
17
- @import "winduum/src/ui/control/default-props.css" layer(components);
18
- @import "winduum/src/ui/control/default.css" layer(components);
19
- @import "winduum/src/ui/control/interactive.css" layer(components);
20
- @import "winduum/src/ui/control/interactive-props.css" layer(components);
21
- @import "winduum/src/ui/control/invalid.css" layer(components);
22
- @import "winduum/src/ui/control/color-props.css" layer(components);
23
- @import "winduum/src/ui/control/color.css" layer(components);
24
- @import "winduum/src/ui/control/icon.css" layer(components);
25
- @import "winduum/src/ui/control/icon-props.css" layer(components);
26
- @import "winduum/src/ui/control/file.css" layer(components);
27
- @import "winduum/src/ui/control/floating-props.css" layer(components);
28
- @import "winduum/src/ui/control/floating.css" layer(components);
29
- @import "winduum/src/ui/control/floating-interactive.css" layer(components);
30
- @import "winduum/src/ui/control/select-props.css" layer(components);
31
- @import "winduum/src/ui/control/select.css" layer(components);
32
- @import "winduum/src/ui/control/select-multiple.css" layer(components);
33
- ```
34
-
35
- ### Local imports
36
- By default, imports are directly from `npm` so you can leverage updates.
37
- You can also copy and paste the code from this directory to your project and remap the imports to local.
38
-
39
- ```css
40
- @import "@/components/ui/control/assets/index.css" layer(components);
41
- ```
42
-
43
- ### Docs
44
- Visit [docs](https://winduum.dev/docs/ui/control.html) to learn more about usage examples.
@@ -1,4 +0,0 @@
1
- :root, :host {
2
- --ui-control-select-icon-size: 1.5rem;
3
- --ui-control-select-icon-me: -0.25rem;
4
- }
@@ -1,23 +0,0 @@
1
- .ui-control:has(select:not([multiple])) {
2
- --ui-control-pe: calc(var(--ui-control-select-icon-size) + var(--ui-control-select-icon-me));
3
-
4
- &:has(.ms-auto) {
5
- --ui-control-icon-count-e: 2;
6
- }
7
-
8
- &::after {
9
- width: var(--ui-control-select-icon-size);
10
- height: var(--ui-control-select-icon-size);
11
- mask: var(--mask-angle-down);
12
- margin-inline: auto var(--ui-control-select-icon-me);
13
- grid-area: c-control-p;
14
- background-color: currentColor;
15
- pointer-events: none;
16
- align-self: center;
17
- content: "";
18
- }
19
-
20
- :where(.ms-auto) {
21
- margin-inline-end: var(--ui-control-select-icon-size);
22
- }
23
- }
@@ -1,42 +0,0 @@
1
- .ui-group {
2
- display: flex;
3
- border-radius: var(--rounded);
4
-
5
- &:has(.ui-control) {
6
- > :where(.ui-btn) {
7
- min-width: var(--ui-control-height);
8
- height: auto;
9
- }
10
-
11
- > :is(.ui-btn) {
12
- --ui-btn-border-width: var(--ui-control-border-width);
13
- }
14
- }
15
-
16
- > :where(*) {
17
- border-radius: inherit;
18
-
19
- &:is(.ui-control) {
20
- --tw-border-mix: var(--color-body-primary);
21
- }
22
-
23
- &:is(.ui-btn) {
24
- --ui-btn-focus-outline-offset: 0;
25
- }
26
-
27
- &:focus-within {
28
- z-index: 1;
29
- }
30
-
31
- &:where(:not(:first-child)) {
32
- margin-inline-start: calc(var(--ui-control-border-width) * -1);
33
- border-start-start-radius: 0;
34
- border-end-start-radius: 0;
35
- }
36
-
37
- &:where(:not(:last-child)) {
38
- border-start-end-radius: 0;
39
- border-end-end-radius: 0;
40
- }
41
- }
42
- }
@@ -1,6 +0,0 @@
1
- :root, :host {
2
- --ui-heading-font-family: var(--font-primary);
3
- --ui-heading-font-weight: var(--font-semibold);
4
- --ui-heading-font-size: var(--text-xl);
5
- --ui-heading-line-height: calc(1em + 0.375rem);
6
- }