@exhaustive-ui/tailwindcss 22.0.0-alpha.9 → 22.0.0-rc.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.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Tailwind CSS utilities for [ExhaustiveUI](https://github.com/e-xiste/exhaustive-ui) — first-class integration between ExhaustiveUI theming and Tailwind CSS, plus the animation utilities missing from core Tailwind.
8
8
 
9
- This package ships two libraries: a CSS package compatible with Tailwind CSS v4, and a JS plugin for Tailwind CSS v3.
9
+ This package ships two libraries: a CSS package for Tailwind CSS v4 (recommended) and a JS plugin for Tailwind CSS v3. Both provide the same utilities.
10
10
 
11
11
  ## Installation
12
12
 
@@ -23,6 +23,14 @@ In the CSS file that contains the `tailwindcss` import, add the import for this
23
23
  @import '@exhaustive-ui/tailwindcss';
24
24
  ```
25
25
 
26
+ The stylesheet is also exported as `@exhaustive-ui/tailwindcss/v4` (and `@exhaustive-ui/tailwindcss/v4/index.css`) for tools that do not read the `style` export condition.
27
+
28
+ To align the `dark:` variant with the `darkModeSelector` of the theme, declare a custom variant:
29
+
30
+ ```css
31
+ @custom-variant dark (&:where(.my-app-dark, .my-app-dark *));
32
+ ```
33
+
26
34
  ## Tailwind CSS v3
27
35
 
28
36
  Use the `plugins` option in your Tailwind config file.
@@ -40,6 +48,6 @@ export default {
40
48
 
41
49
  - Semantic color utilities backed by the ExhaustiveUI theme (e.g. `bg-primary`, `text-surface-500`, `text-muted-color`) that work in both styled and unstyled modes.
42
50
  - Animation utilities: `animate-*` keyframes, duration, delay, direction, fill-mode, iteration, play-state, timing-function, and enter/leave helpers.
43
- - Variants such as `p-dark` for dark-mode styling of ExhaustiveUI components.
51
+ - Tailwind v4 variants for component states, such as `p-invalid:`, `p-disabled:` or `p-checked:`, for styling unstyled components through pass-through.
44
52
 
45
- See the [ExhaustiveUI Tailwind documentation](https://github.com/e-xiste/exhaustive-ui) for usage details.
53
+ See the [ExhaustiveUI Tailwind documentation](https://exhaustive-ui.com/tailwind) for usage details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exhaustive-ui/tailwindcss",
3
- "version": "22.0.0-alpha.9",
3
+ "version": "22.0.0-rc.1",
4
4
  "author": "e-xiste",
5
5
  "description": "Tailwind CSS utilities for ExhaustiveUI Libraries",
6
6
  "homepage": "https://exhaustive-ui.com/",
@@ -30,7 +30,9 @@
30
30
  "style": "./v4/index.css",
31
31
  "import": "./v3/index.js",
32
32
  "require": "./v3/index.cjs"
33
- }
33
+ },
34
+ "./v4": "./v4/index.css",
35
+ "./v4/*": "./v4/*"
34
36
  },
35
37
  "publishConfig": {
36
38
  "access": "public"
@@ -3,5 +3,6 @@
3
3
  }
4
4
 
5
5
  @utility animate-delay-* {
6
- animation-delay: --value(integer) ms;
6
+ animation-delay: calc(--value(integer) * 1ms);
7
+ animation-delay: --value([*]);
7
8
  }
@@ -1,3 +1,4 @@
1
- @utility animate-duration-* {
2
- animation-duration: --value(integer)ms;
3
- }
1
+ @utility animate-duration-* {
2
+ animation-duration: calc(--value(integer) * 1ms);
3
+ animation-duration: --value([*]);
4
+ }
@@ -18,56 +18,142 @@
18
18
 
19
19
  @utility fade-in-* {
20
20
  --p-enter-opacity: calc(--value(integer) * 0.01);
21
+ --p-enter-opacity: --value([*]);
21
22
  }
22
23
 
23
24
  @utility fade-out-* {
24
25
  --p-leave-opacity: calc(--value(integer) * 0.01);
26
+ --p-leave-opacity: --value([*]);
25
27
  }
26
28
 
27
29
  @utility zoom-in-* {
28
30
  --p-enter-scale: calc(--value(integer) * 0.01);
31
+ --p-enter-scale: --value([*]);
29
32
  }
30
33
 
31
34
  @utility zoom-out-* {
32
35
  --p-leave-scale: calc(--value(integer) * 0.01);
36
+ --p-leave-scale: --value([*]);
33
37
  }
34
38
 
35
39
  @utility spin-in-* {
36
- --p-enter-rotate: --value(integer)deg;
40
+ --p-enter-rotate: calc(--value(integer) * 1deg);
41
+ --p-enter-rotate: --value([*]);
37
42
  }
38
43
 
39
44
  @utility spin-out-* {
40
- --p-leave-rotate: --value(integer)deg;
45
+ --p-leave-rotate: calc(--value(integer) * 1deg);
46
+ --p-leave-rotate: --value([*]);
41
47
  }
42
48
 
43
49
  @utility slide-in-from-t-* {
44
- --p-enter-translate-y: calc(var(--spacing) * --value(integer) * -1);
50
+ --p-enter-translate-y: calc(var(--spacing) * --value(number) * -1);
51
+ --p-enter-translate-y: calc(--value(ratio) * -100%);
52
+ --p-enter-translate-y: calc(--value([*]) * -1);
53
+ }
54
+
55
+ @utility slide-in-from-t-px {
56
+ --p-enter-translate-y: -1px;
57
+ }
58
+
59
+ @utility slide-in-from-t-full {
60
+ --p-enter-translate-y: -100%;
45
61
  }
46
62
 
47
63
  @utility slide-in-from-b-* {
48
- --p-enter-translate-y: calc(var(--spacing) * --value(integer));
64
+ --p-enter-translate-y: calc(var(--spacing) * --value(number));
65
+ --p-enter-translate-y: calc(--value(ratio) * 100%);
66
+ --p-enter-translate-y: calc(--value([*]));
67
+ }
68
+
69
+ @utility slide-in-from-b-px {
70
+ --p-enter-translate-y: 1px;
71
+ }
72
+
73
+ @utility slide-in-from-b-full {
74
+ --p-enter-translate-y: 100%;
49
75
  }
50
76
 
51
77
  @utility slide-in-from-l-* {
52
- --p-enter-translate-x: calc(var(--spacing) * --value(integer) * -1);
78
+ --p-enter-translate-x: calc(var(--spacing) * --value(number) * -1);
79
+ --p-enter-translate-x: calc(--value(ratio) * -100%);
80
+ --p-enter-translate-x: calc(--value([*]) * -1);
81
+ }
82
+
83
+ @utility slide-in-from-l-px {
84
+ --p-enter-translate-x: -1px;
85
+ }
86
+
87
+ @utility slide-in-from-l-full {
88
+ --p-enter-translate-x: -100%;
53
89
  }
54
90
 
55
91
  @utility slide-in-from-r-* {
56
- --p-enter-translate-x: calc(var(--spacing) * --value(integer));
92
+ --p-enter-translate-x: calc(var(--spacing) * --value(number));
93
+ --p-enter-translate-x: calc(--value(ratio) * 100%);
94
+ --p-enter-translate-x: calc(--value([*]));
95
+ }
96
+
97
+ @utility slide-in-from-r-px {
98
+ --p-enter-translate-x: 1px;
99
+ }
100
+
101
+ @utility slide-in-from-r-full {
102
+ --p-enter-translate-x: 100%;
57
103
  }
58
104
 
59
105
  @utility slide-out-from-t-* {
60
- --p-leave-translate-y: calc(var(--spacing) * --value(integer) * -1);
106
+ --p-leave-translate-y: calc(var(--spacing) * --value(number) * -1);
107
+ --p-leave-translate-y: calc(--value(ratio) * -100%);
108
+ --p-leave-translate-y: calc(--value([*]) * -1);
109
+ }
110
+
111
+ @utility slide-out-from-t-px {
112
+ --p-leave-translate-y: -1px;
113
+ }
114
+
115
+ @utility slide-out-from-t-full {
116
+ --p-leave-translate-y: -100%;
61
117
  }
62
118
 
63
119
  @utility slide-out-from-b-* {
64
- --p-leave-translate-y: calc(var(--spacing) * --value(integer));
120
+ --p-leave-translate-y: calc(var(--spacing) * --value(number));
121
+ --p-leave-translate-y: calc(--value(ratio) * 100%);
122
+ --p-leave-translate-y: calc(--value([*]));
123
+ }
124
+
125
+ @utility slide-out-from-b-px {
126
+ --p-leave-translate-y: 1px;
127
+ }
128
+
129
+ @utility slide-out-from-b-full {
130
+ --p-leave-translate-y: 100%;
65
131
  }
66
132
 
67
133
  @utility slide-out-from-l-* {
68
- --p-leave-translate-x: calc(var(--spacing) * --value(integer) * -1);
134
+ --p-leave-translate-x: calc(var(--spacing) * --value(number) * -1);
135
+ --p-leave-translate-x: calc(--value(ratio) * -100%);
136
+ --p-leave-translate-x: calc(--value([*]) * -1);
137
+ }
138
+
139
+ @utility slide-out-from-l-px {
140
+ --p-leave-translate-x: -1px;
141
+ }
142
+
143
+ @utility slide-out-from-l-full {
144
+ --p-leave-translate-x: -100%;
69
145
  }
70
146
 
71
147
  @utility slide-out-from-r-* {
72
- --p-leave-translate-x: calc(var(--spacing) * --value(integer));
148
+ --p-leave-translate-x: calc(var(--spacing) * --value(number));
149
+ --p-leave-translate-x: calc(--value(ratio) * 100%);
150
+ --p-leave-translate-x: calc(--value([*]));
151
+ }
152
+
153
+ @utility slide-out-from-r-px {
154
+ --p-leave-translate-x: 1px;
155
+ }
156
+
157
+ @utility slide-out-from-r-full {
158
+ --p-leave-translate-x: 100%;
73
159
  }