@eui/eds-react 22.0.0-alpha.10
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.
- package/eds-accordion/eds-accordion-item.css +108 -0
- package/eds-accordion/eds-accordion-item.d.ts +47 -0
- package/eds-accordion/eds-accordion-item.d.ts.map +1 -0
- package/eds-accordion/eds-accordion-item.js +87 -0
- package/eds-accordion/eds-accordion-item.js.map +1 -0
- package/eds-accordion/eds-accordion.css +7 -0
- package/eds-accordion/eds-accordion.d.ts +54 -0
- package/eds-accordion/eds-accordion.d.ts.map +1 -0
- package/eds-accordion/eds-accordion.js +79 -0
- package/eds-accordion/eds-accordion.js.map +1 -0
- package/eds-accordion/index.d.ts +5 -0
- package/eds-accordion/index.d.ts.map +1 -0
- package/eds-accordion/index.js +3 -0
- package/eds-accordion/index.js.map +1 -0
- package/eds-alert/eds-alert-title.css +5 -0
- package/eds-alert/eds-alert-title.d.ts +12 -0
- package/eds-alert/eds-alert-title.d.ts.map +1 -0
- package/eds-alert/eds-alert-title.js +12 -0
- package/eds-alert/eds-alert-title.js.map +1 -0
- package/eds-alert/eds-alert.css +62 -0
- package/eds-alert/eds-alert.d.ts +38 -0
- package/eds-alert/eds-alert.d.ts.map +1 -0
- package/eds-alert/eds-alert.js +29 -0
- package/eds-alert/eds-alert.js.map +1 -0
- package/eds-alert/index.d.ts +5 -0
- package/eds-alert/index.d.ts.map +1 -0
- package/eds-alert/index.js +3 -0
- package/eds-alert/index.js.map +1 -0
- package/eds-avatar/eds-avatar-badge.css +34 -0
- package/eds-avatar/eds-avatar-badge.d.ts +20 -0
- package/eds-avatar/eds-avatar-badge.d.ts.map +1 -0
- package/eds-avatar/eds-avatar-badge.js +13 -0
- package/eds-avatar/eds-avatar-badge.js.map +1 -0
- package/eds-avatar/eds-avatar-content-label.css +5 -0
- package/eds-avatar/eds-avatar-content-label.d.ts +13 -0
- package/eds-avatar/eds-avatar-content-label.d.ts.map +1 -0
- package/eds-avatar/eds-avatar-content-label.js +12 -0
- package/eds-avatar/eds-avatar-content-label.js.map +1 -0
- package/eds-avatar/eds-avatar-content-sublabel.css +5 -0
- package/eds-avatar/eds-avatar-content-sublabel.d.ts +13 -0
- package/eds-avatar/eds-avatar-content-sublabel.d.ts.map +1 -0
- package/eds-avatar/eds-avatar-content-sublabel.js +12 -0
- package/eds-avatar/eds-avatar-content-sublabel.js.map +1 -0
- package/eds-avatar/eds-avatar-content.css +6 -0
- package/eds-avatar/eds-avatar-content.d.ts +17 -0
- package/eds-avatar/eds-avatar-content.d.ts.map +1 -0
- package/eds-avatar/eds-avatar-content.js +12 -0
- package/eds-avatar/eds-avatar-content.js.map +1 -0
- package/eds-avatar/eds-avatar-icon.css +13 -0
- package/eds-avatar/eds-avatar-icon.d.ts +14 -0
- package/eds-avatar/eds-avatar-icon.d.ts.map +1 -0
- package/eds-avatar/eds-avatar-icon.js +13 -0
- package/eds-avatar/eds-avatar-icon.js.map +1 -0
- package/eds-avatar/eds-avatar-image.css +24 -0
- package/eds-avatar/eds-avatar-image.d.ts +19 -0
- package/eds-avatar/eds-avatar-image.d.ts.map +1 -0
- package/eds-avatar/eds-avatar-image.js +16 -0
- package/eds-avatar/eds-avatar-image.js.map +1 -0
- package/eds-avatar/eds-avatar-list.css +21 -0
- package/eds-avatar/eds-avatar-list.d.ts +14 -0
- package/eds-avatar/eds-avatar-list.d.ts.map +1 -0
- package/eds-avatar/eds-avatar-list.js +13 -0
- package/eds-avatar/eds-avatar-list.js.map +1 -0
- package/eds-avatar/eds-avatar-text.css +7 -0
- package/eds-avatar/eds-avatar-text.d.ts +14 -0
- package/eds-avatar/eds-avatar-text.d.ts.map +1 -0
- package/eds-avatar/eds-avatar-text.js +13 -0
- package/eds-avatar/eds-avatar-text.js.map +1 -0
- package/eds-avatar/eds-avatar.css +128 -0
- package/eds-avatar/eds-avatar.d.ts +38 -0
- package/eds-avatar/eds-avatar.d.ts.map +1 -0
- package/eds-avatar/eds-avatar.js +48 -0
- package/eds-avatar/eds-avatar.js.map +1 -0
- package/eds-avatar/index.d.ts +19 -0
- package/eds-avatar/index.d.ts.map +1 -0
- package/eds-avatar/index.js +10 -0
- package/eds-avatar/index.js.map +1 -0
- package/eds-badge/eds-badge.css +174 -0
- package/eds-badge/eds-badge.d.ts +46 -0
- package/eds-badge/eds-badge.d.ts.map +1 -0
- package/eds-badge/eds-badge.js +39 -0
- package/eds-badge/eds-badge.js.map +1 -0
- package/eds-badge/index.d.ts +3 -0
- package/eds-badge/index.d.ts.map +1 -0
- package/eds-badge/index.js +2 -0
- package/eds-badge/index.js.map +1 -0
- package/eds-button/eds-button.css +233 -0
- package/eds-button/eds-button.d.ts +65 -0
- package/eds-button/eds-button.d.ts.map +1 -0
- package/eds-button/eds-button.js +33 -0
- package/eds-button/eds-button.js.map +1 -0
- package/eds-button/index.d.ts +3 -0
- package/eds-button/index.d.ts.map +1 -0
- package/eds-button/index.js +2 -0
- package/eds-button/index.js.map +1 -0
- package/eds-chip/eds-chip.css +171 -0
- package/eds-chip/eds-chip.d.ts +71 -0
- package/eds-chip/eds-chip.d.ts.map +1 -0
- package/eds-chip/eds-chip.js +95 -0
- package/eds-chip/eds-chip.js.map +1 -0
- package/eds-chip/index.d.ts +3 -0
- package/eds-chip/index.d.ts.map +1 -0
- package/eds-chip/index.js +2 -0
- package/eds-chip/index.js.map +1 -0
- package/eds-chip-list/eds-chip-list.css +32 -0
- package/eds-chip-list/eds-chip-list.d.ts +68 -0
- package/eds-chip-list/eds-chip-list.d.ts.map +1 -0
- package/eds-chip-list/eds-chip-list.js +69 -0
- package/eds-chip-list/eds-chip-list.js.map +1 -0
- package/eds-chip-list/index.d.ts +3 -0
- package/eds-chip-list/index.d.ts.map +1 -0
- package/eds-chip-list/index.js +2 -0
- package/eds-chip-list/index.js.map +1 -0
- package/eds-icon/eds-icon.css +80 -0
- package/eds-icon/eds-icon.d.ts +44 -0
- package/eds-icon/eds-icon.d.ts.map +1 -0
- package/eds-icon/eds-icon.js +26 -0
- package/eds-icon/eds-icon.js.map +1 -0
- package/eds-icon/index.d.ts +3 -0
- package/eds-icon/index.d.ts.map +1 -0
- package/eds-icon/index.js +2 -0
- package/eds-icon/index.js.map +1 -0
- package/eds-icon-button/eds-icon-button.css +83 -0
- package/eds-icon-button/eds-icon-button.d.ts +33 -0
- package/eds-icon-button/eds-icon-button.d.ts.map +1 -0
- package/eds-icon-button/eds-icon-button.js +15 -0
- package/eds-icon-button/eds-icon-button.js.map +1 -0
- package/eds-icon-button/index.d.ts +3 -0
- package/eds-icon-button/index.d.ts.map +1 -0
- package/eds-icon-button/index.js +2 -0
- package/eds-icon-button/index.js.map +1 -0
- package/eds-icon-state/eds-icon-state.css +5 -0
- package/eds-icon-state/eds-icon-state.d.ts +24 -0
- package/eds-icon-state/eds-icon-state.d.ts.map +1 -0
- package/eds-icon-state/eds-icon-state.js +21 -0
- package/eds-icon-state/eds-icon-state.js.map +1 -0
- package/eds-icon-state/index.d.ts +3 -0
- package/eds-icon-state/index.d.ts.map +1 -0
- package/eds-icon-state/index.js +2 -0
- package/eds-icon-state/index.js.map +1 -0
- package/eds-link/eds-link.css +83 -0
- package/eds-link/eds-link.d.ts +32 -0
- package/eds-link/eds-link.d.ts.map +1 -0
- package/eds-link/eds-link.js +15 -0
- package/eds-link/eds-link.js.map +1 -0
- package/eds-link/index.d.ts +3 -0
- package/eds-link/index.d.ts.map +1 -0
- package/eds-link/index.js +2 -0
- package/eds-link/index.js.map +1 -0
- package/eds-menu/eds-menu-item-view.d.ts +31 -0
- package/eds-menu/eds-menu-item-view.d.ts.map +1 -0
- package/eds-menu/eds-menu-item-view.js +65 -0
- package/eds-menu/eds-menu-item-view.js.map +1 -0
- package/eds-menu/eds-menu-item.css +221 -0
- package/eds-menu/eds-menu-item.model.d.ts +69 -0
- package/eds-menu/eds-menu-item.model.d.ts.map +1 -0
- package/eds-menu/eds-menu-item.model.js +2 -0
- package/eds-menu/eds-menu-item.model.js.map +1 -0
- package/eds-menu/eds-menu.css +83 -0
- package/eds-menu/eds-menu.d.ts +52 -0
- package/eds-menu/eds-menu.d.ts.map +1 -0
- package/eds-menu/eds-menu.js +145 -0
- package/eds-menu/eds-menu.js.map +1 -0
- package/eds-menu/index.d.ts +6 -0
- package/eds-menu/index.d.ts.map +1 -0
- package/eds-menu/index.js +3 -0
- package/eds-menu/index.js.map +1 -0
- package/eds-shell/eds-shell-content.css +11 -0
- package/eds-shell/eds-shell-content.d.ts +11 -0
- package/eds-shell/eds-shell-content.d.ts.map +1 -0
- package/eds-shell/eds-shell-content.js +10 -0
- package/eds-shell/eds-shell-content.js.map +1 -0
- package/eds-shell/eds-shell-context.d.ts +20 -0
- package/eds-shell/eds-shell-context.d.ts.map +1 -0
- package/eds-shell/eds-shell-context.js +7 -0
- package/eds-shell/eds-shell-context.js.map +1 -0
- package/eds-shell/eds-shell-footer.css +25 -0
- package/eds-shell/eds-shell-footer.d.ts +12 -0
- package/eds-shell/eds-shell-footer.d.ts.map +1 -0
- package/eds-shell/eds-shell-footer.js +9 -0
- package/eds-shell/eds-shell-footer.js.map +1 -0
- package/eds-shell/eds-shell-header-app.css +23 -0
- package/eds-shell/eds-shell-header-app.d.ts +16 -0
- package/eds-shell/eds-shell-header-app.d.ts.map +1 -0
- package/eds-shell/eds-shell-header-app.js +11 -0
- package/eds-shell/eds-shell-header-app.js.map +1 -0
- package/eds-shell/eds-shell-header-end.css +5 -0
- package/eds-shell/eds-shell-header-end.d.ts +11 -0
- package/eds-shell/eds-shell-header-end.d.ts.map +1 -0
- package/eds-shell/eds-shell-header-end.js +10 -0
- package/eds-shell/eds-shell-header-end.js.map +1 -0
- package/eds-shell/eds-shell-header-environment.css +21 -0
- package/eds-shell/eds-shell-header-environment.d.ts +11 -0
- package/eds-shell/eds-shell-header-environment.d.ts.map +1 -0
- package/eds-shell/eds-shell-header-environment.js +10 -0
- package/eds-shell/eds-shell-header-environment.js.map +1 -0
- package/eds-shell/eds-shell-header-logo.css +14 -0
- package/eds-shell/eds-shell-header-logo.d.ts +20 -0
- package/eds-shell/eds-shell-header-logo.d.ts.map +1 -0
- package/eds-shell/eds-shell-header-logo.js +10 -0
- package/eds-shell/eds-shell-header-logo.js.map +1 -0
- package/eds-shell/eds-shell-header-start.css +5 -0
- package/eds-shell/eds-shell-header-start.d.ts +11 -0
- package/eds-shell/eds-shell-header-start.d.ts.map +1 -0
- package/eds-shell/eds-shell-header-start.js +10 -0
- package/eds-shell/eds-shell-header-start.js.map +1 -0
- package/eds-shell/eds-shell-header.css +33 -0
- package/eds-shell/eds-shell-header.d.ts +25 -0
- package/eds-shell/eds-shell-header.d.ts.map +1 -0
- package/eds-shell/eds-shell-header.js +14 -0
- package/eds-shell/eds-shell-header.js.map +1 -0
- package/eds-shell/eds-shell-menu-toggle.css +4 -0
- package/eds-shell/eds-shell-menu-toggle.d.ts +16 -0
- package/eds-shell/eds-shell-menu-toggle.d.ts.map +1 -0
- package/eds-shell/eds-shell-menu-toggle.js +20 -0
- package/eds-shell/eds-shell-menu-toggle.js.map +1 -0
- package/eds-shell/eds-shell-sidebar-bottom-nav.css +8 -0
- package/eds-shell/eds-shell-sidebar-bottom-nav.d.ts +20 -0
- package/eds-shell/eds-shell-sidebar-bottom-nav.d.ts.map +1 -0
- package/eds-shell/eds-shell-sidebar-bottom-nav.js +11 -0
- package/eds-shell/eds-shell-sidebar-bottom-nav.js.map +1 -0
- package/eds-shell/eds-shell-sidebar-footer.css +10 -0
- package/eds-shell/eds-shell-sidebar-footer.d.ts +10 -0
- package/eds-shell/eds-shell-sidebar-footer.d.ts.map +1 -0
- package/eds-shell/eds-shell-sidebar-footer.js +10 -0
- package/eds-shell/eds-shell-sidebar-footer.js.map +1 -0
- package/eds-shell/eds-shell-sidebar-header.css +33 -0
- package/eds-shell/eds-shell-sidebar-header.d.ts +16 -0
- package/eds-shell/eds-shell-sidebar-header.d.ts.map +1 -0
- package/eds-shell/eds-shell-sidebar-header.js +10 -0
- package/eds-shell/eds-shell-sidebar-header.js.map +1 -0
- package/eds-shell/eds-shell-sidebar-nav.css +9 -0
- package/eds-shell/eds-shell-sidebar-nav.d.ts +20 -0
- package/eds-shell/eds-shell-sidebar-nav.d.ts.map +1 -0
- package/eds-shell/eds-shell-sidebar-nav.js +11 -0
- package/eds-shell/eds-shell-sidebar-nav.js.map +1 -0
- package/eds-shell/eds-shell-sidebar.css +5 -0
- package/eds-shell/eds-shell-sidebar.d.ts +25 -0
- package/eds-shell/eds-shell-sidebar.d.ts.map +1 -0
- package/eds-shell/eds-shell-sidebar.js +15 -0
- package/eds-shell/eds-shell-sidebar.js.map +1 -0
- package/eds-shell/eds-shell-toolbar-app.css +23 -0
- package/eds-shell/eds-shell-toolbar-app.d.ts +16 -0
- package/eds-shell/eds-shell-toolbar-app.d.ts.map +1 -0
- package/eds-shell/eds-shell-toolbar-app.js +11 -0
- package/eds-shell/eds-shell-toolbar-app.js.map +1 -0
- package/eds-shell/eds-shell-toolbar-center.css +6 -0
- package/eds-shell/eds-shell-toolbar-center.d.ts +11 -0
- package/eds-shell/eds-shell-toolbar-center.d.ts.map +1 -0
- package/eds-shell/eds-shell-toolbar-center.js +10 -0
- package/eds-shell/eds-shell-toolbar-center.js.map +1 -0
- package/eds-shell/eds-shell-toolbar-end.css +23 -0
- package/eds-shell/eds-shell-toolbar-end.d.ts +11 -0
- package/eds-shell/eds-shell-toolbar-end.d.ts.map +1 -0
- package/eds-shell/eds-shell-toolbar-end.js +10 -0
- package/eds-shell/eds-shell-toolbar-end.js.map +1 -0
- package/eds-shell/eds-shell-toolbar-environment.css +21 -0
- package/eds-shell/eds-shell-toolbar-environment.d.ts +11 -0
- package/eds-shell/eds-shell-toolbar-environment.d.ts.map +1 -0
- package/eds-shell/eds-shell-toolbar-environment.js +10 -0
- package/eds-shell/eds-shell-toolbar-environment.js.map +1 -0
- package/eds-shell/eds-shell-toolbar-logo.css +11 -0
- package/eds-shell/eds-shell-toolbar-logo.d.ts +8 -0
- package/eds-shell/eds-shell-toolbar-logo.d.ts.map +1 -0
- package/eds-shell/eds-shell-toolbar-logo.js +10 -0
- package/eds-shell/eds-shell-toolbar-logo.js.map +1 -0
- package/eds-shell/eds-shell-toolbar-start.css +5 -0
- package/eds-shell/eds-shell-toolbar-start.d.ts +11 -0
- package/eds-shell/eds-shell-toolbar-start.d.ts.map +1 -0
- package/eds-shell/eds-shell-toolbar-start.js +10 -0
- package/eds-shell/eds-shell-toolbar-start.js.map +1 -0
- package/eds-shell/eds-shell-toolbar.css +37 -0
- package/eds-shell/eds-shell-toolbar.d.ts +27 -0
- package/eds-shell/eds-shell-toolbar.d.ts.map +1 -0
- package/eds-shell/eds-shell-toolbar.js +12 -0
- package/eds-shell/eds-shell-toolbar.js.map +1 -0
- package/eds-shell/eds-shell-top-message.css +48 -0
- package/eds-shell/eds-shell-top-message.d.ts +22 -0
- package/eds-shell/eds-shell-top-message.d.ts.map +1 -0
- package/eds-shell/eds-shell-top-message.js +24 -0
- package/eds-shell/eds-shell-top-message.js.map +1 -0
- package/eds-shell/eds-shell.css +105 -0
- package/eds-shell/eds-shell.d.ts +41 -0
- package/eds-shell/eds-shell.d.ts.map +1 -0
- package/eds-shell/eds-shell.js +116 -0
- package/eds-shell/eds-shell.js.map +1 -0
- package/eds-shell/index.d.ts +50 -0
- package/eds-shell/index.d.ts.map +1 -0
- package/eds-shell/index.js +25 -0
- package/eds-shell/index.js.map +1 -0
- package/eds-tag/eds-tag.css +83 -0
- package/eds-tag/eds-tag.d.ts +29 -0
- package/eds-tag/eds-tag.d.ts.map +1 -0
- package/eds-tag/eds-tag.js +14 -0
- package/eds-tag/eds-tag.js.map +1 -0
- package/eds-tag/index.d.ts +3 -0
- package/eds-tag/index.d.ts.map +1 -0
- package/eds-tag/index.js +2 -0
- package/eds-tag/index.js.map +1 -0
- package/eds-tooltip/eds-tooltip.css +140 -0
- package/eds-tooltip/eds-tooltip.d.ts +53 -0
- package/eds-tooltip/eds-tooltip.d.ts.map +1 -0
- package/eds-tooltip/eds-tooltip.js +179 -0
- package/eds-tooltip/eds-tooltip.js.map +1 -0
- package/eds-tooltip/index.d.ts +3 -0
- package/eds-tooltip/index.d.ts.map +1 -0
- package/eds-tooltip/index.js +2 -0
- package/eds-tooltip/index.js.map +1 -0
- package/index.d.ts +46 -0
- package/index.d.ts.map +1 -0
- package/index.js +31 -0
- package/index.js.map +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { createContext } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Context published by `EdsChipList` so a projected `EdsChip` can resolve its host role to
|
|
6
|
+
* `listitem` (the chip's standalone default is `button`). Mirrors the Angular
|
|
7
|
+
* `inject(EdsChipList, { optional: true })` relationship: a chip inside a list gets
|
|
8
|
+
* `role="listitem"`, a standalone chip keeps `role="button"`. Default `false` = no list.
|
|
9
|
+
*/
|
|
10
|
+
export const EdsChipListContext = createContext(false);
|
|
11
|
+
/**
|
|
12
|
+
* `EdsChipList` — pure React port of the Angular `eds-chip-list`.
|
|
13
|
+
*
|
|
14
|
+
* A semantic container for a group of `EdsChip`s. It renders a `role="list"` chip container
|
|
15
|
+
* (`aria-label` from `ariaLabel`) and reflects `data-e2e` on the host, matching the Angular
|
|
16
|
+
* template. It publishes `EdsChipListContext` so projected chips resolve `role="listitem"`.
|
|
17
|
+
*
|
|
18
|
+
* Slots (Angular multi-`<ng-content select>`): projected `EdsChipListAdditionalContent` /
|
|
19
|
+
* `EdsChipListAppendContent` children are pulled out of the chip container and rendered in
|
|
20
|
+
* their own structural positions (matching the Angular DOM order); everything else (the chips)
|
|
21
|
+
* stays inside the `role="list"` container. Equivalent `additionalContent` / `appendContent`
|
|
22
|
+
* props are also accepted for slot-style composition. The rendered element IS the component.
|
|
23
|
+
*/
|
|
24
|
+
export const EdsChipList = React.forwardRef(function EdsChipList({ ariaLabel = 'Chip list', e2eAttr = 'eds-chip-list', additionalContent, appendContent, children, className, ...rest }, ref) {
|
|
25
|
+
// Split projected children: route the slot sub-components to their own positions
|
|
26
|
+
// (Angular `<ng-content select="…">`), keep the rest (chips) in the list container.
|
|
27
|
+
const chipChildren = [];
|
|
28
|
+
let additionalFromChildren = null;
|
|
29
|
+
let appendFromChildren = null;
|
|
30
|
+
React.Children.forEach(children, (child) => {
|
|
31
|
+
if (React.isValidElement(child)) {
|
|
32
|
+
if (child.type === EdsChipListAdditionalContent) {
|
|
33
|
+
additionalFromChildren = child;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (child.type === EdsChipListAppendContent) {
|
|
37
|
+
appendFromChildren = child;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
chipChildren.push(child);
|
|
42
|
+
});
|
|
43
|
+
const additional = additionalFromChildren
|
|
44
|
+
?? (additionalContent != null ? _jsx(EdsChipListAdditionalContent, { children: additionalContent }) : null);
|
|
45
|
+
const append = appendFromChildren
|
|
46
|
+
?? (appendContent != null ? _jsx(EdsChipListAppendContent, { children: appendContent }) : null);
|
|
47
|
+
return (_jsx(EdsChipListContext.Provider, { value: true, children: _jsxs("div", { ref: ref, className: className ? `eds-chip-list ${className}` : 'eds-chip-list', "data-e2e": e2eAttr, ...rest, children: [_jsx("div", { role: "list", "aria-label": ariaLabel ?? undefined, className: "eds-chip-list__chip-container", children: chipChildren }), additional, append] }) }));
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* `EdsChipListAdditionalContent` — pure React port of the Angular
|
|
51
|
+
* `eds-chip-list-additional-content` sub-component (`template: '<ng-content/>'`). Wraps
|
|
52
|
+
* non-chip content within an `eds-chip-list` and excludes it from the list ARIA structure.
|
|
53
|
+
* Renders as an `eds-chip-list-additional-content` custom element (matching the Angular
|
|
54
|
+
* selector, targeted by the `:empty` CSS rule).
|
|
55
|
+
*/
|
|
56
|
+
export const EdsChipListAdditionalContent = React.forwardRef(function EdsChipListAdditionalContent({ children, className, ...rest }, ref) {
|
|
57
|
+
return React.createElement('eds-chip-list-additional-content', { ref, className, ...rest }, children);
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* `EdsChipListAppendContent` — pure React port of the Angular `eds-chip-list-append-content`
|
|
61
|
+
* sub-component (`template: '<ng-content/>'`). Appends content to the chip list, enabling chip
|
|
62
|
+
* placement above/below/inside a text input for autocomplete-like components. Renders as an
|
|
63
|
+
* `eds-chip-list-append-content` custom element (matching the Angular selector, targeted by
|
|
64
|
+
* the `:empty` CSS rule).
|
|
65
|
+
*/
|
|
66
|
+
export const EdsChipListAppendContent = React.forwardRef(function EdsChipListAppendContent({ children, className, ...rest }, ref) {
|
|
67
|
+
return React.createElement('eds-chip-list-append-content', { ref, className, ...rest }, children);
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=eds-chip-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eds-chip-list.js","sourceRoot":"","sources":["../../src/eds-chip-list/eds-chip-list.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAU,KAAK,CAAC,CAAC;AA0BhE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAmC,SAAS,WAAW,CAC9F,EACI,SAAS,GAAG,WAAW,EACvB,OAAO,GAAG,eAAe,EACzB,iBAAiB,EACjB,aAAa,EACb,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACV,EACD,GAAG;IAEH,iFAAiF;IACjF,oFAAoF;IACpF,MAAM,YAAY,GAAsB,EAAE,CAAC;IAC3C,IAAI,sBAAsB,GAAoB,IAAI,CAAC;IACnD,IAAI,kBAAkB,GAAoB,IAAI,CAAC;IAE/C,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QACvC,IAAI,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,IAAI,KAAK,CAAC,IAAI,KAAK,4BAA4B,EAAE,CAAC;gBAC9C,sBAAsB,GAAG,KAAK,CAAC;gBAC/B,OAAO;YACX,CAAC;YACD,IAAI,KAAK,CAAC,IAAI,KAAK,wBAAwB,EAAE,CAAC;gBAC1C,kBAAkB,GAAG,KAAK,CAAC;gBAC3B,OAAO;YACX,CAAC;QACL,CAAC;QACD,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,sBAAsB;WAClC,CAAC,iBAAiB,IAAI,IAAI,CAAC,CAAC,CAAC,KAAC,4BAA4B,cAAE,iBAAiB,GAAgC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7H,MAAM,MAAM,GAAG,kBAAkB;WAC1B,CAAC,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC,KAAC,wBAAwB,cAAE,aAAa,GAA4B,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAE7G,OAAO,CACH,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YACpC,eACI,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,iBAAiB,SAAS,EAAE,CAAC,CAAC,CAAC,eAAe,cAC3D,OAAO,KACb,IAAI,aAER,cAAK,IAAI,EAAC,MAAM,gBAAa,SAAS,IAAI,SAAS,EAAE,SAAS,EAAC,+BAA+B,YACzF,YAAY,GACX,EACL,UAAU,EACV,MAAM,IACL,GACoB,CACjC,CAAC;AACN,CAAC,CAAC,CAAC;AAMH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,CAAC,UAAU,CACxD,SAAS,4BAA4B,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG;IACvE,OAAO,KAAK,CAAC,aAAa,CACtB,kCAAkC,EAClC,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAC3B,QAAQ,CACX,CAAC;AACN,CAAC,CACJ,CAAC;AAMF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC,UAAU,CACpD,SAAS,wBAAwB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG;IACnE,OAAO,KAAK,CAAC,aAAa,CACtB,8BAA8B,EAC9B,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAC3B,QAAQ,CACX,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { EdsChipList, EdsChipListContext, EdsChipListAdditionalContent, EdsChipListAppendContent, } from './eds-chip-list.js';
|
|
2
|
+
export type { EdsChipListProps, EdsChipListAdditionalContentProps, EdsChipListAppendContentProps, } from './eds-chip-list.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eds-chip-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACR,gBAAgB,EAChB,iCAAiC,EACjC,6BAA6B,GAChC,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eds-chip-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,GAC3B,MAAM,oBAAoB,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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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,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 @@
|
|
|
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 @@
|
|
|
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
|
+
}
|