@antadesign/anta 0.1.1-dev.2 → 0.1.1-dev.5

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.
@@ -1,9 +1,20 @@
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
+
1
12
  :root, .light {
2
13
  --sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
3
14
  --monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
4
15
 
5
16
  font-size: 15px;
6
- font-weight: 390;
17
+ font-weight: 400;
7
18
  font-feature-settings: 'ss02' on, 'ss05' on;
8
19
 
9
20
  /* Colors imported from Figma library "Anta 0.2" → "Dynamic colors" collection.
@@ -54,7 +65,6 @@
54
65
  --text-3: #635b65; --text-3: oklch(0.482 0.019 319);
55
66
  --text-4: #878089; --text-4: oklch(0.609 0.016 319);
56
67
  --text-5: #9f99a1; --text-5: oklch(0.691 0.013 318);
57
- --text-white: #ffffff; --text-white: oklch(1.000 0.000 90);
58
68
 
59
69
  /* Text — light, Brand */
60
70
  --text-1-brand: #2e1e7b; --text-1-brand: oklch(0.324 0.148 282);
@@ -92,46 +102,46 @@
92
102
  --text-5-info: #17508280; --text-5-info: oklch(0.422 0.101 249 / 0.50);
93
103
 
94
104
  /* Borders — light, neutral */
95
- --border-1: #ece9ec; --border-1: oklch(0.937 0.005 326);
96
- --border-2: #e0dce0; --border-2: oklch(0.899 0.007 326);
105
+ --border-1: #938d96; --border-1: oklch(0.651 0.015 315);
106
+ --border-2: #c1b9c1; --border-2: oklch(0.795 0.014 326);
97
107
  --border-3: #d4ced4; --border-3: oklch(0.858 0.010 326);
98
- --border-4: #c1b9c1; --border-4: oklch(0.795 0.014 326);
99
- --border-5: #938d96; --border-5: oklch(0.651 0.015 315);
108
+ --border-4: #e0dce0; --border-4: oklch(0.899 0.007 326);
109
+ --border-5: #ece9ec; --border-5: oklch(0.937 0.005 326);
100
110
 
101
111
  /* Borders — light, Brand */
102
- --border-1-brand: #e9e5fa; --border-1-brand: oklch(0.931 0.028 295);
103
- --border-2-brand: #ddd8f8; --border-2-brand: oklch(0.896 0.044 293);
112
+ --border-1-brand: #9081df; --border-1-brand: oklch(0.657 0.137 289);
113
+ --border-2-brand: #bcb1f1; --border-2-brand: oklch(0.792 0.090 292);
104
114
  --border-3-brand: #d2cbf6; --border-3-brand: oklch(0.862 0.060 293);
105
- --border-4-brand: #bcb1f1; --border-4-brand: oklch(0.792 0.090 292);
106
- --border-5-brand: #9081df; --border-5-brand: oklch(0.657 0.137 289);
115
+ --border-4-brand: #ddd8f8; --border-4-brand: oklch(0.896 0.044 293);
116
+ --border-5-brand: #e9e5fa; --border-5-brand: oklch(0.931 0.028 295);
107
117
 
108
118
  /* Borders — light, Success */
109
- --border-1-success: #d9f2e0; --border-1-success: oklch(0.938 0.036 154);
110
- --border-2-success: #c6ecd1; --border-2-success: oklch(0.909 0.054 154);
119
+ --border-1-success: #44c169; --border-1-success: oklch(0.721 0.167 150);
120
+ --border-2-success: #88d7a0; --border-2-success: oklch(0.813 0.110 153);
111
121
  --border-3-success: #b3e5c2; --border-3-success: oklch(0.878 0.071 154);
112
- --border-4-success: #88d7a0; --border-4-success: oklch(0.813 0.110 153);
113
- --border-5-success: #44c169; --border-5-success: oklch(0.721 0.167 150);
122
+ --border-4-success: #c6ecd1; --border-4-success: oklch(0.909 0.054 154);
123
+ --border-5-success: #d9f2e0; --border-5-success: oklch(0.938 0.036 154);
114
124
 
115
125
  /* Borders — light, Critical */
116
- --border-1-critical: #fae5e5; --border-1-critical: oklch(0.939 0.023 18);
117
- --border-2-critical: #f7d4d4; --border-2-critical: oklch(0.899 0.039 18);
126
+ --border-1-critical: #e56c6c; --border-1-critical: oklch(0.676 0.151 22);
127
+ --border-2-critical: #efa4a4; --border-2-critical: oklch(0.791 0.089 19);
118
128
  --border-3-critical: #f4c2c2; --border-3-critical: oklch(0.858 0.057 18);
119
- --border-4-critical: #efa4a4; --border-4-critical: oklch(0.791 0.089 19);
120
- --border-5-critical: #e56c6c; --border-5-critical: oklch(0.676 0.151 22);
129
+ --border-4-critical: #f7d4d4; --border-4-critical: oklch(0.899 0.039 18);
130
+ --border-5-critical: #fae5e5; --border-5-critical: oklch(0.939 0.023 18);
121
131
 
122
132
  /* Borders — light, Warning */
123
- --border-1-warning: #f9e7cd; --border-1-warning: oklch(0.936 0.040 77);
124
- --border-2-warning: #f6dbb1; --border-2-warning: oklch(0.903 0.062 79);
133
+ --border-1-warning: #d88118; --border-1-warning: oklch(0.682 0.149 63);
134
+ --border-2-warning: #edb25a; --border-2-warning: oklch(0.801 0.125 75);
125
135
  --border-3-warning: #f3cc91; --border-3-warning: oklch(0.865 0.087 78);
126
- --border-4-warning: #edb25a; --border-4-warning: oklch(0.801 0.125 75);
127
- --border-5-warning: #d88118; --border-5-warning: oklch(0.682 0.149 63);
136
+ --border-4-warning: #f6dbb1; --border-4-warning: oklch(0.903 0.062 79);
137
+ --border-5-warning: #f9e7cd; --border-5-warning: oklch(0.936 0.040 77);
128
138
 
129
139
  /* Borders — light, Info */
130
- --border-1-info: #e1eefa; --border-1-info: oklch(0.943 0.021 246);
131
- --border-2-info: #cfe3f7; --border-2-info: oklch(0.907 0.035 248);
140
+ --border-1-info: #56a1e1; --border-1-info: oklch(0.688 0.121 246);
141
+ --border-2-info: #93c5ec; --border-2-info: oklch(0.802 0.076 242);
132
142
  --border-3-info: #bad6f3; --border-3-info: oklch(0.865 0.050 249);
133
- --border-4-info: #93c5ec; --border-4-info: oklch(0.802 0.076 242);
134
- --border-5-info: #56a1e1; --border-5-info: oklch(0.688 0.121 246);
143
+ --border-4-info: #cfe3f7; --border-4-info: oklch(0.907 0.035 248);
144
+ --border-5-info: #e1eefa; --border-5-info: oklch(0.943 0.021 246);
135
145
 
136
146
  /* Prose link colors — used by <a-text> for priorities 1 & 2 and by
137
147
  consumers wiring their own prose contexts. */
@@ -139,66 +149,9 @@
139
149
  --link-color-hover: oklch(0.55 0.23 246.95);
140
150
  }
