@antadesign/anta 0.1.1-dev.1 → 0.1.1-dev.4

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.
@@ -0,0 +1,281 @@
1
+ /* Anta declares its layer order so consumers don't have to.
2
+ `base` is below — typically used by resets like Tailwind's
3
+ preflight (`@layer base`) — so Anta's reset + element styles
4
+ beat resets but lose to a consumer's own `@layer components`
5
+ rules. `utilities` sits above everything so utility-class
6
+ frameworks like Tailwind (`@layer utilities`) can still
7
+ override single properties when needed. Consumers who load
8
+ their own layer-order declaration earlier in the cascade
9
+ override this one — first mention of each layer name wins. */
10
+ @layer base, anta, components, utilities;
11
+
12
+ :root, .light {
13
+ --sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
14
+ --monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
15
+
16
+ font-size: 15px;
17
+ font-weight: 400;
18
+ font-feature-settings: 'ss02' on, 'ss05' on;
19
+
20
+ /* Colors imported from Figma library "Anta 0.2" → "Dynamic colors" collection.
21
+ Each token is declared twice: hex first, oklch second. Browsers that don't
22
+ understand oklch() ignore the second declaration. See FIGMA.md for the
23
+ full extraction procedure (figma.variables Plugin API + alias resolution). */
24
+
25
+ /* Backgrounds — light, neutral */
26
+ --bg-base: #fbfafb; --bg-base: oklch(0.986 0.002 326);
27
+ --bg-pane: #f6f4f6; --bg-pane: oklch(0.969 0.003 326);
28
+ --bg-block: #f1eff1; --bg-block: oklch(0.954 0.003 326);
29
+ --bg-spot: #ece9ec; --bg-spot: oklch(0.937 0.005 326);
30
+ --bg-section: #ffffff; --bg-section: oklch(1.000 0.000 90);
31
+
32
+ /* Backgrounds — light, Brand */
33
+ --bg-base-brand: #fcfcfe; --bg-base-brand: oklch(0.992 0.003 286);
34
+ --bg-pane-brand: #f7f6fd; --bg-pane-brand: oklch(0.976 0.009 293);
35
+ --bg-block-brand: #efeefc; --bg-block-brand: oklch(0.954 0.019 289);
36
+ --bg-spot-brand: #e9e5fa; --bg-spot-brand: oklch(0.931 0.028 295);
37
+
38
+ /* Backgrounds — light, Success */
39
+ --bg-base-success: #f7fcf9; --bg-base-success: oklch(0.986 0.007 160);
40
+ --bg-pane-success: #ecf9f0; --bg-pane-success: oklch(0.970 0.018 156);
41
+ --bg-block-success: #e2f5e8; --bg-block-success: oklch(0.953 0.026 156);
42
+ --bg-spot-success: #d9f2e0; --bg-spot-success: oklch(0.938 0.036 154);
43
+
44
+ /* Backgrounds — light, Critical */
45
+ --bg-base-critical: #fefbfb; --bg-base-critical: oklch(0.990 0.003 17);
46
+ --bg-pane-critical: #fdf2f2; --bg-pane-critical: oklch(0.970 0.012 17);
47
+ --bg-block-critical: #fcebeb; --bg-block-critical: oklch(0.954 0.019 17);
48
+ --bg-spot-critical: #fae5e5; --bg-spot-critical: oklch(0.939 0.023 18);
49
+
50
+ /* Backgrounds — light, Warning */
51
+ --bg-base-warning: #fefbf6; --bg-base-warning: oklch(0.989 0.007 81);
52
+ --bg-pane-warning: #fcf4e8; --bg-pane-warning: oklch(0.970 0.018 78);
53
+ --bg-block-warning: #fbeeda; --bg-block-warning: oklch(0.954 0.030 79);
54
+ --bg-spot-warning: #f9e7cd; --bg-spot-warning: oklch(0.936 0.040 77);
55
+
56
+ /* Backgrounds — light, Info */
57
+ --bg-base-info: #fbfcfe; --bg-base-info: oklch(0.991 0.003 265);
58
+ --bg-pane-info: #f2f7fd; --bg-pane-info: oklch(0.974 0.010 253);
59
+ --bg-block-info: #e9f3fb; --bg-block-info: oklch(0.959 0.015 242);
60
+ --bg-spot-info: #e1eefa; --bg-spot-info: oklch(0.943 0.021 246);
61
+
62
+ /* Text — light, neutral */
63
+ --text-1: #050306; --text-1: oklch(0.105 0.013 316);
64
+ --text-2: #302b31; --text-2: oklch(0.297 0.013 321);
65
+ --text-3: #635b65; --text-3: oklch(0.482 0.019 319);
66
+ --text-4: #878089; --text-4: oklch(0.609 0.016 319);
67
+ --text-5: #9f99a1; --text-5: oklch(0.691 0.013 318);
68
+
69
+ /* Text — light, Brand */
70
+ --text-1-brand: #2e1e7b; --text-1-brand: oklch(0.324 0.148 282);
71
+ --text-2-brand: #483493; --text-2-brand: oklch(0.405 0.149 287);
72
+ --text-3-brand: #483493cc; --text-3-brand: oklch(0.405 0.149 287 / 0.80);
73
+ --text-4-brand: #48349399; --text-4-brand: oklch(0.405 0.149 287 / 0.60);
74
+ --text-5-brand: #48349366; --text-5-brand: oklch(0.405 0.149 287 / 0.40);
75
+
76
+ /* Text — light, Success */
77
+ --text-1-success: #004618; --text-1-success: oklch(0.344 0.099 148);
78
+ --text-2-success: #1f5c31; --text-2-success: oklch(0.424 0.094 150);
79
+ --text-3-success: #1f5c31cc; --text-3-success: oklch(0.424 0.094 150 / 0.80);
80
+ --text-4-success: #1f5c3199; --text-4-success: oklch(0.424 0.094 150 / 0.60);
81
+ --text-5-success: #1f5c3166; --text-5-success: oklch(0.424 0.094 150 / 0.40);
82
+
83
+ /* Text — light, Critical */
84
+ --text-1-critical: #8f1014; --text-1-critical: oklch(0.416 0.159 27);
85
+ --text-2-critical: #a01c1c; --text-2-critical: oklch(0.458 0.167 27);
86
+ --text-3-critical: #a01c1ccc; --text-3-critical: oklch(0.458 0.167 27 / 0.80);
87
+ --text-4-critical: #a01c1c99; --text-4-critical: oklch(0.458 0.167 27 / 0.60);
88
+ --text-5-critical: #a01c1c66; --text-5-critical: oklch(0.458 0.167 27 / 0.40);
89
+
90
+ /* Text — light, Warning */
91
+ --text-1-warning: #7f410b; --text-1-warning: oklch(0.445 0.105 54);
92
+ --text-2-warning: #995200; --text-2-warning: oklch(0.513 0.122 59);
93
+ --text-3-warning: #995200cc; --text-3-warning: oklch(0.513 0.122 59 / 0.80);
94
+ --text-4-warning: #99520099; --text-4-warning: oklch(0.513 0.122 59 / 0.60);
95
+ --text-5-warning: #99520066; --text-5-warning: oklch(0.513 0.122 59 / 0.40);
96
+
97
+ /* Text — light, Info */
98
+ --text-1-info: #003969; --text-1-info: oklch(0.341 0.099 251);
99
+ --text-2-info: #175082; --text-2-info: oklch(0.422 0.101 249);
100
+ --text-3-info: #175082cc; --text-3-info: oklch(0.422 0.101 249 / 0.80);
101
+ --text-4-info: #175082b2; --text-4-info: oklch(0.422 0.101 249 / 0.70);
102
+ --text-5-info: #17508280; --text-5-info: oklch(0.422 0.101 249 / 0.50);
103
+
104
+ /* Borders — light, neutral */
105
+ --border-1: #ece9ec; --border-1: oklch(0.937 0.005 326);
106
+ --border-2: #e0dce0; --border-2: oklch(0.899 0.007 326);
107
+ --border-3: #d4ced4; --border-3: oklch(0.858 0.010 326);
108
+ --border-4: #c1b9c1; --border-4: oklch(0.795 0.014 326);
109
+ --border-5: #938d96; --border-5: oklch(0.651 0.015 315);
110
+
111
+ /* Borders — light, Brand */
112
+ --border-1-brand: #e9e5fa; --border-1-brand: oklch(0.931 0.028 295);
113
+ --border-2-brand: #ddd8f8; --border-2-brand: oklch(0.896 0.044 293);
114
+ --border-3-brand: #d2cbf6; --border-3-brand: oklch(0.862 0.060 293);
115
+ --border-4-brand: #bcb1f1; --border-4-brand: oklch(0.792 0.090 292);
116
+ --border-5-brand: #9081df; --border-5-brand: oklch(0.657 0.137 289);
117
+
118
+ /* Borders — light, Success */
119
+ --border-1-success: #d9f2e0; --border-1-success: oklch(0.938 0.036 154);
120
+ --border-2-success: #c6ecd1; --border-2-success: oklch(0.909 0.054 154);
121
+ --border-3-success: #b3e5c2; --border-3-success: oklch(0.878 0.071 154);
122
+ --border-4-success: #88d7a0; --border-4-success: oklch(0.813 0.110 153);
123
+ --border-5-success: #44c169; --border-5-success: oklch(0.721 0.167 150);
124
+
125
+ /* Borders — light, Critical */
126
+ --border-1-critical: #fae5e5; --border-1-critical: oklch(0.939 0.023 18);
127
+ --border-2-critical: #f7d4d4; --border-2-critical: oklch(0.899 0.039 18);
128
+ --border-3-critical: #f4c2c2; --border-3-critical: oklch(0.858 0.057 18);
129
+ --border-4-critical: #efa4a4; --border-4-critical: oklch(0.791 0.089 19);
130
+ --border-5-critical: #e56c6c; --border-5-critical: oklch(0.676 0.151 22);
131
+
132
+ /* Borders — light, Warning */
133
+ --border-1-warning: #f9e7cd; --border-1-warning: oklch(0.936 0.040 77);
134
+ --border-2-warning: #f6dbb1; --border-2-warning: oklch(0.903 0.062 79);
135
+ --border-3-warning: #f3cc91; --border-3-warning: oklch(0.865 0.087 78);
136
+ --border-4-warning: #edb25a; --border-4-warning: oklch(0.801 0.125 75);
137
+ --border-5-warning: #d88118; --border-5-warning: oklch(0.682 0.149 63);
138
+
139
+ /* Borders — light, Info */
140
+ --border-1-info: #e1eefa; --border-1-info: oklch(0.943 0.021 246);
141
+ --border-2-info: #cfe3f7; --border-2-info: oklch(0.907 0.035 248);
142
+ --border-3-info: #bad6f3; --border-3-info: oklch(0.865 0.050 249);
143
+ --border-4-info: #93c5ec; --border-4-info: oklch(0.802 0.076 242);
144
+ --border-5-info: #56a1e1; --border-5-info: oklch(0.688 0.121 246);
145
+
146
+ /* Prose link colors — used by <a-text> for priorities 1 & 2 and by
147
+ consumers wiring their own prose contexts. */
148
+ --link-color: oklch(0.50 0.20 248.58);
149
+ --link-color-hover: oklch(0.55 0.23 246.95);
150
+ }
151
+
152
+
153
+ .dark {
154
+ font-weight: 400;
155
+
156
+ /* Backgrounds — dark, neutral */
157
+ --bg-base: #100e11; --bg-base: oklch(0.168 0.007 315);
158
+ --bg-pane: #1d1a1e; --bg-pane: oklch(0.223 0.009 318);
159
+ --bg-block: #272329; --bg-block: oklch(0.263 0.012 315);
160
+ --bg-spot: #302b31; --bg-spot: oklch(0.297 0.013 321);
161
+ --bg-section: #171519; --bg-section: oklch(0.200 0.008 308);
162
+
163
+ /* Backgrounds — dark, Brand */
164
+ --bg-base-brand: #0f0c1d; --bg-base-brand: oklch(0.168 0.035 290);
165
+ --bg-pane-brand: #16122b; --bg-pane-brand: oklch(0.202 0.049 289);
166
+ --bg-block-brand: #1c1736; --bg-block-brand: oklch(0.229 0.058 288);
167
+ --bg-spot-brand: #201b3e; --bg-spot-brand: oklch(0.248 0.064 287);
168
+
169
+ /* Backgrounds — dark, Success */
170
+ --bg-base-success: #05140a; --bg-base-success: oklch(0.173 0.030 154);
171
+ --bg-pane-success: #081f0f; --bg-pane-success: oklch(0.215 0.043 151);
172
+ --bg-block-success: #0c2814; --bg-block-success: oklch(0.249 0.051 150);
173
+ --bg-spot-success: #0d2b16; --bg-spot-success: oklch(0.260 0.053 151);
174
+
175
+ /* Backgrounds — dark, Critical */
176
+ --bg-base-critical: #1f0506; --bg-base-critical: oklch(0.166 0.047 21);
177
+ --bg-pane-critical: #33090a; --bg-pane-critical: oklch(0.218 0.067 23);
178
+ --bg-block-critical: #400d0e; --bg-block-critical: oklch(0.251 0.079 24);
179
+ --bg-spot-critical: #471011; --bg-spot-critical: oklch(0.270 0.084 24);
180
+
181
+ /* Backgrounds — dark, Warning */
182
+ --bg-base-warning: #160d04; --bg-base-warning: oklch(0.168 0.025 69);
183
+ --bg-pane-warning: #241506; --bg-pane-warning: oklch(0.212 0.036 65);
184
+ --bg-block-warning: #2b1908; --bg-block-warning: oklch(0.233 0.040 62);
185
+ --bg-spot-warning: #311d0a; --bg-spot-warning: oklch(0.252 0.044 62);
186
+
187
+ /* Backgrounds — dark, Info */
188
+ --bg-base-info: #04111f; --bg-base-info: oklch(0.174 0.036 250);
189
+ --bg-pane-info: #071b2c; --bg-pane-info: oklch(0.216 0.043 247);
190
+ --bg-block-info: #092034; --bg-block-info: oklch(0.237 0.048 248);
191
+ --bg-spot-info: #0d273e; --bg-spot-info: oklch(0.265 0.054 248);
192
+
193
+ /* Text — dark, neutral */
194
+ --text-1: #ece9ec; --text-1: oklch(0.937 0.005 326);
195
+ --text-2: #c1b9c1; --text-2: oklch(0.795 0.014 326);
196
+ --text-3: #9f99a1; --text-3: oklch(0.691 0.013 318);
197
+ --text-4: #776e77; --text-4: oklch(0.549 0.018 326);
198
+ --text-5: #635b65; --text-5: oklch(0.482 0.019 319);
199
+
200
+ /* Text — dark, Brand */
201
+ --text-1-brand: #c5baff; --text-1-brand: oklch(0.822 0.097 291);
202
+ --text-2-brand: #ada0ee; --text-2-brand: oklch(0.746 0.111 291);
203
+ --text-3-brand: #ada0eecc; --text-3-brand: oklch(0.746 0.111 291 / 0.80);
204
+ --text-4-brand: #ada0ee99; --text-4-brand: oklch(0.746 0.111 291 / 0.60);
205
+ --text-5-brand: #ada0ee66; --text-5-brand: oklch(0.746 0.111 291 / 0.40);
206
+
207
+ /* Text — dark, Success */
208
+ --text-1-success: #9ddeb1; --text-1-success: oklch(0.845 0.091 154);
209
+ --text-2-success: #74cd8e; --text-2-success: oklch(0.776 0.125 152);
210
+ --text-3-success: #74cd8ecc; --text-3-success: oklch(0.776 0.125 152 / 0.80);
211
+ --text-4-success: #74cd8e99; --text-4-success: oklch(0.776 0.125 152 / 0.60);
212
+ --text-5-success: #74cd8e66; --text-5-success: oklch(0.776 0.125 152 / 0.40);
213
+
214
+ /* Text — dark, Critical */
215
+ --text-1-critical: #ffabac; --text-1-critical: oklch(0.823 0.099 19);
216
+ --text-2-critical: #e78e90; --text-2-critical: oklch(0.740 0.108 19);
217
+ --text-3-critical: #e78e90cc; --text-3-critical: oklch(0.740 0.108 19 / 0.80);
218
+ --text-4-critical: #e78e9099; --text-4-critical: oklch(0.740 0.108 19 / 0.60);
219
+ --text-5-critical: #e78e9066; --text-5-critical: oklch(0.740 0.108 19 / 0.40);
220
+
221
+ /* Text — dark, Warning */
222
+ --text-1-warning: #f0bf75; --text-1-warning: oklch(0.833 0.108 77);
223
+ --text-2-warning: #e1a452; --text-2-warning: oklch(0.761 0.122 72);
224
+ --text-3-warning: #e1a452cc; --text-3-warning: oklch(0.761 0.122 72 / 0.80);
225
+ --text-4-warning: #e1a45299; --text-4-warning: oklch(0.761 0.122 72 / 0.60);
226
+ --text-5-warning: #e1a45266; --text-5-warning: oklch(0.761 0.122 72 / 0.40);
227
+
228
+ /* Text — dark, Info */
229
+ --text-1-info: #9ed2ff; --text-1-info: oklch(0.844 0.083 245);
230
+ --text-2-info: #7db6e8; --text-2-info: oklch(0.756 0.094 246);
231
+ --text-3-info: #7db6e8cc; --text-3-info: oklch(0.756 0.094 246 / 0.80);
232
+ --text-4-info: #7db6e899; --text-4-info: oklch(0.756 0.094 246 / 0.60);
233
+ --text-5-info: #7db6e866; --text-5-info: oklch(0.756 0.094 246 / 0.40);
234
+
235
+ /* Borders — dark, neutral */
236
+ --border-1: #272329; --border-1: oklch(0.263 0.012 315);
237
+ --border-2: #3e3941; --border-2: oklch(0.353 0.015 313);
238
+ --border-3: #49424c; --border-3: oklch(0.390 0.019 316);
239
+ --border-4: #534c57; --border-4: oklch(0.427 0.020 313);
240
+ --border-5: #776e77; --border-5: oklch(0.549 0.018 326);
241
+
242
+ /* Borders — dark, Brand */
243
+ --border-1-brand: #251f47; --border-1-brand: oklch(0.269 0.072 287);
244
+ --border-2-brand: #2d2556; --border-2-brand: oklch(0.302 0.085 288);
245
+ --border-3-brand: #483493; --border-3-brand: oklch(0.405 0.149 287);
246
+ --border-4-brand: #503cb4; --border-4-brand: oklch(0.453 0.181 284);
247
+ --border-5-brand: #7460d7; --border-5-brand: oklch(0.569 0.175 287);
248
+
249
+ /* Borders — dark, Success */
250
+ --border-1-success: #0f321a; --border-1-success: oklch(0.284 0.060 151);
251
+ --border-2-success: #12391e; --border-2-success: oklch(0.309 0.065 151);
252
+ --border-3-success: #1f5c31; --border-3-success: oklch(0.424 0.094 150);
253
+ --border-4-success: #226737; --border-4-success: oklch(0.458 0.103 150);
254
+ --border-5-success: #329550; --border-5-success: oklch(0.595 0.138 150);
255
+
256
+ /* Borders — dark, Critical */
257
+ --border-1-critical: #531314; --border-1-critical: oklch(0.298 0.095 24);
258
+ --border-2-critical: #5d1819; --border-2-critical: oklch(0.325 0.100 24);
259
+ --border-3-critical: #a01c1c; --border-3-critical: oklch(0.458 0.167 27);
260
+ --border-4-critical: #b02120; --border-4-critical: oklch(0.492 0.179 27);
261
+ --border-5-critical: #de4545; --border-5-critical: oklch(0.610 0.190 25);
262
+
263
+ /* Borders — dark, Warning */
264
+ --border-1-warning: #37200b; --border-1-warning: oklch(0.269 0.048 61);
265
+ --border-2-warning: #3e250e; --border-2-warning: oklch(0.291 0.052 61);
266
+ --border-3-warning: #6a3b0c; --border-3-warning: oklch(0.403 0.087 60);
267
+ --border-4-warning: #7f410b; --border-4-warning: oklch(0.445 0.105 54);
268
+ --border-5-warning: #ae6613; --border-5-warning: oklch(0.579 0.127 62);
269
+
270
+ /* Borders — dark, Info */
271
+ --border-1-info: #0e2b44; --border-1-info: oklch(0.281 0.058 248);
272
+ --border-2-info: #12324f; --border-2-info: oklch(0.309 0.064 249);
273
+ --border-3-info: #175082; --border-3-info: oklch(0.422 0.101 249);
274
+ --border-4-info: #1a5b93; --border-4-info: oklch(0.461 0.111 249);
275
+ --border-5-info: #2686d9; --border-5-info: oklch(0.608 0.152 250);
276
+
277
+ /* Prose link colors — dark mode */
278
+ --link-color: oklch(0.72 0.15 248.65);
279
+ --link-color-hover: oklch(0.78 0.16 247.58);
280
+ }
281
+
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "@antadesign/anta",
3
- "version": "0.1.1-dev.1",
3
+ "version": "0.1.1-dev.4",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
- "files": ["dist"],
7
+ "files": [
8
+ "dist",
9
+ "NOTICES.md"
10
+ ],
11
+ "packageManager": "pnpm@8.13.1",
8
12
  "exports": {
9
13
  ".": {
10
14
  "types": "./dist/index.d.ts",
@@ -22,6 +26,9 @@
22
26
  "types": "./dist/elements/*.d.ts",
23
27
  "default": "./dist/elements/*.js"
24
28
  },
29
+ "./tokens.css": "./dist/tokens.css",
30
+ "./reset.css": "./dist/reset.css",
31
+ "./generate-icons.mjs": "./dist/generate-icons.mjs",
25
32
  "./*": {
26
33
  "types": "./dist/*.d.ts",
27
34
  "default": "./dist/*"
@@ -29,11 +36,14 @@
29
36
  },
30
37
  "scripts": {
31
38
  "build": "pnpm run build:js && pnpm run build:css && pnpm run build:types",
32
- "build:css": "cp src/elements/a-progress.css dist/elements/ && cp src/components/Progress.module.css dist/components/",
33
- "build:js": "esbuild src/components/Progress.tsx src/index.ts src/jsx-runtime.ts src/general_types.ts src/anta_helpers.ts src/elements/index.ts src/elements/a-progress.ts --outdir=dist --outbase=src --jsx=automatic --jsx-import-source=@antadesign/anta --format=esm --target=ES2022 --loader:.module.css=local-css --loader:.css=global-css",
39
+ "build:css": "cp src/elements/a-progress.css src/elements/a-text.css src/elements/a-icon.css src/elements/a-icon.shapes.css dist/elements/ && cp src/components/Progress.module.css src/components/Text.module.css dist/components/ && cp src/tokens.css src/reset.css dist/ && cp scripts/generate-icons.mjs dist/",
40
+ "build:js": "esbuild src/components/Progress.tsx src/components/Text.tsx src/components/Icon.tsx src/index.ts src/jsx-runtime.ts src/general_types.ts src/anta_helpers.ts src/elements/index.ts src/elements/a-progress.ts src/elements/a-text.ts src/elements/a-icon.ts src/elements/a-icon.shapes.ts --outdir=dist --outbase=src --jsx=automatic --jsx-import-source=@antadesign/anta --format=esm --target=ES2022 --loader:.module.css=local-css --loader:.css=global-css",
34
41
  "build:types": "tsc -p src/tsconfig.json",
35
42
  "typecheck": "tsc --noEmit -p src/tsconfig.json",
36
- "clean": "rm -rf dist"
43
+ "icons": "node scripts/generate-icons.mjs --input src/elements/icons --output src/elements --name a-icon.shapes --internal",
44
+ "clean": "rm -rf dist",
45
+ "prepare": "pnpm run build",
46
+ "prepublishOnly": "pnpm run build"
37
47
  },
38
48
  "devDependencies": {
39
49
  "@types/react": "^19.0.0",