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,30 +1,30 @@
1
- .c-toast {
2
- width: min(100%, var(--c-toast-width));
3
- height: var(--c-toast-height);
4
- transition: all var(--c-toast-duration) var(--ease-in-out);
1
+ .x-toast {
2
+ inline-size: min(100%, var(--x-toast-inline-size));
3
+ block-size: var(--x-toast-block-size);
4
+ transition: all var(--x-toast-transition-duration) var(--x-toast-transition-timing-function, var(--transition-timing-function-in-out));
5
5
  position: relative;
6
6
  pointer-events: auto;
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
  visibility: hidden;
10
- opacity: 0;
10
+ opacity: 0%;
11
11
 
12
12
  .flex-col-reverse & {
13
13
  justify-content: flex-end;
14
14
  }
15
15
 
16
16
  &.in {
17
- margin-block: var(--c-toaster-spacing-y);
17
+ margin-block: var(--x-toaster-margin-block);
18
18
  }
19
19
 
20
20
  &.in:where(:nth-last-child(-n+3)) {
21
21
  visibility: visible;
22
- opacity: 1;
22
+ opacity: 100%;
23
23
  }
24
24
 
25
25
  &.out {
26
26
  visibility: hidden;
27
- opacity: 0;
27
+ opacity: 0%;
28
28
  height: 0;
29
29
  margin-block: 0;
30
30
  }
@@ -1,4 +1,4 @@
1
- @import "default-props.css";
1
+ @import "props/default.css";
2
+ @import "props/content.css";
2
3
  @import "default.css";
3
- @import "content-props.css";
4
4
  @import "content.css";
@@ -0,0 +1,7 @@
1
+ :root, :host {
2
+ --x-toast-content-border-radius: var(--radius-2xl);
3
+ --x-toast-content-padding-block: var(--spacing-md);
4
+ --x-toast-content-padding-inline: var(--spacing-lg);
5
+ --x-toast-content-gap: var(--spacing-xl);
6
+ --x-toast-content-background-color: var(--color-body-primary);
7
+ }
@@ -0,0 +1,4 @@
1
+ :root, :host {
2
+ --x-toast-inline-size: 20rem;
3
+ --x-toast-transition-duration: calc(var(--default-transition-duration) * 2);
4
+ }
@@ -17,9 +17,9 @@ Include CSS either globally or to your component _([you can't use TailwindCSS la
17
17
  or modular (you can use your own props or CSS)
18
18
 
19
19
  ```css
20
- @import "winduum/src/components/toast/default-props.css" layer(components);
20
+ @import "winduum/src/components/toast/props/default.css" layer(components);
21
+ @import "winduum/src/components/toast/props/content.css" layer(components);
21
22
  @import "winduum/src/components/toast/default.css" layer(components);
22
- @import "winduum/src/components/toast/content-props.css" layer(components);
23
23
  @import "winduum/src/components/toast/content.css" layer(components);
24
24
  ```
25
25
 
@@ -1,7 +1,7 @@
1
- .c-toaster {
2
- z-index: var(--z-50);
3
- padding: var(--c-toaster-p);
4
- margin-block: calc(var(--c-toaster-spacing-y) * -1);
1
+ .x-toaster {
2
+ z-index: var(--x-toaster-z-index, var(--z-index-50));
3
+ padding: var(--x-toaster-padding);
4
+ margin-block: calc(var(--x-toaster-margin-block) * -1);
5
5
  position: fixed;
6
6
  inset: 0;
7
7
  pointer-events: none;
@@ -1,2 +1,2 @@
1
- @import "default-props.css";
1
+ @import "props/default.css";
2
2
  @import "default.css";
@@ -8,7 +8,7 @@ import { animationsFinished, nextRepaint } from '../../common.js'
8
8
  export const closeToast = async (element, options = {}) => {
9
9
  options = {
10
10
  hiddenClass: 'out',
11
- heightProperty: '--c-toast-height',
11
+ heightProperty: '--x-toast-block-size',
12
12
  ...options
13
13
  }
14
14
 
@@ -36,7 +36,7 @@ export const showToast = async (element, options = {}) => {
36
36
  options = {
37
37
  visibleClass: 'in',
38
38
  autoHide: null,
39
- heightProperty: '--c-toast-height',
39
+ heightProperty: '--x-toast-block-size',
40
40
  close: {},
41
41
  ...options
42
42
  }
@@ -65,8 +65,8 @@ export const insertToaster = async (element, options = {}) => {
65
65
  ...options
66
66
  }
67
67
 
68
- if (!document.querySelector('.c-toaster')) {
69
- element.insertAdjacentHTML('beforeend', `<ol class="c-toaster ${options.classes}"></ol>`)
68
+ if (!document.querySelector('.x-toaster')) {
69
+ element.insertAdjacentHTML('beforeend', `<ol class="x-toaster ${options.classes}"></ol>`)
70
70
  }
71
71
  }
72
72
 
@@ -87,12 +87,12 @@ export const insertToast = async (element, options = {}) => {
87
87
  }
88
88
 
89
89
  element.insertAdjacentHTML('beforeend', `
90
- <li class="c-toast ${options.classes}" role="status" aria-live="assertive" aria-atomic="true">
91
- <div class="c-toast-content">
90
+ <li class="x-toast ${options.classes}" role="status" aria-live="assertive" aria-atomic="true">
91
+ <div class="x-toast-content">
92
92
  ${options.start}
93
93
  <div class="flex-col">
94
- <div class="ui-title">${options.title}</div>
95
- <div class="ui-text">${options.text}</div>
94
+ <div class="x-title">${options.title}</div>
95
+ <div class="x-text">${options.text}</div>
96
96
  </div>
97
97
  ${options.end}
98
98
  </div>
@@ -0,0 +1,4 @@
1
+ :root, :host {
2
+ --x-toaster-padding: var(--spacing-xl);
3
+ --x-toaster-margin-block: var(--spacing-xs);
4
+ }
@@ -14,7 +14,7 @@ Include CSS either globally or to your component _([you can't use TailwindCSS la
14
14
  or modular (you can use your own props or CSS)
15
15
 
16
16
  ```css
17
- @import "winduum/src/components/toaster/default-props.css" layer(components);
17
+ @import "winduum/src/components/toaster/props/default.css" layer(components);
18
18
  @import "winduum/src/components/toaster/default.css" layer(components);
19
19
  ```
20
20
 
@@ -1,27 +1,27 @@
1
- .c-tooltip {
1
+ .x-tooltip {
2
2
  position: relative;
3
3
  display: inline-block;
4
4
 
5
5
  &::before {
6
6
  --tw-content: attr(aria-label);
7
7
 
8
+ background-color: var(--x-tooltip-background-color);
9
+ color: var(--x-tooltip-color);
10
+ border-radius: var(--x-tooltip-border-radius);
11
+ font-size: var(--x-tooltip-font-size);
12
+ padding: var(--x-tooltip-padding-block) var(--x-tooltip-padding-inline);
13
+ z-index: var(--x-tooltip-z-index, var(--z-index-20));
14
+ transition-property: var(--default-transition-property);
15
+ transition-timing-function: var(--transition-timing-function-in-out);
16
+ transition-duration: var(--default-transition-duration);
8
17
  content: var(--tw-content);
9
18
  opacity: var(--tw-opacity);
10
19
  visibility: var(--tw-visibility);
11
20
  transform:
12
21
  translate(var(--tw-translate-x), var(--tw-translate-y))
13
22
  scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
14
- transition-property: var(--transition);
15
- transition-timing-function: var(--ease-in-out);
16
- transition-duration: var(--duration);
17
23
  will-change: transform;
18
- background-color: var(--c-tooltip-bg);
19
- color: var(--c-tooltip-color);
20
- border-radius: var(--c-tooltip-border-radius);
21
- font-size: var(--c-tooltip-font-size);
22
- padding: var(--c-tooltip-py) var(--c-tooltip-px);
23
- z-index: var(--z-20);
24
- width: max-content;
24
+ inline-size: max-content;
25
25
  position: absolute;
26
26
  pointer-events: none;
27
27
  }
@@ -30,7 +30,7 @@
30
30
  &::before {
31
31
  --tw-translate-x: -50%;
32
32
 
33
- margin-block: var(--c-tooltip-margin-block);
33
+ margin-block: var(--x-tooltip-margin-block);
34
34
  inset-inline-start: 50%;
35
35
  }
36
36
  }
@@ -39,7 +39,7 @@
39
39
  &::before {
40
40
  --tw-translate-y: -50%;
41
41
 
42
- margin-inline: var(--c-tooltip-margin-inline);
42
+ margin-inline: var(--x-tooltip-margin-inline);
43
43
  inset-block-start: 50%;
44
44
  }
45
45
  }
@@ -73,8 +73,8 @@
73
73
  }
74
74
 
75
75
  &:not(:hover, :focus)::before {
76
- --tw-scale-x: var(--c-tooltip-scale-x);
77
- --tw-scale-y: var(--c-tooltip-scale-y);
76
+ --tw-scale-x: var(--x-tooltip-scale-x);
77
+ --tw-scale-y: var(--x-tooltip-scale-y);
78
78
  --tw-opacity: 0;
79
79
  --tw-visibility: hidden;
80
80
  }
@@ -1,2 +1,2 @@
1
- @import "default-props.css";
1
+ @import "props/default.css";
2
2
  @import "default.css";
@@ -0,0 +1,12 @@
1
+ :root, :host {
2
+ --x-tooltip-background-color: var(--color-main);
3
+ --x-tooltip-color: var(--color-main-foreground);
4
+ --x-tooltip-border-radius: var(--radius-md);
5
+ --x-tooltip-font-size: var(--font-size-sm);
6
+ --x-tooltip-padding-block: var(--spacing-xs);
7
+ --x-tooltip-padding-inline: var(--spacing-sm);
8
+ --x-tooltip-margin-block: var(--spacing-xs);
9
+ --x-tooltip-margin-inline: var(--spacing-xs);
10
+ --x-tooltip-scale-x: 0.75;
11
+ --x-tooltip-scale-y: 0.75;
12
+ }
@@ -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/tooltip/props/default.css" layer(components);
17
18
  @import "winduum/src/components/tooltip/default.css" layer(components);
18
- @import "winduum/src/components/tooltip/default-props.css" layer(components);
19
19
  ```
20
20
 
21
21
  ### Local imports
@@ -23,7 +23,7 @@ By default, imports are directly from `npm` so you can leverage updates.
23
23
  You can also copy and paste the code from this directory to your project and remap the imports to local.
24
24
 
25
25
  ```css
26
- @import "@/components/ui/tooltip/assets/index.css" layer(components);
26
+ @import "@/components/tooltip/assets/index.css" layer(components);
27
27
  ```
28
28
 
29
29
  ### Docs
package/src/main.css CHANGED
@@ -1,3 +1,2 @@
1
1
  @import "base/index.css";
2
- @import "ui/index.css";
3
2
  @import "components/index.css";
package/src/test.css ADDED
@@ -0,0 +1,7 @@
1
+ @import "base/index.css";
2
+ @import "components/index.css" layer(components);
3
+ @import "utilities/index.css" layer(components);
4
+ @import "tailwindcss/base.css";
5
+ @import "tailwindcss/components.css";
6
+ @import "tailwindcss/utilities.css";
7
+ @import "tailwindcss/variants.css";
@@ -1,12 +1,8 @@
1
- .animate {
2
- animation-duration: var(--duration);
1
+ .animation {
2
+ animation-duration: var(--default-transition-duration);
3
3
  animation-fill-mode: both;
4
4
  }
5
5
 
6
- .flex-col {
7
- display: flex;
8
- }
9
-
10
6
  [hidden] {
11
7
  display: none;
12
8
  }
@@ -1,13 +1,12 @@
1
1
  .grid-cols-container {
2
- display: grid;
3
2
  grid-template-columns:
4
3
  [container-full-start] minmax(var(--container-padding), 1fr)
5
4
  [container-lg-start] minmax(0, calc((var(--container-lg-width) - var(--container-width)) / 2))
6
5
  [container-start] min(100% - (var(--container-padding) * 2), var(--container-width)) [container-end]
7
6
  minmax(0, calc((var(--container-lg-width) - var(--container-width)) / 2)) [container-lg-end]
8
7
  minmax(var(--container-padding), 1fr) [container-full-end];
9
- }
10
8
 
11
- :where(.grid-cols-container > *) {
12
- grid-column: container;
9
+ & > :where(*) {
10
+ grid-column: container;
11
+ }
13
12
  }
@@ -1,2 +1,2 @@
1
1
  @import "default.css";
2
- @import "default-props.css";
2
+ @import "props/default.css";
@@ -1,25 +1,34 @@
1
1
  .divider {
2
2
  --color-accent: currentColor;
3
- --tw-border-opacity: 0.15;
4
3
 
5
4
  display: flex;
6
5
  align-items: center;
7
6
  align-self: stretch;
8
7
 
9
8
  &:where(:not(:empty)) {
10
- gap: var(--spacing-md);
9
+ gap: var(--divider-gap, var(--spacing-md));
11
10
  }
12
11
 
13
12
  &::before, &::after {
14
13
  content: "";
15
14
  flex-grow: 1;
16
- border-block-start: 1px solid color-mix(in var(--space), var(--color-accent) calc(var(--tw-border-opacity) * 100%), transparent);
15
+ border-block-start:
16
+ 1px solid color-mix(
17
+ in var(--divider-border-block-color-space, srgb),
18
+ var(--divider-border-block-color, var(--color-accent)) var(--divider-border-block-color-opacity, 15%),
19
+ var(--divider-border-block-color-mix, transparent)
20
+ );
17
21
  }
18
22
 
19
23
  &:where(.flex-col) {
20
24
  &::before, &::after {
21
25
  border-block-start: 0;
22
- border-inline-start: 1px solid color-mix(in var(--space), var(--color-accent) calc(var(--tw-border-opacity) * 100%), transparent);
26
+ border-inline-start:
27
+ 1px solid color-mix(
28
+ in var(--divider-border-inline-color-space, srgb),
29
+ var(--divider-border-inline-color, var(--color-accent)) var(--divider-border-inline-color-opacity, 15%),
30
+ var(--divider-border-inline-color-mix, transparent)
31
+ );
23
32
  }
24
33
  }
25
34
  }
@@ -1,12 +1,15 @@
1
1
  .ripple {
2
- --tw-bg-opacity: 0.4;
3
-
4
- background-color: color-mix(in var(--space), currentcolor calc(var(--tw-bg-opacity) * 100%), transparent);
2
+ inline-size: var(--ripple-size, 2rem);
3
+ block-size: var(--ripple-size, 2rem);
4
+ background-color:
5
+ color-mix(
6
+ in var(--ripple-background-color-space, srgb),
7
+ var(--ripple-background-color, currentColor) var(--ripple-background-color-opacity, 40%),
8
+ var(--ripple-background-color-mix, transparent)
9
+ );
10
+ animation-duration: var(--ripple-animation-duration, 1s);
5
11
  position: absolute;
6
12
  border-radius: 50%;
7
13
  transform: scale(0);
8
- animation-duration: 1s;
9
14
  pointer-events: none;
10
- width: 2rem;
11
- height: 2rem;
12
15
  }
@@ -1,5 +1,12 @@
1
1
  .skeleton {
2
- background: linear-gradient(to right, var(--skeleton-from), var(--skeleton-to), var(--skeleton-to), var(--skeleton-from));
2
+ background:
3
+ linear-gradient(
4
+ to right,
5
+ var(--skeleton-gradient-from),
6
+ var(--skeleton-gradient-to),
7
+ var(--skeleton-gradient-to),
8
+ var(--skeleton-gradient-from)
9
+ );
3
10
  opacity: var(--skeleton-opacity);
4
11
  transition: var(--transition-opacity);
5
12
  animation: move-indeterminate 1.5s linear infinite;
@@ -1,2 +1,2 @@
1
1
  @import "default.css";
2
- @import "default-props.css";
2
+ @import "props/default.css";
@@ -0,0 +1,5 @@
1
+ :root, :host {
2
+ --skeleton-opacity: 50%;
3
+ --skeleton-gradient-from: color-mix(in var(--default-color-space), var(--color-body) 50%, var(--color-main));
4
+ --skeleton-gradient-to: color-mix(in var(--default-color-space), var(--color-body) 80%, var(--color-main));
5
+ }
@@ -1,13 +1,13 @@
1
1
  .swap {
2
+ cursor: var(--cursor-pointer, pointer);
2
3
  display: inline-grid;
3
- cursor: var(--cursor, pointer);
4
4
 
5
5
  > :where(*) {
6
- transition-property: var(--transition);
7
- transition-timing-function: var(--ease-in-out);
8
- transition-duration: var(--duration);
6
+ transition-property: var(--default-transition-property);
7
+ transition-timing-function: var(--transition-timing-function-in-out);
8
+ transition-duration: var(--default-transition-duration);
9
9
  grid-area: 1/-1;
10
- opacity: 0;
10
+ opacity: 0%;
11
11
  }
12
12
 
13
13
  > [aria-hidden="false"],
@@ -15,6 +15,6 @@
15
15
  input:indeterminate ~ :where(*:nth-last-child(2)),
16
16
  input:checked ~ :where(*:last-child) {
17
17
  transform: none;
18
- opacity: 1;
18
+ opacity: 100%;
19
19
  }
20
20
  }
@@ -1,13 +1,13 @@
1
1
  .underline {
2
- text-underline-offset: var(--tw-underline-offset, 0.125em);
2
+ text-underline-offset: var(--default-underline-offset, 0.125em);
3
3
  }
4
4
 
5
5
  .underline-transparent {
6
6
  &:where(:any-link, button:enabled, [role="button"]) {
7
- transition: all var(--duration) var(--ease-in-out);
7
+ transition: all var(--default-transition-duration) var(--transition-timing-function-in-out);
8
8
 
9
9
  &:not(:hover, :focus-visible) {
10
- text-underline-offset: var(--tw-underline-transparent-offset, -0.25em);
10
+ text-underline-offset: var(--default-underline-transparent-offset, -0.25em);
11
11
  text-decoration-color: transparent;
12
12
  }
13
13
  }
package/types/index.d.ts CHANGED
@@ -23,11 +23,13 @@ declare module 'winduum' {
23
23
  export const defaultConfig: PluginOptions
24
24
 
25
25
  export default function createPlugin(userConfig?: PluginOptions): Plugin
26
+
27
+ export {};
26
28
  }
27
29
 
28
30
  declare module 'winduum/src/components/carousel' {
29
31
  export interface ObserveCarouselOptions {
30
- visibleClass?: string
32
+ visibleAttribute?: string
31
33
  observerOptions?: {
32
34
  rootMargin?: string
33
35
  threshold?: number | number[]
@@ -37,7 +39,7 @@ declare module 'winduum/src/components/carousel' {
37
39
  export interface PaginationCarouselOptions {
38
40
  element?: HTMLElement | Element
39
41
  itemContent?: string
40
- activeClass?: string
42
+ activeAttribute?: string
41
43
  }
42
44
 
43
45
  export interface ScrollCarouselOptions {
@@ -54,7 +56,7 @@ declare module 'winduum/src/components/carousel' {
54
56
  }
55
57
 
56
58
  export interface DragCarouselOptions {
57
- activeClass?: string
59
+ activeAttribute?: string
58
60
  }
59
61
 
60
62
  export function scrollPrev(element: HTMLElement | Element): void
@@ -66,6 +68,8 @@ declare module 'winduum/src/components/carousel' {
66
68
  export function paginationCarousel(element: HTMLElement | Element, options?: PaginationCarouselOptions): void
67
69
  export function autoplayCarousel(element: HTMLElement | Element, options?: AutoplayCarouselOptions): void
68
70
  export function dragCarousel(element: HTMLElement | Element, options?: DragCarouselOptions): void
71
+
72
+ export {};
69
73
  }
70
74
 
71
75
  declare module 'winduum/src/components/compare' {
@@ -77,6 +81,8 @@ declare module 'winduum/src/components/compare' {
77
81
  export function setPosition(event: Event, options?: SetPositionOptions): void
78
82
  export function setKeyboardStep(event: KeyboardEvent, step?: string): void
79
83
  export function setMouseStep(event: MouseEvent, step?: string): void
84
+
85
+ export {};
80
86
  }
81
87
 
82
88
  declare module 'winduum/src/components/details' {
@@ -89,35 +95,24 @@ declare module 'winduum/src/components/details' {
89
95
  export function showDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
90
96
  export function closeDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
91
97
  export function toggleDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
98
+
99
+ export {};
92
100
  }
93
101
 
94
102
  declare module 'winduum/src/components/dialog' {
95
103
  export interface DefaultOptions {
96
104
  remove?: boolean | null
97
105
  closable?: boolean | null
98
- openClass?: string
106
+ openAttribute?: string
107
+ closedAttribute?: string
99
108
  scrollbarWidthProperty?: string
100
109
  }
101
110
 
102
- export interface InsertDialogOptions {
103
- selector?: string | null
104
- class?: string | null
105
- append?: boolean | null
106
- show?: DefaultOptions
107
- }
108
-
109
- export interface FetchDialogOptions {
110
- url: string
111
- insert?: InsertDialogOptions
112
- }
113
-
114
111
  export const defaultOptions: DefaultOptions
115
- export function dialogSelector(selector: string): HTMLDialogElement
116
- export function dismissDialog(element: HTMLDialogElement, options?: DefaultOptions): Promise<void>
117
- export function showDialog(element: HTMLDialogElement, options?: DefaultOptions): Promise<void>
118
- export function closeDialog(element: HTMLDialogElement, options?: DefaultOptions): Promise<void>
119
- export function insertDialog(content: string, options?: InsertDialogOptions): Promise<void>
120
- export function fetchDialog({ url, insert }: FetchDialogOptions): Promise<void>
112
+ export function showDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
113
+ export function closeDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
114
+
115
+ export {};
121
116
  }
122
117
 
123
118
  declare module 'winduum/src/components/drawer' {
@@ -134,6 +129,8 @@ declare module 'winduum/src/components/drawer' {
134
129
  export function showDrawer(element: HTMLElement | Element, distance?: number, direction?: 'left' | 'top'): void
135
130
  export function closeDrawer(element: HTMLElement | Element, distance?: number, direction?: 'left' | 'top'): void
136
131
  export function scrollDrawer(element: HTMLElement | Element, options?: ScrollDrawerOptions): void
132
+
133
+ export {};
137
134
  }
138
135
 
139
136
  declare module 'winduum/src/components/form' {
@@ -163,6 +160,8 @@ declare module 'winduum/src/components/form' {
163
160
 
164
161
  export function validateForm(event: Event | SubmitEvent, options?: ValidateFormOptions): void
165
162
  export function validateField(element: HTMLElement | SubmitEvent, options?: ValidateFieldOptions): void
163
+
164
+ export {};
166
165
  }
167
166
 
168
167
  declare module 'winduum/src/components/tabs' {
@@ -172,6 +171,8 @@ declare module 'winduum/src/components/tabs' {
172
171
  }
173
172
 
174
173
  export function toggleTab(element: HTMLElement | Element, options?: ToggleTabOptions): void
174
+
175
+ export {};
175
176
  }
176
177
 
177
178
  declare module 'winduum/src/components/toaster' {
@@ -205,12 +206,14 @@ declare module 'winduum/src/components/toaster' {
205
206
  export function insertToaster(element: HTMLElement, options?: InsertToasterOptions): Promise<void>
206
207
  export function insertToast(element: HTMLElement, options?: InsertToastOptions): Promise<void>
207
208
  export function closeToaster(element: HTMLElement, options?: CloseToastOptions): Promise<void>
209
+
210
+ export {};
208
211
  }
209
212
 
210
213
  declare module 'winduum/src/components/popover' {
211
214
  import type { FlipOptions, Middleware, OffsetOptions, Placement, ShiftOptions } from '@floating-ui/dom';
212
215
  export interface ShowPopoverOptions {
213
- visibleClass?: string
216
+ openAttribute?: string
214
217
  compute?: boolean
215
218
  placement?: Placement
216
219
  middleware?: Array<Middleware | null | undefined | false>
@@ -219,12 +222,18 @@ declare module 'winduum/src/components/popover' {
219
222
  shift?: ShiftOptions
220
223
  }
221
224
 
225
+ export interface HidePopoverOptions {
226
+ openAttribute?: string
227
+ }
228
+
222
229
  export function showPopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
223
230
  export function hidePopover(element: HTMLElement | Element): Promise<void>
224
231
  export function togglePopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
232
+
233
+ export {};
225
234
  }
226
235
 
227
- declare module 'winduum/src/ui/range' {
236
+ declare module 'winduum/src/components/range' {
228
237
  export interface SetTrackPropertyOptions {
229
238
  element: HTMLElement | Element
230
239
  value: string
@@ -244,14 +253,20 @@ declare module 'winduum/src/ui/range' {
244
253
  export function setTrackProperty(options: SetTrackPropertyOptions, track: 'start' | 'end'): void
245
254
  export function setValue(element: HTMLInputElement, options?: SetValueOptions): void
246
255
  export function setOutputValue(element: HTMLInputElement, outputElement: HTMLOutputElement | Element, options?: SetOutputOptions): void
256
+
257
+ export {};
247
258
  }
248
259
 
249
260
  declare module 'winduum/src/utilities/ripple' {
250
261
  export function showRipple(event: MouseEvent, element?: HTMLElement): void
262
+
263
+ export {};
251
264
  }
252
265
 
253
266
  declare module 'winduum/src/utilities/swap' {
254
267
  export function toggleSwap(element: HTMLElement): void
268
+
269
+ export {};
255
270
  }
256
271
 
257
272
  //# sourceMappingURL=index.d.ts.map