141
151
 
142
- h1, h2, h3, h4, h5, h6 {
143
- font-weight: 600;
144
- }
145
-
146
- strong {
147
- font-weight: 600;
148
- }
149
-
150
- /* Prose lists (ul, ol) get a tight 3ch left padding so markers hug the
151
- text, and items get a small bottom margin so consecutive ones breathe.
152
- Markers are toned all the way down to --text-5 since they are visual
153
- scaffolding, not content. */
154
- ul, ol {
155
- padding-left: 3ch;
156
- }
157
- :is(ul, ol) > li {
158
- margin-bottom: 0.5em;
159
- }
160
- :is(ul, ol) > li::marker {
161
- color: var(--text-5);
162
- }
163
-
164
- /* `<menu>` is for command/option lists, not prose. By default browsers
165
- render it like a `<ul>` (disc markers, 40px padding); we strip all of
166
- that so it's a clean semantic container ready to be styled. */
167
- menu {
168
- list-style: none;
169
- padding: 0;
170
- margin: 0;
171
- }
172
- menu > li {
173
- margin: 0;
174
- }
175
-
176
- /* Global link defaults. Hairline underline at 75% alpha; underline goes
177
- to currentColor (100%) and 1px on hover. Color comes from --link-color
178
- tokens, which auto-flip in dark mode. Components or specific contexts
179
- (nav, headings, buttons) should override as needed. */
180
- a, a:link, a:visited {
181
- color: var(--link-color);
182
- text-decoration: underline;
183
- text-decoration-style: solid;
184
- text-decoration-color: color-mix(in oklch, currentColor 75%, transparent);
185
- text-decoration-thickness: 0.5px;
186
- text-underline-offset: 3px;
187
- }
188
- a:hover {
189
- color: var(--link-color-hover);
190
- /* Underline color set to the hover token directly (rather than
191
- `currentColor`) so it repaints in lockstep with `color` — a few
192
- browsers latch onto the old currentColor value otherwise. */
193
- text-decoration-color: var(--link-color-hover);
194
- text-decoration-thickness: 1px;
195
- }
196
- a:active {
197
- text-decoration-color: color-mix(in oklch, currentColor 75%, transparent);
198
- }
199
152
 
