@antadesign/anta 0.3.33 → 0.3.35

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 (205) hide show
  1. package/LICENSE.md +14 -1
  2. package/README.md +9 -0
  3. package/dist/anta_helpers.d.ts +46 -30
  4. package/dist/anta_helpers.js +66 -25
  5. package/dist/bundle.css +1 -1
  6. package/dist/bundle.js +2 -1353
  7. package/dist/components/Banner.d.ts +25 -40
  8. package/dist/components/Banner.js +15 -17
  9. package/dist/components/Breadcrumbs.d.ts +0 -1
  10. package/dist/components/Breadcrumbs.js +0 -1
  11. package/dist/components/Button.d.ts +2 -3
  12. package/dist/components/Button.js +1 -0
  13. package/dist/components/ButtonCopy.js +3 -2
  14. package/dist/components/Calendar.js +13 -13
  15. package/dist/components/Card.d.ts +9 -17
  16. package/dist/components/Card.js +50 -46
  17. package/dist/components/Dialog.d.ts +1 -0
  18. package/dist/components/Dialog.js +16 -10
  19. package/dist/components/Expander.d.ts +6 -21
  20. package/dist/components/Expander.js +24 -23
  21. package/dist/components/Icon.d.ts +8 -14
  22. package/dist/components/Input.d.ts +77 -96
  23. package/dist/components/Input.js +23 -27
  24. package/dist/components/InputAutocomplete.d.ts +29 -10
  25. package/dist/components/InputAutocomplete.js +25 -8
  26. package/dist/components/InputDate.d.ts +0 -1
  27. package/dist/components/InputDate.js +2 -3
  28. package/dist/components/InputTime.d.ts +10 -4
  29. package/dist/components/InputTime.js +20 -16
  30. package/dist/components/Loader.d.ts +2 -2
  31. package/dist/components/Menu.d.ts +5 -4
  32. package/dist/components/Menu.js +13 -8
  33. package/dist/components/MenuItem.js +1 -14
  34. package/dist/components/MenuItemCopy.js +2 -2
  35. package/dist/components/Panel.d.ts +3 -1
  36. package/dist/components/Panel.js +17 -11
  37. package/dist/components/Progress.d.ts +21 -23
  38. package/dist/components/Progress.js +13 -9
  39. package/dist/components/RadioGroup.js +6 -8
  40. package/dist/components/{select-parts.css → Select.css} +1 -1
  41. package/dist/components/Select.d.ts +53 -36
  42. package/dist/components/Select.js +53 -98
  43. package/dist/components/SelectFaceted.d.ts +7 -4
  44. package/dist/components/SelectFaceted.js +21 -10
  45. package/dist/components/Slider.d.ts +28 -11
  46. package/dist/components/Slider.js +20 -20
  47. package/dist/components/Steps.css +1 -1
  48. package/dist/components/Steps.d.ts +0 -1
  49. package/dist/components/Steps.js +1 -12
  50. package/dist/components/Tabs.d.ts +17 -20
  51. package/dist/components/Tabs.js +7 -9
  52. package/dist/components/Text.d.ts +55 -36
  53. package/dist/components/Text.js +35 -22
  54. package/dist/components/Title.d.ts +19 -27
  55. package/dist/components/Title.js +2 -1
  56. package/dist/components/Toaster.js +9 -2
  57. package/dist/components/Tooltip.d.ts +10 -15
  58. package/dist/components/copy-props.d.ts +14 -3
  59. package/dist/components/copy-props.js +14 -3
  60. package/dist/components/select-tree.d.ts +24 -0
  61. package/dist/components/select-tree.js +35 -0
  62. package/dist/element-base.d.ts +10 -0
  63. package/dist/element-base.js +15 -0
  64. package/dist/elements/a-avatar.css +1 -1
  65. package/dist/elements/a-avatar.js +2 -28
  66. package/dist/elements/a-banner.css +1 -1
  67. package/dist/elements/a-banner.d.ts +4 -1
  68. package/dist/elements/a-banner.js +22 -112
  69. package/dist/elements/a-breadcrumbs.d.ts +1 -0
  70. package/dist/elements/a-breadcrumbs.js +1 -0
  71. package/dist/elements/a-button.css +1 -1
  72. package/dist/elements/a-button.d.ts +10 -7
  73. package/dist/elements/a-button.js +18 -1
  74. package/dist/elements/a-calendar.d.ts +14 -13
  75. package/dist/elements/a-calendar.js +29 -24
  76. package/dist/elements/a-card.css +1 -1
  77. package/dist/elements/a-card.d.ts +0 -9
  78. package/dist/elements/a-card.js +0 -184
  79. package/dist/elements/a-checkbox.css +1 -1
  80. package/dist/elements/a-copy.css +1 -1
  81. package/dist/elements/a-copy.d.ts +1 -5
  82. package/dist/elements/a-copy.js +129 -108
  83. package/dist/elements/a-dialog.css +1 -1
  84. package/dist/elements/a-dialog.d.ts +1 -1
  85. package/dist/elements/a-dialog.js +68 -194
  86. package/dist/elements/a-expander.css +1 -1
  87. package/dist/elements/a-expander.d.ts +4 -30
  88. package/dist/elements/a-expander.js +85 -344
  89. package/dist/elements/a-icon.d.ts +5 -23
  90. package/dist/elements/a-icon.js +1 -2
  91. package/dist/elements/a-input-date.d.ts +1 -0
  92. package/dist/elements/a-input-date.js +1 -0
  93. package/dist/elements/a-input-time.css +1 -1
  94. package/dist/elements/a-input-time.d.ts +2 -1
  95. package/dist/elements/a-input-time.js +101 -168
  96. package/dist/elements/a-input.css +1 -1
  97. package/dist/elements/a-input.d.ts +10 -8
  98. package/dist/elements/a-input.js +155 -230
  99. package/dist/elements/a-loader.d.ts +5 -8
  100. package/dist/elements/a-loader.js +1 -2
  101. package/dist/elements/a-menu-item.css +1 -1
  102. package/dist/elements/a-menu-item.d.ts +5 -3
  103. package/dist/elements/a-menu-item.js +5 -1
  104. package/dist/elements/a-menu.css +1 -1
  105. package/dist/elements/a-menu.d.ts +5 -7
  106. package/dist/elements/a-menu.js +383 -299
  107. package/dist/elements/a-panel.css +1 -1
  108. package/dist/elements/a-panel.js +19 -37
  109. package/dist/elements/a-progress.css +1 -1
  110. package/dist/elements/a-progress.d.ts +0 -22
  111. package/dist/elements/a-progress.js +0 -100
  112. package/dist/elements/a-radio-group.d.ts +1 -1
  113. package/dist/elements/a-radio-group.js +6 -4
  114. package/dist/elements/a-select-faceted.d.ts +1 -0
  115. package/dist/elements/a-select-faceted.js +1 -0
  116. package/dist/elements/a-select.d.ts +1 -0
  117. package/dist/elements/a-select.js +1 -0
  118. package/dist/elements/a-slider.css +1 -1
  119. package/dist/elements/a-slider.d.ts +11 -3
  120. package/dist/elements/a-slider.js +244 -242
  121. package/dist/elements/a-steps.d.ts +1 -0
  122. package/dist/elements/a-steps.js +1 -0
  123. package/dist/elements/a-switch.css +1 -1
  124. package/dist/elements/a-tab.css +1 -1
  125. package/dist/elements/a-tabpanel.d.ts +2 -2
  126. package/dist/elements/a-tabpanel.js +13 -3
  127. package/dist/elements/a-tabs.css +1 -1
  128. package/dist/elements/a-tabs.d.ts +1 -1
  129. package/dist/elements/a-tabs.js +6 -4
  130. package/dist/elements/a-tag.css +1 -1
  131. package/dist/elements/a-tag.d.ts +1 -0
  132. package/dist/elements/a-tag.js +1 -0
  133. package/dist/elements/a-text.css +1 -1
  134. package/dist/elements/a-text.d.ts +6 -43
  135. package/dist/elements/a-text.js +110 -193
  136. package/dist/elements/a-title.css +1 -1
  137. package/dist/elements/a-title.d.ts +1 -0
  138. package/dist/elements/a-title.js +1 -0
  139. package/dist/elements/a-toast.css +1 -1
  140. package/dist/elements/a-toast.d.ts +10 -45
  141. package/dist/elements/a-toast.js +80 -66
  142. package/dist/elements/a-toaster.css +1 -1
  143. package/dist/elements/a-toaster.js +9 -44
  144. package/dist/elements/a-tooltip.css +1 -1
  145. package/dist/elements/a-tooltip.d.ts +1 -1
  146. package/dist/elements/a-tooltip.js +142 -136
  147. package/dist/elements/copy-behavior.d.ts +1 -1
  148. package/dist/elements/copy-behavior.js +21 -21
  149. package/dist/elements/index.d.ts +9 -3
  150. package/dist/elements/index.js +6 -6
  151. package/dist/elements/input-focus-modality.d.ts +15 -0
  152. package/dist/elements/input-focus-modality.js +44 -0
  153. package/dist/elements/input-trailing-actions.d.ts +5 -0
  154. package/dist/elements/input-trailing-actions.js +38 -0
  155. package/dist/elements/shadow-aria.d.ts +2 -0
  156. package/dist/elements/shadow-aria.js +2 -1
  157. package/dist/elements/value-input.d.ts +3 -0
  158. package/dist/elements/value-input.js +12 -0
  159. package/dist/general_types.d.ts +103 -96
  160. package/dist/index.d.ts +1 -1
  161. package/dist/input-events.d.ts +4 -0
  162. package/dist/input-events.js +15 -0
  163. package/dist/jsx-runtime.d.ts +70 -23
  164. package/dist/jsx-runtime.js +26 -19
  165. package/dist/native-event-props.d.ts +2 -0
  166. package/dist/native-event-props.js +10 -0
  167. package/dist/reset.css +1 -1
  168. package/dist/theme-antithesis.css +10 -1
  169. package/dist/theme-antune.css +1 -1
  170. package/docs/accessibility.md +17 -3
  171. package/docs/changelog.md +384 -2
  172. package/docs/comparison.md +2 -2
  173. package/docs/components/avatar.md +5 -0
  174. package/docs/components/banner.md +117 -187
  175. package/docs/components/breadcrumbs.md +9 -6
  176. package/docs/components/button.md +22 -0
  177. package/docs/components/card.md +74 -28
  178. package/docs/components/checkbox.md +9 -10
  179. package/docs/components/dialog.md +83 -32
  180. package/docs/components/expander.md +198 -435
  181. package/docs/components/icon.md +11 -17
  182. package/docs/components/input-autocomplete.md +152 -52
  183. package/docs/components/input-date.md +175 -148
  184. package/docs/components/input-time.md +81 -38
  185. package/docs/components/input.md +343 -349
  186. package/docs/components/loader.md +2 -1
  187. package/docs/components/menu.md +35 -6
  188. package/docs/components/panel.md +18 -0
  189. package/docs/components/progress.md +83 -49
  190. package/docs/components/radio.md +39 -43
  191. package/docs/components/select-faceted.md +54 -7
  192. package/docs/components/select.md +390 -386
  193. package/docs/components/slider.md +136 -19
  194. package/docs/components/steps.md +6 -3
  195. package/docs/components/switch.md +8 -9
  196. package/docs/components/tabs.md +110 -104
  197. package/docs/components/text.md +110 -86
  198. package/docs/components/title.md +47 -33
  199. package/docs/components/toaster.md +242 -84
  200. package/docs/components/tooltip.md +204 -113
  201. package/docs/install-config.md +461 -96
  202. package/docs/packages/plot.md +228 -143
  203. package/docs/theming.md +29 -13
  204. package/package.json +43 -4
  205. package/theme-antithesis-license.md +66 -0
