@ebrains/components 0.3.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.
- package/dist/cjs/{color-3ffe3072.js → color-88793e49.js} +2 -2
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/eds-accordion_33.cjs.entry.js +2670 -0
- package/dist/cjs/eds-card-project.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-section.cjs.entry.js +3 -3
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +48 -1
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +1 -1
- package/dist/cjs/eds-pagination_2.cjs.entry.js +33 -15
- package/dist/cjs/eds-rating.cjs.entry.js +5 -7
- package/dist/cjs/eds-tabs-content.cjs.entry.js +1 -1
- package/dist/cjs/eds-tabs.cjs.entry.js +1 -1
- package/dist/cjs/eds-timeline.cjs.entry.js +3 -2
- package/dist/cjs/eds-tooltip.cjs.entry.js +11 -1
- package/dist/cjs/eds-trl.cjs.entry.js +7 -8
- package/dist/cjs/index-f08e4f5c.js +2 -34
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/eds-accordion/eds-accordion.js +11 -20
- package/dist/collection/components/eds-alert/eds-alert.js +5 -7
- package/dist/collection/components/eds-alert/eds-alert.stories.js +4 -4
- package/dist/collection/components/eds-avatar/eds-avatar.js +1 -1
- package/dist/collection/components/eds-avatar/eds-avatar.stories.js +24 -22
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +2 -1
- package/dist/collection/components/eds-button/eds-button.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +9 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +14 -8
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.stories.js +1 -1
- package/dist/collection/components/eds-code-block/eds-code-block.js +57 -2
- package/dist/collection/components/eds-code-block/eds-code-block.stories.js +78 -0
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +11 -21
- package/dist/collection/components/eds-form/eds-form.js +41 -31
- package/dist/collection/components/eds-form/eds-form.stories.js +0 -3
- package/dist/collection/components/eds-frame/eds-frame.stories.js +19 -18
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +4 -1
- package/dist/collection/components/eds-link/eds-link.js +3 -4
- package/dist/collection/components/eds-modal/eds-modal.css +16 -0
- package/dist/collection/components/eds-modal/eds-modal.js +71 -29
- package/dist/collection/components/eds-modal/eds-modal.stories.js +34 -18
- package/dist/collection/components/eds-pagination/eds-pagination.js +13 -9
- package/dist/collection/components/eds-rating/eds-rating.js +8 -10
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.stories.js +12 -11
- package/dist/collection/components/eds-table/eds-table.js +20 -7
- package/dist/collection/components/eds-timeline/eds-timeline.js +3 -2
- package/dist/collection/components/eds-toast/eds-toast.js +21 -0
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +10 -1
- package/dist/collection/components/eds-trl/eds-trl.js +7 -8
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +7 -6
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +8 -39
- package/dist/components/analytics.js +2 -2
- package/dist/components/components.css +12 -0
- package/dist/components/components.esm.js +1 -1
- package/dist/components/eds-accordion2.js +12 -20
- package/dist/components/eds-alert2.js +5 -7
- package/dist/components/eds-avatar2.js +1 -1
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +2 -1
- package/dist/components/eds-button2.js +1 -1
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-generic2.js +3 -3
- package/dist/components/eds-card-section.js +3 -3
- package/dist/components/eds-card-tags.js +1 -1
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-card-wrapper.js +1 -1
- package/dist/components/eds-code-block2.js +48 -1
- package/dist/components/eds-dropdown2.js +12 -21
- package/dist/components/eds-form.js +37 -12
- package/dist/components/eds-input-select2.js +1 -1
- package/dist/components/eds-link2.js +3 -4
- package/dist/components/eds-modal.js +56 -30
- package/dist/components/eds-pagination2.js +13 -9
- package/dist/components/eds-rating.js +6 -8
- package/dist/components/eds-table2.js +20 -6
- package/dist/components/eds-timeline.js +3 -2
- package/dist/components/eds-toast2.js +21 -0
- package/dist/components/eds-tooltip.js +11 -1
- package/dist/components/eds-trl.js +7 -8
- package/dist/components/p-2dda1ec4.entry.js +1 -0
- package/dist/components/{p-d9788b54.entry.js → p-35ec730b.entry.js} +1 -1
- package/dist/components/{p-e6bfbf51.entry.js → p-5398d652.entry.js} +2 -2
- package/dist/components/{p-e20ed2c7.entry.js → p-610db2b2.entry.js} +1 -1
- package/dist/components/p-832dc95a.entry.js +1 -0
- package/dist/components/p-855aa1a3.entry.js +1 -0
- package/dist/components/{p-52ac3456.entry.js → p-8ddc67a1.entry.js} +1 -1
- package/dist/components/p-ab32b3fc.entry.js +1 -0
- package/dist/components/p-b04eff31.entry.js +1 -0
- package/dist/components/p-b86a4985.js +1 -0
- package/dist/components/{p-2e8459ef.entry.js → p-ba6bafef.entry.js} +1 -1
- package/dist/components/{p-6fc62452.entry.js → p-c3b294a0.entry.js} +1 -1
- package/dist/components/p-c6038449.entry.js +1 -0
- package/dist/components/p-c72c8fb0.entry.js +1 -0
- package/dist/components/p-dd6daa96.entry.js +1 -0
- package/dist/components/{p-73bd0c97.entry.js → p-df94285c.entry.js} +1 -1
- package/dist/esm/{color-0ba8ed56.js → color-bb472c37.js} +2 -2
- package/dist/esm/components.js +1 -1
- package/dist/esm/eds-accordion_33.entry.js +2634 -0
- package/dist/esm/eds-card-project.entry.js +1 -1
- package/dist/esm/eds-card-section.entry.js +3 -3
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +1 -1
- package/dist/esm/eds-card-wrapper.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +49 -2
- package/dist/esm/eds-matomo-notice.entry.js +1 -1
- package/dist/esm/eds-pagination_2.entry.js +33 -15
- package/dist/esm/eds-rating.entry.js +5 -7
- package/dist/esm/eds-tabs-content.entry.js +1 -1
- package/dist/esm/eds-tabs.entry.js +1 -1
- package/dist/esm/eds-timeline.entry.js +3 -2
- package/dist/esm/eds-tooltip.entry.js +11 -1
- package/dist/esm/eds-trl.entry.js +7 -8
- package/dist/esm/index-e96badea.js +2 -34
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +560 -427
- package/dist/hydrate/index.mjs +560 -427
- package/dist/types/components/eds-accordion/eds-accordion.d.ts +5 -12
- package/dist/types/components/eds-avatar/eds-avatar.stories.d.ts +0 -18
- package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.d.ts +8 -0
- package/dist/types/components/eds-cards/eds-card-generic/eds-card-generic.d.ts +6 -2
- package/dist/types/components/eds-code-block/eds-code-block.d.ts +43 -3
- package/dist/types/components/eds-code-block/eds-code-block.stories.d.ts +54 -0
- package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +0 -7
- package/dist/types/components/eds-form/eds-form.d.ts +3 -6
- package/dist/types/components/eds-form/eds-form.stories.d.ts +0 -5
- package/dist/types/components/eds-frame/eds-frame.stories.d.ts +0 -2
- package/dist/types/components/eds-input-elements/eds-input-select/eds-input-select.d.ts +3 -0
- package/dist/types/components/eds-link/eds-link.d.ts +1 -1
- package/dist/types/components/eds-modal/eds-modal.d.ts +18 -3
- package/dist/types/components/eds-modal/eds-modal.stories.d.ts +9 -0
- package/dist/types/components/eds-rating/eds-rating.d.ts +4 -6
- package/dist/types/components/eds-section/eds-section-core/eds-section-core.stories.d.ts +0 -1
- package/dist/types/components/eds-table/eds-table.d.ts +5 -5
- package/dist/types/components/eds-toast/eds-toast.d.ts +9 -0
- package/dist/types/components.d.ts +66 -84
- package/dist/types/shared-ui/eds-card-section/eds-card-section.d.ts +1 -6
- package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +42 -21
- package/package.json +1 -1
- package/dist/cjs/eds-accordion.cjs.entry.js +0 -93
- package/dist/cjs/eds-alert.cjs.entry.js +0 -96
- package/dist/cjs/eds-avatar_17.cjs.entry.js +0 -1454
- package/dist/cjs/eds-card-desc_3.cjs.entry.js +0 -117
- package/dist/cjs/eds-card-generic.cjs.entry.js +0 -105
- package/dist/cjs/eds-form.cjs.entry.js +0 -322
- package/dist/cjs/eds-frame.cjs.entry.js +0 -91
- package/dist/cjs/eds-input_7.cjs.entry.js +0 -316
- package/dist/cjs/eds-modal.cjs.entry.js +0 -86
- package/dist/components/p-02e2a62f.entry.js +0 -1
- package/dist/components/p-32f282a9.entry.js +0 -1
- package/dist/components/p-3617841d.entry.js +0 -1
- package/dist/components/p-373673ca.js +0 -1
- package/dist/components/p-3ff76976.entry.js +0 -1
- package/dist/components/p-42b4ecff.entry.js +0 -1
- package/dist/components/p-54c75346.entry.js +0 -1
- package/dist/components/p-5afb626c.entry.js +0 -1
- package/dist/components/p-5d7af761.entry.js +0 -1
- package/dist/components/p-7215789a.entry.js +0 -1
- package/dist/components/p-79887c2c.entry.js +0 -1
- package/dist/components/p-84957b6d.entry.js +0 -1
- package/dist/components/p-96c4deda.entry.js +0 -1
- package/dist/components/p-be6c80da.entry.js +0 -1
- package/dist/components/p-d1f6a722.entry.js +0 -1
- package/dist/components/p-d7a92efb.entry.js +0 -1
- package/dist/components/p-fd27e56c.entry.js +0 -1
- package/dist/esm/eds-accordion.entry.js +0 -89
- package/dist/esm/eds-alert.entry.js +0 -92
- package/dist/esm/eds-avatar_17.entry.js +0 -1434
- package/dist/esm/eds-card-desc_3.entry.js +0 -111
- package/dist/esm/eds-card-generic.entry.js +0 -101
- package/dist/esm/eds-form.entry.js +0 -318
- package/dist/esm/eds-frame.entry.js +0 -87
- package/dist/esm/eds-input_7.entry.js +0 -306
- package/dist/esm/eds-modal.entry.js +0 -82
package/dist/hydrate/index.js
CHANGED
|
@@ -2534,289 +2534,6 @@ class CorrectUseOfColors {
|
|
|
2534
2534
|
}; }
|
|
2535
2535
|
}
|
|
2536
2536
|
|
|
2537
|
-
const edsAccordionCss = "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}.min-h-36{min-height:2.25rem}.min-h-44{min-height:2.75rem}.min-h-56{min-height:3.5rem}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.effect-color{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.relative{position:relative}.absolute{position:absolute}.inset-x-16{left:1rem;right:1rem}.top-16{top:1rem}.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}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-md{border-radius:12px}.outline-none{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.text-light{color:var(--grey-700)}.z-1{z-index:1}.z-10{z-index:10}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.h-0{height:0rem}.h-auto{height:auto}.pt-20{padding-top:1.25rem}.overflow-hidden{overflow:hidden}.grid{display:grid}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-16{padding:1rem}.ml-auto{margin-left:auto}.mr-auto{margin-right:auto}.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)}.text-left{text-align:left}.text-center{text-align:center}";
|
|
2538
|
-
var EdsAccordionStyle0 = edsAccordionCss;
|
|
2539
|
-
|
|
2540
|
-
/**
|
|
2541
|
-
* `EdsAccordion` is a flexible, interactive component for expanding and collapsing content sections.
|
|
2542
|
-
* It features a customizable header, optional description, and content area that can be dynamically expanded.
|
|
2543
|
-
* This component supports a range of configurations, including background toggling, minimum height adjustments,
|
|
2544
|
-
* and various styles to suit different layouts and display requirements.
|
|
2545
|
-
*
|
|
2546
|
-
* It includes an optional button or link element within the header, which can be customized for additional interactions.
|
|
2547
|
-
*
|
|
2548
|
-
* The `accordionChange` event is emitted when the accordion's expanded state changes, allowing parent components
|
|
2549
|
-
* to track its open/close status.
|
|
2550
|
-
*
|
|
2551
|
-
* Key features include:
|
|
2552
|
-
* - Header with customizable title
|
|
2553
|
-
* - Expandable/collapsible content section
|
|
2554
|
-
* - Background color switch on expand and hover
|
|
2555
|
-
* - Compact layout option with reduced header height
|
|
2556
|
-
* - Adjustable content height and text clamping
|
|
2557
|
-
* - Emitted events for tracking changes in expansion state and context
|
|
2558
|
-
*/
|
|
2559
|
-
class EdsAccordion {
|
|
2560
|
-
constructor(hostRef) {
|
|
2561
|
-
registerInstance(this, hostRef);
|
|
2562
|
-
this.accordionChange = createEvent(this, "accordionChange", 7);
|
|
2563
|
-
/**
|
|
2564
|
-
* Handles the click event on the accordion header to toggle expansion.
|
|
2565
|
-
* Toggles the `isExpanded` state and emits the `accordionChange` event.
|
|
2566
|
-
*/
|
|
2567
|
-
this.handleClick = () => {
|
|
2568
|
-
this.isExpanded = !this.isExpanded;
|
|
2569
|
-
this.accordionChange.emit(this.isExpanded);
|
|
2570
|
-
this.setPanelHeight();
|
|
2571
|
-
};
|
|
2572
|
-
/**
|
|
2573
|
-
* Calculates and sets the panel height based on the content height
|
|
2574
|
-
* and adjusts based on the `shortContent` and `isExpanded` states.
|
|
2575
|
-
*/
|
|
2576
|
-
this.setPanelHeight = () => {
|
|
2577
|
-
if (this.childContentRef) {
|
|
2578
|
-
this.shortContent =
|
|
2579
|
-
this.wrapperRef.scrollWidth > 830 && !this.description
|
|
2580
|
-
? this.childContentRef.scrollHeight <= 80
|
|
2581
|
-
: this.childContentRef.scrollHeight <= 20;
|
|
2582
|
-
this.panelHeight = this.isExpanded && !this.shortContent ? this.childContentRef.scrollHeight : 0;
|
|
2583
|
-
}
|
|
2584
|
-
};
|
|
2585
|
-
this.title = undefined;
|
|
2586
|
-
this.description = undefined;
|
|
2587
|
-
this.switchBg = true;
|
|
2588
|
-
this.expanded = false;
|
|
2589
|
-
this.clampText = true;
|
|
2590
|
-
this.minHeightContent = false;
|
|
2591
|
-
this.isExpanded = this.expanded;
|
|
2592
|
-
this.panelHeight = 0;
|
|
2593
|
-
this.shortContent = false;
|
|
2594
|
-
}
|
|
2595
|
-
/**
|
|
2596
|
-
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
2597
|
-
* to recalculate height on window resize.
|
|
2598
|
-
*/
|
|
2599
|
-
componentDidLoad() {
|
|
2600
|
-
this.setPanelHeight();
|
|
2601
|
-
// Emit context for each eds-link element after the component is fully loaded
|
|
2602
|
-
const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
2603
|
-
this.emitContext(btn);
|
|
2604
|
-
window.addEventListener('resize', this.setPanelHeight);
|
|
2605
|
-
}
|
|
2606
|
-
/**
|
|
2607
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
2608
|
-
* This event provides context information about the breadcrumb component.
|
|
2609
|
-
*
|
|
2610
|
-
* @param linkElement - The link element to which the event will be dispatched.
|
|
2611
|
-
*/
|
|
2612
|
-
emitContext(linkElement) {
|
|
2613
|
-
const event = new CustomEvent('parentContext', {
|
|
2614
|
-
detail: {
|
|
2615
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
2616
|
-
identifier: null
|
|
2617
|
-
}
|
|
2618
|
-
});
|
|
2619
|
-
linkElement.dispatchEvent(event);
|
|
2620
|
-
}
|
|
2621
|
-
/**
|
|
2622
|
-
* Lifecycle method that cleans up the resize event listener when the component is removed.
|
|
2623
|
-
*/
|
|
2624
|
-
disconnectedCallback() {
|
|
2625
|
-
window.removeEventListener('resize', this.setPanelHeight);
|
|
2626
|
-
}
|
|
2627
|
-
/**
|
|
2628
|
-
* Renders the accordion structure, including header, content, description, and any slotted content.
|
|
2629
|
-
* Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
|
|
2630
|
-
*/
|
|
2631
|
-
render() {
|
|
2632
|
-
const minHeightContentClass = this.minHeightContent ? 'min-h-56' : '';
|
|
2633
|
-
return (hAsync("div", { key: '1f8ea188c4b39f6d1a8d10cdbf43d3df88d1281f', ref: (el) => (this.wrapperRef = el), class: `container flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
|
|
2634
|
-
${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
|
|
2635
|
-
${this.switchBg ? 'hover:bg-inverse' : ''}
|
|
2636
|
-
${minHeightContentClass}` }, hAsync("h3", { key: '4490bdc1a18b99850e8db8ae1c38fcb37912ec0d', class: "mr-auto f-heading-06 text-left absolute inset-x-16 top-16 line-clamp-1" }, this.title), hAsync("div", { key: '82df433a9cc6805a735300fd1bb52f41c639c992', class: "ml-auto" }, hAsync("eds-button", { key: '9965d5eecfa02fbea08c23c44d325417767f6495', id: "accordionId", intent: "tertiary", "aria-expanded": this.isExpanded || this.shortContent, "aria-controls": "accordionId", class: `effect-color flex w-full items-center justify-between rounded-md outline-none focus:outline-none`, onClick: this.handleClick, icon: "chevron-down" })), hAsync("div", { key: '7ab8d2d07d55fa05c5e5647d1d00d1165f0d40ce', class: `w-full` }, this.description ? (hAsync("span", { class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}` }, this.description)) : null, hAsync("section", { key: 'cb122dd5433d7012cba6f3769f79e92a155c45d7', id: "sectionId", "aria-hidden": !this.isExpanded, class: `z-1 effect-height relative h-0 w-full ${!this.isExpanded && this.clampText ? 'overflow-hidden' : ''}`, style: { height: this.isExpanded ? 'auto' : '0' } }, hAsync("div", { key: '0c2e1d9b38f21f0cb7f50aa3923edcc448418e3f', ref: (el) => (this.childContentRef = el), class: `accordion-content effect-color pt-20`, "aria-hidden": !this.isExpanded }, hAsync("span", { key: 'd119c88d54e8d5e83d4cc3d4d16d1cd53d689bc7', class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}` }, hAsync("slot", { key: 'b2a6917ec65bc808389a2d1c77cd1183f00cbaa1' })))))));
|
|
2637
|
-
}
|
|
2638
|
-
get el() { return getElement(this); }
|
|
2639
|
-
static get style() { return EdsAccordionStyle0; }
|
|
2640
|
-
static get cmpMeta() { return {
|
|
2641
|
-
"$flags$": 9,
|
|
2642
|
-
"$tagName$": "eds-accordion",
|
|
2643
|
-
"$members$": {
|
|
2644
|
-
"title": [1],
|
|
2645
|
-
"description": [1],
|
|
2646
|
-
"switchBg": [4, "switch-bg"],
|
|
2647
|
-
"expanded": [4],
|
|
2648
|
-
"clampText": [4, "clamp-text"],
|
|
2649
|
-
"minHeightContent": [4, "min-height-content"],
|
|
2650
|
-
"isExpanded": [32],
|
|
2651
|
-
"panelHeight": [32],
|
|
2652
|
-
"shortContent": [32]
|
|
2653
|
-
},
|
|
2654
|
-
"$listeners$": undefined,
|
|
2655
|
-
"$lazyBundleId$": "-",
|
|
2656
|
-
"$attrsToReflect$": []
|
|
2657
|
-
}; }
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
2661
|
-
|
|
2662
|
-
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
2663
|
-
const cx = clsx;
|
|
2664
|
-
const cva = (base, config)=>{
|
|
2665
|
-
return (props)=>{
|
|
2666
|
-
var ref;
|
|
2667
|
-
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2668
|
-
const { variants , defaultVariants } = config;
|
|
2669
|
-
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
2670
|
-
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
2671
|
-
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
2672
|
-
if (variantProp === null) return null;
|
|
2673
|
-
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
2674
|
-
return variants[variant][variantKey];
|
|
2675
|
-
});
|
|
2676
|
-
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
2677
|
-
let [key, value] = param;
|
|
2678
|
-
if (value === undefined) {
|
|
2679
|
-
return acc;
|
|
2680
|
-
}
|
|
2681
|
-
acc[key] = value;
|
|
2682
|
-
return acc;
|
|
2683
|
-
}, {});
|
|
2684
|
-
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
|
|
2685
|
-
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
|
|
2686
|
-
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
2687
|
-
let [key, value] = param;
|
|
2688
|
-
return Array.isArray(value) ? value.includes({
|
|
2689
|
-
...defaultVariants,
|
|
2690
|
-
...propsWithoutUndefined
|
|
2691
|
-
}[key]) : ({
|
|
2692
|
-
...defaultVariants,
|
|
2693
|
-
...propsWithoutUndefined
|
|
2694
|
-
})[key] === value;
|
|
2695
|
-
}) ? [
|
|
2696
|
-
...acc,
|
|
2697
|
-
cvClass,
|
|
2698
|
-
cvClassName
|
|
2699
|
-
] : acc;
|
|
2700
|
-
}, []);
|
|
2701
|
-
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2702
|
-
};
|
|
2703
|
-
};
|
|
2704
|
-
|
|
2705
|
-
const edsAlertCss = ":root {\n font-optical-sizing: auto;\n}\nhtml,\nbody {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n/*\n:focus[data-focus-method=\"mouse\"],\n:focus[data-focus-method=\"touch\"] {\n outline: none !important;\n}\n*/\n/*FADE*/\n/*FADE TRANSLATE Y*/\n/*SLIDE LEFT*/\n/*SLIDE BOTTOM*/\n/*COLLAPSE Y*/\n*, ::before, ::after {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n::backdrop {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*/\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: currentColor; /* 2 */\n}\n::before,\n::after {\n}\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n/*\nRemove the default font size and weight for headings.\n*/\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\na {\n color: inherit;\n text-decoration: inherit;\n}\n/*\nAdd the correct font weight in Edge and Safari.\n*/\nb,\nstrong {\n font-weight: bolder;\n}\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\ncode,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n/*\nAdd the correct font size in all browsers.\n*/\nsmall {\n font-size: 80%;\n}\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\nsub {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\nbutton,\nselect {\n text-transform: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\nbutton,\ninput:where([type='button']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n/*\nAdd the correct display in Chrome and Safari.\n*/\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\np,\npre {\n margin: 0;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n/*\nPrevent resizing textareas horizontally by default.\n*/\ntextarea {\n resize: vertical;\n}\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n/*\nSet the default cursor for buttons.\n*/\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\nimg,\niframe,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\nimg {\n max-width: 100%;\n height: auto;\n}\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n:root {\n --inner-gutter: 8px;\n}\n@media (min-width: 750px) {\n :root {\n --inner-gutter: 12px;\n }\n}\n@media (min-width: 900px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1024px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1280px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 2200px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n:root {\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n:root {\n --sans: Inter, Helvetica, Arial, sans-serif;\n --f-ui-01-fontFamily: var(--sans);\n --f-ui-01-fontWeight: 800;\n --f-ui-01-fontSize: 18px;\n --f-ui-01-lineHeight: 110%;\n --f-ui-01-letterSpacing: -0.01em;\n}\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n@media (min-width: 750px) {\n :root {\n}\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n@media (min-width: 1024px) {\n :root {\n}\n}\n.f-ui-01 b, .f-ui-01 strong {\n font-weight: var(--f-ui-01---bold-weight, bold);\n}\n:root {\n --grey-300: #e6e6e6;\n --green-200: #d3ffdc;\n --yellow-200: #ffffcb;\n --red-200: #ffe0e1;\n}\n@media (min-width: 750px) {\n .md\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-x-0 > *::before {\n content: none;\n }\n .md\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n@media (min-width: 900px) {\n .lg\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-x-0 > *::before {\n content: none;\n }\n .lg\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n.border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n }\n\n &::after {\n position: absolute;\n }\n\n &::after {\n inset: 0rem;\n }\n\n &::after {\n z-index: 1;\n }\n\n &::after {\n border-radius: 8px;\n }\n\n &::after {\n border-width: 1px;\n }\n\n &::after {\n border-width: 2px;\n }\n\n &::after {\n border-color: rgba(0, 0, 0, .1 );\n }\n\n &::after {\n content: '';\n }\n}\n/** region TRANSITIONS */\n/** endregion */\n/* region FOCUS */\n/* endregion */\n/* region BG */\n/* endregion */\n/*region shadow*/\n/*endregion*/\n.flex {\n display: flex;\n}\n.w-full {\n width: 100%;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-x-12 {\n -moz-column-gap: 0.75rem;\n column-gap: 0.75rem;\n}\n.space-y-12 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));\n}\n.rounded-lg {\n border-radius: 16px;\n}\n.bg-dark {\n background-color: var(--grey-300);\n}\n.bg-error {\n background-color: var(--red-200);\n}\n.bg-success {\n background-color: var(--green-200);\n}\n.bg-warning {\n background-color: var(--yellow-200);\n}\n.p-16 {\n padding: 1rem;\n}\n.p-20 {\n padding: 1.25rem;\n}\n.px-12 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-20 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.py-12 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.py-20 {\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n}\n.py-8 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pr-12 {\n padding-right: 0.75rem;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n[class*=underline-] {\n text-decoration-line: underline;\n}\n.after\\:rounded-lg::after {\n border-radius: 16px;\n}\n.after\\:border-softest::after {\n border-color: rgba(0, 0, 0, .05 );\n}\n";
|
|
2706
|
-
var EdsAlertStyle0 = edsAlertCss;
|
|
2707
|
-
|
|
2708
|
-
const alertStyles = cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
|
|
2709
|
-
variants: {
|
|
2710
|
-
intent: {
|
|
2711
|
-
default: '',
|
|
2712
|
-
warning: 'bg-warning',
|
|
2713
|
-
error: 'bg-error',
|
|
2714
|
-
success: 'bg-success'
|
|
2715
|
-
},
|
|
2716
|
-
direction: {
|
|
2717
|
-
vertical: 'space-y-12',
|
|
2718
|
-
horizontal: 'flex flex-row items-center justify-between gap-x-12'
|
|
2719
|
-
},
|
|
2720
|
-
withBtn: {
|
|
2721
|
-
false: '',
|
|
2722
|
-
true: ''
|
|
2723
|
-
}
|
|
2724
|
-
},
|
|
2725
|
-
compoundVariants: [
|
|
2726
|
-
{
|
|
2727
|
-
direction: 'horizontal',
|
|
2728
|
-
withBtn: true,
|
|
2729
|
-
class: 'px-20 pr-12 py-12'
|
|
2730
|
-
},
|
|
2731
|
-
{
|
|
2732
|
-
direction: 'horizontal',
|
|
2733
|
-
withBtn: false,
|
|
2734
|
-
class: 'p-20'
|
|
2735
|
-
},
|
|
2736
|
-
{
|
|
2737
|
-
direction: 'vertical',
|
|
2738
|
-
withBtn: true,
|
|
2739
|
-
class: 'p-16'
|
|
2740
|
-
},
|
|
2741
|
-
{
|
|
2742
|
-
direction: 'vertical',
|
|
2743
|
-
withBtn: false,
|
|
2744
|
-
class: 'px-12 py-20'
|
|
2745
|
-
}
|
|
2746
|
-
],
|
|
2747
|
-
defaultVariants: {
|
|
2748
|
-
intent: 'default',
|
|
2749
|
-
direction: 'horizontal'
|
|
2750
|
-
}
|
|
2751
|
-
});
|
|
2752
|
-
/**
|
|
2753
|
-
* `EdsAlert` is a versatile alert component designed for displaying contextual messages.
|
|
2754
|
-
* This component offers various configuration options to support different use cases, making it ideal for notifying users of information, warnings, errors, or successes.
|
|
2755
|
-
*
|
|
2756
|
-
* Key features include:
|
|
2757
|
-
* - Customizable alert message with different visual intents (`default`, `warning`, `error`, `success`).
|
|
2758
|
-
* - Configurable layout direction (`horizontal` or `vertical`) to accommodate various design requirements.
|
|
2759
|
-
* - Optional pressable element (link or button) that allows users to interact with the alert.
|
|
2760
|
-
* - Emits context events to allow parent components to track alert interactions.
|
|
2761
|
-
*
|
|
2762
|
-
* This component is styled with predefined CSS classes to ensure consistent appearance across different alert types and layout configurations.
|
|
2763
|
-
*/
|
|
2764
|
-
class EdsAlert {
|
|
2765
|
-
constructor(hostRef) {
|
|
2766
|
-
registerInstance(this, hostRef);
|
|
2767
|
-
this.message = undefined;
|
|
2768
|
-
this.pressableLabel = undefined;
|
|
2769
|
-
this.pressableUrl = undefined;
|
|
2770
|
-
this.direction = 'horizontal';
|
|
2771
|
-
this.intent = 'default';
|
|
2772
|
-
this.withBtn = false;
|
|
2773
|
-
}
|
|
2774
|
-
componentWillLoad() {
|
|
2775
|
-
this.withBtn = Boolean(this.pressableLabel);
|
|
2776
|
-
}
|
|
2777
|
-
componentDidLoad() {
|
|
2778
|
-
// Query all 'eds-link' elements, including those inside shadow DOM
|
|
2779
|
-
const links = this.el.shadowRoot.querySelectorAll('eds-link');
|
|
2780
|
-
links.forEach((link) => {
|
|
2781
|
-
this.emitContext(link);
|
|
2782
|
-
});
|
|
2783
|
-
}
|
|
2784
|
-
emitContext(linkElement) {
|
|
2785
|
-
const event = new CustomEvent('parentContext', {
|
|
2786
|
-
detail: {
|
|
2787
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
2788
|
-
identifier: null
|
|
2789
|
-
}
|
|
2790
|
-
});
|
|
2791
|
-
linkElement.dispatchEvent(event);
|
|
2792
|
-
}
|
|
2793
|
-
render() {
|
|
2794
|
-
return (hAsync("div", { key: '99518cd34cbfc04691f2f827b53105ef88c03af8', class: alertStyles({
|
|
2795
|
-
intent: this.intent,
|
|
2796
|
-
direction: this.direction,
|
|
2797
|
-
withBtn: this.withBtn
|
|
2798
|
-
}), role: "alert" }, hAsync("p", { key: '7eca97c849473bb4c8472d11243dc5eb9dded61f', class: "f-ui-01 py-8" }, this.message), this.withBtn &&
|
|
2799
|
-
(this.pressableUrl ? (hAsync("eds-link", { class: "eds-alert-link", label: this.pressableLabel, url: this.pressableUrl, intent: "secondary" })) : null)));
|
|
2800
|
-
}
|
|
2801
|
-
get el() { return getElement(this); }
|
|
2802
|
-
static get style() { return EdsAlertStyle0; }
|
|
2803
|
-
static get cmpMeta() { return {
|
|
2804
|
-
"$flags$": 9,
|
|
2805
|
-
"$tagName$": "eds-alert",
|
|
2806
|
-
"$members$": {
|
|
2807
|
-
"message": [1],
|
|
2808
|
-
"pressableLabel": [1, "pressable-label"],
|
|
2809
|
-
"pressableUrl": [1, "pressable-url"],
|
|
2810
|
-
"direction": [1],
|
|
2811
|
-
"intent": [1],
|
|
2812
|
-
"withBtn": [32]
|
|
2813
|
-
},
|
|
2814
|
-
"$listeners$": undefined,
|
|
2815
|
-
"$lazyBundleId$": "-",
|
|
2816
|
-
"$attrsToReflect$": []
|
|
2817
|
-
}; }
|
|
2818
|
-
}
|
|
2819
|
-
|
|
2820
2537
|
[
|
|
2821
2538
|
['eds-header', {
|
|
2822
2539
|
'home-url': '/',
|
|
@@ -2987,7 +2704,7 @@ function isMatomoAvailable() {
|
|
|
2987
2704
|
}
|
|
2988
2705
|
// General function to push data to Matomo
|
|
2989
2706
|
function pushToMatomo(action, ...args) {
|
|
2990
|
-
console.log('Pushing Matomo')
|
|
2707
|
+
//console.log('Pushing Matomo')
|
|
2991
2708
|
if (isMatomoAvailable()) {
|
|
2992
2709
|
window._paq.push([action, ...args]);
|
|
2993
2710
|
}
|
|
@@ -3000,7 +2717,7 @@ function sendAnalytics(eventData) {
|
|
|
3000
2717
|
var _a;
|
|
3001
2718
|
if (!isMatomoAvailable()) {
|
|
3002
2719
|
console.warn('Matomo is not available or not initialized.');
|
|
3003
|
-
console.log(
|
|
2720
|
+
//console.log({ ...eventData });
|
|
3004
2721
|
return;
|
|
3005
2722
|
}
|
|
3006
2723
|
// Conditionally build the name field
|
|
@@ -3023,6 +2740,51 @@ function matomoOptIn() {
|
|
|
3023
2740
|
}
|
|
3024
2741
|
}
|
|
3025
2742
|
|
|
2743
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
2744
|
+
|
|
2745
|
+
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
2746
|
+
const cx = clsx;
|
|
2747
|
+
const cva = (base, config)=>{
|
|
2748
|
+
return (props)=>{
|
|
2749
|
+
var ref;
|
|
2750
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2751
|
+
const { variants , defaultVariants } = config;
|
|
2752
|
+
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
2753
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
2754
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
2755
|
+
if (variantProp === null) return null;
|
|
2756
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
2757
|
+
return variants[variant][variantKey];
|
|
2758
|
+
});
|
|
2759
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
2760
|
+
let [key, value] = param;
|
|
2761
|
+
if (value === undefined) {
|
|
2762
|
+
return acc;
|
|
2763
|
+
}
|
|
2764
|
+
acc[key] = value;
|
|
2765
|
+
return acc;
|
|
2766
|
+
}, {});
|
|
2767
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
|
|
2768
|
+
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
|
|
2769
|
+
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
2770
|
+
let [key, value] = param;
|
|
2771
|
+
return Array.isArray(value) ? value.includes({
|
|
2772
|
+
...defaultVariants,
|
|
2773
|
+
...propsWithoutUndefined
|
|
2774
|
+
}[key]) : ({
|
|
2775
|
+
...defaultVariants,
|
|
2776
|
+
...propsWithoutUndefined
|
|
2777
|
+
})[key] === value;
|
|
2778
|
+
}) ? [
|
|
2779
|
+
...acc,
|
|
2780
|
+
cvClass,
|
|
2781
|
+
cvClassName
|
|
2782
|
+
] : acc;
|
|
2783
|
+
}, []);
|
|
2784
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2785
|
+
};
|
|
2786
|
+
};
|
|
2787
|
+
|
|
3026
2788
|
const GRADIANT_TOKENS = ['green', 'yellow', 'among-blue', 'purple'];
|
|
3027
2789
|
const gradientBGColorVariants = cva([], {
|
|
3028
2790
|
variants: {
|
|
@@ -3112,45 +2874,271 @@ const gradientBGColorVariants = cva([], {
|
|
|
3112
2874
|
pseudo: false,
|
|
3113
2875
|
class: 'bg-gradient-03-top'
|
|
3114
2876
|
},
|
|
3115
|
-
{
|
|
3116
|
-
color: 'purple',
|
|
3117
|
-
direction: 'bottom',
|
|
3118
|
-
pseudo: false,
|
|
3119
|
-
class: 'bg-gradient-03-bottom'
|
|
2877
|
+
{
|
|
2878
|
+
color: 'purple',
|
|
2879
|
+
direction: 'bottom',
|
|
2880
|
+
pseudo: false,
|
|
2881
|
+
class: 'bg-gradient-03-bottom'
|
|
2882
|
+
},
|
|
2883
|
+
// endregion
|
|
2884
|
+
// region AMONG-BLUE
|
|
2885
|
+
{
|
|
2886
|
+
color: 'among-blue',
|
|
2887
|
+
direction: 'top',
|
|
2888
|
+
pseudo: true,
|
|
2889
|
+
class: 'before:bg-gradient-04-top'
|
|
2890
|
+
},
|
|
2891
|
+
{
|
|
2892
|
+
color: 'among-blue',
|
|
2893
|
+
direction: 'bottom',
|
|
2894
|
+
pseudo: true,
|
|
2895
|
+
class: 'before:bg-gradient-04-bottom'
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
color: 'among-blue',
|
|
2899
|
+
direction: 'top',
|
|
2900
|
+
pseudo: false,
|
|
2901
|
+
class: 'bg-gradient-04-top'
|
|
2902
|
+
},
|
|
2903
|
+
{
|
|
2904
|
+
color: 'among-blue',
|
|
2905
|
+
direction: 'bottom',
|
|
2906
|
+
pseudo: false,
|
|
2907
|
+
class: 'bg-gradient-04-bottom'
|
|
2908
|
+
}
|
|
2909
|
+
// endregion
|
|
2910
|
+
],
|
|
2911
|
+
defaultVariants: {
|
|
2912
|
+
direction: 'top',
|
|
2913
|
+
pseudo: true
|
|
2914
|
+
}
|
|
2915
|
+
});
|
|
2916
|
+
|
|
2917
|
+
const edsAccordionCss = "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}.min-h-36{min-height:2.25rem}.min-h-44{min-height:2.75rem}.min-h-56{min-height:3.5rem}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.effect-color{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.relative{position:relative}.absolute{position:absolute}.inset-x-16{left:1rem;right:1rem}.top-16{top:1rem}.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}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-md{border-radius:12px}.outline-none{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.text-light{color:var(--grey-700)}.z-1{z-index:1}.z-10{z-index:10}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.h-0{height:0rem}.h-auto{height:auto}.pt-20{padding-top:1.25rem}.overflow-hidden{overflow:hidden}.grid{display:grid}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-16{padding:1rem}.ml-auto{margin-left:auto}.mr-auto{margin-right:auto}.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)}.text-left{text-align:left}.text-center{text-align:center}";
|
|
2918
|
+
var EdsAccordionStyle0 = edsAccordionCss;
|
|
2919
|
+
|
|
2920
|
+
/**
|
|
2921
|
+
* `EdsAccordion` is a flexible, interactive component for expanding and collapsing content sections.
|
|
2922
|
+
* It features a customizable header, optional description, and content area that can be dynamically expanded.
|
|
2923
|
+
* This component supports a range of configurations, including background toggling, minimum height adjustments,
|
|
2924
|
+
* and various styles to suit different layouts and display requirements.
|
|
2925
|
+
*
|
|
2926
|
+
* It includes an optional button or link element within the header, which can be customized for additional interactions.
|
|
2927
|
+
*
|
|
2928
|
+
* The `accordionChange` event is emitted when the accordion's expanded state changes, allowing parent components
|
|
2929
|
+
* to track its open/close status.
|
|
2930
|
+
*
|
|
2931
|
+
* Key features include:
|
|
2932
|
+
* - Header with customizable title
|
|
2933
|
+
* - Expandable/collapsible content section
|
|
2934
|
+
* - Background color switch on expand and hover
|
|
2935
|
+
* - Compact layout option with reduced header height
|
|
2936
|
+
* - Adjustable content height and text clamping
|
|
2937
|
+
* - Emitted events for tracking changes in expansion state and context
|
|
2938
|
+
*/
|
|
2939
|
+
class EdsAccordion {
|
|
2940
|
+
constructor(hostRef) {
|
|
2941
|
+
registerInstance(this, hostRef);
|
|
2942
|
+
this.accordionChange = createEvent(this, "accordionChange", 7);
|
|
2943
|
+
/**
|
|
2944
|
+
* Handles the click event on the accordion header to toggle expansion.
|
|
2945
|
+
* Toggles the `isExpanded` state and emits the `accordionChange` event.
|
|
2946
|
+
*/
|
|
2947
|
+
this.handleClick = () => {
|
|
2948
|
+
var _a;
|
|
2949
|
+
this.isExpanded = !this.isExpanded;
|
|
2950
|
+
this.accordionChange.emit(this.isExpanded);
|
|
2951
|
+
this.setPanelHeight();
|
|
2952
|
+
sendAnalytics({
|
|
2953
|
+
category: 'ui-component',
|
|
2954
|
+
parentContext: null,
|
|
2955
|
+
tag: this.el.tagName.toLowerCase(),
|
|
2956
|
+
name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
2957
|
+
action: this.isExpanded ? 'expanded' : 'collapsed'
|
|
2958
|
+
});
|
|
2959
|
+
};
|
|
2960
|
+
/**
|
|
2961
|
+
* Calculates and sets the panel height based on the content height
|
|
2962
|
+
* and adjusts based on the `shortContent` and `isExpanded` states.
|
|
2963
|
+
*/
|
|
2964
|
+
this.setPanelHeight = () => {
|
|
2965
|
+
if (this.childContentRef) {
|
|
2966
|
+
this.shortContent =
|
|
2967
|
+
this.wrapperRef.scrollWidth > 830 && !this.description
|
|
2968
|
+
? this.childContentRef.scrollHeight <= 80
|
|
2969
|
+
: this.childContentRef.scrollHeight <= 20;
|
|
2970
|
+
this.panelHeight = this.isExpanded && !this.shortContent ? this.childContentRef.scrollHeight : 0;
|
|
2971
|
+
}
|
|
2972
|
+
};
|
|
2973
|
+
this.title = undefined;
|
|
2974
|
+
this.description = undefined;
|
|
2975
|
+
this.switchBg = true;
|
|
2976
|
+
this.expanded = false;
|
|
2977
|
+
this.clampText = true;
|
|
2978
|
+
this.minHeightContent = false;
|
|
2979
|
+
this.isExpanded = this.expanded;
|
|
2980
|
+
this.panelHeight = 0;
|
|
2981
|
+
this.shortContent = false;
|
|
2982
|
+
}
|
|
2983
|
+
/**
|
|
2984
|
+
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
2985
|
+
* to recalculate height on window resize.
|
|
2986
|
+
*/
|
|
2987
|
+
componentDidLoad() {
|
|
2988
|
+
this.setPanelHeight();
|
|
2989
|
+
window.addEventListener('resize', this.setPanelHeight);
|
|
2990
|
+
}
|
|
2991
|
+
/**
|
|
2992
|
+
* Lifecycle method that cleans up the resize event listener when the component is removed.
|
|
2993
|
+
*/
|
|
2994
|
+
disconnectedCallback() {
|
|
2995
|
+
window.removeEventListener('resize', this.setPanelHeight);
|
|
2996
|
+
}
|
|
2997
|
+
/**
|
|
2998
|
+
* Renders the accordion structure, including header, content, description, and any slotted content.
|
|
2999
|
+
* Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
|
|
3000
|
+
*/
|
|
3001
|
+
render() {
|
|
3002
|
+
const minHeightContentClass = this.minHeightContent ? 'min-h-56' : '';
|
|
3003
|
+
return (hAsync("div", { key: '14811b7517511999f97dc8d486f6c1138d89538b', ref: (el) => (this.wrapperRef = el), class: `container flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
|
|
3004
|
+
${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
|
|
3005
|
+
${this.switchBg ? 'hover:bg-inverse' : ''}
|
|
3006
|
+
${minHeightContentClass}` }, hAsync("h3", { key: 'a55ab98b74555ab2ff470d824106d3ff2e9b7fec', class: "mr-auto f-heading-06 text-left absolute inset-x-16 top-16 line-clamp-1" }, this.title), hAsync("div", { key: 'b3a76425eed4d05404a51d8991070a12cd1609a1', class: "ml-auto" }, hAsync("eds-button", { key: '06ddefe21175e4bc28ef4477f5fd552689e1cd31', id: "accordionId", intent: "tertiary", "aria-expanded": this.isExpanded || this.shortContent, "aria-controls": "accordionId", class: `effect-color flex w-full items-center justify-between rounded-md outline-none focus:outline-none`, onClick: this.handleClick, icon: "chevron-down" })), hAsync("div", { key: '7330f2824689a61e82c42f00f79e12d4148df2f9', class: `w-full` }, this.description ? (hAsync("span", { class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}` }, this.description)) : null, hAsync("section", { key: '533e8014f43ed6d50424f02bfb793456187badd9', id: "sectionId", "aria-hidden": !this.isExpanded, class: `z-1 effect-height relative h-0 w-full ${!this.isExpanded && this.clampText ? 'overflow-hidden' : ''}`, style: { height: this.isExpanded ? 'auto' : '0' } }, hAsync("div", { key: '02a0fa8a79942cd2bc760eb62da9cb910252b6cd', ref: (el) => (this.childContentRef = el), class: `accordion-content effect-color pt-20`, "aria-hidden": !this.isExpanded }, hAsync("span", { key: '33edc6bc83eb4eaa49ae5482841ae642a60ffde8', class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}` }, hAsync("slot", { key: 'bbbc3fa2b8fc5be7f55d6a45f0f37dc569706ac8' })))))));
|
|
3007
|
+
}
|
|
3008
|
+
get el() { return getElement(this); }
|
|
3009
|
+
static get style() { return EdsAccordionStyle0; }
|
|
3010
|
+
static get cmpMeta() { return {
|
|
3011
|
+
"$flags$": 9,
|
|
3012
|
+
"$tagName$": "eds-accordion",
|
|
3013
|
+
"$members$": {
|
|
3014
|
+
"title": [1],
|
|
3015
|
+
"description": [1],
|
|
3016
|
+
"switchBg": [4, "switch-bg"],
|
|
3017
|
+
"expanded": [4],
|
|
3018
|
+
"clampText": [4, "clamp-text"],
|
|
3019
|
+
"minHeightContent": [4, "min-height-content"],
|
|
3020
|
+
"isExpanded": [32],
|
|
3021
|
+
"panelHeight": [32],
|
|
3022
|
+
"shortContent": [32]
|
|
3023
|
+
},
|
|
3024
|
+
"$listeners$": undefined,
|
|
3025
|
+
"$lazyBundleId$": "-",
|
|
3026
|
+
"$attrsToReflect$": []
|
|
3027
|
+
}; }
|
|
3028
|
+
}
|
|
3029
|
+
|
|
3030
|
+
const edsAlertCss = ":root {\n font-optical-sizing: auto;\n}\nhtml,\nbody {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n/*\n:focus[data-focus-method=\"mouse\"],\n:focus[data-focus-method=\"touch\"] {\n outline: none !important;\n}\n*/\n/*FADE*/\n/*FADE TRANSLATE Y*/\n/*SLIDE LEFT*/\n/*SLIDE BOTTOM*/\n/*COLLAPSE Y*/\n*, ::before, ::after {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n::backdrop {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*/\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: currentColor; /* 2 */\n}\n::before,\n::after {\n}\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n/*\nRemove the default font size and weight for headings.\n*/\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\na {\n color: inherit;\n text-decoration: inherit;\n}\n/*\nAdd the correct font weight in Edge and Safari.\n*/\nb,\nstrong {\n font-weight: bolder;\n}\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\ncode,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n/*\nAdd the correct font size in all browsers.\n*/\nsmall {\n font-size: 80%;\n}\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\nsub {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\nbutton,\nselect {\n text-transform: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\nbutton,\ninput:where([type='button']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n/*\nAdd the correct display in Chrome and Safari.\n*/\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\np,\npre {\n margin: 0;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n/*\nPrevent resizing textareas horizontally by default.\n*/\ntextarea {\n resize: vertical;\n}\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n/*\nSet the default cursor for buttons.\n*/\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\nimg,\niframe,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\nimg {\n max-width: 100%;\n height: auto;\n}\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n:root {\n --inner-gutter: 8px;\n}\n@media (min-width: 750px) {\n :root {\n --inner-gutter: 12px;\n }\n}\n@media (min-width: 900px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1024px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1280px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 2200px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n:root {\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n:root {\n --sans: Inter, Helvetica, Arial, sans-serif;\n --f-ui-01-fontFamily: var(--sans);\n --f-ui-01-fontWeight: 800;\n --f-ui-01-fontSize: 18px;\n --f-ui-01-lineHeight: 110%;\n --f-ui-01-letterSpacing: -0.01em;\n}\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n@media (min-width: 750px) {\n :root {\n}\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n@media (min-width: 1024px) {\n :root {\n}\n}\n.f-ui-01 b, .f-ui-01 strong {\n font-weight: var(--f-ui-01---bold-weight, bold);\n}\n:root {\n --grey-300: #e6e6e6;\n --green-200: #d3ffdc;\n --yellow-200: #ffffcb;\n --red-200: #ffe0e1;\n}\n@media (min-width: 750px) {\n .md\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-x-0 > *::before {\n content: none;\n }\n .md\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n@media (min-width: 900px) {\n .lg\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-x-0 > *::before {\n content: none;\n }\n .lg\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n.border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n }\n\n &::after {\n position: absolute;\n }\n\n &::after {\n inset: 0rem;\n }\n\n &::after {\n z-index: 1;\n }\n\n &::after {\n border-radius: 8px;\n }\n\n &::after {\n border-width: 1px;\n }\n\n &::after {\n border-width: 2px;\n }\n\n &::after {\n border-color: rgba(0, 0, 0, .1 );\n }\n\n &::after {\n content: '';\n }\n}\n/** region TRANSITIONS */\n/** endregion */\n/* region FOCUS */\n/* endregion */\n/* region BG */\n/* endregion */\n/*region shadow*/\n/*endregion*/\n.flex {\n display: flex;\n}\n.w-full {\n width: 100%;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-x-12 {\n -moz-column-gap: 0.75rem;\n column-gap: 0.75rem;\n}\n.space-y-12 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));\n}\n.rounded-lg {\n border-radius: 16px;\n}\n.bg-dark {\n background-color: var(--grey-300);\n}\n.bg-error {\n background-color: var(--red-200);\n}\n.bg-success {\n background-color: var(--green-200);\n}\n.bg-warning {\n background-color: var(--yellow-200);\n}\n.p-16 {\n padding: 1rem;\n}\n.p-20 {\n padding: 1.25rem;\n}\n.px-12 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-20 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.py-12 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.py-20 {\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n}\n.py-8 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pr-12 {\n padding-right: 0.75rem;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n[class*=underline-] {\n text-decoration-line: underline;\n}\n.after\\:rounded-lg::after {\n border-radius: 16px;\n}\n.after\\:border-softest::after {\n border-color: rgba(0, 0, 0, .05 );\n}\n";
|
|
3031
|
+
var EdsAlertStyle0 = edsAlertCss;
|
|
3032
|
+
|
|
3033
|
+
const alertStyles = cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
|
|
3034
|
+
variants: {
|
|
3035
|
+
intent: {
|
|
3036
|
+
default: '',
|
|
3037
|
+
warning: 'bg-warning',
|
|
3038
|
+
error: 'bg-error',
|
|
3039
|
+
success: 'bg-success'
|
|
3040
|
+
},
|
|
3041
|
+
direction: {
|
|
3042
|
+
vertical: 'space-y-12',
|
|
3043
|
+
horizontal: 'flex flex-row items-center justify-between gap-x-12'
|
|
3120
3044
|
},
|
|
3121
|
-
|
|
3122
|
-
|
|
3045
|
+
withBtn: {
|
|
3046
|
+
false: '',
|
|
3047
|
+
true: ''
|
|
3048
|
+
}
|
|
3049
|
+
},
|
|
3050
|
+
compoundVariants: [
|
|
3123
3051
|
{
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
class: 'before:bg-gradient-04-top'
|
|
3052
|
+
direction: 'horizontal',
|
|
3053
|
+
withBtn: true,
|
|
3054
|
+
class: 'px-20 pr-12 py-12'
|
|
3128
3055
|
},
|
|
3129
3056
|
{
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
class: 'before:bg-gradient-04-bottom'
|
|
3057
|
+
direction: 'horizontal',
|
|
3058
|
+
withBtn: false,
|
|
3059
|
+
class: 'p-20'
|
|
3134
3060
|
},
|
|
3135
3061
|
{
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
class: 'bg-gradient-04-top'
|
|
3062
|
+
direction: 'vertical',
|
|
3063
|
+
withBtn: true,
|
|
3064
|
+
class: 'p-16'
|
|
3140
3065
|
},
|
|
3141
3066
|
{
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
class: 'bg-gradient-04-bottom'
|
|
3067
|
+
direction: 'vertical',
|
|
3068
|
+
withBtn: false,
|
|
3069
|
+
class: 'px-12 py-20'
|
|
3146
3070
|
}
|
|
3147
|
-
// endregion
|
|
3148
3071
|
],
|
|
3149
3072
|
defaultVariants: {
|
|
3150
|
-
|
|
3151
|
-
|
|
3073
|
+
intent: 'default',
|
|
3074
|
+
direction: 'horizontal'
|
|
3152
3075
|
}
|
|
3153
3076
|
});
|
|
3077
|
+
/**
|
|
3078
|
+
* `EdsAlert` is a versatile alert component designed for displaying contextual messages.
|
|
3079
|
+
* This component offers various configuration options to support different use cases, making it ideal for notifying users of information, warnings, errors, or successes.
|
|
3080
|
+
*
|
|
3081
|
+
* Key features include:
|
|
3082
|
+
* - Customizable alert message with different visual intents (`default`, `warning`, `error`, `success`).
|
|
3083
|
+
* - Configurable layout direction (`horizontal` or `vertical`) to accommodate various design requirements.
|
|
3084
|
+
* - Optional pressable element (link or button) that allows users to interact with the alert.
|
|
3085
|
+
* - Emits context events to allow parent components to track alert interactions.
|
|
3086
|
+
*
|
|
3087
|
+
* This component is styled with predefined CSS classes to ensure consistent appearance across different alert types and layout configurations.
|
|
3088
|
+
*/
|
|
3089
|
+
class EdsAlert {
|
|
3090
|
+
constructor(hostRef) {
|
|
3091
|
+
registerInstance(this, hostRef);
|
|
3092
|
+
this.message = undefined;
|
|
3093
|
+
this.pressableLabel = undefined;
|
|
3094
|
+
this.pressableUrl = undefined;
|
|
3095
|
+
this.direction = 'horizontal';
|
|
3096
|
+
this.intent = 'default';
|
|
3097
|
+
this.withBtn = false;
|
|
3098
|
+
}
|
|
3099
|
+
componentWillLoad() {
|
|
3100
|
+
this.withBtn = Boolean(this.pressableLabel);
|
|
3101
|
+
}
|
|
3102
|
+
componentDidLoad() {
|
|
3103
|
+
// Query all 'eds-link' elements, including those inside shadow DOM
|
|
3104
|
+
const lnk = this.el.shadowRoot.querySelector('eds-link');
|
|
3105
|
+
this.emitContext(lnk);
|
|
3106
|
+
}
|
|
3107
|
+
emitContext(linkElement) {
|
|
3108
|
+
const event = new CustomEvent('parentContext', {
|
|
3109
|
+
detail: {
|
|
3110
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
3111
|
+
identifier: null
|
|
3112
|
+
}
|
|
3113
|
+
});
|
|
3114
|
+
linkElement.dispatchEvent(event);
|
|
3115
|
+
}
|
|
3116
|
+
render() {
|
|
3117
|
+
return (hAsync("div", { key: '089491004acd618827ef139a7c2ef486726cea9d', class: alertStyles({
|
|
3118
|
+
intent: this.intent,
|
|
3119
|
+
direction: this.direction,
|
|
3120
|
+
withBtn: this.withBtn
|
|
3121
|
+
}), role: "alert" }, hAsync("p", { key: '9a54555621b492f65b38ecd3cbb44660bf516e51', class: "f-ui-01 py-8" }, this.message), this.withBtn &&
|
|
3122
|
+
(this.pressableUrl ? (hAsync("eds-link", { class: "eds-alert-link", label: this.pressableLabel, url: this.pressableUrl, intent: "secondary", external: true })) : null)));
|
|
3123
|
+
}
|
|
3124
|
+
get el() { return getElement(this); }
|
|
3125
|
+
static get style() { return EdsAlertStyle0; }
|
|
3126
|
+
static get cmpMeta() { return {
|
|
3127
|
+
"$flags$": 9,
|
|
3128
|
+
"$tagName$": "eds-alert",
|
|
3129
|
+
"$members$": {
|
|
3130
|
+
"message": [1],
|
|
3131
|
+
"pressableLabel": [1, "pressable-label"],
|
|
3132
|
+
"pressableUrl": [1, "pressable-url"],
|
|
3133
|
+
"direction": [1],
|
|
3134
|
+
"intent": [1],
|
|
3135
|
+
"withBtn": [32]
|
|
3136
|
+
},
|
|
3137
|
+
"$listeners$": undefined,
|
|
3138
|
+
"$lazyBundleId$": "-",
|
|
3139
|
+
"$attrsToReflect$": []
|
|
3140
|
+
}; }
|
|
3141
|
+
}
|
|
3154
3142
|
|
|
3155
3143
|
const edsAvatarCss = ".border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n }\n\n &::after {\n position: absolute;\n }\n\n &::after {\n inset: 0rem;\n }\n\n &::after {\n z-index: 1;\n }\n\n &::after {\n border-radius: 8px;\n }\n\n &::after {\n border-width: 1px;\n }\n\n &::after {\n border-width: 2px;\n }\n\n &::after {\n border: 2px solid rgba(0, 0, 0, .1);\n }\n\n &::after {\n content: '';\n }\n}\n\n.border-inside-pill {\n &::after {\n border-radius: 100px;\n }\n\n &::after {\n content: '';\n }\n}\n\n.border-inside-inverse {\n &::after {\n border: 2px solid rgba(255, 255, 255, 0.3);\n }\n\n &::after {\n content: '';\n }\n}\n\n.aspect-1x1 {\n aspect-ratio: 1/1;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.px-4 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n.rounded-pill {\n border-radius: 100px;\n}\n\n.rounded-sm {\n border-radius: 8px;\n}\n\n.rounded-xs {\n border-radius: 4px;\n}\n\n\n.bg-dark {\n background-color: var(--grey-300);\n}\n\n.bg-darker {\n background-color: var(--grey-400);\n}\n\n.bg-stronger {\n background-color: var(--grey-900);\n}\n\n.bg-strongest {\n background-color: var(--black);\n}\n\n.text-accent {\n color: var(--green-500);\n}\n\n.text-default {\n color: var(--black);\n}\n\n.\\!no-underline {\n text-decoration-line: none !important;\n}\n\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n\n.w-32 {\n width: 2rem;\n}\n\n.w-44 {\n width: 2.75rem;\n}\n\n.w-\\[54px\\] {\n width: 54px;\n}";
|
|
3156
3144
|
var EdsAvatarStyle0 = edsAvatarCss;
|
|
@@ -3224,7 +3212,7 @@ class EdsAvatar {
|
|
|
3224
3212
|
* @returns {JSX.Element} The rendered avatar component.
|
|
3225
3213
|
*/
|
|
3226
3214
|
render() {
|
|
3227
|
-
return (hAsync("div", { key: '
|
|
3215
|
+
return (hAsync("div", { key: '3ba716296c615d31ce7f3f41fd57e732adc530bf', class: this.containerClasses }, this.picture ? (hAsync("eds-img", { src: this.picture, width: 54, height: 54, sizes: "120px", alt: `${this.firstName} ${this.lastName}`, lazyload: true, withBg: true })) : (hAsync("abbr", { title: this.computedInitials || `${this.firstName} ${this.lastName}`, class: "!no-underline f-ui-01" }, this.computedInitials))));
|
|
3228
3216
|
}
|
|
3229
3217
|
static get style() { return EdsAvatarStyle0; }
|
|
3230
3218
|
static get cmpMeta() { return {
|
|
@@ -3262,7 +3250,7 @@ class EdsBlockBreak {
|
|
|
3262
3250
|
this.extraClass = '';
|
|
3263
3251
|
}
|
|
3264
3252
|
render() {
|
|
3265
|
-
return hAsync("hr", { key: '
|
|
3253
|
+
return hAsync("hr", { key: '58ffdece778da8f323dd130908254690b3f6c8d3', class: `border-softer my-20 inline-block w-full border-t-2 ${this.extraClass}` });
|
|
3266
3254
|
}
|
|
3267
3255
|
static get style() { return EdsBlockBreakStyle0; }
|
|
3268
3256
|
static get cmpMeta() { return {
|
|
@@ -3329,6 +3317,7 @@ class EdsBreadcrumb {
|
|
|
3329
3317
|
this.parsedItems = Array.isArray(parsed) ? parsed : [];
|
|
3330
3318
|
}
|
|
3331
3319
|
catch (e) {
|
|
3320
|
+
// eslint-disable-next-line
|
|
3332
3321
|
console.error('Error parsing breadcrumb items:', e);
|
|
3333
3322
|
this.parsedItems = [];
|
|
3334
3323
|
}
|
|
@@ -3424,7 +3413,7 @@ class EdsBreadcrumb {
|
|
|
3424
3413
|
*/
|
|
3425
3414
|
render() {
|
|
3426
3415
|
const itemsToRender = this.getTruncatedItems();
|
|
3427
|
-
return (hAsync("nav", { key: '
|
|
3416
|
+
return (hAsync("nav", { key: 'd66dd18fe856e4a8d82e47117d2de0288a9e3c56', "aria-label": "Breadcrumb" }, hAsync("ol", { key: 'b3a218032b312cb5973c1ca59ab7bedcfc07d676', class: "flex items-center space-x-2" }, itemsToRender.map((item, index) => {
|
|
3428
3417
|
const isLast = index === itemsToRender.length - 1;
|
|
3429
3418
|
return (hAsync("li", { class: "flex items-center" }, !item.isHidden ? (hAsync("eds-link", { label: item.label, url: item.url, intent: this.intent, current: isLast, "aria-label": item.label, size: "small", "icon-small": "false" })) : (hAsync("span", { class: "truncate px-2 ", "aria-hidden": "true" }, "...")), !isLast && !item.isHidden && (hAsync("eds-icon-wrapper", { icon: "chevron-right", class: "w-20 h-20" }))));
|
|
3430
3419
|
}))));
|
|
@@ -3679,7 +3668,7 @@ class EdsButton {
|
|
|
3679
3668
|
show: !this.loading
|
|
3680
3669
|
});
|
|
3681
3670
|
const ElementType = this.elementType;
|
|
3682
|
-
return (hAsync(ElementType, { key: '
|
|
3671
|
+
return (hAsync(ElementType, { key: 'e571ed0d3e2f4aa262259afea7d44d19b5685be7', "aria-label": this.label || this.ariaLabel || undefined, "aria-disabled": this.elementType === 'button' ? this.disabled : undefined, disabled: this.elementType === 'button' ? this.disabled : undefined, class: `${classes || ''} ${this.extraClass || ''}`, onClick: (event) => this.handleClick(event) }, this.label && hAsync("span", { key: '8928bd512c6fb592ed8d2d25ad46213a5a7f4bf5', class: this.loading ? 'opacity-0' : '' }, this.label), this.loading && (hAsync("span", { key: '8fdb5947ef65c60e5cc47f04d8fbe2f8485aa6bf', class: "absolute inset-0 flex items-center justify-center" }, hAsync("span", { key: '5a6cf5d4f2debc279066cb49fa30da7b66f5532b', class: "loader", style: {
|
|
3683
3672
|
border: `3px solid ${this.intent === 'secondary' ? 'rgba(255, 255, 255, .3)' : 'rgba(0, 0, 0, .3)'}`,
|
|
3684
3673
|
borderBottomColor: this.intent === 'secondary' ? '#fff' : '#000'
|
|
3685
3674
|
} }))), this.icon ? hAsync("eds-icon-wrapper", { class: iconClasses, icon: this.icon }) : null));
|
|
@@ -3713,6 +3702,14 @@ class EdsButton {
|
|
|
3713
3702
|
const edsCardDescCss = ".f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.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}";
|
|
3714
3703
|
var EdsCardDescStyle0 = edsCardDescCss;
|
|
3715
3704
|
|
|
3705
|
+
/**
|
|
3706
|
+
* `eds-card-desc` is a simple component that renders a card description.
|
|
3707
|
+
*
|
|
3708
|
+
* It displays a block of text with optional truncation applied using a CSS line clamp.
|
|
3709
|
+
* You can customize the description styling via the `descClass` property and control
|
|
3710
|
+
* whether or not the text is truncated and to how many lines.
|
|
3711
|
+
*
|
|
3712
|
+
*/
|
|
3716
3713
|
class EdsCardDesc {
|
|
3717
3714
|
constructor(hostRef) {
|
|
3718
3715
|
registerInstance(this, hostRef);
|
|
@@ -3725,7 +3722,7 @@ class EdsCardDesc {
|
|
|
3725
3722
|
return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
|
|
3726
3723
|
}
|
|
3727
3724
|
render() {
|
|
3728
|
-
return (hAsync("p", { key: '
|
|
3725
|
+
return (hAsync("p", { key: 'ca38bcc0895d5a0c87fda782ef455e45c4b53263', class: `text-light ${this.descClass}` }, hAsync("span", { key: '3108eec08a760b1db7ce1a7be05b68749f8f930b', class: this.getTruncateClass() }, this.description)));
|
|
3729
3726
|
}
|
|
3730
3727
|
static get style() { return EdsCardDescStyle0; }
|
|
3731
3728
|
static get cmpMeta() { return {
|
|
@@ -3769,7 +3766,7 @@ class EdsCardGeneric {
|
|
|
3769
3766
|
this.avatar = undefined;
|
|
3770
3767
|
this.shortAbbreviation = undefined;
|
|
3771
3768
|
this.headingLevel = 'h3';
|
|
3772
|
-
this.tags =
|
|
3769
|
+
this.tags = [];
|
|
3773
3770
|
this.tiny = false;
|
|
3774
3771
|
this.bg = true;
|
|
3775
3772
|
this.withHover = true;
|
|
@@ -3845,7 +3842,7 @@ class EdsCardGeneric {
|
|
|
3845
3842
|
});
|
|
3846
3843
|
}
|
|
3847
3844
|
render() {
|
|
3848
|
-
return (hAsync("article", { key: '
|
|
3845
|
+
return (hAsync("article", { key: '5b498abfc65206fe89c9e54e673a81e1b6ed37d5', class: this.articleClasses(), onClick: () => this.handleClick() }, hAsync("eds-card-title", { key: '61a0c6076957e39ab2a059c8587fc2e716e470bc', "heading-level": this.headingLevel, titleClass: this.image ? 'f-ui-01' : undefined, "card-title": this.cardTitle, url: this.url, hierarchy: this.hierarchy }), this.description && (hAsync("eds-card-desc", { key: '6df3c08512acf60e22001867ab5691aa19f67961', class: "mt-8", "truncate-lines": "3", description: this.description })), this.parsedImage ? (hAsync("eds-img", Object.assign({ class: "mt-8" }, this.parsedImage))) : this.avatar || this.shortAbbreviation ? (hAsync("eds-avatar", { class: "order-first mb-12", picture: this.avatar, initials: this.shortAbbreviation })) : null, hAsync("div", { key: '712193c8afac6744e2512d8b760daf2c850987b9', class: "flex flex-wrap gap-y-4" }, this.parsedTags.map((tag, index) => (hAsync("eds-tag", { key: index, intent: tag.style, label: tag.label })))), ' '));
|
|
3849
3846
|
}
|
|
3850
3847
|
get el() { return getElement(this); }
|
|
3851
3848
|
static get style() { return EdsCardGenericStyle0; }
|
|
@@ -3860,7 +3857,7 @@ class EdsCardGeneric {
|
|
|
3860
3857
|
"avatar": [1],
|
|
3861
3858
|
"shortAbbreviation": [1, "short-abbreviation"],
|
|
3862
3859
|
"headingLevel": [1, "heading-level"],
|
|
3863
|
-
"tags": [
|
|
3860
|
+
"tags": [1],
|
|
3864
3861
|
"tiny": [4],
|
|
3865
3862
|
"bg": [4],
|
|
3866
3863
|
"withHover": [4, "with-hover"],
|
|
@@ -3969,7 +3966,7 @@ var EdsCardSectionStyle0 = edsCardSectionCss;
|
|
|
3969
3966
|
class EdsCardSection {
|
|
3970
3967
|
constructor(hostRef) {
|
|
3971
3968
|
registerInstance(this, hostRef);
|
|
3972
|
-
this.cards =
|
|
3969
|
+
this.cards = [];
|
|
3973
3970
|
this.cols = 4;
|
|
3974
3971
|
}
|
|
3975
3972
|
/**
|
|
@@ -3992,7 +3989,7 @@ class EdsCardSection {
|
|
|
3992
3989
|
}
|
|
3993
3990
|
catch (e) {
|
|
3994
3991
|
// eslint-disable-next-line
|
|
3995
|
-
console.error('Error parsing
|
|
3992
|
+
console.error('Error parsing cards prop:', e);
|
|
3996
3993
|
return [];
|
|
3997
3994
|
}
|
|
3998
3995
|
}
|
|
@@ -4006,7 +4003,7 @@ class EdsCardSection {
|
|
|
4006
4003
|
* @returns {JSX.Element} The rendered section containing a list of cards.
|
|
4007
4004
|
*/
|
|
4008
4005
|
render() {
|
|
4009
|
-
return (hAsync("section", { key: '
|
|
4006
|
+
return (hAsync("section", { key: 'da139da167230819e494a6426c2431f209a2e557', class: "w-full" }, hAsync("ul", { key: '3e8affe5c9aee91c4487480c72c437339265101a', class: "grid-layout gap-y-8 md:gap-y-12 lg:gap-y-16" }, this.parsedCards.map((card) => (hAsync("li", { class: `grid-col-span-12 md:grid-col-span-${this.cols} flex flex-col` }, hAsync("eds-card-generic", { cardTitle: card.title, description: card.description, avatar: card.avatar, headingLevel: card.headingLevel, tags: card.tags, url: card.url, bg: card.bg, tiny: card.tiny, image: card.image, withHover: card.withHover })))))));
|
|
4010
4007
|
}
|
|
4011
4008
|
static get style() { return EdsCardSectionStyle0; }
|
|
4012
4009
|
static get cmpMeta() { return {
|
|
@@ -4035,7 +4032,7 @@ class EdsCardTags {
|
|
|
4035
4032
|
this.tags = [];
|
|
4036
4033
|
}
|
|
4037
4034
|
render() {
|
|
4038
|
-
return (hAsync("div", { key: '
|
|
4035
|
+
return (hAsync("div", { key: '60a129de62d45736eba0884cc24c9738f3a0f55c', class: "flex flex-wrap gap-y-4" }, this.tags.map((tag, index) => (hAsync("eds-tag", { key: index, intent: this.accent ? 'accent' : 'default', label: tag })))));
|
|
4039
4036
|
}
|
|
4040
4037
|
static get style() { return EdsCardTagsStyle0; }
|
|
4041
4038
|
static get cmpMeta() { return {
|
|
@@ -4099,7 +4096,7 @@ class EdsCardTitle {
|
|
|
4099
4096
|
render() {
|
|
4100
4097
|
//const Tag = this.getTag();
|
|
4101
4098
|
const Heading = this.headingLevel;
|
|
4102
|
-
return (hAsync(Heading, { key: '
|
|
4099
|
+
return (hAsync(Heading, { key: 'a654161b2c53e944eaefb21be7189a5e0acb06cf', class: this.getTitleClass() }, hAsync("a", { key: '868fd911c1a8c366d726e886bfc7827487013e27', class: "break-words after:absolute after:inset-0 after:z-10 after:content-[''] focus:outline-none", href: this.url, target: this.externalLink ? '_blank' : undefined, rel: this.externalLink ? 'noopener noreferrer' : undefined }, this.cardTitle)));
|
|
4103
4100
|
}
|
|
4104
4101
|
static get style() { return EdsCardTitleStyle0; }
|
|
4105
4102
|
static get cmpMeta() { return {
|
|
@@ -4238,7 +4235,7 @@ class EdsCardWrapper {
|
|
|
4238
4235
|
this.withHover ? 'effect-shadow hover:shadow-hover cursor-pointer' : '',
|
|
4239
4236
|
'border-softer effect-focus-within relative flex grow flex-col rounded-lg border-2 p-16'
|
|
4240
4237
|
].join(' ');
|
|
4241
|
-
return (hAsync("article", { key: '
|
|
4238
|
+
return (hAsync("article", { key: '7c12b1d147f061e189b5dda5d517ec4eae0c3691', class: articleClasses }, hAsync("slot", { key: 'f506bad73ed38ae36931f88f7d7c5f5d94705e4f' }), this.hasSlot('footer') && (hAsync("div", { key: '783f480be269e4a2f61aa8d4396e757fe41bfcc6', class: "mt-auto" }, hAsync("slot", { key: 'f07ddaa2d930518a5c8ac82efab3cb0dd6647bdd', name: "footer" })))));
|
|
4242
4239
|
}
|
|
4243
4240
|
get el() { return getElement(this); }
|
|
4244
4241
|
static get cmpMeta() { return {
|
|
@@ -6663,6 +6660,14 @@ Prism.languages.py = Prism.languages.python;
|
|
|
6663
6660
|
const edsCodeBlockCss = ":host{display:block;font-family:var(--font-family, 'Courier New', monospace)}pre[class*=\"language-\"]{white-space:pre-wrap;word-break:break-word;}.language{font-weight:bold;text-transform:uppercase}pre{margin:0;border-radius:8px;color:var(--purple-200);overflow:auto}code{font-family:'Courier New', monospace}.token.keyword{color:var(--purple-500)}.token.string{color:var(--green-500)}.token.function{color:var(--cyan-500)}.token.comment{color:var(--grey-700)}.relative{position:relative}.bg-stronger{background-color:var(--grey-900)}.rounded-sm{border-radius:8px}.rounded-xs{border-radius:4px}.text-inverse{color:var(--white)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.p-0{padding:0rem}.p-12{padding:0.75rem}.p-16{padding:1rem}.p-20{padding:1.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.pl-8{padding-left:0.5rem}.mb-10{margin-bottom:0.625rem}.mb-12{margin-bottom:0.75rem}.mb-28{margin-bottom:1.75rem}.pb-16{padding-bottom:1rem}.pb-20{padding-bottom:1.25rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.pb-8{padding-bottom:0.5rem}.mt-16{margin-top:1rem}.mt-2{margin-top:0.125rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.w-20{width:1.25rem}.h-20{height:1.25rem}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.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)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}";
|
|
6664
6661
|
var EdsCodeBlockStyle0 = edsCodeBlockCss;
|
|
6665
6662
|
|
|
6663
|
+
//import { sendAnalytics } from '@ebrains/utils';
|
|
6664
|
+
/**
|
|
6665
|
+
* A component that displays a code block with syntax highlighting.
|
|
6666
|
+
*
|
|
6667
|
+
* Uses Prism.js for syntax highlighting. Supports multiple languages such as JavaScript, HTML, CSS,
|
|
6668
|
+
* Python, Bash/Shell, and YAML.
|
|
6669
|
+
*
|
|
6670
|
+
* */
|
|
6666
6671
|
class EdsCodeBlock {
|
|
6667
6672
|
constructor(hostRef) {
|
|
6668
6673
|
registerInstance(this, hostRef);
|
|
@@ -6670,12 +6675,58 @@ class EdsCodeBlock {
|
|
|
6670
6675
|
this.language = undefined;
|
|
6671
6676
|
this.copied = false;
|
|
6672
6677
|
}
|
|
6678
|
+
/**
|
|
6679
|
+
* Copies the current code content to the clipboard and sets a temporary copied state.
|
|
6680
|
+
*
|
|
6681
|
+
* @private
|
|
6682
|
+
* @returns {void}
|
|
6683
|
+
*/
|
|
6673
6684
|
copyToClipboard() {
|
|
6674
6685
|
navigator.clipboard.writeText(this.code).then(() => {
|
|
6675
6686
|
this.copied = true;
|
|
6687
|
+
/*const analyticsName = this.createHumanFriendlyAnalyticsName(this.code, this.language);
|
|
6688
|
+
sendAnalytics({
|
|
6689
|
+
category: 'ui-component',
|
|
6690
|
+
parentContext: null,
|
|
6691
|
+
tag: this.el.tagName.toLowerCase(),
|
|
6692
|
+
name: analyticsName || '',
|
|
6693
|
+
action: 'copy'
|
|
6694
|
+
});*/
|
|
6676
6695
|
setTimeout(() => (this.copied = false), 2000);
|
|
6677
6696
|
});
|
|
6678
6697
|
}
|
|
6698
|
+
/**
|
|
6699
|
+
* Utility function that creates a human-friendly analytics name based on the code and language.
|
|
6700
|
+
* It uses:
|
|
6701
|
+
* - The language (in uppercase)
|
|
6702
|
+
* - The number of non-empty lines in the code
|
|
6703
|
+
* - The first non-empty line of code (truncated to 30 characters, if needed)
|
|
6704
|
+
*
|
|
6705
|
+
* returns A descriptive analytics name.
|
|
6706
|
+
*/
|
|
6707
|
+
/*private createHumanFriendlyAnalyticsName(code: string, language: string): string {
|
|
6708
|
+
// Count non-empty lines
|
|
6709
|
+
const lines = code.split('\n').filter(line => line.trim() !== '').length;
|
|
6710
|
+
|
|
6711
|
+
// Find the first non-empty line and trim it
|
|
6712
|
+
let firstNonEmptyLine = code.split('\n').find(line => line.trim() !== '');
|
|
6713
|
+
firstNonEmptyLine = firstNonEmptyLine ? firstNonEmptyLine.trim() : '';
|
|
6714
|
+
|
|
6715
|
+
// Truncate the snippet if it’s too long
|
|
6716
|
+
if (firstNonEmptyLine.length > 30) {
|
|
6717
|
+
firstNonEmptyLine = firstNonEmptyLine.substring(0, 30) + '...';
|
|
6718
|
+
}
|
|
6719
|
+
|
|
6720
|
+
return `CodeBlock:${language.toLowerCase()}|${lines}-line(s)|${firstNonEmptyLine.toLowerCase()}`;
|
|
6721
|
+
}*/
|
|
6722
|
+
/**
|
|
6723
|
+
* Returns the syntax-highlighted HTML for the code.
|
|
6724
|
+
* If the provided language is supported by Prism, this method returns the highlighted code.
|
|
6725
|
+
* Otherwise, it logs a warning and returns the raw code.
|
|
6726
|
+
*
|
|
6727
|
+
* @private
|
|
6728
|
+
* @returns {string} The highlighted HTML string for the code block.
|
|
6729
|
+
*/
|
|
6679
6730
|
getHighlightedCode() {
|
|
6680
6731
|
if (this.language && Prism$1.languages[this.language]) {
|
|
6681
6732
|
return Prism$1.highlight(this.code, Prism$1.languages[this.language], this.language);
|
|
@@ -6685,8 +6736,9 @@ class EdsCodeBlock {
|
|
|
6685
6736
|
return this.code; // Fallback if language is not provided or unsupported
|
|
6686
6737
|
}
|
|
6687
6738
|
render() {
|
|
6688
|
-
return (hAsync("div", { key: '
|
|
6739
|
+
return (hAsync("div", { key: '00eba9265ee17605f699d1e5606013b68e900b29', class: "relative bg-stronger rounded-sm" }, hAsync("div", { key: '1192584f04de5ff74e91c88597a3360b92053456', class: "text-inverse flex justify-between items-center p-8" }, this.language ? (hAsync("span", { class: "f-ui-03" }, this.language.toUpperCase())) : (hAsync("pre", { class: "bg-stronger pl-8", role: "region", "aria-label": "Code block without language" }, hAsync("code", { innerHTML: this.getHighlightedCode() }))), hAsync("span", { key: '3666b6529a16a8cc64f448527db4ddee08f977a3', "aria-hidden": "true", class: "w-20 h-20 mt-8" }, hAsync("eds-icon-wrapper", { key: 'f222d95a2e548429f6c4de96a7646e3cef1f360f', icon: this.copied ? 'success' : 'copy', onClick: () => this.copyToClipboard() })), hAsync("span", { key: '8c539deda773909c01a41eb04ee51380c0a9c4bb', class: "sr-only" }, "Copy Code")), this.language && (hAsync("pre", { key: '99541dedb32c543da5e780ffee4460333fbb3724', class: `language-${this.language} bg-stronger pl-8 pb-8`, role: "region", "aria-label": `Code block in ${this.language}` }, hAsync("code", { key: '4e6ae6fcfae3de8c1fe5ad9d22309e0c8bee0c2c', innerHTML: this.getHighlightedCode() })))));
|
|
6689
6740
|
}
|
|
6741
|
+
get el() { return getElement(this); }
|
|
6690
6742
|
static get style() { return EdsCodeBlockStyle0; }
|
|
6691
6743
|
static get cmpMeta() { return {
|
|
6692
6744
|
"$flags$": 9,
|
|
@@ -6922,6 +6974,7 @@ class EdsDropdown {
|
|
|
6922
6974
|
* Toggles the visibility of the dropdown and manages focus.
|
|
6923
6975
|
*/
|
|
6924
6976
|
this.handleClick = () => {
|
|
6977
|
+
var _a;
|
|
6925
6978
|
this.isOpen = !this.isOpen;
|
|
6926
6979
|
if (this.isOpen) {
|
|
6927
6980
|
this.focusIndex = 0;
|
|
@@ -6930,6 +6983,13 @@ class EdsDropdown {
|
|
|
6930
6983
|
else {
|
|
6931
6984
|
this.closeDropdown();
|
|
6932
6985
|
}
|
|
6986
|
+
sendAnalytics({
|
|
6987
|
+
category: 'ui-component',
|
|
6988
|
+
parentContext: null,
|
|
6989
|
+
tag: this.host.tagName.toLowerCase(),
|
|
6990
|
+
name: ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
6991
|
+
action: this.isOpen ? 'expanded' : 'collapsed'
|
|
6992
|
+
});
|
|
6933
6993
|
};
|
|
6934
6994
|
this.icon = 'chevron-down';
|
|
6935
6995
|
this.label = undefined;
|
|
@@ -6996,39 +7056,20 @@ class EdsDropdown {
|
|
|
6996
7056
|
componentDidLoad() {
|
|
6997
7057
|
var _a;
|
|
6998
7058
|
this.focusableItems = Array.from(((_a = this.dropdownContent) === null || _a === void 0 ? void 0 : _a.querySelectorAll('a, button')) || []);
|
|
6999
|
-
const btns = this.host.shadowRoot.querySelectorAll('eds-button');
|
|
7000
|
-
btns.forEach((btn) => {
|
|
7001
|
-
this.emitContext(btn);
|
|
7002
|
-
});
|
|
7003
|
-
}
|
|
7004
|
-
/**
|
|
7005
|
-
* Emits a custom event called `parentContext` for a given button element.
|
|
7006
|
-
* Provides context information about the dropdown component.
|
|
7007
|
-
*
|
|
7008
|
-
* @param linkElement - The button element to which the event will be dispatched.
|
|
7009
|
-
*/
|
|
7010
|
-
emitContext(linkElement) {
|
|
7011
|
-
const event = new CustomEvent('parentContext', {
|
|
7012
|
-
detail: {
|
|
7013
|
-
componentName: this.host.tagName.toLowerCase(),
|
|
7014
|
-
identifier: null
|
|
7015
|
-
}
|
|
7016
|
-
});
|
|
7017
|
-
linkElement.dispatchEvent(event);
|
|
7018
7059
|
}
|
|
7019
7060
|
/**
|
|
7020
7061
|
* Renders the dropdown component and displays its content when open.
|
|
7021
7062
|
* @returns {JSX.Element} The rendered dropdown component.
|
|
7022
7063
|
*/
|
|
7023
7064
|
render() {
|
|
7024
|
-
return (hAsync("div", { key: '
|
|
7065
|
+
return (hAsync("div", { key: '809cb733330db434f94f854ed4d1ee375f598297', class: "z-focus relative", ref: (el) => (this.dropdownContent = el) }, hAsync("eds-button", { key: 'c80f2930b335708a2a01d06b565673597bd8d926', label: this.label, "aria-label": this.ariaLabel, icon: this.icon, intent: this.intent, onClick: this.handleClick, "aria-expanded": this.isOpen.toString(), "aria-haspopup": "menu" }), hAsync("nav", { key: '7b3ccb2ab29474a4795d5491960e0713aefcd624', class: {
|
|
7025
7066
|
'shadow-small bg-inverse border-softest z-10 z-on-top absolute top-full mt-4 flex flex-col gap-y-4 border-2 p-8': true,
|
|
7026
7067
|
'left-4': this.dropdownPos === 'left' && this.dropdownOffset,
|
|
7027
7068
|
'left-0': this.dropdownPos === 'left' && !this.dropdownOffset,
|
|
7028
7069
|
'right-4': this.dropdownPos === 'right' && this.dropdownOffset,
|
|
7029
7070
|
'right-0': this.dropdownPos === 'right' && !this.dropdownOffset,
|
|
7030
7071
|
'rounded-lg': this.rounded
|
|
7031
|
-
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, hAsync("slot", { key: '
|
|
7072
|
+
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, hAsync("slot", { key: 'c514c5dca893708fd1660a61cfeb1607229bbff5' }))));
|
|
7032
7073
|
}
|
|
7033
7074
|
get host() { return getElement(this); }
|
|
7034
7075
|
static get style() { return EdsDropdownStyle0; }
|
|
@@ -7286,7 +7327,6 @@ class EdsForm {
|
|
|
7286
7327
|
this.formSubmitting.emit(this.isSubmitting);
|
|
7287
7328
|
}
|
|
7288
7329
|
};
|
|
7289
|
-
this.smallAlert = false;
|
|
7290
7330
|
this.setFormUrl = true;
|
|
7291
7331
|
this.submitBtn = true;
|
|
7292
7332
|
this.submitBtnLabel = 'Submit';
|
|
@@ -7295,7 +7335,7 @@ class EdsForm {
|
|
|
7295
7335
|
this.submitBtnHintMessage = 'To participate, please sign in using your EBRAINS account. If you do not have an account yet, you can easily create one on the EBRAINS portal.';
|
|
7296
7336
|
this.endpoint = undefined;
|
|
7297
7337
|
this.name = 'form';
|
|
7298
|
-
this.fields =
|
|
7338
|
+
this.fields = [];
|
|
7299
7339
|
this.values = {};
|
|
7300
7340
|
this.coupleAuth = false;
|
|
7301
7341
|
this.formSubmitted = false;
|
|
@@ -7305,6 +7345,7 @@ class EdsForm {
|
|
|
7305
7345
|
this.alertMessage = null;
|
|
7306
7346
|
this.isAuthenticated = false;
|
|
7307
7347
|
this.authUser = undefined;
|
|
7348
|
+
this.parsedFields = [];
|
|
7308
7349
|
}
|
|
7309
7350
|
onAuthStatusChanged(event) {
|
|
7310
7351
|
var _a;
|
|
@@ -7312,6 +7353,7 @@ class EdsForm {
|
|
|
7312
7353
|
this.authUser = event.detail.user;
|
|
7313
7354
|
}
|
|
7314
7355
|
componentDidLoad() {
|
|
7356
|
+
this.parseFields(this.fields);
|
|
7315
7357
|
// Emit context for each eds-link element after the component is fully loaded
|
|
7316
7358
|
const links = this.el.querySelectorAll('eds-button');
|
|
7317
7359
|
links.forEach((link) => {
|
|
@@ -7384,7 +7426,7 @@ class EdsForm {
|
|
|
7384
7426
|
validateForm() {
|
|
7385
7427
|
this.errors = {};
|
|
7386
7428
|
this.hasError = false;
|
|
7387
|
-
this.
|
|
7429
|
+
this.parsedFields.forEach((field) => {
|
|
7388
7430
|
if (field.type !== 'hidden') {
|
|
7389
7431
|
if ((field.type === 'checkbox' || field.type === 'radio') && !field.options) {
|
|
7390
7432
|
// Single checkbox validation
|
|
@@ -7466,27 +7508,48 @@ class EdsForm {
|
|
|
7466
7508
|
});
|
|
7467
7509
|
return formData;
|
|
7468
7510
|
}
|
|
7469
|
-
|
|
7470
|
-
|
|
7511
|
+
parseFields(newValue) {
|
|
7512
|
+
try {
|
|
7513
|
+
if (typeof newValue === 'string') {
|
|
7514
|
+
this.parsedFields = JSON.parse(newValue);
|
|
7515
|
+
}
|
|
7516
|
+
else if (Array.isArray(newValue)) {
|
|
7517
|
+
this.parsedFields = newValue;
|
|
7518
|
+
}
|
|
7519
|
+
else if (newValue && typeof newValue === 'object') {
|
|
7520
|
+
// In case a single object is passed, wrap it in an array.
|
|
7521
|
+
this.parsedFields = newValue;
|
|
7522
|
+
}
|
|
7523
|
+
else {
|
|
7524
|
+
this.parsedFields = [];
|
|
7525
|
+
}
|
|
7526
|
+
}
|
|
7527
|
+
catch (error) {
|
|
7528
|
+
// eslint-disable-next-line
|
|
7529
|
+
console.error('Error parsing fields prop:', error);
|
|
7530
|
+
this.parsedFields = [];
|
|
7531
|
+
}
|
|
7471
7532
|
}
|
|
7472
7533
|
render() {
|
|
7473
|
-
const hiddenFields = this.
|
|
7474
|
-
const otherFields = this.
|
|
7475
|
-
return (hAsync("form", { key: '
|
|
7534
|
+
const hiddenFields = this.parsedFields.filter((field) => field.type === 'hidden');
|
|
7535
|
+
const otherFields = this.parsedFields.filter((field) => field.type !== 'hidden');
|
|
7536
|
+
return (hAsync("form", { key: '0a106caa8aa9f056b55acf6fecfbc7090c4411d2', ref: (el) => (this.formEl = el), enctype: "multipart/form-data", autocomplete: "on", method: "post", onSubmit: this.handleSubmit }, hAsync("div", { key: '3478d82640378d9a1c0c09394453e2118b1b3ca9' }, hAsync("slot", { key: '9bc37f54c03b2b0f831da917b6ce6bab2ec11084' }), hiddenFields.map((field, index) => (hAsync("eds-input", { key: index, type: "hidden", name: field.name, value: field.value }))), otherFields.map((field, index) => {
|
|
7476
7537
|
var _a, _b;
|
|
7477
7538
|
if (!this.isFieldVisible(field)) {
|
|
7478
7539
|
return null;
|
|
7479
7540
|
}
|
|
7480
7541
|
return (hAsync("eds-input-field", { key: index, name: field.name, id: `${this.name}_${field.name}`, label: field.label, type: field.type, icon: field.icon || null, required: field.required, maxLength: field.maxlength, hint: field.hint, error: ((_a = this.errors[field.name]) === null || _a === void 0 ? void 0 : _a.length) > 0, errorMessage: (_b = this.errors[field.name]) === null || _b === void 0 ? void 0 : _b.join('<br />'), onInput: (e) => this.handleChange(e, field), class: index > 0 ? 'mt-20' : '', options: field.options }));
|
|
7481
|
-
})), this.submitBtn && (hAsync("div", { key: '
|
|
7542
|
+
})), this.submitBtn && (hAsync("div", { key: 'ca221e8c5c18cf4a107581736728f84cea7831d0', class: "mt-20" }, hAsync("eds-button", { key: 'eef3cf052beb62703c1df74d142650194d60c501', intent: "primary", label: this.submitBtnLabel, disabled: this.isSubmitting || (this.coupleAuth && !this.isAuthenticated), loading: this.isSubmitting, onClick: (e) => this.handleSubmit(e) }), this.coupleAuth && !this.isAuthenticated ? (hAsync("p", { class: "f-ui-05 text-lighter mt-8 ml-8" }, this.submitBtnHintMessage)) : null)), this.alertMessage && (this.formSubmitted || this.hasError) && (hAsync("div", { key: '69861c8776b99e26a08585a5a8c893c85a2d9999', class: "mt-20" }, hAsync("eds-alert", { key: 'b4d225d8efcbe6cde95789c367f0ecf94f217c9c', message: this.alertMessage, intent: this.hasError ? 'error' : 'success', direction: "horizontal" })))));
|
|
7482
7543
|
}
|
|
7483
7544
|
get el() { return getElement(this); }
|
|
7545
|
+
static get watchers() { return {
|
|
7546
|
+
"fields": ["parseFields"]
|
|
7547
|
+
}; }
|
|
7484
7548
|
static get style() { return EdsFormStyle0; }
|
|
7485
7549
|
static get cmpMeta() { return {
|
|
7486
7550
|
"$flags$": 4,
|
|
7487
7551
|
"$tagName$": "eds-form",
|
|
7488
7552
|
"$members$": {
|
|
7489
|
-
"smallAlert": [4, "small-alert"],
|
|
7490
7553
|
"setFormUrl": [4, "set-form-url"],
|
|
7491
7554
|
"submitBtn": [4, "submit-btn"],
|
|
7492
7555
|
"submitBtnLabel": [1, "submit-btn-label"],
|
|
@@ -7504,7 +7567,8 @@ class EdsForm {
|
|
|
7504
7567
|
"isSubmitting": [32],
|
|
7505
7568
|
"alertMessage": [32],
|
|
7506
7569
|
"isAuthenticated": [32],
|
|
7507
|
-
"authUser": [32]
|
|
7570
|
+
"authUser": [32],
|
|
7571
|
+
"parsedFields": [32]
|
|
7508
7572
|
},
|
|
7509
7573
|
"$listeners$": [[16, "authStatusChanged", "onAuthStatusChanged"]],
|
|
7510
7574
|
"$lazyBundleId$": "-",
|
|
@@ -10710,6 +10774,9 @@ class EdsInputSearch {
|
|
|
10710
10774
|
*
|
|
10711
10775
|
* The component will automatically fetch data if a dynamic configuration is provided.
|
|
10712
10776
|
*/
|
|
10777
|
+
/**
|
|
10778
|
+
* @internal
|
|
10779
|
+
*/
|
|
10713
10780
|
class EdsInputSelect {
|
|
10714
10781
|
constructor(hostRef) {
|
|
10715
10782
|
registerInstance(this, hostRef);
|
|
@@ -10785,7 +10852,7 @@ class EdsInputSelect {
|
|
|
10785
10852
|
}
|
|
10786
10853
|
}
|
|
10787
10854
|
render() {
|
|
10788
|
-
return (hAsync("div", { key: '
|
|
10855
|
+
return (hAsync("div", { key: 'd37107564a86281b3a3920a5eb128f47f6fd4ceb', class: "relative" }, hAsync("select", { key: 'a69cd907ef6732ec42a99fd46bbf9a52ef03735a', id: this.inputId || this.name, name: this.name, class: `input invalid:text-lightest pr-32 ${this.error ? 'input-error' : ''}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": this.hasMessage || this.error ? `${this.name}-error` : '', disabled: this.disabled || this.loading, required: this.required, onChange: this.handleChange }, hAsync("option", { key: '8b84a2b7edd7e989411908b16f35c46853889d8e', value: "", disabled: true, hidden: true }, this.loading ? 'Loading options...' : `Please select ${this.name}`), this.dynamicOptions.map((option, index) => (hAsync("option", { key: index, value: option[this.dynamicValueKey] }, option[this.dynamicLabelKey])))), hAsync("span", { key: 'dbccb6161aafc2dc31cc6dd5b3d8c812545eab9a', class: `bg-dark rounded-xs absolute top-1/2 right-[6px] flex h-28 w-28 -translate-y-1/2 items-center justify-center ${this.disabled || this.loading ? 'text-lightest bg-transparent' : ''}` }, hAsync("eds-icon-wrapper", { key: 'b0fd24cb54185d8558dfabcb94d05b6257caacd1', class: "w-20 h-20", icon: "chevron-right" }))));
|
|
10789
10856
|
}
|
|
10790
10857
|
static get watchers() { return {
|
|
10791
10858
|
"options": ["loadOptions"]
|
|
@@ -10968,12 +11035,11 @@ class EdsLink {
|
|
|
10968
11035
|
this.hideLabelOnSmallScreen = false;
|
|
10969
11036
|
this.extraClass = undefined;
|
|
10970
11037
|
}
|
|
10971
|
-
|
|
11038
|
+
handleParentContext(event) {
|
|
10972
11039
|
if (event.target !== this.el) {
|
|
10973
11040
|
// Ignore the event if it's not targeted at this specific instance
|
|
10974
11041
|
return;
|
|
10975
11042
|
}
|
|
10976
|
-
//console.log(event.detail);
|
|
10977
11043
|
this.parentContext = event.detail;
|
|
10978
11044
|
event.stopPropagation();
|
|
10979
11045
|
}
|
|
@@ -11024,7 +11090,7 @@ class EdsLink {
|
|
|
11024
11090
|
const labelClasses = this.hideLabelOnSmallScreen
|
|
11025
11091
|
? 'hidden lg:flex' // Tailwind example: hidden on small screens, visible on larger
|
|
11026
11092
|
: '';
|
|
11027
|
-
return (hAsync(ComponentType, { key: '
|
|
11093
|
+
return (hAsync(ComponentType, { key: '58eb3c1c5c192c2855424864c9e3e9c7a5fe3378', class: `${classes || ''} ${this.extraClass || ''}`, href: !this.disabled ? this.url : undefined, target: this.external && !this.disabled ? '_blank' : undefined, rel: this.external && !this.disabled ? 'noopener noreferrer' : undefined, "aria-label": this.label || this.ariaLabel || undefined, "aria-disabled": this.disabled ? 'true' : null, download: this.download ? '' : undefined, onClick: (event) => this.handleClick(event) }, hAsync("span", { key: 'd4033ba589552f60f8dc7559434a3c035d226de4', class: "z-1 relative inline-flex items-center justify-center" }, this.renderLeftIcon(), hAsync("span", { key: 'ca520cc66febaf8c8ddfd2fd8ee8a13b71a3078d', class: labelClasses }, this.label), this.renderRightIcon())));
|
|
11028
11094
|
}
|
|
11029
11095
|
get el() { return getElement(this); }
|
|
11030
11096
|
static get style() { return EdsLinkStyle0; }
|
|
@@ -11047,7 +11113,7 @@ class EdsLink {
|
|
|
11047
11113
|
"hideLabelOnSmallScreen": [4, "hide-label-on-small-screen"],
|
|
11048
11114
|
"extraClass": [1, "extra-class"]
|
|
11049
11115
|
},
|
|
11050
|
-
"$listeners$": [[0, "parentContext", "
|
|
11116
|
+
"$listeners$": [[0, "parentContext", "handleParentContext"]],
|
|
11051
11117
|
"$lazyBundleId$": "-",
|
|
11052
11118
|
"$attrsToReflect$": []
|
|
11053
11119
|
}; }
|
|
@@ -13276,7 +13342,7 @@ class EdsMatomoNotice {
|
|
|
13276
13342
|
}; }
|
|
13277
13343
|
}
|
|
13278
13344
|
|
|
13279
|
-
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}";
|
|
13345
|
+
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%}.left-20{left:1.25rem}.right-20{right:1.25rem}.top-1\\/2{top:50%}.top-20{top:1.25rem}.bottom-20{bottom:1.25rem}.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}";
|
|
13280
13346
|
var EdsModalStyle0 = edsModalCss;
|
|
13281
13347
|
|
|
13282
13348
|
//import { sendAnalytics } from '@ebrains/utils';
|
|
@@ -13297,33 +13363,59 @@ class EdsModal {
|
|
|
13297
13363
|
this.title = '';
|
|
13298
13364
|
this.truncate = true;
|
|
13299
13365
|
this.truncateLines = '1';
|
|
13366
|
+
this.position = 'middle';
|
|
13300
13367
|
}
|
|
13301
13368
|
getTruncateClass() {
|
|
13302
13369
|
return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
|
|
13303
13370
|
}
|
|
13371
|
+
/**
|
|
13372
|
+
* Returns the Tailwind CSS classes to position the modal based on the `position` prop.
|
|
13373
|
+
*
|
|
13374
|
+
* @private
|
|
13375
|
+
* @returns {string} The concatenated CSS classes for modal positioning.
|
|
13376
|
+
*/
|
|
13377
|
+
getModalPositionClasses() {
|
|
13378
|
+
switch (this.position) {
|
|
13379
|
+
case 'top':
|
|
13380
|
+
return 'left-1/2 top-20 -translate-x-1/2';
|
|
13381
|
+
case 'bottom':
|
|
13382
|
+
return 'left-1/2 bottom-20 -translate-x-1/2';
|
|
13383
|
+
case 'left':
|
|
13384
|
+
return 'left-20 top-1/2 -translate-y-1/2';
|
|
13385
|
+
case 'right':
|
|
13386
|
+
return 'right-20 top-1/2 -translate-y-1/2';
|
|
13387
|
+
case 'middle':
|
|
13388
|
+
default:
|
|
13389
|
+
return 'left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2';
|
|
13390
|
+
}
|
|
13391
|
+
}
|
|
13304
13392
|
/**
|
|
13305
13393
|
* Opens the modal.
|
|
13306
13394
|
*/
|
|
13307
13395
|
async open() {
|
|
13396
|
+
var _a;
|
|
13308
13397
|
this.isOpen = true;
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
|
|
13312
|
-
|
|
13313
|
-
|
|
13314
|
-
|
|
13398
|
+
sendAnalytics({
|
|
13399
|
+
category: 'ui-component',
|
|
13400
|
+
parentContext: null,
|
|
13401
|
+
tag: this.el.tagName.toLowerCase(),
|
|
13402
|
+
name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
13403
|
+
action: 'opened'
|
|
13404
|
+
});
|
|
13315
13405
|
}
|
|
13316
13406
|
/**
|
|
13317
13407
|
* Closes the modal.
|
|
13318
13408
|
*/
|
|
13319
13409
|
async close() {
|
|
13410
|
+
var _a;
|
|
13320
13411
|
this.isOpen = false;
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
|
|
13326
|
-
|
|
13412
|
+
sendAnalytics({
|
|
13413
|
+
category: 'ui-component',
|
|
13414
|
+
parentContext: null,
|
|
13415
|
+
tag: this.el.tagName.toLowerCase(),
|
|
13416
|
+
name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
13417
|
+
action: 'closed'
|
|
13418
|
+
});
|
|
13327
13419
|
}
|
|
13328
13420
|
/**
|
|
13329
13421
|
* Toggles the modal open or closed.
|
|
@@ -13337,30 +13429,27 @@ class EdsModal {
|
|
|
13337
13429
|
*/
|
|
13338
13430
|
componentDidLoad() {
|
|
13339
13431
|
// Emit context for each eds-link element after the component is fully loaded
|
|
13340
|
-
const
|
|
13341
|
-
|
|
13342
|
-
this.emitContext(btn);
|
|
13343
|
-
});
|
|
13432
|
+
//const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
13433
|
+
//this.emitContext(btn);
|
|
13344
13434
|
}
|
|
13345
13435
|
/**
|
|
13346
13436
|
* Emits a custom event called `parentContext` for a given button element.
|
|
13347
13437
|
* This event provides context information about the eds-modal component.
|
|
13348
|
-
*
|
|
13349
|
-
* @param btnElement - The link element to which the event will be dispatched.
|
|
13350
13438
|
*/
|
|
13351
|
-
emitContext(btnElement) {
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13356
|
-
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
|
|
13439
|
+
/*emitContext(btnElement: HTMLElement) {
|
|
13440
|
+
const event = new CustomEvent<ParentContextDetail>('parentContext', {
|
|
13441
|
+
detail: {
|
|
13442
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
13443
|
+
identifier: null
|
|
13444
|
+
}
|
|
13445
|
+
});
|
|
13446
|
+
|
|
13447
|
+
btnElement.dispatchEvent(event);
|
|
13448
|
+
}*/
|
|
13360
13449
|
render() {
|
|
13361
|
-
return (hAsync("div", { key: '
|
|
13450
|
+
return (hAsync("div", { key: 'eedcdc49c9f4a16ef4537ec02335757aa1143bd9', class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-50 flex` }, this.isOpen && (hAsync("div", { key: '2b24903b85895fd5eca389d6897aa85c892e762f', class: "fixed inset-0 bg-dark bg-opacity-90" // Add backdrop-blur utility class here
|
|
13362
13451
|
,
|
|
13363
|
-
onClick: () => this.close() })), hAsync("div", { key: '
|
|
13452
|
+
onClick: () => this.close() })), hAsync("div", { key: 'd135a2d9eff1764b6335b9b16be54d8fec7d4112', class: `max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 ${this.getModalPositionClasses()} grow justify-center` }, hAsync("div", { key: 'bc8ea6f95443f01d3e5b88953581e1f2eae4009c', class: "flex justify-between items-center border-b-2 border-softer pb-8" }, hAsync("span", { key: '872b9a4bf44db478d38f18d3459a816c119f352d', class: `f-heading-04 text-lighter ${this.getTruncateClass()}` }, this.title), hAsync("eds-button", { key: 'bdf27a3f564d295383985cb1f0ce7df7f13a97fb', intent: "tertiary", icon: "close", "aria-label": "Close modal", onClick: () => this.close(), "extra-class": "ml-8" })), hAsync("div", { key: '600cc4d544d0a41d9d2be74aedbb0d2fe2028141', class: "pt-8" }, hAsync("slot", { key: '8ce560804a6d960b4075e4b6d1607dda6530c08d' })))));
|
|
13364
13453
|
}
|
|
13365
13454
|
get el() { return getElement(this); }
|
|
13366
13455
|
static get style() { return EdsModalStyle0; }
|
|
@@ -13371,6 +13460,7 @@ class EdsModal {
|
|
|
13371
13460
|
"title": [1],
|
|
13372
13461
|
"truncate": [4],
|
|
13373
13462
|
"truncateLines": [1, "truncate-lines"],
|
|
13463
|
+
"position": [1],
|
|
13374
13464
|
"isOpen": [32],
|
|
13375
13465
|
"open": [64],
|
|
13376
13466
|
"close": [64],
|
|
@@ -13473,14 +13563,18 @@ class EdsPagination {
|
|
|
13473
13563
|
componentDidLoad() {
|
|
13474
13564
|
// Emit context for each eds-link element after the component is fully loaded
|
|
13475
13565
|
const links = this.hostEl.shadowRoot.querySelectorAll('eds-link');
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13566
|
+
links.forEach((lnk) => {
|
|
13567
|
+
this.emitContext(lnk);
|
|
13568
|
+
});
|
|
13569
|
+
/*if (links.length > 0) {
|
|
13570
|
+
// Emit context for the first link
|
|
13571
|
+
this.emitContext(links[0]);
|
|
13572
|
+
|
|
13573
|
+
// Emit context for the last link, if it's different from the first
|
|
13574
|
+
if (links.length > 1) {
|
|
13575
|
+
this.emitContext(links[links.length - 1]);
|
|
13576
|
+
}
|
|
13577
|
+
}*/
|
|
13484
13578
|
}
|
|
13485
13579
|
/**
|
|
13486
13580
|
* Emits a custom event called `parentContext` for a given link element.
|
|
@@ -13610,7 +13704,7 @@ class EdsPagination {
|
|
|
13610
13704
|
}
|
|
13611
13705
|
}
|
|
13612
13706
|
render() {
|
|
13613
|
-
return (hAsync("div", { key: '
|
|
13707
|
+
return (hAsync("div", { key: '584e0918b070eac25a7c4bfceff59b000b60076c' }, this.total > 0 && this.mode === 'default' && (hAsync("p", { key: 'c688bd8e1f1d15904fc274454093f03213f59e38', class: "f-ui-03 text-lightest mb-28 w-full text-center" }, hAsync("span", { key: 'c2472919bad41f76e26d518da27509e545ed9db6', class: "sr-only" }, "Results:"), this.pageResults())), this.mode === 'navigator' || (this.lastPage && this.lastPage > 1) ? (hAsync("nav", { "aria-label": "Pagination" }, hAsync("ul", { class: "flex items-center justify-center gap-x-8" }, hAsync("li", { class: "mr-auto" }, hAsync("eds-link", { label: this.prevLabel, url: this.mode === 'navigator'
|
|
13614
13708
|
? this.prevUrl || '#' // Use prevUrl if provided, otherwise disable with '#'
|
|
13615
13709
|
: this.isFirstPage()
|
|
13616
13710
|
? '#'
|
|
@@ -13717,10 +13811,8 @@ class EdsRating {
|
|
|
13717
13811
|
this.selectedRating = 0;
|
|
13718
13812
|
}
|
|
13719
13813
|
/**
|
|
13720
|
-
* Parses the `
|
|
13721
|
-
* Returns an empty array if parsing fails
|
|
13722
|
-
*
|
|
13723
|
-
* @returns {any[]} Array of parsed link objects
|
|
13814
|
+
* Parses the `textMapping` prop into an array of strings.
|
|
13815
|
+
* Returns an empty array if parsing fails.
|
|
13724
13816
|
*/
|
|
13725
13817
|
get parsedMappings() {
|
|
13726
13818
|
if (typeof this.textMapping === 'object') {
|
|
@@ -13732,7 +13824,7 @@ class EdsRating {
|
|
|
13732
13824
|
}
|
|
13733
13825
|
catch (e) {
|
|
13734
13826
|
// eslint-disable-next-line
|
|
13735
|
-
console.error('Error parsing
|
|
13827
|
+
console.error('Error parsing textMapping prop:', e);
|
|
13736
13828
|
return [];
|
|
13737
13829
|
}
|
|
13738
13830
|
}
|
|
@@ -13747,10 +13839,10 @@ class EdsRating {
|
|
|
13747
13839
|
this.ratingChange.emit(rating);
|
|
13748
13840
|
}
|
|
13749
13841
|
render() {
|
|
13750
|
-
return (hAsync("div", { key: '
|
|
13842
|
+
return (hAsync("div", { key: 'c9147c2635f091d93f329d2b56a5fee8dce9126c', class: "relative w-full flex flex-col" }, hAsync("span", { key: '39a84bc3d9bcd4b729a35737c883eca7144d13ac', class: "f-body-01" }, this.label), hAsync("div", { key: '3cb84acf399cac0b23393c71df2f2b36aab4f43e', class: "stars" }, Array.from({ length: this.stars }, (_, index) => (hAsync("span", { class: {
|
|
13751
13843
|
star: true,
|
|
13752
13844
|
filled: index < this.selectedRating
|
|
13753
|
-
}, onClick: () => this.handleClick(index + 1) }, "\u2605")))), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && (hAsync("span", { key: '
|
|
13845
|
+
}, onClick: () => this.handleClick(index + 1) }, "\u2605")))), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && (hAsync("span", { key: '60605ec21b542825da0dad629fc1618d9cf63b25', class: "f-ui-04 text-lighter" }, this.parsedMappings[this.selectedRating - 1]))));
|
|
13754
13846
|
}
|
|
13755
13847
|
static get style() { return EdsRatingStyle0; }
|
|
13756
13848
|
static get cmpMeta() { return {
|
|
@@ -13759,7 +13851,7 @@ class EdsRating {
|
|
|
13759
13851
|
"$members$": {
|
|
13760
13852
|
"stars": [2],
|
|
13761
13853
|
"label": [1],
|
|
13762
|
-
"textMapping": [
|
|
13854
|
+
"textMapping": [1, "text-mapping"],
|
|
13763
13855
|
"selectedRating": [32]
|
|
13764
13856
|
},
|
|
13765
13857
|
"$listeners$": undefined,
|
|
@@ -14130,10 +14222,24 @@ class EdsTable {
|
|
|
14130
14222
|
}
|
|
14131
14223
|
handlePageChange(newPage) {
|
|
14132
14224
|
this.currentPage = newPage;
|
|
14225
|
+
sendAnalytics({
|
|
14226
|
+
category: 'ui-component',
|
|
14227
|
+
parentContext: null,
|
|
14228
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/eds-pagination`,
|
|
14229
|
+
name: `${newPage}` || '',
|
|
14230
|
+
action: 'page'
|
|
14231
|
+
});
|
|
14133
14232
|
}
|
|
14134
14233
|
handleSearch(event) {
|
|
14135
14234
|
this.searchQuery = event.target.value;
|
|
14136
14235
|
this.currentPage = 1;
|
|
14236
|
+
/*sendAnalytics({
|
|
14237
|
+
category: 'ui-component',
|
|
14238
|
+
parentContext: null,
|
|
14239
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/eds-input-field/search`,
|
|
14240
|
+
name: `${this.searchQuery}` || '',
|
|
14241
|
+
action: 'page'
|
|
14242
|
+
});*/
|
|
14137
14243
|
}
|
|
14138
14244
|
renderCell(value, column) {
|
|
14139
14245
|
var _a;
|
|
@@ -14173,18 +14279,16 @@ class EdsTable {
|
|
|
14173
14279
|
: this.hostEl.getRootNode().host instanceof HTMLElement
|
|
14174
14280
|
? this.hostEl.getRootNode().host.getBoundingClientRect().width
|
|
14175
14281
|
: 400;
|
|
14176
|
-
//console.log('containerWidth:', containerWidth);
|
|
14177
14282
|
const columnWidth = visibleColumnsCount > 0 ? Math.floor((containerWidth / visibleColumnsCount) * this.divisionFactor()) : 100;
|
|
14178
|
-
|
|
14179
|
-
return (hAsync("div", { key: '178a33c07e6eae9d5edc170f842b6ef29ae21d9c' }, this.searchEnabled && (hAsync("div", { key: 'f1212a4e515a1db218df28b71367c6ffa42e3063' }, hAsync("eds-input-field", { key: 1, name: "search", "aria-label": "Search", type: "text", placeholder: "Search...",
|
|
14283
|
+
return (hAsync("div", { key: '69fd87330d2049eeb91751c781c7aa753fa89883' }, this.searchEnabled && (hAsync("div", { key: '2f9680dd17b852b140fe560f7979e1dd58236c5a' }, hAsync("eds-input-field", { key: 1, name: "search", "aria-label": "Search", type: "text", placeholder: "Search...",
|
|
14180
14284
|
// @ts-ignore
|
|
14181
|
-
onInput: (event) => this.handleSearch(event) }))), hAsync("div", { key: '
|
|
14285
|
+
onInput: (event) => this.handleSearch(event) }))), hAsync("div", { key: 'd67edb24308e526a3e860a90250d58cf8bfee9c8', class: "mt-20" }, hAsync("table", { key: '9a2ef219110e459ac670a0f9c2e62c600f6b5acd', class: "block overflow-x-auto mt-6 p-0" }, hAsync("thead", { key: '81bae222447e805d06642dda19903d5bf99f2b01' }, hAsync("tr", { key: '582d7ea661823b81ccdf3adc9769fe53cf56f04c', class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((column) => {
|
|
14182
14286
|
var _a;
|
|
14183
14287
|
return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && (hAsync("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth}px` } }, column));
|
|
14184
|
-
}))), hAsync("tbody", { key: '
|
|
14288
|
+
}))), hAsync("tbody", { key: 'ce7f87e665c394c5e9f2201ef2658e888ea07948' }, paginatedRows.map((row) => (hAsync("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((column) => {
|
|
14185
14289
|
var _a;
|
|
14186
14290
|
return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && (hAsync("td", { class: "text-center border border-softer m-0 py-8 f-ui-2 break-words", style: { minWidth: `${columnWidth}px` } }, this.renderCell(row[column], column)));
|
|
14187
|
-
}))))))), this.shouldEnablePagination() && (hAsync("div", { key: '
|
|
14291
|
+
}))))))), this.shouldEnablePagination() && (hAsync("div", { key: '0fe6aed0d03c3aa491cd1bb17cd3bdc1e35372a0', class: "mt-20" }, hAsync("eds-pagination", { key: '5192f3f4b2ee93d5864d1afed3341a122c826d97', currentPage: this.currentPage, lastPage: lastPage, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })))));
|
|
14188
14292
|
}
|
|
14189
14293
|
get hostEl() { return getElement(this); }
|
|
14190
14294
|
static get watchers() { return {
|
|
@@ -14588,7 +14692,8 @@ class EdsTimeline {
|
|
|
14588
14692
|
parsed = JSON.parse(newValue);
|
|
14589
14693
|
}
|
|
14590
14694
|
catch (e) {
|
|
14591
|
-
|
|
14695
|
+
// eslint-disable-next-line
|
|
14696
|
+
console.error('Error parsing timeline events JSON', e);
|
|
14592
14697
|
parsed = [];
|
|
14593
14698
|
}
|
|
14594
14699
|
}
|
|
@@ -14630,7 +14735,7 @@ class EdsTimeline {
|
|
|
14630
14735
|
}
|
|
14631
14736
|
}
|
|
14632
14737
|
render() {
|
|
14633
|
-
return (hAsync("div", { key: '
|
|
14738
|
+
return (hAsync("div", { key: '6016cb89d3fe3250482b42d8a0bf500fe18cee5d', class: "max-w-sidebar mx-auto px-4 py-8" }, hAsync("div", { key: '994cc7af75950a0f09d108804efff796602aeb93', class: "relative" }, hAsync("div", { key: '77b15ae60feb380ea20c6466b49d0efd5d8f5180', class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0" }), hAsync("div", { key: '60bb384ce4eedd7bfc3b15a7a637e2b89318d619', class: "space-y-16" }, this.parsedEvents.map((event, index) => (hAsync("div", { class: "relative flex" }, hAsync("div", { class: `w-1/2 ${index % 2 === 0 ? 'pr-4' : ''}` }, index % 2 === 0 && (hAsync("eds-card-generic", { cardTitle: event.title, url: "#", description: event.description, "heading-level": "h2", tiny: true, bg: !event.completed, "with-hover": "false", tags: JSON.stringify(event.completed
|
|
14634
14739
|
? [{ label: 'completed', style: 'accent' }]
|
|
14635
14740
|
: [{ label: 'pending', style: 'default' }]), onClick: () => this.handleEventClick(event) }))), hAsync("div", { class: "flex items-center justify-center relative" }, event.completed ? (hAsync("div", { class: "w-32 h-32 bg-accent rounded-full shadow flex items-center justify-center" })) : (hAsync("div", { class: "w-32 h-32 bg-strong rounded-full shadow flex items-center justify-center" }))), hAsync("div", { class: `w-1/2 ${index % 2 !== 0 ? 'pl-4' : ''}` }, index % 2 !== 0 && (hAsync("eds-card-generic", { cardTitle: event.title, url: "#", description: event.description, "heading-level": "h2", tiny: true, bg: !event.completed, "with-hover": "false", tags: JSON.stringify(event.completed
|
|
14636
14741
|
? [{ label: 'completed', style: 'accent' }]
|
|
@@ -14681,6 +14786,27 @@ class EdsToast {
|
|
|
14681
14786
|
this.duration = 5000;
|
|
14682
14787
|
this.visible = true;
|
|
14683
14788
|
}
|
|
14789
|
+
/**
|
|
14790
|
+
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
14791
|
+
* to recalculate height on window resize.
|
|
14792
|
+
*/
|
|
14793
|
+
componentDidLoad() {
|
|
14794
|
+
// Emit context for each eds-button element after the component is fully loaded
|
|
14795
|
+
const btn = this.el.querySelector('eds-button');
|
|
14796
|
+
this.emitContext(btn);
|
|
14797
|
+
}
|
|
14798
|
+
/**
|
|
14799
|
+
* Emits a custom event called `parentContext` for a given button element.
|
|
14800
|
+
*/
|
|
14801
|
+
emitContext(linkElement) {
|
|
14802
|
+
const event = new CustomEvent('parentContext', {
|
|
14803
|
+
detail: {
|
|
14804
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
14805
|
+
identifier: null
|
|
14806
|
+
}
|
|
14807
|
+
});
|
|
14808
|
+
linkElement.dispatchEvent(event);
|
|
14809
|
+
}
|
|
14684
14810
|
connectedCallback() {
|
|
14685
14811
|
// Auto-dismiss the toast after the specified duration
|
|
14686
14812
|
this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
|
|
@@ -14779,9 +14905,17 @@ class EdsTooltip {
|
|
|
14779
14905
|
* Show the tooltip and update its position.
|
|
14780
14906
|
*/
|
|
14781
14907
|
async showTooltip() {
|
|
14908
|
+
var _a;
|
|
14782
14909
|
await this.updateTooltipPosition();
|
|
14783
14910
|
this.isPositioned = true;
|
|
14784
14911
|
this.isVisible = true;
|
|
14912
|
+
sendAnalytics({
|
|
14913
|
+
category: 'ui-component',
|
|
14914
|
+
parentContext: null,
|
|
14915
|
+
tag: this.el.tagName.toLowerCase(),
|
|
14916
|
+
name: ((_a = this.content) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
14917
|
+
action: 'hover'
|
|
14918
|
+
});
|
|
14785
14919
|
}
|
|
14786
14920
|
/**
|
|
14787
14921
|
* Hide the tooltip.
|
|
@@ -14846,7 +14980,7 @@ class EdsTooltip {
|
|
|
14846
14980
|
}
|
|
14847
14981
|
}
|
|
14848
14982
|
render() {
|
|
14849
|
-
return (hAsync("div", { key: '
|
|
14983
|
+
return (hAsync("div", { key: '673ab0ee31378410f9c83bb5fd37b27d00a7b018', class: "relative" }, hAsync("slot", { key: '0c0138dfdf9aafecc1e0e925c84d4b0ca957f82d' }), this.isVisible && this.isPositioned && this.content && (hAsync("div", { key: '798d01cf631f2e5b3af9d9bb11a847041a6ee2ba', class: "rounded-xs bg-strongest text-inverse f-ui-03-light pointer-events-none absolute z-10 whitespace-nowrap p-6", role: "tooltip", style: {
|
|
14850
14984
|
top: this.tooltipStyle.top,
|
|
14851
14985
|
left: this.tooltipStyle.left,
|
|
14852
14986
|
transform: this.tooltipStyle.transform
|
|
@@ -14886,8 +15020,8 @@ class EdsTrl {
|
|
|
14886
15020
|
apps = JSON.parse(this.applications || '[]');
|
|
14887
15021
|
}
|
|
14888
15022
|
catch (error) {
|
|
14889
|
-
//
|
|
14890
|
-
|
|
15023
|
+
// eslint-disable-next-line
|
|
15024
|
+
console.error('Invalid applications trl JSON', error);
|
|
14891
15025
|
apps = [];
|
|
14892
15026
|
}
|
|
14893
15027
|
}
|
|
@@ -14903,18 +15037,17 @@ class EdsTrl {
|
|
|
14903
15037
|
}
|
|
14904
15038
|
render() {
|
|
14905
15039
|
const apps = this.getParsedApplications();
|
|
14906
|
-
console.log('apps:', apps);
|
|
14907
15040
|
// Map applications into table-friendly data.
|
|
14908
|
-
const tableData = apps.map(app => ({
|
|
15041
|
+
const tableData = apps.map((app) => ({
|
|
14909
15042
|
Application: app.name,
|
|
14910
|
-
|
|
15043
|
+
'Current TRL Stage': `TRL ${app.currentTrl}`,
|
|
14911
15044
|
Progress: (hAsync("div", { class: "w-[200px]" }, hAsync("eds-progress-bar", { value: this.calculateProgress(app.currentTrl) })))
|
|
14912
15045
|
}));
|
|
14913
15046
|
const tableConfig = {
|
|
14914
|
-
|
|
14915
|
-
|
|
15047
|
+
Application: { format: 'code' },
|
|
15048
|
+
'Current TRL Stage': { format: 'text' }
|
|
14916
15049
|
};
|
|
14917
|
-
return (hAsync("div", { key: '
|
|
15050
|
+
return (hAsync("div", { key: '868a7c45e6495d7a2ed8a4ad2974ac31f74535a6', class: "container mx-auto px-4 py-8" }, hAsync("eds-table", { key: 'ed3e2a949d0e1d66a5e80018fa5fcac9bbe64620', data: JSON.stringify(tableData), config: JSON.stringify(tableConfig), "rows-per-page": "2", "pagination-enabled": "true", "search-enabled": "true", "column-size": "default" })));
|
|
14918
15051
|
}
|
|
14919
15052
|
static get cmpMeta() { return {
|
|
14920
15053
|
"$flags$": 0,
|