200
153
  .dark {
201
- font-weight: 350;
154
+ font-weight: 400;
202
155
 
203
156
  /* Backgrounds — dark, neutral */
204
157
  --bg-base: #100e11; --bg-base: oklch(0.168 0.007 315);
@@ -243,7 +196,6 @@ a:active {
243
196
  --text-3: #9f99a1; --text-3: oklch(0.691 0.013 318);
244
197
  --text-4: #776e77; --text-4: oklch(0.549 0.018 326);
245
198
  --text-5: #635b65; --text-5: oklch(0.482 0.019 319);
246
- --text-white: #ffffff; --text-white: oklch(1.000 0.000 90);
247
199
 
248
200
  /* Text — dark, Brand */
249
201
  --text-1-brand: #c5baff; --text-1-brand: oklch(0.822 0.097 291);
@@ -255,23 +207,23 @@ a:active {
255
207
  /* Text — dark, Success */
256
208
  --text-1-success: #9ddeb1; --text-1-success: oklch(0.845 0.091 154);
257
209
  --text-2-success: #74cd8e; --text-2-success: oklch(0.776 0.125 152);
258
- --text-3-success: #71d08ecc; --text-3-success: oklch(0.782 0.131 152 / 0.80);
259
- --text-4-success: #71d08e99; --text-4-success: oklch(0.782 0.131 152 / 0.60);
260
- --text-5-success: #71d08e66; --text-5-success: oklch(0.782 0.131 152 / 0.40);
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);
261
213
 
262
214
  /* Text — dark, Critical */
263
215
  --text-1-critical: #ffabac; --text-1-critical: oklch(0.823 0.099 19);
264
216
  --text-2-critical: #e78e90; --text-2-critical: oklch(0.740 0.108 19);
265
- --text-3-critical: #e49091cc; --text-3-critical: oklch(0.740 0.102 19 / 0.80);
266
- --text-4-critical: #e4909199; --text-4-critical: oklch(0.740 0.102 19 / 0.60);
267
- --text-5-critical: #e4909166; --text-5-critical: oklch(0.740 0.102 19 / 0.40);
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);
268
220
 
269
221
  /* Text — dark, Warning */
270
222
  --text-1-warning: #f0bf75; --text-1-warning: oklch(0.833 0.108 77);
271
223
  --text-2-warning: #e1a452; --text-2-warning: oklch(0.761 0.122 72);
272
- --text-3-warning: #e9a135cc; --text-3-warning: oklch(0.762 0.145 73 / 0.80);
273
- --text-4-warning: #e9a13599; --text-4-warning: oklch(0.762 0.145 73 / 0.60);
274
- --text-5-warning: #e9a13566; --text-5-warning: oklch(0.762 0.145 73 / 0.40);
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);
275
227
 
