@ebrains/react 0.0.1-alpha.0 → 0.3.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.
Files changed (110) hide show
  1. package/README.md +4 -48
  2. package/arrow-diagonal-black-8f0494c3.esm.js +3 -0
  3. package/arrow-right-9322ba8a.esm.js +5 -0
  4. package/bluesky-cc5edd2d.esm.js +14 -0
  5. package/chevron-down-6144c823.esm.js +12 -0
  6. package/chevron-left-ca6c66e1.esm.js +11 -0
  7. package/chevron-right-b88ed2d4.esm.js +5 -0
  8. package/chevron-up-c66bd477.esm.js +12 -0
  9. package/close-87fc0d63.esm.js +5 -0
  10. package/color-0ba8ed56.esm.js +423 -0
  11. package/color-primary-palette_6.entry.esm.js +756 -0
  12. package/copy-03b72cb6.esm.js +5 -0
  13. package/correct-use-of-colors.entry.esm.js +243 -0
  14. package/eds-accordion.entry.esm.js +132 -0
  15. package/eds-alert.entry.esm.js +102 -0
  16. package/eds-avatar_17.entry.esm.js +209 -0
  17. package/eds-card-desc_3.entry.esm.js +129 -0
  18. package/eds-card-generic.entry.esm.js +125 -0
  19. package/eds-card-project.entry.esm.js +92 -0
  20. package/eds-card-section.entry.esm.js +70 -0
  21. package/eds-card-tags.entry.esm.js +27 -0
  22. package/eds-card-tool.entry.esm.js +106 -0
  23. package/eds-card-wrapper.entry.esm.js +39 -0
  24. package/eds-code-block.entry.esm.js +2243 -0
  25. package/eds-components-section.entry.esm.js +146 -0
  26. package/eds-docs-palettes.entry.esm.js +29 -0
  27. package/eds-docs-tokens.entry.esm.js +45 -0
  28. package/eds-form.entry.esm.js +374 -0
  29. package/eds-frame.entry.esm.js +117 -0
  30. package/eds-icon-arrow-diagonal.entry.esm.js +21 -0
  31. package/eds-icon-arrow-right.entry.esm.js +21 -0
  32. package/eds-icon-bluesky.entry.esm.js +21 -0
  33. package/eds-icon-chevron-down.entry.esm.js +21 -0
  34. package/eds-icon-chevron-left.entry.esm.js +21 -0
  35. package/eds-icon-chevron-right.entry.esm.js +21 -0
  36. package/eds-icon-chevron-up.entry.esm.js +21 -0
  37. package/eds-icon-close.entry.esm.js +21 -0
  38. package/eds-icon-copy.entry.esm.js +21 -0
  39. package/eds-icon-eu.entry.esm.js +21 -0
  40. package/eds-icon-facebook.entry.esm.js +21 -0
  41. package/eds-icon-gitlab.entry.esm.js +21 -0
  42. package/eds-icon-linkedin.entry.esm.js +21 -0
  43. package/eds-icon-loader.entry.esm.js +21 -0
  44. package/eds-icon-mastodon.entry.esm.js +21 -0
  45. package/eds-icon-menu.entry.esm.js +21 -0
  46. package/eds-icon-more.entry.esm.js +21 -0
  47. package/eds-icon-search.entry.esm.js +21 -0
  48. package/eds-icon-success.entry.esm.js +21 -0
  49. package/eds-icon-twitter.entry.esm.js +21 -0
  50. package/eds-icon-user.entry.esm.js +21 -0
  51. package/eds-icon-youtube.entry.esm.js +21 -0
  52. package/eds-input_7.entry.esm.js +518 -0
  53. package/eds-login.entry.esm.js +76 -0
  54. package/eds-logo-variations.entry.esm.js +29 -0
  55. package/eds-matomo-notice.entry.esm.js +129 -0
  56. package/eds-modal.entry.esm.js +114 -0
  57. package/eds-navigator.entry.esm.js +72 -0
  58. package/eds-pagination_2.entry.esm.js +456 -0
  59. package/eds-progress-bar.entry.esm.js +36 -0
  60. package/eds-rating.entry.esm.js +71 -0
  61. package/eds-section-core_2.entry.esm.js +69 -0
  62. package/eds-svg-repository.entry.esm.js +325 -0
  63. package/eds-tab.entry.esm.js +41 -0
  64. package/eds-tabs-content.entry.esm.js +145 -0
  65. package/eds-tabs.entry.esm.js +155 -0
  66. package/eds-timeline.entry.esm.js +130 -0
  67. package/eds-tooltip.entry.esm.js +116 -0
  68. package/eds-trl.entry.esm.js +69 -0
  69. package/eu-9ddde93a.esm.js +30 -0
  70. package/facebook-9cb5c17f.esm.js +14 -0
  71. package/incorrect-use-of-colors.entry.esm.js +71 -0
  72. package/index-39c58238.esm.js +58 -0
  73. package/index.esm.js +3 -2668
  74. package/index.esm2.js +4791 -0
  75. package/keycloak-13893af6.esm.js +1594 -0
  76. package/linkedin-e8650abb.esm.js +28 -0
  77. package/loader-c9628637.esm.js +30 -0
  78. package/logo-color-7f1fd803.esm.js +115 -0
  79. package/logo-color-margins-ff8ce71b.esm.js +118 -0
  80. package/logo-space.entry.esm.js +32 -0
  81. package/logo-variations-horizontal_2.entry.esm.js +116 -0
  82. package/logo-white-no-bg-f382f86f.esm.js +1021 -0
  83. package/logo-wrong-usage.entry.esm.js +137 -0
  84. package/mastodon-3703ec61.esm.js +14 -0
  85. package/menu-340ea948.esm.js +11 -0
  86. package/mono-53f70232.esm.js +11 -0
  87. package/more-4449d549.esm.js +13 -0
  88. package/package.json +1 -1
  89. package/search-fbcd79c2.esm.js +12 -0
  90. package/src/components.d.ts +40 -0
  91. package/src/index.d.ts +1 -1
  92. package/src/react-component-lib/attachProps.d.ts +16 -0
  93. package/src/react-component-lib/case.d.ts +2 -0
  94. package/src/react-component-lib/createComponent.d.ts +10 -0
  95. package/src/react-component-lib/createOverlayComponent.d.ts +21 -0
  96. package/src/react-component-lib/dev.d.ts +2 -0
  97. package/src/react-component-lib/index.d.ts +2 -0
  98. package/src/react-component-lib/interfaces.d.ts +29 -0
  99. package/src/react-component-lib/utils/attachProps.d.ts +16 -0
  100. package/src/react-component-lib/utils/case.d.ts +2 -0
  101. package/src/react-component-lib/utils/index.d.ts +10 -0
  102. package/success-443809da.esm.js +18 -0
  103. package/toastManager-d9eee791.esm.js +34 -0
  104. package/token-list_3.entry.esm.js +385 -0
  105. package/token-ratios.entry.esm.js +49 -0
  106. package/token-spacing.entry.esm.js +93 -0
  107. package/token-typography.entry.esm.js +264 -0
  108. package/twitter-ac21b505.esm.js +14 -0
  109. package/user-71ebdc15.esm.js +16 -0
  110. package/youtube-efbfbdc4.esm.js +14 -0
