@antadesign/anta 0.3.25 → 0.3.27
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 +26 -28
- package/dist/anta_helpers.d.ts +4 -0
- package/dist/anta_helpers.js +17 -3
- package/dist/box-types.d.ts +161 -0
- package/dist/box-types.js +0 -0
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +25 -25
- package/dist/capture-types.d.ts +156 -0
- package/dist/capture-types.js +0 -0
- package/dist/components/Box.d.ts +52 -0
- package/dist/components/Box.js +55 -0
- package/dist/components/Capture.d.ts +39 -0
- package/dist/components/Capture.js +36 -0
- package/dist/components/capture-props.d.ts +30 -0
- package/dist/components/capture-props.js +44 -0
- package/dist/elements/a-avatar.css +1 -1
- package/dist/elements/a-banner.css +1 -1
- package/dist/elements/a-banner.js +4 -4
- package/dist/elements/a-box.css +1 -0
- package/dist/elements/a-box.d.ts +41 -0
- package/dist/elements/a-box.js +584 -0
- package/dist/elements/a-button.css +1 -1
- package/dist/elements/a-calendar.js +2 -2
- package/dist/elements/a-capture.css +1 -0
- package/dist/elements/a-capture.d.ts +10 -0
- package/dist/elements/a-capture.js +24 -0
- package/dist/elements/a-card.css +1 -1
- package/dist/elements/a-checkbox.css +1 -1
- package/dist/elements/a-checkbox.js +4 -4
- package/dist/elements/a-dialog.css +1 -1
- package/dist/elements/a-expander.css +1 -1
- package/dist/elements/a-expander.js +2 -2
- package/dist/elements/a-input-time.css +1 -1
- package/dist/elements/a-input-time.js +3 -3
- package/dist/elements/a-input.css +1 -1
- package/dist/elements/a-input.js +6 -6
- package/dist/elements/a-menu-item.css +1 -1
- package/dist/elements/a-menu-item.js +3 -3
- package/dist/elements/a-menu.css +1 -1
- package/dist/elements/a-menu.js +2 -2
- package/dist/elements/a-radio-group.js +3 -3
- package/dist/elements/a-radio.css +1 -1
- package/dist/elements/a-slider.css +1 -1
- package/dist/elements/a-slider.js +6 -6
- package/dist/elements/a-switch.css +1 -1
- package/dist/elements/a-switch.js +2 -2
- package/dist/elements/a-tabpanel.js +2 -2
- package/dist/elements/a-tabs.css +1 -1
- package/dist/elements/a-tabs.js +6 -6
- package/dist/elements/a-tag.css +1 -1
- package/dist/elements/a-text.css +1 -1
- package/dist/elements/a-title.css +1 -1
- package/dist/elements/a-toast.js +2 -2
- package/dist/elements/a-tooltip.css +1 -1
- package/dist/elements/a-tooltip.d.ts +4 -3
- package/dist/elements/a-tooltip.js +9 -5
- package/dist/elements/capture-input.d.ts +5 -0
- package/dist/elements/capture-input.js +609 -0
- package/dist/elements/index.d.ts +2 -0
- package/dist/elements/index.js +6 -0
- package/dist/general_types.d.ts +70 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4 -0
- package/dist/jsx-runtime.d.ts +3 -1
- package/docs/accessibility.md +24 -0
- package/docs/changelog.md +45 -3
- package/docs/colors.md +141 -0
- package/docs/comparison.md +463 -28
- package/docs/components/avatar.md +364 -0
- package/docs/components/banner.md +13 -27
- package/docs/components/box.md +354 -0
- package/docs/components/breadcrumbs.md +7 -6
- package/docs/components/button.md +48 -37
- package/docs/components/capture.md +345 -0
- package/docs/components/card.md +17 -38
- package/docs/components/checkbox.md +16 -39
- package/docs/components/dialog.md +14 -36
- package/docs/components/expander.md +15 -40
- package/docs/components/icon.md +111 -9
- package/docs/components/input-autocomplete.md +9 -11
- package/docs/components/input-date.md +33 -23
- package/docs/components/input-time.md +15 -23
- package/docs/components/input.md +27 -76
- package/docs/components/loader.md +7 -5
- package/docs/components/menu.md +73 -77
- package/docs/components/progress.md +10 -14
- package/docs/components/radio.md +17 -36
- package/docs/components/select-faceted.md +7 -25
- package/docs/components/select.md +24 -97
- package/docs/components/slider.md +16 -21
- package/docs/components/steps.md +38 -8
- package/docs/components/switch.md +11 -14
- package/docs/components/tabs.md +52 -40
- package/docs/components/tag.md +11 -22
- package/docs/components/text.md +10 -23
- package/docs/components/title.md +7 -8
- package/docs/components/toaster.md +6 -3
- package/docs/components/tooltip.md +13 -23
- package/docs/index.md +6 -3
- package/docs/install-config.md +24 -0
- package/docs/normalization.md +45 -0
- package/docs/packages/stickers.md +56 -0
- package/docs/theming.md +270 -0
- package/package.json +3 -1
package/docs/index.md
CHANGED
|
@@ -21,6 +21,7 @@ Anta is designed for a clean DOM. Prefer the props and attributes exposed by eac
|
|
|
21
21
|
- [Tag](./components/tag.md)
|
|
22
22
|
- [Tooltip](./components/tooltip.md)
|
|
23
23
|
- [Icon](./components/icon.md)
|
|
24
|
+
- [Avatar](./components/avatar.md)
|
|
24
25
|
- [Loader](./components/loader.md)
|
|
25
26
|
- [Progress](./components/progress.md)
|
|
26
27
|
|
|
@@ -33,9 +34,6 @@ Anta is designed for a clean DOM. Prefer the props and attributes exposed by eac
|
|
|
33
34
|
- [Tabs](./components/tabs.md)
|
|
34
35
|
- [Steps](./components/steps.md)
|
|
35
36
|
|
|
36
|
-
- [Expander](./components/expander.md)
|
|
37
|
-
- [Menu](./components/menu.md)
|
|
38
|
-
|
|
39
37
|
- [Input](./components/input.md)
|
|
40
38
|
- [InputAutocomplete](./components/input-autocomplete.md)
|
|
41
39
|
- [InputDate](./components/input-date.md)
|
|
@@ -47,6 +45,11 @@ Anta is designed for a clean DOM. Prefer the props and attributes exposed by eac
|
|
|
47
45
|
- [Card](./components/card.md)
|
|
48
46
|
- [Dialog](./components/dialog.md)
|
|
49
47
|
- [Toaster](./components/toaster.md)
|
|
48
|
+
- [Expander](./components/expander.md)
|
|
49
|
+
- [Menu](./components/menu.md)
|
|
50
|
+
|
|
51
|
+
- [Box](./components/box.md)
|
|
52
|
+
- [Capture](./components/capture.md)
|
|
50
53
|
|
|
51
54
|
## Packages
|
|
52
55
|
|
package/docs/install-config.md
CHANGED
|
@@ -93,6 +93,30 @@ Token custom properties stay unlayered so they apply everywhere.
|
|
|
93
93
|
> `@layer base { … }`; `reset.css` already applies the same universal reset in
|
|
94
94
|
> `@layer anta.reset`.
|
|
95
95
|
|
|
96
|
+
## AI setup
|
|
97
|
+
|
|
98
|
+
Anta includes version-matched Markdown documentation in its npm package.
|
|
99
|
+
Append this section to your application's agent instruction file, such as
|
|
100
|
+
`AGENTS.md`, `CLAUDE.md`, or your tool's equivalent. Keep existing project rules:
|
|
101
|
+
|
|
102
|
+
```md
|
|
103
|
+
## Anta
|
|
104
|
+
|
|
105
|
+
Before Anta UI work, read
|
|
106
|
+
`node_modules/@antadesign/anta/docs/index.md`
|
|
107
|
+
and the pages relevant to the task.
|
|
108
|
+
Verify component names, imports, props, and event signatures against the
|
|
109
|
+
installed documentation and TypeScript declarations. Do not infer Anta APIs
|
|
110
|
+
from similarly named components in other libraries.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The path is relative to the application directory where Anta is installed.
|
|
114
|
+
Adjust it for your workspace or package-manager layout. Installing Anta does
|
|
115
|
+
not modify your agent configuration.
|
|
116
|
+
|
|
117
|
+
For tools without local file access, provide the [web documentation index](https://anta.design/llms.txt)
|
|
118
|
+
and your installed Anta version. Web documentation may describe a newer release.
|
|
119
|
+
|
|
96
120
|
## Registering elements
|
|
97
121
|
|
|
98
122
|
JSX wrappers render `<a-*>` tags. Register their classes before those tags reach
|
package/docs/normalization.md
CHANGED
|
@@ -105,7 +105,52 @@ Or import both and override only the pieces you want (unlayered, or in a later l
|
|
|
105
105
|
The reset gives headings, lists, links, and tables the same baseline as Anta
|
|
106
106
|
components. Omit it when your own reset should control them.
|
|
107
107
|
|
|
108
|
+
## Default HTML tags
|
|
109
|
+
|
|
108
110
|
Tags styled by the reset, rendered live.
|
|
109
111
|
|
|
112
|
+
This specimen shows the native tags styled by `reset.css`:
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<div class="specimen">
|
|
116
|
+
<h2>Heading two</h2>
|
|
117
|
+
<h3>Heading three</h3>
|
|
118
|
+
<h4>Heading four</h4>
|
|
119
|
+
<p>
|
|
120
|
+
Body text with <a href="/normalization">a link</a>, <strong>strong</strong>,
|
|
121
|
+
<em>em</em>, <code>inline code</code>, <kbd>Ctrl</kbd>, <samp>samp output</samp>,
|
|
122
|
+
<dfn>a defined term</dfn>, <small>small print</small>, <mark>mark</mark>,
|
|
123
|
+
<abbr title="Cascading Style Sheets">abbr</abbr>, <del>deleted</del>,
|
|
124
|
+
<ins>inserted</ins>, the variable <var>w</var>, H<sub>2</sub>O and x<sup>2</sup>.
|
|
125
|
+
</p>
|
|
126
|
+
<blockquote>A blockquote, marked by a rule rather than an indent.</blockquote>
|
|
127
|
+
<ul>
|
|
128
|
+
<li>Unordered item</li>
|
|
129
|
+
<li>Second item</li>
|
|
130
|
+
</ul>
|
|
131
|
+
<ol>
|
|
132
|
+
<li>Ordered item</li>
|
|
133
|
+
<li>Second item</li>
|
|
134
|
+
</ol>
|
|
135
|
+
<dl>
|
|
136
|
+
<dt>Term</dt>
|
|
137
|
+
<dd>Definition</dd>
|
|
138
|
+
</dl>
|
|
139
|
+
<pre><code>a code block</code></pre>
|
|
140
|
+
<table>
|
|
141
|
+
<caption>Table caption</caption>
|
|
142
|
+
<thead>
|
|
143
|
+
<tr><th>Header</th><th>Another</th></tr>
|
|
144
|
+
</thead>
|
|
145
|
+
<tbody>
|
|
146
|
+
<tr><td>Cell</td><td>Cell</td></tr>
|
|
147
|
+
<tr><td>Cell</td><td>Cell</td></tr>
|
|
148
|
+
</tbody>
|
|
149
|
+
</table>
|
|
150
|
+
<figure><figcaption>A figcaption</figcaption></figure>
|
|
151
|
+
<hr />
|
|
152
|
+
</div>
|
|
153
|
+
```
|
|
154
|
+
|
|
110
155
|
`abbr`, `q`, and `cite` keep browser typographic styles. `dd` has no browser indent
|
|
111
156
|
because the reset clears margins. The reset adds no `kbd` typography.
|
|
@@ -21,6 +21,60 @@ npm install @antadesign/stickers # pulls @antadesign/anta + lottie-web
|
|
|
21
21
|
|
|
22
22
|
The full set is also published as a [Telegram sticker pack](https://t.me/addstickers/SnoutyAntithesis).
|
|
23
23
|
|
|
24
|
+
## Available stickers
|
|
25
|
+
|
|
26
|
+
| Name | Static export | Animated export | Asset imports |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| Angry | `StickerAngry` | `StickerAngryAnimated` | `@antadesign/stickers/angry`, `@antadesign/stickers/angry-animated` |
|
|
29
|
+
| Ask | `StickerAsk` | `StickerAskAnimated` | `@antadesign/stickers/ask`, `@antadesign/stickers/ask-animated` |
|
|
30
|
+
| Balance | `StickerBalance` | `StickerBalanceAnimated` | `@antadesign/stickers/balance`, `@antadesign/stickers/balance-animated` |
|
|
31
|
+
| Butterfly | `StickerButterfly` | `StickerButterflyAnimated` | `@antadesign/stickers/butterfly`, `@antadesign/stickers/butterfly-animated` |
|
|
32
|
+
| ButterflySnake | `StickerButterflySnake` | `StickerButterflySnakeAnimated` | `@antadesign/stickers/butterfly-snake`, `@antadesign/stickers/butterfly-snake-animated` |
|
|
33
|
+
| Catch | `StickerCatch` | `StickerCatchAnimated` | `@antadesign/stickers/catch`, `@antadesign/stickers/catch-animated` |
|
|
34
|
+
| Clap | `StickerClap` | `StickerClapAnimated` | `@antadesign/stickers/clap`, `@antadesign/stickers/clap-animated` |
|
|
35
|
+
| Coding | `StickerCoding` | `StickerCodingAnimated` | `@antadesign/stickers/coding`, `@antadesign/stickers/coding-animated` |
|
|
36
|
+
| Cowboy | `StickerCowboy` | `StickerCowboyAnimated` | `@antadesign/stickers/cowboy`, `@antadesign/stickers/cowboy-animated` |
|
|
37
|
+
| Dance | `StickerDance` | `StickerDanceAnimated` | `@antadesign/stickers/dance`, `@antadesign/stickers/dance-animated` |
|
|
38
|
+
| Detective | `StickerDetective` | `StickerDetectiveAnimated` | `@antadesign/stickers/detective`, `@antadesign/stickers/detective-animated` |
|
|
39
|
+
| Disapprove | `StickerDisapprove` | `StickerDisapproveAnimated` | `@antadesign/stickers/disapprove`, `@antadesign/stickers/disapprove-animated` |
|
|
40
|
+
| Distracted | `StickerDistracted` | `StickerDistractedAnimated` | `@antadesign/stickers/distracted`, `@antadesign/stickers/distracted-animated` |
|
|
41
|
+
| Dive | `StickerDive` | `StickerDiveAnimated` | `@antadesign/stickers/dive`, `@antadesign/stickers/dive-animated` |
|
|
42
|
+
| Eat | `StickerEat` | `StickerEatAnimated` | `@antadesign/stickers/eat`, `@antadesign/stickers/eat-animated` |
|
|
43
|
+
| Facepalm | `StickerFacepalm` | `StickerFacepalmAnimated` | `@antadesign/stickers/facepalm`, `@antadesign/stickers/facepalm-animated` |
|
|
44
|
+
| Failed | `StickerFailed` | `StickerFailedAnimated` | `@antadesign/stickers/failed`, `@antadesign/stickers/failed-animated` |
|
|
45
|
+
| Found | `StickerFound` | `StickerFoundAnimated` | `@antadesign/stickers/found`, `@antadesign/stickers/found-animated` |
|
|
46
|
+
| Grow | `StickerGrow` | `StickerGrowAnimated` | `@antadesign/stickers/grow`, `@antadesign/stickers/grow-animated` |
|
|
47
|
+
| Handstand | `StickerHandstand` | `StickerHandstandAnimated` | `@antadesign/stickers/handstand`, `@antadesign/stickers/handstand-animated` |
|
|
48
|
+
| Heart | `StickerHeart` | `StickerHeartAnimated` | `@antadesign/stickers/heart`, `@antadesign/stickers/heart-animated` |
|
|
49
|
+
| Hello | `StickerHello` | `StickerHelloAnimated` | `@antadesign/stickers/hello`, `@antadesign/stickers/hello-animated` |
|
|
50
|
+
| Idea | `StickerIdea` | `StickerIdeaAnimated` | `@antadesign/stickers/idea`, `@antadesign/stickers/idea-animated` |
|
|
51
|
+
| Laugh | `StickerLaugh` | `StickerLaughAnimated` | `@antadesign/stickers/laugh`, `@antadesign/stickers/laugh-animated` |
|
|
52
|
+
| Love | `StickerLove` | `StickerLoveAnimated` | `@antadesign/stickers/love`, `@antadesign/stickers/love-animated` |
|
|
53
|
+
| Nap | `StickerNap` | `StickerNapAnimated` | `@antadesign/stickers/nap`, `@antadesign/stickers/nap-animated` |
|
|
54
|
+
| Party | `StickerParty` | `StickerPartyAnimated` | `@antadesign/stickers/party`, `@antadesign/stickers/party-animated` |
|
|
55
|
+
| Passed | `StickerPassed` | `StickerPassedAnimated` | `@antadesign/stickers/passed`, `@antadesign/stickers/passed-animated` |
|
|
56
|
+
| Peekaboo | `StickerPeekaboo` | `StickerPeekabooAnimated` | `@antadesign/stickers/peekaboo`, `@antadesign/stickers/peekaboo-animated` |
|
|
57
|
+
| Pizza | `StickerPizza` | `StickerPizzaAnimated` | `@antadesign/stickers/pizza`, `@antadesign/stickers/pizza-animated` |
|
|
58
|
+
| Puzzle | `StickerPuzzle` | `StickerPuzzleAnimated` | `@antadesign/stickers/puzzle`, `@antadesign/stickers/puzzle-animated` |
|
|
59
|
+
| Sad | `StickerSad` | `StickerSadAnimated` | `@antadesign/stickers/sad`, `@antadesign/stickers/sad-animated` |
|
|
60
|
+
| Scared | `StickerScared` | `StickerScaredAnimated` | `@antadesign/stickers/scared`, `@antadesign/stickers/scared-animated` |
|
|
61
|
+
| Scroll | `StickerScroll` | `StickerScrollAnimated` | `@antadesign/stickers/scroll`, `@antadesign/stickers/scroll-animated` |
|
|
62
|
+
| Search | `StickerSearch` | `StickerSearchAnimated` | `@antadesign/stickers/search`, `@antadesign/stickers/search-animated` |
|
|
63
|
+
| Shield | `StickerShield` | `StickerShieldAnimated` | `@antadesign/stickers/shield`, `@antadesign/stickers/shield-animated` |
|
|
64
|
+
| Shocked | `StickerShocked` | `StickerShockedAnimated` | `@antadesign/stickers/shocked`, `@antadesign/stickers/shocked-animated` |
|
|
65
|
+
| Sleep | `StickerSleep` | `StickerSleepAnimated` | `@antadesign/stickers/sleep`, `@antadesign/stickers/sleep-animated` |
|
|
66
|
+
| Stressed | `StickerStressed` | `StickerStressedAnimated` | `@antadesign/stickers/stressed`, `@antadesign/stickers/stressed-animated` |
|
|
67
|
+
| Suspicious | `StickerSuspicious` | `StickerSuspiciousAnimated` | `@antadesign/stickers/suspicious`, `@antadesign/stickers/suspicious-animated` |
|
|
68
|
+
| Thanks | `StickerThanks` | `StickerThanksAnimated` | `@antadesign/stickers/thanks`, `@antadesign/stickers/thanks-animated` |
|
|
69
|
+
| Think | `StickerThink` | `StickerThinkAnimated` | `@antadesign/stickers/think`, `@antadesign/stickers/think-animated` |
|
|
70
|
+
| ThinkOfYou | `StickerThinkOfYou` | `StickerThinkOfYouAnimated` | `@antadesign/stickers/think-of-you`, `@antadesign/stickers/think-of-you-animated` |
|
|
71
|
+
| ThumbsUp | `StickerThumbsUp` | `StickerThumbsUpAnimated` | `@antadesign/stickers/thumbs-up`, `@antadesign/stickers/thumbs-up-animated` |
|
|
72
|
+
| Vacation | `StickerVacation` | `StickerVacationAnimated` | `@antadesign/stickers/vacation`, `@antadesign/stickers/vacation-animated` |
|
|
73
|
+
| Wait | `StickerWait` | `StickerWaitAnimated` | `@antadesign/stickers/wait`, `@antadesign/stickers/wait-animated` |
|
|
74
|
+
| Wink | `StickerWink` | `StickerWinkAnimated` | `@antadesign/stickers/wink`, `@antadesign/stickers/wink-animated` |
|
|
75
|
+
| Work | `StickerWork` | `StickerWorkAnimated` | `@antadesign/stickers/work`, `@antadesign/stickers/work-animated` |
|
|
76
|
+
| Zen | `StickerZen` | `StickerZenAnimated` | `@antadesign/stickers/zen`, `@antadesign/stickers/zen-animated` |
|
|
77
|
+
|
|
24
78
|
## Props
|
|
25
79
|
|
|
26
80
|
Both flavors share the same base props; the animated flavor adds playback props.
|
|
@@ -45,6 +99,8 @@ Same as the static base, plus:
|
|
|
45
99
|
| `playOnce?` | `boolean` | Plays once and holds the final frame instead of looping. |
|
|
46
100
|
| `replayOnClick?` | `boolean` | With `playOnce`, lets people click or press Enter/Space to replay the animation. The sticker becomes a labeled button. |
|
|
47
101
|
|
|
102
|
+
## Web Component
|
|
103
|
+
|
|
48
104
|
Use the web component directly when you are not using React or Preact and a native control does not fit.
|
|
49
105
|
|
|
50
106
|
Pass the generated SVG payload to `<a-sticker>` and set a size through
|
package/docs/theming.md
CHANGED
|
@@ -29,3 +29,273 @@ overrides them without `!important`, and shadow-DOM components expose
|
|
|
29
29
|
its rest, hover, and active values. Each component page lists its styling hooks.
|
|
30
30
|
|
|
31
31
|
The lab below shows the derivation live. For each toned component, the shipped Default sits next to a Custom preview driven by the seed picker, with the formula constants editable and the resolved CSS shown.
|
|
32
|
+
|
|
33
|
+
## Theming lab reference
|
|
34
|
+
|
|
35
|
+
The lab varies a tone seed and formula inputs in light and dark mode. These inputs describe the lab's calculations. For application styling, use tone props, global role tokens, CSS, and the parts documented on each component page.
|
|
36
|
+
|
|
37
|
+
| Tone | Seed property | Initial lab seed |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| neutral | `--anta-seed-neutral` | `#635b65` |
|
|
40
|
+
| brand | `--anta-seed-brand` | `#5f4bc3` |
|
|
41
|
+
| info | `--anta-seed-info` | `#1f6eb2` |
|
|
42
|
+
| success | `--anta-seed-success` | `#2a7e43` |
|
|
43
|
+
| warning | `--anta-seed-warning` | `#c37416` |
|
|
44
|
+
| critical | `--anta-seed-critical` | `#c9302c` |
|
|
45
|
+
|
|
46
|
+
### Background and Borders
|
|
47
|
+
|
|
48
|
+
The container background and border role scales, derived from the source hue. Backgrounds sit near the page lightness with a faint tint that grows per step; borders step down in lightness from a saturated edge (border-1) to the faint bg-5, chroma easing off as they lighten. Neutral zeroes chroma to stay grey.
|
|
49
|
+
|
|
50
|
+
#### Background
|
|
51
|
+
|
|
52
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
53
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
54
|
+
| bg-1 L | 1 | 0 | 1 | 0 | 0–1 | 0.005 | |
|
|
55
|
+
| bg-2 L | 0.99 | 0.13 | 0.985 | 0.16 | 0–1 | 0.005 | |
|
|
56
|
+
| bg-2 C | 0.004 | 0.02 | 0.002 | 0.002 | 0–0.4 | 0.005 | |
|
|
57
|
+
| bg-3 L | 0.972 | 0.17 | 0.97 | 0.177 | 0–1 | 0.005 | |
|
|
58
|
+
| bg-3 C | 0.011 | 0.035 | 0.004 | 0.005 | 0–0.4 | 0.005 | |
|
|
59
|
+
| bg-4 L | 0.955 | 0.185 | 0.954 | 0.191 | 0–1 | 0.005 | |
|
|
60
|
+
| bg-4 C | 0.02 | 0.05 | 0.004 | 0.006 | 0–0.4 | 0.005 | |
|
|
61
|
+
| bg-5 L | 0.935 | 0.205 | 0.935 | 0.2 | 0–1 | 0.005 | |
|
|
62
|
+
| bg-5 C | 0.03 | 0.055 | 0.006 | 0.009 | 0–0.4 | 0.005 | |
|
|
63
|
+
|
|
64
|
+
#### Border
|
|
65
|
+
|
|
66
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
67
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
68
|
+
| border-1 L | 0.67 | 0.52 | 0.67 | 0.52 | 0–1 | 0.005 | |
|
|
69
|
+
| border-1 C | 0.13 | 0.15 | 0.008 | 0.008 | 0–0.4 | 0.005 | |
|
|
70
|
+
| border-2 L | 0.8 | 0.41 | 0.8 | 0.41 | 0–1 | 0.005 | |
|
|
71
|
+
| border-2 C | 0.09 | 0.12 | 0.008 | 0.008 | 0–0.4 | 0.005 | |
|
|
72
|
+
| border-3 L | 0.86 | 0.33 | 0.86 | 0.33 | 0–1 | 0.005 | |
|
|
73
|
+
| border-3 C | 0.055 | 0.09 | 0.008 | 0.008 | 0–0.4 | 0.005 | |
|
|
74
|
+
| border-4 L | 0.9 | 0.26 | 0.9 | 0.26 | 0–1 | 0.005 | |
|
|
75
|
+
| border-4 C | 0.04 | 0.06 | 0.008 | 0.008 | 0–0.4 | 0.005 | |
|
|
76
|
+
| border-5 L | 0.935 | 0.21 | 0.935 | 0.21 | 0–1 | 0.005 | |
|
|
77
|
+
| border-5 C | 0.028 | 0.045 | 0.008 | 0.008 | 0–0.4 | 0.005 | |
|
|
78
|
+
|
|
79
|
+
### Text
|
|
80
|
+
|
|
81
|
+
The text color role scale, derived from the source hue. text-1 is the strong primary; text-2 the base (secondary); text-3/4 step text-2 down by alpha — Title and Text read text-1..4 as their priorities. text-5 is the faintest step (text-2 at a lower alpha), used for disabled / hint text across components, not a Title/Text priority.
|
|
82
|
+
|
|
83
|
+
#### Primary
|
|
84
|
+
|
|
85
|
+
text-1.
|
|
86
|
+
|
|
87
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
88
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
89
|
+
| text-1 L | 0.38 | 0.85 | 0.1 | 0.94 | 0–1 | 0.005 | |
|
|
90
|
+
| text-1 C | 0.11 | 0.1 | 0.01 | 0.008 | 0–0.4 | 0.005 | |
|
|
91
|
+
|
|
92
|
+
#### Secondary
|
|
93
|
+
|
|
94
|
+
text-2 base.
|
|
95
|
+
|
|
96
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
97
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
98
|
+
| text-2 L | 0.43 | 0.77 | 0.3 | 0.8 | 0–1 | 0.005 | |
|
|
99
|
+
| text-2 C | 0.15 | 0.11 | 0.015 | 0.015 | 0–0.4 | 0.005 | |
|
|
100
|
+
|
|
101
|
+
#### Tertiary
|
|
102
|
+
|
|
103
|
+
text-2 base at this alpha (→ text-3).
|
|
104
|
+
|
|
105
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
106
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
107
|
+
| text-3 α % | 82 | 80 | 82 | 80 | 0–100 | 1 | |
|
|
108
|
+
|
|
109
|
+
#### Quaternary
|
|
110
|
+
|
|
111
|
+
text-2 base at this alpha (→ text-4).
|
|
112
|
+
|
|
113
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
114
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
115
|
+
| text-4 α % | 60 | 60 | 60 | 60 | 0–100 | 1 | |
|
|
116
|
+
|
|
117
|
+
#### Faint (text-5)
|
|
118
|
+
|
|
119
|
+
text-2 base at this alpha (→ text-5) — the disabled / hint step, not a Title/Text priority.
|
|
120
|
+
|
|
121
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
122
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
123
|
+
| text-5 α % | 40 | 40 | 40 | 40 | 0–100 | 1 | |
|
|
124
|
+
|
|
125
|
+
### Buttons
|
|
126
|
+
|
|
127
|
+
Primary is the source fill at three lightnesses. Secondary, tertiary, and quaternary share one foreground; secondary and tertiary share an alpha-tinted fill (tertiary a step softer, transparent at rest), quaternary has none. Secondary’s label subtracts an l-shift to read a step stronger than its tint.
|
|
128
|
+
|
|
129
|
+
#### Primary
|
|
130
|
+
|
|
131
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
132
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
133
|
+
| L rest | 0.51 | 0.4 | 0.5 | 0.4 | 0–1 | 0.005 | |
|
|
134
|
+
| L hover | 0.46 | 0.44 | 0.45 | 0.44 | 0–1 | 0.005 | |
|
|
135
|
+
| L active | 0.41 | 0.48 | 0.4 | 0.48 | 0–1 | 0.005 | |
|
|
136
|
+
| fill C | 0.17 | 0.16 | 0.02 | 0.015 | 0–0.4 | 0.005 | One chroma for the primary fill across rest/hover/active. Neutral pins it near-grey; toned versions set the saturation here instead of inheriting the seed’s own chroma. |
|
|
137
|
+
|
|
138
|
+
#### Secondary
|
|
139
|
+
|
|
140
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
141
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
142
|
+
| fg L | 0.46 | 0.86 | 0.46 | 0.86 | 0–1 | 0.005 | |
|
|
143
|
+
| fg L hover | 0.4 | 0.86 | 0.4 | 0.86 | 0–1 | 0.005 | |
|
|
144
|
+
| fg C | 0.17 | 0.13 | 0.008 | 0.015 | 0–0.4 | 0.005 | |
|
|
145
|
+
| fg l-shift | 0.05 | 0 | 0.05 | 0 | 0–0.3 | 0.005 | Subtracted from the secondary label’s OKLCH lightness so it reads one step stronger than the tint behind it. |
|
|
146
|
+
| tint L | 0.54 | 0.58 | 0.54 | 0.44 | 0–1 | 0.005 | |
|
|
147
|
+
| tint C | 0.17 | 0.16 | 0.03 | 0.01 | 0–0.4 | 0.005 | |
|
|
148
|
+
| α rest | 0.1 | 0.215 | 0.1 | 0.24 | 0–1 | 0.005 | |
|
|
149
|
+
| α hover | 0.15 | 0.29 | 0.15 | 0.34 | 0–1 | 0.005 | |
|
|
150
|
+
| α active | 0.2 | 0.34 | 0.2 | 0.44 | 0–1 | 0.005 | |
|
|
151
|
+
|
|
152
|
+
#### Tertiary
|
|
153
|
+
|
|
154
|
+
Reuses the secondary foreground + tint (no separate Anta constant).
|
|
155
|
+
|
|
156
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
157
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
158
|
+
| fg L | 0.46 | 0.86 | 0.46 | 0.86 | 0–1 | 0.005 | |
|
|
159
|
+
| fg L hover | 0.4 | 0.86 | 0.4 | 0.86 | 0–1 | 0.005 | |
|
|
160
|
+
| fg C | 0.17 | 0.13 | 0.008 | 0.015 | 0–0.4 | 0.005 | |
|
|
161
|
+
| tint L | 0.54 | 0.58 | 0.54 | 0.44 | 0–1 | 0.005 | |
|
|
162
|
+
| tint C | 0.17 | 0.16 | 0.03 | 0.01 | 0–0.4 | 0.005 | |
|
|
163
|
+
| α rest | 0.1 | 0.215 | 0.1 | 0.24 | 0–1 | 0.005 | |
|
|
164
|
+
| α hover | 0.15 | 0.29 | 0.15 | 0.34 | 0–1 | 0.005 | |
|
|
165
|
+
|
|
166
|
+
#### Quaternary
|
|
167
|
+
|
|
168
|
+
Rest (and active) is the tertiary foreground at the rest α; hover uses its own detached lightness at full opacity. No fill.
|
|
169
|
+
|
|
170
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
171
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
172
|
+
| fg L | 0.46 | 0.86 | 0.46 | 0.86 | 0–1 | 0.005 | |
|
|
173
|
+
| fg C | 0.17 | 0.13 | 0.008 | 0.015 | 0–0.4 | 0.005 | |
|
|
174
|
+
| hover L | 0.38 | 0.9 | 0.38 | 0.9 | 0–1 | 0.005 | Quaternary hover lightness, detached from tertiary — its own value, not the shared secondary fg-hover. Rest and active carry the rest α; hover is opaque. |
|
|
175
|
+
| α rest | 0.85 | 0.85 | 0.85 | 0.85 | 0–1 | 0.005 | Alpha on the quaternary rest (and active) foreground. Light-mode neutral needs ≈0.83 to clear WCAG AA (4.5:1) over bg-2. |
|
|
176
|
+
|
|
177
|
+
### Tags
|
|
178
|
+
|
|
179
|
+
Primary is a solid fill; secondary an alpha tint of the tint hue; tertiary an outline. The label and edge are the Text scale — edge = --text-2, label = --text-2 at the label α (80 → --text-3), tunable per Tag (e.g. raise it for small-text contrast). The tint and solid fill are the Tag’s own (source hue at these L/C); alphas set each priority’s strength.
|
|
180
|
+
|
|
181
|
+
#### Primary
|
|
182
|
+
|
|
183
|
+
Solid fill; white label.
|
|
184
|
+
|
|
185
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
186
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
187
|
+
| solid L | 0.58 | 0.46 | 0.55 | 0.48 | 0–1 | 0.005 | |
|
|
188
|
+
| solid C | 0.175 | 0.165 | 0.015 | 0.015 | 0–0.4 | 0.005 | Chroma of the primary solid fill, independent of the secondary tint’s C. Neutral pins it near-grey. |
|
|
189
|
+
|
|
190
|
+
#### Secondary
|
|
191
|
+
|
|
192
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
193
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
194
|
+
| tint L | 0.57 | 0.63 | 0.55 | 0.63 | 0–1 | 0.005 | |
|
|
195
|
+
| tint C | 0.16 | 0.17 | 0.03 | 0.04 | 0–0.4 | 0.005 | |
|
|
196
|
+
| fill α % | 10 | 20 | 10 | 20 | 0–100 | 1 | |
|
|
197
|
+
| border α % | 15 | 25 | 15 | 25 | 0–100 | 1 | |
|
|
198
|
+
|
|
199
|
+
#### Tertiary
|
|
200
|
+
|
|
201
|
+
Outline alpha; the edge color is --text-2.
|
|
202
|
+
|
|
203
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
204
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
205
|
+
| edge α % | 20 | 30 | 20 | 30 | 0–100 | 1 | |
|
|
206
|
+
|
|
207
|
+
#### Label
|
|
208
|
+
|
|
209
|
+
Label = --text-2 at this alpha (80 → --text-3). Raise for small-text contrast.
|
|
210
|
+
|
|
211
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
212
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
213
|
+
| label α % | 80 | 80 | 80 | 80 | 0–100 | 1 | |
|
|
214
|
+
|
|
215
|
+
### Tabs
|
|
216
|
+
|
|
217
|
+
The strip’s primary/secondary/tertiary differ structurally (filled track vs subtle vs underline). Labels and rings are the role scale: selected/hover = --text-1, rest = --text-2 at the rest α (80 → --text-3), tertiary hover = --text-2, track ring = --border-4, selected ring = --border-2, selected pill = --bg-1. Only the recessed track tint, secondary fill, and the rest α are the Tabs’ own — the knobs below.
|
|
218
|
+
|
|
219
|
+
#### Track & fill
|
|
220
|
+
|
|
221
|
+
The recessed track tint (primary) and the selected secondary fill — a faint overlay of the source hue.
|
|
222
|
+
|
|
223
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
224
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
225
|
+
| fill L | 0.55 | 0.8 | 0.55 | 0.8 | 0–1 | 0.005 | |
|
|
226
|
+
| fill C | 0.14 | 0.12 | 0.008 | 0.008 | 0–0.4 | 0.005 | |
|
|
227
|
+
| track α | 0.06 | 0.07 | 0.06 | 0.07 | 0–1 | 0.005 | |
|
|
228
|
+
| fill α | 0.03 | 0.08 | 0.03 | 0.08 | 0–1 | 0.005 | |
|
|
229
|
+
|
|
230
|
+
#### Rest label
|
|
231
|
+
|
|
232
|
+
Non-selected label = --text-2 at this alpha (80 → --text-3). Selected/hover use full --text-1.
|
|
233
|
+
|
|
234
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
235
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
236
|
+
| rest α % | 80 | 80 | 80 | 80 | 0–100 | 1 | |
|
|
237
|
+
|
|
238
|
+
### Checkboxes
|
|
239
|
+
|
|
240
|
+
Hoisted to --_tone-l-* inputs: the checked fill is the source at three lightnesses. The off-state box border ramps off that fill mixed toward neutral grey. On = toneSelected; off = tone.
|
|
241
|
+
|
|
242
|
+
#### Fill
|
|
243
|
+
|
|
244
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
245
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
246
|
+
| L rest | 0.5 | 0.45 | 0.6 | 0.42 | 0–1 | 0.005 | |
|
|
247
|
+
| L hover | 0.45 | 0.5 | 0.45 | 0.45 | 0–1 | 0.005 | |
|
|
248
|
+
| L active | 0.4 | 0.57 | 0.4 | 0.5 | 0–1 | 0.005 | |
|
|
249
|
+
|
|
250
|
+
### Radio
|
|
251
|
+
|
|
252
|
+
Identical fill curve to Checkbox: --_tone-l-* set the selected dot at three lightnesses, and the off-ring border ramps off it. Group toneSelected drives the picked option.
|
|
253
|
+
|
|
254
|
+
#### Fill
|
|
255
|
+
|
|
256
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
257
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
258
|
+
| L rest | 0.5 | 0.45 | 0.6 | 0.42 | 0–1 | 0.005 | |
|
|
259
|
+
| L hover | 0.45 | 0.5 | 0.45 | 0.45 | 0–1 | 0.005 | |
|
|
260
|
+
| L active | 0.4 | 0.57 | 0.4 | 0.5 | 0–1 | 0.005 | |
|
|
261
|
+
|
|
262
|
+
### Expander
|
|
263
|
+
|
|
264
|
+
Every color is a role token; the Expander defines none of its own. Label: rest --text-2, hover --text-1 (Title’s secondary/primary). Fill and border are the surface scale (secondary --bg-2 / --border-5, primary --bg-4 / --border-4), and the fill lightens a step on hover. Tertiary is text only, all themed per tone.
|
|
265
|
+
|
|
266
|
+
### Input
|
|
267
|
+
|
|
268
|
+
One border color from the seed hue at a tunable L/C — the goal is a single L/C per theme that works across every tone. Hover thickens the edge 0.5→1px (no recolor). Neutral overrides pin it grey (≈ --border-2). Applies to Input and the InputDate trigger (both compose <a-input>).
|
|
269
|
+
|
|
270
|
+
#### Border
|
|
271
|
+
|
|
272
|
+
Seed hue at this L/C (hover thickens the edge, no recolor). Toned starts at the average of today’s per-status literals; neutral pins grey ≈ --border-2.
|
|
273
|
+
|
|
274
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
275
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
276
|
+
| border L | 0.58 | 0.52 | 0.8 | 0.4 | 0–1 | 0.005 | |
|
|
277
|
+
| border C | 0.18 | 0.15 | 0.015 | 0.019 | 0–0.4 | 0.005 | |
|
|
278
|
+
|
|
279
|
+
### Menu items
|
|
280
|
+
|
|
281
|
+
The item label is --text-2; the hint and icon are --text-2 at the hint α (80 → --text-3), so the text follows the Text spec while the hint strength stays tunable. The selected row holds a persistent tint of the label color — its alpha is the Menu’s own knob too.
|
|
282
|
+
|
|
283
|
+
#### Text
|
|
284
|
+
|
|
285
|
+
Label is full --text-2; hint + icon are --text-2 at this alpha (80 → --text-3).
|
|
286
|
+
|
|
287
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
288
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
289
|
+
| hint α % | 80 | 80 | 80 | 80 | 0–100 | 1 | |
|
|
290
|
+
|
|
291
|
+
#### Selected
|
|
292
|
+
|
|
293
|
+
Tint held on the selected row — a % of the item color (--text-2).
|
|
294
|
+
|
|
295
|
+
| Input | Toned light | Toned dark | Neutral light | Neutral dark | Range | Step | Meaning |
|
|
296
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
297
|
+
| selected α % | 9 | 12 | 9 | 12 | 0–100 | 1 | |
|
|
298
|
+
|
|
299
|
+
### Progress
|
|
300
|
+
|
|
301
|
+
Every color is a role token; Progress defines none of its own. Track = --bg-4, border = --border-4, the fill indicator = --bg-5, the label = --text-2, and the right-aligned hint = --text-3. Named tones swap in the matching -{tone} role variant (so dark mode is free), and the fill’s right-edge fades from --bg-5 to --border-4. Follows the Text and Background & Borders panels live.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antadesign/anta",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -62,6 +62,8 @@
|
|
|
62
62
|
"dev:run": "echo $$ > \"$ANTA_DEV_PID_FILE\"; trap 'rm -f \"$ANTA_DEV_PID_FILE\"' EXIT; pnpm run build:dev && pnpm --filter @antadesign/stickers run build:dev && pnpm --filter anta-site run docs && (node scripts/dev-watch.mjs & pnpm --filter anta-site run dev:server & wait)",
|
|
63
63
|
"stop": "node scripts/dev-stop.mjs",
|
|
64
64
|
"typecheck": "tsc --noEmit -p src/tsconfig.json",
|
|
65
|
+
"test": "node --test tests/*.test.mjs",
|
|
66
|
+
"test:capture-input": "node --test tests/capture-input.test.mjs",
|
|
65
67
|
"lint": "node scripts/lint-getters.mjs && node scripts/lint-css-layers.mjs",
|
|
66
68
|
"verify": "pnpm run lint && pnpm run typecheck && pnpm --filter anta-site run docs:api",
|
|
67
69
|
"icons": "node scripts/generate-icons.mjs --input src/elements/icons --output src/elements --name a-icon.shapes --internal",
|