winduum 1.2.1 → 2.0.0-next.1

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 (278) hide show
  1. package/package.json +4 -4
  2. package/plugin/index.js +63 -12
  3. package/plugin/utilities/common.js +4 -4
  4. package/plugin/utilities/dot.js +1 -2
  5. package/src/base/config/font.css +22 -9
  6. package/src/base/config/rounded.css +12 -12
  7. package/src/base/config/transition.css +14 -14
  8. package/src/base/config/z.css +5 -5
  9. package/src/base/config.css +0 -1
  10. package/src/base/defaults.css +9 -11
  11. package/src/base/keyframes.css +12 -0
  12. package/src/base/reset.css +2 -7
  13. package/src/base/theme/dark-rgb.css +1 -1
  14. package/src/base/theme/dark.css +1 -1
  15. package/src/base/theme/default-rgb.css +6 -6
  16. package/src/base/theme/default.css +6 -6
  17. package/src/components/badge/bordered.css +16 -0
  18. package/src/components/badge/circle.css +5 -0
  19. package/src/components/badge/default-props.css +8 -0
  20. package/src/components/badge/default.css +26 -0
  21. package/src/components/badge/lg.css +3 -0
  22. package/src/components/badge/muted.css +4 -0
  23. package/src/components/badge/sm.css +4 -0
  24. package/src/components/badge/square.css +4 -0
  25. package/src/components/breadcrumb/default-props.css +3 -3
  26. package/src/components/breadcrumb/default.css +5 -5
  27. package/src/components/button/bordered.css +19 -0
  28. package/src/components/button/circle.css +6 -0
  29. package/src/components/button/default.css +63 -0
  30. package/src/components/button/fill.css +6 -0
  31. package/src/components/button/ghosted.css +14 -0
  32. package/src/{ui/btn → components/button}/index.css +2 -7
  33. package/src/components/button/interactive.css +56 -0
  34. package/src/components/button/lg.css +4 -0
  35. package/src/components/button/muted.css +14 -0
  36. package/src/components/button/props/default.css +11 -0
  37. package/src/components/button/props/interactive.css +9 -0
  38. package/src/components/button/raised.css +6 -0
  39. package/src/components/button/readme.md +46 -0
  40. package/src/components/button/sm.css +4 -0
  41. package/src/components/button/square.css +5 -0
  42. package/src/components/card/default-props.css +2 -2
  43. package/src/components/card/default.css +4 -4
  44. package/src/components/carousel/content.css +1 -1
  45. package/src/components/carousel/default.css +1 -1
  46. package/src/components/check/default-props.css +13 -0
  47. package/src/components/check/default.css +74 -0
  48. package/src/components/check/interactive-props.css +3 -0
  49. package/src/components/check/interactive.css +50 -0
  50. package/src/components/check/invalid.css +8 -0
  51. package/src/components/color/default-props.css +11 -0
  52. package/src/{ui → components}/color/default.css +14 -14
  53. package/src/components/color/interactive-props.css +3 -0
  54. package/src/{ui → components}/color/interactive.css +5 -5
  55. package/src/components/compare/default.css +13 -13
  56. package/src/components/compare/index.js +2 -2
  57. package/src/components/control/color-props.css +5 -0
  58. package/src/components/control/color.css +24 -0
  59. package/src/components/control/default-props.css +16 -0
  60. package/src/components/control/default.css +77 -0
  61. package/src/components/control/file.css +25 -0
  62. package/src/components/control/floating-interactive.css +13 -0
  63. package/src/components/control/floating-props.css +4 -0
  64. package/src/{ui → components}/control/floating.css +5 -5
  65. package/src/components/control/icon-props.css +4 -0
  66. package/src/components/control/icon.css +32 -0
  67. package/src/components/control/interactive-props.css +3 -0
  68. package/src/components/control/interactive.css +19 -0
  69. package/src/components/control/invalid.css +10 -0
  70. package/src/{ui → components}/control/select-multiple.css +2 -2
  71. package/src/components/control/select-props.css +4 -0
  72. package/src/components/control/select.css +23 -0
  73. package/src/components/dialog/content-props.css +3 -3
  74. package/src/components/dialog/content.css +5 -5
  75. package/src/components/dialog/default-props.css +4 -4
  76. package/src/components/dialog/default.css +11 -12
  77. package/src/components/dialog/index.d.ts +3 -18
  78. package/src/components/dialog/index.js +21 -80
  79. package/src/components/drawer/content-props.css +4 -4
  80. package/src/components/drawer/content.css +3 -3
  81. package/src/components/drawer/default-props.css +1 -1
  82. package/src/components/drawer/default.css +3 -3
  83. package/src/components/drawer/index.js +2 -2
  84. package/src/components/field/default.css +3 -3
  85. package/src/components/form/index.js +4 -4
  86. package/src/{ui → components}/group/default.css +11 -11
  87. package/src/{ui → components}/group/vertical.css +2 -2
  88. package/src/components/heading/default-props.css +6 -0
  89. package/src/components/heading/default.css +8 -0
  90. package/src/components/heading/lg.css +3 -0
  91. package/src/components/heading/sm.css +3 -0
  92. package/src/{ui → components}/image/avatar.css +3 -3
  93. package/src/{ui → components}/image/default.css +1 -1
  94. package/src/components/index.css +20 -0
  95. package/src/components/info/default-props.css +4 -0
  96. package/src/components/info/default.css +8 -0
  97. package/src/components/label/default-props.css +4 -0
  98. package/src/components/label/default.css +8 -0
  99. package/src/components/link/default-props.css +4 -0
  100. package/src/components/link/default.css +8 -0
  101. package/src/components/link/interactive-props.css +5 -0
  102. package/src/components/link/interactive.css +16 -0
  103. package/src/components/notice/default-props.css +8 -0
  104. package/src/components/notice/default.css +25 -0
  105. package/src/components/pagination/default.css +1 -1
  106. package/src/components/popover/content-props.css +6 -6
  107. package/src/components/popover/content.css +12 -12
  108. package/src/components/popover/default.css +1 -1
  109. package/src/components/progress/default-props.css +4 -0
  110. package/src/{ui → components}/progress/default.css +9 -9
  111. package/src/components/progress/lg.css +3 -0
  112. package/src/{ui → components}/progress/meter.css +1 -1
  113. package/src/components/progress/sm.css +3 -0
  114. package/src/components/range/default-props.css +10 -0
  115. package/src/components/range/default.css +101 -0
  116. package/src/{ui → components}/range/index.js +2 -2
  117. package/src/components/range/multi.css +22 -0
  118. package/src/{ui → components}/range/vertical.css +2 -2
  119. package/src/components/rating/default-props.css +5 -0
  120. package/src/{ui → components}/rating/default.css +6 -6
  121. package/src/{ui → components}/rating/invalid.css +2 -2
  122. package/src/components/switch/default-props.css +17 -0
  123. package/src/components/switch/default.css +46 -0
  124. package/src/components/switch/interactive-props.css +3 -0
  125. package/src/components/switch/interactive.css +39 -0
  126. package/src/components/switch/invalid.css +6 -0
  127. package/src/components/table/default-props.css +6 -6
  128. package/src/components/table/default.css +8 -8
  129. package/src/components/table/interactive-props.css +2 -2
  130. package/src/components/table/interactive.css +11 -11
  131. package/src/components/tabs/default.css +2 -2
  132. package/src/components/text/default-props.css +9 -0
  133. package/src/components/text/default.css +193 -0
  134. package/src/components/title/default-props.css +5 -0
  135. package/src/components/title/default.css +8 -0
  136. package/src/components/title/lg.css +3 -0
  137. package/src/components/title/sm.css +3 -0
  138. package/src/components/toast/content-props.css +5 -5
  139. package/src/components/toast/content.css +12 -12
  140. package/src/components/toast/default-props.css +2 -2
  141. package/src/components/toast/default.css +5 -5
  142. package/src/components/toaster/default-props.css +2 -2
  143. package/src/components/toaster/default.css +4 -4
  144. package/src/components/toaster/index.js +6 -6
  145. package/src/components/tooltip/default-props.css +10 -10
  146. package/src/components/tooltip/default.css +14 -14
  147. package/src/main.css +0 -1
  148. package/src/utilities/common.css +2 -6
  149. package/src/utilities/container/default.css +3 -4
  150. package/src/utilities/container/index.css +1 -1
  151. package/src/utilities/divider.css +2 -3
  152. package/src/utilities/ripple/index.css +1 -3
  153. package/src/utilities/skeleton/index.css +1 -1
  154. package/src/utilities/skeleton/props/default.css +5 -0
  155. package/src/utilities/swap/default.css +4 -4
  156. package/src/utilities/underline.css +3 -3
  157. package/types/index.d.ts +4 -19
  158. package/types/index.d.ts.map +3 -8
  159. package/plugin/utilities/flex.js +0 -12
  160. package/src/base/config/text.css +0 -15
  161. package/src/ui/badge/bordered.css +0 -16
  162. package/src/ui/badge/circle.css +0 -5
  163. package/src/ui/badge/default-props.css +0 -8
  164. package/src/ui/badge/default.css +0 -26
  165. package/src/ui/badge/lg.css +0 -3
  166. package/src/ui/badge/muted.css +0 -4
  167. package/src/ui/badge/sm.css +0 -4
  168. package/src/ui/badge/square.css +0 -4
  169. package/src/ui/btn/bordered.css +0 -21
  170. package/src/ui/btn/circle.css +0 -6
  171. package/src/ui/btn/default-props.css +0 -10
  172. package/src/ui/btn/default.css +0 -49
  173. package/src/ui/btn/fill.css +0 -6
  174. package/src/ui/btn/ghosted.css +0 -9
  175. package/src/ui/btn/gradient-bordered.css +0 -24
  176. package/src/ui/btn/gradient.css +0 -10
  177. package/src/ui/btn/interactive-props.css +0 -9
  178. package/src/ui/btn/interactive.css +0 -53
  179. package/src/ui/btn/lg.css +0 -4
  180. package/src/ui/btn/loading-props.css +0 -4
  181. package/src/ui/btn/loading.css +0 -24
  182. package/src/ui/btn/muted.css +0 -9
  183. package/src/ui/btn/raised.css +0 -7
  184. package/src/ui/btn/readme.md +0 -51
  185. package/src/ui/btn/sm.css +0 -4
  186. package/src/ui/btn/square.css +0 -5
  187. package/src/ui/btn/wide.css +0 -3
  188. package/src/ui/check/default-props.css +0 -13
  189. package/src/ui/check/default.css +0 -74
  190. package/src/ui/check/interactive-props.css +0 -3
  191. package/src/ui/check/interactive.css +0 -50
  192. package/src/ui/check/invalid.css +0 -8
  193. package/src/ui/color/default-props.css +0 -11
  194. package/src/ui/color/interactive-props.css +0 -3
  195. package/src/ui/control/color-props.css +0 -5
  196. package/src/ui/control/color.css +0 -24
  197. package/src/ui/control/default-props.css +0 -16
  198. package/src/ui/control/default.css +0 -77
  199. package/src/ui/control/file.css +0 -25
  200. package/src/ui/control/floating-interactive.css +0 -13
  201. package/src/ui/control/floating-props.css +0 -4
  202. package/src/ui/control/icon-props.css +0 -4
  203. package/src/ui/control/icon.css +0 -32
  204. package/src/ui/control/interactive-props.css +0 -3
  205. package/src/ui/control/interactive.css +0 -19
  206. package/src/ui/control/invalid.css +0 -10
  207. package/src/ui/control/select-props.css +0 -4
  208. package/src/ui/control/select.css +0 -23
  209. package/src/ui/heading/default-props.css +0 -6
  210. package/src/ui/heading/default.css +0 -8
  211. package/src/ui/heading/lg.css +0 -3
  212. package/src/ui/heading/sm.css +0 -3
  213. package/src/ui/index.css +0 -18
  214. package/src/ui/info/default-props.css +0 -4
  215. package/src/ui/info/default.css +0 -8
  216. package/src/ui/label/default-props.css +0 -4
  217. package/src/ui/label/default.css +0 -8
  218. package/src/ui/link/default-props.css +0 -4
  219. package/src/ui/link/default.css +0 -8
  220. package/src/ui/link/interactive-props.css +0 -5
  221. package/src/ui/link/interactive.css +0 -16
  222. package/src/ui/notice/default-props.css +0 -8
  223. package/src/ui/notice/default.css +0 -25
  224. package/src/ui/progress/default-props.css +0 -4
  225. package/src/ui/progress/lg.css +0 -3
  226. package/src/ui/progress/sm.css +0 -3
  227. package/src/ui/range/default-props.css +0 -10
  228. package/src/ui/range/default.css +0 -101
  229. package/src/ui/range/multi.css +0 -22
  230. package/src/ui/rating/default-props.css +0 -5
  231. package/src/ui/switch/default-props.css +0 -17
  232. package/src/ui/switch/default.css +0 -46
  233. package/src/ui/switch/interactive-props.css +0 -3
  234. package/src/ui/switch/interactive.css +0 -39
  235. package/src/ui/switch/invalid.css +0 -6
  236. package/src/ui/text/default-props.css +0 -9
  237. package/src/ui/text/default.css +0 -193
  238. package/src/ui/title/default-props.css +0 -5
  239. package/src/ui/title/default.css +0 -8
  240. package/src/ui/title/lg.css +0 -3
  241. package/src/ui/title/sm.css +0 -3
  242. package/src/utilities/skeleton/default-props.css +0 -5
  243. /package/src/{ui → components}/badge/index.css +0 -0
  244. /package/src/{ui → components}/badge/readme.md +0 -0
  245. /package/src/{ui → components}/check/index.css +0 -0
  246. /package/src/{ui → components}/check/readme.md +0 -0
  247. /package/src/{ui → components}/color/index.css +0 -0
  248. /package/src/{ui → components}/color/readme.md +0 -0
  249. /package/src/{ui → components}/control/index.css +0 -0
  250. /package/src/{ui → components}/control/readme.md +0 -0
  251. /package/src/{ui → components}/group/index.css +0 -0
  252. /package/src/{ui → components}/group/readme.md +0 -0
  253. /package/src/{ui → components}/heading/index.css +0 -0
  254. /package/src/{ui → components}/heading/readme.md +0 -0
  255. /package/src/{ui → components}/image/index.css +0 -0
  256. /package/src/{ui → components}/image/readme.md +0 -0
  257. /package/src/{ui → components}/info/index.css +0 -0
  258. /package/src/{ui → components}/info/readme.md +0 -0
  259. /package/src/{ui → components}/label/index.css +0 -0
  260. /package/src/{ui → components}/label/readme.md +0 -0
  261. /package/src/{ui → components}/link/index.css +0 -0
  262. /package/src/{ui → components}/link/readme.md +0 -0
  263. /package/src/{ui → components}/notice/index.css +0 -0
  264. /package/src/{ui → components}/notice/readme.md +0 -0
  265. /package/src/{ui → components}/progress/index.css +0 -0
  266. /package/src/{ui → components}/progress/readme.md +0 -0
  267. /package/src/{ui → components}/range/index.css +0 -0
  268. /package/src/{ui → components}/range/index.d.ts +0 -0
  269. /package/src/{ui → components}/range/readme.md +0 -0
  270. /package/src/{ui → components}/rating/index.css +0 -0
  271. /package/src/{ui → components}/rating/readme.md +0 -0
  272. /package/src/{ui → components}/switch/index.css +0 -0
  273. /package/src/{ui → components}/switch/readme.md +0 -0
  274. /package/src/{ui → components}/text/index.css +0 -0
  275. /package/src/{ui → components}/text/readme.md +0 -0
  276. /package/src/{ui → components}/title/index.css +0 -0
  277. /package/src/{ui → components}/title/readme.md +0 -0
  278. /package/src/utilities/container/{default-props.css → props/default.css} +0 -0