276
228
  /* Text — dark, Info */
277
229
  --text-1-info: #9ed2ff; --text-1-info: oklch(0.844 0.083 245);
@@ -281,46 +233,46 @@ a:active {
281
233
  --text-5-info: #7db6e866; --text-5-info: oklch(0.756 0.094 246 / 0.40);
282
234
 
283
235
  /* Borders — dark, neutral */
284
- --border-1: #272329; --border-1: oklch(0.263 0.012 315);
285
- --border-2: #3e3941; --border-2: oklch(0.353 0.015 313);
236
+ --border-1: #776e77; --border-1: oklch(0.549 0.018 326);
237
+ --border-2: #534c57; --border-2: oklch(0.427 0.020 313);
286
238
  --border-3: #49424c; --border-3: oklch(0.390 0.019 316);
287
- --border-4: #534c57; --border-4: oklch(0.427 0.020 313);
288
- --border-5: #776e77; --border-5: oklch(0.549 0.018 326);
239
+ --border-4: #3e3941; --border-4: oklch(0.353 0.015 313);
240
+ --border-5: #272329; --border-5: oklch(0.263 0.012 315);
289
241
 
290
242
  /* Borders — dark, Brand */
291
- --border-1-brand: #251f47; --border-1-brand: oklch(0.269 0.072 287);
292
- --border-2-brand: #2d2556; --border-2-brand: oklch(0.302 0.085 288);
243
+ --border-1-brand: #7460d7; --border-1-brand: oklch(0.569 0.175 287);
244
+ --border-2-brand: #503cb4; --border-2-brand: oklch(0.453 0.181 284);
293
245
  --border-3-brand: #483493; --border-3-brand: oklch(0.405 0.149 287);
294
- --border-4-brand: #503cb4; --border-4-brand: oklch(0.453 0.181 284);
295
- --border-5-brand: #7460d7; --border-5-brand: oklch(0.569 0.175 287);
246
+ --border-4-brand: #2d2556; --border-4-brand: oklch(0.302 0.085 288);
247
+ --border-5-brand: #251f47; --border-5-brand: oklch(0.269 0.072 287);
296
248
 
297
249
  /* Borders — dark, Success */
298
- --border-1-success: #0f321a; --border-1-success: oklch(0.284 0.060 151);
299
- --border-2-success: #12391e; --border-2-success: oklch(0.309 0.065 151);
250
+ --border-1-success: #329550; --border-1-success: oklch(0.595 0.138 150);
251
+ --border-2-success: #226737; --border-2-success: oklch(0.458 0.103 150);
300
252
  --border-3-success: #1f5c31; --border-3-success: oklch(0.424 0.094 150);
301
- --border-4-success: #226737; --border-4-success: oklch(0.458 0.103 150);
302
- --border-5-success: #329550; --border-5-success: oklch(0.595 0.138 150);
253
+ --border-4-success: #12391e; --border-4-success: oklch(0.309 0.065 151);
254
+ --border-5-success: #0f321a; --border-5-success: oklch(0.284 0.060 151);
303
255
 
304
256
  /* Borders — dark, Critical */
305
- --border-1-critical: #531314; --border-1-critical: oklch(0.298 0.095 24);
306
- --border-2-critical: #5d1819; --border-2-critical: oklch(0.325 0.100 24);
257
+ --border-1-critical: #de4545; --border-1-critical: oklch(0.610 0.190 25);
258
+ --border-2-critical: #b02120; --border-2-critical: oklch(0.492 0.179 27);
307
259
  --border-3-critical: #a01c1c; --border-3-critical: oklch(0.458 0.167 27);
308
- --border-4-critical: #b02120; --border-4-critical: oklch(0.492 0.179 27);
309
- --border-5-critical: #de4545; --border-5-critical: oklch(0.610 0.190 25);
260
+ --border-4-critical: #5d1819; --border-4-critical: oklch(0.325 0.100 24);
261
+ --border-5-critical: #531314; --border-5-critical: oklch(0.298 0.095 24);
310
262
 
311
263
  /* Borders — dark, Warning */
312
- --border-1-warning: #37200b; --border-1-warning: oklch(0.269 0.048 61);
313
- --border-2-warning: #3e250e; --border-2-warning: oklch(0.291 0.052 61);
264
+ --border-1-warning: #ae6613; --border-1-warning: oklch(0.579 0.127 62);
265
+ --border-2-warning: #7f410b; --border-2-warning: oklch(0.445 0.105 54);
314
266
  --border-3-warning: #6a3b0c; --border-3-warning: oklch(0.403 0.087 60);
315
- --border-4-warning: #7f410b; --border-4-warning: oklch(0.445 0.105 54);
316
- --border-5-warning: #ae6613; --border-5-warning: oklch(0.579 0.127 62);
267
+ --border-4-warning: #3e250e; --border-4-warning: oklch(0.291 0.052 61);
268
+ --border-5-warning: #37200b; --border-5-warning: oklch(0.269 0.048 61);
317
269
 
318
270
  /* Borders — dark, Info */
319
- --border-1-info: #0e2b44; --border-1-info: oklch(0.281 0.058 248);
320
- --border-2-info: #12324f; --border-2-info: oklch(0.309 0.064 249);
271
+ --border-1-info: #2686d9; --border-1-info: oklch(0.608 0.152 250);
272
+ --border-2-info: #1a5b93; --border-2-info: oklch(0.461 0.111 249);
321
273
  --border-3-info: #175082; --border-3-info: oklch(0.422 0.101 249);
322
- --border-4-info: #1a5b93; --border-4-info: oklch(0.461 0.111 249);
323
- --border-5-info: #2686d9; --border-5-info: oklch(0.608 0.152 250);
274
+ --border-4-info: #12324f; --border-4-info: oklch(0.309 0.064 249);
275
+ --border-5-info: #0e2b44; --border-5-info: oklch(0.281 0.058 248);
324
276
 
325
277
  /* Prose link colors — dark mode */
326
278
  --link-color: oklch(0.72 0.15 248.65);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antadesign/anta",
3
- "version": "0.1.1-dev.2",
3
+ "version": "0.1.1-dev.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,7 +26,8 @@
26
26
  "types": "./dist/elements/*.d.ts",
27
27
  "default": "./dist/elements/*.js"
28
28
  },
29
- "./anta_global_tokens.css": "./dist/anta_global_tokens.css",
29
+ "./tokens.css": "./dist/tokens.css",
30
+ "./reset.css": "./dist/reset.css",
30
31
  "./generate-icons.mjs": "./dist/generate-icons.mjs",
31
32
  "./*": {
32
33
  "types": "./dist/*.d.ts",
@@ -35,12 +36,14 @@
35
36
  },
36
37
  "scripts": {
37
38
  "build": "pnpm run build:js && pnpm run build:css && pnpm run build:types",
38
- "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/anta_global_tokens.css dist/ && cp scripts/generate-icons.mjs dist/",
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/",
39
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",
40
41
  "build:types": "tsc -p src/tsconfig.json",
41
42
  "typecheck": "tsc --noEmit -p src/tsconfig.json",
42
43
  "icons": "node scripts/generate-icons.mjs --input src/elements/icons --output src/elements --name a-icon.shapes --internal",
43
- "clean": "rm -rf dist"
44
+ "clean": "rm -rf dist",
45
+ "prepare": "pnpm run build",
46
+ "prepublishOnly": "pnpm run build"
44
47
  },
45
48
  "devDependencies": {
46
49
  "@types/react": "^19.0.0",