@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.
Files changed (90) hide show
  1. package/color-primary-palette_6.entry.esm.js +106 -106
  2. package/correct-use-of-colors.entry.esm.js +33 -33
  3. package/eds-accordion_22.entry.esm.js +269 -0
  4. package/eds-app-root.entry.esm.js +53 -0
  5. package/eds-avatar_4.entry.esm.js +185 -0
  6. package/eds-breadcrumb.entry.esm.js +4 -15
  7. package/eds-card-generic.entry.esm.js +114 -0
  8. package/eds-card-section.entry.esm.js +56 -0
  9. package/eds-components-section.entry.esm.js +1 -1
  10. package/eds-cookies-preference.entry.esm.js +2 -2
  11. package/eds-docs-palettes.entry.esm.js +1 -1
  12. package/eds-docs-tokens.entry.esm.js +1 -1
  13. package/{eds-dropdown_2.entry.esm.js → eds-dropdown.entry.esm.js} +19 -98
  14. package/eds-feedback.entry.esm.js +82 -0
  15. package/eds-form.entry.esm.js +253 -253
  16. package/eds-frame.entry.esm.js +34 -33
  17. package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
  18. package/eds-icon-arrow-right.entry.esm.js +1 -1
  19. package/eds-icon-bluesky.entry.esm.js +1 -1
  20. package/eds-icon-chevron-down.entry.esm.js +1 -1
  21. package/eds-icon-chevron-left.entry.esm.js +1 -1
  22. package/eds-icon-chevron-right.entry.esm.js +1 -1
  23. package/eds-icon-chevron-up.entry.esm.js +1 -1
  24. package/eds-icon-close.entry.esm.js +1 -1
  25. package/eds-icon-copy.entry.esm.js +1 -1
  26. package/eds-icon-eu.entry.esm.js +1 -1
  27. package/eds-icon-facebook.entry.esm.js +1 -1
  28. package/eds-icon-gitlab.entry.esm.js +1 -1
  29. package/eds-icon-linkedin.entry.esm.js +1 -1
  30. package/eds-icon-loader.entry.esm.js +1 -1
  31. package/eds-icon-mastodon.entry.esm.js +1 -1
  32. package/eds-icon-menu.entry.esm.js +1 -1
  33. package/eds-icon-more.entry.esm.js +1 -1
  34. package/eds-icon-search.entry.esm.js +1 -1
  35. package/eds-icon-star.entry.esm.js +21 -0
  36. package/eds-icon-success.entry.esm.js +1 -1
  37. package/eds-icon-thumbs-down.entry.esm.js +21 -0
  38. package/eds-icon-thumbs-up.entry.esm.js +21 -0
  39. package/eds-icon-twitter.entry.esm.js +1 -1
  40. package/eds-icon-user.entry.esm.js +1 -1
  41. package/eds-icon-youtube.entry.esm.js +1 -1
  42. package/{keycloak-d502ec16.esm.js → eds-login_2.entry.esm.js} +172 -1
  43. package/eds-logo-variations.entry.esm.js +1 -1
  44. package/eds-modal.entry.esm.js +22 -9
  45. package/eds-progress-bar.entry.esm.js +2 -2
  46. package/eds-rating.entry.esm.js +37 -37
  47. package/eds-section-core_2.entry.esm.js +5 -5
  48. package/eds-spinner.entry.esm.js +67 -0
  49. package/eds-steps.entry.esm.js +8 -17
  50. package/eds-svg-repository.entry.esm.js +8 -2
  51. package/eds-switch.entry.esm.js +5 -5
  52. package/eds-tabs.entry.esm.js +14 -26
  53. package/eds-timeline.entry.esm.js +6 -23
  54. package/eds-toast-manager.entry.esm.js +62 -0
  55. package/eds-toast.entry.esm.js +92 -0
  56. package/eds-tooltip.entry.esm.js +3 -3
  57. package/eds-trl.entry.esm.js +2 -2
  58. package/eds-user.entry.esm.js +64 -87
  59. package/eds-vertical-stepper.entry.esm.js +5 -5
  60. package/formUtils-ac68474d.esm.js +247 -0
  61. package/incorrect-use-of-colors.entry.esm.js +7 -7
  62. package/index.esm.js +1 -1
  63. package/index.esm2.js +46 -46
  64. package/logo-space.entry.esm.js +4 -4
  65. package/logo-variations-horizontal_2.entry.esm.js +26 -26
  66. package/logo-wrong-usage.entry.esm.js +37 -37
  67. package/package.json +1 -1
  68. package/sharedUtils-a550989c.esm.js +17 -0
  69. package/src/components.d.ts +4 -1
  70. package/star-0da9b5e9.esm.js +5 -0
  71. package/thumbs-down-a18fd049.esm.js +5 -0
  72. package/thumbs-up-c19a71bc.esm.js +6 -0
  73. package/token-list_3.entry.esm.js +5 -5
  74. package/token-ratios.entry.esm.js +3 -3
  75. package/token-spacing.entry.esm.js +26 -26
  76. package/token-typography.entry.esm.js +2 -2
  77. package/eds-accordion_13.entry.esm.js +0 -1064
  78. package/eds-block-break.entry.esm.js +0 -22
  79. package/eds-footer.entry.esm.js +0 -102
  80. package/eds-fullscreen-menu.entry.esm.js +0 -143
  81. package/eds-header.entry.esm.js +0 -130
  82. package/eds-input_7.entry.esm.js +0 -529
  83. package/eds-link.entry.esm.js +0 -204
  84. package/eds-login.entry.esm.js +0 -97
  85. package/eds-logo.entry.esm.js +0 -87
  86. package/eds-navigator.entry.esm.js +0 -72
  87. package/eds-pagination_2.entry.esm.js +0 -472
  88. package/eds-social-networks.entry.esm.js +0 -74
  89. package/eds-tab.entry.esm.js +0 -41
  90. 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 };