@ebrains/react 0.9.3-beta → 1.1.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/README.md +3 -3
- package/{analytics-44b1416b.esm.js → analytics-d99780e3.esm.js} +2 -2
- package/color-primary-palette_6.entry.esm.js +106 -106
- package/components-section.entry.esm.js +23 -17
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/docs-palettes.entry.esm.js +1 -1
- package/docs-tokens.entry.esm.js +1 -1
- package/eds-accordion.entry.esm.js +11 -11
- package/eds-alert.entry.esm.js +3 -3
- package/eds-app-root.entry.esm.js +4 -4
- package/eds-avatar_28.entry.esm.js +3523 -0
- package/eds-breadcrumb.entry.esm.js +179 -0
- package/eds-card-desc_2.entry.esm.js +6 -7
- package/eds-card-generic.entry.esm.js +4 -4
- package/eds-card-project.entry.esm.js +130 -13
- package/eds-card-tags.entry.esm.js +1 -1
- package/eds-card-tool.entry.esm.js +5 -5
- package/eds-code-block.entry.esm.js +7 -7
- package/eds-cookies-preference.entry.esm.js +2 -2
- package/eds-feedback.entry.esm.js +12 -7
- package/eds-frame.entry.esm.js +6 -6
- package/eds-gauge.entry.esm.js +78 -0
- 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-bookmark.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-external.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-minus.entry.esm.js +1 -1
- package/eds-icon-more.entry.esm.js +1 -1
- package/eds-icon-paper.entry.esm.js +1 -1
- package/eds-icon-plus.entry.esm.js +1 -1
- package/eds-icon-portal.entry.esm.js +1 -1
- package/eds-icon-private.entry.esm.js +1 -1
- package/eds-icon-public.entry.esm.js +1 -1
- package/eds-icon-search.entry.esm.js +1 -1
- package/eds-icon-star.entry.esm.js +1 -1
- package/eds-icon-success.entry.esm.js +1 -1
- package/eds-icon-thumbs-down.entry.esm.js +1 -1
- package/eds-icon-thumbs-up.entry.esm.js +1 -1
- package/eds-icon-tutorial.entry.esm.js +1 -1
- package/eds-icon-twitter.entry.esm.js +1 -1
- package/eds-icon-unknown.entry.esm.js +1 -1
- package/eds-icon-updown.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-matomo-notice.entry.esm.js +5 -8
- package/eds-pie.entry.esm.js +131 -0
- package/eds-progress-bar.entry.esm.js +19 -8
- package/eds-rating.entry.esm.js +1 -1
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-spinner.entry.esm.js +3 -3
- package/eds-splash-screen.entry.esm.js +87 -0
- package/eds-switch.entry.esm.js +21 -11
- package/eds-timeline.entry.esm.js +5 -5
- package/eds-toast-manager.entry.esm.js +33 -2
- package/eds-toast.entry.esm.js +4 -3
- package/eds-tooltip.entry.esm.js +12 -96
- package/eds-trl.entry.esm.js +2 -2
- package/incorrect-use-of-colors.entry.esm.js +11 -8
- package/index.esm.js +1 -1
- package/index.esm2.js +51 -308
- package/logo-space.entry.esm.js +9 -9
- package/logo-variations-horizontal_2.entry.esm.js +28 -28
- package/logo-variations-tabs.entry.esm.js +1 -1
- package/logo-wrong-usage.entry.esm.js +25 -25
- package/package.json +1 -1
- package/src/components.d.ts +2 -2
- package/src/generated/components.d.ts +1 -1
- package/svg-repository.entry.esm.js +2 -2
- package/token-list_3.entry.esm.js +5 -5
- package/token-ratios.entry.esm.js +3 -3
- package/token-spacing.entry.esm.js +93 -0
- package/token-typography.entry.esm.js +2 -2
- package/color-2554aad6.esm.js +0 -122
- package/eds-avatar_27.entry.esm.js +0 -332
- package/eds-card-wrapper.entry.esm.js +0 -39
- package/eds-login_2.entry.esm.js +0 -1828
- package/eds-pagination_2.entry.esm.js +0 -493
- package/eds-tabs.entry.esm.js +0 -143
- package/toastManager-d9eee791.esm.js +0 -34
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { p as parseData } from './sharedUtils-a550989c.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const edsBreadcrumbCss = "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}.hidden{display:none}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.125rem * var(--tw-space-x-reverse));margin-left:calc(0.125rem * calc(1 - var(--tw-space-x-reverse)))}.px-2{padding-left:0.125rem;padding-right:0.125rem}.w-20{width:1.25rem}.w-28{width:1.75rem}.w-32{width:2rem}.w-44{width:2.75rem}.h-20{height:1.25rem}.h-24{height:1.5rem}.h-28{height:1.75rem}.h-32{height:2rem}@media (min-width: 750px){.md\\:block{display:block}}";
|
|
8
|
+
const EdsBreadcrumbStyle0 = edsBreadcrumbCss;
|
|
9
|
+
const EdsBreadcrumb = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Updates the maximum number of visible items and tracks if the screen is small.
|
|
14
|
+
*/
|
|
15
|
+
this.updateScreenSize = () => {
|
|
16
|
+
const width = window.innerWidth;
|
|
17
|
+
if (width < 769) {
|
|
18
|
+
this.maxVisibleItems = 3;
|
|
19
|
+
} else if (width <= 1024) {
|
|
20
|
+
this.maxVisibleItems = 3;
|
|
21
|
+
} else if (width <= 1280) {
|
|
22
|
+
this.maxVisibleItems = 3;
|
|
23
|
+
} else if (width <= 2200) {
|
|
24
|
+
this.maxVisibleItems = 4;
|
|
25
|
+
} else {
|
|
26
|
+
this.maxVisibleItems = 6;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
this.items = [];
|
|
30
|
+
this.intent = 'ghost';
|
|
31
|
+
this.parsedItems = [];
|
|
32
|
+
this.isSmallScreen = false;
|
|
33
|
+
this.maxVisibleItems = 6;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Watches for changes to the `items` prop and parses it.
|
|
37
|
+
*/
|
|
38
|
+
parseItems(newValue) {
|
|
39
|
+
this.parsedItems = parseData(newValue);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Lifecycle method that runs when the component is about to be loaded.
|
|
43
|
+
* It parses the initial `items` prop value.
|
|
44
|
+
*/
|
|
45
|
+
componentWillLoad() {
|
|
46
|
+
this.parseItems(this.items);
|
|
47
|
+
this.updateScreenSize();
|
|
48
|
+
window.addEventListener('resize', this.updateScreenSize);
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
window.removeEventListener('resize', this.updateScreenSize);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Lifecycle method that runs when the component has fully loaded.
|
|
55
|
+
* It emits a custom event for each `eds-link` element contained within the breadcrumb.
|
|
56
|
+
*/
|
|
57
|
+
componentDidLoad() {
|
|
58
|
+
var _a;
|
|
59
|
+
const links = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('eds-link');
|
|
60
|
+
links === null || links === void 0 ? void 0 : links.forEach(link => {
|
|
61
|
+
this.emitContext(link);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Emits a custom event called `parentContext` for a given link element.
|
|
66
|
+
* This event provides context information about the breadcrumb component.
|
|
67
|
+
*
|
|
68
|
+
* @param linkElement - The link element to which the event will be dispatched.
|
|
69
|
+
*/
|
|
70
|
+
emitContext(linkElement) {
|
|
71
|
+
const event = new CustomEvent('parentContext', {
|
|
72
|
+
detail: {
|
|
73
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
74
|
+
identifier: null
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
linkElement.dispatchEvent(event);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Returns breadcrumb items with potential truncation if there are too many.
|
|
81
|
+
* It inserts an ellipsis item where necessary.
|
|
82
|
+
*/
|
|
83
|
+
getTruncatedItems() {
|
|
84
|
+
const totalItems = this.parsedItems.length;
|
|
85
|
+
const ellipsis = {
|
|
86
|
+
label: '...',
|
|
87
|
+
url: '',
|
|
88
|
+
isHidden: true
|
|
89
|
+
};
|
|
90
|
+
if (totalItems > this.maxVisibleItems) {
|
|
91
|
+
const firstItem = this.parsedItems[0];
|
|
92
|
+
const lastItems = this.parsedItems.slice(-2);
|
|
93
|
+
if (this.maxVisibleItems === 3) {
|
|
94
|
+
return [firstItem, ellipsis, ...lastItems];
|
|
95
|
+
} else if (this.maxVisibleItems === 4) {
|
|
96
|
+
const middleItem = this.parsedItems[Math.floor(totalItems / 2)];
|
|
97
|
+
return [firstItem, middleItem, ellipsis, ...lastItems];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return this.parsedItems;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Helper to determine the display label and full label.
|
|
104
|
+
* If the label is longer than 15 characters and the item is not the current (last) item,
|
|
105
|
+
* we display a truncated version but use the full label for aria attributes.
|
|
106
|
+
*/
|
|
107
|
+
getLabels(item, isCurrent) {
|
|
108
|
+
if (!isCurrent && item.label.length > 15) {
|
|
109
|
+
return {
|
|
110
|
+
displayLabel: `${item.label.slice(0, 15)}...`,
|
|
111
|
+
fullLabel: item.label
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
displayLabel: item.label,
|
|
116
|
+
fullLabel: item.label
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Render method for the breadcrumb component.
|
|
121
|
+
* It creates a navigation element with an ordered list of breadcrumb links.
|
|
122
|
+
* The last link is marked as the current page.
|
|
123
|
+
*/
|
|
124
|
+
render() {
|
|
125
|
+
const itemsToRender = this.getTruncatedItems();
|
|
126
|
+
return h("nav", {
|
|
127
|
+
key: 'db769320b42e627fffd71676c1e0551646f1de70',
|
|
128
|
+
"aria-label": "Breadcrumb"
|
|
129
|
+
}, h("ol", {
|
|
130
|
+
key: '6cef8ed43cabcee73cb4ad4fb26f809d0690c0ec',
|
|
131
|
+
class: "flex items-center space-x-2"
|
|
132
|
+
}, itemsToRender.map((item, index) => {
|
|
133
|
+
const isLast = index === itemsToRender.length - 1;
|
|
134
|
+
return h("li", {
|
|
135
|
+
class: "flex items-center"
|
|
136
|
+
}, !item.isHidden ? (() => {
|
|
137
|
+
const {
|
|
138
|
+
fullLabel
|
|
139
|
+
} = this.getLabels(item, isLast);
|
|
140
|
+
const linkIntent = isLast ? this.intent === 'strong' ? 'weak' : this.intent === 'weak' ? 'strong' : this.intent : this.intent;
|
|
141
|
+
return h("eds-link", Object.assign({
|
|
142
|
+
label: fullLabel,
|
|
143
|
+
url: item.url,
|
|
144
|
+
intent: linkIntent,
|
|
145
|
+
disabled: isLast,
|
|
146
|
+
current: isLast,
|
|
147
|
+
"aria-label": fullLabel,
|
|
148
|
+
size: "small",
|
|
149
|
+
"icon-small": "false"
|
|
150
|
+
}, isLast ? {
|
|
151
|
+
'aria-current': 'page'
|
|
152
|
+
} : {}));
|
|
153
|
+
})() : h("eds-link", {
|
|
154
|
+
label: "...",
|
|
155
|
+
url: "#",
|
|
156
|
+
intent: "strong",
|
|
157
|
+
current: false,
|
|
158
|
+
"aria-label": "...",
|
|
159
|
+
size: "small",
|
|
160
|
+
"icon-small": "false",
|
|
161
|
+
icon: "chevron-right"
|
|
162
|
+
}), !isLast && !item.isHidden && h("eds-icon-wrapper", {
|
|
163
|
+
icon: "chevron-right",
|
|
164
|
+
class: "w-20 h-20"
|
|
165
|
+
}));
|
|
166
|
+
})));
|
|
167
|
+
}
|
|
168
|
+
get el() {
|
|
169
|
+
return getElement(this);
|
|
170
|
+
}
|
|
171
|
+
static get watchers() {
|
|
172
|
+
return {
|
|
173
|
+
"items": ["parseItems"]
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
EdsBreadcrumb.style = EdsBreadcrumbStyle0;
|
|
178
|
+
|
|
179
|
+
export { EdsBreadcrumb as eds_breadcrumb };
|
|
@@ -3,13 +3,12 @@ import 'react';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
|
|
6
|
-
const edsCardDescCss = ".f-ui-
|
|
6
|
+
const edsCardDescCss = ".f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.text-light{color:var(--grey-700)}.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}";
|
|
7
7
|
const EdsCardDescStyle0 = edsCardDescCss;
|
|
8
8
|
const EdsCardDesc = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
11
|
this.description = undefined;
|
|
12
|
-
this.descClass = 'f-ui-03-light';
|
|
13
12
|
this.truncate = true;
|
|
14
13
|
this.truncateLines = '3';
|
|
15
14
|
}
|
|
@@ -18,10 +17,10 @@ const EdsCardDesc = class {
|
|
|
18
17
|
}
|
|
19
18
|
render() {
|
|
20
19
|
return h("p", {
|
|
21
|
-
key: '
|
|
22
|
-
class:
|
|
20
|
+
key: '2421ea469339e3d56fc5c0ebbec213eeb1a2a9cf',
|
|
21
|
+
class: "text-light f-ui-03-light"
|
|
23
22
|
}, h("span", {
|
|
24
|
-
key: '
|
|
23
|
+
key: 'd024adda16a85bf2913803c06eb05af3b4af6bb9',
|
|
25
24
|
class: this.getTruncateClass()
|
|
26
25
|
}, this.description));
|
|
27
26
|
}
|
|
@@ -70,10 +69,10 @@ const EdsCardTitle = class {
|
|
|
70
69
|
//const Tag = this.getTag();
|
|
71
70
|
const Heading = this.headingLevel;
|
|
72
71
|
return h(Heading, {
|
|
73
|
-
key: '
|
|
72
|
+
key: '494d8b7ea90ccb93cf0395374951e90c89a59d3a',
|
|
74
73
|
class: this.getTitleClass()
|
|
75
74
|
}, h("a", {
|
|
76
|
-
key: '
|
|
75
|
+
key: 'ab739472fd796767cd6e7ab4f4c09bcf24ec200a',
|
|
77
76
|
class: "break-words after:absolute after:inset-0 after:z-10 after:content-[''] focus:outline-none",
|
|
78
77
|
href: this.url,
|
|
79
78
|
target: this.externalLink ? '_blank' : undefined,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
2
|
import { p as parseData } from './sharedUtils-a550989c.esm.js';
|
|
3
|
-
import { s as sendAnalytics } from './analytics-
|
|
3
|
+
import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react-dom';
|
|
7
7
|
|
|
8
|
-
const edsCardGenericCss = ".h-auto{height:auto}.h-full{height:100%}.\\!min-h-20{min-height:1.25rem !important}.min-h-120{min-height:120px}.min-h-156{min-height:156px}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.effect-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.hover\\:shadow-hover:hover{--tw-shadow:0px 0px 16px rgba(0, 0, 0, 0.2);--tw-shadow-colored:0px 0px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.cursor-pointer{cursor:pointer}.border-soft{border-color:rgba(0, 0, 0, .15)}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.effect-focus-within:focus-within{outline-style:solid}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grow{flex-grow:1}.flex-col{flex-direction:column}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-12{padding:0.75rem}.p-16{padding:1rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.gap-x-1{-moz-column-gap:0.0625rem;column-gap:0.0625rem}.gap-y-4{row-gap:0.25rem}.order-first{order:-9999}.mb-10{margin-bottom:0.625rem}.mb-12{margin-bottom:0.75rem}";
|
|
8
|
+
const edsCardGenericCss = ".h-auto{height:auto}.h-full{height:100%}.\\!min-h-20{min-height:1.25rem !important}.min-h-120{min-height:120px}.min-h-156{min-height:156px}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.effect-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.hover\\:shadow-hover:hover{--tw-shadow:0px 0px 16px rgba(0, 0, 0, 0.2);--tw-shadow-colored:0px 0px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.cursor-pointer{cursor:pointer}.border-soft{border-color:rgba(0, 0, 0, .15)}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.effect-focus-within:focus-within{outline-style:solid}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grow{flex-grow:1}.flex-col{flex-direction:column}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-12{padding:0.75rem}.p-16{padding:1rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.gap-x-1{-moz-column-gap:0.0625rem;column-gap:0.0625rem}.gap-y-4{row-gap:0.25rem}.order-first{order:-9999}.mb-10{margin-bottom:0.625rem}.mb-12{margin-bottom:0.75rem}.mx-auto{margin-left:auto;margin-right:auto}.block{display:block}";
|
|
9
9
|
const EdsCardGenericStyle0 = edsCardGenericCss;
|
|
10
10
|
const EdsCardGeneric = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -91,13 +91,13 @@ const EdsCardGeneric = class {
|
|
|
91
91
|
"truncate-lines": "3",
|
|
92
92
|
description: this.description
|
|
93
93
|
}), this.parsedImage ? h("eds-img", Object.assign({
|
|
94
|
-
class: "mt-8"
|
|
94
|
+
class: "mt-8 block mx-auto"
|
|
95
95
|
}, this.parsedImage)) : this.avatar || this.shortAbbreviation ? h("eds-avatar", {
|
|
96
96
|
class: "order-first mb-12",
|
|
97
97
|
picture: this.avatar,
|
|
98
98
|
initials: this.shortAbbreviation
|
|
99
99
|
}) : null, h("div", {
|
|
100
|
-
key: '
|
|
100
|
+
key: '40388913b1abb9308f42469956342efdbb48d508',
|
|
101
101
|
class: "flex flex-wrap gap-y-4 gap-x-1"
|
|
102
102
|
}, this.parsedTags.map((tag, index) => h("eds-tag", {
|
|
103
103
|
key: index,
|
|
@@ -1,11 +1,128 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-
|
|
3
|
-
import {
|
|
2
|
+
import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
|
|
3
|
+
import { c as cva } from './index-39c58238.esm.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react-dom';
|
|
7
|
-
import './index-39c58238.esm.js';
|
|
8
7
|
|
|
8
|
+
const GRADIANT_TOKENS = ['green', 'yellow', 'among-blue', 'purple'];
|
|
9
|
+
const gradientBGColorVariants = cva([], {
|
|
10
|
+
variants: {
|
|
11
|
+
color: GRADIANT_TOKENS.reduce((acc, token) => Object.assign(Object.assign({}, acc), {
|
|
12
|
+
[token]: ''
|
|
13
|
+
}), {}),
|
|
14
|
+
direction: {
|
|
15
|
+
top: '',
|
|
16
|
+
bottom: ''
|
|
17
|
+
},
|
|
18
|
+
pseudo: {
|
|
19
|
+
true: 'before:effect-opacity effect-bg-behind',
|
|
20
|
+
false: ''
|
|
21
|
+
},
|
|
22
|
+
hover: {
|
|
23
|
+
true: 'before:opacity-0 hover:before:opacity-100',
|
|
24
|
+
false: ''
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
compoundVariants: [
|
|
28
|
+
// region GREEN
|
|
29
|
+
{
|
|
30
|
+
color: 'green',
|
|
31
|
+
direction: 'top',
|
|
32
|
+
pseudo: true,
|
|
33
|
+
class: 'before:bg-gradient-01-top'
|
|
34
|
+
}, {
|
|
35
|
+
color: 'green',
|
|
36
|
+
pseudo: true,
|
|
37
|
+
direction: 'bottom',
|
|
38
|
+
class: 'before:bg-gradient-01-bottom'
|
|
39
|
+
}, {
|
|
40
|
+
color: 'green',
|
|
41
|
+
direction: 'top',
|
|
42
|
+
pseudo: false,
|
|
43
|
+
class: 'bg-gradient-01-top'
|
|
44
|
+
}, {
|
|
45
|
+
color: 'green',
|
|
46
|
+
pseudo: false,
|
|
47
|
+
direction: 'bottom',
|
|
48
|
+
class: 'bg-gradient-01-bottom'
|
|
49
|
+
},
|
|
50
|
+
// endregion
|
|
51
|
+
// region YELLOW
|
|
52
|
+
{
|
|
53
|
+
color: 'yellow',
|
|
54
|
+
direction: 'top',
|
|
55
|
+
pseudo: true,
|
|
56
|
+
class: 'before:bg-gradient-02-top'
|
|
57
|
+
}, {
|
|
58
|
+
color: 'yellow',
|
|
59
|
+
direction: 'bottom',
|
|
60
|
+
pseudo: true,
|
|
61
|
+
class: 'before:bg-gradient-02-bottom'
|
|
62
|
+
}, {
|
|
63
|
+
color: 'yellow',
|
|
64
|
+
direction: 'top',
|
|
65
|
+
pseudo: false,
|
|
66
|
+
class: 'bg-gradient-02-top'
|
|
67
|
+
}, {
|
|
68
|
+
color: 'yellow',
|
|
69
|
+
direction: 'bottom',
|
|
70
|
+
pseudo: false,
|
|
71
|
+
class: 'bg-gradient-02-bottom'
|
|
72
|
+
},
|
|
73
|
+
// endregion
|
|
74
|
+
// region PURPLE
|
|
75
|
+
{
|
|
76
|
+
color: 'purple',
|
|
77
|
+
direction: 'top',
|
|
78
|
+
pseudo: true,
|
|
79
|
+
class: 'before:bg-gradient-03-top'
|
|
80
|
+
}, {
|
|
81
|
+
color: 'purple',
|
|
82
|
+
direction: 'bottom',
|
|
83
|
+
pseudo: true,
|
|
84
|
+
class: 'before:bg-gradient-03-bottom'
|
|
85
|
+
}, {
|
|
86
|
+
color: 'purple',
|
|
87
|
+
direction: 'top',
|
|
88
|
+
pseudo: false,
|
|
89
|
+
class: 'bg-gradient-03-top'
|
|
90
|
+
}, {
|
|
91
|
+
color: 'purple',
|
|
92
|
+
direction: 'bottom',
|
|
93
|
+
pseudo: false,
|
|
94
|
+
class: 'bg-gradient-03-bottom'
|
|
95
|
+
},
|
|
96
|
+
// endregion
|
|
97
|
+
// region AMONG-BLUE
|
|
98
|
+
{
|
|
99
|
+
color: 'among-blue',
|
|
100
|
+
direction: 'top',
|
|
101
|
+
pseudo: true,
|
|
102
|
+
class: 'before:bg-gradient-04-top'
|
|
103
|
+
}, {
|
|
104
|
+
color: 'among-blue',
|
|
105
|
+
direction: 'bottom',
|
|
106
|
+
pseudo: true,
|
|
107
|
+
class: 'before:bg-gradient-04-bottom'
|
|
108
|
+
}, {
|
|
109
|
+
color: 'among-blue',
|
|
110
|
+
direction: 'top',
|
|
111
|
+
pseudo: false,
|
|
112
|
+
class: 'bg-gradient-04-top'
|
|
113
|
+
}, {
|
|
114
|
+
color: 'among-blue',
|
|
115
|
+
direction: 'bottom',
|
|
116
|
+
pseudo: false,
|
|
117
|
+
class: 'bg-gradient-04-bottom'
|
|
118
|
+
}
|
|
119
|
+
// endregion
|
|
120
|
+
],
|
|
121
|
+
defaultVariants: {
|
|
122
|
+
direction: 'top',
|
|
123
|
+
pseudo: true
|
|
124
|
+
}
|
|
125
|
+
});
|
|
9
126
|
const EdsCardProject = class {
|
|
10
127
|
constructor(hostRef) {
|
|
11
128
|
registerInstance(this, hostRef);
|
|
@@ -50,38 +167,38 @@ const EdsCardProject = class {
|
|
|
50
167
|
}) : 'bg-default', this.bgOnHover && this.color ? 'effect-background bg-default focus-within:bg-transparent hover:bg-transparent' : 'effect-background hover:bg-default', this.vertical ? 'flex-col gap-y-16' : 'flex-col gap-x-16 gap-y-12 lg:flex-row'].join(' ');
|
|
51
168
|
const imageClasses = this.vertical ? '' : 'max-w-120 @md:max-w-192 order-first w-full lg:order-last';
|
|
52
169
|
return h("article", {
|
|
53
|
-
key: '
|
|
170
|
+
key: '8b4707ad7689824c50db3112b5844e28beb31533',
|
|
54
171
|
class: cardClasses,
|
|
55
172
|
onClick: event => this.handleClick(event)
|
|
56
173
|
}, h("div", {
|
|
57
|
-
key: '
|
|
174
|
+
key: '5cb7673378ab23826202b34034247145b7289bda',
|
|
58
175
|
class: `flex grow flex-col ${this.vertical ? 'min-h-156' : ''}`
|
|
59
176
|
}, h("div", {
|
|
60
|
-
key: '
|
|
177
|
+
key: '8111b523840c8b363bbb422c1f314ce07057ea92',
|
|
61
178
|
class: "lg:max-w-[720px]"
|
|
62
179
|
}, h("eds-card-title", {
|
|
63
|
-
key: '
|
|
180
|
+
key: 'a326e1384873edb9bfc86c33e3abeb95064cc8db',
|
|
64
181
|
"heading-level": this.headingLevel,
|
|
65
182
|
titleClass: this.image ? 'f-ui-01' : undefined,
|
|
66
183
|
"card-title": this.titleProject,
|
|
67
184
|
url: this.url
|
|
68
185
|
}), this.editorialTitle && h("span", {
|
|
69
|
-
key: '
|
|
186
|
+
key: '5e2de62642363533a950f3e923e3f4dfc64c56c1',
|
|
70
187
|
class: `block ${this.vertical ? 'f-ui-02' : 'mt-4 f-heading-06'}`
|
|
71
188
|
}, this.editorialTitle)), this.categoryTitle && h("div", {
|
|
72
|
-
key: '
|
|
189
|
+
key: '424fed86ec4e714dc5f3644d85e5670d8be56d7f',
|
|
73
190
|
class: "mt-auto flex items-center gap-x-12 pt-12"
|
|
74
191
|
}, ((_a = this.categoryTitle) === null || _a === void 0 ? void 0 : _a.length) && h("eds-tag", {
|
|
75
|
-
key: '
|
|
192
|
+
key: 'b6961cc23835a9b3d1abae47e1c4224a29255164',
|
|
76
193
|
label: this.categoryTitle
|
|
77
194
|
}))), this.parsedImage && h("div", {
|
|
78
|
-
key: '
|
|
195
|
+
key: '69564e0c65f6422a6ccc3957a8080e7e494461bb',
|
|
79
196
|
class: imageClasses
|
|
80
197
|
}, h("div", {
|
|
81
|
-
key: '
|
|
198
|
+
key: 'e47a21a5356459936b6f528a3aba50240851fcf2',
|
|
82
199
|
class: "aspect-1x1 w-full"
|
|
83
200
|
}, h("eds-img", Object.assign({
|
|
84
|
-
key: '
|
|
201
|
+
key: 'f64af6387cdef28619aa8a0465d4a50ec3a95007',
|
|
85
202
|
sizes: this.vertical ? this.parsedImage.sizes || '' : '192px'
|
|
86
203
|
}, this.parsedImage)))));
|
|
87
204
|
}
|
|
@@ -13,7 +13,7 @@ const EdsCardTags = class {
|
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
15
|
return h("div", {
|
|
16
|
-
key: '
|
|
16
|
+
key: '5da9fcbc472476a7b438451e563586643a818bc0',
|
|
17
17
|
class: "flex flex-wrap gap-y-4"
|
|
18
18
|
}, this.tags.map((tag, index) => h("eds-tag", {
|
|
19
19
|
key: index,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-
|
|
2
|
+
import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react-dom';
|
|
@@ -62,11 +62,11 @@ const EdsCardTool = class {
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
return h("article", {
|
|
65
|
-
key: '
|
|
65
|
+
key: '465a4593a4d28c5bfcef7325be7674b6301bc275',
|
|
66
66
|
class: `${this.el.tagName.toLowerCase()} ${this.articleClasses()}`,
|
|
67
67
|
onClick: () => this.handleClick()
|
|
68
68
|
}, h("eds-card-title", {
|
|
69
|
-
key: '
|
|
69
|
+
key: '5d6c13f582bd89f03d95aa9027b83d8d4c4184ca',
|
|
70
70
|
"heading-level": this.headingLevel,
|
|
71
71
|
titleClass: this.image ? 'f-ui-01' : undefined,
|
|
72
72
|
"card-title": this.cardTitle,
|
|
@@ -74,7 +74,7 @@ const EdsCardTool = class {
|
|
|
74
74
|
"external-link": this.external,
|
|
75
75
|
hierarchy: this.hierarchy
|
|
76
76
|
}), this.description && h("eds-card-desc", {
|
|
77
|
-
key: '
|
|
77
|
+
key: '4872956b7d97e222abd8e429c73a7e97fe1f7a06',
|
|
78
78
|
class: "mt-8",
|
|
79
79
|
"truncate-lines": "3",
|
|
80
80
|
description: this.description
|
|
@@ -88,7 +88,7 @@ const EdsCardTool = class {
|
|
|
88
88
|
picture: this.avatar,
|
|
89
89
|
initials: this.shortAbbreviation
|
|
90
90
|
}) : null, h("div", {
|
|
91
|
-
key: '
|
|
91
|
+
key: '10c20ab24e836c06ba2da070cbcf21cf11537e17',
|
|
92
92
|
class: "flex flex-wrap gap-y-4"
|
|
93
93
|
}, this.parsedTags.map((tag, index) => h("eds-tag", {
|
|
94
94
|
key: index,
|
|
@@ -2247,10 +2247,10 @@ const EdsCodeBlock = class {
|
|
|
2247
2247
|
}
|
|
2248
2248
|
render() {
|
|
2249
2249
|
return h("div", {
|
|
2250
|
-
key: '
|
|
2250
|
+
key: '7550f1c5e29a9be39614404d51dfec9a7aa194a9',
|
|
2251
2251
|
class: "relative bg-stronger rounded-sm"
|
|
2252
2252
|
}, h("div", {
|
|
2253
|
-
key: '
|
|
2253
|
+
key: '8e654051ec6105e051af723e056b4151afc4305c',
|
|
2254
2254
|
class: "text-inverse flex justify-between items-center p-8"
|
|
2255
2255
|
}, this.language ? h("span", {
|
|
2256
2256
|
class: "f-ui-03"
|
|
@@ -2261,23 +2261,23 @@ const EdsCodeBlock = class {
|
|
|
2261
2261
|
}, h("code", {
|
|
2262
2262
|
innerHTML: this.getHighlightedCode()
|
|
2263
2263
|
})), h("span", {
|
|
2264
|
-
key: '
|
|
2264
|
+
key: '1f558301727adb451524850b352844d7658f33a8',
|
|
2265
2265
|
"aria-hidden": "true",
|
|
2266
2266
|
class: "w-20 h-20 mt-8"
|
|
2267
2267
|
}, h("eds-icon-wrapper", {
|
|
2268
|
-
key: '
|
|
2268
|
+
key: '7def1f38f949c32d6138d88a0a7edf9655852491',
|
|
2269
2269
|
icon: this.copied ? 'success' : 'copy',
|
|
2270
2270
|
onClick: () => this.copyToClipboard()
|
|
2271
2271
|
})), h("span", {
|
|
2272
|
-
key: '
|
|
2272
|
+
key: '9eabcd54f3bcdc1c4627a7ca7e22fd38e9755ca6',
|
|
2273
2273
|
class: "sr-only"
|
|
2274
2274
|
}, "Copy Code")), this.language && h("pre", {
|
|
2275
|
-
key: '
|
|
2275
|
+
key: 'd15dce4b1692bf1956e1b3cb3586dde4d9561f1b',
|
|
2276
2276
|
class: `language-${this.language} bg-stronger pl-8 pb-8`,
|
|
2277
2277
|
role: "region",
|
|
2278
2278
|
"aria-label": `Code block in ${this.language}`
|
|
2279
2279
|
}, h("code", {
|
|
2280
|
-
key: '
|
|
2280
|
+
key: 'ad7eb7b40aaab69b6bc929c632ce4736fe3c39a5',
|
|
2281
2281
|
innerHTML: this.getHighlightedCode()
|
|
2282
2282
|
})));
|
|
2283
2283
|
}
|
|
@@ -29,9 +29,9 @@ const EdsCookiesPreference = class {
|
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
31
|
return h("div", {
|
|
32
|
-
key: '
|
|
32
|
+
key: '37a817a2c1cccb58a7445c399f20ce5fb97653b8'
|
|
33
33
|
}, h("eds-link", {
|
|
34
|
-
key: '
|
|
34
|
+
key: '9bf85d4fe82d7a525bae6f765da7dea9a3913494',
|
|
35
35
|
size: "small",
|
|
36
36
|
intent: this.intent,
|
|
37
37
|
label: this.buttonText,
|
|
@@ -10,6 +10,7 @@ const EdsFeedback = class {
|
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
registerInstance(this, hostRef);
|
|
12
12
|
this.rating = createEvent(this, "rating", 7);
|
|
13
|
+
this.headingLevel = 'h1';
|
|
13
14
|
this.type = 'star';
|
|
14
15
|
this.count = 5;
|
|
15
16
|
this.label = 'Rate your Experience!';
|
|
@@ -55,21 +56,25 @@ const EdsFeedback = class {
|
|
|
55
56
|
this.selectedRating = e.detail;
|
|
56
57
|
}
|
|
57
58
|
render() {
|
|
59
|
+
// Determine the heading tag and CSS class
|
|
60
|
+
const HeadingTag = this.headingLevel;
|
|
61
|
+
const levelNum = this.headingLevel.replace('h', '');
|
|
62
|
+
const headingClass = `f-heading-${levelNum.padStart(2, '0')} my-4`;
|
|
58
63
|
return h("div", {
|
|
59
|
-
key: '
|
|
64
|
+
key: 'f1bec91df97ff2a54a8ec8284e88f572b3bf0081',
|
|
60
65
|
class: "grid inline"
|
|
61
|
-
}, h(
|
|
62
|
-
key: '
|
|
63
|
-
class:
|
|
66
|
+
}, h(HeadingTag, {
|
|
67
|
+
key: '8051043d5ec79a1f972fd732ef8a716487ed51d2',
|
|
68
|
+
class: headingClass
|
|
64
69
|
}, this.label), h("p", {
|
|
65
|
-
key: '
|
|
70
|
+
key: '55f319e89376372f13c2bb96b9a94ceed6a6565b',
|
|
66
71
|
class: "f-body-01 text-light"
|
|
67
72
|
}, this.description), h("eds-rating", {
|
|
68
|
-
key: '
|
|
73
|
+
key: 'c9c725d4a1ae65eb6b773178f6435d239c434034',
|
|
69
74
|
"rating-type": this.type,
|
|
70
75
|
"rating-count": this.count
|
|
71
76
|
}), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && h("span", {
|
|
72
|
-
key: '
|
|
77
|
+
key: 'e3ea621a035ecd6da07803478d202b2326997416',
|
|
73
78
|
class: "f-ui-04 text-lighter"
|
|
74
79
|
}, this.parsedMappings[this.selectedRating - 1]));
|
|
75
80
|
}
|
package/eds-frame.entry.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import 'react';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
|
|
6
|
-
const edsFrameCss = ".bg-inverse{background-color:var(--white)}.min-h-156{min-height:156px}.rounded{border-radius:0.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:16px}.rounded-md{border-radius:12px}.border-soft{border-color:rgba(0, 0, 0, .15
|
|
6
|
+
const edsFrameCss = ".bg-inverse{background-color:var(--white)}.min-h-156{min-height:156px}.rounded{border-radius:0.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:16px}.rounded-md{border-radius:12px}.border-soft{border-color:rgba(0, 0, 0, .15)}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-softest{border-color:rgba(0, 0, 0, .05)}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.effect-focus-within:focus-within{outline-style:solid}.relative{position:relative}.flex{display:flex}.grow{flex-grow:1}.flex-col{flex-direction:column}.border-2{border-width:2px}.w-full{width:100%}.h-full{height:100%}.h-auto{height:auto}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.items-center{align-items:center}.justify-between{justify-content:space-between}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.px-12{padding-left:0.75rem;padding-right:0.75rem}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.ml-auto{margin-left:auto}.border-t-2{border-top-width:2px}.border{border:1px solid rgba(0, 0, 0, .1)}.border-2{border:1px solid rgba(0, 0, 0, .1)}.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}.ml-8{margin-left:0.5rem}.mr-8{margin-right:0.5rem}.mt-16{margin-top:1rem}";
|
|
7
7
|
const EdsFrameStyle0 = edsFrameCss;
|
|
8
8
|
const EdsFrame = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -73,15 +73,15 @@ const EdsFrame = class {
|
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
75
|
return h("div", {
|
|
76
|
-
key: '
|
|
76
|
+
key: '61c401d6e021418e3d705cc9a4418b4f54f6bcf1',
|
|
77
77
|
class: this.articleClasses()
|
|
78
78
|
}, h("div", {
|
|
79
|
-
key: '
|
|
79
|
+
key: '3fe7284c2ce4057d6c953c02e03489c0ef75f43d',
|
|
80
80
|
class: "effect-height flex items-center justify-between py-8 px-12"
|
|
81
81
|
}, h("span", {
|
|
82
|
-
key: '
|
|
82
|
+
key: 'a0efaa70d4ab2484c76d38e309c0bf9800edf569',
|
|
83
83
|
class: "f-ui-02"
|
|
84
|
-
}, this.frameLabel), !this.iframeError ? h("eds-link", {
|
|
84
|
+
}, this.frameLabel), !this.iframeError && this.url && this.urlLabel ? h("eds-link", {
|
|
85
85
|
label: this.urlLabel,
|
|
86
86
|
url: this.url,
|
|
87
87
|
intent: this.intent,
|
|
@@ -90,7 +90,7 @@ const EdsFrame = class {
|
|
|
90
90
|
disabled: false,
|
|
91
91
|
icon: "arrow-diagonal"
|
|
92
92
|
}) : null), h("div", {
|
|
93
|
-
key: '
|
|
93
|
+
key: 'e99188447abb78659865758afe3226a7ade7f8f2',
|
|
94
94
|
class: "border-softer"
|
|
95
95
|
}, this.iframeError ? h("div", {
|
|
96
96
|
class: "container ml-8 mr-8 mt-16"
|