@antadesign/anta 0.3.18 → 0.3.19

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.
Files changed (59) hide show
  1. package/README.md +38 -242
  2. package/dist/components/Input.d.ts +4 -1
  3. package/dist/components/Input.js +2 -0
  4. package/dist/components/InputDate.css +1 -0
  5. package/dist/components/InputDate.d.ts +1 -0
  6. package/dist/components/InputDate.js +5 -5
  7. package/dist/components/Menu.d.ts +5 -1
  8. package/dist/components/Menu.js +3 -2
  9. package/dist/components/Select.d.ts +1 -0
  10. package/dist/components/Select.js +9 -13
  11. package/dist/components/SelectFaceted.d.ts +1 -0
  12. package/dist/components/SelectFaceted.js +29 -23
  13. package/dist/components/select-parts.css +1 -0
  14. package/dist/elements/a-input.css +1 -1
  15. package/dist/elements/a-menu.js +12 -0
  16. package/dist/elements/a-slider.css +1 -1
  17. package/dist/elements/a-tabs.css +1 -1
  18. package/dist/elements/a-tabs.d.ts +3 -0
  19. package/dist/elements/a-tabs.js +40 -1
  20. package/dist/general_types.d.ts +2 -0
  21. package/dist/jsx-runtime.d.ts +9 -0
  22. package/docs/accessibility.md +34 -0
  23. package/docs/changelog.md +551 -0
  24. package/docs/colors.md +42 -0
  25. package/docs/comparison.md +28 -0
  26. package/docs/components/banner.md +267 -0
  27. package/docs/components/button.md +603 -0
  28. package/docs/components/card.md +322 -0
  29. package/docs/components/checkbox.md +297 -0
  30. package/docs/components/dialog.md +314 -0
  31. package/docs/components/expander.md +529 -0
  32. package/docs/components/icon.md +155 -0
  33. package/docs/components/input-autocomplete.md +101 -0
  34. package/docs/components/input-date.md +406 -0
  35. package/docs/components/input-time.md +174 -0
  36. package/docs/components/input.md +610 -0
  37. package/docs/components/loader.md +139 -0
  38. package/docs/components/menu.md +447 -0
  39. package/docs/components/progress.md +182 -0
  40. package/docs/components/radio.md +369 -0
  41. package/docs/components/select-faceted.md +456 -0
  42. package/docs/components/select.md +931 -0
  43. package/docs/components/slider.md +142 -0
  44. package/docs/components/switch.md +198 -0
  45. package/docs/components/tabs.md +471 -0
  46. package/docs/components/tag.md +185 -0
  47. package/docs/components/text.md +148 -0
  48. package/docs/components/title.md +146 -0
  49. package/docs/components/toaster.md +313 -0
  50. package/docs/components/tooltip.md +177 -0
  51. package/docs/credits.md +22 -0
  52. package/docs/index.md +52 -0
  53. package/docs/install-config.md +240 -0
  54. package/docs/normalization.md +105 -0
  55. package/docs/overview.md +10 -0
  56. package/docs/packages/stickers.md +187 -0
  57. package/docs/packages/table.md +153 -0
  58. package/docs/theming.md +13 -0
  59. package/package.json +10 -6