package/docs/theming.md CHANGED
@@ -10,11 +10,19 @@ and feel, add a theme stylesheet. Import one theme after the package styles:
10
10
  import '@antadesign/anta/theme-antune.css' // Choose one theme included in the package.
11
11
  ```
12
12
 
13
+ Antune and the default styles are MIT licensed. The Antithesis theme
14
+ (`@antadesign/anta/theme-antithesis.css`) is copyright Antithesis Operations LLC
15
+ and has a [separate noncommercial license](https://github.com/antithesishq/anta/blob/main/theme-antithesis-license.md).
16
+ Commercial use of that theme requires prior written permission through the
17
+ [Antithesis contact page](https://antithesis.com/company/contact/). You can use
18
+ Anta commercially under MIT with the default styles, Antune, or your own theme.
19
+
13
20
  <a id="fonts-in-a-theme"></a>
14
21
 
15
22
  ## Fonts in a theme
16
23
 
17
- Without a reference theme, `tokens.css` defines three system font stacks:
24
+ Anta's themes do not load fonts. `tokens.css` defines three system font stacks,
25
+ which the optional themes preserve:
18
26
 
19
27
  ```css
20
28
  :root, .light {
@@ -27,14 +35,14 @@ Without a reference theme, `tokens.css` defines three system font stacks:
27
35
  ```
28
36
 
29
37
  Components and theme rules choose which variable to use. For example, body text
30
- can use `--sans-serif` while a particular title style uses `--serif`. Without a
31
- theme, Anta does not force font-specific stylistic sets or variable-font axes.
38
+ can use `--sans-serif` while a particular title style uses `--serif`. Package
39
+ styles do not force font-specific stylistic sets or variable-font axes.
32
40
 
33
- You can register your fonts and redefine the stacks in a custom theme stylesheet
34
- such as `theme.css`:
41
+ Host your font files in your application and register them in a separate
42
+ stylesheet such as `fonts.css`. Load it after Anta's styles and optional theme:
35
43
 
36
44
  ```css
37
- /* theme.css */
45
+ /* fonts.css */
38
46
  @font-face {
39
47
  font-family: "App Sans";
40
48
  src: url("/fonts/app-sans.woff2") format("woff2");
@@ -50,13 +58,12 @@ such as `theme.css`:
50
58
  }
51
59
  ```
52
60
 
53
- The **Antune** and **Antithesis** themes included with Anta use custom fonts that
54
- require separate licenses. If your application does not have those licenses,
55
- redefine all three font variables as shown above.
61
+ Alternatively, use the [Google Fonts CSS API](https://developers.google.com/fonts/docs/css2)
62
+ to load your chosen families. This example includes regular and italic styles:
56
63
 
57
64
  ```css
58
- /* theme.css */
59
- @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=JetBrains+Mono:wght@400;600&family=Source+Serif+4:wght@400;600&display=swap");
65
+ /* fonts.css: place @import before other rules. */
66
+ @import url("https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,600;1,400;1,600&family=JetBrains+Mono:ital,wght@0,400;0,600;1,400;1,600&family=Source+Serif+4:ital,wght@0,400;0,600;1,400;1,600&display=swap");
60
67
 
61
68
  :root {
62
69
  --sans-serif: "Inter", sans-serif;
@@ -65,8 +72,17 @@ redefine all three font variables as shown above.
65
72
  }
66
73
  ```
67
74
 
68
- After you redefine these three variables, the theme fonts are not used or
69
- downloaded (exactly what we want in this case).
75
+ Choose the styles and weights your app uses. Loading Google Fonts makes requests
76
+ to Google's servers; self-host font files when you need all assets on your own
77
+ origin.
78
+
79
+ The anta.design website loads its reference fonts through separate
80
+ [Antune font CSS](https://anta.design/themes/fonts-antune.css) and
81
+ [Antithesis font CSS](https://anta.design/themes/fonts-antithesis.css). These
82
+ site stylesheets show the website's font-face declarations, font stacks, and
83
+ font-specific axis settings. They are examples of application font setup and
84
+ are not imported by the published themes. Use your own font stylesheet and
85
+ font sources in your application.
70
86
 
71
87
  <a id="color-seeds"></a>
72
88
 
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@antadesign/anta",
3
- "version": "0.3.33",
3
+ "version": "0.3.35",
4
+ "license": "SEE LICENSE IN LICENSE.md",
4
5
  "type": "module",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
7
8
  "files": [
8
9
  "dist",
9
10
  "docs",
10
- "NOTICES.md"
11
+ "NOTICES.md",
12
+ "theme-antithesis-license.md"
11
13
  ],
12
14
  "packageManager": "pnpm@10.11.1",
13
15
  "exports": {
@@ -23,6 +25,7 @@
23
25
  "types": "./dist/elements/index.d.ts",
24
26
  "default": "./dist/elements/index.js"
25
27
  },
28
+ "./elements/*.css": "./dist/elements/*.css",
26
29
  "./elements/*": {
27
30
  "types": "./dist/elements/*.d.ts",
28
31
  "default": "./dist/elements/*.js"
@@ -42,6 +45,9 @@
42
45
  "./tokens.css": "./dist/tokens.css",
43
46
  "./reset.css": "./dist/reset.css",
44
47
  "./bundle.css": "./dist/bundle.css",
48
+ "./components/Select.css": "./dist/components/Select.css",
49
+ "./components/select.css": "./dist/components/Select.css",
50
+ "./components/select-parts.css": "./dist/components/Select.css",
45
51
  "./theme-antune.css": "./dist/theme-antune.css",
46
52
  "./theme-antithesis.css": "./dist/theme-antithesis.css",
47
53
  "./generate-icons.mjs": "./dist/generate-icons.mjs",
@@ -67,6 +73,26 @@
67
73
  "stop": "node scripts/dev-stop.mjs",
68
74
  "typecheck": "tsc --noEmit -p src/tsconfig.json",
69
75
  "test": "node --test tests/*.test.mjs",
76
+ "test:panel": "node --test tests/panel-csp.mjs",
77
+ "test:panel:package": "node tests/panel-package.mjs",
78
+ "test:dialog": "node --test tests/dialog-csp.mjs",
79
+ "test:dialog:package": "node tests/dialog-package.mjs",
80
+ "test:menu": "node --test tests/menu-csp.mjs",
81
+ "test:menu:package": "node tests/menu-package.mjs",
82
+ "test:input-autocomplete": "node --test tests/input-autocomplete-types.mjs tests/input-autocomplete-projection.mjs tests/input-autocomplete-csp.mjs",
83
+ "test:input-autocomplete:package": "node tests/input-autocomplete-package.mjs",
84
+ "test:select": "node --test tests/select-projection.mjs tests/select-csp.mjs",
85
+ "test:select:package": "node tests/select-package.mjs",
86
+ "test:copy": "node --test tests/copy-csp.mjs",
87
+ "test:copy:package": "node tests/copy-package.mjs",
88
+ "test:components": "node tests/components.mjs",
89
+ "test:expander": "node --test tests/expander-csp.mjs",
90
+ "test:expander:package": "node tests/expander-package.mjs",
91
+ "test:banner": "node --test tests/banner-csp.mjs",
92
+ "test:banner:package": "node tests/banner-package.mjs",
93
+ "test:card": "node --test tests/card-csp.mjs",
94
+ "test:progress": "node --test tests/progress-csp.mjs",
95
+ "test:calendar": "node --test tests/calendar-controlled.mjs",
70
96
  "test:capture-input": "node --test tests/capture-input.test.mjs",
71
97
  "lint": "node scripts/lint-getters.mjs && node scripts/lint-css-layers.mjs",
72
98
  "verify": "pnpm run lint && pnpm run typecheck && pnpm --filter anta-site run docs:api",
@@ -75,10 +101,23 @@
75
101
  "prepare": "pnpm run build",
76
102
  "prepublishOnly": "pnpm run build",
77
103
  "prepack": "pnpm run build:docs",
78
- "test:harness": "node scripts/test-harness.mjs"
104
+ "test:fuzz_component": "node tests/pbt/run.ts",
105
+ "test:consumers": "node tests/consumers/run.mjs",
106
+ "test:input": "node --test tests/input-csp.mjs",
107
+ "test:input:package": "node tests/input-package.mjs",
108
+ "test:tooltip": "node --test tests/tooltip-csp.mjs",
109
+ "test:tooltip:package": "node tests/tooltip-package.mjs",
110
+ "test:toaster": "node --test tests/toaster-csp.mjs",
111
+ "test:toaster:package": "node tests/toaster-package.mjs",
112
+ "test:text": "node --test tests/text-csp.mjs",
113
+ "test:input-time": "node --test tests/input-time-csp.mjs",
114
+ "test:input-time:package": "node tests/input-time-package.mjs",
115
+ "test:selection": "node --test tests/selection-projection.mjs tests/selection-value.mjs",
116
+ "test:selection:package": "node tests/selection-package.mjs",
117
+ "test:slider": "node --test tests/slider-projection.mjs tests/slider-csp.mjs",
118
+ "test:slider:package": "node tests/slider-package.mjs"
79
119
  },
80
120
  "devDependencies": {
81
- "@antithesishq/bombadil": "0.7.5",
82
121
  "@types/react": "19.3.0",
83
122
  "@typescript/native": "npm:typescript@7.0.2",
84
123
  "axe-core": "4.13.0",
@@ -0,0 +1,66 @@
1
+ # Antithesis theme license
2
+
3
+ Copyright (c) 2026 Antithesis Operations LLC. All rights reserved except as
4
+ expressly granted below.
5
+
6
+ ## Scope
7
+
8
+ This license applies only to `src/theme-antithesis.css`, its built copy
9
+ `dist/theme-antithesis.css` (exported as
10
+ `@antadesign/anta/theme-antithesis.css`), and copies or modifications of that
11
+ theme, including the documentation site's `/themes/antithesis.css`.
12
+ The theme is excluded from the repository's MIT license. Other Anta files
13
+ retain their applicable licenses.
14
+
15
+ ## Noncommercial permission
16
+
17
+ Permission is granted, free of charge, to use, copy, modify, and redistribute
18
+ the theme solely for noncommercial purposes, provided that this license and
19
+ the copyright notice accompany all copies or substantial portions. Modified
20
+ copies must identify that changes were made and remain subject to these terms
21
+ for the portions derived from the theme.
22
+
23
+ Noncommercial purposes are purposes that are not primarily intended for or
24
+ directed toward commercial advantage or monetary compensation. Examples include
25
+ personal projects, education, and research without a commercial purpose.
26
+
27
+ Commercial use includes applying the theme to a business website or internal
28
+ business tool, a product or service offered for sale, paid client work, or an
29
+ advertising-supported or otherwise monetized application. Making a product
30
+ available free of charge does not by itself make its use noncommercial.
31
+
32
+ ## Commercial permission
33
+
34
+ Commercial use, modification, or redistribution requires prior written
35
+ permission from Antithesis Operations LLC, except for the package distribution
36
+ permission below. Request permission through the
37
+ [Antithesis contact page](https://antithesis.com/company/contact/).
38
+
39
+ ## Package distribution permission
40
+
41
+ Downloading, installing, and redistributing an unmodified Anta package that
42
+ contains the unmodified theme is permitted for any purpose, provided that this
43
+ license and the theme's copyright notice are retained. This permission does
44
+ not authorize applying the theme to a commercial website, application, product,
45
+ or service. Commercial use of Anta's MIT-licensed files does not require
46
+ permission under this theme license.
47
+
48
+ ## Reserved rights and earlier releases
49
+
50
+ No trademark rights or permission to imply affiliation with or endorsement by
51
+ Antithesis Operations LLC are granted. Rights granted by applicable law are
52
+ unaffected. All rights not expressly granted are reserved.
53
+
54
+ This license does not revoke or restrict rights already granted in copies of
55
+ the theme previously released under the MIT license. Those copies remain
56
+ available under their original terms.
57
+
58
+ ## Disclaimer
59
+
60
+ THE THEME IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
+ OUT OF OR IN CONNECTION WITH THE THEME OR THE USE OR OTHER DEALINGS IN THE
66
+ THEME.