@ebrains/react 0.9.2-beta → 1.0.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-d99780e3.esm.js +55 -0
- package/arrow-diagonal-black-8f0494c3.esm.js +3 -0
- package/arrow-right-9322ba8a.esm.js +5 -0
- package/bluesky-cc5edd2d.esm.js +14 -0
- package/bookmark-c200037c.esm.js +16 -0
- package/chevron-down-6144c823.esm.js +12 -0
- package/chevron-left-ca6c66e1.esm.js +11 -0
- package/chevron-right-b88ed2d4.esm.js +5 -0
- package/chevron-up-c66bd477.esm.js +12 -0
- package/close-87fc0d63.esm.js +5 -0
- package/color-primary-palette_6.entry.esm.js +778 -0
- package/components-section.entry.esm.js +171 -0
- package/copy-03b72cb6.esm.js +5 -0
- package/correct-use-of-colors.entry.esm.js +243 -0
- package/docs-palettes.entry.esm.js +29 -0
- package/docs-tokens.entry.esm.js +45 -0
- package/eds-accordion.entry.esm.js +132 -0
- package/eds-alert.entry.esm.js +112 -0
- package/eds-app-root.entry.esm.js +53 -0
- package/eds-avatar_34.entry.esm.js +3594 -0
- package/eds-card-project.entry.esm.js +210 -0
- package/eds-card-section.entry.esm.js +56 -0
- package/eds-card-tags.entry.esm.js +27 -0
- package/eds-card-tool.entry.esm.js +105 -0
- package/eds-code-block.entry.esm.js +2290 -0
- package/eds-cookies-preference.entry.esm.js +47 -0
- package/eds-feedback.entry.esm.js +87 -0
- package/eds-frame.entry.esm.js +112 -0
- package/eds-icon-arrow-diagonal.entry.esm.js +21 -0
- package/eds-icon-arrow-right.entry.esm.js +21 -0
- package/eds-icon-bluesky.entry.esm.js +21 -0
- package/eds-icon-bookmark.entry.esm.js +21 -0
- package/eds-icon-chevron-down.entry.esm.js +21 -0
- package/eds-icon-chevron-left.entry.esm.js +21 -0
- package/eds-icon-chevron-right.entry.esm.js +21 -0
- package/eds-icon-chevron-up.entry.esm.js +21 -0
- package/eds-icon-close.entry.esm.js +21 -0
- package/eds-icon-copy.entry.esm.js +21 -0
- package/eds-icon-eu.entry.esm.js +21 -0
- package/eds-icon-external.entry.esm.js +21 -0
- package/eds-icon-facebook.entry.esm.js +21 -0
- package/eds-icon-gitlab.entry.esm.js +21 -0
- package/eds-icon-linkedin.entry.esm.js +21 -0
- package/eds-icon-loader.entry.esm.js +21 -0
- package/eds-icon-mastodon.entry.esm.js +21 -0
- package/eds-icon-menu.entry.esm.js +21 -0
- package/eds-icon-minus.entry.esm.js +21 -0
- package/eds-icon-more.entry.esm.js +21 -0
- package/eds-icon-paper.entry.esm.js +21 -0
- package/eds-icon-plus.entry.esm.js +21 -0
- package/eds-icon-portal.entry.esm.js +21 -0
- package/eds-icon-private.entry.esm.js +21 -0
- package/eds-icon-public.entry.esm.js +21 -0
- package/eds-icon-search.entry.esm.js +21 -0
- package/eds-icon-star.entry.esm.js +21 -0
- package/eds-icon-success.entry.esm.js +21 -0
- package/eds-icon-thumbs-down.entry.esm.js +21 -0
- package/eds-icon-thumbs-up.entry.esm.js +21 -0
- package/eds-icon-tutorial.entry.esm.js +21 -0
- package/eds-icon-twitter.entry.esm.js +21 -0
- package/eds-icon-unknown.entry.esm.js +21 -0
- package/eds-icon-updown.entry.esm.js +21 -0
- package/eds-icon-user.entry.esm.js +21 -0
- package/eds-icon-youtube.entry.esm.js +21 -0
- package/eds-matomo-notice.entry.esm.js +159 -0
- package/eds-pagination_2.entry.esm.js +493 -0
- package/eds-progress-bar.entry.esm.js +52 -0
- package/eds-rating.entry.esm.js +79 -0
- package/eds-section-core_2.entry.esm.js +69 -0
- package/eds-spinner.entry.esm.js +67 -0
- package/eds-splash-screen.entry.esm.js +87 -0
- package/eds-switch.entry.esm.js +68 -0
- package/eds-timeline.entry.esm.js +117 -0
- package/eds-toast-manager.entry.esm.js +93 -0
- package/eds-toast.entry.esm.js +93 -0
- package/eds-trl.entry.esm.js +68 -0
- package/eu-9ddde93a.esm.js +30 -0
- package/facebook-9cb5c17f.esm.js +14 -0
- package/incorrect-use-of-colors.entry.esm.js +74 -0
- package/index-39c58238.esm.js +58 -0
- package/index.esm.d.ts +1 -0
- package/index.esm.js +4 -0
- package/index.esm2.js +4558 -0
- package/linkedin-e8650abb.esm.js +28 -0
- package/loader-c9628637.esm.js +30 -0
- package/logo-color-7f1fd803.esm.js +115 -0
- package/logo-color-margins-ff8ce71b.esm.js +118 -0
- package/logo-space.entry.esm.js +48 -0
- package/logo-variations-horizontal_2.entry.esm.js +123 -0
- package/logo-variations-tabs.entry.esm.js +29 -0
- package/logo-white-no-bg-f382f86f.esm.js +1021 -0
- package/logo-wrong-usage.entry.esm.js +101 -0
- package/mastodon-3703ec61.esm.js +14 -0
- package/menu-340ea948.esm.js +11 -0
- package/minus-b30a7c71.esm.js +11 -0
- package/mono-53f70232.esm.js +11 -0
- package/more-4449d549.esm.js +13 -0
- package/package.json +6 -2
- package/paper-8e74ea31.esm.js +15 -0
- package/plus-89c07be2.esm.js +12 -0
- package/portal-d6c8ce56.esm.js +18 -0
- package/private-1c25ff8e.esm.js +25 -0
- package/public-d4d8c585.esm.js +16 -0
- package/search-fbcd79c2.esm.js +12 -0
- package/sharedUtils-a550989c.esm.js +17 -0
- package/src/components.d.ts +40 -0
- package/src/generated/components.d.ts +38 -0
- package/src/generated/react-component-lib/attachProps.d.ts +16 -0
- package/src/generated/react-component-lib/case.d.ts +2 -0
- package/src/generated/react-component-lib/createComponent.d.ts +10 -0
- package/src/generated/react-component-lib/createOverlayComponent.d.ts +21 -0
- package/src/generated/react-component-lib/dev.d.ts +2 -0
- package/src/generated/react-component-lib/interfaces.d.ts +29 -0
- package/src/generated/react-component-lib/utils/attachProps.d.ts +16 -0
- package/src/generated/react-component-lib/utils/case.d.ts +2 -0
- package/src/generated/react-component-lib/utils/dev.d.ts +2 -0
- package/src/generated/react-component-lib/utils/index.d.ts +10 -0
- package/src/react-component-lib/attachProps.d.ts +16 -0
- package/src/react-component-lib/case.d.ts +2 -0
- package/src/react-component-lib/createComponent.d.ts +10 -0
- package/src/react-component-lib/createOverlayComponent.d.ts +21 -0
- package/src/react-component-lib/dev.d.ts +2 -0
- package/src/react-component-lib/interfaces.d.ts +29 -0
- package/src/react-component-lib/utils/attachProps.d.ts +16 -0
- package/src/react-component-lib/utils/case.d.ts +2 -0
- package/src/react-component-lib/utils/index.d.ts +10 -0
- package/star-0da9b5e9.esm.js +5 -0
- package/success-443809da.esm.js +18 -0
- package/svg-repository.entry.esm.js +337 -0
- package/thumbs-down-a18fd049.esm.js +5 -0
- package/thumbs-up-c19a71bc.esm.js +6 -0
- package/token-list_3.entry.esm.js +385 -0
- package/token-ratios.entry.esm.js +49 -0
- package/token-typography.entry.esm.js +267 -0
- package/tutotial-150ee1fd.esm.js +27 -0
- package/twitter-ac21b505.esm.js +14 -0
- package/unknown-ed01a24c.esm.js +22 -0
- package/up-and-down-d747abee.esm.js +12 -0
- package/user-71ebdc15.esm.js +16 -0
- package/youtube-efbfbdc4.esm.js +14 -0
- package/.babelrc +0 -12
- package/project.json +0 -10
- package/rollup.config.js +0 -43
- package/src/components.ts +0 -49
- package/src/generated/components.ts +0 -47
- package/src/generated/react-component-lib/attachProps.ts +0 -125
- package/src/generated/react-component-lib/case.ts +0 -7
- package/src/generated/react-component-lib/createComponent.tsx +0 -106
- package/src/generated/react-component-lib/createOverlayComponent.tsx +0 -142
- package/src/generated/react-component-lib/dev.ts +0 -14
- package/src/generated/react-component-lib/index.tsx +0 -50
- package/src/generated/react-component-lib/interfaces.ts +0 -34
- package/src/generated/react-component-lib/utils/attachProps.ts +0 -125
- package/src/generated/react-component-lib/utils/case.ts +0 -7
- package/src/generated/react-component-lib/utils/dev.ts +0 -14
- package/src/generated/react-component-lib/utils/index.tsx +0 -50
- package/src/react-component-lib/attachProps.ts +0 -125
- package/src/react-component-lib/case.ts +0 -7
- package/src/react-component-lib/createComponent.tsx +0 -106
- package/src/react-component-lib/createOverlayComponent.tsx +0 -142
- package/src/react-component-lib/dev.ts +0 -14
- package/src/react-component-lib/index.tsx +0 -50
- package/src/react-component-lib/interfaces.ts +0 -34
- package/src/react-component-lib/utils/attachProps.ts +0 -125
- package/src/react-component-lib/utils/case.ts +0 -7
- package/src/react-component-lib/utils/index.tsx +0 -50
- package/tsconfig.json +0 -17
- package/tsconfig.lib.json +0 -23
- /package/src/generated/react-component-lib/{index.ts → index.d.ts} +0 -0
- /package/src/{index.ts → index.d.ts} +0 -0
- /package/src/react-component-lib/{index.ts → index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# react
|
|
1
|
+
# @ebrains/react
|
|
2
2
|
|
|
3
|
-
React
|
|
3
|
+
React bindings for the EBRAINS Design System Web Components. This package provides ready-to-use React wrappers around the core Stencil-built Custom Elements.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
More information about importing and using the package can be found currently in the
|
|
7
|
+
More information about importing and using the package can be found currently in the EBRAINS Design System - https://design.ebrains.eu/ui-components
|
|
8
8
|
|
|
9
9
|
## Licensing
|
|
10
10
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Helper function to check if Matomo is initialized
|
|
2
|
+
function isMatomoAvailable() {
|
|
3
|
+
return typeof window !== 'undefined' && typeof window._paq !== 'undefined';
|
|
4
|
+
}
|
|
5
|
+
// General function to push data to Matomo
|
|
6
|
+
function pushToMatomo(action, ...args) {
|
|
7
|
+
//console.log('Pushing Matomo')
|
|
8
|
+
if (isMatomoAvailable()) {
|
|
9
|
+
window._paq.push([action, ...args]);
|
|
10
|
+
} else {
|
|
11
|
+
// eslint-disable-next-line
|
|
12
|
+
console.warn('Matomo is not available or not initialized.');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
// Function to send analytics data
|
|
16
|
+
function sendAnalytics(eventData) {
|
|
17
|
+
var _a;
|
|
18
|
+
if (!isMatomoAvailable()) {
|
|
19
|
+
// eslint-disable-next-line
|
|
20
|
+
console.warn('Matomo is not available or not initialized.');
|
|
21
|
+
// eslint-disable-next-line
|
|
22
|
+
//console.log({ ...eventData });
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
// Conditionally build the name field
|
|
26
|
+
const nameParts = [];
|
|
27
|
+
if ((_a = eventData.parentContext) === null || _a === void 0 ? void 0 : _a.componentName) {
|
|
28
|
+
nameParts.push(eventData.parentContext.componentName);
|
|
29
|
+
}
|
|
30
|
+
nameParts.push(eventData.tag || 'unknown-tag');
|
|
31
|
+
nameParts.push(eventData.name || 'unknown-name');
|
|
32
|
+
const name = nameParts.join('/');
|
|
33
|
+
//console.log('trackEvent', eventData.category, eventData.action, name)
|
|
34
|
+
pushToMatomo('trackEvent', eventData.category, eventData.action, name);
|
|
35
|
+
// eslint-disable-next-line
|
|
36
|
+
//console.log({ ...eventData });
|
|
37
|
+
}
|
|
38
|
+
// Function to opt-in the user
|
|
39
|
+
function matomoOptIn() {
|
|
40
|
+
if (isMatomoAvailable()) {
|
|
41
|
+
window._paq.push(['rememberConsentGiven']);
|
|
42
|
+
// eslint-disable-next-line
|
|
43
|
+
console.log('User has opted in to tracking');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// Function to opt-out the user
|
|
47
|
+
function matomoOptOut() {
|
|
48
|
+
if (isMatomoAvailable()) {
|
|
49
|
+
window._paq.push(['forgetConsentGiven']);
|
|
50
|
+
// eslint-disable-next-line
|
|
51
|
+
console.log('User has opted out of tracking');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { matomoOptOut as a, matomoOptIn as m, sendAnalytics as s };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const arrowDiagonal = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.5858 3H17V9.41421L14.5 6.91421L8.70712 12.7071L7.29291 11.2929L13.0858 5.5L10.5858 3Z" fill="currentColor"></path><path d="M8 4H5C3.89543 4 3 4.89543 3 6V15C3 16.1046 3.89543 17 5 17H14C15.1046 17 16 16.1046 16 15V12H14V15H5V6H8V4Z" fill="currentColor"></path></svg>`;
|
|
2
|
+
|
|
3
|
+
export { arrowDiagonal as a };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const bluesky = ` <svg
|
|
2
|
+
width="24"
|
|
3
|
+
height="24"
|
|
4
|
+
viewBox="0 0 24 24"
|
|
5
|
+
fill="none"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
>
|
|
8
|
+
<path
|
|
9
|
+
d="M12 10.8728C10.9812 8.89138 8.20675 5.19886 5.62717 3.37775C3.15607 1.63323 2.21338 1.9355 1.59538 2.21475C0.880058 2.53797 0.75 3.63616 0.75 4.28228C0.75 4.92839 1.10422 9.5795 1.33526 10.3559C2.09866 12.9211 4.81627 13.7879 7.319 13.5098C7.44694 13.4908 7.57669 13.4733 7.70807 13.457C7.57919 13.4776 7.44938 13.4953 7.319 13.5098C3.65128 14.0529 0.393987 15.3896 4.66614 20.1456C9.3655 25.0113 11.1066 19.1023 12 16.1064C12.8934 19.1023 13.9225 24.7982 19.2497 20.1456C23.25 16.1064 20.3488 14.0531 16.681 13.5099C16.5506 13.4954 16.4208 13.4778 16.2919 13.4572C16.4233 13.4734 16.5531 13.4909 16.681 13.5099C19.1838 13.7881 21.9013 12.9213 22.6648 10.3561C22.8958 9.57969 23.25 4.92855 23.25 4.28244C23.25 3.63632 23.1199 2.53813 22.4046 2.21491C21.7866 1.93566 20.8439 1.63339 18.3728 3.37791C15.7933 5.19902 13.0188 8.89138 12 10.8728Z"
|
|
10
|
+
fill="currentColor"
|
|
11
|
+
/>
|
|
12
|
+
</svg>`;
|
|
13
|
+
|
|
14
|
+
export { bluesky as b };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const bookmark = ` <svg
|
|
2
|
+
width="20"
|
|
3
|
+
height="20"
|
|
4
|
+
viewBox="0 0 20 20"
|
|
5
|
+
fill="none"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
>
|
|
8
|
+
<path
|
|
9
|
+
d="M5 4H15V16L10 12.0138L5 16V4Z"
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
stroke-width="1.5"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
/>
|
|
14
|
+
</svg>`;
|
|
15
|
+
|
|
16
|
+
export { bookmark as b };
|