@antadesign/anta 0.1.1-dev.2 → 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.
- package/LICENSE.md +21 -0
- package/README.md +30 -8
- package/dist/elements/a-icon.css +17 -15
- package/dist/elements/a-icon.shapes.css +278 -258
- package/dist/elements/a-icon.shapes.d.ts +5 -1
- package/dist/elements/a-icon.shapes.js +5 -0
- package/dist/elements/a-progress.css +69 -64
- package/dist/elements/a-text.css +76 -74
- package/dist/generate-icons.mjs +16 -4
- package/dist/reset.css +115 -0
- package/dist/{anta_global_tokens.css → tokens.css} +22 -70
- package/package.json +7 -4
|
@@ -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:
|
|
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);
|
|
@@ -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:
|
|
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: #
|
|
259
|
-
--text-4-success: #
|
|
260
|
-
--text-5-success: #
|
|
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: #
|
|
266
|
-
--text-4-critical: #
|
|
267
|
-
--text-5-critical: #
|
|
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: #
|
|
273
|
-
--text-4-warning: #
|
|
274
|
-
--text-5-warning: #
|
|
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);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antadesign/anta",
|
|
3
|
-
"version": "0.1.1-dev.
|
|
3
|
+
"version": "0.1.1-dev.4",
|
|
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
|
-
"./
|
|
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/
|
|
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",
|