package/README.md CHANGED
@@ -1,51 +1,7 @@
1
- # Overview
1
+ # react
2
2
 
3
- The `ebrains-ui-ecosystem` is a platform for managing the design system, UI components, and applications across EBRAINS products.
3
+ This library was generated with [Nx](https://nx.dev).
4
4
 
5
- ## Tech Stack
5
+ ## Running unit tests
6
6
 
7
- - **Trunk-based-development**: This repository follows the trunk bases development [worklflow](https://www.atlassian.com/continuous-delivery/continuous-integration/trunk-based-development)
8
- - **Feature Flags**: It also make use of feature flags ([GitLab](https://gitlab.ebrains.eu/ri/tech-hub/design-system/ebrains-ui-ecosystem/-/feature_flags), [FF](https://www.atlassian.com/solutions/devops/integrations/feature-flags))
9
-
10
- - **Nx Monorepo**: Facilitates efficient management of multiple apps and libraries within a single repository, enabling code sharing and collaboration.
11
- - **Stencil.js**: A powerful tool for building reusable, framework-agnostic web components. Supports multiple **output targets**, including **Vanilla JS**, **Vue**, and **React**, ensuring compatibility across various front-end frameworks.
12
- - **Tailwind CSS**: A utility-first CSS framework to enforce design consistency and create highly customizable, responsive UI components.
13
-
14
- ## Output
15
-
16
- ### Documentation
17
-
18
- The `ebrains-ui-ecosystem` will leverage Stencil's built-in docs generation feature and Hugo's features to produce high-level documentation. This will include detailed information about different aspects of the design system, such as **foundations** (typography, colors, spacing), **components**, and **patterns**. The documentation will be hosted under a dedicated domain, ensuring easy access and consistency across teams.
19
-
20
- ### Storybook
21
-
22
- The `ebrains-ui-ecosystem` will deliver component stories for interactive demoing and practice before development under a dedicated domain.
23
-
24
- ### NPM Packages/CDN
25
-
26
- The ecosystem will produce several npm-publishable packages under the **`@ebrains`** namespace:
27
-
28
- - **@ebrains/components**: Core reusable UI components.
29
- - **@ebrains/react**: React-specific component library.
30
- - **@ebrains/vue**: Vue-specific component library.
31
- - **@ebrains/angular**: Angular-specific component library.
32
- - **@ebrains/assets**: Shared styles and Tailwind configurations.
33
- - **@ebrains/fonts**: Font resources.
34
- - **@ebrains/svgs**: SVG icons and assets.
35
-
36
- ## Flexibility
37
-
38
- Developers can leverage the `ebrains-ui-ecosystem` by either:
39
-
40
- - Using **npm packages** like `@ebrains/components`, `@ebrains/styles`, etc.
41
- - Including **normal HTML tags** to directly load scripts and styles without strong dependencies.
42
-
43
- Additionally, if consumer applications integrate their efforts under the ecosystem, they will automatically inherit all packages, eliminating the need for separate installations or managing versions.
44
-
45
-
46
- ## How to Run it
47
-
48
- - Clone the repository
49
- - Install NX: `npm install -g nx`
50
- - Install Project Dependencies: `npm install`
51
- - Run the documentation: `nx serve eds-docs`
7
+ Run `nx test react` to execute the unit tests via [Jest](https://jestjs.io).
@@ -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,5 @@
1
+ const arrowRight = `<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
2
+ <path fill="currentColor" d="M2 8.5h9V3l7 7-7 7v-5.5H2v-3Z" />
3
+ </svg>`;
4
+
5
+ export { arrowRight 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,12 @@
1
+ const chevronDown = `<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 d="M10 13L4 7H16L10 13Z" fill="currentColor" />
9
+ </svg>
10
+ `;
11
+
12
+ export { chevronDown as c };
@@ -0,0 +1,11 @@
1
+ const chevronLeft = ` <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 d="M7 10L13 4L13 16L7 10Z" fill="currentColor" />
9
+ </svg>`;
10
+
11
+ export { chevronLeft as c };
@@ -0,0 +1,5 @@
1
+ const chevronRight = ` <svg width="20" height="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
2
+ <path fill="currentColor" d="m13 10-6 6V4l6 6Z" />
3
+ </svg>`;
4
+
5
+ export { chevronRight as c };
@@ -0,0 +1,12 @@
1
+ const chevronUp = `<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 d="M4 13L10 7L16 13L4 13Z" fill="currentColor" />
9
+ </svg>
10
+ `;
11
+
12
+ export { chevronUp as c };
@@ -0,0 +1,5 @@
1
+ const close = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20">
2
+ <path stroke="currentColor" stroke-width="2" d="M16 4 4 16m12 0L4 4" />
3
+ </svg>`;
4
+
5
+ export { close as c };
@@ -0,0 +1,423 @@
1
+ import { c as cva } from './index-39c58238.esm.js';
2
+
3
+ [['eds-header', {
4
+ 'home-url': '/',
5
+ 'user-feature': 'false',
6
+ 'keycloak-url': 'http://localhost:8080',
7
+ 'keycloak-realm': 'nigeor-realm',
8
+ 'keycloak-client-id': 'stencil-app',
9
+ links: JSON.stringify([{
10
+ label: 'About',
11
+ url: '/about'
12
+ }, {
13
+ label: 'Focus Areas',
14
+ url: '/focus-areas'
15
+ }, {
16
+ label: 'News & Events',
17
+ url: '/news-and-events'
18
+ }, {
19
+ label: 'Contact',
20
+ url: '/contact'
21
+ }])
22
+ }], ['eds-block-break', {}], ['eds-footer', {}], ['eds-block-break', {}], ['eds-tabs', {
23
+ tabs: JSON.stringify([{
24
+ label: 'Home',
25
+ url: '#',
26
+ active: true,
27
+ ariaLabel: 'Home Tab'
28
+ }, {
29
+ label: 'Profile',
30
+ url: '#',
31
+ active: false,
32
+ ariaLabel: 'Profile Tab'
33
+ }, {
34
+ label: 'Settings',
35
+ url: '#',
36
+ active: false,
37
+ ariaLabel: 'Settings Tab'
38
+ }])
39
+ }], ['eds-block-break', {}], ['eds-card-section', {
40
+ cards: JSON.stringify([{
41
+ title: 'Card 1',
42
+ description: 'Description 1',
43
+ tags: 'tag1, tag2',
44
+ url: '/link1'
45
+ }, {
46
+ title: 'Card 2',
47
+ description: 'Description 2',
48
+ tags: 'tag3',
49
+ url: '/link2'
50
+ }]),
51
+ cols: '4'
52
+ }], ['eds-block-break', {}], ['eds-link', {
53
+ label: 'Main Link Click Me',
54
+ url: 'https://example.com',
55
+ intent: 'primary'
56
+ }], ['eds-block-break', {}], ['eds-avatar', {
57
+ 'first-name': 'John',
58
+ 'last-name': 'Doe'
59
+ }], ['eds-block-break', {}], ['eds-breadcrumb', {
60
+ items: JSON.stringify([{
61
+ label: 'Home',
62
+ url: '/'
63
+ }, {
64
+ label: 'Products',
65
+ url: '/products'
66
+ }, {
67
+ label: 'Electronics',
68
+ url: '/products/electronics'
69
+ }, {
70
+ label: 'Laptops',
71
+ url: '/products/electronics/laptops'
72
+ }]),
73
+ intent: 'primary'
74
+ }], ['eds-block-break', {}], ['eds-card-generic', {
75
+ 'card-title': 'The Future of AI in Healthcare',
76
+ url: 'https://example.com/ai-healthcare',
77
+ description: 'Explore how AI is transforming the healthcare industry with cutting-edge technologies and research.',
78
+ avatar: 'https://files.ebrains.eu/img/686e0edc-f3be-4d79-aa02-373c32c08d65/ebrains-logo-high-resolution.png?fit=max&q=80&fm=webp&crop=879%2C879%2C597%2C0&w=200',
79
+ 'short-abbreviation': 'AI',
80
+ 'heading-level': 'h2',
81
+ tags: 'Technology,AI,Healthcare',
82
+ tiny: 'false',
83
+ bg: 'true',
84
+ 'with-hover': 'true'
85
+ }], ['eds-block-break', {}], ['eds-code-block', {
86
+ code: 'Hello',
87
+ language: 'javascript'
88
+ }], ['eds-block-break', {}], ['eds-dropdown', {
89
+ 'aria-label': 'More options',
90
+ 'rounded-btn': 'true',
91
+ 'dropdown-pos': 'right',
92
+ 'dropdown-offset': 'true'
93
+ }], ['eds-block-break', {}], ['eds-form', {
94
+ name: 'extended-form',
95
+ endpoint: 'http://127.0.0.1:5000/api/data',
96
+ fields: JSON.stringify([{
97
+ name: 'username',
98
+ label: 'Username',
99
+ type: 'text',
100
+ required: true,
101
+ maxlength: 10
102
+ }, {
103
+ name: 'email',
104
+ label: 'Email',
105
+ type: 'email',
106
+ required: true
107
+ }, {
108
+ name: 'number',
109
+ label: 'Number',
110
+ type: 'number',
111
+ required: true
112
+ }, {
113
+ name: 'password',
114
+ label: 'Password',
115
+ type: 'password',
116
+ required: true,
117
+ maxlength: 50
118
+ }, {
119
+ name: 'date',
120
+ label: 'Date',
121
+ type: 'date',
122
+ required: true
123
+ }, {
124
+ name: 'file',
125
+ label: 'File',
126
+ type: 'file',
127
+ required: false
128
+ }, {
129
+ name: 'hiddenField',
130
+ type: 'hidden',
131
+ value: 'hiddenValue'
132
+ }, {
133
+ name: 'bio',
134
+ label: 'Biography',
135
+ type: 'textarea',
136
+ required: true,
137
+ maxlength: 300
138
+ }, {
139
+ name: 'role',
140
+ label: 'Role',
141
+ type: 'select',
142
+ required: true,
143
+ options: [{
144
+ label: 'Admin',
145
+ value: 'admin'
146
+ }, {
147
+ label: 'Editor',
148
+ value: 'editor'
149
+ }, {
150
+ label: 'Viewer',
151
+ value: 'viewer'
152
+ }]
153
+ }, {
154
+ name: 'preferences',
155
+ type: 'checkbox',
156
+ label: 'Select your preferences',
157
+ options: [{
158
+ value: 'option1',
159
+ label: 'Option 1'
160
+ }, {
161
+ value: 'option2',
162
+ label: 'Option 2'
163
+ }, {
164
+ value: 'option3',
165
+ label: 'Option 3'
166
+ }],
167
+ required: true
168
+ }, {
169
+ name: 'gender',
170
+ type: 'radio',
171
+ label: 'Select your gender',
172
+ options: [{
173
+ value: 'female',
174
+ label: 'Female'
175
+ }, {
176
+ value: 'male',
177
+ label: 'Male'
178
+ }],
179
+ required: true
180
+ }, {
181
+ name: 'newsletter',
182
+ label: 'newsletter',
183
+ type: 'checkbox',
184
+ value: 'subscribe',
185
+ required: true
186
+ }, {
187
+ name: 'range',
188
+ label: 'Range bar',
189
+ type: 'range',
190
+ min: '0',
191
+ max: '10',
192
+ step: '1',
193
+ required: true
194
+ }]),
195
+ 'success-message': 'Form submitted successfully!',
196
+ 'error-message': 'Please fix the errors in the form.',
197
+ 'submit-btn': 'true',
198
+ 'small-alert': 'false',
199
+ 'set-form-url': 'true'
200
+ }], ['eds-block-break', {}], ['eds-img', {
201
+ src: 'https://files.ebrains.eu/img/f999348c-beaa-40f8-ba60-230316d4a947/EBRAINS-BernsteinConference01.jpg',
202
+ alt: 'EBRAINS Bernstein Conference',
203
+ width: '400',
204
+ height: '225',
205
+ srcset: 'https://files.ebrains.eu/img/f999348c-beaa-40f8-ba60-230316d4a947/EBRAINS-BernsteinConference01.jpg 720w, https://files.ebrains.eu/img/f999348c-beaa-40f8-ba60-230316d4a947/EBRAINS-BernsteinConference01.jpg 1080w, https://files.ebrains.eu/img/f999348c-beaa-40f8-ba60-230316d4a947/EBRAINS-BernsteinConference01.jpg 1440w',
206
+ sizes: '(max-width: 600px) 100vw, (max-width: 1200px) 50vw, 33vw',
207
+ formats: JSON.stringify([{
208
+ type: 'image/webp',
209
+ srcset: 'https://files.ebrains.eu/img/f999348c-beaa-40f8-ba60-230316d4a947/EBRAINS-BernsteinConference01.webp 720w, https://files.ebrains.eu/img/f999348c-beaa-40f8-ba60-230316d4a947/EBRAINS-BernsteinConference01.webp 1080w'
210
+ }, {
211
+ type: 'image/jpeg',
212
+ srcset: 'https://files.ebrains.eu/img/f999348c-beaa-40f8-ba60-230316d4a947/EBRAINS-BernsteinConference01.jpg 720w, https://files.ebrains.eu/img/f999348c-beaa-40f8-ba60-230316d4a947/EBRAINS-BernsteinConference01.jpg 1080w'
213
+ }]),
214
+ lazyload: 'true',
215
+ 'with-bg': 'true'
216
+ }], ['eds-block-break', {}], ['eds-input-field', {
217
+ name: 'username',
218
+ 'input-id': 'username',
219
+ label: 'Username',
220
+ placeholder: 'Enter your username',
221
+ required: 'true',
222
+ hint: 'Your unique username',
223
+ message: 'This field is required',
224
+ 'error-message': 'Invalid username',
225
+ type: 'text'
226
+ }], ['eds-block-break', {}], ['eds-pagination', {
227
+ 'current-page': '1',
228
+ 'last-page': '10',
229
+ 'per-page': '5',
230
+ total: '50',
231
+ mode: 'default'
232
+ }], ['eds-block-break', {}], ['eds-progress-bar', {
233
+ value: '75'
234
+ }], ['eds-table', {
235
+ data: JSON.stringify([{
236
+ Property: 'username',
237
+ Type: 'string',
238
+ Required: 'Yes'
239
+ }, {
240
+ Property: 'password',
241
+ Type: 'string',
242
+ Required: 'Yes'
243
+ }, {
244
+ Property: 'email',
245
+ Type: 'string',
246
+ Required: 'No'
247
+ }]),
248
+ config: JSON.stringify({
249
+ Type: {
250
+ format: 'uppercase'
251
+ },
252
+ Property: {
253
+ format: 'code'
254
+ },
255
+ Required: {
256
+ hidden: true
257
+ }
258
+ })
259
+ }], ['eds-block-break', {}], ['eds-tag', {
260
+ label: 'Default Tag',
261
+ intent: 'default'
262
+ }]];
263
+
264
+ // Helper function to check if Matomo is initialized
265
+ function isMatomoAvailable() {
266
+ return typeof window !== 'undefined' && typeof window._paq !== 'undefined';
267
+ }
268
+ // General function to push data to Matomo
269
+ function pushToMatomo(action, ...args) {
270
+ console.log('Pushing Matomo');
271
+ if (isMatomoAvailable()) {
272
+ window._paq.push([action, ...args]);
273
+ } else {
274
+ console.warn('Matomo is not available or not initialized.');
275
+ }
276
+ }
277
+ // Function to send analytics data
278
+ function sendAnalytics(eventData) {
279
+ var _a;
280
+ if (!isMatomoAvailable()) {
281
+ console.warn('Matomo is not available or not initialized.');
282
+ console.log(Object.assign({}, eventData));
283
+ return;
284
+ }
285
+ // Conditionally build the name field
286
+ const nameParts = [];
287
+ if ((_a = eventData.parentContext) === null || _a === void 0 ? void 0 : _a.componentName) {
288
+ nameParts.push(eventData.parentContext.componentName);
289
+ }
290
+ nameParts.push(eventData.tag || 'unknown-tag');
291
+ nameParts.push(eventData.name || 'unknown-name');
292
+ const name = nameParts.join('/');
293
+ //console.log('trackEvent', eventData.category, eventData.action, name)
294
+ pushToMatomo('trackEvent', eventData.category, eventData.action, name);
295
+ console.log(Object.assign({}, eventData));
296
+ }
297
+ // Function to opt-in the user
298
+ function matomoOptIn() {
299
+ if (isMatomoAvailable()) {
300
+ window._paq.push(['rememberConsentGiven']);
301
+ console.log('User has opted in to tracking');
302
+ }
303
+ }
304
+ const GRADIANT_TOKENS = ['green', 'yellow', 'among-blue', 'purple'];
305
+ const gradientBGColorVariants = cva([], {
306
+ variants: {
307
+ color: GRADIANT_TOKENS.reduce((acc, token) => Object.assign(Object.assign({}, acc), {
308
+ [token]: ''
309
+ }), {}),
310
+ direction: {
311
+ top: '',
312
+ bottom: ''
313
+ },
314
+ pseudo: {
315
+ true: 'before:effect-opacity effect-bg-behind',
316
+ false: ''
317
+ },
318
+ hover: {
319
+ true: 'before:opacity-0 hover:before:opacity-100',
320
+ false: ''
321
+ }
322
+ },
323
+ compoundVariants: [
324
+ // region GREEN
325
+ {
326
+ color: 'green',
327
+ direction: 'top',
328
+ pseudo: true,
329
+ className: 'before:bg-gradient-01-top'
330
+ }, {
331
+ color: 'green',
332
+ pseudo: true,
333
+ direction: 'bottom',
334
+ className: 'before:bg-gradient-01-bottom'
335
+ }, {
336
+ color: 'green',
337
+ direction: 'top',
338
+ pseudo: false,
339
+ className: 'bg-gradient-01-top'
340
+ }, {
341
+ color: 'green',
342
+ pseudo: false,
343
+ direction: 'bottom',
344
+ className: 'bg-gradient-01-bottom'
345
+ },
346
+ // endregion
347
+ // region YELLOW
348
+ {
349
+ color: 'yellow',
350
+ direction: 'top',
351
+ pseudo: true,
352
+ className: 'before:bg-gradient-02-top'
353
+ }, {
354
+ color: 'yellow',
355
+ direction: 'bottom',
356
+ pseudo: true,
357
+ className: 'before:bg-gradient-02-bottom'
358
+ }, {
359
+ color: 'yellow',
360
+ direction: 'top',
361
+ pseudo: false,
362
+ className: 'bg-gradient-02-top'
363
+ }, {
364
+ color: 'yellow',
365
+ direction: 'bottom',
366
+ pseudo: false,
367
+ className: 'bg-gradient-02-bottom'
368
+ },
369
+ // endregion
370
+ // region PURPLE
371
+ {
372
+ color: 'purple',
373
+ direction: 'top',
374
+ pseudo: true,
375
+ class: 'before:bg-gradient-03-top'
376
+ }, {
377
+ color: 'purple',
378
+ direction: 'bottom',
379
+ pseudo: true,
380
+ class: 'before:bg-gradient-03-bottom'
381
+ }, {
382
+ color: 'purple',
383
+ direction: 'top',
384
+ pseudo: false,
385
+ class: 'bg-gradient-03-top'
386
+ }, {
387
+ color: 'purple',
388
+ direction: 'bottom',
389
+ pseudo: false,
390
+ class: 'bg-gradient-03-bottom'
391
+ },
392
+ // endregion
393
+ // region AMONG-BLUE
394
+ {
395
+ color: 'among-blue',
396
+ direction: 'top',
397
+ pseudo: true,
398
+ class: 'before:bg-gradient-04-top'
399
+ }, {
400
+ color: 'among-blue',
401
+ direction: 'bottom',
402
+ pseudo: true,
403
+ class: 'before:bg-gradient-04-bottom'
404
+ }, {
405
+ color: 'among-blue',
406
+ direction: 'top',
407
+ pseudo: false,
408
+ class: 'bg-gradient-04-top'
409
+ }, {
410
+ color: 'among-blue',
411
+ direction: 'bottom',
412
+ pseudo: false,
413
+ class: 'bg-gradient-04-bottom'
414
+ }
415
+ // endregion
416
+ ],
417
+ defaultVariants: {
418
+ direction: 'top',
419
+ pseudo: true
420
+ }
421
+ });
422
+
423
+ export { gradientBGColorVariants as g, matomoOptIn as m, sendAnalytics as s };