@ebrains/react 0.2.0-alpha.0 → 0.4.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 (48) hide show
  1. package/{color-0ba8ed56.esm.js → color-bb472c37.esm.js} +2 -2
  2. package/color-primary-palette_6.entry.esm.js +106 -106
  3. package/correct-use-of-colors.entry.esm.js +57 -57
  4. package/{eds-alert_28.entry.esm.js → eds-accordion_33.entry.esm.js} +187 -45
  5. package/eds-card-project.entry.esm.js +1 -1
  6. package/eds-card-section.entry.esm.js +18 -8
  7. package/eds-card-tags.entry.esm.js +1 -1
  8. package/eds-card-tool.entry.esm.js +1 -1
  9. package/eds-card-wrapper.entry.esm.js +4 -4
  10. package/eds-code-block.entry.esm.js +55 -8
  11. package/eds-components-section.entry.esm.js +57 -24
  12. package/eds-docs-palettes.entry.esm.js +1 -1
  13. package/eds-docs-tokens.entry.esm.js +1 -1
  14. package/eds-login.entry.esm.js +4 -12
  15. package/eds-logo-variations.entry.esm.js +29 -0
  16. package/eds-matomo-notice.entry.esm.js +1 -1
  17. package/{eds-pagination.entry.esm.js → eds-pagination_2.entry.esm.js} +222 -7
  18. package/eds-progress-bar.entry.esm.js +36 -0
  19. package/eds-rating.entry.esm.js +7 -9
  20. package/eds-svg-repository.entry.esm.js +12 -3
  21. package/eds-tabs-content.entry.esm.js +5 -5
  22. package/eds-tabs.entry.esm.js +27 -8
  23. package/eds-timeline.entry.esm.js +131 -0
  24. package/eds-tooltip.entry.esm.js +13 -3
  25. package/eds-trl.entry.esm.js +68 -0
  26. package/incorrect-use-of-colors.entry.esm.js +11 -10
  27. package/index.esm.js +1 -1
  28. package/index.esm2.js +20 -37
  29. package/logo-space.entry.esm.js +4 -4
  30. package/logo-variations-horizontal_2.entry.esm.js +116 -0
  31. package/logo-wrong-usage.entry.esm.js +39 -39
  32. package/package.json +1 -1
  33. package/src/components.d.ts +1 -0
  34. package/token-list_3.entry.esm.js +5 -5
  35. package/token-ratios.entry.esm.js +3 -3
  36. package/token-spacing.entry.esm.js +26 -26
  37. package/token-typography.entry.esm.js +2 -2
  38. package/eds-accordion.entry.esm.js +0 -132
  39. package/eds-block-break.entry.esm.js +0 -22
  40. package/eds-breadcrumb.entry.esm.js +0 -169
  41. package/eds-footer.entry.esm.js +0 -110
  42. package/eds-frame.entry.esm.js +0 -117
  43. package/eds-fullscreen-menu.entry.esm.js +0 -143
  44. package/eds-modal.entry.esm.js +0 -114
  45. package/eds-social-networks.entry.esm.js +0 -74
  46. package/eds-table.entry.esm.js +0 -196
  47. package/logo-variations-horizontal.entry.esm.js +0 -50
  48. package/logo-variations-vertical.entry.esm.js +0 -53
