@eui/eds-react 22.0.0-alpha.8

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 (290) hide show
  1. package/eds-alert/eds-alert-title.css +5 -0
  2. package/eds-alert/eds-alert-title.d.ts +12 -0
  3. package/eds-alert/eds-alert-title.d.ts.map +1 -0
  4. package/eds-alert/eds-alert-title.js +12 -0
  5. package/eds-alert/eds-alert-title.js.map +1 -0
  6. package/eds-alert/eds-alert.css +62 -0
  7. package/eds-alert/eds-alert.d.ts +38 -0
  8. package/eds-alert/eds-alert.d.ts.map +1 -0
  9. package/eds-alert/eds-alert.js +29 -0
  10. package/eds-alert/eds-alert.js.map +1 -0
  11. package/eds-alert/index.d.ts +5 -0
  12. package/eds-alert/index.d.ts.map +1 -0
  13. package/eds-alert/index.js +3 -0
  14. package/eds-alert/index.js.map +1 -0
  15. package/eds-avatar/eds-avatar-badge.css +34 -0
  16. package/eds-avatar/eds-avatar-badge.d.ts +20 -0
  17. package/eds-avatar/eds-avatar-badge.d.ts.map +1 -0
  18. package/eds-avatar/eds-avatar-badge.js +13 -0
  19. package/eds-avatar/eds-avatar-badge.js.map +1 -0
  20. package/eds-avatar/eds-avatar-content-label.css +5 -0
  21. package/eds-avatar/eds-avatar-content-label.d.ts +13 -0
  22. package/eds-avatar/eds-avatar-content-label.d.ts.map +1 -0
  23. package/eds-avatar/eds-avatar-content-label.js +12 -0
  24. package/eds-avatar/eds-avatar-content-label.js.map +1 -0
  25. package/eds-avatar/eds-avatar-content-sublabel.css +5 -0
  26. package/eds-avatar/eds-avatar-content-sublabel.d.ts +13 -0
  27. package/eds-avatar/eds-avatar-content-sublabel.d.ts.map +1 -0
  28. package/eds-avatar/eds-avatar-content-sublabel.js +12 -0
  29. package/eds-avatar/eds-avatar-content-sublabel.js.map +1 -0
  30. package/eds-avatar/eds-avatar-content.css +6 -0
  31. package/eds-avatar/eds-avatar-content.d.ts +17 -0
  32. package/eds-avatar/eds-avatar-content.d.ts.map +1 -0
  33. package/eds-avatar/eds-avatar-content.js +12 -0
  34. package/eds-avatar/eds-avatar-content.js.map +1 -0
  35. package/eds-avatar/eds-avatar-icon.css +13 -0
  36. package/eds-avatar/eds-avatar-icon.d.ts +14 -0
  37. package/eds-avatar/eds-avatar-icon.d.ts.map +1 -0
  38. package/eds-avatar/eds-avatar-icon.js +13 -0
  39. package/eds-avatar/eds-avatar-icon.js.map +1 -0
  40. package/eds-avatar/eds-avatar-image.css +24 -0
  41. package/eds-avatar/eds-avatar-image.d.ts +19 -0
  42. package/eds-avatar/eds-avatar-image.d.ts.map +1 -0
  43. package/eds-avatar/eds-avatar-image.js +16 -0
  44. package/eds-avatar/eds-avatar-image.js.map +1 -0
  45. package/eds-avatar/eds-avatar-list.css +21 -0
  46. package/eds-avatar/eds-avatar-list.d.ts +14 -0
  47. package/eds-avatar/eds-avatar-list.d.ts.map +1 -0
  48. package/eds-avatar/eds-avatar-list.js +13 -0
  49. package/eds-avatar/eds-avatar-list.js.map +1 -0
  50. package/eds-avatar/eds-avatar-text.css +7 -0
  51. package/eds-avatar/eds-avatar-text.d.ts +14 -0
  52. package/eds-avatar/eds-avatar-text.d.ts.map +1 -0
  53. package/eds-avatar/eds-avatar-text.js +13 -0
  54. package/eds-avatar/eds-avatar-text.js.map +1 -0
  55. package/eds-avatar/eds-avatar.css +128 -0
  56. package/eds-avatar/eds-avatar.d.ts +38 -0
  57. package/eds-avatar/eds-avatar.d.ts.map +1 -0
  58. package/eds-avatar/eds-avatar.js +48 -0
  59. package/eds-avatar/eds-avatar.js.map +1 -0
  60. package/eds-avatar/index.d.ts +19 -0
  61. package/eds-avatar/index.d.ts.map +1 -0
  62. package/eds-avatar/index.js +10 -0
  63. package/eds-avatar/index.js.map +1 -0
  64. package/eds-badge/eds-badge.css +174 -0
  65. package/eds-badge/eds-badge.d.ts +46 -0
  66. package/eds-badge/eds-badge.d.ts.map +1 -0
  67. package/eds-badge/eds-badge.js +39 -0
  68. package/eds-badge/eds-badge.js.map +1 -0
  69. package/eds-badge/index.d.ts +3 -0
  70. package/eds-badge/index.d.ts.map +1 -0
  71. package/eds-badge/index.js +2 -0
  72. package/eds-badge/index.js.map +1 -0
  73. package/eds-button/eds-button.css +233 -0
  74. package/eds-button/eds-button.d.ts +65 -0
  75. package/eds-button/eds-button.d.ts.map +1 -0
  76. package/eds-button/eds-button.js +33 -0
  77. package/eds-button/eds-button.js.map +1 -0
  78. package/eds-button/index.d.ts +3 -0
  79. package/eds-button/index.d.ts.map +1 -0
  80. package/eds-button/index.js +2 -0
  81. package/eds-button/index.js.map +1 -0
  82. package/eds-chip/eds-chip.css +171 -0
  83. package/eds-chip/eds-chip.d.ts +71 -0
  84. package/eds-chip/eds-chip.d.ts.map +1 -0
  85. package/eds-chip/eds-chip.js +90 -0
  86. package/eds-chip/eds-chip.js.map +1 -0
  87. package/eds-chip/index.d.ts +3 -0
  88. package/eds-chip/index.d.ts.map +1 -0
  89. package/eds-chip/index.js +2 -0
  90. package/eds-chip/index.js.map +1 -0
  91. package/eds-icon/eds-icon.css +80 -0
  92. package/eds-icon/eds-icon.d.ts +44 -0
  93. package/eds-icon/eds-icon.d.ts.map +1 -0
  94. package/eds-icon/eds-icon.js +26 -0
  95. package/eds-icon/eds-icon.js.map +1 -0
  96. package/eds-icon/index.d.ts +3 -0
  97. package/eds-icon/index.d.ts.map +1 -0
  98. package/eds-icon/index.js +2 -0
  99. package/eds-icon/index.js.map +1 -0
  100. package/eds-icon-button/eds-icon-button.css +83 -0
  101. package/eds-icon-button/eds-icon-button.d.ts +33 -0
  102. package/eds-icon-button/eds-icon-button.d.ts.map +1 -0
  103. package/eds-icon-button/eds-icon-button.js +15 -0
  104. package/eds-icon-button/eds-icon-button.js.map +1 -0
  105. package/eds-icon-button/index.d.ts +3 -0
  106. package/eds-icon-button/index.d.ts.map +1 -0
  107. package/eds-icon-button/index.js +2 -0
  108. package/eds-icon-button/index.js.map +1 -0
  109. package/eds-icon-state/eds-icon-state.css +5 -0
  110. package/eds-icon-state/eds-icon-state.d.ts +24 -0
  111. package/eds-icon-state/eds-icon-state.d.ts.map +1 -0
  112. package/eds-icon-state/eds-icon-state.js +21 -0
  113. package/eds-icon-state/eds-icon-state.js.map +1 -0
  114. package/eds-icon-state/index.d.ts +3 -0
  115. package/eds-icon-state/index.d.ts.map +1 -0
  116. package/eds-icon-state/index.js +2 -0
  117. package/eds-icon-state/index.js.map +1 -0
  118. package/eds-link/eds-link.css +83 -0
  119. package/eds-link/eds-link.d.ts +32 -0
  120. package/eds-link/eds-link.d.ts.map +1 -0
  121. package/eds-link/eds-link.js +15 -0
  122. package/eds-link/eds-link.js.map +1 -0
  123. package/eds-link/index.d.ts +3 -0
  124. package/eds-link/index.d.ts.map +1 -0
  125. package/eds-link/index.js +2 -0
  126. package/eds-link/index.js.map +1 -0
  127. package/eds-menu/eds-menu-item-view.d.ts +31 -0
  128. package/eds-menu/eds-menu-item-view.d.ts.map +1 -0
  129. package/eds-menu/eds-menu-item-view.js +65 -0
  130. package/eds-menu/eds-menu-item-view.js.map +1 -0
  131. package/eds-menu/eds-menu-item.css +221 -0
  132. package/eds-menu/eds-menu-item.model.d.ts +69 -0
  133. package/eds-menu/eds-menu-item.model.d.ts.map +1 -0
  134. package/eds-menu/eds-menu-item.model.js +2 -0
  135. package/eds-menu/eds-menu-item.model.js.map +1 -0
  136. package/eds-menu/eds-menu.css +83 -0
  137. package/eds-menu/eds-menu.d.ts +52 -0
  138. package/eds-menu/eds-menu.d.ts.map +1 -0
  139. package/eds-menu/eds-menu.js +145 -0
  140. package/eds-menu/eds-menu.js.map +1 -0
  141. package/eds-menu/index.d.ts +6 -0
  142. package/eds-menu/index.d.ts.map +1 -0
  143. package/eds-menu/index.js +3 -0
  144. package/eds-menu/index.js.map +1 -0
  145. package/eds-shell/eds-shell-content.css +11 -0
  146. package/eds-shell/eds-shell-content.d.ts +11 -0
  147. package/eds-shell/eds-shell-content.d.ts.map +1 -0
  148. package/eds-shell/eds-shell-content.js +10 -0
  149. package/eds-shell/eds-shell-content.js.map +1 -0
  150. package/eds-shell/eds-shell-context.d.ts +20 -0
  151. package/eds-shell/eds-shell-context.d.ts.map +1 -0
  152. package/eds-shell/eds-shell-context.js +7 -0
  153. package/eds-shell/eds-shell-context.js.map +1 -0
  154. package/eds-shell/eds-shell-footer.css +25 -0
  155. package/eds-shell/eds-shell-footer.d.ts +12 -0
  156. package/eds-shell/eds-shell-footer.d.ts.map +1 -0
  157. package/eds-shell/eds-shell-footer.js +9 -0
  158. package/eds-shell/eds-shell-footer.js.map +1 -0
  159. package/eds-shell/eds-shell-header-app.css +23 -0
  160. package/eds-shell/eds-shell-header-app.d.ts +16 -0
  161. package/eds-shell/eds-shell-header-app.d.ts.map +1 -0
  162. package/eds-shell/eds-shell-header-app.js +11 -0
  163. package/eds-shell/eds-shell-header-app.js.map +1 -0
  164. package/eds-shell/eds-shell-header-end.css +5 -0
  165. package/eds-shell/eds-shell-header-end.d.ts +11 -0
  166. package/eds-shell/eds-shell-header-end.d.ts.map +1 -0
  167. package/eds-shell/eds-shell-header-end.js +10 -0
  168. package/eds-shell/eds-shell-header-end.js.map +1 -0
  169. package/eds-shell/eds-shell-header-environment.css +21 -0
  170. package/eds-shell/eds-shell-header-environment.d.ts +11 -0
  171. package/eds-shell/eds-shell-header-environment.d.ts.map +1 -0
  172. package/eds-shell/eds-shell-header-environment.js +10 -0
  173. package/eds-shell/eds-shell-header-environment.js.map +1 -0
  174. package/eds-shell/eds-shell-header-logo.css +14 -0
  175. package/eds-shell/eds-shell-header-logo.d.ts +20 -0
  176. package/eds-shell/eds-shell-header-logo.d.ts.map +1 -0
  177. package/eds-shell/eds-shell-header-logo.js +10 -0
  178. package/eds-shell/eds-shell-header-logo.js.map +1 -0
  179. package/eds-shell/eds-shell-header-start.css +5 -0
  180. package/eds-shell/eds-shell-header-start.d.ts +11 -0
  181. package/eds-shell/eds-shell-header-start.d.ts.map +1 -0
  182. package/eds-shell/eds-shell-header-start.js +10 -0
  183. package/eds-shell/eds-shell-header-start.js.map +1 -0
  184. package/eds-shell/eds-shell-header.css +33 -0
  185. package/eds-shell/eds-shell-header.d.ts +25 -0
  186. package/eds-shell/eds-shell-header.d.ts.map +1 -0
  187. package/eds-shell/eds-shell-header.js +14 -0
  188. package/eds-shell/eds-shell-header.js.map +1 -0
  189. package/eds-shell/eds-shell-menu-toggle.css +4 -0
  190. package/eds-shell/eds-shell-menu-toggle.d.ts +16 -0
  191. package/eds-shell/eds-shell-menu-toggle.d.ts.map +1 -0
  192. package/eds-shell/eds-shell-menu-toggle.js +20 -0
  193. package/eds-shell/eds-shell-menu-toggle.js.map +1 -0
  194. package/eds-shell/eds-shell-sidebar-bottom-nav.css +8 -0
  195. package/eds-shell/eds-shell-sidebar-bottom-nav.d.ts +20 -0
  196. package/eds-shell/eds-shell-sidebar-bottom-nav.d.ts.map +1 -0
  197. package/eds-shell/eds-shell-sidebar-bottom-nav.js +11 -0
  198. package/eds-shell/eds-shell-sidebar-bottom-nav.js.map +1 -0
  199. package/eds-shell/eds-shell-sidebar-footer.css +10 -0
  200. package/eds-shell/eds-shell-sidebar-footer.d.ts +10 -0
  201. package/eds-shell/eds-shell-sidebar-footer.d.ts.map +1 -0
  202. package/eds-shell/eds-shell-sidebar-footer.js +10 -0
  203. package/eds-shell/eds-shell-sidebar-footer.js.map +1 -0
  204. package/eds-shell/eds-shell-sidebar-header.css +33 -0
  205. package/eds-shell/eds-shell-sidebar-header.d.ts +16 -0
  206. package/eds-shell/eds-shell-sidebar-header.d.ts.map +1 -0
  207. package/eds-shell/eds-shell-sidebar-header.js +10 -0
  208. package/eds-shell/eds-shell-sidebar-header.js.map +1 -0
  209. package/eds-shell/eds-shell-sidebar-nav.css +9 -0
  210. package/eds-shell/eds-shell-sidebar-nav.d.ts +20 -0
  211. package/eds-shell/eds-shell-sidebar-nav.d.ts.map +1 -0
  212. package/eds-shell/eds-shell-sidebar-nav.js +11 -0
  213. package/eds-shell/eds-shell-sidebar-nav.js.map +1 -0
  214. package/eds-shell/eds-shell-sidebar.css +5 -0
  215. package/eds-shell/eds-shell-sidebar.d.ts +25 -0
  216. package/eds-shell/eds-shell-sidebar.d.ts.map +1 -0
  217. package/eds-shell/eds-shell-sidebar.js +15 -0
  218. package/eds-shell/eds-shell-sidebar.js.map +1 -0
  219. package/eds-shell/eds-shell-toolbar-app.css +23 -0
  220. package/eds-shell/eds-shell-toolbar-app.d.ts +16 -0
  221. package/eds-shell/eds-shell-toolbar-app.d.ts.map +1 -0
  222. package/eds-shell/eds-shell-toolbar-app.js +11 -0
  223. package/eds-shell/eds-shell-toolbar-app.js.map +1 -0
  224. package/eds-shell/eds-shell-toolbar-center.css +6 -0
  225. package/eds-shell/eds-shell-toolbar-center.d.ts +11 -0
  226. package/eds-shell/eds-shell-toolbar-center.d.ts.map +1 -0
  227. package/eds-shell/eds-shell-toolbar-center.js +10 -0
  228. package/eds-shell/eds-shell-toolbar-center.js.map +1 -0
  229. package/eds-shell/eds-shell-toolbar-end.css +23 -0
  230. package/eds-shell/eds-shell-toolbar-end.d.ts +11 -0
  231. package/eds-shell/eds-shell-toolbar-end.d.ts.map +1 -0
  232. package/eds-shell/eds-shell-toolbar-end.js +10 -0
  233. package/eds-shell/eds-shell-toolbar-end.js.map +1 -0
  234. package/eds-shell/eds-shell-toolbar-environment.css +21 -0
  235. package/eds-shell/eds-shell-toolbar-environment.d.ts +11 -0
  236. package/eds-shell/eds-shell-toolbar-environment.d.ts.map +1 -0
  237. package/eds-shell/eds-shell-toolbar-environment.js +10 -0
  238. package/eds-shell/eds-shell-toolbar-environment.js.map +1 -0
  239. package/eds-shell/eds-shell-toolbar-logo.css +11 -0
  240. package/eds-shell/eds-shell-toolbar-logo.d.ts +8 -0
  241. package/eds-shell/eds-shell-toolbar-logo.d.ts.map +1 -0
  242. package/eds-shell/eds-shell-toolbar-logo.js +10 -0
  243. package/eds-shell/eds-shell-toolbar-logo.js.map +1 -0
  244. package/eds-shell/eds-shell-toolbar-start.css +5 -0
  245. package/eds-shell/eds-shell-toolbar-start.d.ts +11 -0
  246. package/eds-shell/eds-shell-toolbar-start.d.ts.map +1 -0
  247. package/eds-shell/eds-shell-toolbar-start.js +10 -0
  248. package/eds-shell/eds-shell-toolbar-start.js.map +1 -0
  249. package/eds-shell/eds-shell-toolbar.css +37 -0
  250. package/eds-shell/eds-shell-toolbar.d.ts +27 -0
  251. package/eds-shell/eds-shell-toolbar.d.ts.map +1 -0
  252. package/eds-shell/eds-shell-toolbar.js +12 -0
  253. package/eds-shell/eds-shell-toolbar.js.map +1 -0
  254. package/eds-shell/eds-shell-top-message.css +48 -0
  255. package/eds-shell/eds-shell-top-message.d.ts +22 -0
  256. package/eds-shell/eds-shell-top-message.d.ts.map +1 -0
  257. package/eds-shell/eds-shell-top-message.js +24 -0
  258. package/eds-shell/eds-shell-top-message.js.map +1 -0
  259. package/eds-shell/eds-shell.css +105 -0
  260. package/eds-shell/eds-shell.d.ts +41 -0
  261. package/eds-shell/eds-shell.d.ts.map +1 -0
  262. package/eds-shell/eds-shell.js +116 -0
  263. package/eds-shell/eds-shell.js.map +1 -0
  264. package/eds-shell/index.d.ts +50 -0
  265. package/eds-shell/index.d.ts.map +1 -0
  266. package/eds-shell/index.js +25 -0
  267. package/eds-shell/index.js.map +1 -0
  268. package/eds-tag/eds-tag.css +83 -0
  269. package/eds-tag/eds-tag.d.ts +29 -0
  270. package/eds-tag/eds-tag.d.ts.map +1 -0
  271. package/eds-tag/eds-tag.js +14 -0
  272. package/eds-tag/eds-tag.js.map +1 -0
  273. package/eds-tag/index.d.ts +3 -0
  274. package/eds-tag/index.d.ts.map +1 -0
  275. package/eds-tag/index.js +2 -0
  276. package/eds-tag/index.js.map +1 -0
  277. package/eds-tooltip/eds-tooltip.css +140 -0
  278. package/eds-tooltip/eds-tooltip.d.ts +53 -0
  279. package/eds-tooltip/eds-tooltip.d.ts.map +1 -0
  280. package/eds-tooltip/eds-tooltip.js +179 -0
  281. package/eds-tooltip/eds-tooltip.js.map +1 -0
  282. package/eds-tooltip/index.d.ts +3 -0
  283. package/eds-tooltip/index.d.ts.map +1 -0
  284. package/eds-tooltip/index.js +2 -0
  285. package/eds-tooltip/index.js.map +1 -0
  286. package/index.d.ts +42 -0
  287. package/index.d.ts.map +1 -0
  288. package/index.js +29 -0
  289. package/index.js.map +1 -0
  290. package/package.json +105 -0
