@ebrains/react 0.3.0-alpha.0 → 0.5.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 +47 -0
- package/color-2554aad6.esm.js +122 -0
- package/color-primary-palette_6.entry.esm.js +106 -106
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/eds-accordion.entry.esm.js +24 -30
- package/eds-alert_17.entry.esm.js +187 -0
- package/{eds-card-desc_3.entry.esm.js → eds-avatar_4.entry.esm.js} +71 -7
- package/eds-card-generic.entry.esm.js +6 -7
- package/eds-card-project.entry.esm.js +12 -11
- package/eds-card-section.entry.esm.js +4 -4
- package/eds-card-tags.entry.esm.js +1 -1
- package/eds-card-tool.entry.esm.js +5 -6
- package/eds-card-wrapper.entry.esm.js +4 -4
- package/eds-code-block.entry.esm.js +56 -9
- package/eds-components-section.entry.esm.js +14 -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 +235 -0
- package/eds-form.entry.esm.js +59 -23
- package/eds-frame.entry.esm.js +4 -4
- 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-success.entry.esm.js +1 -1
- 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/eds-input_7.entry.esm.js +39 -28
- package/eds-login.entry.esm.js +66 -45
- package/eds-logo-variations.entry.esm.js +1 -1
- package/eds-matomo-notice.entry.esm.js +1 -2
- package/eds-modal.entry.esm.js +57 -42
- package/eds-navigator.entry.esm.js +5 -5
- package/eds-pagination_2.entry.esm.js +35 -19
- package/eds-progress-bar.entry.esm.js +7 -2
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-svg-repository.entry.esm.js +1 -1
- package/eds-tab.entry.esm.js +1 -1
- package/eds-tabs-content.entry.esm.js +5 -5
- package/eds-tabs.entry.esm.js +4 -4
- package/eds-timeline.entry.esm.js +6 -5
- package/eds-tooltip.entry.esm.js +12 -3
- package/eds-trl.entry.esm.js +9 -10
- package/eds-user.entry.esm.js +118 -0
- package/eds-vertical-stepper.entry.esm.js +81 -0
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm.js +1 -1
- package/index.esm2.js +18 -13
- package/{keycloak-13893af6.esm.js → keycloak-d502ec16.esm.js} +219 -168
- 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/src/components.d.ts +3 -1
- 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/color-0ba8ed56.esm.js +0 -423
- package/eds-alert.entry.esm.js +0 -102
- package/eds-avatar_17.entry.esm.js +0 -209
- package/eds-rating.entry.esm.js +0 -71
package/eds-rating.entry.esm.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'react-dom';
|
|
5
|
-
|
|
6
|
-
const edsRatingCss = ":host{display:inline-block;font-size:2rem}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--green-500);}.star:hover,.star.filled:hover{transform:scale(1.2)}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-ui-04{font-family:var(--f-ui-04-fontFamily);font-weight:var(--f-ui-04-fontWeight);font-size:var(--f-ui-04-fontSize);line-height:var(--f-ui-04-lineHeight);letter-spacing:var(--f-ui-04-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}";
|
|
7
|
-
const EdsRatingStyle0 = edsRatingCss;
|
|
8
|
-
const EdsRating = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
this.ratingChange = createEvent(this, "ratingChange", 7);
|
|
12
|
-
this.stars = 5;
|
|
13
|
-
this.label = 'Rate your experience';
|
|
14
|
-
this.textMapping = ['Very Poor', 'Poor', 'Average', 'Good', 'Excellent'];
|
|
15
|
-
this.selectedRating = 0;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Parses the `links` prop into an array of link objects.
|
|
19
|
-
* Returns an empty array if parsing fails or if `links` is not a valid JSON string or object.
|
|
20
|
-
*
|
|
21
|
-
* @returns {any[]} Array of parsed link objects
|
|
22
|
-
*/
|
|
23
|
-
get parsedMappings() {
|
|
24
|
-
if (typeof this.textMapping === 'object') {
|
|
25
|
-
return this.textMapping;
|
|
26
|
-
} else if (typeof this.textMapping === 'string') {
|
|
27
|
-
try {
|
|
28
|
-
return JSON.parse(this.textMapping);
|
|
29
|
-
} catch (e) {
|
|
30
|
-
// eslint-disable-next-line
|
|
31
|
-
console.error('Error parsing links prop:', e);
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return [];
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Handles the click event on a star.
|
|
39
|
-
* @param rating - The selected rating value.
|
|
40
|
-
*/
|
|
41
|
-
handleClick(rating) {
|
|
42
|
-
this.selectedRating = rating;
|
|
43
|
-
this.ratingChange.emit(rating);
|
|
44
|
-
}
|
|
45
|
-
render() {
|
|
46
|
-
return h("div", {
|
|
47
|
-
key: '4ca6d5e0fb35d8ebce1acd5c1a7c6c857ba4f463',
|
|
48
|
-
class: "relative w-full flex flex-col"
|
|
49
|
-
}, h("span", {
|
|
50
|
-
key: '784b77f84098b8d88cd3872004b0208a4437c51b',
|
|
51
|
-
class: "f-body-01"
|
|
52
|
-
}, this.label), h("div", {
|
|
53
|
-
key: '6780db58d3c96046a99d383518cfe1db1e3f1c68',
|
|
54
|
-
class: "stars"
|
|
55
|
-
}, Array.from({
|
|
56
|
-
length: this.stars
|
|
57
|
-
}, (_, index) => h("span", {
|
|
58
|
-
class: {
|
|
59
|
-
star: true,
|
|
60
|
-
filled: index < this.selectedRating
|
|
61
|
-
},
|
|
62
|
-
onClick: () => this.handleClick(index + 1)
|
|
63
|
-
}, "\u2605"))), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && h("span", {
|
|
64
|
-
key: 'ce0eec3c29cf27bff86e3307a29a2c39c2167087',
|
|
65
|
-
class: "f-ui-04 text-lighter"
|
|
66
|
-
}, this.parsedMappings[this.selectedRating - 1]));
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
EdsRating.style = EdsRatingStyle0;
|
|
70
|
-
|
|
71
|
-
export { EdsRating as eds_rating };
|