@ebrains/react 2.4.0 → 3.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.
Files changed (130) hide show
  1. package/color-primary-palette_6.entry.esm.js +106 -106
  2. package/components-section.entry.esm.js +1 -1
  3. package/correct-use-of-colors.entry.esm.js +33 -33
  4. package/docs-palettes.entry.esm.js +1 -1
  5. package/docs-tokens.entry.esm.js +1 -1
  6. package/eds-accordion_52.entry.esm.js +1823 -0
  7. package/eds-app-root.entry.esm.js +4 -4
  8. package/eds-cookies-preference.entry.esm.js +3 -3
  9. package/eds-feedback.entry.esm.js +5 -5
  10. package/eds-frame.entry.esm.js +7 -7
  11. package/eds-gauge.entry.esm.js +8 -9
  12. package/eds-gitlab-contributors.entry.esm.js +277 -0
  13. package/eds-icon-bluesky.entry.esm.js +1 -1
  14. package/eds-icon-eu.entry.esm.js +2 -2
  15. package/eds-icon-facebook.entry.esm.js +1 -1
  16. package/eds-icon-gitlab.entry.esm.js +1 -1
  17. package/eds-icon-linkedin.entry.esm.js +1 -1
  18. package/eds-icon-mastodon.entry.esm.js +1 -1
  19. package/eds-icon-twitter.entry.esm.js +1 -1
  20. package/eds-icon-youtube.entry.esm.js +1 -1
  21. package/eds-modal.entry.esm.js +88 -31
  22. package/eds-pie.entry.esm.js +38 -4
  23. package/eds-section-core_2.entry.esm.js +5 -5
  24. package/eds-splash-screen.entry.esm.js +4 -12
  25. package/eds-timeline.entry.esm.js +8 -14
  26. package/eds-toast-manager.entry.esm.js +1 -1
  27. package/eu-8ac3e99c.esm.js +7 -0
  28. package/incorrect-use-of-colors.entry.esm.js +8 -8
  29. package/index.esm.js +1 -1
  30. package/index.esm2.js +14 -143
  31. package/logo-space.entry.esm.js +138 -17
  32. package/logo-variations-horizontal_2.entry.esm.js +28 -54
  33. package/logo-variations-tabs.entry.esm.js +1 -1
  34. package/logo-wrong-usage.entry.esm.js +33 -33
  35. package/negative-84eec72e.esm.js +104 -0
  36. package/package.json +1 -1
  37. package/positive-cc986d7c.esm.js +65 -0
  38. package/src/components.d.ts +8 -2
  39. package/src/generated/components.d.ts +0 -1
  40. package/svg-repository.entry.esm.js +7 -254
  41. package/token-list_3.entry.esm.js +79 -51
  42. package/token-ratios.entry.esm.js +3 -3
  43. package/token-spacing.entry.esm.js +26 -26
  44. package/token-typography.entry.esm.js +88 -79
  45. package/arrow-diagonal-black-8f0494c3.esm.js +0 -3
  46. package/arrow-right-9322ba8a.esm.js +0 -5
  47. package/bin-37cad2f0.esm.js +0 -3
  48. package/bookmark-c200037c.esm.js +0 -16
  49. package/chevron-down-6144c823.esm.js +0 -12
  50. package/chevron-left-ca6c66e1.esm.js +0 -11
  51. package/chevron-right-b88ed2d4.esm.js +0 -5
  52. package/chevron-up-c66bd477.esm.js +0 -12
  53. package/clone-dab56639.esm.js +0 -3
  54. package/close-87fc0d63.esm.js +0 -5
  55. package/copy-03b72cb6.esm.js +0 -5
  56. package/download-47746956.esm.js +0 -18
  57. package/draft-dd5dada2.esm.js +0 -3
  58. package/edit-3893a517.esm.js +0 -3
  59. package/eds-accordion_37.entry.esm.js +0 -1201
  60. package/eds-card-desc_2.entry.esm.js +0 -85
  61. package/eds-card-generic.entry.esm.js +0 -116
  62. package/eds-card-project.entry.esm.js +0 -209
  63. package/eds-card-section.entry.esm.js +0 -56
  64. package/eds-card-tags.entry.esm.js +0 -27
  65. package/eds-card-tool.entry.esm.js +0 -105
  66. package/eds-footer.entry.esm.js +0 -135
  67. package/eds-fullscreen-menu.entry.esm.js +0 -143
  68. package/eds-icon-arrow-diagonal.entry.esm.js +0 -21
  69. package/eds-icon-arrow-right.entry.esm.js +0 -21
  70. package/eds-icon-bin.entry.esm.js +0 -21
  71. package/eds-icon-bookmark.entry.esm.js +0 -21
  72. package/eds-icon-chevron-down.entry.esm.js +0 -21
  73. package/eds-icon-chevron-left.entry.esm.js +0 -21
  74. package/eds-icon-chevron-right.entry.esm.js +0 -21
  75. package/eds-icon-chevron-up.entry.esm.js +0 -21
  76. package/eds-icon-clone.entry.esm.js +0 -21
  77. package/eds-icon-close.entry.esm.js +0 -21
  78. package/eds-icon-copy.entry.esm.js +0 -21
  79. package/eds-icon-download.entry.esm.js +0 -21
  80. package/eds-icon-draft.entry.esm.js +0 -21
  81. package/eds-icon-edit.entry.esm.js +0 -21
  82. package/eds-icon-external.entry.esm.js +0 -21
  83. package/eds-icon-loader.entry.esm.js +0 -21
  84. package/eds-icon-menu.entry.esm.js +0 -21
  85. package/eds-icon-minus.entry.esm.js +0 -21
  86. package/eds-icon-more.entry.esm.js +0 -21
  87. package/eds-icon-paper.entry.esm.js +0 -21
  88. package/eds-icon-plus.entry.esm.js +0 -21
  89. package/eds-icon-portal.entry.esm.js +0 -21
  90. package/eds-icon-private.entry.esm.js +0 -21
  91. package/eds-icon-public.entry.esm.js +0 -21
  92. package/eds-icon-search.entry.esm.js +0 -21
  93. package/eds-icon-star.entry.esm.js +0 -21
  94. package/eds-icon-start.entry.esm.js +0 -21
  95. package/eds-icon-success.entry.esm.js +0 -21
  96. package/eds-icon-thumbs-down.entry.esm.js +0 -21
  97. package/eds-icon-thumbs-up.entry.esm.js +0 -21
  98. package/eds-icon-tutorial.entry.esm.js +0 -21
  99. package/eds-icon-unknown.entry.esm.js +0 -21
  100. package/eds-icon-updown.entry.esm.js +0 -21
  101. package/eds-icon-user.entry.esm.js +0 -21
  102. package/eds-icon-view.entry.esm.js +0 -21
  103. package/eds-progress-bar.entry.esm.js +0 -52
  104. package/eds-social-networks.entry.esm.js +0 -73
  105. package/eds-trl.entry.esm.js +0 -68
  106. package/eu-9ddde93a.esm.js +0 -30
  107. package/index-39c58238.esm.js +0 -58
  108. package/loader-c9628637.esm.js +0 -30
  109. package/logo-color-7f1fd803.esm.js +0 -115
  110. package/logo-color-margins-ff8ce71b.esm.js +0 -118
  111. package/logo-white-no-bg-f382f86f.esm.js +0 -1021
  112. package/menu-340ea948.esm.js +0 -11
  113. package/minus-b30a7c71.esm.js +0 -11
  114. package/more-4449d549.esm.js +0 -13
  115. package/paper-8e74ea31.esm.js +0 -15
  116. package/plus-89c07be2.esm.js +0 -12
  117. package/portal-d6c8ce56.esm.js +0 -18
  118. package/private-1c25ff8e.esm.js +0 -25
  119. package/public-d4d8c585.esm.js +0 -16
  120. package/search-fbcd79c2.esm.js +0 -12
  121. package/star-0da9b5e9.esm.js +0 -5
  122. package/start-65126a4f.esm.js +0 -3
  123. package/success-443809da.esm.js +0 -18
  124. package/thumbs-down-a18fd049.esm.js +0 -5
  125. package/thumbs-up-c19a71bc.esm.js +0 -6
  126. package/tutotial-150ee1fd.esm.js +0 -27
  127. package/unknown-ed01a24c.esm.js +0 -22
  128. package/up-and-down-8b69ca97.esm.js +0 -12
  129. package/user-71ebdc15.esm.js +0 -16
  130. package/view-e900f2d4.esm.js +0 -3
