@antadesign/anta 0.3.28 → 0.3.29

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 (135) hide show
  1. package/NOTICES.md +32 -1
  2. package/dist/anta_helpers.d.ts +21 -0
  3. package/dist/anta_helpers.js +24 -0
  4. package/dist/box-observation.d.ts +8 -0
  5. package/dist/box-observation.js +41 -0
  6. package/dist/box-types.d.ts +2 -0
  7. package/dist/bundle.css +1 -1
  8. package/dist/bundle.js +64 -27
  9. package/dist/components/Box.d.ts +28 -12
  10. package/dist/components/Box.js +18 -11
  11. package/dist/components/Breadcrumbs.css +1 -1
  12. package/dist/components/Calendar.js +3 -5
  13. package/dist/components/Checkbox.d.ts +2 -2
  14. package/dist/components/Input.d.ts +8 -2
  15. package/dist/components/Input.js +4 -0
  16. package/dist/components/InputAutocomplete.js +3 -12
  17. package/dist/components/InputDate.css +1 -1
  18. package/dist/components/InputDate.js +2 -0
  19. package/dist/components/Menu.d.ts +4 -4
  20. package/dist/components/Menu.js +1 -1
  21. package/dist/components/Panel.d.ts +17 -0
  22. package/dist/components/Panel.js +22 -0
  23. package/dist/components/RadioGroup.d.ts +2 -1
  24. package/dist/components/Select.d.ts +14 -14
  25. package/dist/components/Select.js +47 -35
  26. package/dist/components/SelectFaceted.d.ts +17 -6
  27. package/dist/components/SelectFaceted.js +61 -41
  28. package/dist/components/Steps.css +1 -1
  29. package/dist/components/Switch.d.ts +3 -3
  30. package/dist/components/TabPanel.d.ts +3 -8
  31. package/dist/components/TabPanel.js +2 -1
  32. package/dist/components/Tabs.d.ts +2 -2
  33. package/dist/components/Tabs.js +2 -1
  34. package/dist/components/Tooltip.d.ts +1 -1
  35. package/dist/components/Tooltip.js +1 -1
  36. package/dist/components/select-parts.css +1 -1
  37. package/dist/elements/a-avatar.css +1 -1
  38. package/dist/elements/a-banner.css +1 -1
  39. package/dist/elements/a-box.css +1 -1
  40. package/dist/elements/a-box.d.ts +6 -6
  41. package/dist/elements/a-box.js +74 -23
  42. package/dist/elements/a-button.css +1 -1
  43. package/dist/elements/a-button.d.ts +9 -1
  44. package/dist/elements/a-button.js +64 -1
  45. package/dist/elements/a-calendar.css +1 -1
  46. package/dist/elements/a-capture.css +1 -1
  47. package/dist/elements/a-card.css +1 -1
  48. package/dist/elements/a-checkbox.css +1 -1
  49. package/dist/elements/a-checkbox.d.ts +3 -0
  50. package/dist/elements/a-checkbox.js +17 -1
  51. package/dist/elements/a-copy.css +1 -1
  52. package/dist/elements/a-dialog.css +1 -1
  53. package/dist/elements/a-expander.css +1 -1
  54. package/dist/elements/a-icon.css +1 -1
  55. package/dist/elements/a-icon.shapes.css +1 -1
  56. package/dist/elements/a-input-time.css +1 -1
  57. package/dist/elements/a-input-time.d.ts +8 -0
  58. package/dist/elements/a-input-time.js +115 -8
  59. package/dist/elements/a-input.css +1 -1
  60. package/dist/elements/a-input.d.ts +27 -1
  61. package/dist/elements/a-input.js +176 -35
  62. package/dist/elements/a-loader.css +1 -1
  63. package/dist/elements/a-menu-group.css +1 -1
  64. package/dist/elements/a-menu-item.css +1 -1
  65. package/dist/elements/a-menu-item.js +1 -0
  66. package/dist/elements/a-menu-separator.css +1 -1
  67. package/dist/elements/a-menu.css +1 -1
  68. package/dist/elements/a-menu.d.ts +8 -13
  69. package/dist/elements/a-menu.js +146 -45
  70. package/dist/elements/a-panel.css +1 -0
  71. package/dist/elements/a-panel.d.ts +16 -0
  72. package/dist/elements/a-panel.js +153 -0
  73. package/dist/elements/a-progress.css +1 -1
  74. package/dist/elements/a-radio-group.css +1 -1
  75. package/dist/elements/a-radio.css +1 -1
  76. package/dist/elements/a-radio.d.ts +4 -0
  77. package/dist/elements/a-radio.js +18 -0
  78. package/dist/elements/a-slider.css +1 -1
  79. package/dist/elements/a-slider.d.ts +1 -0
  80. package/dist/elements/a-slider.js +3 -3
  81. package/dist/elements/a-switch.css +1 -1
  82. package/dist/elements/a-switch.d.ts +3 -0
  83. package/dist/elements/a-switch.js +17 -1
  84. package/dist/elements/a-tab.css +1 -1
  85. package/dist/elements/a-tabpanel.css +1 -1
  86. package/dist/elements/a-tabs.css +1 -1
  87. package/dist/elements/a-tag.css +1 -1
  88. package/dist/elements/a-text.css +1 -1
  89. package/dist/elements/a-title.css +1 -1
  90. package/dist/elements/a-toast.css +1 -1
  91. package/dist/elements/a-toaster.css +1 -1
  92. package/dist/elements/a-tooltip.css +1 -1
  93. package/dist/elements/a-tooltip.js +30 -7
  94. package/dist/elements/focus.d.ts +9 -0
  95. package/dist/elements/focus.js +41 -0
  96. package/dist/elements/index.d.ts +1 -0
  97. package/dist/elements/index.js +3 -0
  98. package/dist/elements/panel-focus.d.ts +10 -0
  99. package/dist/elements/panel-focus.js +86 -0
  100. package/dist/elements/shadow-aria.d.ts +10 -0
  101. package/dist/elements/shadow-aria.js +155 -0
  102. package/dist/general_types.d.ts +48 -19
  103. package/dist/generate-icons.mjs +3 -0
  104. package/dist/index.d.ts +4 -1
  105. package/dist/index.js +2 -0
  106. package/dist/jsx-runtime.d.ts +10 -1
  107. package/dist/reset.css +1 -1
  108. package/dist/theme-antithesis.css +1 -1
  109. package/dist/theme-antune.css +1 -1
  110. package/dist/tokens.css +1 -1
  111. package/docs/accessibility.md +4 -2
  112. package/docs/changelog.md +82 -4
  113. package/docs/colors.md +6 -6
  114. package/docs/components/box.md +98 -34
  115. package/docs/components/breadcrumbs.md +33 -0
  116. package/docs/components/button.md +2 -2
  117. package/docs/components/capture.md +8 -8
  118. package/docs/components/checkbox.md +9 -4
  119. package/docs/components/input-autocomplete.md +6 -0
  120. package/docs/components/input-date.md +8 -2
  121. package/docs/components/input.md +99 -40
  122. package/docs/components/menu.md +3 -3
  123. package/docs/components/panel.md +189 -0
  124. package/docs/components/radio.md +4 -2
  125. package/docs/components/select-faceted.md +57 -2
  126. package/docs/components/select.md +63 -51
  127. package/docs/components/steps.md +4 -4
  128. package/docs/components/switch.md +12 -6
  129. package/docs/components/tabs.md +21 -8
  130. package/docs/components/tooltip.md +6 -4
  131. package/docs/index.md +1 -0
  132. package/docs/install-config.md +5 -4
  133. package/docs/normalization.md +3 -1
  134. package/docs/theming.md +1 -1
  135. package/package.json +4 -1
