@ebrains/react 3.0.0 → 3.2.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/components-section.entry.esm.js +1 -1
- 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_52.entry.esm.js → eds-accordion_53.entry.esm.js} +281 -110
- package/eds-app-root.entry.esm.js +4 -4
- package/eds-cookies-preference.entry.esm.js +2 -2
- package/eds-feedback.entry.esm.js +5 -5
- package/eds-frame.entry.esm.js +4 -4
- package/eds-gauge.entry.esm.js +4 -4
- package/eds-gitlab-contributors.entry.esm.js +29 -18
- package/eds-icon-bluesky.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-mastodon.entry.esm.js +1 -1
- package/eds-icon-twitter.entry.esm.js +1 -1
- package/eds-icon-youtube.entry.esm.js +1 -1
- package/eds-input-search.entry.esm.js +96 -0
- package/eds-modal.entry.esm.js +12 -8
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-timeline.entry.esm.js +4 -4
- package/eds-toast-manager.entry.esm.js +1 -1
- package/eds-trl-badge.entry.esm.js +194 -0
- package/incorrect-use-of-colors.entry.esm.js +8 -8
- package/index.esm.js +1 -1
- package/index.esm2.js +13 -4
- package/logo-space.entry.esm.js +22 -22
- package/logo-variations-horizontal_2.entry.esm.js +20 -22
- 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 +3 -0
- 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 +26 -26
- package/token-typography.entry.esm.js +2 -2
|
@@ -34,18 +34,18 @@ const EdsAppRoot = class {
|
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
36
|
return h("div", {
|
|
37
|
-
key: '
|
|
37
|
+
key: 'c856dc661c22b74baee69d195ef92ab1e24bceae'
|
|
38
38
|
}, h("eds-splash-screen", {
|
|
39
|
-
key: '
|
|
39
|
+
key: '62689cd4fdee56d667071bad596037342812b7a6',
|
|
40
40
|
inverse: true,
|
|
41
41
|
initPromise: this.combinedInitPromise
|
|
42
42
|
}), h("eds-login", {
|
|
43
|
-
key: '
|
|
43
|
+
key: 'af2257c63a00025dbddbc2bd4bc7c08391ead2aa',
|
|
44
44
|
"keycloak-url": "http://localhost:8080",
|
|
45
45
|
"keycloak-realm": "nigeor-realm",
|
|
46
46
|
"keycloak-client-id": "stencil-app"
|
|
47
47
|
}), h("main", {
|
|
48
|
-
key: '
|
|
48
|
+
key: '8a2768437fb21855da535b8ea706f7cb3a17a36a'
|
|
49
49
|
}, this.isAuthenticated ? h("h1", null, "Welcome, authenticated user!") : h("h1", null, "Please log in.")));
|
|
50
50
|
}
|
|
51
51
|
};
|
|
@@ -29,9 +29,9 @@ const EdsCookiesPreference = class {
|
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
31
|
return h("div", {
|
|
32
|
-
key: '
|
|
32
|
+
key: '660d6b9c21de37c5681e7678e062b8039c310bc3'
|
|
33
33
|
}, h("eds-link", {
|
|
34
|
-
key: '
|
|
34
|
+
key: '3849b92ef42a578c1a59533b2281aa9df93bdfab',
|
|
35
35
|
size: "small",
|
|
36
36
|
intent: this.intent,
|
|
37
37
|
label: this.buttonText,
|
|
@@ -61,20 +61,20 @@ const EdsFeedback = class {
|
|
|
61
61
|
const levelNum = this.headingLevel.replace('h', '');
|
|
62
62
|
const headingClass = `f-heading-${levelNum.padStart(2, '0')} my-4`;
|
|
63
63
|
return h("div", {
|
|
64
|
-
key: '
|
|
64
|
+
key: '5eddbd664389530e209698e5e435c853c8f50b9f',
|
|
65
65
|
class: "grid inline"
|
|
66
66
|
}, h(HeadingTag, {
|
|
67
|
-
key: '
|
|
67
|
+
key: '22d1d4a44a116f78bbfa66946d8b7a9f95779524',
|
|
68
68
|
class: headingClass
|
|
69
69
|
}, this.label), h("p", {
|
|
70
|
-
key: '
|
|
70
|
+
key: 'd3e5abefa5d0e1e32281b5088251fb9c304b8d2a',
|
|
71
71
|
class: "f-body-01 text-light"
|
|
72
72
|
}, this.description), h("eds-rating", {
|
|
73
|
-
key: '
|
|
73
|
+
key: '65f1e772ac885d20f46e147aedeb55ab2ec871fe',
|
|
74
74
|
"rating-type": this.type,
|
|
75
75
|
"rating-count": this.count
|
|
76
76
|
}), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && h("span", {
|
|
77
|
-
key: '
|
|
77
|
+
key: 'f660ceb9889d560ec1687c6f17bdbbe6a89f90ee',
|
|
78
78
|
class: "f-ui-04 text-lighter"
|
|
79
79
|
}, this.parsedMappings[this.selectedRating - 1]));
|
|
80
80
|
}
|
package/eds-frame.entry.esm.js
CHANGED
|
@@ -73,13 +73,13 @@ const EdsFrame = class {
|
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
75
|
return h("div", {
|
|
76
|
-
key: '
|
|
76
|
+
key: '397b0f9433b9339079774f0aa49b1451f9c0d45e',
|
|
77
77
|
class: this.articleClasses()
|
|
78
78
|
}, h("div", {
|
|
79
|
-
key: '
|
|
79
|
+
key: 'a70c2ec210a1de124a82c39d6f2592ddb9ff4572',
|
|
80
80
|
class: "effect-height flex items-center justify-between py-8 px-12"
|
|
81
81
|
}, h("span", {
|
|
82
|
-
key: '
|
|
82
|
+
key: '88d0732d0cf4b3fab14ed0e1b0797b78dd230585',
|
|
83
83
|
class: "f-ui-02"
|
|
84
84
|
}, this.frameLabel), !this.iframeError && this.url && this.urlLabel ? h("eds-link", {
|
|
85
85
|
label: this.urlLabel,
|
|
@@ -90,7 +90,7 @@ const EdsFrame = class {
|
|
|
90
90
|
disabled: false,
|
|
91
91
|
icon: "arrow-up-right"
|
|
92
92
|
}) : null), h("div", {
|
|
93
|
-
key: '
|
|
93
|
+
key: '85c0d453e85d23520e5a6a5bae2159285771677e',
|
|
94
94
|
class: "border-softer"
|
|
95
95
|
}, this.iframeError ? h("div", {
|
|
96
96
|
class: "container ml-8 mr-8 mt-16"
|
package/eds-gauge.entry.esm.js
CHANGED
|
@@ -50,7 +50,7 @@ const EdsGauge = class {
|
|
|
50
50
|
fontSize: `${fontSize}px`
|
|
51
51
|
};
|
|
52
52
|
return h("div", {
|
|
53
|
-
key: '
|
|
53
|
+
key: '5629f8adbc6f144aad49062883cb85ecf24fc16c',
|
|
54
54
|
role: "progressbar",
|
|
55
55
|
"aria-valuemin": this.valueMin,
|
|
56
56
|
"aria-valuemax": this.valueMax,
|
|
@@ -59,14 +59,14 @@ const EdsGauge = class {
|
|
|
59
59
|
class: "relative inline-block rounded-full overflow-hidden",
|
|
60
60
|
style: containerStyle
|
|
61
61
|
}, h("div", {
|
|
62
|
-
key: '
|
|
62
|
+
key: 'd668b54b0a5f4bf260a2f1153781c59741bd8694',
|
|
63
63
|
class: "absolute bg-inverse rounded-full",
|
|
64
64
|
style: maskStyle
|
|
65
65
|
}), h("div", {
|
|
66
|
-
key: '
|
|
66
|
+
key: 'f08feba97d30ed893a72a7e07e412aa82ea8cd3d',
|
|
67
67
|
class: "absolute inset-0 flex items-center justify-center"
|
|
68
68
|
}, h("span", {
|
|
69
|
-
key: '
|
|
69
|
+
key: '2a8dccde44677d4a4b742cd992144d6cf399ee9b',
|
|
70
70
|
class: "f-body-01 text-default",
|
|
71
71
|
style: textStyle
|
|
72
72
|
}, clamped)));
|
|
@@ -3,7 +3,7 @@ import 'react';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
|
|
6
|
-
const edsGitlabContributorsCss = ".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}.flex{display:flex}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.grid{display:grid}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.gap-2{gap:0.5rem;}.gap-4{gap:1rem;}.gap-6{gap:1.5rem;}.p-5{padding:1.25rem;}.p-12{padding:3rem;}.pb-2{padding-bottom:0.25rem;}.pb-4{padding-bottom:1rem;}.mb-6{margin-bottom:1.5rem;}.m-0{margin:0}.mt-auto{margin-top:auto}.w-full{width:100%}.min-w-0{min-width:0}.text-xs{font-size:0.75rem;line-height:1rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-semibold{font-weight:600}.whitespace-nowrap{white-space:nowrap}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.no-underline{text-decoration:none}.text-gray-600{color:var(--eds-color-gray-600, #4b5563)}.text-gray-900{color:var(--eds-color-gray-900, #111827)}.border-gray-200{border-color:var(--eds-color-gray-200, #e5e7eb)}.bg-white{background-color:var(--eds-color-white, #ffffff)}.text-primary-600{color:var(--eds-color-primary-600, #2563eb)}.hover\\:text-primary-600:hover{color:var(--eds-color-primary-600, #2563eb)}.border-primary-300{border-color:var(--eds-color-primary-300, #93c5fd)}.hover\\:border-primary-300:hover{border-color:var(--eds-color-primary-300, #93c5fd)}.text-success-600{color:var(--eds-color-success-600, #16a34a)}.text-error-600{color:var(--eds-color-error-600, #dc2626)}.border{border-width:1px}.border-b{border-bottom-width:1px}.rounded-lg{border-radius:var(--eds-radius-lg, 0.5rem);}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.transition-colors{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:150ms}.duration-200{transition-duration:200ms}.shadow-md{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.hover\\:shadow-md:hover{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.-translate-y-0\\.5{transform:translateY(-0.125rem);}.hover\\:-translate-y-0\\.5:hover{transform:translateY(-0.125rem)}.grid-cols-1{grid-template-columns:repeat(1, minmax(0, 1fr))}@media (min-width: 640px){.sm\\:grid-cols-2{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 768px){.md\\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media (min-width: 1024px){.lg\\:grid-cols-4{grid-template-columns:repeat(4, minmax(0, 1fr))}.lg\\:grid-cols-5{grid-template-columns:repeat(5, minmax(0, 1fr))}}.contributor-card{will-change:transform, box-shadow, border-color}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.text-default{color:var(--black)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}";
|
|
6
|
+
const edsGitlabContributorsCss = ".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}.flex{display:flex}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.grid{display:grid}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.gap-2{gap:0.5rem;}.gap-4{gap:1rem;}.gap-6{gap:1.5rem;}.p-5{padding:1.25rem;}.p-12{padding:3rem;}.pb-2{padding-bottom:0.25rem;}.pb-4{padding-bottom:1rem;}.mb-6{margin-bottom:1.5rem;}.m-0{margin:0}.mt-auto{margin-top:auto}.w-full{width:100%}.min-w-0{min-width:0}.text-xs{font-size:0.75rem;line-height:1rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-semibold{font-weight:600}.whitespace-nowrap{white-space:nowrap}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.no-underline{text-decoration:none}.text-gray-600{color:var(--eds-color-gray-600, #4b5563)}.text-gray-900{color:var(--eds-color-gray-900, #111827)}.border-gray-200{border-color:var(--eds-color-gray-200, #e5e7eb)}.bg-white{background-color:var(--eds-color-white, #ffffff)}.text-primary-600{color:var(--eds-color-primary-600, #2563eb)}.hover\\:text-primary-600:hover{color:var(--eds-color-primary-600, #2563eb)}.border-primary-300{border-color:var(--eds-color-primary-300, #93c5fd)}.hover\\:border-primary-300:hover{border-color:var(--eds-color-primary-300, #93c5fd)}.text-success-600{color:var(--eds-color-success-600, #16a34a)}.text-error-600{color:var(--eds-color-error-600, #dc2626)}.border{border-width:1px}.border-b{border-bottom-width:1px}.rounded-lg{border-radius:var(--eds-radius-lg, 0.5rem);}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.transition-colors{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:150ms}.duration-200{transition-duration:200ms}.shadow-md{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.hover\\:shadow-md:hover{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.-translate-y-0\\.5{transform:translateY(-0.125rem);}.hover\\:-translate-y-0\\.5:hover{transform:translateY(-0.125rem)}.grid-cols-1{grid-template-columns:repeat(1, minmax(0, 1fr))}@media (min-width: 640px){.sm\\:grid-cols-2{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 768px){.md\\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media (min-width: 1024px){.lg\\:grid-cols-4{grid-template-columns:repeat(4, minmax(0, 1fr))}.lg\\:grid-cols-5{grid-template-columns:repeat(5, minmax(0, 1fr))}}.contributor-card{will-change:transform, box-shadow, border-color}.loading{position:relative;min-height:8rem;padding:1rem 1.25rem;color:var(--grey-dark, #7A7B7A);font-size:0.9375rem;border:1px solid rgba(0, 0, 0, 0.08);border-radius:0.25rem;background-color:rgba(0, 0, 0, 0.02)}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.text-default{color:var(--black)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}";
|
|
7
7
|
const EdsGitlabContributorsStyle0 = edsGitlabContributorsCss;
|
|
8
8
|
const EdsGitlabContributors = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -94,18 +94,17 @@ const EdsGitlabContributors = class {
|
|
|
94
94
|
if (shouldUsePath) {
|
|
95
95
|
// Fetch commits by path and aggregate by author (for monorepo)
|
|
96
96
|
return await this.fetchCommitsByPathForProject(projectId);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
if (!contributorsResponse.ok) {
|
|
105
|
-
throw new Error(`GitLab API error: ${contributorsResponse.status} ${contributorsResponse.statusText}`);
|
|
97
|
+
}
|
|
98
|
+
// Use contributors API for entire repository
|
|
99
|
+
const contributorsResponse = await fetch(`${this.apiUrl}/projects/${encodeURIComponent(projectId)}/repository/contributors?per_page=100`, {
|
|
100
|
+
headers: {
|
|
101
|
+
'PRIVATE-TOKEN': this.accessToken
|
|
106
102
|
}
|
|
107
|
-
|
|
103
|
+
});
|
|
104
|
+
if (!contributorsResponse.ok) {
|
|
105
|
+
throw new Error(`GitLab API error: ${contributorsResponse.status} ${contributorsResponse.statusText}`);
|
|
108
106
|
}
|
|
107
|
+
return await contributorsResponse.json();
|
|
109
108
|
}
|
|
110
109
|
/**
|
|
111
110
|
* Fetches contributors from GitLab API (supports multiple projects)
|
|
@@ -120,7 +119,7 @@ const EdsGitlabContributors = class {
|
|
|
120
119
|
this.loading = true;
|
|
121
120
|
this.error = '';
|
|
122
121
|
const projectIds = this.getProjectIds();
|
|
123
|
-
|
|
122
|
+
const allContributorsData = [];
|
|
124
123
|
// Fetch contributors from all projects
|
|
125
124
|
for (const projectId of projectIds) {
|
|
126
125
|
const contributorsData = await this.fetchContributorsForProject(projectId);
|
|
@@ -129,7 +128,9 @@ const EdsGitlabContributors = class {
|
|
|
129
128
|
// Filter by minimum commits and exclude bot contributors
|
|
130
129
|
const filteredContributors = allContributorsData.filter(c => {
|
|
131
130
|
// Exclude if commits are below minimum
|
|
132
|
-
if (c.commits < this.minCommits)
|
|
131
|
+
if (c.commits < this.minCommits) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
133
134
|
// Exclude GitLab CI and other bots
|
|
134
135
|
const email = c.email.toLowerCase();
|
|
135
136
|
const name = c.name.toLowerCase();
|
|
@@ -217,13 +218,23 @@ const EdsGitlabContributors = class {
|
|
|
217
218
|
}
|
|
218
219
|
render() {
|
|
219
220
|
if (this.loading) {
|
|
221
|
+
// Spinner placeholder mirrors eds-kg-learning-resources exactly —
|
|
222
|
+
// same `.loading` wrapper (position: relative + min-height so the
|
|
223
|
+
// absolutely-positioned spinner anchors inside the box instead of
|
|
224
|
+
// escaping to the page), same eds-spinner props (sm/primary/
|
|
225
|
+
// transparent + message-as-prop), and the same role+aria-live for
|
|
226
|
+
// screen-reader announcement. Keep these two components in sync if
|
|
227
|
+
// the loading affordance ever changes.
|
|
220
228
|
return h("div", {
|
|
221
|
-
class: "
|
|
229
|
+
class: "loading",
|
|
230
|
+
role: "status",
|
|
231
|
+
"aria-live": "polite"
|
|
222
232
|
}, h("eds-spinner", {
|
|
223
|
-
size: "
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
233
|
+
size: "sm",
|
|
234
|
+
variant: "primary",
|
|
235
|
+
background: "transparent",
|
|
236
|
+
message: "Loading contributors..."
|
|
237
|
+
}));
|
|
227
238
|
}
|
|
228
239
|
if (this.error) {
|
|
229
240
|
return h("eds-alert", {
|
package/eds-icon-eu.entry.esm.js
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsInputSearch = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.search = createEvent(this, "search", 7);
|
|
11
|
+
/**
|
|
12
|
+
* Keydown event listener to detect Command+K (Mac) or Ctrl+K (Windows/Linux)
|
|
13
|
+
* and focus the input element when triggered.
|
|
14
|
+
*
|
|
15
|
+
* @param e - The keyboard event.
|
|
16
|
+
*/
|
|
17
|
+
this.keydownListener = e => {
|
|
18
|
+
// Check for Command+K (Mac) or Ctrl+K (Windows/Linux)
|
|
19
|
+
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'k') {
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
// Focus the input if it's available and not disabled
|
|
22
|
+
if (this.inputElement && !this.disabled) {
|
|
23
|
+
this.inputElement.focus();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
/*onInput = (e: any) => {
|
|
28
|
+
// eslint-disable-next-line
|
|
29
|
+
console.log('on input:', e);
|
|
30
|
+
};*/
|
|
31
|
+
this.onChange = e => {
|
|
32
|
+
// eslint-disable-next-line
|
|
33
|
+
this.search.emit({
|
|
34
|
+
event: 'change',
|
|
35
|
+
value: e.target.value
|
|
36
|
+
});
|
|
37
|
+
sendAnalytics({
|
|
38
|
+
category: 'ui-component',
|
|
39
|
+
parentContext: null,
|
|
40
|
+
tag: this.el.tagName.toLowerCase(),
|
|
41
|
+
name: e.target.value || '',
|
|
42
|
+
action: 'search'
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
this.name = undefined;
|
|
46
|
+
this.inputId = 'search-main';
|
|
47
|
+
this.placeholder = 'Search...';
|
|
48
|
+
this.value = undefined;
|
|
49
|
+
this.disabled = false;
|
|
50
|
+
this.required = false;
|
|
51
|
+
this.decorate = undefined;
|
|
52
|
+
this.label = 'Search';
|
|
53
|
+
}
|
|
54
|
+
componentDidLoad() {
|
|
55
|
+
// Assign the native input element after the component loads
|
|
56
|
+
this.inputElement = this.el.querySelector('input');
|
|
57
|
+
document.addEventListener('keydown', this.keydownListener);
|
|
58
|
+
}
|
|
59
|
+
disconnectedCallback() {
|
|
60
|
+
// Clean up the event listener when the component is removed
|
|
61
|
+
document.removeEventListener('keydown', this.keydownListener);
|
|
62
|
+
}
|
|
63
|
+
async getInputElement() {
|
|
64
|
+
// Return the native input element
|
|
65
|
+
return this.inputElement;
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return h("div", {
|
|
69
|
+
key: '900ca7578601ff528b717e5bc3e1fe6b43562fb6',
|
|
70
|
+
class: "relative flex items-center"
|
|
71
|
+
}, h("eds-icon-wrapper", {
|
|
72
|
+
key: '722eecc1031f51f83100f9d35719a7ea837f680d',
|
|
73
|
+
name: "search",
|
|
74
|
+
class: "absolute top-1/2 left-[14px] -translate-y-1/2 text-lightest",
|
|
75
|
+
"aria-hidden": "true"
|
|
76
|
+
}), h("input", {
|
|
77
|
+
key: '0445caabbf5e3077b708a2b8bdbe0fcee3133398',
|
|
78
|
+
id: this.inputId || this.name,
|
|
79
|
+
name: this.name,
|
|
80
|
+
placeholder: this.placeholder,
|
|
81
|
+
value: this.value || '',
|
|
82
|
+
required: this.required,
|
|
83
|
+
disabled: this.disabled,
|
|
84
|
+
type: "search",
|
|
85
|
+
"aria-label": this.placeholder,
|
|
86
|
+
class: `input pl-36 ${this.decorate}`,
|
|
87
|
+
//onInput={this.onInput}
|
|
88
|
+
onChange: this.onChange
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
get el() {
|
|
92
|
+
return getElement(this);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export { EdsInputSearch as eds_input_search };
|
package/eds-modal.entry.esm.js
CHANGED
|
@@ -62,9 +62,13 @@ const EdsModal = class {
|
|
|
62
62
|
}
|
|
63
63
|
trapFocus(event) {
|
|
64
64
|
var _a;
|
|
65
|
-
if (event.key !== 'Tab')
|
|
65
|
+
if (event.key !== 'Tab') {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
66
68
|
const focusableElements = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
67
|
-
if (!focusableElements || focusableElements.length === 0)
|
|
69
|
+
if (!focusableElements || focusableElements.length === 0) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
68
72
|
const firstElement = focusableElements[0];
|
|
69
73
|
const lastElement = focusableElements[focusableElements.length - 1];
|
|
70
74
|
if (event.shiftKey) {
|
|
@@ -72,11 +76,9 @@ const EdsModal = class {
|
|
|
72
76
|
lastElement.focus();
|
|
73
77
|
event.preventDefault();
|
|
74
78
|
}
|
|
75
|
-
} else {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
event.preventDefault();
|
|
79
|
-
}
|
|
79
|
+
} else if (document.activeElement === lastElement) {
|
|
80
|
+
firstElement.focus();
|
|
81
|
+
event.preventDefault();
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
lockBodyScroll() {
|
|
@@ -158,7 +160,9 @@ const EdsModal = class {
|
|
|
158
160
|
* Closes the modal when the Escape key is pressed and handles focus trapping on Tab.
|
|
159
161
|
*/
|
|
160
162
|
handleKeyDown(event) {
|
|
161
|
-
if (!this.isOpen)
|
|
163
|
+
if (!this.isOpen) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
162
166
|
if (event.key === 'Escape') {
|
|
163
167
|
this.close();
|
|
164
168
|
} else if (event.key === 'Tab') {
|
|
@@ -15,13 +15,13 @@ const EdsSectionCore = class {
|
|
|
15
15
|
render() {
|
|
16
16
|
const TagType = this.tag; // Set dynamic tag type (div or section)
|
|
17
17
|
return h(TagType, {
|
|
18
|
-
key: '
|
|
18
|
+
key: 'cee3905fc5e268c768fbc58b413ee074591888b7'
|
|
19
19
|
}, h("eds-section-heading", {
|
|
20
|
-
key: '
|
|
20
|
+
key: '9ba05e76c5e348b1209283b7f95a475408758c3b',
|
|
21
21
|
headingLevel: this.headingLevel,
|
|
22
22
|
sectionTitle: this.sectionTitle
|
|
23
23
|
}), h("slot", {
|
|
24
|
-
key: '
|
|
24
|
+
key: '8e5d27261133cd900d13940ce928946b1c378277'
|
|
25
25
|
}));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
@@ -52,7 +52,7 @@ const EdsSectionHeading = class {
|
|
|
52
52
|
const TagType = this.tag; // Dynamically set tag type for the container
|
|
53
53
|
const HeadingTag = this.headingLevel; // Dynamically set heading level
|
|
54
54
|
return h(TagType, {
|
|
55
|
-
key: '
|
|
55
|
+
key: '8791e5d816bfdc80087f3f7e5dbab60d0ac4a523',
|
|
56
56
|
class: {
|
|
57
57
|
'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8': true,
|
|
58
58
|
container: this.withContainer,
|
|
@@ -60,7 +60,7 @@ const EdsSectionHeading = class {
|
|
|
60
60
|
'pt-28': !this.spacingLarge
|
|
61
61
|
}
|
|
62
62
|
}, h(HeadingTag, {
|
|
63
|
-
key: '
|
|
63
|
+
key: 'e2e7ca5effc12e6c9c8c3418c4097920ec80e53e',
|
|
64
64
|
class: this.getHeadingClass()
|
|
65
65
|
}, this.sectionTitle));
|
|
66
66
|
}
|
|
@@ -46,16 +46,16 @@ const EdsTimeline = class {
|
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
48
|
return h("div", {
|
|
49
|
-
key: '
|
|
49
|
+
key: '3816dfeeec536ae803b069e5f5e5112f476dffed',
|
|
50
50
|
class: "max-w-sidebar mx-auto px-4 py-8"
|
|
51
51
|
}, h("div", {
|
|
52
|
-
key: '
|
|
52
|
+
key: '360b8c6752eab781870de60aa1f89889eff644d3',
|
|
53
53
|
class: "relative"
|
|
54
54
|
}, h("div", {
|
|
55
|
-
key: '
|
|
55
|
+
key: 'eda9ed9904dfe7c8c0fff2295666666cfbd3763a',
|
|
56
56
|
class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0"
|
|
57
57
|
}), h("div", {
|
|
58
|
-
key: '
|
|
58
|
+
key: '5f7b736ed512cf4752c66c8a0c9010822d8b4f44',
|
|
59
59
|
class: "space-y-16"
|
|
60
60
|
}, this.parsedEvents.map((event, index) => h("div", {
|
|
61
61
|
class: "relative flex"
|