@@ -1,85 +0,0 @@
1
- import { r as registerInstance, h } from './index.esm2.js';
2
- import 'react';
3
- import 'react/jsx-runtime';
4
- import 'react-dom';
5
-
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
- const EdsCardDescStyle0 = edsCardDescCss;
8
- const EdsCardDesc = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.description = undefined;
12
- this.truncate = true;
13
- this.truncateLines = '3';
14
- }
15
- getTruncateClass() {
16
- return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
17
- }
18
- render() {
19
- return h("p", {
20
- key: '3711e4f24ad19f1dedef3083b9b9c8868f3b4e3f',
21
- class: "text-light f-ui-03-light"
22
- }, h("span", {
23
- key: '46b53c5111bc05ffaaa6f8fcd4b1b6ddfae2d413',
24
- class: this.getTruncateClass()
25
- }, this.description));
26
- }
27
- };
28
- EdsCardDesc.style = EdsCardDescStyle0;
29
- const edsCardTitleCss = "a{all:unset;display:inline;color:inherit;text-decoration:none;cursor:pointer}h1,h2,h3,h4,h5,h6{margin:0}.f-heading-01{font-family:var(--f-heading-01-fontFamily);font-weight:var(--f-heading-01-fontWeight);font-size:var(--f-heading-01-fontSize);line-height:var(--f-heading-01-lineHeight);letter-spacing:var(--f-heading-01-letterSpacing)}.f-heading-02{font-family:var(--f-heading-02-fontFamily);font-weight:var(--f-heading-02-fontWeight);font-size:var(--f-heading-02-fontSize);line-height:var(--f-heading-02-lineHeight);letter-spacing:var(--f-heading-02-letterSpacing)}.f-heading-03{font-family:var(--f-heading-03-fontFamily);font-weight:var(--f-heading-03-fontWeight);font-size:var(--f-heading-03-fontSize);line-height:var(--f-heading-03-lineHeight);letter-spacing:var(--f-heading-03-letterSpacing)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.f-heading-06{font-family:var(--f-heading-06-fontFamily);font-weight:var(--f-heading-06-fontWeight);font-size:var(--f-heading-06-fontSize);line-height:var(--f-heading-06-lineHeight);letter-spacing:var(--f-heading-06-letterSpacing)}.break-words{overflow-wrap:break-word}.after\\:absolute::after{position:absolute}.after\\:inset-0::after{inset:0rem}.after\\:z-10::after{z-index:10}.after\\:content-\\[\\'\\'\\]::after{--tw-content:'';content:var(--tw-content)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}";
30
- const EdsCardTitleStyle0 = edsCardTitleCss;
31
- const EdsCardTitle = class {
32
- constructor(hostRef) {
33
- registerInstance(this, hostRef);
34
- this.url = undefined;
35
- this.titleClass = undefined;
36
- this.headingLevel = 'h3';
37
- this.externalLink = false;
38
- this.cardTitle = undefined;
39
- this.hierarchy = true;
40
- }
41
- /**
42
- * Dynamically generate the title class based on the heading level.
43
- */
44
- getTitleClass() {
45
- const levelMap = this.hierarchy ? {
46
- h1: '05',
47
- h2: '05',
48
- h3: '05',
49
- h4: '05',
50
- h5: '05',
51
- h6: '06'
52
- } : {
53
- h1: '01',
54
- h2: '02',
55
- h3: '03',
56
- h4: '04',
57
- h5: '05',
58
- h6: '06'
59
- };
60
- return `f-heading-${levelMap[this.headingLevel]}`;
61
- }
62
- /*private getTag() {
63
- if (this.url) {
64
- return 'a';
65
- }
66
- return 'span';
67
- }*/
68
- render() {
69
- //const Tag = this.getTag();
70
- const Heading = this.headingLevel;
71
- return h(Heading, {
72
- key: '5d356d301cfee459ac142895a042e9b1ccd59367',
73
- class: this.getTitleClass()
74
- }, h("a", {
75
- key: '348fffdd2abccf3b08ecab9481718b4a2aa50807',
76
- class: "break-words after:absolute after:inset-0 after:z-10 after:content-[''] focus:outline-none",
77
- href: this.url,
78
- target: this.externalLink ? '_blank' : undefined,
79
- rel: this.externalLink ? 'noopener noreferrer' : undefined
80
- }, this.cardTitle));
81
- }
82
- };
83
- EdsCardTitle.style = EdsCardTitleStyle0;
84
-
85
- export { EdsCardDesc as eds_card_desc, EdsCardTitle as eds_card_title };
@@ -1,116 +0,0 @@
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 { s as sendAnalytics } from './analytics-d99780e3.esm.js';
4
- import 'react';
5
- import 'react/jsx-runtime';
6
- import 'react-dom';
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}.flex-wrap{flex-wrap:wrap}.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-8{margin-bottom:0.5rem}.mb-10{margin-bottom:0.625rem}.mb-12{margin-bottom:0.75rem}.mx-auto{margin-left:auto;margin-right:auto}.block{display:block}";
9
- const EdsCardGenericStyle0 = edsCardGenericCss;
10
- const EdsCardGeneric = class {
11
- constructor(hostRef) {
12
- registerInstance(this, hostRef);
13
- this.parentContext = null; // Accepts the entire event detail or null
14
- this.cardTitle = undefined;
15
- this.url = undefined;
16
- this.description = undefined;
17
- this.image = undefined;
18
- this.avatar = undefined;
19
- this.shortAbbreviation = undefined;
20
- this.headingLevel = 'h3';
21
- this.tags = [];
22
- this.tiny = false;
23
- this.bg = true;
24
- this.withHover = true;
25
- this.hierarchy = true;
26
- this.parsedImage = null;
27
- }
28
- componentWillLoad() {
29
- if (this.image) {
30
- try {
31
- if (typeof this.image === 'object') {
32
- // If image is already an object, assign it directly
33
- this.parsedImage = this.image;
34
- } else if (typeof this.image === 'string') {
35
- // If image is a string, try to parse it
36
- this.parsedImage = JSON.parse(this.image);
37
- }
38
- } catch (error) {
39
- // eslint-disable-next-line
40
- console.error('Error parsing image prop:', error);
41
- this.parsedImage = {}; // Assign a fallback empty object in case of an error
42
- }
43
- }
44
- }
45
- handleParentContext(event) {
46
- if (event.target !== this.el) {
47
- // Ignore the event if it's not targeted at this specific instance
48
- return;
49
- }
50
- this.parentContext = event.detail;
51
- event.stopPropagation();
52
- }
53
- /**
54
- * Parses the `tags` prop into an array of link objects.
55
- * Returns an empty array if parsing fails or if `tags` is not a valid JSON string or object.
56
- *
57
- * @returns {any[]} Array of parsed link objects
58
- */
59
- get parsedTags() {
60
- return parseData(this.tags);
61
- }
62
- articleClasses() {
63
- return [this.description ? this.tiny ? 'min-h-120' : 'min-h-156' : 'h-auto', this.bg ? 'bg-inverse' : 'bg-default', this.withHover ? 'effect-shadow hover:shadow-hover cursor-pointer' : '', 'border-softer effect-focus-within relative flex grow flex-col rounded-lg border-2 p-16'].join(' ');
64
- }
65
- handleClick() {
66
- var _a;
67
- sendAnalytics({
68
- category: 'ui-component',
69
- parentContext: this.parentContext,
70
- tag: this.el.tagName.toLowerCase(),
71
- name: ((_a = this.cardTitle) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
72
- action: 'click'
73
- });
74
- }
75
- render() {
76
- return h("article", {
77
- key: '76e77261a0c6e0c506fe7600d31a492808293d27',
78
- class: this.articleClasses(),
79
- onClick: () => this.handleClick()
80
- }, h("eds-card-title", {
81
- key: 'ca26508b05a31310df7fc0c3fa5769f7947e80fc',
82
- "heading-level": this.headingLevel,
83
- titleClass: this.image ? 'f-ui-01' : undefined,
84
- "card-title": this.cardTitle,
85
- url: this.url,
86
- hierarchy: this.hierarchy
87
- }), h("div", {
88
- key: '00ba325e6a0093cb2be35854f2bcb579ad4eb35b',
89
- class: "mt-8 mb-8"
90
- }, this.description && h("eds-card-desc", {
91
- key: '2d775f772092b7873dd1eabc7c3e8606dded0c47',
92
- "truncate-lines": "3",
93
- description: this.description
94
- })), this.parsedImage ? h("eds-img", Object.assign({
95
- class: "mt-8 block mx-auto"
96
- }, this.parsedImage)) : this.avatar || this.shortAbbreviation ? h("eds-avatar", {
97
- class: "order-first mb-12",
98
- picture: this.avatar,
99
- initials: this.shortAbbreviation
100
- }) : null, h("div", {
101
- key: 'e51237f8196212715d1d97ae1e6bfc2625573cb3',
102
- class: "flex flex-wrap gap-y-4 gap-x-1"
103
- }, this.parsedTags.map((tag, index) => h("eds-tag", {
104
- key: index,
105
- intent: tag.style,
106
- label: tag.label,
107
- size: tag.size
108
- }))), ' ');
109
- }
110
- get el() {
111
- return getElement(this);
112
- }
113
- };
114
- EdsCardGeneric.style = EdsCardGenericStyle0;
115
-
116
- export { EdsCardGeneric as eds_card_generic };
@@ -1,209 +0,0 @@
1
- import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
- import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
3
- import { c as cva } from './index-39c58238.esm.js';
4
- import 'react';
5
- import 'react/jsx-runtime';
6
- import 'react-dom';
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
- });
126
- const EdsCardProject = class {
127
- constructor(hostRef) {
128
- registerInstance(this, hostRef);
129
- this.image = undefined;
130
- this.editorialTitle = undefined;
131
- this.headingLevel = 'h3';
132
- this.categoryTitle = undefined;
133
- this.color = undefined;
134
- this.bgOnHover = false;
135
- this.vertical = false;
136
- this.titleProject = undefined;
137
- this.url = undefined;
138
- this.parsedImage = null;
139
- }
140
- componentWillLoad() {
141
- // Parse the image prop if it's provided
142
- if (this.image) {
143
- try {
144
- this.parsedImage = JSON.parse(this.image);
145
- } catch (error) {
146
- //console.error('Error parsing image prop:', error);
147
- }
148
- }
149
- }
150
- handleClick(event) {
151
- var _a;
152
- event.preventDefault();
153
- sendAnalytics({
154
- category: 'ui-component',
155
- tag: this.el.tagName.toLowerCase(),
156
- name: ((_a = this.titleProject) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
157
- action: 'click'
158
- });
159
- }
160
- render() {
161
- var _a;
162
- const cardClasses = ['min-h-156 border-inside after:border-softest @container overflow-hidden border-0 after:rounded-lg', this.color ? gradientBGColorVariants({
163
- color: this.color,
164
- hover: this.bgOnHover,
165
- class: 'before:border-2 before:rounded-lg before:border-softest'
166
- }) : '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(' ');
167
- const imageClasses = this.vertical ? '' : 'max-w-120 @md:max-w-192 order-first w-full lg:order-last';
168
- return h("article", {
169
- key: '5f72c2dc52a8ef7edb004c6cf9a2035097c5aa28',
170
- class: cardClasses,
171
- onClick: event => this.handleClick(event)
172
- }, h("div", {
173
- key: '145809ee5e4800d852bb6d9b84a023160098f3c4',
174
- class: `flex grow flex-col ${this.vertical ? 'min-h-156' : ''}`
175
- }, h("div", {
176
- key: '3d77551f7518cf63f16daffc7d59a2dd23b66148',
177
- class: "lg:max-w-[720px]"
178
- }, h("eds-card-title", {
179
- key: '715a73ee7a013d13ef5e9f3f180eedf043998d76',
180
- "heading-level": this.headingLevel,
181
- titleClass: this.image ? 'f-ui-01' : undefined,
182
- "card-title": this.titleProject,
183
- url: this.url
184
- }), this.editorialTitle && h("span", {
185
- key: '418fc9fe39b480f4d1c9e99f2ef4361a6ad3827f',
186
- class: `block ${this.vertical ? 'f-ui-02' : 'mt-4 f-heading-06'}`
187
- }, this.editorialTitle)), this.categoryTitle && h("div", {
188
- key: '58764ae4d610e2d1205cf09b7274a14a8bfb5694',
189
- class: "mt-auto flex items-center gap-x-12 pt-12"
190
- }, ((_a = this.categoryTitle) === null || _a === void 0 ? void 0 : _a.length) && h("eds-tag", {
191
- key: 'c552bbc88aca3e3b114aef1fbd3e3bdf3e334624',
192
- label: this.categoryTitle
193
- }))), this.parsedImage && h("div", {
194
- key: '3e85ad957b7d782cc228a508ce8e76ccb7490a9c',
195
- class: imageClasses
196
- }, h("div", {
197
- key: '77e161fd2deb2c6ec3e30ad0ef34f934ba9197d1',
198
- class: "aspect-1x1 w-full"
199
- }, h("eds-img", Object.assign({
200
- key: 'e9f0f4982bddba64ee979490024af471f4e9d8f8',
201
- sizes: this.vertical ? this.parsedImage.sizes || '' : '192px'
202
- }, this.parsedImage)))));
203
- }
204
- get el() {
205
- return getElement(this);
206
- }
207
- };
208
-
209
- export { EdsCardProject as eds_card_project };
@@ -1,56 +0,0 @@
1
- import { r as registerInstance, h } 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 edsCardSectionCss = "ol,ul,menu{list-style:none;margin:0;padding:0}.w-full{width:100%}.grid-layout{display:grid;grid-template-columns:repeat(var(--container-grid-columns, var(--grid-columns)), 1fr);grid-gap:var(--inner-gutter)}.grid-cols-4{grid-template-columns:repeat(4, minmax(0, 1fr))}.grid-cols-4[class*=\"grid-line-x\"][class*=\"grid-line-x\"]>*:nth-child(n)::before{border-bottom-width:1px}.grid-cols-4[class*=\"grid-line-xfull\"]>*:nth-child(n)::before{inset-inline-start:calc(var(--inner-gutter) / -2);inset-inline-end:calc(var(--inner-gutter) / -2)}.grid-cols-4[class*=\"grid-line-x\"]>*:nth-child(4n+1)::before{inset-inline-start:0}.grid-cols-4[class*=\"grid-line-x\"]>*:nth-child(4n+4)::before{inset-inline-end:0}.grid-cols-4[class*=\"grid-line-x\"]>*:nth-child(4n+1):nth-last-child(-n+4)::before{border-bottom-width:0}.grid-cols-4[class*=\"grid-line-x\"]>*:nth-child(4n+1):nth-last-child(-n+4)~*::before{border-bottom-width:0}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(n)::after{border-inline-end-width:1px}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(4n+4)::after{border-inline-end-width:0}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(-n+4)::after{top:0}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(4n+1):nth-last-child(-n+4)::after{bottom:0}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(4n+1):nth-last-child(-n+4)~li::after{bottom:0}.grid-col-span-4{--container-grid-columns:4;grid-column:span 4 / span 4}.gap-y-4{row-gap:0.25rem}.gap-y-8{row-gap:0.5rem}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}@media (min-width: 750px){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:gap-y-12{row-gap:0.75rem}.md\\:pt-28{padding-top:1.75rem}}@media (min-width: 750px){.md\\:grid-col-span-1{--container-grid-columns:1;grid-column:span 1 / span 1}.md\\:grid-col-span-2{--container-grid-columns:2;grid-column:span 2 / span 2}.md\\:grid-col-span-3{--container-grid-columns:3;grid-column:span 3 / span 3}.md\\:grid-col-span-4{--container-grid-columns:4;grid-column:span 4 / span 4}.md\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * 100%) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.cols-container>.md\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * (100% - var(--inner-gutter))) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.md\\:w-10-cols>*{--container-grid-columns:10}}@media (min-width: 900px){.lg\\:grid-col-span-5{--container-grid-columns:5;grid-column:span 5 / span 5}.lg\\:grid-col-span-6{--container-grid-columns:6;grid-column:span 6 / span 6}.lg\\:grid-col-start-7{grid-column-start:7}.lg\\:w-8-cols{width:calc(((8 / var(--container-grid-columns, var(--grid-columns))) * 100%) - (var(--inner-gutter) - (8 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.cols-container>.lg\\:w-8-cols{width:calc(((8 / var(--container-grid-columns, var(--grid-columns))) * (100% - var(--inner-gutter))) - (var(--inner-gutter) - (8 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.lg\\:w-8-cols>*{--container-grid-columns:8}.lg\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * 100%) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.cols-container>.lg\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * (100% - var(--inner-gutter))) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.lg\\:w-10-cols>*{--container-grid-columns:10}}@media (min-width: 900px){.lg\\:order-last{order:9999}.lg\\:order-none{order:0}.lg\\:mt-0{margin-top:0rem}.lg\\:block{display:block}.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:w-\\[150px\\]{width:150px}.lg\\:w-auto{width:auto}.lg\\:max-w-\\[720px\\]{max-width:720px}.lg\\:flex-row{flex-direction:row}.lg\\:flex-nowrap{flex-wrap:nowrap}.lg\\:gap-y-16{row-gap:1rem}.lg\\:px-28{padding-left:1.75rem;padding-right:1.75rem}.lg\\:\\!pl-12{padding-left:0.75rem !important}.lg\\:\\!pr-12{padding-right:0.75rem !important}}";
8
- const EdsCardSectionStyle0 = edsCardSectionCss;
9
- const EdsCardSection = class {
10
- constructor(hostRef) {
11
- registerInstance(this, hostRef);
12
- this.cards = [];
13
- this.occupyCols = 1;
14
- }
15
- /**
16
- * Parses the `cards` JSON string prop into an array of card objects.
17
- * If parsing fails, returns an empty array.
18
- *
19
- * @returns {any[]} An array of parsed card objects.
20
- */
21
- get parsedCards() {
22
- return parseData(this.cards);
23
- }
24
- /**
25
- * Renders the card section as a grid layout.
26
- * Each parsed card object is mapped to an `<eds-card-generic>` component,
27
- * displaying card details such as title, description, avatar, etc.
28
- *
29
- * @returns {JSX.Element} The rendered section containing a list of cards.
30
- */
31
- render() {
32
- return h("section", {
33
- key: '4b30b9eb2585350196efa901f5b36d903e43af4d',
34
- class: "w-full"
35
- }, h("ul", {
36
- key: 'ab51c67c0f4095e70be1b1c2fdf9975726b50760',
37
- class: "grid-layout grid-cols-4 gap-y-8 md:gap-y-12 lg:gap-y-16"
38
- }, this.parsedCards.map(card => h("li", {
39
- class: `grid-col-span-4 md:grid-col-span-${this.occupyCols} flex flex-col`
40
- }, h("eds-card-generic", {
41
- cardTitle: card.title,
42
- description: card.description,
43
- avatar: card.avatar,
44
- headingLevel: card.headingLevel,
45
- tags: card.tags,
46
- url: card.url,
47
- bg: card.bg,
48
- tiny: card.tiny,
49
- image: card.image,
50
- withHover: card.withHover
51
- })))));
52
- }
53
- };
54
- EdsCardSection.style = EdsCardSectionStyle0;
55
-
56
- export { EdsCardSection as eds_card_section };
@@ -1,27 +0,0 @@
1
- import { r as registerInstance, h } from './index.esm2.js';
2
- import 'react';
3
- import 'react/jsx-runtime';
4
- import 'react-dom';
5
-
6
- const edsCardTagsCss = ".flex{display:flex}.flex-wrap{flex-wrap:wrap}.gap-y-4{row-gap:0.25rem}";
7
- const EdsCardTagsStyle0 = edsCardTagsCss;
8
- const EdsCardTags = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.accent = false;
12
- this.tags = [];
13
- }
14
- render() {
15
- return h("div", {
16
- key: 'a0184d0900e08d0ae48dd4d2164c9d7ca0ef8db1',
17
- class: "flex flex-wrap gap-y-4"
18
- }, this.tags.map((tag, index) => h("eds-tag", {
19
- key: index,
20
- intent: this.accent ? 'accent' : 'default',
21
- label: tag
22
- })));
23
- }
24
- };
25
- EdsCardTags.style = EdsCardTagsStyle0;
26
-
27
- export { EdsCardTags as eds_card_tags };
@@ -1,105 +0,0 @@
1
- import { r as registerInstance, 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 edsCardToolCss = ".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-y-4{row-gap:0.25rem}.order-first{order:-9999}.mb-10{margin-bottom:0.625rem}.mb-12{margin-bottom:0.75rem}";
8
- const EdsCardToolStyle0 = edsCardToolCss;
9
- const EdsCardTool = class {
10
- constructor(hostRef) {
11
- registerInstance(this, hostRef);
12
- this.cardTitle = undefined;
13
- this.url = undefined;
14
- this.description = undefined;
15
- this.image = undefined;
16
- this.avatar = undefined;
17
- this.shortAbbreviation = undefined;
18
- this.headingLevel = 'h5';
19
- this.tags = '';
20
- this.tiny = false;
21
- this.bg = true;
22
- this.withHover = true;
23
- this.external = false;
24
- this.hierarchy = true;
25
- }
26
- /**
27
- * Parses the `tags` prop into an array of link objects.
28
- * Returns an empty array if parsing fails or if `tags` is not a valid JSON string or object.
29
- *
30
- * @returns {any[]} Array of parsed link objects
31
- */
32
- get parsedTags() {
33
- if (typeof this.tags === 'object') {
34
- return this.tags;
35
- } else if (typeof this.tags === 'string') {
36
- try {
37
- return JSON.parse(this.tags);
38
- } catch (e) {
39
- // eslint-disable-next-line
40
- console.error('Error parsing links prop:', e);
41
- return [];
42
- }
43
- }
44
- return [];
45
- }
46
- componentWillLoad() {}
47
- parseTags() {
48
- return this.tags.split(',');
49
- }
50
- articleClasses() {
51
- return [this.tiny ? 'min-h-120' : 'min-h-156', this.bg ? 'bg-inverse' : 'bg-default', this.withHover ? 'effect-shadow hover:shadow-hover cursor-pointer' : '', 'border-softer effect-focus-within relative flex grow flex-col rounded-lg border-2 p-16'].join(' ');
52
- }
53
- handleClick() {
54
- var _a;
55
- //event.preventDefault();
56
- sendAnalytics({
57
- category: 'ui-component',
58
- tag: this.el.tagName.toLowerCase(),
59
- name: ((_a = this.cardTitle) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
60
- action: 'click'
61
- });
62
- }
63
- render() {
64
- return h("article", {
65
- key: 'bde34da77105309a05bf36cc1cf24888e62dc826',
66
- class: `${this.el.tagName.toLowerCase()} ${this.articleClasses()}`,
67
- onClick: () => this.handleClick()
68
- }, h("eds-card-title", {
69
- key: '521f11ef8f9f13cdc35b27e45e20d0bec81cc3f8',
70
- "heading-level": this.headingLevel,
71
- titleClass: this.image ? 'f-ui-01' : undefined,
72
- "card-title": this.cardTitle,
73
- url: this.url,
74
- "external-link": this.external,
75
- hierarchy: this.hierarchy
76
- }), this.description && h("eds-card-desc", {
77
- key: '615ccb630818a49e278f1308aa95caec3a02e3fe',
78
- class: "mt-8",
79
- "truncate-lines": "3",
80
- description: this.description
81
- }), this.image ? h("eds-img", {
82
- src: this.image,
83
- alt: "Sample Image",
84
- width: 200,
85
- height: 150
86
- }) : this.avatar || this.shortAbbreviation ? h("eds-avatar", {
87
- class: "order-first mb-12",
88
- picture: this.avatar,
89
- initials: this.shortAbbreviation
90
- }) : null, h("div", {
91
- key: '40cfa7d940136d4bce5de0c2b37fca91187110f8',
92
- class: "flex flex-wrap gap-y-4"
93
- }, this.parsedTags.map((tag, index) => h("eds-tag", {
94
- key: index,
95
- intent: tag.style,
96
- label: tag.label
97
- }))));
98
- }
99
- get el() {
100
- return getElement(this);
101
- }
102
- };
103
- EdsCardTool.style = EdsCardToolStyle0;
104
-
105
- export { EdsCardTool as eds_card_tool };