@@ -0,0 +1,63 @@
1
+ .button {
2
+ --button-background-color: var(--color-accent);
3
+ --button-border-color: var(--color-accent);
4
+ --button-color: var(--color-accent-foreground);
5
+
6
+ inline-size: var(--button-width);
7
+ block-size: var(--button-height);
8
+ padding: var(--button-padding-block) var(--button-padding-inline);
9
+ padding-inline: calc(var(--button-padding-inline) - var(--button-border-width));
10
+ border-radius: var(--button-border-radius);
11
+ font-family: var(--button-font-family);
12
+ font-size: var(--button-font-size);
13
+ font-weight: var(--button-font-weight);
14
+ letter-spacing: var(--button-letter-spacing);
15
+ background-color:
16
+ color-mix(
17
+ in var(--button-background-color-space, srgb),
18
+ var(--button-background-color) var(--button-background-color-opacity, 100%),
19
+ var(--button-background-color-mix, transparent)
20
+ );
21
+ color:
22
+ color-mix(
23
+ in var(--button-color-space, srgb),
24
+ var(--button-color) var(--button-color-opacity, 100%),
25
+ var(--button-color-mix, transparent)
26
+ );
27
+ border:
28
+ var(--button-border-width)
29
+ solid
30
+ color-mix(
31
+ in var(--button-border-color-space, srgb),
32
+ var(--button-border-color) var(--button-border-color-opacity, 100%),
33
+ var(--button-border-color-mix, transparent)
34
+ );
35
+ outline:
36
+ var(--button-outline-width)
37
+ solid
38
+ color-mix(
39
+ in var(--button-outline-color-space, srgb),
40
+ var(--button-outline-color, transparent) var(--button-outline-color-opacity, 100%),
41
+ var(--button-outline-color-mix, transparent)
42
+ );
43
+ outline-offset: var(--button-outline-offset);
44
+ gap: var(--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
+ .button:is(.fill) {
2
+ --button-hover-background-color-mix: var(--color-dark);
3
+ --button-hover-background-color-opacity: 100%;
4
+ --button-active-background-color-mix: var(--color-dark);
5
+ --button-active-background-color-opacity: 90%;
6
+ }
@@ -0,0 +1,14 @@
1
+ .button:is(.ghosted) {
2
+ --button-disabled-background-color-opacity: 0%;
3
+ --button-disabled-background-color-mix: transparent;
4
+ --button-disabled-color: var(--color-accent);
5
+ --button-active-background-color-opacity: 20%;
6
+ --button-active-background-color-mix: transparent;
7
+ --button-active-color: var(--color-accent);
8
+ --button-hover-background-color-opacity: 10%;
9
+ --button-hover-background-color-mix: transparent;
10
+ --button-hover-color: var(--color-accent);
11
+ --button-focus-outline-offset: -2px;
12
+ --button-color: var(--color-accent);
13
+ --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
+ .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
+ --button-hover-background-color-mix: var(--color-accent-foreground);
11
+ }
12
+
13
+ &:is(button, input, :any-link, [role="button"]) {
14
+ &:hover {
15
+ --button-background-color: var(--button-hover-background-color, var(--color-accent));
16
+ --button-background-color-mix: var(--button-hover-background-color-mix);
17
+ --button-background-color-opacity: var(--button-hover-background-color-opacity);
18
+ --button-border-color: var(--button-hover-border-color, var(--color-accent));
19
+ --button-border-color-mix: var(--button-hover-border-color-mix, transparent);
20
+ --button-border-color-opacity: var(--button-hover-border-color-opacity, 100%);
21
+ --button-color: var(--button-hover-color, var(--color-accent-foreground));
22
+ --button-color-mix: var(--button-hover-color-mix, transparent);
23
+ --button-color-opacity: var(--button-hover-color-opacity, 100%);
24
+ }
25
+
26
+ &:focus {
27
+ --button-outline-offset: var(--button-focus-outline-offset);
28
+ --button-outline-color: var(--button-focus-outline-color, var(--color-accent));
29
+ --button-outline-color-opacity: var(--button-focus-outline-color-opacity);
30
+ }
31
+
32
+ &:active, &:checked, &[data-active] {
33
+ --button-background-color: var(--button-hover-background-color, var(--color-accent));
34
+ --button-background-color-mix: var(--button-active-background-color-mix);
35
+ --button-background-color-opacity: var(--button-active-background-color-opacity);
36
+ --button-border-color: var(--button-active-border-color, var(--color-accent));
37
+ --button-border-color-mix: var(--button-active-border-color-mix, transparent);
38
+ --button-border-color-opacity: var(--button-active-border-color-opacity, 100%);
39
+ --button-color: var(--button-active-color, var(--color-accent-foreground));
40
+ --button-color-mix: var(--button-active-color-mix, transparent);
41
+ --button-color-opacity: var(--button-active-color-opacity, 100%);
42
+ }
43
+
44
+ &:disabled {
45
+ --button-background-color: var(--button-disabled-background-color, var(--color-accent));
46
+ --button-background-color-mix: var(--button-disabled-background-color-mix, transparent);
47
+ --button-background-color-opacity: var(--button-disabled-background-color-opacity, 50%);
48
+ --button-border-color: var(--button-disabled-border-color, var(--color-accent));
49
+ --button-border-color-mix: var(--button-disabled-border-color-mix, transparent);
50
+ --button-border-color-opacity: var(--button-disabled-border-color-opacity, 50%);
51
+ --button-color: var(--button-disabled-color, var(--color-accent-foreground));
52
+ --button-color-mix: var(--button-disabled-color-mix, transparent);
53
+ --button-color-opacity: var(--button-disabled-color-opacity, 50%);
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,4 @@
1
+ .button:is(.lg) {
2
+ --button-height: 3rem;
3
+ --button-padding-inline: 1.75rem;
4
+ }
@@ -0,0 +1,14 @@
1
+ .button:is(.muted) {
2
+ --button-disabled-background-color-opacity: 5%;
3
+ --button-disabled-background-color-mix: transparent;
4
+ --button-disabled-color: var(--color-accent);
5
+ --button-active-background-color-opacity: 30%;
6
+ --button-active-background-color-mix: transparent;
7
+ --button-active-color: var(--color-accent);
8
+ --button-hover-background-color-opacity: 20%;
9
+ --button-hover-background-color-mix: transparent;
10
+ --button-hover-color: var(--color-accent);
11
+ --button-focus-outline-offset: -2px;
12
+ --button-color: var(--color-accent);
13
+ --button-background-color-opacity: 10%;
14
+ }
@@ -0,0 +1,11 @@
1
+ :root, :host {
2
+ --button-outline-width: 2px;
3
+ --button-border-width: 0px;
4
+ --button-border-radius: var(--radius);
5
+ --button-font-size: var(--font-size-sm);
6
+ --button-font-weight: var(--font-weight-medium);
7
+ --button-gap: var(--spacing-sm);
8
+ --button-height: 2.25rem;
9
+ --button-padding-block: 0.375rem;
10
+ --button-padding-inline: 0.75rem;
11
+ }
@@ -0,0 +1,9 @@
1
+ :root, :host {
2
+ --button-hover-background-color-mix: var(--color-dark);
3
+ --button-hover-background-color-opacity: 80%;
4
+ --button-focus-outline-offset: 2px;
5
+ --button-focus-outline-color-opacity: 50%;
6
+ --button-active-background-color-mix: var(--color-dark);
7
+ --button-active-background-color-opacity: 90%;
8
+ --button-disabled-background-color-opacity: 75%;
9
+ }
@@ -0,0 +1,6 @@
1
+ .button:is(.raised) {
2
+ --button-border-width: 1px;
3
+ --button-border-color-opacity: 75%;
4
+ --button-border-color: var(--button-background-color);
5
+ --button-border-color-mix: var(--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/default.css" layer(components);
18
+ @import "winduum/src/button/props/default.css" layer(components);
19
+ @import "winduum/src/button/interactive.css" layer(components);
20
+ @import "winduum/src/button/props/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
+ .button:is(.sm) {
2
+ --button-height: 2rem;
3
+ --button-padding-inline: 1rem;
4
+ }
@@ -0,0 +1,5 @@
1
+ .button:is(.square) {
2
+ --button-padding-block: 0;
3
+ --button-padding-inline: 0;
4
+ --button-width: var(--button-height);
5
+ }
@@ -1,4 +1,4 @@
1
1
  :root, :host {
2
- --c-card-py: var(--spacing-2xl);
3
- --c-card-px: var(--spacing-3xl);
2
+ --card-py: var(--spacing-2xl);
3
+ --card-px: var(--spacing-3xl);
4
4
  }
@@ -1,9 +1,9 @@
1
- .c-card {
2
- --c-card-p: var(--c-card-py) var(--c-card-px);
1
+ .card {
2
+ --card-p: var(--card-py) var(--card-px);
3
3
 
4
4
  background-color: var(--color-body-primary);
5
- border-radius: var(--rounded-2xl);
6
- padding: var(--c-card-p);
5
+ border-radius: var(--radius-2xl);
6
+ padding: var(--card-p);
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
  }
@@ -1,4 +1,4 @@
1
- .c-carousel-content {
1
+ .carousel-content {
2
2
  display: flex;
3
3
  overflow: auto;
4
4
  user-select: none;
@@ -1,3 +1,3 @@
1
- .c-carousel {
1
+ .carousel {
2
2
  inline-size: 100%;
3
3
  }
@@ -0,0 +1,13 @@
1
+ :root, :host {
2
+ --check-size: 1.25rem;
3
+ --check-icon-size: 1.125rem;
4
+ --check-icon: var(--mask-check);
5
+ --check-gap: var(--spacing-md);
6
+ --check-font-size: var(--font-size-sm);
7
+ --check-line-height: calc(1em + 0.25rem);
8
+ --check-border-radius: var(--radius-md);
9
+ --check-border-width: 1px;
10
+ --check-bg: currentColor;
11
+ --check-border-color: currentColor;
12
+ --check-outline-width: 3px;
13
+ }
@@ -0,0 +1,74 @@
1
+ .check {
2
+ --check-outline-color: var(--color-accent);
3
+ --check-icon-color: var(--color-accent-foreground);
4
+
5
+ font-weight: var(--check-font-weight);
6
+ font-size: var(--check-font-size);
7
+ line-height: var(--check-line-height);
8
+ letter-spacing: var(--check-letter-spacing);
9
+ gap: var(--check-gap);
10
+ display: inline-flex;
11
+ text-wrap: pretty;
12
+
13
+ &:has([type="radio"]) {
14
+ --check-icon: var(--mask-radio);
15
+ --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(--check-size);
32
+ height: var(--check-size);
33
+ border-radius: var(--check-border-radius);
34
+ background-color: color-mix(in var(--default-color-space), var(--check-bg) calc(var(--tw-bg-opacity) * 100%), var(--tw-bg-mix));
35
+ border:
36
+ var(--check-border-width) solid
37
+ color-mix(
38
+ in var(--default-color-space),
39
+ var(--check-border-color) calc(var(--tw-border-opacity) * 100%),
40
+ var(--tw-border-mix)
41
+ );
42
+ outline:
43
+ var(--check-outline-width) solid
44
+ color-mix(
45
+ in var(--default-color-space),
46
+ var(--check-outline-color) calc(var(--tw-outline-opacity) * 100%),
47
+ var(--tw-outline-mix)
48
+ );
49
+ outline-offset: var(--check-outline-offset);
50
+ display: flex;
51
+ flex-shrink: 0;
52
+
53
+ &::before {
54
+ width: var(--check-icon-size);
55
+ height: var(--check-icon-size);
56
+ color: var(--check-icon-color);
57
+ mask: var(--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
+ }
@@ -0,0 +1,3 @@
1
+ :root, :host {
2
+ --check-disabled-opacity: 0.5;
3
+ }
@@ -0,0 +1,50 @@
1
+ .check {
2
+ --check-hover-border-color: var(--color-accent);
3
+ --check-hover-bg: var(--color-accent);
4
+ --check-checked-bg: var(--color-accent);
5
+ --check-focus-border-color: var(--color-accent);
6
+
7
+ :where(input) {
8
+ transition-property: var(--default-transition-property);
9
+ transition-timing-function: var(--transition-timing-function-in-out);
10
+ transition-duration: var(--default-transition-duration);
11
+
12
+ &:enabled {
13
+ &:is(:hover, :focus-visible) {
14
+ --check-border-color: var(--check-hover-border-color);
15
+ --check-bg: var(--check-hover-bg);
16
+ --tw-border-opacity: var(--check-hover-border-opacity, 0.75);
17
+ --tw-bg-opacity: var(--check-hover-bg-opacity, 0.1);
18
+ }
19
+
20
+ &:focus {
21
+ --check-border-color: var(--check-focus-border-color);
22
+ --check-outline-offset: var(--check-focus-outline-offset);
23
+ --tw-border-opacity: var(--check-focus-border-opacity, 0.75);
24
+ --tw-outline-opacity: var(--check-focus-outline-opacity, 0.2);
25
+ }
26
+ }
27
+
28
+ &:disabled {
29
+ --tw-bg-opacity: var(--check-disabled-bg-opacity, 0.15);
30
+
31
+ cursor: not-allowed;
32
+ opacity: var(--check-disabled-opacity);
33
+ }
34
+
35
+ &:where([type="checkbox"]):indeterminate {
36
+ --check-icon: var(--mask-indeterminate);
37
+ }
38
+
39
+ &:is(:checked, [type="checkbox"]:indeterminate) {
40
+ --check-bg: var(--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
+ }
@@ -0,0 +1,8 @@
1
+ .check {
2
+ &.invalid, .validated & :where(input):invalid {
3
+ --check-border-color: var(--color-error);
4
+ --check-outline-color: var(--color-error);
5
+ --check-bg: var(--color-error);
6
+ --tw-border-opacity: 1;
7
+ }
8
+ }
@@ -0,0 +1,11 @@
1
+ :root, :host {
2
+ --color-primary: currentColor;
3
+ --color-secondary: transparent;
4
+ --color-size: 1.75rem;
5
+ --color-p: var(--spacing-xs);
6
+ --color-border-width: 2px;
7
+ --color-border-color: currentColor;
8
+ --color-border-radius: var(--radius-full);
9
+ --color-outline-width: 3px;
10
+ --color-outline-color: var(--color-border-color);
11
+ }
@@ -1,4 +1,4 @@
1
- .ui-color {
1
+ .color {
2
2
  display: inline-flex;
3
3
 
4
4
  :where(input) {
@@ -7,25 +7,25 @@
7
7
  --tw-outline-opacity: 0;
8
8
  --tw-outline-mix: transparent;
9
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);
10
+ width: var(--color-size);
11
+ height: var(--color-size);
12
+ padding: var(--color-p);
13
+ border-radius: var(--color-border-radius);
14
14
  border:
15
- var(--ui-color-border-width) solid
15
+ var(--color-border-width) solid
16
16
  color-mix(
17
- in var(--space),
18
- var(--ui-color-border-color) calc(var(--tw-border-opacity) * 100%),
17
+ in var(--default-color-space),
18
+ var(--color-border-color) calc(var(--tw-border-opacity) * 100%),
19
19
  var(--tw-border-mix)
20
20
  );
21
21
  outline:
22
- var(--ui-color-outline-width) solid
22
+ var(--color-outline-width) solid
23
23
  color-mix(
24
- in var(--space),
25
- var(--ui-color-outline-color) calc(var(--tw-outline-opacity) * 100%),
24
+ in var(--default-color-space),
25
+ var(--color-outline-color) calc(var(--tw-outline-opacity) * 100%),
26
26
  var(--tw-outline-mix)
27
27
  );
28
- outline-offset: var(--ui-check-outline-offset);
28
+ outline-offset: var(--check-outline-offset);
29
29
  display: inline-grid;
30
30
 
31
31
  &::before, &::after {
@@ -36,12 +36,12 @@
36
36
  }
37
37
 
38
38
  &::before {
39
- background-color: var(--ui-color-primary);
39
+ background-color: var(--color-primary);
40
40
  border-color: inherit;
41
41
  }
42
42
 
43
43
  &::after {
44
- background-color: var(--ui-color-secondary);
44
+ background-color: var(--color-secondary);
45
45
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
46
46
  }
47
47
  }
@@ -0,0 +1,3 @@
1
+ :root, :host {
2
+ --color-disabled-opacity: 0.5;
3
+ }
@@ -1,14 +1,14 @@
1
- .ui-color {
1
+ .color {
2
2
  :where(input) {
3
- transition-property: var(--transition);
4
- transition-timing-function: var(--ease-in-out);
5
- transition-duration: var(--duration);
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
6
 
7
7
  &:where(:disabled) {
8
8
  cursor: not-allowed;
9
9
 
10
10
  &::before, &::after {
11
- opacity: var(--ui-color-disabled-opacity);
11
+ opacity: var(--color-disabled-opacity);
12
12
  }
13
13
  }
14
14
 
@@ -1,6 +1,6 @@
1
- .c-compare {
2
- --c-compare-position: 50%;
3
- --c-compare-clip-path: polygon(0% 0, var(--c-compare-position) 0%, var(--c-compare-position) 100%, 0 100%);
1
+ .compare {
2
+ --compare-position: 50%;
3
+ --compare-clip-path: polygon(0% 0, var(--compare-position) 0%, var(--compare-position) 100%, 0 100%);
4
4
 
5
5
  display: grid;
6
6
  overflow: hidden;
@@ -15,7 +15,7 @@
15
15
 
16
16
  &::before {
17
17
  background-color: var(--color-accent);
18
- inset-inline-start: var(--c-compare-position);
18
+ inset-inline-start: var(--compare-position);
19
19
  inline-size: 1px;
20
20
  content: "";
21
21
  }
@@ -26,14 +26,14 @@
26
26
  opacity: 0;
27
27
 
28
28
  &:is(:focus-visible, :active) {
29
- ~ .ui-btn {
30
- --tw-bg-mix: var(--ui-btn-hover-bg-mix, var(--color-dark));
29
+ ~ .button {
30
+ --tw-bg-mix: var(--button-hover-bg-mix, var(--color-dark));
31
31
  --tw-bg-opacity: 0.8;
32
32
  }
33
33
  }
34
34
 
35
- &:focus-visible ~ .ui-btn {
36
- --ui-btn-outline-offset: 2px;
35
+ &:focus-visible ~ .button {
36
+ --button-outline-offset: 2px;
37
37
  --tw-outline-opacity: 0.5;
38
38
  }
39
39
 
@@ -42,13 +42,13 @@
42
42
  }
43
43
  }
44
44
 
45
- > :where(.ui-btn) {
46
- inset-inline-start: var(--c-compare-position);
47
- margin-inline-start: calc(var(--ui-btn-width) / 2 * -1);
45
+ > :where(.button) {
46
+ inset-inline-start: var(--compare-position);
47
+ margin-inline-start: calc(var(--button-width) / 2 * -1);
48
48
  margin-block: auto;
49
49
  }
50
50
 
51
- > :where(.ui-image) {
51
+ > :where(.image) {
52
52
  display: grid;
53
53
  z-index: 0;
54
54
 
@@ -58,7 +58,7 @@
58
58
  grid-area: 1/1;
59
59
 
60
60
  &:first-child {
61
- clip-path: var(--c-compare-clip-path);
61
+ clip-path: var(--compare-clip-path);
62
62
  position: relative;
63
63
  }
64
64
  }
@@ -5,8 +5,8 @@
5
5
  */
6
6
  export const setPosition = ({ currentTarget }, options = {}) => {
7
7
  const { selector, positionProperty } = {
8
- selector: '.c-compare',
9
- positionProperty: '--c-compare-position',
8
+ selector: '.compare',
9
+ positionProperty: '--compare-position',
10
10
  ...options
11
11
  }
12
12
 
@@ -0,0 +1,5 @@
1
+ :root, :host {
2
+ --control-color-swatch-width: 1.25rem;
3
+ --control-color-swatch-height: 1.25rem;
4
+ --control-color-swatch-border-radius: var(--radius-full);
5
+ }
@@ -0,0 +1,24 @@
1
+ .control {
2
+ > :where(input) {
3
+ &::-webkit-color-swatch-wrapper {
4
+ width: var(--control-color-swatch-width);
5
+ height: var(--control-color-swatch-height);
6
+ padding: 0;
7
+ }
8
+
9
+ &::-moz-color-swatch {
10
+ width: var(--control-color-swatch-width);
11
+ height: var(--control-color-swatch-height);
12
+ border-radius: var(--control-color-swatch-border-radius);
13
+ margin: 0;
14
+ }
15
+
16
+ &::-webkit-color-swatch {
17
+ border-radius: var(--control-color-swatch-border-radius);
18
+ }
19
+
20
+ &[type="color"] ~ label {
21
+ margin-inline-start: calc(var(--control-px) + var(--control-color-swatch-width));
22
+ }
23
+ }
24
+ }