@@ -0,0 +1,551 @@
1
+ # Changelog
2
+
3
+ This page tracks changes that ship in `@antadesign/anta`. Documentation-only
4
+ changes are not listed.
5
+
6
+ ## 0.3.19 — August 3, 2026
7
+
8
+ ### Added
9
+
10
+ - The package now ships version-specific Markdown documentation under `docs/`.
11
+ Its README directs coding agents to the installed documentation index.
12
+
13
+ ### Changed
14
+
15
+ - Native `data-anta` select popups now follow Menu styling for their surface,
16
+ option sizing, colours, and 1px item spacing when customizable selects are
17
+ supported.
18
+
19
+ ### Fixed
20
+
21
+ - Sliding Tab indicators no longer animate through stale geometry while their
22
+ strip is resized.
23
+ - Slider focus rings now surround only the range control, rather than the
24
+ complete Slider host.
25
+
26
+ ## 0.3.18 — August 1, 2026
27
+
28
+ ### Changed
29
+
30
+ - The Anta theme's `--focus-ring` now follows its brand text color.
31
+ - `reset.css` gives plain keyboard-focused HTML the 1px Anta focus ring.
32
+
33
+ ### Added
34
+
35
+ - `Loader` provides animated icon-sized feedback, determinate circular progress,
36
+ a `speed` prop, and the `loader` icon-shape alias for string-only icon props.
37
+ - `Progress` shows an indeterminate loading animation when `value` is omitted
38
+ or set to `false`.
39
+ - `Progress` supports `small`, `medium`, and `large` sizes.
40
+ - Native HTML `<progress>` elements opt into the Progress appearance with
41
+ `data-anta`.
42
+
43
+ ### Fixed
44
+
45
+ - Custom `Progress` tones now use the same track, fill, and edge progression as
46
+ named tones in light and dark themes.
47
+
48
+ ## 0.3.17 — July 31, 2026
49
+
50
+ ### Added
51
+
52
+ - `Slider`, a single-value form control with relative rail dragging, configurable
53
+ value placement, text markers, sizes, tones, shared corner radii, CSS parts for
54
+ thumb and track styling, and an opt-in `data-anta` treatment for native ranges.
55
+
56
+ ### Breaking
57
+
58
+ - Anta now requires Chrome or Edge 125, Safari 17.4, or Firefox 126 for
59
+ custom-element states and the `:state()` selector.
60
+
61
+ ### Changed
62
+
63
+ - `InputTime` segments now use native text inputs. They retain native caret,
64
+ selection, paste, and IME behavior while keeping Anta's locale-aware layout
65
+ and cross-segment navigation.
66
+ - No-icon `ButtonCopy` leaves its button unchanged and shows a cursor-near
67
+ success label. Set `copiedLabel` to change the label text.
68
+
69
+ ## 0.3.16 — July 29, 2026
70
+
71
+ ### Added
72
+
73
+ - `Switch`, a binary control with `tone`, `toneSelected`, `hint`, and `round`.
74
+ - The `dollar-sign` icon.
75
+ - Native HTML form controls opt into Anta chrome with `data-anta`, including
76
+ text-like and date/time inputs, file pickers, submit/reset buttons, checkboxes,
77
+ radios, details disclosures, and customizable selects.
78
+ - Native `data-anta` controls accept matching visual variants, including choice
79
+ control sizes and tones, field sizing and rounding, and Expander surfaces and
80
+ levels.
81
+
82
+ ### Changed
83
+
84
+ - In forced-colors mode, Anta controls and surfaces use system colours and
85
+ visible borders for their interactive, selected, and disabled states,
86
+ including icons, inputs, buttons, tags, choice controls, tabs, Expanders,
87
+ Cards, Dialogs, Banners, Progress, and Tooltips.
88
+ - Switch tracks use a real 1.5px border instead of an inset shadow.
89
+
90
+ ### Fixed
91
+
92
+ - No-icon `ButtonCopy` feedback now keeps a wrapping label's width and line breaks.
93
+ - Native HTML radio labels use Anta's 8px control gap and vertically centred
94
+ alignment.
95
+ - `InputAutocomplete` now commits the highlighted suggestion when users press
96
+ Arrow keys then Enter.
97
+ - `a-input` forwards its native `input` event across the shadow boundary in
98
+ browsers that do not compose it automatically.
99
+ - Direct controls in an Expander's `actions` slot retain their Anta styling.
100
+ - A Banner's built-in dismiss button now follows the Banner's `round` setting.
101
+
102
+ ## 0.3.15 — July 28, 2026
103
+
104
+ ### Added
105
+
106
+ - `Toaster` and `Toast` for managed notifications. Add a `Toaster`, then use its
107
+ manager to add, update, dismiss, or clear toast content.
108
+
109
+ ### Changed
110
+
111
+ - Static trailing input adornments are inset. Trailing buttons remain flush with
112
+ the field edge.
113
+
114
+ ## 0.3.14 — July 28, 2026
115
+
116
+ ### Added
117
+
118
+ - `Select` supports verbose multi-value summaries and `renderSummary`.
119
+ - `Banner`, a dismissible status strip with optional actions and tones.
120
+ - `StateChangeEvent` from `@antadesign/anta/anta_helpers`.
121
+
122
+ ### Changed
123
+
124
+ - `Select` shows `All` when every enabled option is selected. `SelectFaceted`
125
+ summaries now truncate instead of widening their trigger.
126
+
127
+ ### Fixed
128
+
129
+ - Text inputs inside menu items accept spaces. Text facets preserve typed spaces.
130
+
131
+ ## 0.3.13 — July 25, 2026
132
+
133
+ ### Added
134
+
135
+ - Seed tokens for the neutral, brand, info, success, warning, and critical
136
+ colour scales.
137
+ - `theme-anta.css`, an opt-in stylesheet that restores the former palette.
138
+ - Default styling for raw `dfn` elements.
139
+
140
+ ### Changed
141
+
142
+ - The default palette now derives from the six seed tokens. Import
143
+ `theme-anta.css` to keep the former palette.
144
+ - Tooltips wait 300ms by default and option tooltips follow the pointer.
145
+ - Expanders scroll wide body content instead of overflowing their container.
146
+
147
+ ### Breaking
148
+
149
+ - `Text` and `Title` no longer support `priority="quinary"`. Use
150
+ `quaternary` or style the raw element with `--text-5`.
151
+
152
+ ### Fixed
153
+
154
+ - Validation status takes precedence over an input's custom `tone`.
155
+ - Tabs no longer move the page when their selection changes.
156
+ - Tabs and radio groups initialise correctly after a client-side HTML swap.
157
+ - `Button` accepts `href={undefined}` without a type error.
158
+
159
+ ## 0.3.12 — July 23, 2026
160
+
161
+ ### Breaking
162
+
163
+ - Copy behaviour moved from `Button` and `MenuItem` to `a-copy`. Replace
164
+ `<Button copy={value}>` with `<ButtonCopy copy={value}>`, or compose
165
+ `<a-copy>` inside a control.
166
+
167
+ ### Added
168
+
169
+ - `Select` and `SelectFaceted` accept string, number, and boolean option values.
170
+ - Menu placement and offset controls for `Menu`, `Select`, `SelectFaceted`, and
171
+ `InputDate`.
172
+ - The standalone `a-copy` element and `ButtonCopy.iconPlacement`.
173
+
174
+ ### Fixed
175
+
176
+ - Nested popups work inside menu flyouts. Tooltips outside an open menu stay
177
+ hidden.
178
+ - Expander titles preserve the typography of custom title nodes.
179
+
180
+ ## 0.3.11 — July 21, 2026
181
+
182
+ ### Breaking
183
+
184
+ - `copyLazy` is removed. Keep `copy` reactive and update it from
185
+ `onCopyRequest` before activation.
186
+ - Link-mode `Button` and `MenuItem` types reject copy props.
187
+
188
+ ### Added
189
+
190
+ - `copyUrl` and `copyWithUrl` for copy controls.
191
+ - `placement` and `offset` for `Select` and `SelectFaceted`.
192
+
193
+ ### Changed
194
+
195
+ - Keyboard activation occurs on key release, matching native buttons.
196
+
197
+ ### Fixed
198
+
199
+ - Context menus do not open through a modal or popover.
200
+ - Interactive controls inside an Expander title no longer toggle the Expander.
201
+
202
+ ## 0.3.10 — July 20, 2026
203
+
204
+ ### Added
205
+
206
+ - `ButtonCopy` and `MenuItemCopy` for copying strings or DOM content.
207
+
208
+ ### Changed
209
+
210
+ - `Title` no longer adds margins. Add spacing on its container or use a raw
211
+ heading for document prose.
212
+ - `Text` and `Title` use `--sans-serif` directly.
213
+
214
+ ## 0.3.9 — July 17, 2026
215
+
216
+ ### Added
217
+
218
+ - The `settings` icon.
219
+ - Link-mode `MenuItem` through `href`.
220
+ - Anta styling for native `<button data-anta>` elements.
221
+
222
+ ### Fixed
223
+
224
+ - Buttons keep their height in constrained flex layouts.
225
+
226
+ ## 0.3.8 — July 16, 2026
227
+
228
+ ### Added
229
+
230
+ - `Card`, a toned content surface with media, header, body, footer, and link
231
+ support.
232
+
233
+ ### Changed
234
+
235
+ - `Text` and `Title` accept custom CSS colours as `tone` values.
236
+
237
+ ### Fixed
238
+
239
+ - Stateful controls no longer close a controlled Dialog.
240
+ - `round={0}` applies square corners across components.
241
+ - Empty `tone` values on Text, Title, and Tag resolve to neutral styling.
242
+
243
+ ## 0.3.7 — July 15, 2026
244
+
245
+ ### Changed
246
+
247
+ - Read-only inputs show their focus ring only after keyboard focus.
248
+
249
+ ### Fixed
250
+
251
+ - Menus open from keyboard interactions without synthesizing a click.
252
+
253
+ ## 0.3.6 — July 13, 2026
254
+
255
+ ### Added
256
+
257
+ - `Dialog`, including modal, drawer, and fullscreen positions.
258
+ - `InputAutocomplete`, a free-text ARIA combobox with suggestions.
259
+ - Optional `role` overrides for Menu, MenuItem, and Input.
260
+
261
+ ### Changed
262
+
263
+ - Multiple Select and SelectFaceted controls show Select all by default. Pass
264
+ `selectAll={false}` to remove it.
265
+ - `SelectFaceted` supports `toneSelected` and Alt/Option-click to isolate a
266
+ multiple-choice facet.
267
+
268
+ ### Fixed
269
+
270
+ - Tooltips close when their content is removed.
271
+
272
+ ## 0.3.5 — July 13, 2026
273
+
274
+ ### Added
275
+
276
+ - `SelectFaceted`, a controlled or uncontrolled faceted filter.
277
+ - `InputTime`, a form-associated segmented time input.
278
+ - `Menu.autoWidth` and `TabOption.tooltip`.
279
+
280
+ ### Changed
281
+
282
+ - `InputDate` uses `InputTime` for time editing and follows controlled values in
283
+ its calendar view.
284
+ - Tabs share Button's size scale and use a lighter track treatment.
285
+
286
+ ### Fixed
287
+
288
+ - Closing a menu closes nested controlled menus.
289
+ - Typing a date previews its calendar date; Enter commits and closes it.
290
+
291
+ ## 0.3.4 — July 10, 2026
292
+
293
+ ### Added
294
+
295
+ - `optionsWithSelection` for projecting Select options onto a value set.
296
+ - `SelectOption.tooltip`, `TabOption.children`, and `Calendar.focusSignal`.
297
+
298
+ ### Breaking
299
+
300
+ - Tabs are options-only. Replace `<Tab>` children with `options` entries.
301
+ `TabPanel` children remain supported.
302
+
303
+ ### Changed
304
+
305
+ - Multiple Select supports Alt/Option-click to select only one option.
306
+ - InputDate opens from the field instead of a trailing button.
307
+
308
+ ### Fixed
309
+
310
+ - Input content and layout render before the custom element upgrades.
311
+ - Keyboard focus remains inside an open submenu.
312
+
313
+ ## 0.3.3 — July 8, 2026
314
+
315
+ ### Added
316
+
317
+ - `InputDate`, `Calendar`, and `Select`.
318
+ - Searchable Menu combobox behaviour, selectable MenuItem rows, and Menu header
319
+ and footer slots.
320
+ - `round` across core components, `Tabs.options`, `toneSelected` for selection
321
+ controls, `Input type="search"`, and more icon shapes.
322
+
323
+ ### Breaking
324
+
325
+ - Tag text keeps its original case. Replace `nocaps` with `allcaps` where
326
+ uppercase styling is required.
327
+ - `toneText` is removed from Checkbox and RadioGroup. Style label text with CSS.
328
+ - Hand-authored anchor buttons need `data-anta` to receive Anta styling.
329
+
330
+ ### Changed
331
+
332
+ - Read-only inputs truncate long values and use a pointer cursor.
333
+ - Root menus are at least as wide as their trigger.
334
+
335
+ ### Fixed
336
+
337
+ - Menus, Select, and Inputs retain keyboard and focus behaviour in iframes,
338
+ flyouts, and grouped rows.
339
+ - Empty tooltips do not open. Buttons keep their configured size with non-text
340
+ content.
341
+
342
+ ## 0.3.2 — July 2, 2026
343
+
344
+ ### Added
345
+
346
+ - `Tabs` and `Tooltip.truncatedOnly`.
347
+
348
+ ### Breaking
349
+
350
+ - Checkbox and RadioGroup no longer support `priority`.
351
+ - `onAnyChange` is renamed to `onValueChange` on Input, Checkbox, and
352
+ RadioGroup.
353
+
354
+ ### Changed
355
+
356
+ - Checkbox and RadioGroup `tone` styles their mark. `toneText` controls label
357
+ colour.
358
+ - Components use tabular figures by default. Button exposes `role="button"`.
359
+
360
+ ### Fixed
361
+
362
+ - Empty tooltips do not show. Expander headers use the Anta focus ring.
363
+
364
+ ## 0.3.1 — June 26, 2026
365
+
366
+ ### Added
367
+
368
+ - `MenuItem.value` and the `share` icon.
369
+
370
+ ### Breaking
371
+
372
+ - Hover-opened submenus are now the default. Replace `hover` with `nohover` for
373
+ click-only submenus.
374
+
375
+ ### Fixed
376
+
377
+ - Menus stay open on activation and close only after their anchor leaves view.
378
+ - Touch interactions do not immediately close hover-enabled submenus.
379
+
380
+ ## 0.3.0 — June 25, 2026
381
+
382
+ ### Added
383
+
384
+ - `Checkbox` and `RadioGroup`, including form participation, controlled state,
385
+ labels, hints, tones, and sizes.
386
+ - `Text.collapsible`, named Progress tones, custom input tones, and new icons.
387
+
388
+ ### Changed
389
+
390
+ - Focus rings use the global `--focus-ring` token.
391
+ - Menu exposes `::part(menu)`. Progress exposes `::part(indicator)`.
392
+
393
+ ### Fixed
394
+
395
+ - Expanders render closed before upgrade. Loading buttons cannot activate.
396
+ - Form controls, menus, tooltips, and text handle their controlled and keyboard
397
+ edge cases consistently.
398
+
399
+ ## 0.2.3 — June 18, 2026
400
+
401
+ ### Added
402
+
403
+ - `Expander`, `Input`, and `Menu` with their associated item and grouping
404
+ primitives.
405
+ - Tag priorities, a shared `--focus-ring` token, and input status support.
406
+
407
+ ### Changed
408
+
409
+ - Button typography scales with `size`. Tag tones use translucent fills.
410
+
411
+ ## 0.2.2 — June 13, 2026
412
+
413
+ ### Breaking
414
+
415
+ - Rename `list-detail-view` to `list-collapse`.
416
+ - Tooltips are pinned by default. Remove `static`; pass `follow` for
417
+ cursor-following behaviour.
418
+
419
+ ### Added
420
+
421
+ - `--tooltip-padding` and `Tooltip::part(bubble)`.
422
+
423
+ ### Changed
424
+
425
+ - Buttons, Text, and Title pin Anta's font features.
426
+
427
+ ## 0.2.1 — June 10, 2026
428
+
429
+ ### Changed
430
+
431
+ - Table borders use `--border-4`. Monospace text no longer inherits letter
432
+ spacing.
433
+
434
+ ### Packaging
435
+
436
+ - Published CSS is minified.
437
+
438
+ ## 0.2.0 — June 9, 2026
439
+
440
+ ### Added
441
+
442
+ - `Tag` and the `tag` icon.
443
+
444
+ ### Breaking
445
+
446
+ - Stickers moved to `@antadesign/stickers`. Install that package and update
447
+ imports from `@antadesign/anta/stickers`.
448
+ - Text defaults to `priority="secondary"`. Pass `priority="primary"` to keep
449
+ the former default.
450
+
451
+ ### Fixed
452
+
453
+ - Empty Button tone values render as neutral.
454
+
455
+ ## 0.1.1-dev.8 — June 5, 2026
456
+
457
+ ### Added
458
+
459
+ - `Tooltip` and granular per-element registration.
460
+
461
+ ### Fixed
462
+
463
+ - Anchor buttons keep button styling instead of inheriting link styling.
464
+ - Hover styling no longer persists after a touch interaction.
465
+
466
+ ## 0.1.1-dev.7 — June 3, 2026
467
+
468
+ ### Added
469
+
470
+ - `Button` and the `rotate-ccw` icon.
471
+
472
+ ### Breaking
473
+
474
+ - Background tokens use the numeric `--bg-1` through `--bg-5` scale. Rename
475
+ former background token references.
476
+ - `iconButton` is removed and `leadingIcon` is renamed to `icon`.
477
+
478
+ ### Changed
479
+
480
+ - Button sizes are 24px, 28px, and 32px. The dark palette was retuned.
481
+
482
+ ## 0.1.1-dev.6 — May 28, 2026
483
+
484
+ ### Added
485
+
486
+ - `Title`, a CSS-only heading component with levels, priorities, and tones.
487
+
488
+ ### Changed
489
+
490
+ - Raw `h1` through `h6` use the same type scale as Title.
491
+
492
+ ## 0.1.1-dev.5 — May 25, 2026
493
+
494
+ ### Breaking
495
+
496
+ - Button defaults to `tone="neutral"`. Pass `tone="brand"` to preserve the
497
+ former default.
498
+ - `tone="custom"` is removed. Pass a CSS colour directly to `tone`.
499
+
500
+ ### Changed
501
+
502
+ - Button accepts custom CSS colour tones and holds its width in flex layouts.
503
+
504
+ ## 0.1.1-dev.4 — May 6, 2026
505
+
506
+ ### Breaking
507
+
508
+ - `anta_global_tokens.css` is renamed to `tokens.css`.
509
+ - Import `reset.css` for Anta's reset and typography defaults.
510
+ - Anta's CSS now lives in `@layer anta`.
511
+
512
+ ### Added
513
+
514
+ - `table-2`, `sun`, `moon`, and `refresh-ccw-dot` icons.
515
+
516
+ ## 0.1.1-dev.3 — May 5, 2026
517
+
518
+ ### Breaking
519
+
520
+ - `--text-white` is removed. Use `white` or define a local token.
521
+
522
+ ### Changed
523
+
524
+ - Dark-mode success, warning, and critical text tokens were retuned.
525
+
526
+ ## 0.1.1-dev.2 — May 3, 2026
527
+
528
+ ### Added
529
+
530
+ - New icons, accessible Icon labels, and improved Progress announcements.
531
+
532
+ ## 0.1.1-dev.1 — May 3, 2026
533
+
534
+ ### Added
535
+
536
+ - Apply `.light` to a subtree to restore light tokens below a dark ancestor.
537
+
538
+ ## 0.1.0-dev.1 — May 2, 2026
539
+
540
+ ### Added
541
+
542
+ - `Text` and `Icon`, global link and list styles, and the initial icon set.
543
+
544
+ ### Notes for upgraders
545
+
546
+ - Anta now supplies default link, list, and menu styles. Override them with your
547
+ own CSS where needed.
548
+
549
+ ## 0.0.x — through April 2026
550
+
551
+ Initial package scaffolding, Progress, and the light/dark token system.
package/docs/colors.md ADDED
@@ -0,0 +1,42 @@
1
+ # Colors
2
+
3
+ Anta doesn't offer a global color palette — there are no raw scales like `blue-500` or `gray-900` to pick from. Color ships only as a small set of **role tokens**, grouped by where they apply — background, text, and border — each with a neutral set plus five tones (brand, info, success, critical, warning) that already pair light and dark. You compose from these roles instead of arbitrary swatches; anything app-specific lives in component tokens or your own [semantic aliases](#custom-semantic-tokens).
4
+
5
+ ## Custom semantic tokens
6
+
7
+ Because the numeric tokens are role-free, the convenient pattern is to alias them to **semantic tokens** that describe how *your* app uses each surface. Define the names once, then reference those instead of the raw numbers. For example:
8
+
9
+ ```css
10
+ :root {
11
+ --bg-canvas: var(--bg-1);
12
+ --bg-base: var(--bg-2);
13
+ --bg-pane: var(--bg-3);
14
+ --bg-block: var(--bg-4);
15
+ --bg-spot: var(--bg-5);
16
+
17
+ /* tinted variants work the same way */
18
+ --bg-spot-info: var(--bg-5-info);
19
+ }
20
+ ```
21
+
22
+ This keeps your components readable (`var(--bg-pane)` says more than `var(--bg-3)`) and lets you re-map a role to a different step later in one place.
23
+
24
+ A semantic token doesn’t have to point at the same numeric step in both themes. A card sitting on `bg-2` can use the recessed `bg-1` in light, but in dark it often reads better a little *lighter* than the page — so the same `--bg-my-card` maps to `bg-4` instead. The border follows suit: `border-5` in light, `border-4` in dark.
25
+
26
+ ```css
27
+ :root {
28
+ background: var(--bg-2); /* Anta's token */
29
+
30
+ --bg-my-card: var(--bg-1); /* Custom token */
31
+ --bg-my-card-border: var(--border-5); /* Custom token */
32
+ }
33
+ .dark {
34
+ --bg-my-card: var(--bg-4);
35
+ --bg-my-card-border: var(--border-4);
36
+ }
37
+
38
+ .card {
39
+ background: var(--bg-my-card);
40
+ border: 1px solid var(--bg-my-card-border);
41
+ }
42
+ ```
@@ -0,0 +1,28 @@
1
+ # Comparison
2
+
3
+ Compare four delivery models: styled React libraries, headless primitives,
4
+ copy-paste source, and framework-agnostic web components. Versions are a
5
+ snapshot from ; use each system's link for the current release.
6
+
7
+ Most systems are React-only and use CSS-in-JS, Sass, StyleX, or Tailwind.
8
+ Anta ships web components with plain CSS in one `@layer`, without a style
9
+ runtime. Consumer CSS overrides its defaults normally.
10
+
11
+ Fixed-package sizes are measured from the version named on each card. Each npm
12
+ artifact was downloaded, bundled as a full ESM import with esbuild, minified,
13
+ and gzipped. React and React DOM are external. When a library ships base CSS,
14
+ the total adds its separately gzipped CSS bundle. The line below each figure
15
+ states what it counts.
16
+
17
+ Tree-shaking, peer dependencies, icons, styles, and copied source still make
18
+ the numbers different shapes. Polaris is a dated CDN snapshot, not a
19
+ release-based package figure. Independently versioned packages and copied-source
20
+ systems need an explicit component boundary; each card names it. Every browser
21
+ version includes its release year. Rolling policies are pinned to the current
22
+ stable releases in this snapshot.
23
+
24
+ ## Component coverage
25
+
26
+ Rows group components by job, so Dialog, Modal, and Drawer share one mark.
27
+ Anta covers the common controls but remains narrower than full suites. Base UI
28
+ intentionally focuses on behaviour rather than styled components.