@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,90 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useRef } from 'react';
4
+ import { EdsIcon } from '../eds-icon/eds-icon.js';
5
+ /** Maps a chip size to the size of its inner (remove) icon. */
6
+ const CHIP_ICON_SIZE = {
7
+ s: 'xs',
8
+ m: 's',
9
+ l: 'm',
10
+ };
11
+ /** Lazily builds the default `data` payload, mirroring the Angular input default. */
12
+ function defaultChipData() {
13
+ return {
14
+ id: crypto.randomUUID(),
15
+ tooltip: {
16
+ color: 'edsTooltipPrimary',
17
+ contentAlignment: null,
18
+ position: 'above',
19
+ },
20
+ };
21
+ }
22
+ /**
23
+ * `EdsChip` — pure React port of the Angular `eds-chip`.
24
+ *
25
+ * An interactive chip: it can be clicked (`onChipClick`), removed (`onChipRemove`, shown
26
+ * with a trailing remove icon when `isRemovable`), and toggled active/disabled. Host click,
27
+ * Enter, Space, Delete and Backspace keyboard behavior is reproduced (WAI-ARIA APG chip
28
+ * conventions). The rendered element IS the component (no wrapper). Requires
29
+ * `@eui/eds-styles` + the `eui-21` class on an ancestor for the `--eds-*` tokens to cascade
30
+ * in, and the sprite assets for the remove icon.
31
+ */
32
+ export const EdsChip = React.forwardRef(function EdsChip({ color = 'neutral', size = 'm', ariaLabel, e2eAttr = 'eds-chip', edsInternalId: _edsInternalId = '', tooltipMessage: _tooltipMessage = '', id = '', data, isRemovable = false, isActive = false, disabled = false, onChipRemove, onChipClick, children, className, onClick, onKeyDown, ...rest }, ref) {
33
+ const contentRef = useRef(null);
34
+ const iconSize = CHIP_ICON_SIZE[size];
35
+ // The `data` input has a per-instance default; keep it stable across renders.
36
+ const dataRef = useRef(undefined);
37
+ if (dataRef.current === undefined) {
38
+ dataRef.current = data ?? defaultChipData();
39
+ }
40
+ const chipData = data ?? dataRef.current;
41
+ const emitRemove = (event) => {
42
+ if (event instanceof KeyboardEvent && event.code === 'Backspace') {
43
+ onChipRemove?.({ ...chipData, _event: event });
44
+ }
45
+ else {
46
+ onChipRemove?.(chipData);
47
+ }
48
+ };
49
+ const handleHostAction = (event) => {
50
+ if (disabled) {
51
+ return;
52
+ }
53
+ if (isRemovable) {
54
+ emitRemove(event);
55
+ }
56
+ else {
57
+ onChipClick?.(chipData);
58
+ }
59
+ };
60
+ const handleClick = (event) => {
61
+ onClick?.(event);
62
+ handleHostAction(event.nativeEvent);
63
+ };
64
+ const handleKeyDown = (event) => {
65
+ onKeyDown?.(event);
66
+ const key = event.key;
67
+ if (key === 'Enter') {
68
+ handleHostAction(event.nativeEvent);
69
+ }
70
+ else if (key === ' ' || key === 'Spacebar') {
71
+ // Space activation — prevent page scroll and trigger the host action.
72
+ event.preventDefault();
73
+ handleHostAction(event.nativeEvent);
74
+ }
75
+ else if (key === 'Delete' || key === 'Backspace') {
76
+ if (disabled || !isRemovable) {
77
+ return;
78
+ }
79
+ event.preventDefault();
80
+ emitRemove(event.nativeEvent);
81
+ }
82
+ };
83
+ // Angular reads the projected text for the remove-icon aria-label. We approximate by
84
+ // reading the rendered content on demand (falls back to a generic label).
85
+ const removeLabel = `Remove ${contentRef.current?.textContent?.trim() ?? ''} chip`
86
+ .replace(/\s+/g, ' ')
87
+ .trim();
88
+ return (_jsxs("span", { ref: ref, className: className ? `eds-chip ${className}` : 'eds-chip', id: id !== '' ? String(id) : undefined, "data-color": color, "data-size": size, "data-removable": isRemovable ? '' : undefined, "data-active": isActive ? '' : undefined, "data-disabled": disabled ? '' : undefined, tabIndex: disabled ? -1 : 0, role: "button", "aria-disabled": disabled ? 'true' : undefined, "aria-pressed": isActive ? 'true' : undefined, "aria-label": ariaLabel, "data-e2e": e2eAttr, onClick: handleClick, onKeyDown: handleKeyDown, ...rest, children: [_jsx("div", { className: "eds-chip__content", ref: contentRef, children: children }), isRemovable ? (_jsx(EdsIcon, { className: "eds-chip__close", ariaLabel: removeLabel, ariaHidden: false, icon: "x:core", size: iconSize })) : null] }));
89
+ });
90
+ //# sourceMappingURL=eds-chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-chip.js","sourceRoot":"","sources":["../../src/eds-chip/eds-chip.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ export { EdsChip } from './eds-chip.js';
2
+ export type { EdsChipProps, EdsChipColor, EdsChipSize, EdsChipData, EdsChipTooltip, } from './eds-chip.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eds-chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EACR,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,cAAc,GACjB,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { EdsChip } from './eds-chip.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eds-chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,80 @@
1
+ /*
2
+ * eds-icon — pure React port of eds-icon.scss.
3
+ *
4
+ * :host -> .eds-icon ; :host([attr="v"]) -> .eds-icon[data-attr="v"] ;
5
+ * :host([bool]) -> .eds-icon[data-bool]. --_eds-icon-* privates + --eds-* tokens unchanged;
6
+ * tokens cascade in from the .eui-21 context (required on an ancestor).
7
+ */
8
+
9
+ .eds-icon {
10
+ --_eds-icon-size: var(--_icon-size, var(--eds-is-m)); /* inherited from parent */
11
+ /* --_eds-icon-on-surface lets a parent (e.g. eds-badge) override the icon color;
12
+ when unset, each color variant supplies its own token below. */
13
+ --_eds-icon-color: var(--_eds-icon-on-surface, var(--_on-surface, var(--eds-c-foreground)));
14
+
15
+ display: inline-flex;
16
+ position: relative;
17
+ }
18
+
19
+ .eds-icon .eds-icon-svg {
20
+ height: var(--_eds-icon-size);
21
+ width: var(--_eds-icon-size);
22
+ fill: var(--_eds-icon-color);
23
+ color: var(--_eds-icon-color);
24
+ }
25
+
26
+ /* Multi-color sprites (flags) — disable fill inheritance so path fill attributes render */
27
+ .eds-icon .eds-icon-svg.eds-icon-set-flags-1x1,
28
+ .eds-icon .eds-icon-svg.eds-icon-set-flags-4x3 {
29
+ fill: none;
30
+ }
31
+
32
+ /* SIZE VARIANTS */
33
+ .eds-icon[data-size="2xs"] { --_eds-icon-size: var(--eds-is-2xs); }
34
+ .eds-icon[data-size="xs"] { --_eds-icon-size: var(--eds-is-xs); }
35
+ .eds-icon[data-size="s"] { --_eds-icon-size: var(--eds-is-s); }
36
+ .eds-icon[data-size="m"] { --_eds-icon-size: var(--eds-is-m); }
37
+ .eds-icon[data-size="l"] { --_eds-icon-size: var(--eds-is-l); }
38
+ .eds-icon[data-size="xl"] { --_eds-icon-size: var(--eds-is-xl); }
39
+ .eds-icon[data-size="2xl"] { --_eds-icon-size: var(--eds-is-2xl); }
40
+ .eds-icon[data-size="3xl"] { --_eds-icon-size: var(--eds-is-3xl); }
41
+ .eds-icon[data-size="4xl"] { --_eds-icon-size: var(--eds-is-4xl); }
42
+
43
+ /* COLOR VARIANTS */
44
+ .eds-icon[data-color="neutral"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground)); }
45
+ .eds-icon[data-color="neutral-subtle"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground-subtle)); }
46
+ .eds-icon[data-color="neutral-subtler"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground-subtler)); }
47
+ .eds-icon[data-color="primary"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground-primary)); }
48
+ .eds-icon[data-color="highlight"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground-highlight)); }
49
+ .eds-icon[data-color="info"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground-info)); }
50
+ .eds-icon[data-color="success"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground-success)); }
51
+ .eds-icon[data-color="warning"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground-warning)); }
52
+ .eds-icon[data-color="critical"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground-critical)); }
53
+ .eds-icon[data-color="brand"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-on-surface-brand)); }
54
+ .eds-icon[data-color="disabled"] { --_eds-icon-color: var(--_eds-icon-on-surface, var(--eds-c-foreground-disabled)); }
55
+
56
+ /* ROUNDED */
57
+ .eds-icon[data-rounded] {
58
+ border-radius: 50%;
59
+ overflow: hidden;
60
+ }
61
+ .eds-icon[data-rounded] .eds-icon-svg {
62
+ border-radius: 50%;
63
+ }
64
+
65
+ /* LOADING SPINNER — inherits icon size and color */
66
+ .eds-icon[data-loading] .eds-icon-spinner {
67
+ display: inline-block;
68
+ width: var(--_eds-icon-size);
69
+ height: var(--_eds-icon-size);
70
+ border: 3px solid var(--eds-c-border-neutral-subtle);
71
+ border-top-color: var(--_eds-icon-color);
72
+ border-radius: 50%;
73
+ animation: eds-icon-spin 0.6s linear infinite;
74
+ }
75
+
76
+ @keyframes eds-icon-spin {
77
+ to {
78
+ transform: rotate(360deg);
79
+ }
80
+ }
@@ -0,0 +1,44 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Local narrowed color union — the icon's color contract (ported 1:1 from Angular `eds-icon`).
4
+ */
5
+ export type EdsIconColor = 'neutral' | 'neutral-subtle' | 'neutral-subtler' | 'primary' | 'highlight' | 'info' | 'success' | 'warning' | 'critical' | 'brand' | 'disabled';
6
+ /** Local narrowed size union — the icon's size contract. */
7
+ export type EdsIconSize = '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl';
8
+ export interface EdsIconProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> {
9
+ /**
10
+ * Name of the icon, optionally including the set via `'iconName:setName'`. When a colon
11
+ * is present it splits into the icon name and set.
12
+ */
13
+ icon?: string;
14
+ /** Icon set library to load the icon from. @default 'regular' */
15
+ set?: string;
16
+ /** Semantic color of the icon. @default 'neutral' */
17
+ color?: EdsIconColor;
18
+ /** Size of the icon. @default 'm' */
19
+ size?: EdsIconSize;
20
+ /** Accessible label describing the icon's purpose (used when not decorative). */
21
+ ariaLabel?: string;
22
+ /** Hides the icon from assistive technologies when purely decorative. @default true */
23
+ ariaHidden?: boolean;
24
+ /** Applies a circular clip (border-radius: 50%), useful for flag icons. @default false */
25
+ rounded?: boolean;
26
+ /** Replaces the icon with a spinning loading indicator (inherits size + color). @default false */
27
+ isLoading?: boolean;
28
+ /** Base URL under which the sprite assets live. @default 'assets' */
29
+ assetsBaseUrl?: string;
30
+ /** Optional projected content rendered after the icon svg (matches Angular `<ng-content/>`). */
31
+ children?: React.ReactNode;
32
+ }
33
+ /**
34
+ * `EdsIcon` — pure React port of the Angular `eds-icon`.
35
+ *
36
+ * Displays a scalable vector icon from a sprite set via `<use href>`, with semantic color
37
+ * and size (reflected as `data-*` attributes), an optional circular clip, and a loading
38
+ * spinner. No Web Component / `@lit/react` dependency. The `.eds-icon` root class is kept
39
+ * (not just a data attribute) because other components (e.g. `eds-badge`) position
40
+ * themselves against an `.eds-icon` ancestor. Requires `@eui/eds-styles` + the `eui-21`
41
+ * class on an ancestor, and the sprite assets served under `assetsBaseUrl`.
42
+ */
43
+ export declare const EdsIcon: React.ForwardRefExoticComponent<EdsIconProps & React.RefAttributes<HTMLSpanElement>>;
44
+ //# sourceMappingURL=eds-icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-icon.d.ts","sourceRoot":"","sources":["../../src/eds-icon/eds-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,YAAY,GAClB,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,SAAS,GACT,WAAW,GACX,MAAM,GACN,SAAS,GACT,SAAS,GACT,UAAU,GACV,OAAO,GACP,UAAU,CAAC;AAEjB,4DAA4D;AAC5D,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAExF,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACtF;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kGAAkG;IAClG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAWD;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,sFA8ClB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ /** Split `'name:set'` into its parts, falling back to the `set` prop / `'regular'`. */
4
+ function resolveIcon(icon, set) {
5
+ if (icon && icon.indexOf(':') > -1) {
6
+ const [name, iconSet] = icon.split(':');
7
+ return { iconName: name, resolvedSet: iconSet || 'regular' };
8
+ }
9
+ return { iconName: icon, resolvedSet: set || 'regular' };
10
+ }
11
+ /**
12
+ * `EdsIcon` — pure React port of the Angular `eds-icon`.
13
+ *
14
+ * Displays a scalable vector icon from a sprite set via `<use href>`, with semantic color
15
+ * and size (reflected as `data-*` attributes), an optional circular clip, and a loading
16
+ * spinner. No Web Component / `@lit/react` dependency. The `.eds-icon` root class is kept
17
+ * (not just a data attribute) because other components (e.g. `eds-badge`) position
18
+ * themselves against an `.eds-icon` ancestor. Requires `@eui/eds-styles` + the `eui-21`
19
+ * class on an ancestor, and the sprite assets served under `assetsBaseUrl`.
20
+ */
21
+ export const EdsIcon = React.forwardRef(function EdsIcon({ icon = '', set = 'regular', color = 'neutral', size = 'm', ariaLabel = '', ariaHidden = true, rounded = false, isLoading = false, assetsBaseUrl = 'assets', children, className, ...rest }, ref) {
22
+ const { iconName, resolvedSet } = resolveIcon(icon, set);
23
+ const rootClass = className ? `eds-icon ${className}` : 'eds-icon';
24
+ return (_jsxs("span", { ref: ref, className: rootClass, "data-color": color, "data-size": size, "data-rounded": rounded ? '' : undefined, "data-loading": isLoading ? '' : undefined, role: ariaHidden ? undefined : 'img', "aria-label": ariaLabel || undefined, "aria-hidden": ariaHidden || undefined, ...rest, children: [isLoading ? (_jsx("span", { className: "eds-icon-spinner", "aria-hidden": "true" })) : (_jsx("svg", { className: `eds-icon-svg eds-sprite-${iconName} eds-icon-set-${resolvedSet}`, "aria-hidden": "true", children: _jsx("use", { href: `${assetsBaseUrl}/eds/icons/sprites/${resolvedSet}.svg#${iconName}` }) })), children] }));
25
+ });
26
+ //# sourceMappingURL=eds-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-icon.js","sourceRoot":"","sources":["../../src/eds-icon/eds-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA+C/B,uFAAuF;AACvF,SAAS,WAAW,CAAC,IAAY,EAAE,GAAW;IAC1C,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,IAAI,SAAS,EAAE,CAAC;IACjE,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,SAAS,EAAE,CAAC;AAC7D,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAgC,SAAS,OAAO,CACnF,EACI,IAAI,GAAG,EAAE,EACT,GAAG,GAAG,SAAS,EACf,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,GAAG,EACV,SAAS,GAAG,EAAE,EACd,UAAU,GAAG,IAAI,EACjB,OAAO,GAAG,KAAK,EACf,SAAS,GAAG,KAAK,EACjB,aAAa,GAAG,QAAQ,EACxB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACV,EACD,GAAG;IAEH,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,YAAY,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;IAEnE,OAAO,CACH,gBACI,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,gBACR,KAAK,eACN,IAAI,kBACD,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,kBACxB,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EACxC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,gBACxB,SAAS,IAAI,SAAS,iBACrB,UAAU,IAAI,SAAS,KAChC,IAAI,aAEP,SAAS,CAAC,CAAC,CAAC,CACT,eAAM,SAAS,EAAC,kBAAkB,iBAAa,MAAM,GAAG,CAC3D,CAAC,CAAC,CAAC,CACA,cACI,SAAS,EAAE,2BAA2B,QAAQ,iBAAiB,WAAW,EAAE,iBAChE,MAAM,YAElB,cAAK,IAAI,EAAE,GAAG,aAAa,sBAAsB,WAAW,QAAQ,QAAQ,EAAE,GAAI,GAChF,CACT,EACA,QAAQ,IACN,CACV,CAAC;AACN,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { EdsIcon } from './eds-icon.js';
2
+ export type { EdsIconProps, EdsIconColor, EdsIconSize } from './eds-icon.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eds-icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { EdsIcon } from './eds-icon.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eds-icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,83 @@
1
+ /*
2
+ * eds-icon-button — pure React port of eds-icon-button.scss.
3
+ * :host -> .eds-icon-button ; :host([attr]) -> .eds-icon-button[data-attr].
4
+ * Parent overrides: --_button-padding, --_button-surface-hover, --_button-on-surface-hover,
5
+ * --_button-color (e.g. the alert sets --_button-padding). Focus-ring mixins inlined.
6
+ */
7
+
8
+ .eds-icon-button {
9
+ --_eds-icon-button-surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle));
10
+ --_eds-icon-button-on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle));
11
+ --_eds-icon-button-padding: var(--_button-padding, var(--eds-sp-3xs));
12
+ --_eds-icon-button-color: var(--eds-c-foreground-subtle);
13
+
14
+ display: inline-flex;
15
+ border: none;
16
+ cursor: pointer;
17
+ background-color: inherit;
18
+ padding: var(--_eds-icon-button-padding);
19
+ position: relative;
20
+ color: var(--_eds-icon-button-color);
21
+ }
22
+ .eds-icon-button:hover,
23
+ .eds-icon-button:active {
24
+ background-color: var(--_eds-icon-button-surface-hover);
25
+ color: var(--_eds-icon-button-on-surface-hover);
26
+ }
27
+
28
+ /* COLOR VARIANTS */
29
+ .eds-icon-button[data-color="brand"] {
30
+ --_eds-icon-button-surface-hover: var(--_button-surface-hover, var(--eds-c-surface-brand--hover));
31
+ --_eds-icon-button-on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-brand--hover));
32
+ --_eds-icon-button-color: var(--_button-color, var(--eds-c-on-surface-brand));
33
+ }
34
+ .eds-icon-button[data-color="neutral"] {
35
+ --_eds-icon-button-surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle--hover));
36
+ --_eds-icon-button-on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle--hover));
37
+ }
38
+ .eds-icon-button[data-color="info"] {
39
+ --_eds-icon-button-surface-hover: var(--_button-surface-hover, var(--eds-c-surface-info-subtler--hover));
40
+ --_eds-icon-button-on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-info-subtler--hover));
41
+ }
42
+ .eds-icon-button[data-color="success"] {
43
+ --_eds-icon-button-surface-hover: var(--_button-surface-hover, var(--eds-c-surface-success-subtler--hover));
44
+ --_eds-icon-button-on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-success-subtler--hover));
45
+ }
46
+ .eds-icon-button[data-color="warning"] {
47
+ --_eds-icon-button-surface-hover: var(--_button-surface-hover, var(--eds-c-surface-warning-subtler--hover));
48
+ --_eds-icon-button-on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-warning-subtler--hover));
49
+ }
50
+ .eds-icon-button[data-color="critical"] {
51
+ --_eds-icon-button-surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler--hover));
52
+ --_eds-icon-button-on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler--hover));
53
+ }
54
+
55
+ /* SIZE VARIANTS */
56
+ .eds-icon-button[data-size="2xs"] { --_eds-icon-button-padding: var(--_button-padding, var(--eds-sp-2xs)); }
57
+ .eds-icon-button[data-size="xs"] { --_eds-icon-button-padding: var(--_button-padding, var(--eds-sp-2xs)); }
58
+ .eds-icon-button[data-size="s"] { --_eds-icon-button-padding: var(--_button-padding, var(--eds-sp-2xs)); }
59
+ .eds-icon-button[data-size="m"] { --_eds-icon-button-padding: var(--_button-padding, var(--eds-sp-xs)); }
60
+ .eds-icon-button[data-size="l"] { --_eds-icon-button-padding: var(--_button-padding, var(--eds-sp-s)); }
61
+
62
+ /* STATE */
63
+ .eds-icon-button[data-rounded] {
64
+ border-radius: var(--eds-br-full);
65
+ }
66
+ .eds-icon-button[data-disabled] {
67
+ --_eds-icon-button-color: var(--_button-color, var(--eds-c-foreground-disabled));
68
+ --_eds-icon-button-surface-hover: transparent;
69
+ --_eds-icon-button-on-surface-hover: var(--_eds-icon-button-color);
70
+ cursor: default;
71
+ }
72
+
73
+ /* FOCUS RING — inlined base.eds-focus-visible-ring / *-rounded */
74
+ .eds-icon-button:not(:disabled):focus-visible:not([readonly]) {
75
+ outline: var(--eds-bw-s) solid var(--eds-c-border-primary) !important;
76
+ outline-offset: 1px !important;
77
+ border-radius: var(--eds-br-xs) !important;
78
+ }
79
+ .eds-icon-button[data-rounded]:not(:disabled):focus-visible:not([readonly]) {
80
+ outline: var(--eds-bw-s) solid var(--eds-c-border-primary) !important;
81
+ outline-offset: 1px !important;
82
+ border-radius: var(--eds-br-full) !important;
83
+ }
@@ -0,0 +1,33 @@
1
+ import * as React from 'react';
2
+ /** Local narrowed color union — the icon button's color contract. */
3
+ export type EdsIconButtonColor = 'brand' | 'neutral' | 'info' | 'success' | 'warning' | 'critical';
4
+ /** Local narrowed size union — the icon button's size contract. */
5
+ export type EdsIconButtonSize = '2xs' | 'xs' | 's' | 'm' | 'l';
6
+ export interface EdsIconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'onClick'> {
7
+ /** The name of the icon to display. */
8
+ icon?: string;
9
+ /** Semantic color of the icon button. @default 'neutral' */
10
+ color?: EdsIconButtonColor;
11
+ /** Size of the icon button. @default 'm' */
12
+ size?: EdsIconButtonSize;
13
+ /** Accessible label describing the button's purpose. @default 'EDS Icon button' */
14
+ ariaLabel?: string;
15
+ /** Applies rounded corners. @default false */
16
+ rounded?: boolean;
17
+ /** Disables the button (non-interactive, disabled styling, removed from tab order). @default false */
18
+ disabled?: boolean;
19
+ /** Emitted when the button is clicked (native click event). */
20
+ onButtonClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
21
+ /** Optional projected content (e.g. an EdsBadge) rendered inside the icon. */
22
+ children?: React.ReactNode;
23
+ }
24
+ /**
25
+ * `EdsIconButton` — pure React port of the Angular `button[edsIconButton]`.
26
+ *
27
+ * The root element is a native `<button.eds-icon-button>` (the host IS the button, matching
28
+ * the attribute-selector Angular component). Renders the pure-React `EdsIcon`; projected
29
+ * children (e.g. a badge) pass into the icon. `color`/`size`/`rounded`/`disabled` reflect as
30
+ * `data-*` attributes; the Angular `(buttonClick)` output maps to the `onButtonClick` prop.
31
+ */
32
+ export declare const EdsIconButton: React.ForwardRefExoticComponent<EdsIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
33
+ //# sourceMappingURL=eds-icon-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-icon-button.d.ts","sourceRoot":"","sources":["../../src/eds-icon-button/eds-icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,qEAAqE;AACrE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEnG,mEAAmE;AACnE,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE/D,MAAM,WAAW,kBACb,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChF,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,4CAA4C;IAC5C,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACrE,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,8FAkCxB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { EdsIcon } from '../eds-icon/eds-icon.js';
4
+ /**
5
+ * `EdsIconButton` — pure React port of the Angular `button[edsIconButton]`.
6
+ *
7
+ * The root element is a native `<button.eds-icon-button>` (the host IS the button, matching
8
+ * the attribute-selector Angular component). Renders the pure-React `EdsIcon`; projected
9
+ * children (e.g. a badge) pass into the icon. `color`/`size`/`rounded`/`disabled` reflect as
10
+ * `data-*` attributes; the Angular `(buttonClick)` output maps to the `onButtonClick` prop.
11
+ */
12
+ export const EdsIconButton = React.forwardRef(function EdsIconButton({ icon = '', color = 'neutral', size = 'm', ariaLabel = 'EDS Icon button', rounded = false, disabled = false, onButtonClick, children, className, ...rest }, ref) {
13
+ return (_jsx("button", { ref: ref, type: "button", className: className ? `eds-icon-button ${className}` : 'eds-icon-button', "data-color": color, "data-size": size, "data-rounded": rounded ? '' : undefined, "data-disabled": disabled ? '' : undefined, disabled: disabled, "aria-label": ariaLabel, onClick: onButtonClick, ...rest, children: _jsx(EdsIcon, { icon: icon, color: color, size: size, children: children }) }));
14
+ });
15
+ //# sourceMappingURL=eds-icon-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-icon-button.js","sourceRoot":"","sources":["../../src/eds-icon-button/eds-icon-button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AA4BlD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAwC,SAAS,aAAa,CACvG,EACI,IAAI,GAAG,EAAE,EACT,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,GAAG,EACV,SAAS,GAAG,iBAAiB,EAC7B,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,aAAa,EACb,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACV,EACD,GAAG;IAEH,OAAO,CACH,iBACI,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,mBAAmB,SAAS,EAAE,CAAC,CAAC,CAAC,iBAAiB,gBAC7D,KAAK,eACN,IAAI,kBACD,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,mBACvB,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EACxC,QAAQ,EAAE,QAAQ,gBACN,SAAS,EACrB,OAAO,EAAE,aAAa,KAClB,IAAI,YAER,KAAC,OAAO,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,YACxC,QAAQ,GACH,GACL,CACZ,CAAC;AACN,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { EdsIconButton } from './eds-icon-button.js';
2
+ export type { EdsIconButtonProps, EdsIconButtonColor, EdsIconButtonSize } from './eds-icon-button.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eds-icon-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { EdsIconButton } from './eds-icon-button.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eds-icon-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /* eds-icon-state — pure React port of eds-icon-state.scss. :host -> .eds-icon-state. */
2
+
3
+ .eds-icon-state {
4
+ display: flex;
5
+ }
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Local narrowed color union — the icon-state's color contract (each value maps to a
4
+ * specific status icon). Ported 1:1 from Angular `eds-icon-state`.
5
+ */
6
+ export type EdsIconStateColor = 'info' | 'success' | 'warning' | 'critical';
7
+ /** Local narrowed size union — the icon-state's size contract. */
8
+ export type EdsIconStateSize = '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl';
9
+ export interface EdsIconStateProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> {
10
+ /** Semantic status color, selecting the corresponding status icon. @default 'info' */
11
+ color?: EdsIconStateColor;
12
+ /** Size of the status icon. @default 'm' */
13
+ size?: EdsIconStateSize;
14
+ /** Accessible label describing the icon's meaning (defaults to the per-status label). */
15
+ ariaLabel?: string;
16
+ }
17
+ /**
18
+ * `EdsIconState` — pure React port of the Angular `eds-icon-state`.
19
+ *
20
+ * Renders the status icon for a semantic color via the pure-React `EdsIcon`. Reflects
21
+ * `color`/`size` as `data-*` attributes (matching the Angular host bindings).
22
+ */
23
+ export declare const EdsIconState: React.ForwardRefExoticComponent<EdsIconStateProps & React.RefAttributes<HTMLSpanElement>>;
24
+ //# sourceMappingURL=eds-icon-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-icon-state.d.ts","sourceRoot":"","sources":["../../src/eds-icon-state/eds-icon-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAE5E,kEAAkE;AAClE,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;AAErE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC3F,sFAAsF;IACtF,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,4CAA4C;IAC5C,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAUD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,2FAsBvB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { EdsIcon } from '../eds-icon/eds-icon.js';
4
+ /** color → { icon, default aria-label }, mirroring the Angular @switch template. */
5
+ const STATE_ICON = {
6
+ success: { icon: 'check-circle:core', label: 'EDS success icon' },
7
+ warning: { icon: 'warning:core', label: 'EDS warning icon' },
8
+ critical: { icon: 'warning-circle:core', label: 'EDS danger icon' },
9
+ info: { icon: 'info:core', label: 'EDS info icon' },
10
+ };
11
+ /**
12
+ * `EdsIconState` — pure React port of the Angular `eds-icon-state`.
13
+ *
14
+ * Renders the status icon for a semantic color via the pure-React `EdsIcon`. Reflects
15
+ * `color`/`size` as `data-*` attributes (matching the Angular host bindings).
16
+ */
17
+ export const EdsIconState = React.forwardRef(function EdsIconState({ color = 'info', size = 'm', ariaLabel, className, ...rest }, ref) {
18
+ const state = STATE_ICON[color];
19
+ return (_jsx("span", { ref: ref, className: className ? `eds-icon-state ${className}` : 'eds-icon-state', "data-color": color, "data-size": size, ...rest, children: _jsx(EdsIcon, { icon: state.icon, color: color, size: size, ariaHidden: false, ariaLabel: ariaLabel || state.label }) }));
20
+ });
21
+ //# sourceMappingURL=eds-icon-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-icon-state.js","sourceRoot":"","sources":["../../src/eds-icon-state/eds-icon-state.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAoBlD,oFAAoF;AACpF,MAAM,UAAU,GAA+D;IAC3E,OAAO,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,kBAAkB,EAAE;IACjE,OAAO,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,kBAAkB,EAAE;IAC5D,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACnE,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE;CACtD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAqC,SAAS,YAAY,CAClG,EAAE,KAAK,GAAG,MAAM,EAAE,IAAI,GAAG,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAC7D,GAAG;IAEH,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,CACH,eACI,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,kBAAkB,SAAS,EAAE,CAAC,CAAC,CAAC,gBAAgB,gBAC3D,KAAK,eACN,IAAI,KACX,IAAI,YAER,KAAC,OAAO,IACJ,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,KAAK,EACjB,SAAS,EAAE,SAAS,IAAI,KAAK,CAAC,KAAK,GACrC,GACC,CACV,CAAC;AACN,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { EdsIconState } from './eds-icon-state.js';
2
+ export type { EdsIconStateProps, EdsIconStateColor, EdsIconStateSize } from './eds-icon-state.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eds-icon-state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { EdsIconState } from './eds-icon-state.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eds-icon-state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,83 @@
1
+ /* Pure-React port of eds-link.scss — attribute-scoped light-DOM CSS. */
2
+
3
+ .eds-link {
4
+ color: var(--eds-c-link);
5
+ text-decoration: none;
6
+ cursor: pointer;
7
+ font: inherit;
8
+ transition: color 0.15s ease;
9
+ }
10
+
11
+ .eds-link:hover {
12
+ color: var(--eds-c-link--hover);
13
+ text-decoration: underline;
14
+ text-underline-offset: 2px;
15
+ text-decoration-thickness: 2px;
16
+ }
17
+
18
+ .eds-link:active {
19
+ color: var(--eds-c-link--pressed);
20
+ }
21
+
22
+ .eds-link:focus-visible {
23
+ outline: var(--eds-bw-s) solid var(--eds-c-focus);
24
+ outline-offset: 2px;
25
+ border-radius: var(--eds-br-xs);
26
+ }
27
+
28
+ .eds-link:visited {
29
+ color: var(--eds-c-link--visited);
30
+ }
31
+
32
+ /* Underline variant — explicitly opt in to underline */
33
+ .eds-link[data-underline] {
34
+ text-decoration: underline;
35
+ text-underline-offset: 2px;
36
+ }
37
+
38
+ .eds-link[data-underline]:hover {
39
+ text-decoration-thickness: 2px;
40
+ }
41
+
42
+ /* External link — adds arrow-square-out icon after content */
43
+ .eds-link[data-external]::after {
44
+ content: '';
45
+ display: inline-block;
46
+ width: 20px;
47
+ height: 20px;
48
+ margin-inline-start: var(--eds-sp-3xs);
49
+ background-color: currentColor;
50
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z'/%3E%3C/svg%3E");
51
+ mask-size: contain;
52
+ mask-repeat: no-repeat;
53
+ vertical-align: middle;
54
+ position: relative;
55
+ top: -3px;
56
+ }
57
+
58
+ /* Contrast — dark foreground color for high-contrast contexts */
59
+ .eds-link[data-contrast] {
60
+ color: var(--eds-c-link-contrast);
61
+ }
62
+
63
+ .eds-link[data-contrast]:hover {
64
+ color: var(--eds-c-link-contrast--hover);
65
+ }
66
+
67
+ .eds-link[data-contrast]:active {
68
+ color: var(--eds-c-link-contrast--pressed);
69
+ }
70
+
71
+ .eds-link[data-contrast]:visited {
72
+ color: var(--eds-c-link-contrast--visited);
73
+ }
74
+
75
+ /* Inherit — takes parent color, only shows link behavior on hover */
76
+ .eds-link[data-inherit] {
77
+ color: inherit;
78
+ }
79
+
80
+ .eds-link[data-inherit]:hover {
81
+ color: var(--eds-c-link);
82
+ text-decoration: underline;
83
+ }