@@ -1,169 +0,0 @@
1
- import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
- import 'react';
3
- import 'react/jsx-runtime';
4
- import 'react-dom';
5
-
6
- const edsBreadcrumbCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.hidden{display:none}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.125rem * var(--tw-space-x-reverse));margin-left:calc(0.125rem * calc(1 - var(--tw-space-x-reverse)))}.px-2{padding-left:0.125rem;padding-right:0.125rem}.w-20{width:1.25rem}.w-28{width:1.75rem}.w-32{width:2rem}.w-44{width:2.75rem}.h-20{height:1.25rem}.h-24{height:1.5rem}.h-28{height:1.75rem}.h-32{height:2rem}@media (min-width: 750px){.md\\:block{display:block}}";
7
- const EdsBreadcrumbStyle0 = edsBreadcrumbCss;
8
- const EdsBreadcrumb = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- /**
12
- * Updates the maximum number of visible items and tracks if the screen is small.
13
- */
14
- this.updateScreenSize = () => {
15
- const width = window.innerWidth;
16
- if (width < 769) {
17
- this.maxVisibleItems = 3;
18
- this.isSmallScreen = true;
19
- } else if (width <= 1024) {
20
- this.maxVisibleItems = 4;
21
- this.isSmallScreen = true;
22
- } else {
23
- this.maxVisibleItems = 6;
24
- this.isSmallScreen = false;
25
- }
26
- };
27
- this.items = [];
28
- this.intent = 'ghost';
29
- this.parsedItems = [];
30
- this.isSmallScreen = false;
31
- this.maxVisibleItems = 6;
32
- }
33
- /**
34
- * Watch for changes to the `items` prop and parse it when it changes.
35
- * Converts the `items` string into an array of objects if it is a JSON string.
36
- * If the format is invalid, it logs an error and sets an empty array.
37
- *
38
- * @param newValue - The new value for the `items` prop.
39
- */
40
- parseItems(newValue) {
41
- try {
42
- if (typeof newValue === 'string') {
43
- this.parsedItems = JSON.parse(newValue);
44
- } else {
45
- this.parsedItems = newValue;
46
- }
47
- } catch (e) {
48
- this.parsedItems = [];
49
- }
50
- }
51
- /**
52
- * Lifecycle method that runs when the component is about to be loaded.
53
- * It parses the initial `items` prop value.
54
- */
55
- componentWillLoad() {
56
- this.parseItems(this.items);
57
- this.updateScreenSize();
58
- window.addEventListener('resize', this.updateScreenSize);
59
- }
60
- disconnectedCallback() {
61
- window.removeEventListener('resize', this.updateScreenSize);
62
- }
63
- /**
64
- * Lifecycle method that runs when the component has fully loaded.
65
- * It emits a custom event for each `eds-link` element contained within the breadcrumb.
66
- */
67
- componentDidLoad() {
68
- // Emit context for each eds-link element after the component is fully loaded
69
- const links = this.el.shadowRoot.querySelectorAll('eds-link');
70
- links.forEach(link => {
71
- this.emitContext(link);
72
- });
73
- }
74
- /**
75
- * Emits a custom event called `parentContext` for a given link element.
76
- * This event provides context information about the breadcrumb component.
77
- *
78
- * @param linkElement - The link element to which the event will be dispatched.
79
- */
80
- emitContext(linkElement) {
81
- const event = new CustomEvent('parentContext', {
82
- detail: {
83
- componentName: this.el.tagName.toLowerCase(),
84
- identifier: null
85
- }
86
- });
87
- linkElement.dispatchEvent(event);
88
- }
89
- /**
90
- * Truncates breadcrumb items based on the maxVisibleItems value.
91
- * Truncates `label` to 10 characters if `isSmallScreen` is true, except for the last label.
92
- */
93
- getTruncatedItems() {
94
- const totalItems = this.parsedItems.length;
95
- if (totalItems > this.maxVisibleItems) {
96
- const firstItem = this.parsedItems[0];
97
- const lastItems = this.parsedItems.slice(-2);
98
- const ellipsis = {
99
- label: '...',
100
- url: '',
101
- isHidden: true
102
- };
103
- if (this.maxVisibleItems === 3) {
104
- return [this.truncateLabel(firstItem), ellipsis, ...lastItems.map((item, index) => index === lastItems.length - 1 ? item : this.truncateLabel(item))];
105
- } else if (this.maxVisibleItems === 4) {
106
- const middleItem = this.parsedItems[Math.floor(totalItems / 2)];
107
- return [this.truncateLabel(firstItem), this.truncateLabel(middleItem), ellipsis, ...lastItems.map((item, index) => index === lastItems.length - 1 ? item : this.truncateLabel(item))];
108
- }
109
- }
110
- return this.parsedItems.map((item, index) => index === this.parsedItems.length - 1 ? item : this.truncateLabel(item));
111
- }
112
- /**
113
- * Truncates the label of a breadcrumb item to a maximum of 10 characters
114
- * if the screen is small.
115
- */
116
- truncateLabel(item) {
117
- if (item.label.length > 15) {
118
- return Object.assign(Object.assign({}, item), {
119
- label: `${item.label.slice(0, 15)}...`
120
- });
121
- }
122
- return item;
123
- }
124
- /**
125
- * Render method for the breadcrumb component.
126
- * It creates a navigation element with an ordered list of breadcrumb links.
127
- * The last link is disabled and marked as the current page.
128
- */
129
- render() {
130
- const itemsToRender = this.getTruncatedItems();
131
- return h("nav", {
132
- key: 'b3f515670374a7451981638d658f8e37f07ab10c',
133
- "aria-label": "Breadcrumb"
134
- }, h("ol", {
135
- key: '999b2035f3c996016e753be3826881a11054e184',
136
- class: "flex items-center space-x-2"
137
- }, itemsToRender.map((item, index) => {
138
- const isLast = index === itemsToRender.length - 1;
139
- return h("li", {
140
- class: "flex items-center"
141
- }, !item.isHidden ? h("eds-link", {
142
- label: item.label,
143
- url: item.url,
144
- intent: this.intent,
145
- current: isLast,
146
- "aria-label": item.label,
147
- size: "small",
148
- "icon-small": "false"
149
- }) : h("span", {
150
- class: "truncate px-2 ",
151
- "aria-hidden": "true"
152
- }, "..."), !isLast && !item.isHidden && h("eds-icon-wrapper", {
153
- icon: "chevron-right",
154
- class: "w-20 h-20"
155
- }));
156
- })));
157
- }
158
- get el() {
159
- return getElement(this);
160
- }
161
- static get watchers() {
162
- return {
163
- "items": ["parseItems"]
164
- };
165
- }
166
- };
167
- EdsBreadcrumb.style = EdsBreadcrumbStyle0;
168
-
169
- export { EdsBreadcrumb as eds_breadcrumb };
@@ -1,110 +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 edsFooterCss = "";
7
- const EdsFooterStyle0 = edsFooterCss;
8
- const EdsFooter = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- /**
12
- * Scrolls the page smoothly back to the top.
13
- * Called when the "Back to top" button is clicked.
14
- * @private
15
- */
16
- this.backToTop = () => {
17
- window.scrollTo({
18
- top: 0,
19
- behavior: 'smooth'
20
- });
21
- };
22
- this.extraClass = '';
23
- this.social = false;
24
- this.hasCookiesSetUp = false;
25
- this.enableScrollTop = false;
26
- this.fundedBy = 'EBRAINS is funded by the Horizon Europe Framework Programme.';
27
- this.rightsReserved = `${new Date().getFullYear()} EBRAINS. All rights reserved.`;
28
- this.cookiesPreference = 'Cookies Preferences';
29
- }
30
- /**
31
- * Toggles the cookie preferences popup, if available.
32
- * The actual implementation for handling cookie preferences should be defined here.
33
- * @private
34
- */
35
- toggleCookiesPopup() {
36
- // Implement logic for handling cookie preferences
37
- }
38
- /**
39
- * Renders the footer component with optional sections and elements,
40
- * including social network links, a Horizon Europe funding acknowledgment, and
41
- * legal links such as "Cookies Preferences" and copyright information.
42
- *
43
- * @returns {JSX.Element} The rendered JSX for the footer component.
44
- */
45
- render() {
46
- return h("footer", {
47
- key: 'efffa9b96cc2a094255fcb6d08ec45c7c7f09ec4',
48
- class: `${this.extraClass} pb-banner`
49
- }, this.social ? h("div", {
50
- class: "border-softest border-t-2 pt-20 pb-28 md:pt-28"
51
- }, h("div", {
52
- class: "container pb-20 xl:pb-40 "
53
- }, h("div", {
54
- class: "grid-layout"
55
- }, h("div", {
56
- class: "grid-col-span-12 lg:grid-col-span-5"
57
- }, h("eds-social-networks", {
58
- class: "mt-28"
59
- })), h("nav", {
60
- "aria-label": "Secondary nav",
61
- class: "grid-col-span-12 lg:grid-col-span-6 lg:grid-col-start-7 grid-layout mt-28 gap-y-12 lg:mt-0"
62
- })))) : null, h("div", {
63
- key: 'c3942c635dff3dc8cb47a21f20aca52acfaa3e18',
64
- class: `border-softest ${this.social ? 'border-t-2' : ''} pt-20 pb-28 md:pt-28`
65
- }, h("div", {
66
- key: '57e963272659ce2e63294c969f3724a03aef667e',
67
- class: "container flex flex-wrap items-center gap-20 lg:flex-nowrap"
68
- }, h("div", {
69
- key: 'c3e5cfe07fe9eb90450f7a87be1b95ed00ef38ce',
70
- class: "flex items-center gap-x-12"
71
- }, h("a", {
72
- key: 'b0d0c65115b611f78d2b468559c16eb60f538907',
73
- target: "_blank",
74
- rel: "noopener noreferrer",
75
- class: "effect-focus focus-visible:rounded-xs flex w-[54px] ml-0",
76
- href: "https://research-and-innovation.ec.europa.eu/funding/funding-opportunities/funding-programmes-and-open-calls/horizon-2020_en"
77
- }, h("eds-img", {
78
- key: '6cb5d067f07b456a8d828f3f42f2730e3e5374e0',
79
- width: 54,
80
- height: 41,
81
- src: "https://www.ebrains.eu/flags/4x3/eu.svg"
82
- }))), h("div", {
83
- key: 'e5b768b0fb96fcdcb786d33fc808368005935491',
84
- class: "f-ui-04 text-light order-last w-full lg:order-none lg:w-auto"
85
- }, h("p", {
86
- key: '777263c2f4bde43d38690f41391eaf8e51d945fa'
87
- }, this.fundedBy), h("div", {
88
- key: 'a415687d08edf8f3e03a6edce9c45f58662c8595',
89
- class: "mt-4 flex flex-wrap gap-12 lg:flex-nowrap"
90
- }, h("span", {
91
- key: 'c0b6498ad4f5e1f4f1945ebb971f9dd81cc74c77',
92
- class: "effect-focus !no-underline decoration-2 underline-offset-4 hover:!underline"
93
- }, "\u00A9 ", this.rightsReserved), this.hasCookiesSetUp && h("button", {
94
- key: '10133d180bfb0d8a6354ea2cbea318a2c46fc463',
95
- class: "effect-focus !no-underline underline-offset-4 hover:!underline",
96
- onClick: () => this.toggleCookiesPopup()
97
- }, this.cookiesPreference))), h("div", {
98
- key: '917d0980f91a8c42a75bae301b0a18e3777dd021',
99
- class: "ml-auto pl-12"
100
- }, this.enableScrollTop ? h("eds-button", {
101
- "aria-label": "Back to top",
102
- intent: "ghostInverse",
103
- icon: "chevron-up",
104
- onClick: this.backToTop
105
- }) : null))));
106
- }
107
- };
108
- EdsFooter.style = EdsFooterStyle0;
109
-
110
- export { EdsFooter as eds_footer };
@@ -1,117 +0,0 @@
1
- import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
- import 'react';
3
- import 'react/jsx-runtime';
4
- import 'react-dom';
5
-
6
- const EdsFrame = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.frameLabel = undefined;
10
- this.urlLabel = 'Open in Storybook';
11
- this.errorMessage = 'Could not load the requested Storybook content. Please check the URL or try again later.';
12
- this.storybookUrl = undefined;
13
- this.storyPath = undefined;
14
- this.intent = 'strong';
15
- this.tiny = false;
16
- this.size = 'auto';
17
- this.bg = true;
18
- this.iframeError = false;
19
- }
20
- articleClasses() {
21
- return [this.tiny ? 'min-h-120' : 'min-h-156', this.bg ? 'bg-inverse' : 'bg-default', 'rounded border-softer effect-focus-within relative flex grow flex-col border-2', 'w-full h-full'].join(' ');
22
- }
23
- getFrameHeight() {
24
- switch (this.size) {
25
- case 'sm':
26
- return '100px';
27
- case 'md':
28
- return '200px';
29
- case 'lg':
30
- return '400px';
31
- case 'xl':
32
- return '700px';
33
- default:
34
- return 'auto';
35
- }
36
- }
37
- async checkIframeAvailability() {
38
- try {
39
- const response = await fetch(this.frameSrc, {
40
- method: 'GET'
41
- });
42
- if (!response.ok) {
43
- throw new Error('Failed to load');
44
- }
45
- } catch (error) {
46
- this.iframeError = true;
47
- }
48
- }
49
- componentWillLoad() {
50
- this.checkIframeAvailability();
51
- }
52
- componentDidLoad() {
53
- // Emit context for each eds-link element after the component is fully loaded
54
- const links = this.el.querySelectorAll('eds-link');
55
- links.forEach(link => {
56
- this.emitContext(link);
57
- });
58
- }
59
- /**
60
- * Emits a custom event called `parentContext` for a given link element.
61
- * This event provides context information about the breadcrumb component.
62
- *
63
- * @param linkElement - The link element to which the event will be dispatched.
64
- */
65
- emitContext(linkElement) {
66
- const event = new CustomEvent('parentContext', {
67
- detail: {
68
- componentName: this.el.tagName.toLowerCase(),
69
- identifier: this.frameLabel
70
- }
71
- });
72
- linkElement.dispatchEvent(event);
73
- }
74
- get storyLink() {
75
- return `${this.storybookUrl}/?path=/story/${this.storyPath}`;
76
- }
77
- get frameSrc() {
78
- return `${this.storybookUrl}/iframe.html?id=${this.storyPath}&viewMode=story`;
79
- }
80
- render() {
81
- return h("div", {
82
- key: '0c3a43efc1a125af5999af88c4eb071b5c3bc6c5',
83
- class: this.articleClasses()
84
- }, h("div", {
85
- key: '32303d5e2c2f3b01efe1ceaf828346f873bea6b6',
86
- class: "effect-height flex items-center justify-between py-8 px-12"
87
- }, h("span", {
88
- key: '75f7f6750413dad4af2ea62c12ffb994491d5d01',
89
- class: "f-ui-02"
90
- }, this.frameLabel), !this.iframeError ? h("eds-link", {
91
- label: this.urlLabel,
92
- url: this.storyLink,
93
- intent: this.intent,
94
- class: "ml-auto",
95
- external: true,
96
- disabled: false,
97
- icon: "arrow-diagonal"
98
- }) : null), h("div", {
99
- key: '1fd99f6eda026814910b0cd93635616b7d3ffe09',
100
- class: "border-softer border-t-2"
101
- }, this.iframeError ? h("div", {
102
- class: "container ml-8 mr-8 mt-16"
103
- }, this.errorMessage) : h("iframe", {
104
- src: this.frameSrc,
105
- width: "100%",
106
- height: this.getFrameHeight(),
107
- title: this.frameLabel,
108
- frameBorder: "0",
109
- allowFullScreen: true
110
- })));
111
- }
112
- get el() {
113
- return getElement(this);
114
- }
115
- };
116
-
117
- export { EdsFrame as eds_frame };
@@ -1,143 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
2
- import 'react';
3
- import 'react/jsx-runtime';
4
- import 'react-dom';
5
-
6
- const edsFullscreenMenuCss = "";
7
- const EdsFullscreenMenuStyle0 = edsFullscreenMenuCss;
8
- const EdsFullscreenMenu = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.menuClose = createEvent(this, "menuClose", 7);
12
- this.links = undefined;
13
- this.menuLinks = undefined;
14
- this.homeUrl = '/';
15
- this.inverseHeader = false;
16
- this.isMenuOpen = false;
17
- }
18
- /**
19
- * Listens for the toggleMenu event to open or close the menu.
20
- * This event is emitted by the eds-header component.
21
- */
22
- handleToggleMenu(event) {
23
- this.isMenuOpen = event.detail; // Set isMenuOpen based on the event payload
24
- }
25
- /** Opens the menu */
26
- openMenu() {
27
- this.isMenuOpen = true;
28
- }
29
- /** Closes the menu */
30
- closeMenu() {
31
- this.isMenuOpen = false;
32
- this.menuClose.emit();
33
- }
34
- // Lifecycle method to add the resize event listener when component loads
35
- componentDidLoad() {
36
- window.addEventListener('resize', this.handleResize.bind(this));
37
- }
38
- // Lifecycle method to remove the resize event listener when component unloads
39
- disconnectedCallback() {
40
- window.removeEventListener('resize', this.handleResize.bind(this));
41
- }
42
- // Function to close the menu if screen width is larger than a defined breakpoint (1024px)
43
- handleResize() {
44
- if (window.innerWidth >= 1024) {
45
- this.isMenuOpen = false;
46
- }
47
- }
48
- /**
49
- * Parses the `links` prop into an array of link objects.
50
- * Returns an empty array if parsing fails or if `links` is not a valid JSON string or object.
51
- *
52
- * @returns {any[]} Array of parsed link objects
53
- */
54
- get parsedLinks() {
55
- if (typeof this.links === 'object') {
56
- return this.links;
57
- } else if (typeof this.links === 'string') {
58
- try {
59
- return JSON.parse(this.links);
60
- } catch (e) {
61
- // eslint-disable-next-line
62
- console.error('Error parsing links prop:', e);
63
- return [];
64
- }
65
- }
66
- return [];
67
- }
68
- /**
69
- * Parses the `menuLinks` prop into an array of link objects.
70
- * Returns an empty array if parsing fails or if `menuLinks` is not a valid JSON string or object.
71
- *
72
- * @returns {any[]} Array of parsed menu link objects
73
- */
74
- get parsedMenuLinks() {
75
- if (typeof this.menuLinks === 'object') {
76
- return this.menuLinks;
77
- } else if (typeof this.menuLinks === 'string') {
78
- try {
79
- return JSON.parse(this.menuLinks);
80
- } catch (e) {
81
- // eslint-disable-next-line
82
- console.error('Error parsing menuLinks prop:', e);
83
- return [];
84
- }
85
- }
86
- return [];
87
- }
88
- render() {
89
- return this.isMenuOpen ? h("div", {
90
- class: "eds-full-screen bg-default fixed inset-0 z-[999999] overflow-y-scroll"
91
- }, h("div", {
92
- class: "flex min-h-full flex-col"
93
- }, h("div", {
94
- class: `bg-default w-full sticky top-0 ${this.inverseHeader ? 'bg-strongest' : 'bg-default'}`
95
- }, h("div", {
96
- class: "mx-auto flex items-center justify-between"
97
- }, h("div", {
98
- class: "mr-auto w-[200px] h-[85px]"
99
- }, h("eds-logo", {
100
- type: this.inverseHeader ? 'color-white' : 'color',
101
- href: this.homeUrl
102
- })), h("div", {
103
- class: "px-16"
104
- }, h("eds-button", {
105
- "aria-label": "Close menu",
106
- intent: "ghostInverse",
107
- icon: "close",
108
- onClick: () => this.closeMenu()
109
- })))), h("div", {
110
- class: "py-16 px-16"
111
- }, h("nav", {
112
- class: "mt-28 flex flex-col gap-y-8"
113
- }, this.parsedLinks.map((link, index) => h("eds-link", {
114
- label: link.label,
115
- key: index,
116
- url: link.url,
117
- intent: "tertiary",
118
- size: "large",
119
- class: "effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",
120
- onClick: () => this.closeMenu(),
121
- icon: "arrow-right"
122
- }))), h("eds-block-break", null), h("nav", {
123
- class: "mt-28 flex flex-col gap-y-8"
124
- }, this.parsedMenuLinks.map((link, index) => h("eds-link", {
125
- label: link.label,
126
- key: index,
127
- url: link.url,
128
- intent: "tertiary",
129
- size: "large",
130
- class: "effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",
131
- onClick: () => this.closeMenu(),
132
- icon: "chevron-right"
133
- })))), h("div", {
134
- class: "mt-auto"
135
- }, h("eds-footer", {
136
- social: true,
137
- "extra-class": "bg-darker"
138
- })))) : null;
139
- }
140
- };
141
- EdsFullscreenMenu.style = EdsFullscreenMenuStyle0;
142
-
143
- export { EdsFullscreenMenu as eds_fullscreen_menu };
@@ -1,114 +0,0 @@
1
- import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
- import 'react';
3
- import 'react/jsx-runtime';
4
- import 'react-dom';
5
-
6
- const edsModalCss = ".block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.fixed{position:fixed}.inset-0{inset:0rem}.z-10{z-index:10}.z-50{z-index:50}.max-w-full{max-width:100%}.absolute{position:absolute}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-20{padding-top:1.25rem;padding-bottom:1.25rem}.bg-inverse{background-color:var(--white)}.bg-dark{background-color:var(--grey-300)}.rounded-lg{border-radius:16px}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.border-b-2{border-bottom-width:2px}.border-softer{border-color:rgba(0, 0, 0, .1)}.pb-8{padding-bottom:0.5rem}.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)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.ml-8{margin-left:0.5rem}.pt-8{padding-top:0.5rem}.bg-opacity-90{opacity:0.9}.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 EdsModalStyle0 = edsModalCss;
8
- const EdsModal = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.isOpen = false;
12
- this.title = '';
13
- this.truncate = true;
14
- this.truncateLines = '1';
15
- }
16
- getTruncateClass() {
17
- return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
18
- }
19
- /**
20
- * Opens the modal.
21
- */
22
- async open() {
23
- this.isOpen = true;
24
- /*sendAnalytics({
25
- category: 'ui-component',
26
- tag: this.el.tagName.toLowerCase(),
27
- name: this.title,
28
- action: 'show'
29
- });*/
30
- }
31
- /**
32
- * Closes the modal.
33
- */
34
- async close() {
35
- this.isOpen = false;
36
- /*sendAnalytics({
37
- category: 'ui-component',
38
- tag: this.el.tagName.toLowerCase(),
39
- name: this.title,
40
- action: 'hide'
41
- });*/
42
- }
43
- /**
44
- * Toggles the modal open or closed.
45
- */
46
- async toggle() {
47
- this.isOpen = !this.isOpen;
48
- }
49
- /**
50
- * Lifecycle method that runs when the component has fully loaded.
51
- * It emits a custom event for each `eds-button` element contained within the breadcrumb.
52
- */
53
- componentDidLoad() {
54
- // Emit context for each eds-link element after the component is fully loaded
55
- const btns = this.el.shadowRoot.querySelectorAll('eds-button');
56
- btns.forEach(btn => {
57
- this.emitContext(btn);
58
- });
59
- }
60
- /**
61
- * Emits a custom event called `parentContext` for a given button element.
62
- * This event provides context information about the eds-modal component.
63
- *
64
- * @param btnElement - The link element to which the event will be dispatched.
65
- */
66
- emitContext(btnElement) {
67
- const event = new CustomEvent('parentContext', {
68
- detail: {
69
- componentName: this.el.tagName.toLowerCase(),
70
- identifier: null
71
- }
72
- });
73
- btnElement.dispatchEvent(event);
74
- }
75
- render() {
76
- return h("div", {
77
- key: '00816ecb900bd9b68b31fdf6e48bef0223f9e10a',
78
- class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-50 flex`
79
- }, this.isOpen && h("div", {
80
- key: '570fa8625f9ad4b1ea82633f11e2b289ab01b853',
81
- class: "fixed inset-0 bg-dark bg-opacity-90" // Add backdrop-blur utility class here
82
- ,
83
-
84
- onClick: () => this.close()
85
- }), h("div", {
86
- key: 'ff658c763e3fbc98123f13483076399966b10515',
87
- class: "max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 left-1/2 top-1/2 grow -translate-x-1/2 -translate-y-1/2 justify-center "
88
- }, h("div", {
89
- key: 'd8b72acd90cc59ab1f82384aee4e311319f75aa9',
90
- class: "flex justify-between items-center border-b-2 border-softer pb-8"
91
- }, h("span", {
92
- key: 'ee61fc505c5a3eb93541d3762d37f28a5a788bae',
93
- class: `f-heading-04 text-lighter ${this.getTruncateClass()}`
94
- }, this.title), h("eds-button", {
95
- key: '3832772417d05a162eb5f2c4d0733f0ee845ed1c',
96
- intent: "tertiary",
97
- icon: "close",
98
- "aria-label": "Close modal",
99
- onClick: () => this.close(),
100
- "extra-class": "ml-8"
101
- })), h("div", {
102
- key: 'f71b38be8284a37d0d198df0a9858c64202b3d91',
103
- class: "pt-8"
104
- }, h("slot", {
105
- key: '1f80948334e5b4e9fc00a3bf01c6fc402d8220c3'
106
- }))));
107
- }
108
- get el() {
109
- return getElement(this);
110
- }
111
- };
112
- EdsModal.style = EdsModalStyle0;
113
-
114
- export { EdsModal as eds_modal };