@ebrains/react 0.5.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/{analytics-1cde8e4a.esm.js → analytics-44b1416b.esm.js} +9 -1
- 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-alert.entry.esm.js +104 -0
- package/eds-app-root.entry.esm.js +53 -0
- package/eds-avatar_4.entry.esm.js +2 -10
- package/eds-breadcrumb.entry.esm.js +171 -0
- package/eds-card-generic.entry.esm.js +7 -17
- package/eds-card-project.entry.esm.js +1 -1
- package/eds-card-section.entry.esm.js +8 -22
- package/eds-card-tool.entry.esm.js +1 -1
- package/eds-components-section.entry.esm.js +1 -1
- package/eds-cookies-preference.entry.esm.js +47 -0
- 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} +20 -99
- package/eds-feedback.entry.esm.js +82 -0
- package/eds-form.entry.esm.js +254 -254
- 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 +23 -10
- package/eds-progress-bar.entry.esm.js +2 -2
- package/eds-rating.entry.esm.js +79 -0
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-spinner.entry.esm.js +67 -0
- package/eds-steps.entry.esm.js +89 -0
- package/eds-svg-repository.entry.esm.js +8 -2
- package/eds-switch.entry.esm.js +58 -0
- package/eds-tabs.entry.esm.js +15 -27
- 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 +4 -4
- 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 +51 -27
- 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.entry.esm.js +0 -126
- package/eds-alert_17.entry.esm.js +0 -187
- package/eds-input_7.entry.esm.js +0 -529
- package/eds-login.entry.esm.js +0 -97
- package/eds-matomo-notice.entry.esm.js +0 -128
- package/eds-navigator.entry.esm.js +0 -72
- package/eds-pagination_2.entry.esm.js +0 -472
- package/eds-tab.entry.esm.js +0 -41
- package/eds-tabs-content.entry.esm.js +0 -145
|
@@ -1,126 +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-1cde8e4a.esm.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
|
-
import 'react-dom';
|
|
6
|
-
|
|
7
|
-
const edsAccordionCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.min-h-36{min-height:2.25rem}.min-h-44{min-height:2.75rem}.min-h-56{min-height:3.5rem}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.effect-color{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.relative{position:relative}.absolute{position:absolute}.inset-x-16{left:1rem;right:1rem}.top-16{top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-md{border-radius:12px}.outline-none{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.text-light{color:var(--grey-700)}.z-1{z-index:1}.z-10{z-index:10}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.h-0{height:0rem}.h-auto{height:auto}.pt-20{padding-top:1.25rem}.overflow-hidden{overflow:hidden}.grid{display:grid}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-16{padding:1rem}.ml-auto{margin-left:auto}.mr-auto{margin-right:auto}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.f-heading-06{font-family:var(--f-heading-06-fontFamily);font-weight:var(--f-heading-06-fontWeight);font-size:var(--f-heading-06-fontSize);line-height:var(--f-heading-06-lineHeight);letter-spacing:var(--f-heading-06-letterSpacing)}.text-left{text-align:left}.text-center{text-align:center}";
|
|
8
|
-
const EdsAccordionStyle0 = edsAccordionCss;
|
|
9
|
-
const EdsAccordion = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
this.accordionChange = createEvent(this, "accordionChange", 7);
|
|
13
|
-
/**
|
|
14
|
-
* Handles the click event on the accordion header to toggle expansion.
|
|
15
|
-
* Toggles the `isExpanded` state and emits the `accordionChange` event.
|
|
16
|
-
*/
|
|
17
|
-
this.handleClick = () => {
|
|
18
|
-
var _a;
|
|
19
|
-
this.isExpanded = !this.isExpanded;
|
|
20
|
-
this.accordionChange.emit(this.isExpanded);
|
|
21
|
-
this.setPanelHeight();
|
|
22
|
-
sendAnalytics({
|
|
23
|
-
category: 'ui-component',
|
|
24
|
-
parentContext: null,
|
|
25
|
-
tag: this.el.tagName.toLowerCase(),
|
|
26
|
-
name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
27
|
-
action: this.isExpanded ? 'expanded' : 'collapsed'
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Calculates and sets the panel height based on the content height
|
|
32
|
-
* and adjusts based on the `shortContent` and `isExpanded` states.
|
|
33
|
-
*/
|
|
34
|
-
this.setPanelHeight = () => {
|
|
35
|
-
if (this.childContentRef) {
|
|
36
|
-
this.shortContent = this.wrapperRef.scrollWidth > 830 && !this.description ? this.childContentRef.scrollHeight <= 80 : this.childContentRef.scrollHeight <= 20;
|
|
37
|
-
this.panelHeight = this.isExpanded && !this.shortContent ? this.childContentRef.scrollHeight : 0;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
this.title = undefined;
|
|
41
|
-
this.description = undefined;
|
|
42
|
-
this.switchBg = true;
|
|
43
|
-
this.expanded = false;
|
|
44
|
-
this.clampText = true;
|
|
45
|
-
this.minHeightContent = false;
|
|
46
|
-
this.isExpanded = this.expanded;
|
|
47
|
-
this.panelHeight = 0;
|
|
48
|
-
this.shortContent = false;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
52
|
-
* to recalculate height on window resize.
|
|
53
|
-
*/
|
|
54
|
-
componentDidLoad() {
|
|
55
|
-
this.setPanelHeight();
|
|
56
|
-
window.addEventListener('resize', this.setPanelHeight);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Lifecycle method that cleans up the resize event listener when the component is removed.
|
|
60
|
-
*/
|
|
61
|
-
disconnectedCallback() {
|
|
62
|
-
window.removeEventListener('resize', this.setPanelHeight);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Renders the accordion structure, including header, content, description, and any slotted content.
|
|
66
|
-
* Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
|
|
67
|
-
*/
|
|
68
|
-
render() {
|
|
69
|
-
const minHeightContentClass = this.minHeightContent ? 'min-h-56' : '';
|
|
70
|
-
return h("div", {
|
|
71
|
-
key: '00bd9a34ceb469bef74c827bd1f48bf3d4b545b6',
|
|
72
|
-
ref: el => this.wrapperRef = el,
|
|
73
|
-
class: `container flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
|
|
74
|
-
${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
|
|
75
|
-
${this.switchBg ? 'hover:bg-inverse' : ''}
|
|
76
|
-
${minHeightContentClass}`
|
|
77
|
-
}, h("h3", {
|
|
78
|
-
key: 'ab6a953797e0a8379a01a9a2f00a4988d4fc8357',
|
|
79
|
-
class: "mr-auto f-heading-06 text-left absolute inset-x-16 top-16 line-clamp-1"
|
|
80
|
-
}, this.title), h("div", {
|
|
81
|
-
key: 'cfd6f4ad2ec5e412cdf2348d188dfcf90770012d',
|
|
82
|
-
class: "ml-auto"
|
|
83
|
-
}, h("eds-button", {
|
|
84
|
-
key: 'beaee69d610727b397645fc0a507b234003fde5e',
|
|
85
|
-
id: "toggleAccordion",
|
|
86
|
-
intent: "tertiary",
|
|
87
|
-
"aria-expanded": this.isExpanded || this.shortContent,
|
|
88
|
-
"aria-label": "Toggle accordion",
|
|
89
|
-
"aria-controls": "accordionSection",
|
|
90
|
-
class: `effect-color flex w-full items-center justify-between rounded-md outline-none focus:outline-none`,
|
|
91
|
-
onClick: this.handleClick,
|
|
92
|
-
icon: "chevron-down"
|
|
93
|
-
})), h("div", {
|
|
94
|
-
key: '795f14c0930a0b0862a86451cc7b7e807cb79c37',
|
|
95
|
-
class: `w-full`
|
|
96
|
-
}, this.description ? h("span", {
|
|
97
|
-
class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}`
|
|
98
|
-
}, this.description) : null, h("section", {
|
|
99
|
-
key: '28f6cba233cdee58743faaacc992bf7497c2ff2e',
|
|
100
|
-
id: "accordionSection",
|
|
101
|
-
role: "region",
|
|
102
|
-
"aria-labelledby": "accordionHeader",
|
|
103
|
-
"aria-hidden": !this.isExpanded,
|
|
104
|
-
class: `z-1 effect-height relative h-0 w-full ${!this.isExpanded && this.clampText ? 'overflow-hidden' : ''}`,
|
|
105
|
-
style: {
|
|
106
|
-
height: this.isExpanded ? 'auto' : '0'
|
|
107
|
-
}
|
|
108
|
-
}, h("div", {
|
|
109
|
-
key: '939e442c55babfd3f1750d20d9b95f664c3a67c8',
|
|
110
|
-
ref: el => this.childContentRef = el,
|
|
111
|
-
class: `accordion-content effect-color pt-20`,
|
|
112
|
-
"aria-hidden": !this.isExpanded
|
|
113
|
-
}, h("span", {
|
|
114
|
-
key: '648d16ed84cb3da227a10e6370004c6479789aed',
|
|
115
|
-
class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}`
|
|
116
|
-
}, h("slot", {
|
|
117
|
-
key: '90ca94f15e408b4b05c0eac4bd20fa21766cbb19'
|
|
118
|
-
}))))));
|
|
119
|
-
}
|
|
120
|
-
get el() {
|
|
121
|
-
return getElement(this);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
EdsAccordion.style = EdsAccordionStyle0;
|
|
125
|
-
|
|
126
|
-
export { EdsAccordion as eds_accordion };
|