package/dist/tokens.css CHANGED
@@ -1 +1 @@
1
- @layer base,anta,components,utilities;@layer anta.reset,anta.components,anta.theme;:root,.light{--sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;--serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace}:root,.light{color-scheme:light;font-size:15px;font-weight:400;--anta-seed-neutral: #635b65;--anta-seed-brand: #5f4bc3;--anta-seed-info: #1f6eb2;--anta-seed-success: #2a7e43;--anta-seed-warning: #c37416;--anta-seed-critical: #c9302c;--bg-1: oklch(from var(--anta-seed-neutral) 1 0 h);--bg-2: oklch(from var(--anta-seed-neutral) .985 .002 h);--bg-3: oklch(from var(--anta-seed-neutral) .97 .004 h);--bg-4: oklch(from var(--anta-seed-neutral) .954 .004 h);--bg-5: oklch(from var(--anta-seed-neutral) .935 .006 h);--bg-2-brand: oklch(from var(--anta-seed-brand) .99 .004 h);--bg-3-brand: oklch(from var(--anta-seed-brand) .972 .011 h);--bg-4-brand: oklch(from var(--anta-seed-brand) .955 .02 h);--bg-5-brand: oklch(from var(--anta-seed-brand) .935 .03 h);--bg-2-info: oklch(from var(--anta-seed-info) .99 .004 h);--bg-3-info: oklch(from var(--anta-seed-info) .972 .011 h);--bg-4-info: oklch(from var(--anta-seed-info) .955 .02 h);--bg-5-info: oklch(from var(--anta-seed-info) .935 .03 h);--bg-2-success: oklch(from var(--anta-seed-success) .99 .004 h);--bg-3-success: oklch(from var(--anta-seed-success) .972 .011 h);--bg-4-success: oklch(from var(--anta-seed-success) .955 .02 h);--bg-5-success: oklch(from var(--anta-seed-success) .935 .03 h);--bg-2-warning: oklch(from var(--anta-seed-warning) .99 .004 h);--bg-3-warning: oklch(from var(--anta-seed-warning) .972 .011 h);--bg-4-warning: oklch(from var(--anta-seed-warning) .955 .02 h);--bg-5-warning: oklch(from var(--anta-seed-warning) .935 .03 h);--bg-2-critical: oklch(from var(--anta-seed-critical) .99 .004 h);--bg-3-critical: oklch(from var(--anta-seed-critical) .972 .011 h);--bg-4-critical: oklch(from var(--anta-seed-critical) .955 .02 h);--bg-5-critical: oklch(from var(--anta-seed-critical) .935 .03 h);--text-1: oklch(from var(--anta-seed-neutral) .1 .01 h);--text-2: oklch(from var(--anta-seed-neutral) .3 .015 h);--text-3: color-mix(in oklch, var(--text-2) 82%, transparent);--text-4: color-mix(in oklch, var(--text-2) 60%, transparent);--text-5: color-mix(in oklch, var(--text-2) 40%, transparent);--text-1-brand: oklch(from var(--anta-seed-brand) .38 .11 h);--text-2-brand: oklch(from var(--anta-seed-brand) .43 .15 h);--text-3-brand: color-mix(in oklch, var(--text-2-brand) 82%, transparent);--text-4-brand: color-mix(in oklch, var(--text-2-brand) 60%, transparent);--text-5-brand: color-mix(in oklch, var(--text-2-brand) 40%, transparent);--text-1-info: oklch(from var(--anta-seed-info) .38 .11 h);--text-2-info: oklch(from var(--anta-seed-info) .43 .15 h);--text-3-info: color-mix(in oklch, var(--text-2-info) 82%, transparent);--text-4-info: color-mix(in oklch, var(--text-2-info) 60%, transparent);--text-5-info: color-mix(in oklch, var(--text-2-info) 40%, transparent);--text-1-success: oklch(from var(--anta-seed-success) .38 .11 h);--text-2-success: oklch(from var(--anta-seed-success) .43 .15 h);--text-3-success: color-mix(in oklch, var(--text-2-success) 82%, transparent);--text-4-success: color-mix(in oklch, var(--text-2-success) 60%, transparent);--text-5-success: color-mix(in oklch, var(--text-2-success) 40%, transparent);--text-1-warning: oklch(from var(--anta-seed-warning) .38 .11 h);--text-2-warning: oklch(from var(--anta-seed-warning) .43 .15 h);--text-3-warning: color-mix(in oklch, var(--text-2-warning) 82%, transparent);--text-4-warning: color-mix(in oklch, var(--text-2-warning) 60%, transparent);--text-5-warning: color-mix(in oklch, var(--text-2-warning) 40%, transparent);--text-1-critical: oklch(from var(--anta-seed-critical) .38 .11 h);--text-2-critical: oklch(from var(--anta-seed-critical) .43 .15 h);--text-3-critical: color-mix(in oklch, var(--text-2-critical) 82%, transparent);--text-4-critical: color-mix(in oklch, var(--text-2-critical) 60%, transparent);--text-5-critical: color-mix(in oklch, var(--text-2-critical) 40%, transparent);--border-1: oklch(from var(--anta-seed-neutral) .67 .008 h);--border-2: oklch(from var(--anta-seed-neutral) .8 .008 h);--border-3: oklch(from var(--anta-seed-neutral) .86 .008 h);--border-4: oklch(from var(--anta-seed-neutral) .9 .008 h);--border-5: oklch(from var(--anta-seed-neutral) .935 .008 h);--border-1-brand: oklch(from var(--anta-seed-brand) .67 .13 h);--border-2-brand: oklch(from var(--anta-seed-brand) .8 .09 h);--border-3-brand: oklch(from var(--anta-seed-brand) .86 .055 h);--border-4-brand: oklch(from var(--anta-seed-brand) .9 .04 h);--border-5-brand: oklch(from var(--anta-seed-brand) .935 .028 h);--border-1-info: oklch(from var(--anta-seed-info) .67 .13 h);--border-2-info: oklch(from var(--anta-seed-info) .8 .09 h);--border-3-info: oklch(from var(--anta-seed-info) .86 .055 h);--border-4-info: oklch(from var(--anta-seed-info) .9 .04 h);--border-5-info: oklch(from var(--anta-seed-info) .935 .028 h);--border-1-success: oklch(from var(--anta-seed-success) .67 .13 h);--border-2-success: oklch(from var(--anta-seed-success) .8 .09 h);--border-3-success: oklch(from var(--anta-seed-success) .86 .055 h);--border-4-success: oklch(from var(--anta-seed-success) .9 .04 h);--border-5-success: oklch(from var(--anta-seed-success) .935 .028 h);--border-1-warning: oklch(from var(--anta-seed-warning) .67 .13 h);--border-2-warning: oklch(from var(--anta-seed-warning) .8 .09 h);--border-3-warning: oklch(from var(--anta-seed-warning) .86 .055 h);--border-4-warning: oklch(from var(--anta-seed-warning) .9 .04 h);--border-5-warning: oklch(from var(--anta-seed-warning) .935 .028 h);--border-1-critical: oklch(from var(--anta-seed-critical) .67 .13 h);--border-2-critical: oklch(from var(--anta-seed-critical) .8 .09 h);--border-3-critical: oklch(from var(--anta-seed-critical) .86 .055 h);--border-4-critical: oklch(from var(--anta-seed-critical) .9 .04 h);--border-5-critical: oklch(from var(--anta-seed-critical) .935 .028 h);--link-color: #1466d4;--link-color-hover: #2674e6;--focus-ring: oklch(.55 .2 284.15)}.dark{color-scheme:dark;font-weight:400;--bg-1: oklch(from var(--anta-seed-neutral) 0 0 h);--bg-2: oklch(from var(--anta-seed-neutral) .16 .002 h);--bg-3: oklch(from var(--anta-seed-neutral) .177 .005 h);--bg-4: oklch(from var(--anta-seed-neutral) .191 .006 h);--bg-5: oklch(from var(--anta-seed-neutral) .2 .009 h);--bg-2-brand: oklch(from var(--anta-seed-brand) .13 .02 h);--bg-3-brand: oklch(from var(--anta-seed-brand) .17 .035 h);--bg-4-brand: oklch(from var(--anta-seed-brand) .185 .05 h);--bg-5-brand: oklch(from var(--anta-seed-brand) .205 .055 h);--bg-2-info: oklch(from var(--anta-seed-info) .13 .02 h);--bg-3-info: oklch(from var(--anta-seed-info) .17 .035 h);--bg-4-info: oklch(from var(--anta-seed-info) .185 .05 h);--bg-5-info: oklch(from var(--anta-seed-info) .205 .055 h);--bg-2-success: oklch(from var(--anta-seed-success) .13 .02 h);--bg-3-success: oklch(from var(--anta-seed-success) .17 .035 h);--bg-4-success: oklch(from var(--anta-seed-success) .185 .05 h);--bg-5-success: oklch(from var(--anta-seed-success) .205 .055 h);--bg-2-warning: oklch(from var(--anta-seed-warning) .13 .02 h);--bg-3-warning: oklch(from var(--anta-seed-warning) .17 .035 h);--bg-4-warning: oklch(from var(--anta-seed-warning) .185 .05 h);--bg-5-warning: oklch(from var(--anta-seed-warning) .205 .055 h);--bg-2-critical: oklch(from var(--anta-seed-critical) .13 .02 h);--bg-3-critical: oklch(from var(--anta-seed-critical) .17 .035 h);--bg-4-critical: oklch(from var(--anta-seed-critical) .185 .05 h);--bg-5-critical: oklch(from var(--anta-seed-critical) .205 .055 h);--text-1: oklch(from var(--anta-seed-neutral) .94 .008 h);--text-2: oklch(from var(--anta-seed-neutral) .8 .015 h);--text-3: color-mix(in oklch, var(--text-2) 80%, transparent);--text-4: color-mix(in oklch, var(--text-2) 60%, transparent);--text-5: color-mix(in oklch, var(--text-2) 40%, transparent);--text-1-brand: oklch(from var(--anta-seed-brand) .85 .1 h);--text-2-brand: oklch(from var(--anta-seed-brand) .77 .11 h);--text-3-brand: color-mix(in oklch, var(--text-2-brand) 80%, transparent);--text-4-brand: color-mix(in oklch, var(--text-2-brand) 60%, transparent);--text-5-brand: color-mix(in oklch, var(--text-2-brand) 40%, transparent);--text-1-info: oklch(from var(--anta-seed-info) .85 .1 h);--text-2-info: oklch(from var(--anta-seed-info) .77 .11 h);--text-3-info: color-mix(in oklch, var(--text-2-info) 80%, transparent);--text-4-info: color-mix(in oklch, var(--text-2-info) 60%, transparent);--text-5-info: color-mix(in oklch, var(--text-2-info) 40%, transparent);--text-1-success: oklch(from var(--anta-seed-success) .85 .1 h);--text-2-success: oklch(from var(--anta-seed-success) .77 .11 h);--text-3-success: color-mix(in oklch, var(--text-2-success) 80%, transparent);--text-4-success: color-mix(in oklch, var(--text-2-success) 60%, transparent);--text-5-success: color-mix(in oklch, var(--text-2-success) 40%, transparent);--text-1-warning: oklch(from var(--anta-seed-warning) .85 .1 h);--text-2-warning: oklch(from var(--anta-seed-warning) .77 .11 h);--text-3-warning: color-mix(in oklch, var(--text-2-warning) 80%, transparent);--text-4-warning: color-mix(in oklch, var(--text-2-warning) 60%, transparent);--text-5-warning: color-mix(in oklch, var(--text-2-warning) 40%, transparent);--text-1-critical: oklch(from var(--anta-seed-critical) .85 .1 h);--text-2-critical: oklch(from var(--anta-seed-critical) .77 .11 h);--text-3-critical: color-mix(in oklch, var(--text-2-critical) 80%, transparent);--text-4-critical: color-mix(in oklch, var(--text-2-critical) 60%, transparent);--text-5-critical: color-mix(in oklch, var(--text-2-critical) 40%, transparent);--border-1: oklch(from var(--anta-seed-neutral) .52 .008 h);--border-2: oklch(from var(--anta-seed-neutral) .41 .008 h);--border-3: oklch(from var(--anta-seed-neutral) .33 .008 h);--border-4: oklch(from var(--anta-seed-neutral) .26 .008 h);--border-5: oklch(from var(--anta-seed-neutral) .21 .008 h);--border-1-brand: oklch(from var(--anta-seed-brand) .52 .15 h);--border-2-brand: oklch(from var(--anta-seed-brand) .41 .12 h);--border-3-brand: oklch(from var(--anta-seed-brand) .33 .09 h);--border-4-brand: oklch(from var(--anta-seed-brand) .26 .06 h);--border-5-brand: oklch(from var(--anta-seed-brand) .21 .045 h);--border-1-info: oklch(from var(--anta-seed-info) .52 .15 h);--border-2-info: oklch(from var(--anta-seed-info) .41 .12 h);--border-3-info: oklch(from var(--anta-seed-info) .33 .09 h);--border-4-info: oklch(from var(--anta-seed-info) .26 .06 h);--border-5-info: oklch(from var(--anta-seed-info) .21 .045 h);--border-1-success: oklch(from var(--anta-seed-success) .52 .15 h);--border-2-success: oklch(from var(--anta-seed-success) .41 .12 h);--border-3-success: oklch(from var(--anta-seed-success) .33 .09 h);--border-4-success: oklch(from var(--anta-seed-success) .26 .06 h);--border-5-success: oklch(from var(--anta-seed-success) .21 .045 h);--border-1-warning: oklch(from var(--anta-seed-warning) .52 .15 h);--border-2-warning: oklch(from var(--anta-seed-warning) .41 .12 h);--border-3-warning: oklch(from var(--anta-seed-warning) .33 .09 h);--border-4-warning: oklch(from var(--anta-seed-warning) .26 .06 h);--border-5-warning: oklch(from var(--anta-seed-warning) .21 .045 h);--border-1-critical: oklch(from var(--anta-seed-critical) .52 .15 h);--border-2-critical: oklch(from var(--anta-seed-critical) .41 .12 h);--border-3-critical: oklch(from var(--anta-seed-critical) .33 .09 h);--border-4-critical: oklch(from var(--anta-seed-critical) .26 .06 h);--border-5-critical: oklch(from var(--anta-seed-critical) .21 .045 h);--link-color: #7baee9;--link-color-hover: #90bdee;--focus-ring: #a897fc}
1
+ @layer base,anta,components,utilities;@layer anta.reset,anta.components,anta.theme;:root,.light{--sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;--serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace}:root,.light{color-scheme:light;font-size:15px;font-weight:400;--anta-seed-neutral: #635b65;--anta-seed-brand: #5f4bc3;--anta-seed-info: #1f6eb2;--anta-seed-success: #2a7e43;--anta-seed-warning: #c37416;--anta-seed-critical: #c9302c;--bg-1: oklch(from var(--anta-seed-neutral) 1 0 h);--bg-2: oklch(from var(--anta-seed-neutral) .985 .002 h);--bg-3: oklch(from var(--anta-seed-neutral) .97 .004 h);--bg-4: oklch(from var(--anta-seed-neutral) .954 .004 h);--bg-5: oklch(from var(--anta-seed-neutral) .935 .006 h);--bg-2-brand: oklch(from var(--anta-seed-brand) .99 .004 h);--bg-3-brand: oklch(from var(--anta-seed-brand) .972 .011 h);--bg-4-brand: oklch(from var(--anta-seed-brand) .955 .02 h);--bg-5-brand: oklch(from var(--anta-seed-brand) .935 .03 h);--bg-2-info: oklch(from var(--anta-seed-info) .99 .004 h);--bg-3-info: oklch(from var(--anta-seed-info) .972 .011 h);--bg-4-info: oklch(from var(--anta-seed-info) .955 .02 h);--bg-5-info: oklch(from var(--anta-seed-info) .935 .03 h);--bg-2-success: oklch(from var(--anta-seed-success) .99 .004 h);--bg-3-success: oklch(from var(--anta-seed-success) .972 .011 h);--bg-4-success: oklch(from var(--anta-seed-success) .955 .02 h);--bg-5-success: oklch(from var(--anta-seed-success) .935 .03 h);--bg-2-warning: oklch(from var(--anta-seed-warning) .99 .004 h);--bg-3-warning: oklch(from var(--anta-seed-warning) .972 .011 h);--bg-4-warning: oklch(from var(--anta-seed-warning) .955 .02 h);--bg-5-warning: oklch(from var(--anta-seed-warning) .935 .03 h);--bg-2-critical: oklch(from var(--anta-seed-critical) .99 .004 h);--bg-3-critical: oklch(from var(--anta-seed-critical) .972 .011 h);--bg-4-critical: oklch(from var(--anta-seed-critical) .955 .02 h);--bg-5-critical: oklch(from var(--anta-seed-critical) .935 .03 h);--text-1: oklch(from var(--anta-seed-neutral) .1 .01 h);--text-2: oklch(from var(--anta-seed-neutral) .3 .015 h);--text-3: color-mix(in oklch, var(--text-2) 82%, transparent);--text-4: color-mix(in oklch, var(--text-2) 66%, transparent);--text-5: color-mix(in oklch, var(--text-2) 40%, transparent);--text-1-brand: oklch(from var(--anta-seed-brand) .38 .11 h);--text-2-brand: oklch(from var(--anta-seed-brand) .43 .15 h);--text-3-brand: color-mix(in oklch, var(--text-2-brand) 82%, transparent);--text-4-brand: color-mix(in oklch, var(--text-2-brand) 66%, transparent);--text-5-brand: color-mix(in oklch, var(--text-2-brand) 40%, transparent);--text-1-info: oklch(from var(--anta-seed-info) .38 .11 h);--text-2-info: oklch(from var(--anta-seed-info) .43 .15 h);--text-3-info: color-mix(in oklch, var(--text-2-info) 82%, transparent);--text-4-info: color-mix(in oklch, var(--text-2-info) 66%, transparent);--text-5-info: color-mix(in oklch, var(--text-2-info) 40%, transparent);--text-1-success: oklch(from var(--anta-seed-success) .38 .11 h);--text-2-success: oklch(from var(--anta-seed-success) .43 .15 h);--text-3-success: color-mix(in oklch, var(--text-2-success) 82%, transparent);--text-4-success: color-mix(in oklch, var(--text-2-success) 66%, transparent);--text-5-success: color-mix(in oklch, var(--text-2-success) 40%, transparent);--text-1-warning: oklch(from var(--anta-seed-warning) .38 .11 h);--text-2-warning: oklch(from var(--anta-seed-warning) .43 .15 h);--text-3-warning: color-mix(in oklch, var(--text-2-warning) 82%, transparent);--text-4-warning: color-mix(in oklch, var(--text-2-warning) 66%, transparent);--text-5-warning: color-mix(in oklch, var(--text-2-warning) 40%, transparent);--text-1-critical: oklch(from var(--anta-seed-critical) .38 .11 h);--text-2-critical: oklch(from var(--anta-seed-critical) .43 .15 h);--text-3-critical: color-mix(in oklch, var(--text-2-critical) 82%, transparent);--text-4-critical: color-mix(in oklch, var(--text-2-critical) 66%, transparent);--text-5-critical: color-mix(in oklch, var(--text-2-critical) 40%, transparent);--border-1: oklch(from var(--anta-seed-neutral) .67 .008 h);--border-2: oklch(from var(--anta-seed-neutral) .8 .008 h);--border-3: oklch(from var(--anta-seed-neutral) .86 .008 h);--border-4: oklch(from var(--anta-seed-neutral) .9 .008 h);--border-5: oklch(from var(--anta-seed-neutral) .935 .008 h);--border-1-brand: oklch(from var(--anta-seed-brand) .67 .13 h);--border-2-brand: oklch(from var(--anta-seed-brand) .8 .09 h);--border-3-brand: oklch(from var(--anta-seed-brand) .86 .055 h);--border-4-brand: oklch(from var(--anta-seed-brand) .9 .04 h);--border-5-brand: oklch(from var(--anta-seed-brand) .935 .028 h);--border-1-info: oklch(from var(--anta-seed-info) .67 .13 h);--border-2-info: oklch(from var(--anta-seed-info) .8 .09 h);--border-3-info: oklch(from var(--anta-seed-info) .86 .055 h);--border-4-info: oklch(from var(--anta-seed-info) .9 .04 h);--border-5-info: oklch(from var(--anta-seed-info) .935 .028 h);--border-1-success: oklch(from var(--anta-seed-success) .67 .13 h);--border-2-success: oklch(from var(--anta-seed-success) .8 .09 h);--border-3-success: oklch(from var(--anta-seed-success) .86 .055 h);--border-4-success: oklch(from var(--anta-seed-success) .9 .04 h);--border-5-success: oklch(from var(--anta-seed-success) .935 .028 h);--border-1-warning: oklch(from var(--anta-seed-warning) .67 .13 h);--border-2-warning: oklch(from var(--anta-seed-warning) .8 .09 h);--border-3-warning: oklch(from var(--anta-seed-warning) .86 .055 h);--border-4-warning: oklch(from var(--anta-seed-warning) .9 .04 h);--border-5-warning: oklch(from var(--anta-seed-warning) .935 .028 h);--border-1-critical: oklch(from var(--anta-seed-critical) .67 .13 h);--border-2-critical: oklch(from var(--anta-seed-critical) .8 .09 h);--border-3-critical: oklch(from var(--anta-seed-critical) .86 .055 h);--border-4-critical: oklch(from var(--anta-seed-critical) .9 .04 h);--border-5-critical: oklch(from var(--anta-seed-critical) .935 .028 h);--link-color: #1466d4;--link-color-hover: #2674e6;--focus-ring: oklch(.55 .2 284.15)}.dark{color-scheme:dark;font-weight:400;--bg-1: oklch(from var(--anta-seed-neutral) 0 0 h);--bg-2: oklch(from var(--anta-seed-neutral) .16 .002 h);--bg-3: oklch(from var(--anta-seed-neutral) .177 .005 h);--bg-4: oklch(from var(--anta-seed-neutral) .191 .006 h);--bg-5: oklch(from var(--anta-seed-neutral) .2 .009 h);--bg-2-brand: oklch(from var(--anta-seed-brand) .13 .02 h);--bg-3-brand: oklch(from var(--anta-seed-brand) .17 .035 h);--bg-4-brand: oklch(from var(--anta-seed-brand) .185 .05 h);--bg-5-brand: oklch(from var(--anta-seed-brand) .205 .055 h);--bg-2-info: oklch(from var(--anta-seed-info) .13 .02 h);--bg-3-info: oklch(from var(--anta-seed-info) .17 .035 h);--bg-4-info: oklch(from var(--anta-seed-info) .185 .05 h);--bg-5-info: oklch(from var(--anta-seed-info) .205 .055 h);--bg-2-success: oklch(from var(--anta-seed-success) .13 .02 h);--bg-3-success: oklch(from var(--anta-seed-success) .17 .035 h);--bg-4-success: oklch(from var(--anta-seed-success) .185 .05 h);--bg-5-success: oklch(from var(--anta-seed-success) .205 .055 h);--bg-2-warning: oklch(from var(--anta-seed-warning) .13 .02 h);--bg-3-warning: oklch(from var(--anta-seed-warning) .17 .035 h);--bg-4-warning: oklch(from var(--anta-seed-warning) .185 .05 h);--bg-5-warning: oklch(from var(--anta-seed-warning) .205 .055 h);--bg-2-critical: oklch(from var(--anta-seed-critical) .13 .02 h);--bg-3-critical: oklch(from var(--anta-seed-critical) .17 .035 h);--bg-4-critical: oklch(from var(--anta-seed-critical) .185 .05 h);--bg-5-critical: oklch(from var(--anta-seed-critical) .205 .055 h);--text-1: oklch(from var(--anta-seed-neutral) .94 .008 h);--text-2: oklch(from var(--anta-seed-neutral) .8 .015 h);--text-3: color-mix(in oklch, var(--text-2) 80%, transparent);--text-4: color-mix(in oklch, var(--text-2) 62%, transparent);--text-5: color-mix(in oklch, var(--text-2) 40%, transparent);--text-1-brand: oklch(from var(--anta-seed-brand) .85 .1 h);--text-2-brand: oklch(from var(--anta-seed-brand) .77 .11 h);--text-3-brand: color-mix(in oklch, var(--text-2-brand) 80%, transparent);--text-4-brand: color-mix(in oklch, var(--text-2-brand) 62%, transparent);--text-5-brand: color-mix(in oklch, var(--text-2-brand) 40%, transparent);--text-1-info: oklch(from var(--anta-seed-info) .85 .1 h);--text-2-info: oklch(from var(--anta-seed-info) .77 .11 h);--text-3-info: color-mix(in oklch, var(--text-2-info) 80%, transparent);--text-4-info: color-mix(in oklch, var(--text-2-info) 62%, transparent);--text-5-info: color-mix(in oklch, var(--text-2-info) 40%, transparent);--text-1-success: oklch(from var(--anta-seed-success) .85 .1 h);--text-2-success: oklch(from var(--anta-seed-success) .77 .11 h);--text-3-success: color-mix(in oklch, var(--text-2-success) 80%, transparent);--text-4-success: color-mix(in oklch, var(--text-2-success) 62%, transparent);--text-5-success: color-mix(in oklch, var(--text-2-success) 40%, transparent);--text-1-warning: oklch(from var(--anta-seed-warning) .85 .1 h);--text-2-warning: oklch(from var(--anta-seed-warning) .77 .11 h);--text-3-warning: color-mix(in oklch, var(--text-2-warning) 80%, transparent);--text-4-warning: color-mix(in oklch, var(--text-2-warning) 62%, transparent);--text-5-warning: color-mix(in oklch, var(--text-2-warning) 40%, transparent);--text-1-critical: oklch(from var(--anta-seed-critical) .85 .1 h);--text-2-critical: oklch(from var(--anta-seed-critical) .77 .11 h);--text-3-critical: color-mix(in oklch, var(--text-2-critical) 80%, transparent);--text-4-critical: color-mix(in oklch, var(--text-2-critical) 62%, transparent);--text-5-critical: color-mix(in oklch, var(--text-2-critical) 40%, transparent);--border-1: oklch(from var(--anta-seed-neutral) .52 .008 h);--border-2: oklch(from var(--anta-seed-neutral) .41 .008 h);--border-3: oklch(from var(--anta-seed-neutral) .33 .008 h);--border-4: oklch(from var(--anta-seed-neutral) .26 .008 h);--border-5: oklch(from var(--anta-seed-neutral) .21 .008 h);--border-1-brand: oklch(from var(--anta-seed-brand) .52 .15 h);--border-2-brand: oklch(from var(--anta-seed-brand) .41 .12 h);--border-3-brand: oklch(from var(--anta-seed-brand) .33 .09 h);--border-4-brand: oklch(from var(--anta-seed-brand) .26 .06 h);--border-5-brand: oklch(from var(--anta-seed-brand) .21 .045 h);--border-1-info: oklch(from var(--anta-seed-info) .52 .15 h);--border-2-info: oklch(from var(--anta-seed-info) .41 .12 h);--border-3-info: oklch(from var(--anta-seed-info) .33 .09 h);--border-4-info: oklch(from var(--anta-seed-info) .26 .06 h);--border-5-info: oklch(from var(--anta-seed-info) .21 .045 h);--border-1-success: oklch(from var(--anta-seed-success) .52 .15 h);--border-2-success: oklch(from var(--anta-seed-success) .41 .12 h);--border-3-success: oklch(from var(--anta-seed-success) .33 .09 h);--border-4-success: oklch(from var(--anta-seed-success) .26 .06 h);--border-5-success: oklch(from var(--anta-seed-success) .21 .045 h);--border-1-warning: oklch(from var(--anta-seed-warning) .52 .15 h);--border-2-warning: oklch(from var(--anta-seed-warning) .41 .12 h);--border-3-warning: oklch(from var(--anta-seed-warning) .33 .09 h);--border-4-warning: oklch(from var(--anta-seed-warning) .26 .06 h);--border-5-warning: oklch(from var(--anta-seed-warning) .21 .045 h);--border-1-critical: oklch(from var(--anta-seed-critical) .52 .15 h);--border-2-critical: oklch(from var(--anta-seed-critical) .41 .12 h);--border-3-critical: oklch(from var(--anta-seed-critical) .33 .09 h);--border-4-critical: oklch(from var(--anta-seed-critical) .26 .06 h);--border-5-critical: oklch(from var(--anta-seed-critical) .21 .045 h);--link-color: #7baee9;--link-color-hover: #90bdee;--focus-ring: #a897fc}
@@ -4,7 +4,7 @@ A few guidelines for designers and engineers using Anta.
4
4
 
5
5
  ## Colors
6
6
 
7
- The matrix renders every text level on every background for the selected tone and theme. Each cell shows the WCAG 2 contrast ratio, AA or AAA result for the selected size and weight, and APCA Lc value. The controls change rendering and pass thresholds, not the color-pair ratios. Vision tabs apply SVG-filter and CSS-mask simulations; the numbers use normal-vision math.
7
+ The matrix reads the active theme's `text-*` and `bg-*` tokens and updates when you switch themes. Each cell shows the WCAG 2 contrast ratio, AA or AAA result for the selected size and weight, and APCA Lc value. Transparent text is composited over each background before measurement. Size and weight change pass thresholds, not the color-pair ratios. Vision tabs apply SVG-filter and CSS-mask simulations; the numbers use normal-vision math.
8
8
 
9
9
  The interactive matrix compares all five text levels with all five background levels for each tone in light and dark mode. It resolves the active CSS palette in the browser, composites transparent text over its background, and reports WCAG 2 contrast and APCA Lc.
10
10
 
@@ -43,7 +43,9 @@ The simulator above makes it easy to check a candidate combination across the mo
43
43
 
44
44
  ## Low-priority text and contrast
45
45
 
46
- The `Text`/`Title` `quaternary` priority (`text-4`) and the `text-5` step (the faintest — used for disabled and hint text across components) sit at intentionally muted contrast, designed for non-essential metadata: timestamps, captions, helper hints, secondary counters. At small sizes (13–15 px) they may not pass WCAG AA against some background levels and tones. Use the matrix above to verify combinations before relying on them for content that has to be readable.
46
+ Neutral `text-4` meets 4.5:1 against `bg-1` in both light and dark modes for Antune and None. This does not extend to every background: Antune's neutral `text-4` is 4.41:1 on light `bg-2` and 4.25:1 on dark `bg-2`.
47
+
48
+ Named `text-4` tones use `text-2` at 66% opacity in light mode and 62% in dark mode for both themes. They remain fainter than `text-3` and are not tuned to meet 4.5:1. The `text-5` step is also intentionally muted. Check the matrix for each tone and background before choosing a pair for readable content.
47
49
 
48
50
  `text-1` and `text-2` are the primary-content priorities; reach for them whenever the content matters.
49
51
 
package/docs/changelog.md CHANGED
@@ -3,6 +3,84 @@
3
3
  This page tracks changes that ship in `@antadesign/anta`. Documentation-only
4
4
  changes are not listed.
5
5
 
6
+ ## 0.3.29 — September 15, 2026
7
+
8
+ ### Added
9
+
10
+ - SelectFaceted single and multiple facets support `renderOption` for custom
11
+ option content in facet flyouts and global search results. Render custom
12
+ option data as key–value Tags while retaining selection handling and indicators.
13
+ - Box supports `padding` and `margin` props and HTML attributes. JSX numbers
14
+ use pixels; strings accept CSS shorthand values.
15
+ - Panel is a persistent container that can maximize to the browser viewport
16
+ through a manual popover while keeping its DOM children mounted. Maximized
17
+ panels contain keyboard focus until restored. Panels fill their parent's
18
+ width and height and use `overflow: scroll` by default. The maximized surface
19
+ inherits the Panel's background.
20
+
21
+ ### Changed
22
+
23
+ - Switch defaults to neutral in both states. Pass `tone="brand"` for brand coloring,
24
+ and add `toneScope="selected"` to tint only the checked track.
25
+
26
+ - Select uses Anta Button for its default trigger, preserving popup accessibility,
27
+ keyboard-only focus rings, and ellipsis for long values. Its accessible description
28
+ includes the current selection and field hint. Menu button triggers
29
+ open with ArrowUp and ArrowDown. Select field styling now targets its
30
+ `a-select-field` wrapper and child `a-button` instead of Input shadow parts.
31
+
32
+ - Calendar adjacent-month dates are hidden from assistive technology and reach
33
+ full opacity on hover or focus when enabled.
34
+ - The default Alt/Option-click hint in multi-select option menus appears to the
35
+ left of its row after 700ms, and moving between rows restarts that delay.
36
+ - Tooltip delay-free handoff now applies only when both the outgoing and incoming
37
+ tooltips have `follow`. Tooltip supports centered-left placement with
38
+ `placement="left"` and flips right when space is limited.
39
+ - Input and its composed controls now expose roles, labels, popup relationships,
40
+ required state, and active options on the controls that receive focus. Direct
41
+ ARIA element references avoid generated Calendar, popup, and option ID
42
+ collisions across application roots.
43
+ - Checkbox, Switch, and Radio hints are accessible descriptions. Tabs use a
44
+ roving tab stop, and `TabPanel` forwards common component props.
45
+ - Every independently loadable stylesheet now reserves Anta's public and
46
+ internal cascade-layer order. Granular element imports therefore keep
47
+ component and theme rules above `reset.css` even when a bundler loads their
48
+ CSS before `tokens.css`.
49
+ - Breadcrumbs no longer scroll horizontally by default, so button focus rings
50
+ remain visible. To enable scrolling, set `overflow-x: auto` on the trail and
51
+ `outline-offset: -1px` on its focused controls.
52
+ - **Breaking:** Box measurement events now trigger on border-box width and
53
+ height changes by default. `observe` accepts `width`, `height`, `size`,
54
+ `context`, `overflow`, `edges`, `scroll`, or `all`, individually or in a typed
55
+ array. Plain HTML accepts the same selections separated by spaces.
56
+ Use `overflow` for content-driven CSS states or `edges` for scroll-edge
57
+ changes; size observation skips content and scroll observers. `throttle` sets
58
+ the event interval in milliseconds without delaying CSS fades or on-demand
59
+ truncation checks.
60
+ - Tags no longer impose `max-width: 100%`. Labels and values still ellipsize
61
+ when the application constrains the tag’s width.
62
+
63
+ ### Fixed
64
+
65
+ - Menu Tab navigation follows rendered slot order and reaches controls inside
66
+ shadow DOM, including individual InputTime segments.
67
+ - Dialog menus preserve menu semantics for body items when no search field is present.
68
+ - Panel preserves maximize and restore focus handling when custom element states
69
+ are unavailable.
70
+
71
+ - Neutral `text-4` meets at least 4.5:1 contrast against `bg-1` in both light
72
+ and dark modes for Antune and None. This guarantee does not extend to named
73
+ tones or other backgrounds.
74
+ - Clicking inside a parent menu closes nested menus outside the clicked branch.
75
+ Calendar's month/year picker closes when clicking elsewhere in the calendar,
76
+ including the month navigation arrows.
77
+ - Nested menus reset when their controlled parent closes. InputDate's month/year
78
+ picker can reopen after selecting a date while the picker is open.
79
+ - Calendar weekday headers use a higher-contrast text color, including weekends.
80
+ - Slider exposes its `ElementInternals` through the same runtime inspection hook
81
+ as other stateful controls, allowing accessibility tooling to inspect its live
82
+ range semantics.
83
+
6
84
  ## 0.3.28 — September 10, 2026
7
85
 
8
86
  ### Changed
@@ -43,10 +121,10 @@ changes are not listed.
43
121
 
44
122
  ### Fixed
45
123
 
46
- - Antune and Antithesis pin regular TT Interphases text to `slnt` 0, including
47
- form controls that reset font shorthand inheritance. This keeps text upright
48
- in Safari despite the font file's non-zero axis default while preserving the
49
- `slnt` 11 instance for semantic italics.
124
+ - Antune and Antithesis pin regular TT Interphases text and `dfn` to `slnt` 0,
125
+ including form controls that reset font shorthand inheritance. This keeps
126
+ text upright in Safari despite the font file's non-zero axis default while
127
+ preserving the `slnt` 11 instance for semantic italics.
50
128
  - `tokens.css` declares `color-scheme` on `:root`, `.light`, and `.dark`, so
51
129
  component colors resolve to the right mode without the optional `reset.css`
52
130
  import.
package/docs/colors.md CHANGED
@@ -59,32 +59,32 @@ Links use `--link-color` at rest and `--link-color-hover` on hover. Both tokens
59
59
  | `--text-1` | `oklch(from var(--anta-seed-neutral) 0.1 0.01 h)` | `oklch(from var(--anta-seed-neutral) 0.94 0.008 h)` | `#050306` | `#ece9ec` |
60
60
  | `--text-2` | `oklch(from var(--anta-seed-neutral) 0.3 0.015 h)` | `oklch(from var(--anta-seed-neutral) 0.8 0.015 h)` | `#302b31` | `#c1b9c1` |
61
61
  | `--text-3` | `color-mix(in oklch, var(--text-2) 82%, transparent)` | `color-mix(in oklch, var(--text-2) 80%, transparent)` | `#635b65` | `#9f99a1` |
62
- | `--text-4` | `color-mix(in oklch, var(--text-2) 60%, transparent)` | `color-mix(in oklch, var(--text-2) 60%, transparent)` | `#878089` | `#776e77` |
62
+ | `--text-4` | `color-mix(in oklch, var(--text-2) 66%, transparent)` | `color-mix(in oklch, var(--text-2) 62%, transparent)` | `#7a737c` | `#7c737c` |
63
63
  | `--text-5` | `color-mix(in oklch, var(--text-2) 40%, transparent)` | `color-mix(in oklch, var(--text-2) 40%, transparent)` | `#9f99a1` | `#635b65` |
64
64
  | `--text-1-brand` | `oklch(from var(--anta-seed-brand) 0.38 0.11 h)` | `oklch(from var(--anta-seed-brand) 0.85 0.1 h)` | `#2e1e7b` | `#c5baff` |
65
65
  | `--text-2-brand` | `oklch(from var(--anta-seed-brand) 0.43 0.15 h)` | `oklch(from var(--anta-seed-brand) 0.77 0.11 h)` | `#483493` | `#ada0ee` |
66
66
  | `--text-3-brand` | `color-mix(in oklch, var(--text-2-brand) 82%, transparent)` | `color-mix(in oklch, var(--text-2-brand) 80%, transparent)` | `#483493cc` | `#ada0eecc` |
67
- | `--text-4-brand` | `color-mix(in oklch, var(--text-2-brand) 60%, transparent)` | `color-mix(in oklch, var(--text-2-brand) 60%, transparent)` | `#48349399` | `#ada0ee99` |
67
+ | `--text-4-brand` | `color-mix(in oklch, var(--text-2-brand) 66%, transparent)` | `color-mix(in oklch, var(--text-2-brand) 62%, transparent)` | `color-mix(in oklch, var(--text-2-brand) 66%, transparent)` | `color-mix(in oklch, var(--text-2-brand) 62%, transparent)` |
68
68
  | `--text-5-brand` | `color-mix(in oklch, var(--text-2-brand) 40%, transparent)` | `color-mix(in oklch, var(--text-2-brand) 40%, transparent)` | `#48349366` | `#ada0ee66` |
69
69
  | `--text-1-info` | `oklch(from var(--anta-seed-info) 0.38 0.11 h)` | `oklch(from var(--anta-seed-info) 0.85 0.1 h)` | `#003969` | `#9ed2ff` |
70
70
  | `--text-2-info` | `oklch(from var(--anta-seed-info) 0.43 0.15 h)` | `oklch(from var(--anta-seed-info) 0.77 0.11 h)` | `#175082` | `#7db6e8` |
71
71
  | `--text-3-info` | `color-mix(in oklch, var(--text-2-info) 82%, transparent)` | `color-mix(in oklch, var(--text-2-info) 80%, transparent)` | `#175082cc` | `#7db6e8cc` |
72
- | `--text-4-info` | `color-mix(in oklch, var(--text-2-info) 60%, transparent)` | `color-mix(in oklch, var(--text-2-info) 60%, transparent)` | `#175082b2` | `#7db6e899` |
72
+ | `--text-4-info` | `color-mix(in oklch, var(--text-2-info) 66%, transparent)` | `color-mix(in oklch, var(--text-2-info) 62%, transparent)` | `color-mix(in oklch, var(--text-2-info) 66%, transparent)` | `color-mix(in oklch, var(--text-2-info) 62%, transparent)` |
73
73
  | `--text-5-info` | `color-mix(in oklch, var(--text-2-info) 40%, transparent)` | `color-mix(in oklch, var(--text-2-info) 40%, transparent)` | `#17508280` | `#7db6e866` |
74
74
  | `--text-1-success` | `oklch(from var(--anta-seed-success) 0.38 0.11 h)` | `oklch(from var(--anta-seed-success) 0.85 0.1 h)` | `#004618` | `#9ddeb1` |
75
75
  | `--text-2-success` | `oklch(from var(--anta-seed-success) 0.43 0.15 h)` | `oklch(from var(--anta-seed-success) 0.77 0.11 h)` | `#1f5c31` | `#74cd8e` |
76
76
  | `--text-3-success` | `color-mix(in oklch, var(--text-2-success) 82%, transparent)` | `color-mix(in oklch, var(--text-2-success) 80%, transparent)` | `#1f5c31cc` | `#74cd8ecc` |
77
- | `--text-4-success` | `color-mix(in oklch, var(--text-2-success) 60%, transparent)` | `color-mix(in oklch, var(--text-2-success) 60%, transparent)` | `#1f5c3199` | `#74cd8e99` |
77
+ | `--text-4-success` | `color-mix(in oklch, var(--text-2-success) 66%, transparent)` | `color-mix(in oklch, var(--text-2-success) 62%, transparent)` | `color-mix(in oklch, var(--text-2-success) 66%, transparent)` | `color-mix(in oklch, var(--text-2-success) 62%, transparent)` |
78
78
  | `--text-5-success` | `color-mix(in oklch, var(--text-2-success) 40%, transparent)` | `color-mix(in oklch, var(--text-2-success) 40%, transparent)` | `#1f5c3166` | `#74cd8e66` |
79
79
  | `--text-1-warning` | `oklch(from var(--anta-seed-warning) 0.38 0.11 h)` | `oklch(from var(--anta-seed-warning) 0.85 0.1 h)` | `#7f410b` | `#f0bf75` |
80
80
  | `--text-2-warning` | `oklch(from var(--anta-seed-warning) 0.43 0.15 h)` | `oklch(from var(--anta-seed-warning) 0.77 0.11 h)` | `#995200` | `#e1a452` |
81
81
  | `--text-3-warning` | `color-mix(in oklch, var(--text-2-warning) 82%, transparent)` | `color-mix(in oklch, var(--text-2-warning) 80%, transparent)` | `#995200cc` | `#e1a452cc` |
82
- | `--text-4-warning` | `color-mix(in oklch, var(--text-2-warning) 60%, transparent)` | `color-mix(in oklch, var(--text-2-warning) 60%, transparent)` | `#99520099` | `#e1a45299` |
82
+ | `--text-4-warning` | `color-mix(in oklch, var(--text-2-warning) 66%, transparent)` | `color-mix(in oklch, var(--text-2-warning) 62%, transparent)` | `color-mix(in oklch, var(--text-2-warning) 66%, transparent)` | `color-mix(in oklch, var(--text-2-warning) 62%, transparent)` |
83
83
  | `--text-5-warning` | `color-mix(in oklch, var(--text-2-warning) 40%, transparent)` | `color-mix(in oklch, var(--text-2-warning) 40%, transparent)` | `#99520066` | `#e1a45266` |
84
84
  | `--text-1-critical` | `oklch(from var(--anta-seed-critical) 0.38 0.11 h)` | `oklch(from var(--anta-seed-critical) 0.85 0.1 h)` | `#8f1014` | `#ffabac` |
85
85
  | `--text-2-critical` | `oklch(from var(--anta-seed-critical) 0.43 0.15 h)` | `oklch(from var(--anta-seed-critical) 0.77 0.11 h)` | `#a01c1c` | `#e78e90` |
86
86
  | `--text-3-critical` | `color-mix(in oklch, var(--text-2-critical) 82%, transparent)` | `color-mix(in oklch, var(--text-2-critical) 80%, transparent)` | `#a01c1ccc` | `#e78e90cc` |
87
- | `--text-4-critical` | `color-mix(in oklch, var(--text-2-critical) 60%, transparent)` | `color-mix(in oklch, var(--text-2-critical) 60%, transparent)` | `#a01c1c99` | `#e78e9099` |
87
+ | `--text-4-critical` | `color-mix(in oklch, var(--text-2-critical) 66%, transparent)` | `color-mix(in oklch, var(--text-2-critical) 62%, transparent)` | `color-mix(in oklch, var(--text-2-critical) 66%, transparent)` | `color-mix(in oklch, var(--text-2-critical) 62%, transparent)` |
88
88
  | `--text-5-critical` | `color-mix(in oklch, var(--text-2-critical) 40%, transparent)` | `color-mix(in oklch, var(--text-2-critical) 40%, transparent)` | `#a01c1c66` | `#e78e9066` |
89
89
 
90
90
  ## Border
@@ -5,32 +5,34 @@ events. For custom wheel, pointer, and touch handling, use [Capture](./capture.m
5
5
 
6
6
  ## Display
7
7
 
8
- Use `display`, `gap`, and `round` for layout and corners. Numeric lengths use
9
- pixels; strings accept CSS lengths. A bare `round` fully rounds the corners.
8
+ Use `display`, `gap`, `padding`, `margin`, and `round` for layout and corners. Numeric lengths use
9
+ pixels; strings accept CSS lengths. `padding` and `margin` also accept CSS
10
+ shorthand, such as `padding="8px 16px"` or `margin="0 auto"`. Omission adds no
11
+ spacing styles. A bare `round` fully rounds the corners.
10
12
 
11
13
  ```tsx
12
- <Box round={8}><span /></Box>
13
- <Box display="flex" round={8} gap={6}><span /></Box>
14
- <Box display="grid" round={8} gap="0.5rem" style={{ gridTemplateColumns: '1fr 1fr' }}><span /></Box>
14
+ <Box round={8} padding={10}><span /></Box>
15
+ <Box display="flex" round={8} gap={6} padding={10}><span /></Box>
16
+ <Box display="grid" round={8} gap="0.5rem" padding="8px 16px" style={{ gridTemplateColumns: '1fr 1fr' }}><span /></Box>
15
17
  ```
16
18
 
17
19
  ## Overflow
18
20
 
19
21
  Box reports overflow, clipping, and scrollability as measurements and CSS
20
- states. Use `observe="size"` to keep CSS states current. `fade` and
21
- `onMeasureChange` also enable measurement; without these, Box adds no size
22
- observers.
22
+ states. Use `observe="overflow"` to keep overflow, clipping, and scrollability
23
+ states current as content changes. `observe="edges"` also tracks which
24
+ edges hide content while scrolling. `fade` enables both automatically.
23
25
 
24
26
  `.edge` is a demo class name. Use your own selector.
25
27
 
26
28
  ```tsx
27
- <Box observe="size" round={8} className="edge" style={{ width: 150 }}>Content that fits.</Box>
29
+ <Box observe="overflow" round={8} className="edge" style={{ width: 150 }}>Content that fits.</Box>
28
30
 
29
- <Box observe="size" round={8} className="edge" style={{ width: 150, overflow: 'hidden', whiteSpace: 'nowrap' }}>
31
+ <Box observe="overflow" round={8} className="edge" style={{ width: 150, overflow: 'hidden', whiteSpace: 'nowrap' }}>
30
32
  A label too long for this box.
31
33
  </Box>
32
34
 
33
- <Box observe="size" round={8} className="edge" style={{ width: 150, height: 56, overflowY: 'auto' }}>
35
+ <Box observe="overflow" round={8} className="edge" style={{ width: 150, height: 56, overflowY: 'auto' }}>
34
36
  One. Two. Three. Four. Five. Six. Seven. Eight. Nine. Ten.
35
37
  </Box>
36
38
  ```
@@ -65,7 +67,7 @@ const TAGS = ['frontend', 'design-system', 'a11y', 'performance']
65
67
  The mask clips to the padding box. It preserves the Box border, shadows, and
66
68
  focus ring when no edge is hidden.
67
69
 
68
- To style hidden edges without `fade`, use `observe="size"` and the
70
+ To style hidden edges without `fade`, use `observe="edges"` and the
69
71
  `hidden-start-x`, `hidden-end-x`, `hidden-start-y`, or `hidden-end-y` CSS states.
70
72
 
71
73
  ### Tooltip on clipped content
@@ -88,11 +90,63 @@ const TAGS = ['frontend', 'design-system', 'a11y', 'performance']
88
90
 
89
91
  ## Measurements
90
92
 
91
- `onMeasureChange` reports one frame after observation starts and when the Box or
92
- its content changes. `changed` contains changed fields; `current` is the full
93
- snapshot. Reporting pauses off screen and resumes when Box returns.
94
-
95
- Resize or scroll the Box to update its measurements.
93
+ By default, `onMeasureChange` reports one frame after observation starts, then when
94
+ the border-box `width` or `height` changes. `changed` contains all fields changed
95
+ since the last event; `current` is the full snapshot. Reporting pauses off screen
96
+ and resumes with a fresh snapshot when Box returns.
97
+
98
+ `observe` accepts one of the eight selections below, or a typed array combining
99
+ them. `observe={['size', 'edges']}` and `observe={['edges', 'size']}` select the
100
+ same triggers. Repeated selections have no effect. Changing the selected
101
+ measurement fields requests a fresh snapshot. TypeScript checks each value;
102
+ use an array to combine selections in JSX.
103
+
104
+ The selections below progress from resize and context signals to continuous
105
+ scroll tracking. Intensity describes typical observation work and event frequency,
106
+ not a fixed performance rating. Content churn and the work in your handler also
107
+ affect the cost.
108
+
109
+ | Selection | Event triggers | Frontend work and intensity |
110
+ | --- | --- | --- |
111
+ | `width` | Border-box `width`. | Low during ordinary use: observes the host; no content or scroll observers. Can report each frame during resizing. |
112
+ | `height` | Border-box `height`. | Same work as `width`, with height as the event trigger. |
113
+ | `size` | Either border-box `width` or `height`. | Same observers as a single dimension; observes the element itself. |
114
+ | `context` | Theme, resolved font, insets, background, focus, and browser/device context through `onContextChange`. | Usually infrequent: shared theme/media listeners and local style/focus reads; no scroll listener. |
115
+ | `overflow` | `clientWidth`, `clientHeight`, `scrollWidth`, `scrollHeight`, `overflowX/Y`, `clippedX/Y`, and `scrollableX/Y`. | Content-dependent: adds content mutations and child resizes; no scroll listener. Does not report individual child dimensions. |
116
+ | `edges` | `hiddenStartX`, `hiddenEndX`, `hiddenStartY`, and `hiddenEndY`. | Measures content/layout changes and scrolling, at most once per frame. Emits only when an edge flag changes, so moving through the middle stays silent. |
117
+ | `scroll` | `scrollLeft` or `scrollTop`. | High during scrolling: measures content/layout and scroll changes and can emit every frame. |
118
+ | `all` | Every measurement field and rendering context. | Enables all observers and can emit every frame. |
119
+
120
+ Selections are independent. `scroll` selects offset triggers; it does not include
121
+ `size`, `overflow`, `edges`, or `context`. Every measurement event still
122
+ contains fresh values for every measurement field, including client/content
123
+ dimensions and hidden edges. Combine triggers when you also need events caused
124
+ by those other changes. With `observe="size"`, content-only changes cause no
125
+ event; the next size event includes the current content measurements.
126
+
127
+ For a scroll-edge indicator, use `edges`: it reads during scrolling but
128
+ avoids a callback for each offset change. `scroll` and `all` can cause the most
129
+ frequent application updates, especially when the handler sets state or sends
130
+ each snapshot to a worker. Prefer `fade` when CSS alone needs the edge state.
131
+
132
+ When no measurement is selected, `onMeasureChange` adds `size`;
133
+ `onContextChange` adds `context`.
134
+ Passing both handlers observes size and context without enabling scroll events.
135
+ Without handlers or `fade`, omitting `observe` keeps Box idle.
136
+
137
+ Set `throttle` to a minimum interval in milliseconds. The first report has no
138
+ added delay; subsequent reports include a trailing update with the latest values.
139
+ Omit it or pass `0` for frame-based reporting. Negative or non-finite values use
140
+ `0`. The interval applies to `onMeasureChange`; context events are not throttled.
141
+ Throttling limits event delivery; it does not reduce observer reads.
142
+ `edges`, `scroll`, and `fade` continue measuring during scrolling so their
143
+ CSS states remain current.
144
+
145
+ `Tooltip truncatedOnly` reads Box's clipping on demand. It works without
146
+ `observe` or `onMeasureChange` and does not enable continuous observation.
147
+
148
+ This readout observes `['size', 'overflow', 'edges', 'scroll']` with `throttle={100}`.
149
+ Resize or scroll the Box to update it.
96
150
 
97
151
  ```tsx title="measurechange"
98
152
  const [measurement, setMeasurement] = useState<BoxMeasurement | null>(null)
@@ -100,6 +154,8 @@ const [measurement, setMeasurement] = useState<BoxMeasurement | null>(null)
100
154
  <Box
101
155
  round={8}
102
156
  className="measure-probe-box"
157
+ observe={['size', 'overflow', 'edges', 'scroll']}
158
+ throttle={100}
103
159
  onMeasureChange={(_, { current }) => setMeasurement(current)}
104
160
  >
105
161
  <Text size="small" priority="tertiary">Resize or scroll this Box.</Text>
@@ -224,14 +280,17 @@ const canvasRef = useRef<HTMLCanvasElement>(null)
224
280
 
225
281
  | Prop | Type | Default | Description |
226
282
  |------|------|---------|-------------|
227
- | `display?` | BoxDisplay | block | Layout model for the host. All other layout, sizing, mask, and shadow properties stay ordinary `className` / `style` CSS on the Box itself. |
283
+ | `display?` | 'block' \| 'inline-block' \| 'flex' \| 'inline-flex' \| 'grid' \| 'inline-grid' | block | Layout model for the host. Sizing, alignment, mask, and shadow properties stay ordinary `className` / `style` CSS on the Box itself. |
228
284
  | `fade?` | boolean | — | Fades out every edge that currently hides clipped content, and drops the fade from an edge once the reader scrolls to it. |
229
285
  | `fadeSize?` | number \| string | 24 | Depth of the `fade` gradient. A `number` is pixels; a string is any CSS length. |
230
286
  | `gap?` | number \| string | — | Gap between children, matching the CSS `gap` property. A `number` is pixels; a string is any CSS length or two-value gap (`'1rem'`, `'8px 16px'`). Applies while the Box is a flex or grid container. |
231
- | `observe?` | 'size' \| 'context' \| 'all' | — | What the Box watches, when a handler is not what turns it on. `'size'` keeps the overflow CSS states (`:state(clipped-x)`, `:state(scrollable-y)`, …) current — reach for it when your own CSS is the only reader. `'context'` and `'all'` are there for symmetry; passing `onMeasureChange` or `onContextChange` already turns the matching half on. |
287
+ | `margin?` | number \| string | — | Outer spacing, matching CSS `margin`. Numbers are pixels; strings accept CSS shorthand, `auto`, negative lengths, and custom properties. Omission adds no style. |
288
+ | `observe?` | 'width' \| 'height' \| 'size' \| 'context' \| 'overflow' \| 'edges' \| 'scroll' \| 'all' \| readonly BoxObservation[] | — | One selection or an array of selections, in any order. `'size'` watches width and height; `'context'` watches rendering context; `'overflow'` watches content dimensions and clipping. `'edges'` reports which edges hide content; `'scroll'` reports offsets, potentially every frame; `'all'` selects everything. Selections are independent: use `['size', 'edges']` to combine them. A measurement handler implies `'size'` when no measurement is selected; a context handler adds `'context'`. Size skips content and scroll observers; overflow adds content observation; hidden edges and scroll add scroll reads. Without handlers or `fade`, omission stays idle. |
232
289
  | `onContextChange?` | (event, detail) => void | — | Fired after Box's browser and local rendering context changes. `detail` contains the changed fields and a full current snapshot. |
233
- | `onMeasureChange?` | (event, detail) => void | — | Fired after Box geometry or its content-overflow state changes. `detail` contains the changed fields and a full current snapshot. |
290
+ | `onMeasureChange?` | (event, detail) => void | — | Fired when a selected measurement field changes. `detail` contains all fields changed since the last event and a full current snapshot. |
291
+ | `padding?` | number \| string | — | Inner spacing, matching CSS `padding`. Numbers are pixels; strings accept CSS shorthand, percentages, and custom properties. Omission adds no style. |
234
292
  | `round?` | boolean \| number \| string | — | Fully-round corners (`border-radius: 999px`, clamped to the box). Pass a `number` (px) or a CSS length string (`'1rem'`) for a custom radius. Omit for square corners. |
293
+ | `throttle?` | number | 0 | Minimum interval between measurement events, in milliseconds. The first report has no added delay; a trailing report delivers the latest values. Active observers and CSS clipping states are not throttled. |
235
294
 
236
295
  ### BoxMeasurement
237
296
 
@@ -261,21 +320,21 @@ const canvasRef = useRef<HTMLCanvasElement>(null)
261
320
  | Field | Type | Default | Description |
262
321
  |------|------|---------|-------------|
263
322
  | `backgroundColor` | string | — | Resolved `background-color`. Needed when the box's content is drawn somewhere else — an offscreen canvas, a worker, an export — where the box's own background is not behind it. |
264
- | `browser` | BoxBrowser | — | Browser family. |
323
+ | `browser` | 'chrome' \| 'edge' \| 'firefox' \| 'opera' \| 'safari' \| 'unknown' | — | Browser family. |
265
324
  | `browserVersion` | number | — | Browser major version, or `0` when unknown. Minor and patch digits are frozen by every engine, so only the major number is reported. |
266
325
  | `devicePixelRatio` | number | — | `window.devicePixelRatio`: CSS pixels per device pixel. `1` on a standard display, `2` on most Retina screens, and a fraction under OS or browser zoom. Live — it re-reports on zoom and when the window moves to a monitor with a different density. |
267
326
  | `focusWithin` | boolean | — | Whether focus is on the box or any of its descendants, read from the native `:focus-within`. For CSS, use that pseudo-class directly; this field is for logic that cannot query the DOM. |
268
327
  | `font` | BoxFont | — | Resolved text style, ready to hand to a canvas 2D context. |
269
- | `globalMode` | BoxMode | — | Mode on `<html>`, independent of an enclosing local scope. |
328
+ | `globalMode` | 'light' \| 'dark' | — | Mode on `<html>`, independent of an enclosing local scope. |
270
329
  | `hover` | boolean | — | Whether ordinary hover interaction is available. |
271
330
  | `inset` | BoxInset | — | Padding and border widths, for placing content inside the border box. |
272
331
  | `mobile` | boolean | — | Whether the browser reports a mobile device. |
273
- | `mode` | BoxMode | — | Closest scoped Anta mode. A local `.light` can override a dark document. |
274
- | `os` | BoxOS | — | Operating-system family. |
332
+ | `mode` | 'light' \| 'dark' | — | Closest scoped Anta mode. A local `.light` can override a dark document. |
333
+ | `os` | 'android' \| 'ios' \| 'linux' \| 'macos' \| 'windows' \| 'unknown' | — | Operating-system family. |
275
334
  | `osVersion` | number | — | Operating-system major version, or `0` when the browser withholds it. Browsers freeze this: every engine reports macOS as `10.15.7` and Windows 11 as `10.0`, so only Android and iOS carry a real number. Treat it as a hint, never as a gate. |
276
- | `pointer` | BoxPointer | — | Most precise available primary pointer. |
335
+ | `pointer` | 'fine' \| 'coarse' \| 'none' | — | Most precise available primary pointer. |
277
336
  | `reducedMotion` | boolean | — | Whether the reader asks for reduced motion. |
278
- | `systemAppearance` | BoxMode | — | Browser / operating-system color preference, independent of Anta classes. |
337
+ | `systemAppearance` | 'light' \| 'dark' | — | Browser / operating-system color preference, independent of Anta classes. |
279
338
 
280
339
  ### BoxFont
281
340
 
@@ -318,8 +377,11 @@ const canvasRef = useRef<HTMLCanvasElement>(null)
318
377
  ## Web component
319
378
 
320
379
  Use `<a-box>` without JSX. Events are non-bubbling `CustomEvent`s with the same
321
- `detail`. Set `observe="size"`, `"context"`, or `"all"` explicitly; adding a
322
- listener does not enable observation. A bare `observe` means `"all"`.
380
+ `detail`. Set `observe` explicitly; adding a listener does not enable
381
+ observation. Combine the eight selections with spaces, such as
382
+ `observe="size edges"` or `observe="size scroll"`, in any order. Repeated tokens
383
+ have no effect; unknown tokens are ignored. A bare `observe` means `"all"`.
384
+ `throttle="100"` limits measurement events to a 100 ms interval.
323
385
 
324
386
  ```html title="a-box"
325
387
  <a-box display="grid" gap="8px" round="12px" observe="all"
@@ -335,20 +397,22 @@ Import `@antadesign/anta/elements/a-box` to register the element. Listen for
335
397
 
336
398
  ## Styling
337
399
 
338
- Your `className` and `style` override `display`, `gap`, and `round` through the
400
+ Your `className` and `style` override `display`, `gap`, `padding`, `margin`, and
401
+ `round` through the
339
402
  `anta.components` CSS layer.
340
403
 
341
- Without typed CSS `attr()` support, raw `gap`, `round`, and `fade-size` length
342
- attributes need matching custom properties. The JSX wrapper sets these for you:
404
+ Without typed CSS `attr()` support, raw `gap`, `padding`, `margin`, `round`,
405
+ and `fade-size` attributes need matching custom properties. The JSX wrapper
406
+ sets these for you. Raw HTML lengths need units, such as `padding="16px"`:
343
407
 
344
408
  ```html
345
- <a-box display="flex" gap round fade class="raw-box"
346
- style="--box-gap: 8px; --box-round: 12px; --box-fade-size: 32px">
409
+ <a-box display="flex" gap padding margin round fade class="raw-box"
410
+ style="--box-gap: 8px; --box-padding: 12px; --box-margin: 0 auto; --box-round: 12px; --box-fade-size: 32px">
347
411
  <span>Layout</span><span>Context</span><span>Measurements</span>
348
412
  </a-box>
349
413
  ```
350
414
 
351
415
  ```css
352
- .raw-box { width: 190px; overflow: auto; padding: 12px; border: 1px solid var(--border-4); }
416
+ .raw-box { width: 190px; overflow: auto; border: 1px solid var(--border-4); }
353
417
  .raw-box span { flex: 0 0 auto; }
354
418
  ```
@@ -4,6 +4,9 @@ Hierarchy navigation assembled from Anta Buttons. Breadcrumb entries can be
4
4
  links, actions, or copy controls. Set `maxItems` to fold one middle range into a
5
5
  More menu without measuring the available width.
6
6
 
7
+ Breadcrumbs do not scroll horizontally by default. Use `maxItems` to limit
8
+ visible entries, or enable scrolling with the [scrolling recipe](#horizontal-scrolling).
9
+
7
10
  ## Items
8
11
 
9
12
  Pass ordered `BreadcrumbItem` objects through `items`. Each item is a link,
@@ -212,3 +215,33 @@ with your own selector.
212
215
  color: var(--text-2);
213
216
  }
214
217
  ```
218
+
219
+ ### Horizontal scrolling
220
+
221
+ Set `overflow-x: auto` on the trail to scroll when its contents exceed the
222
+ available width. `maxItems` limits the item count; long labels can still overflow.
223
+
224
+ Horizontal scrolling also makes vertical overflow compute to `auto`, which
225
+ clips the default button focus ring above and below the row. Set
226
+ `outline-offset: -1px` on the trail's focused controls to draw the ring inside
227
+ their bounds. The selector below covers breadcrumb links, action and copy
228
+ buttons, and the More control.
229
+
230
+ `scrolling-breadcrumbs` is an example class; replace it with your own selector.
231
+ Use Tab to move through the controls and see the focus ring.
232
+
233
+ ```tsx
234
+ <Box style={{ width: 280, maxWidth: '100%' }}>
235
+ <Breadcrumbs className="scrolling-breadcrumbs" maxItems={3} items={[
236
+ { label: 'Anta', href: '/' },
237
+ { label: 'Documentation', href: '/box/' },
238
+ { label: 'Layout components', href: '/panel/' },
239
+ { label: 'Breadcrumbs', current: true },
240
+ ]} />
241
+ </Box>
242
+ ```
243
+
244
+ ```css
245
+ .scrolling-breadcrumbs { overflow-x: auto; }
246
+ .scrolling-breadcrumbs > :focus-visible { outline-offset: -1px; }
247
+ ```
@@ -166,8 +166,8 @@ name "trash". Pass your own `aria-label` to override.
166
166
  ### Children
167
167
 
168
168
  ```tsx
169
- <Button tone="brand" label="Save" icon="check">
170
- <span style={{ opacity: 0.7 }}>⌘S</span>
169
+ <Button tone="brand" label="Save" icon="check" aria-keyshortcuts="Meta+s">
170
+ <kbd aria-hidden="true" style={{ font: 'inherit', fontVariationSettings: 'inherit', opacity: 0.7 }}>⌘S</kbd>
171
171
  </Button>
172
172
  ```
173
173
 
@@ -214,9 +214,9 @@ native text selection or touch gestures.
214
214
  | `onWheelInput?` | (event, detail) => void | — | Accepted wheel input, with a serialized original event, Capture-relative geometry, focus state, and activation reason. Cancellation is already complete. |
215
215
  | `pan?` | boolean \| CapturePan | — | Emit custom pan motion. `true` enables touch panning on both axes without momentum. Options select devices, axes, bounds directions, and optional inertia. Captures the pointer internally; `pointerCapture` is not required. Sets CSS touch-action through attributes before the gesture starts. |
216
216
  | `pointerCapture?` | boolean \| CapturePointerCapture | — | Emit raw data for a primary pointer until release or cancellation. An options object filters devices/buttons and configures activation. Nested interactive controls are excluded unless explicitly included. A listener alone enables nothing. |
217
- | `wheelActivation?` | CaptureWheelActivation | settled | Pointer or focus condition required before wheel input can be captured. Focus applies only to input targeted within this Capture. |
217
+ | `wheelActivation?` | 'hover' \| 'settled' \| 'focus' \| 'settled-or-focus' | settled | Pointer or focus condition required before wheel input can be captured. Focus applies only to input targeted within this Capture. |
218
218
  | `wheelCapture?` | CaptureInputDirections | — | Capture wheel input in the enabled directions and emit `onWheelInput`. `true` accepts all directions. Omit or pass `false` to leave wheel input alone. Nested native wheel controls and Anta menus are excluded. All-false direction bounds preserve pointer settling while declining input. A listener alone never enables capture. |
219
- | `wheelModifier?` | CaptureInputModifier | none | Required modifier for wheel capture. `none` preserves browser Ctrl/pinch zoom. |
219
+ | `wheelModifier?` | 'none' \| 'any' \| 'alt' \| 'ctrl' \| 'meta' \| 'shift' | none | Required modifier for wheel capture. `none` preserves browser Ctrl/pinch zoom. |
220
220
  | `wheelSettle?` | CaptureWheelSettle | { delay: 150, tolerance: 5, resetOnMove: false } | Dwell delay, movement tolerance, and whether movement resets eligibility. |
221
221
 
222
222
  ### CaptureWheelSettle
@@ -233,7 +233,7 @@ native text selection or touch gestures.
233
233
  |------|------|---------|-------------|
234
234
  | `buttons?` | readonly number[] | [0] | Accepted initiating buttons, using PointerEvent.button values. |
235
235
  | `includeInteractive?` | boolean | false | Allow capture to start on nested native or ARIA controls, links, or editable regions. |
236
- | `modifier?` | CaptureInputModifier | any | Modifier required to start a capture session. |
236
+ | `modifier?` | 'none' \| 'any' \| 'alt' \| 'ctrl' \| 'meta' \| 'shift' | any | Modifier required to start a capture session. |
237
237
  | `pointerTypes?` | readonly CapturePointerType[] | ['mouse', 'pen', 'touch'] | Accepted pointer devices. One primary pointer is tracked per Capture. |
238
238
  | `threshold?` | number | 0 | Movement required before activation, in viewport CSS pixels. |
239
239
 
@@ -258,7 +258,7 @@ native text selection or touch gestures.
258
258
 
259
259
  | Field | Type | Default | Description |
260
260
  |------|------|---------|-------------|
261
- | `activationReason` | CaptureWheelActivationReason | — | |
261
+ | `activationReason` | 'immediate' \| 'settled' \| 'focus' | — | |
262
262
  | `boxHeight` | number | — | |
263
263
  | `boxWidth` | number | — | Dimensions of the same viewport bounding rectangle, in CSS pixels. |
264
264
  | `focusWithin` | boolean | — | |
@@ -271,7 +271,7 @@ native text selection or touch gestures.
271
271
 
272
272
  | Field | Type | Default | Description |
273
273
  |------|------|---------|-------------|
274
- | `activationReason` | CapturePointerActivationReason | — | |
274
+ | `activationReason` | 'pointer-down' \| 'drag-threshold' | — | |
275
275
  | `boxHeight` | number | — | |
276
276
  | `boxWidth` | number | — | Dimensions of the same viewport bounding rectangle, in CSS pixels. |
277
277
  | `deltaX` | number | — | Movement since the previous delivered sample, in viewport CSS pixels. |
@@ -285,13 +285,13 @@ native text selection or touch gestures.
285
285
  | `phase` | 'start' \| 'move' \| 'end' \| 'cancel' | — | |
286
286
  | `pointerEvent` | SerializedPointerEvent \| null | — | Null when cancellation comes from lifecycle or configuration changes. |
287
287
  | `start` | CapturePointerStart | — | |
288
- | `cancelReason?` | CaptureInputCancelReason | — | |
288
+ | `cancelReason?` | 'pointer-cancel' \| 'lost-capture' \| 'disabled' \| 'disconnected' \| 'blur' \| 'interrupted' | — | |
289
289
 
290
290
  ### CapturePanInput
291
291
 
292
292
  | Field | Type | Default | Description |
293
293
  |------|------|---------|-------------|
294
- | `activationReason` | CapturePointerActivationReason | — | |
294
+ | `activationReason` | 'pointer-down' \| 'drag-threshold' | — | |
295
295
  | `boxHeight` | number | — | |
296
296
  | `boxWidth` | number | — | Dimensions of the same viewport bounding rectangle, in CSS pixels. |
297
297
  | `deltaX` | number | — | Incremental scroll motion in viewport CSS pixels. |
@@ -305,7 +305,7 @@ native text selection or touch gestures.
305
305
  | `start` | CapturePointerStart | — | |
306
306
  | `velocityX` | number | — | Scroll velocity in viewport CSS pixels/ms. |
307
307
  | `velocityY` | number | — | |
308
- | `cancelReason?` | CaptureInputCancelReason | — | |
308
+ | `cancelReason?` | 'pointer-cancel' \| 'lost-capture' \| 'disabled' \| 'disconnected' \| 'blur' \| 'interrupted' | — | |
309
309
 
310
310
  ## Web component
311
311
 
@@ -163,7 +163,11 @@ function ParentChild() {
163
163
 
164
164
  ## Accessibility
165
165
 
166
- The wrapper sets `role="checkbox"` and `aria-checked` (`"true"` / `"false"` / `"mixed"`), and derives the accessible name from `label` or `children`. For a label-less checkbox, pass `aria-label`.
166
+ The wrapper sets `role="checkbox"`, and the element keeps `aria-checked`
167
+ (`"true"` / `"false"` / `"mixed"`) in sync. Its light-DOM label supplies the
168
+ accessible name and its hint supplies the accessible description through
169
+ `ElementInternals`; no generated IDs are needed. For a label-less checkbox, pass
170
+ `aria-label`.
167
171
 
168
172
  Space toggles the checkbox. Follows the [WAI-ARIA checkbox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/).
169
173
 
@@ -174,7 +178,7 @@ Space toggles the checkbox. Follows the [WAI-ARIA checkbox pattern](https://www.
174
178
  | `checked?` | CheckboxValue | — | Controlled checked state. When provided the checkbox is controlled — it renders exactly this and never self-applies; `onStateChange` is a *request* the consumer accepts by updating this prop. Use `defaultChecked` for an uncontrolled checkbox. `'indeterminate'` shows the minus glyph and takes visual precedence; clicking it requests `true`. |
175
179
  | `defaultChecked?` | CheckboxValue | false | Initial checked state for an uncontrolled checkbox. Read once; later changes are ignored and the element updates its state after interaction. |
176
180
  | `disabled?` | boolean | — | Disable the checkbox (no interaction, dropped from the tab order). |
177
- | `hint?` | ReactNode | — | Secondary text rendered under the label — explanatory copy, like Input's hint. Not part of the accessible name. |
181
+ | `hint?` | ReactNode | — | Secondary text rendered under the label and exposed as the checkbox's accessible description. Not part of the accessible name. |
178
182
  | `label?` | string | — | Visible label — the *value* of the checkbox (clicked along with the box). Convenience for the common single-string case; for richer content (markup, a link, an info icon) use `children`. When both are supplied, `label` renders first. Required unless `children` or `aria-label` is provided (a `role="checkbox"` takes its name from the author, not the markup). |
179
183
  | `name?` | string | — | Form field name. Inside a `<form>` the checkbox submits under this name, contributing `value` when checked — like a native checkbox. |
180
184
  | `onChange?` | (event) => void | — | Fired *after* the checked state changes — a native `change` event (the post-apply counterpart to `onStateChange`). Not cancelable. For a controlled checkbox this fires once you've updated `checked`. |
@@ -183,14 +187,15 @@ Space toggles the checkbox. Follows the [WAI-ARIA checkbox pattern](https://www.
183
187
  | `round?` | boolean \| number \| string | — | Round the checkbox mark to a circle (`border-radius: 999px` on the box). Pass a `number` (px) or a CSS length string for a rounded-square mark instead. |
184
188
  | `size?` | 'small' \| 'medium' \| 'large' | 'medium' | Size variant. small=14px, medium=16px, large=18px box. |
185
189
  | `tone?` | 'brand' \| 'neutral' \| 'info' \| 'success' \| 'warning' \| 'critical' \| (string & {}) | 'neutral' | Color of the **mark**. In the default `all` scope this colors the checked-box fill and unselected box border. A named tone or any literal CSS color (`'#ff1493'`, `'rebeccapurple'`) for a one-off custom tone. Named tones track light/dark mode automatically; a custom color keeps its hue + chroma and pins lightness to the fill curve. Set `toneScope="selected"` to tone only the checked mark and leave the empty box neutral. The label + hint stay neutral — recolor them in plain CSS via the theme-aware `--text-N-{tone}` tokens. |
186
- | `toneScope?` | ToneScope | 'all' | Apply `tone` to every state, or only while checked so the empty box stays neutral. `selected` is useful when a tinted resting border would read as a validation state. |
190
+ | `toneScope?` | 'all' \| 'selected' | 'all' | Apply `tone` to every state, or only while checked so the empty box stays neutral. `selected` is useful when a tinted resting border would read as a validation state. |
187
191
  | `value?` | string | "on" | Value submitted with the form when checked — like a native checkbox. |
188
192
 
189
193
  ## Web Component
190
194
 
191
195
  Use the web component directly when you are not using React or Preact and a native control does not fit.
192
196
 
193
- The focusable host carries the state. Label and hint are light-DOM children.
197
+ The focusable host carries the state. Label and hint are light-DOM children that
198
+ the element exposes as its accessible name and description.
194
199
 
195
200
  ```html
196
201
  <a-checkbox role="checkbox" tabindex="0" name="updates" default-state="checked">