@ebrains/react 0.6.0-alpha.0 → 0.7.0-alpha.0
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/color-primary-palette_6.entry.esm.js +106 -106
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/eds-accordion_22.entry.esm.js +269 -0
- package/eds-app-root.entry.esm.js +53 -0
- package/eds-avatar_4.entry.esm.js +185 -0
- package/eds-breadcrumb.entry.esm.js +4 -15
- package/eds-card-generic.entry.esm.js +114 -0
- package/eds-card-section.entry.esm.js +56 -0
- package/eds-components-section.entry.esm.js +1 -1
- package/eds-cookies-preference.entry.esm.js +2 -2
- package/eds-docs-palettes.entry.esm.js +1 -1
- package/eds-docs-tokens.entry.esm.js +1 -1
- package/{eds-dropdown_2.entry.esm.js → eds-dropdown.entry.esm.js} +19 -98
- package/eds-feedback.entry.esm.js +82 -0
- package/eds-form.entry.esm.js +253 -253
- package/eds-frame.entry.esm.js +34 -33
- package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
- package/eds-icon-arrow-right.entry.esm.js +1 -1
- package/eds-icon-bluesky.entry.esm.js +1 -1
- package/eds-icon-chevron-down.entry.esm.js +1 -1
- package/eds-icon-chevron-left.entry.esm.js +1 -1
- package/eds-icon-chevron-right.entry.esm.js +1 -1
- package/eds-icon-chevron-up.entry.esm.js +1 -1
- package/eds-icon-close.entry.esm.js +1 -1
- package/eds-icon-copy.entry.esm.js +1 -1
- package/eds-icon-eu.entry.esm.js +1 -1
- package/eds-icon-facebook.entry.esm.js +1 -1
- package/eds-icon-gitlab.entry.esm.js +1 -1
- package/eds-icon-linkedin.entry.esm.js +1 -1
- package/eds-icon-loader.entry.esm.js +1 -1
- package/eds-icon-mastodon.entry.esm.js +1 -1
- package/eds-icon-menu.entry.esm.js +1 -1
- package/eds-icon-more.entry.esm.js +1 -1
- package/eds-icon-search.entry.esm.js +1 -1
- package/eds-icon-star.entry.esm.js +21 -0
- package/eds-icon-success.entry.esm.js +1 -1
- package/eds-icon-thumbs-down.entry.esm.js +21 -0
- package/eds-icon-thumbs-up.entry.esm.js +21 -0
- package/eds-icon-twitter.entry.esm.js +1 -1
- package/eds-icon-user.entry.esm.js +1 -1
- package/eds-icon-youtube.entry.esm.js +1 -1
- package/{keycloak-d502ec16.esm.js → eds-login_2.entry.esm.js} +172 -1
- package/eds-logo-variations.entry.esm.js +1 -1
- package/eds-modal.entry.esm.js +22 -9
- package/eds-progress-bar.entry.esm.js +2 -2
- package/eds-rating.entry.esm.js +37 -37
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-spinner.entry.esm.js +67 -0
- package/eds-steps.entry.esm.js +8 -17
- package/eds-svg-repository.entry.esm.js +8 -2
- package/eds-switch.entry.esm.js +5 -5
- package/eds-tabs.entry.esm.js +14 -26
- package/eds-timeline.entry.esm.js +6 -23
- package/eds-toast-manager.entry.esm.js +62 -0
- package/eds-toast.entry.esm.js +92 -0
- package/eds-tooltip.entry.esm.js +3 -3
- package/eds-trl.entry.esm.js +2 -2
- package/eds-user.entry.esm.js +64 -87
- package/eds-vertical-stepper.entry.esm.js +5 -5
- package/formUtils-ac68474d.esm.js +247 -0
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm.js +1 -1
- package/index.esm2.js +46 -46
- package/logo-space.entry.esm.js +4 -4
- package/logo-variations-horizontal_2.entry.esm.js +26 -26
- package/logo-wrong-usage.entry.esm.js +37 -37
- package/package.json +1 -1
- package/sharedUtils-a550989c.esm.js +17 -0
- package/src/components.d.ts +4 -1
- package/star-0da9b5e9.esm.js +5 -0
- package/thumbs-down-a18fd049.esm.js +5 -0
- package/thumbs-up-c19a71bc.esm.js +6 -0
- package/token-list_3.entry.esm.js +5 -5
- package/token-ratios.entry.esm.js +3 -3
- package/token-spacing.entry.esm.js +26 -26
- package/token-typography.entry.esm.js +2 -2
- package/eds-accordion_13.entry.esm.js +0 -1064
- package/eds-block-break.entry.esm.js +0 -22
- package/eds-footer.entry.esm.js +0 -102
- package/eds-fullscreen-menu.entry.esm.js +0 -143
- package/eds-header.entry.esm.js +0 -130
- package/eds-input_7.entry.esm.js +0 -529
- package/eds-link.entry.esm.js +0 -204
- package/eds-login.entry.esm.js +0 -97
- package/eds-logo.entry.esm.js +0 -87
- package/eds-navigator.entry.esm.js +0 -72
- package/eds-pagination_2.entry.esm.js +0 -472
- package/eds-social-networks.entry.esm.js +0 -74
- package/eds-tab.entry.esm.js +0 -41
- package/eds-tabs-content.entry.esm.js +0 -145
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
3
|
-
import { c as cva } from './index-39c58238.esm.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react/jsx-runtime';
|
|
6
|
-
import 'react-dom';
|
|
7
|
-
|
|
8
|
-
const EdsTabsContent = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
this.tabContentChange = createEvent(this, "tabContentChange", 7);
|
|
12
|
-
// cva configuration
|
|
13
|
-
this.tabCva = cva(['relative px-16 py-12', 'f-ui-03 whitespace-nowrap', 'effect-color', 'focus-visible:text-default hover:text-default', 'border-2', "after:content-[''] after:absolute after:inset-0 after:rounded-t-lg after:border-3 after:border-accent after:opacity-0", 'outline-none focus:outline-none focus-visible:outline-none focus-visible:after:opacity-100'], {
|
|
14
|
-
variants: {
|
|
15
|
-
position: {
|
|
16
|
-
left: 'rounded-tl-lg border-r-0 pr-28 -mr-16 after:right-16',
|
|
17
|
-
right: 'rounded-tr-lg border-l-0 pl-28 -ml-16 after:left-16',
|
|
18
|
-
center: '',
|
|
19
|
-
first: 'rounded-t-lg'
|
|
20
|
-
},
|
|
21
|
-
active: {
|
|
22
|
-
false: 'text-lighter bg-dark hover:bg-darker border-softest',
|
|
23
|
-
true: ['bg-default text-default z-99', 'rounded-t-lg', "before:content-[''] before:absolute before:-bottom-2 z-1 before:inset-x-0 before:h-3 before:bg-default", 'border-[#d2d2d2]']
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
this.navAriaLabel = 'Tabs';
|
|
28
|
-
this.tabs = undefined;
|
|
29
|
-
this.parsedTabs = [];
|
|
30
|
-
this.activeIndex = -1;
|
|
31
|
-
}
|
|
32
|
-
componentWillLoad() {
|
|
33
|
-
this.parseTabs();
|
|
34
|
-
this.setActiveIndex();
|
|
35
|
-
}
|
|
36
|
-
parseTabs() {
|
|
37
|
-
try {
|
|
38
|
-
this.parsedTabs = JSON.parse(this.tabs);
|
|
39
|
-
} catch (error) {
|
|
40
|
-
//console.error('Invalid JSON format for tabs:', error);
|
|
41
|
-
this.parsedTabs = [];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
componentDidLoad() {
|
|
45
|
-
this.initializeTabContentVisibility();
|
|
46
|
-
this.el.addEventListener('tabContentChange', e => {
|
|
47
|
-
this.updateTabContentVisibility(e.detail.index);
|
|
48
|
-
});
|
|
49
|
-
this.scrollToActiveTab();
|
|
50
|
-
}
|
|
51
|
-
initializeTabContentVisibility() {
|
|
52
|
-
const allContent = this.el.querySelectorAll('.tab-content');
|
|
53
|
-
allContent.forEach((content, index) => {
|
|
54
|
-
content.setAttribute('style', `display: ${index === this.activeIndex ? 'block' : 'none'}`);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
updateTabContentVisibility(index) {
|
|
58
|
-
const allContent = this.el.querySelectorAll('.tab-content');
|
|
59
|
-
allContent.forEach((content, contentIndex) => {
|
|
60
|
-
content.setAttribute('style', `display: ${contentIndex === index ? 'block' : 'none'}`);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
setActiveIndex() {
|
|
64
|
-
this.activeIndex = this.parsedTabs.findIndex(tab => tab.active);
|
|
65
|
-
}
|
|
66
|
-
scrollToActiveTab() {
|
|
67
|
-
var _a;
|
|
68
|
-
const activeTab = (_a = this.tabContainer) === null || _a === void 0 ? void 0 : _a.querySelector('[data-tab-active]');
|
|
69
|
-
if (activeTab) {
|
|
70
|
-
setTimeout(() => {
|
|
71
|
-
activeTab.scrollIntoView({
|
|
72
|
-
inline: 'center',
|
|
73
|
-
block: 'nearest'
|
|
74
|
-
});
|
|
75
|
-
}, 316);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
getTabOptions(active, index) {
|
|
79
|
-
const position = active ? 'center' : this.activeIndex === -1 && index === 0 ? 'first' : index < this.activeIndex ? 'left' : 'right';
|
|
80
|
-
return Object.assign({
|
|
81
|
-
class: this.tabCva({
|
|
82
|
-
active,
|
|
83
|
-
position
|
|
84
|
-
}),
|
|
85
|
-
style: {
|
|
86
|
-
zIndex: `${active ? this.parsedTabs.length + 99 : position === 'left' ? index : this.parsedTabs.length + 1 - index}`
|
|
87
|
-
}
|
|
88
|
-
}, active ? {
|
|
89
|
-
'data-tab-active': 'true'
|
|
90
|
-
} : {});
|
|
91
|
-
}
|
|
92
|
-
handleTabClick(index, tabLabel) {
|
|
93
|
-
// Update the active index and set all tabs' active state accordingly
|
|
94
|
-
this.activeIndex = index;
|
|
95
|
-
this.parsedTabs = this.parsedTabs.map((tab, tabIndex) => Object.assign(Object.assign({}, tab), {
|
|
96
|
-
active: tabIndex === index
|
|
97
|
-
}));
|
|
98
|
-
this.tabContentChange.emit({
|
|
99
|
-
index: index,
|
|
100
|
-
name: tabLabel
|
|
101
|
-
});
|
|
102
|
-
sendAnalytics({
|
|
103
|
-
category: 'ui-component',
|
|
104
|
-
tag: this.el.tagName.toLowerCase(),
|
|
105
|
-
name: (tabLabel === null || tabLabel === void 0 ? void 0 : tabLabel.toLowerCase()) || '',
|
|
106
|
-
action: 'click'
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
render() {
|
|
110
|
-
return h("div", {
|
|
111
|
-
key: 'd94df79c55522088de5445587758a5eea028b313',
|
|
112
|
-
class: "after:border-softest before:bg-gradient-y relative overflow-x-hidden before:absolute before:inset-x-0 before:bottom-0 before:h-12 before:opacity-5 before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:border-b-2 after:content-['']"
|
|
113
|
-
}, h("div", {
|
|
114
|
-
key: 'e7d01a2e6b424c25749c0d70305fb1c8c55bef74',
|
|
115
|
-
class: "scroller-x max-w-xxxl xxxl:px-0 relative z-[1] mx-auto px-16 pt-8 lg:px-28"
|
|
116
|
-
}, h("nav", {
|
|
117
|
-
key: 'ef8ff8a02e570dfcf8143997ace793a65917e6ca',
|
|
118
|
-
ref: el => this.tabContainer = el,
|
|
119
|
-
class: "inline-flex",
|
|
120
|
-
"aria-label": this.navAriaLabel
|
|
121
|
-
}, this.parsedTabs.map((tab, index) => {
|
|
122
|
-
//const TabComponent = tab.active ? 'span' : 'a';
|
|
123
|
-
const tabProps = this.getTabOptions(tab.active, index);
|
|
124
|
-
return h("eds-tab", Object.assign({}, tabProps, {
|
|
125
|
-
label: tab.label,
|
|
126
|
-
url: tab.url,
|
|
127
|
-
active: index === this.activeIndex,
|
|
128
|
-
ariaLabel: tab.ariaLabel,
|
|
129
|
-
onClick: () => this.handleTabClick(index, tab.label)
|
|
130
|
-
}));
|
|
131
|
-
})), h("slot", {
|
|
132
|
-
key: '8f014081c3bc2a8a3013aea3aff32690d6f71c85'
|
|
133
|
-
})));
|
|
134
|
-
}
|
|
135
|
-
get el() {
|
|
136
|
-
return getElement(this);
|
|
137
|
-
}
|
|
138
|
-
static get watchers() {
|
|
139
|
-
return {
|
|
140
|
-
"tabs": ["parseTabs"]
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export { EdsTabsContent as eds_tabs_content };
|