@@ -0,0 +1,233 @@
1
+ /*
2
+ * eds-button — pure React port of eds-button.scss.
3
+ * Class-based (pre-String-Props) source: variants are BEM classes computed in the
4
+ * component's hostClasses(), so the CSS keeps `.eds-button.eds-button--type-primary` style
5
+ * selectors verbatim (guide Part 1 rule 9) — NOT data-* attributes. `:host.eds-button` ->
6
+ * `.eds-button` (the host IS the button); the `.eui-21` wrapper is dropped (share-ready).
7
+ * Focus-ring mixins inlined from base.eds-focus-visible-ring / *-rounded.
8
+ */
9
+
10
+ /* ---------- TYPE + COLOR token mapping ---------- */
11
+
12
+ .eds-button.eds-button--type-primary {
13
+ --_border-width: var(--eds-bw-none);
14
+ --_border-color: transparent;
15
+ }
16
+ .eds-button.eds-button--type-primary.eds-button--primary {
17
+ --_surface: var(--eds-c-surface-primary);
18
+ --_on-surface: var(--eds-c-on-surface-primary);
19
+ --_surface-hover: var(--eds-c-surface-primary--hover);
20
+ --_on-surface-hover: var(--eds-c-on-surface-primary--hover);
21
+ --_surface-active: var(--eds-c-surface-primary--pressed);
22
+ --_on-surface-active: var(--eds-c-on-surface-primary--pressed);
23
+ }
24
+ .eds-button.eds-button--type-primary.eds-button--highlight {
25
+ --_surface: var(--eds-c-surface-highlight);
26
+ --_on-surface: var(--eds-c-on-surface-highlight);
27
+ --_surface-hover: var(--eds-c-surface-highlight--hover);
28
+ --_on-surface-hover: var(--eds-c-on-surface-highlight--hover);
29
+ --_surface-active: var(--eds-c-surface-highlight--pressed);
30
+ --_on-surface-active: var(--eds-c-on-surface-highlight--pressed);
31
+ }
32
+ .eds-button.eds-button--type-primary.eds-button--critical {
33
+ --_surface: var(--eds-c-surface-critical);
34
+ --_on-surface: var(--eds-c-on-surface-critical);
35
+ --_surface-hover: var(--eds-c-surface-critical--hover);
36
+ --_on-surface-hover: var(--eds-c-on-surface-critical--hover);
37
+ --_surface-active: var(--eds-c-surface-critical--pressed);
38
+ --_on-surface-active: var(--eds-c-on-surface-critical--pressed);
39
+ }
40
+ .eds-button.eds-button--type-primary:disabled,
41
+ .eds-button.eds-button--type-primary.disabled {
42
+ --_surface: var(--eds-c-surface-disabled);
43
+ --_on-surface: var(--eds-c-foreground-disabled);
44
+ --_surface-hover: var(--eds-c-surface-disabled);
45
+ --_on-surface-hover: var(--eds-c-foreground-disabled);
46
+ --_surface-active: var(--eds-c-surface-disabled);
47
+ --_on-surface-active: var(--eds-c-foreground-disabled);
48
+ }
49
+
50
+ .eds-button.eds-button--type-secondary {
51
+ --_border-width: var(--eds-bw-xs);
52
+ --_surface: transparent;
53
+ }
54
+ .eds-button.eds-button--type-secondary.eds-button--primary {
55
+ --_border-color: var(--eds-c-border-primary);
56
+ --_on-surface: var(--eds-c-foreground-primary);
57
+ --_surface-hover: var(--eds-c-surface-primary-subtle);
58
+ --_on-surface-hover: var(--eds-c-on-surface-primary-subtle);
59
+ --_surface-active: var(--eds-c-surface-primary-subtle);
60
+ --_on-surface-active: var(--eds-c-on-surface-primary-subtle);
61
+ }
62
+ .eds-button.eds-button--type-secondary.eds-button--neutral {
63
+ --_border-color: var(--eds-c-border-neutral);
64
+ --_on-surface: var(--eds-c-foreground-neutral);
65
+ --_surface-hover: var(--eds-c-surface-neutral-subtle);
66
+ --_on-surface-hover: var(--eds-c-on-surface-neutral-subtle);
67
+ --_surface-active: var(--eds-c-surface-neutral-subtle);
68
+ --_on-surface-active: var(--eds-c-on-surface-neutral-subtle);
69
+ }
70
+ .eds-button.eds-button--type-secondary.eds-button--highlight {
71
+ --_border-color: var(--eds-c-border-highlight);
72
+ --_on-surface: var(--eds-c-foreground-highlight);
73
+ --_surface-hover: var(--eds-c-surface-highlight-subtler);
74
+ --_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);
75
+ --_surface-active: var(--eds-c-surface-highlight-subtler);
76
+ --_on-surface-active: var(--eds-c-on-surface-highlight-subtler);
77
+ }
78
+ .eds-button.eds-button--type-secondary.eds-button--critical {
79
+ --_border-color: var(--eds-c-border-critical);
80
+ --_on-surface: var(--eds-c-foreground-critical);
81
+ --_surface-hover: var(--eds-c-surface-critical-subtler);
82
+ --_on-surface-hover: var(--eds-c-on-surface-critical-subtler);
83
+ --_surface-active: var(--eds-c-surface-critical-subtler);
84
+ --_on-surface-active: var(--eds-c-on-surface-critical-subtler);
85
+ }
86
+ .eds-button.eds-button--type-secondary:disabled,
87
+ .eds-button.eds-button--type-secondary.disabled {
88
+ --_border-width: var(--eds-bw-xs);
89
+ --_border-color: var(--eds-c-border-disabled);
90
+ --_surface: var(--eds-c-surface-elevation);
91
+ --_on-surface: var(--eds-c-foreground-disabled);
92
+ --_surface-hover: var(--eds-c-surface-elevation);
93
+ --_on-surface-hover: var(--eds-c-foreground-disabled);
94
+ --_surface-active: var(--eds-c-surface-elevation);
95
+ --_on-surface-active: var(--eds-c-foreground-disabled);
96
+ }
97
+
98
+ .eds-button.eds-button--type-tertiary {
99
+ --_border-width: var(--eds-bw-none);
100
+ --_surface: transparent;
101
+ }
102
+ .eds-button.eds-button--type-tertiary.eds-button--primary {
103
+ --_on-surface: var(--eds-c-foreground-primary);
104
+ --_surface-hover: var(--eds-c-surface-primary-subtle);
105
+ --_on-surface-hover: var(--eds-c-on-surface-primary-subtle);
106
+ --_surface-active: var(--eds-c-surface-primary-subtle);
107
+ --_on-surface-active: var(--eds-c-on-surface-primary-subtle);
108
+ }
109
+ .eds-button.eds-button--type-tertiary.eds-button--neutral {
110
+ --_on-surface: var(--eds-c-foreground-neutral);
111
+ --_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle)); /* parent css vars override (see eds-chip f.e.) */
112
+ --_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle)); /* parent css vars override (see eds-chip f.e.) */
113
+ --_surface-active: var(--eds-c-surface-neutral-subtle);
114
+ --_on-surface-active: var(--eds-c-on-surface-neutral-subtle);
115
+ }
116
+ .eds-button.eds-button--type-tertiary.eds-button--highlight {
117
+ --_on-surface: var(--eds-c-foreground-highlight);
118
+ --_surface-hover: var(--eds-c-surface-highlight-subtler);
119
+ --_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);
120
+ --_surface-active: var(--eds-c-surface-highlight-subtler);
121
+ --_on-surface-active: var(--eds-c-on-surface-highlight-subtler);
122
+ }
123
+ .eds-button.eds-button--type-tertiary.eds-button--critical {
124
+ --_on-surface: var(--eds-c-foreground-critical);
125
+ --_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler)); /* parent css vars override (see eds-chip f.e.) */
126
+ --_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler)); /* parent css vars override (see eds-chip f.e.) */
127
+ --_surface-active: var(--eds-c-surface-critical-subtler);
128
+ --_on-surface-active: var(--eds-c-on-surface-critical-subtler);
129
+ }
130
+ .eds-button.eds-button--type-tertiary:disabled,
131
+ .eds-button.eds-button--type-tertiary.disabled {
132
+ --_surface: var(--eds-c-surface-elevation);
133
+ --_on-surface: var(--eds-c-foreground-disabled);
134
+ --_surface-hover: var(--eds-c-surface-elevation);
135
+ --_on-surface-hover: var(--eds-c-foreground-disabled);
136
+ --_surface-active: var(--eds-c-surface-elevation);
137
+ --_on-surface-active: var(--eds-c-foreground-disabled);
138
+ }
139
+
140
+ /* ---------- SIZE token mapping ---------- */
141
+
142
+ /* 40px (default) */
143
+ .eds-button.eds-button--size-m {
144
+ --_font-size: var(--eds-f-s-m);
145
+ --_padding: 0 var(--eds-sp-xs);
146
+ --_size: var(--eds-sp-5xl);
147
+ --_icon-size: var(--eds-is-m);
148
+ }
149
+ /* 32px */
150
+ .eds-button.eds-button--size-s {
151
+ --_font-size: var(--eds-f-s-s);
152
+ --_padding: 0 var(--eds-sp-2xs);
153
+ --_size: var(--eds-sp-3xl);
154
+ --_icon-size: var(--eds-is-s);
155
+ }
156
+ /* 52px */
157
+ .eds-button.eds-button--size-l {
158
+ --_font-size: var(--eds-f-s-l);
159
+ --_padding: 0 var(--eds-sp-s);
160
+ --_size: var(--eds-sp-8xl);
161
+ --_icon-size: var(--eds-is-m);
162
+ }
163
+
164
+ /* ---------- common styles ---------- */
165
+
166
+ .eds-button {
167
+ align-items: center;
168
+ background-image: none;
169
+ border-radius: var(--eds-br-s);
170
+ box-sizing: border-box;
171
+ cursor: pointer;
172
+ display: inline-flex;
173
+ flex-shrink: 0;
174
+ justify-content: center;
175
+ outline: none;
176
+ text-transform: none;
177
+ transition: none;
178
+ vertical-align: middle;
179
+ white-space: nowrap;
180
+ border-style: solid;
181
+ }
182
+ /* inlined base.eds-focus-visible-ring() */
183
+ .eds-button:focus-visible:not([readonly]) {
184
+ outline: var(--eds-bw-s) solid var(--eds-c-border-primary) !important;
185
+ outline-offset: 1px !important;
186
+ border-radius: var(--eds-br-xs) !important;
187
+ }
188
+ .eds-button .eds-button__container {
189
+ align-items: center;
190
+ display: inline-flex;
191
+ position: relative;
192
+ gap: var(--eds-sp-2xs);
193
+ justify-content: center; /* Needed for responsive */
194
+ width: 100%; /* Needed for responsive */
195
+ }
196
+
197
+ /* ---------- internal css vars mapping ---------- */
198
+
199
+ .eds-button {
200
+ background-color: var(--_surface);
201
+ color: var(--_on-surface);
202
+ border-width: var(--_border-width);
203
+ border-color: var(--_border-color);
204
+ font-size: var(--_font-size);
205
+ min-height: var(--_size);
206
+ min-width: var(--_size);
207
+ padding: var(--_padding);
208
+
209
+ /* a projected eds-icon follows the button foreground (on-surface) color */
210
+ --_eds-icon-on-surface: var(--_on-surface);
211
+ }
212
+ .eds-button:hover {
213
+ background-color: var(--_surface-hover);
214
+ color: var(--_on-surface-hover);
215
+ --_eds-icon-on-surface: var(--_on-surface-hover);
216
+ }
217
+ .eds-button:active {
218
+ background-color: var(--_surface-active);
219
+ color: var(--_on-surface-active);
220
+ --_eds-icon-on-surface: var(--_on-surface-active);
221
+ }
222
+
223
+ /* ---------- other states ---------- */
224
+
225
+ .eds-button.eds-button--rounded {
226
+ border-radius: var(--eds-br-full);
227
+ }
228
+ /* inlined base.eds-focus-visible-ring-rounded() */
229
+ .eds-button.eds-button--rounded:focus-visible:not([readonly]) {
230
+ outline: var(--eds-bw-s) solid var(--eds-c-border-primary) !important;
231
+ outline-offset: 1px !important;
232
+ border-radius: var(--eds-br-full) !important;
233
+ }
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Local narrowed unions — the button's variant contract (ported 1:1 from the Angular
4
+ * `button[edsButton]`). No shared-token import.
5
+ */
6
+ export type EdsButtonType = 'primary' | 'secondary' | 'tertiary';
7
+ /**
8
+ * Colors the button accepts. `primary` / `neutral` / `highlight` / `critical` have dedicated
9
+ * SCSS branches; `warning` is accepted (Angular via `edsWarning`) but has no styled branch —
10
+ * it renders the `eds-button--warning` class only, matching the Angular behavior.
11
+ */
12
+ export type EdsButtonColor = 'primary' | 'neutral' | 'highlight' | 'critical' | 'warning';
13
+ /** Sizes the button styles (SCSS `eds-button--size-<size>` branches). */
14
+ export type EdsButtonSize = 's' | 'm' | 'l';
15
+ export interface EdsButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type'> {
16
+ /**
17
+ * Visual type of the button. `primary` = solid surface; `secondary` = bordered;
18
+ * `tertiary` = text/ghost. Mirrors the Angular `edsTypeVariant` input and the
19
+ * `edsButtonPrimary`/`edsButtonSecondary`/`edsButtonTertiary` boolean shorthands.
20
+ * @default 'primary'
21
+ */
22
+ type?: EdsButtonType;
23
+ /** Semantic color of the button. @default 'primary' */
24
+ color?: EdsButtonColor;
25
+ /** Size of the button. @default 'm' */
26
+ size?: EdsButtonSize;
27
+ /**
28
+ * Disables the button (adds the `disabled` attribute and disabled styling).
29
+ * @default false
30
+ */
31
+ disabled?: boolean;
32
+ /** Makes the button full-width (block-level). @default false */
33
+ block?: boolean;
34
+ /** Styles the button for icon-only content. @default false */
35
+ iconButton?: boolean;
36
+ /** Styles the button when used as an avatar trigger (e.g. actionable avatar). @default false */
37
+ avatarButton?: boolean;
38
+ /** Allows text content to wrap. @default false */
39
+ lineWrap?: boolean;
40
+ /** Applies a fully rounded border-radius. @default false */
41
+ rounded?: boolean;
42
+ /**
43
+ * Marks the button as initially checked/selected within a button group. Kept for
44
+ * parity with the Angular `isChecked` input; read by a parent group.
45
+ * @default false
46
+ */
47
+ checked?: boolean;
48
+ /** Data attribute for e2e testing. @default 'eds-button' */
49
+ e2eAttr?: string;
50
+ /** Optional projected content (label, icons). */
51
+ children?: React.ReactNode;
52
+ }
53
+ /**
54
+ * `EdsButton` — pure React port of the Angular `button[edsButton]` component.
55
+ *
56
+ * The root element is a native `<button.eds-button>` (the host IS the button, matching the
57
+ * attribute-selector Angular component). This is a **class-based (pre-String-Props) source**:
58
+ * the Angular component computes a BEM `hostClasses()` string rather than reflecting host
59
+ * attributes, so the React port reproduces that BEM class logic verbatim in `className`, and
60
+ * the ported CSS keeps the `.eds-button.eds-button--type-primary` selectors (guide Part 1
61
+ * rule 9 — the sanctioned exception to the `data-*` rule). The label/icons are projected via
62
+ * `children` into the `.eds-button__container` wrapper, matching the Angular `<ng-content/>`.
63
+ */
64
+ export declare const EdsButton: React.ForwardRefExoticComponent<EdsButtonProps & React.RefAttributes<HTMLButtonElement>>;
65
+ //# sourceMappingURL=eds-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-button.d.ts","sourceRoot":"","sources":["../../src/eds-button/eds-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;AAE1F,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE5C,MAAM,WAAW,cACb,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7E;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,uDAAuD;IACvD,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,uCAAuC;IACvC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gGAAgG;IAChG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,0FA+CpB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ /**
4
+ * `EdsButton` — pure React port of the Angular `button[edsButton]` component.
5
+ *
6
+ * The root element is a native `<button.eds-button>` (the host IS the button, matching the
7
+ * attribute-selector Angular component). This is a **class-based (pre-String-Props) source**:
8
+ * the Angular component computes a BEM `hostClasses()` string rather than reflecting host
9
+ * attributes, so the React port reproduces that BEM class logic verbatim in `className`, and
10
+ * the ported CSS keeps the `.eds-button.eds-button--type-primary` selectors (guide Part 1
11
+ * rule 9 — the sanctioned exception to the `data-*` rule). The label/icons are projected via
12
+ * `children` into the `.eds-button__container` wrapper, matching the Angular `<ng-content/>`.
13
+ */
14
+ export const EdsButton = React.forwardRef(function EdsButton({ type = 'primary', color = 'primary', size = 'm', disabled = false, block = false, iconButton = false, avatarButton = false, lineWrap = false, rounded = false, checked: _checked = false, e2eAttr = 'eds-button', children, className, ...rest }, ref) {
15
+ // Angular `hostClasses()` computed — reproduced verbatim (BEM string).
16
+ const hostClasses = [
17
+ 'eds-button',
18
+ `eds-button--size-${size}`,
19
+ `eds-button--${color}`,
20
+ `eds-button--type-${type}`,
21
+ rounded ? 'eds-button--rounded' : '',
22
+ block ? 'eds-button--block' : '',
23
+ iconButton ? 'eds-button--icon-only' : '',
24
+ avatarButton ? 'eds-button--avatar' : '',
25
+ lineWrap ? 'eds-button--line-wrap' : '',
26
+ className ?? '',
27
+ ]
28
+ .join(' ')
29
+ .replace(/\s+/g, ' ')
30
+ .trim();
31
+ return (_jsx("button", { ref: ref, className: hostClasses, "data-e2e": e2eAttr, disabled: disabled || undefined, ...rest, children: _jsx("span", { className: "eds-button__container", children: children }) }));
32
+ });
33
+ //# sourceMappingURL=eds-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-button.js","sourceRoot":"","sources":["../../src/eds-button/eds-button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0D/B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAoC,SAAS,SAAS,CAC3F,EACI,IAAI,GAAG,SAAS,EAChB,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,GAAG,EACV,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,KAAK,EACb,UAAU,GAAG,KAAK,EAClB,YAAY,GAAG,KAAK,EACpB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,EAAE,QAAQ,GAAG,KAAK,EACzB,OAAO,GAAG,YAAY,EACtB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACV,EACD,GAAG;IAEH,uEAAuE;IACvE,MAAM,WAAW,GAAG;QAChB,YAAY;QACZ,oBAAoB,IAAI,EAAE;QAC1B,eAAe,KAAK,EAAE;QACtB,oBAAoB,IAAI,EAAE;QAC1B,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE;QACpC,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE;QAChC,UAAU,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE;QACzC,YAAY,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE;QACxC,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE;QACvC,SAAS,IAAI,EAAE;KAClB;SACI,IAAI,CAAC,GAAG,CAAC;SACT,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CAAC;IAEZ,OAAO,CACH,iBACI,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,WAAW,cACZ,OAAO,EACjB,QAAQ,EAAE,QAAQ,IAAI,SAAS,KAC3B,IAAI,YAER,eAAM,SAAS,EAAC,uBAAuB,YAAE,QAAQ,GAAQ,GACpD,CACZ,CAAC;AACN,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { EdsButton } from './eds-button.js';
2
+ export type { EdsButtonProps, EdsButtonType, EdsButtonColor, EdsButtonSize } from './eds-button.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eds-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { EdsButton } from './eds-button.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eds-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,171 @@
1
+ /*
2
+ * eds-chip — pure React port of eds-chip.scss.
3
+ *
4
+ * Angular emulated-encapsulation mapping (no shadow DOM here):
5
+ * :host -> .eds-chip (root class on the rendered element)
6
+ * :host([color="v"]) -> .eds-chip[data-color="v"]
7
+ * :host([size="v"]) -> .eds-chip[data-size="v"]
8
+ * :host([active]) (boolean) -> .eds-chip[data-active]
9
+ * :host([disabled]) -> .eds-chip[data-disabled]
10
+ * &:not([disabled]) -> .eds-chip:not([data-disabled])
11
+ * The --_eds-chip-* privates and --eds-* tokens are unchanged; tokens cascade in from the
12
+ * .eui-21 context (required on an ancestor), exactly like the Angular component. The focus
13
+ * ring is inlined from base.eds-focus-visible-ring-rounded().
14
+ */
15
+
16
+ .eds-chip {
17
+ /* default color = neutral */
18
+ --_eds-chip-surface: transparent;
19
+ --_eds-chip-on-surface: var(--eds-c-foreground-primary);
20
+ --_eds-chip-border-color: var(--eds-c-border-primary-subtle);
21
+ --_eds-chip-surface-hover: var(--eds-c-surface-primary-subtle);
22
+ --_eds-chip-on-surface-hover: var(--eds-c-on-surface-primary-subtle);
23
+ --_eds-chip-surface-active: var(--eds-c-surface-primary-subtle);
24
+ --_eds-chip-on-surface-active: var(--eds-c-on-surface-primary-subtle);
25
+
26
+ /* default size = m */
27
+ --_eds-chip-font: var(--eds-f-paragraph-s);
28
+ --_eds-chip-padding: var(--eds-sp-4xs) var(--eds-sp-2xs);
29
+ --_eds-chip-height: var(--eds-sp-xl);
30
+
31
+ /* a projected eds-icon follows the chip foreground (on-surface) color */
32
+ --_eds-icon-on-surface: var(--_eds-chip-on-surface);
33
+
34
+ border-radius: var(--eds-br-full);
35
+ display: inline-flex;
36
+ border: var(--eds-bw-xs) solid var(--_eds-chip-border-color);
37
+ padding: var(--_eds-chip-padding);
38
+ font: var(--_eds-chip-font);
39
+ background-color: var(--_eds-chip-surface);
40
+ color: var(--_eds-chip-on-surface);
41
+ height: var(--_eds-chip-height);
42
+ cursor: pointer;
43
+ gap: var(--eds-sp-2xs);
44
+ align-items: center;
45
+ }
46
+
47
+ /* inlined base.eds-focus-visible-ring-rounded() */
48
+ .eds-chip:not([data-disabled]):focus-visible:not([readonly]) {
49
+ outline: var(--eds-bw-s) solid var(--eds-c-border-primary) !important;
50
+ outline-offset: 1px !important;
51
+ border-radius: var(--eds-br-full) !important;
52
+ }
53
+
54
+ .eds-chip:hover {
55
+ background-color: var(--_eds-chip-surface-hover);
56
+ color: var(--_eds-chip-on-surface-hover);
57
+ }
58
+ .eds-chip:active {
59
+ background-color: var(--_eds-chip-surface-active);
60
+ color: var(--_eds-chip-on-surface-active);
61
+ }
62
+
63
+ .eds-chip .eds-chip__content {
64
+ display: inline-flex;
65
+ align-items: center;
66
+ background: transparent;
67
+ gap: var(--eds-sp-2xs);
68
+ }
69
+
70
+ .eds-chip .eds-chip__close {
71
+ margin-left: var(--eds-sp-xs);
72
+ }
73
+
74
+ /* SIZE VARIANTS
75
+ ------------- */
76
+
77
+ .eds-chip[data-size="s"] {
78
+ --_eds-chip-font: var(--eds-f-paragraph-xs);
79
+ --_eds-chip-padding: var(--eds-sp-4xs) var(--eds-sp-3xs);
80
+ --_eds-chip-height: var(--eds-sp-l);
81
+ }
82
+
83
+ .eds-chip[data-size="m"] {
84
+ --_eds-chip-font: var(--eds-f-paragraph-s);
85
+ --_eds-chip-padding: var(--eds-sp-4xs) var(--eds-sp-2xs);
86
+ --_eds-chip-height: var(--eds-sp-xl);
87
+ }
88
+
89
+ .eds-chip[data-size="l"] {
90
+ --_eds-chip-font: var(--eds-f-paragraph-s);
91
+ --_eds-chip-padding: var(--eds-sp-3xs) var(--eds-sp-2xs);
92
+ --_eds-chip-height: var(--eds-sp-2xl);
93
+ }
94
+
95
+ /* COLOR VARIANTS
96
+ -------------- */
97
+
98
+ .eds-chip[data-color="neutral"] {
99
+ --_eds-chip-surface: transparent;
100
+ --_eds-chip-on-surface: var(--eds-c-foreground-primary);
101
+ --_eds-chip-border-color: var(--eds-c-border-primary-subtle);
102
+ --_eds-chip-surface-hover: var(--eds-c-surface-primary-subtle);
103
+ --_eds-chip-on-surface-hover: var(--eds-c-on-surface-primary-subtle);
104
+ --_eds-chip-surface-active: var(--eds-c-surface-primary-subtle);
105
+ --_eds-chip-on-surface-active: var(--eds-c-on-surface-primary-subtle);
106
+ }
107
+
108
+ .eds-chip[data-color="info"] {
109
+ --_eds-chip-surface: transparent;
110
+ --_eds-chip-on-surface: var(--eds-c-foreground-info);
111
+ --_eds-chip-border-color: var(--eds-c-border-info-subtle);
112
+ --_eds-chip-surface-hover: var(--eds-c-surface-info-subtle);
113
+ --_eds-chip-on-surface-hover: var(--eds-c-on-surface-info-subtle);
114
+ --_eds-chip-surface-active: var(--eds-c-surface-info-subtle);
115
+ --_eds-chip-on-surface-active: var(--eds-c-on-surface-info-subtle);
116
+ }
117
+
118
+ .eds-chip[data-color="success"] {
119
+ --_eds-chip-surface: transparent;
120
+ --_eds-chip-on-surface: var(--eds-c-foreground-success);
121
+ --_eds-chip-border-color: var(--eds-c-border-success-subtle);
122
+ --_eds-chip-surface-hover: var(--eds-c-surface-success-subtle);
123
+ --_eds-chip-on-surface-hover: var(--eds-c-on-surface-success-subtle);
124
+ --_eds-chip-surface-active: var(--eds-c-surface-success-subtle);
125
+ --_eds-chip-on-surface-active: var(--eds-c-on-surface-success-subtle);
126
+ }
127
+
128
+ .eds-chip[data-color="warning"] {
129
+ --_eds-chip-surface: transparent;
130
+ --_eds-chip-on-surface: var(--eds-c-foreground-warning);
131
+ --_eds-chip-border-color: var(--eds-c-border-warning-subtle);
132
+ --_eds-chip-surface-hover: var(--eds-c-surface-warning-subtle);
133
+ --_eds-chip-on-surface-hover: var(--eds-c-on-surface-warning-subtle);
134
+ --_eds-chip-surface-active: var(--eds-c-surface-warning-subtle);
135
+ --_eds-chip-on-surface-active: var(--eds-c-on-surface-warning-subtle);
136
+ }
137
+
138
+ .eds-chip[data-color="critical"] {
139
+ --_eds-chip-surface: transparent;
140
+ --_eds-chip-on-surface: var(--eds-c-foreground-critical);
141
+ --_eds-chip-border-color: var(--eds-c-border-critical-subtle);
142
+ --_eds-chip-surface-hover: var(--eds-c-surface-critical-subtle);
143
+ --_eds-chip-on-surface-hover: var(--eds-c-on-surface-critical-subtle);
144
+ --_eds-chip-surface-active: var(--eds-c-surface-critical-subtle);
145
+ --_eds-chip-on-surface-active: var(--eds-c-on-surface-critical-subtle);
146
+ }
147
+
148
+ /* STATE OVERRIDES
149
+ --------------- */
150
+
151
+ .eds-chip[data-active] {
152
+ --_eds-chip-surface: var(--eds-c-surface-primary);
153
+ --_eds-chip-on-surface: var(--eds-c-on-surface-primary);
154
+ --_eds-chip-border-color: transparent;
155
+ --_eds-chip-surface-hover: var(--eds-c-surface-primary--hover);
156
+ --_eds-chip-on-surface-hover: var(--eds-c-on-surface-primary--hover);
157
+ --_eds-chip-surface-active: var(--eds-c-surface-primary--pressed);
158
+ --_eds-chip-on-surface-active: var(--eds-c-on-surface-primary--pressed);
159
+ }
160
+
161
+ .eds-chip[data-disabled] {
162
+ --_eds-chip-surface: var(--eds-c-surface-disabled-subtle);
163
+ --_eds-chip-on-surface: var(--eds-c-foreground-disabled);
164
+ --_eds-chip-border-color: var(--eds-c-border-disabled);
165
+ --_eds-chip-surface-hover: var(--eds-c-surface-disabled-subtle);
166
+ --_eds-chip-on-surface-hover: var(--eds-c-foreground-disabled);
167
+ --_eds-chip-surface-active: var(--eds-c-surface-disabled-subtle);
168
+ --_eds-chip-on-surface-active: var(--eds-c-foreground-disabled);
169
+
170
+ cursor: default;
171
+ }
@@ -0,0 +1,71 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Data structure for chip tooltip configuration (ported 1:1 from the Angular
4
+ * `eds-chip` `models/eui-chip.model.ts`).
5
+ */
6
+ export interface EdsChipTooltip {
7
+ tooltipMessage?: string;
8
+ position?: 'above' | 'below' | 'left' | 'right' | 'before' | 'after';
9
+ contentAlignment?: 'center' | 'left' | 'right' | 'justify' | null;
10
+ delay?: number;
11
+ color?: string;
12
+ }
13
+ /** Data payload emitted by chip events and passed via the `data` prop. */
14
+ export interface EdsChipData {
15
+ id?: string | number;
16
+ tooltip?: EdsChipTooltip;
17
+ /** Internal event reference, present when triggered via keyboard. */
18
+ _event?: Event;
19
+ [key: string]: unknown;
20
+ }
21
+ /**
22
+ * Local narrowed color union — the chip's color contract (ported 1:1 from Angular `eds-chip`).
23
+ */
24
+ export type EdsChipColor = 'neutral' | 'info' | 'success' | 'warning' | 'critical';
25
+ /** Local narrowed size union — the chip's size contract. */
26
+ export type EdsChipSize = 's' | 'm' | 'l';
27
+ export interface EdsChipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color' | 'id'> {
28
+ /** Semantic color of the chip. @default 'neutral' */
29
+ color?: EdsChipColor;
30
+ /** Size of the chip. @default 'm' */
31
+ size?: EdsChipSize;
32
+ /**
33
+ * Sets the `aria-label` attribute for the host element. When not set, assistive
34
+ * technology will use the text content of the chip. @default undefined
35
+ */
36
+ ariaLabel?: string;
37
+ /** Data attribute for e2e testing. @default 'eds-chip' */
38
+ e2eAttr?: string;
39
+ /** Sets the edsInternalId of the chip. @default '' */
40
+ edsInternalId?: string;
41
+ /** Sets the label of the tooltip to display on hover. @default '' */
42
+ tooltipMessage?: string;
43
+ /** Sets the id of the chip. @default '' */
44
+ id?: string | number;
45
+ /** Sets the data of the chip like tooltip configuration. */
46
+ data?: EdsChipData;
47
+ /** Whether the chip can be removed. @default false */
48
+ isRemovable?: boolean;
49
+ /** Whether the chip is in active/pressed state. @default false */
50
+ isActive?: boolean;
51
+ /** Controls the disabled state of the chip. @default false */
52
+ disabled?: boolean;
53
+ /** Emitted when the chip is removed (Angular output `chipRemove`). */
54
+ onChipRemove?: (detail: EdsChipData) => void;
55
+ /** Emitted when the chip is clicked (Angular output `chipClick`). */
56
+ onChipClick?: (detail: EdsChipData) => void;
57
+ /** Projected content rendered inside the chip (matches Angular `<ng-content/>`). */
58
+ children?: React.ReactNode;
59
+ }
60
+ /**
61
+ * `EdsChip` — pure React port of the Angular `eds-chip`.
62
+ *
63
+ * An interactive chip: it can be clicked (`onChipClick`), removed (`onChipRemove`, shown
64
+ * with a trailing remove icon when `isRemovable`), and toggled active/disabled. Host click,
65
+ * Enter, Space, Delete and Backspace keyboard behavior is reproduced (WAI-ARIA APG chip
66
+ * conventions). The rendered element IS the component (no wrapper). Requires
67
+ * `@eui/eds-styles` + the `eui-21` class on an ancestor for the `--eds-*` tokens to cascade
68
+ * in, and the sprite assets for the remove icon.
69
+ */
70
+ export declare const EdsChip: React.ForwardRefExoticComponent<EdsChipProps & React.RefAttributes<HTMLSpanElement>>;
71
+ //# sourceMappingURL=eds-chip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-chip.d.ts","sourceRoot":"","sources":["../../src/eds-chip/eds-chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrE,gBAAgB,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IACxB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,qEAAqE;IACrE,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEnF,4DAA4D;AAC5D,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAS1C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7F,qDAAqD;IACrD,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2CAA2C;IAC3C,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,sDAAsD;IACtD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,qEAAqE;IACrE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,oFAAoF;IACpF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAcD;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,sFAmHlB,CAAC"}